refactor2

This commit is contained in:
Lilith 2025-03-12 15:43:41 +01:00
parent 701c9d71f0
commit 7fa104b722
Signed by: lilith
GPG key ID: 8712A0F317C37175
30 changed files with 240 additions and 111 deletions

114
flake.lock generated
View file

@ -3,18 +3,20 @@
"ags": { "ags": {
"inputs": { "inputs": {
"astal": "astal", "astal": "astal",
"nixpkgs": "nixpkgs" "nixpkgs": [
"nixpkgs"
]
}, },
"locked": { "locked": {
"lastModified": 1738087375, "lastModified": 1738087375,
"narHash": "sha256-GLyNtU9A2VN22jNRHZ2OXuFfTJLh8uEVVt+ftsKUX0c=", "narHash": "sha256-GLyNtU9A2VN22jNRHZ2OXuFfTJLh8uEVVt+ftsKUX0c=",
"owner": "Aylur", "owner": "aylur",
"repo": "ags", "repo": "ags",
"rev": "a6a7a0adb17740f4c34a59902701870d46fbb6a4", "rev": "a6a7a0adb17740f4c34a59902701870d46fbb6a4",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "Aylur", "owner": "aylur",
"repo": "ags", "repo": "ags",
"type": "github" "type": "github"
} }
@ -139,6 +141,24 @@
"type": "github" "type": "github"
} }
}, },
"flake-parts": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
"lastModified": 1740872218,
"narHash": "sha256-ZaMw0pdoUKigLpv9HiNDH2Pjnosg7NBYMJlHTIsHEUo=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "3876f6b87db82f33775b1ef5ea343986105db764",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-utils": { "flake-utils": {
"inputs": { "inputs": {
"systems": "systems" "systems": "systems"
@ -273,22 +293,59 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs": { "matshell": {
"inputs": {
"ags": [
"ags"
],
"flake-parts": "flake-parts",
"nixpkgs": [
"nixpkgs"
],
"systems": "systems_2"
},
"locked": { "locked": {
"lastModified": 1737469691, "lastModified": 1741777612,
"narHash": "sha256-nmKOgAU48S41dTPIXAq0AHZSehWUn6ZPrUKijHAMmIk=", "narHash": "sha256-uU3yN8Ee5nDzlFebSgIgjCMpZvClBXv7JZiUxMQp0CU=",
"owner": "nixos", "owner": "Neurarian",
"repo": "nixpkgs", "repo": "matshell",
"rev": "9e4d5190a9482a1fb9d18adf0bdb83c6e506eaab", "rev": "29e6a903a96988d8423430006b1dc3d541dacc28",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nixos", "owner": "Neurarian",
"ref": "nixos-unstable", "repo": "matshell",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1739834344,
"narHash": "sha256-PUAcU3YlKNFYrBBHkqshO4wRfMunzhMTEIH1dyhjTtk=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "f0295845e58ada369322524631821b01c0db13a7",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
}, },
"nixpkgs-lib": {
"locked": {
"lastModified": 1740872140,
"narHash": "sha256-3wHafybyRfpUCLoE8M+uPVZinImg3xX+Nm6gEfN3G8I=",
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/6d3702243441165a03f699f64416f635220f4f15.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/6d3702243441165a03f699f64416f635220f4f15.tar.gz"
}
},
"nixpkgs-stable": { "nixpkgs-stable": {
"locked": { "locked": {
"lastModified": 1735651292, "lastModified": 1735651292,
@ -305,29 +362,14 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_2": {
"locked": {
"lastModified": 1739834344,
"narHash": "sha256-PUAcU3YlKNFYrBBHkqshO4wRfMunzhMTEIH1dyhjTtk=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "f0295845e58ada369322524631821b01c0db13a7",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": { "root": {
"inputs": { "inputs": {
"ags": "ags", "ags": "ags",
"flake-utils": "flake-utils", "flake-utils": "flake-utils",
"home-manager": "home-manager", "home-manager": "home-manager",
"impermanence": "impermanence", "impermanence": "impermanence",
"nixpkgs": "nixpkgs_2", "matshell": "matshell",
"nixpkgs": "nixpkgs",
"nixpkgs-stable": "nixpkgs-stable", "nixpkgs-stable": "nixpkgs-stable",
"sops-nix": "sops-nix", "sops-nix": "sops-nix",
"stylix": "stylix" "stylix": "stylix"
@ -372,7 +414,7 @@
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
], ],
"systems": "systems_2", "systems": "systems_3",
"tinted-foot": "tinted-foot", "tinted-foot": "tinted-foot",
"tinted-kitty": "tinted-kitty", "tinted-kitty": "tinted-kitty",
"tinted-schemes": "tinted-schemes", "tinted-schemes": "tinted-schemes",
@ -409,6 +451,20 @@
} }
}, },
"systems_2": { "systems_2": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"id": "systems",
"type": "indirect"
}
},
"systems_3": {
"locked": { "locked": {
"lastModified": 1681028828, "lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",

View file

@ -1,4 +1,4 @@
{ home-manager, ags, sops-nix, ... } @ inputs: { { home-manager, ags, sops-nix, matshell, ... } @ inputs: {
imports = [ imports = [
home-manager.nixosModules.home-manager home-manager.nixosModules.home-manager
]; ];
@ -7,6 +7,7 @@
home-manager.users."lilith" = { home-manager.users."lilith" = {
imports = [ imports = [
# ags.homeManagerModules.default # ags.homeManagerModules.default
matshell.homeManagerModules.default
sops-nix.homeManagerModules.sops sops-nix.homeManagerModules.sops
# ./ags # ToDo: get codin :3 # ./ags # ToDo: get codin :3
./hyprland ./hyprland

View file

@ -1,6 +1,4 @@
{ matshell, ...}: { {...} @ inputs: {
imports = [ matshell.homeManagerModules.default ];
programs.ags = { programs.ags = {
matshell.enable = true; matshell.enable = true;
}; };

View file

@ -1,4 +1,14 @@
{ lib, ...}: { { config, lib, ...}: {
system.stateVersion = "24.11";
desktop.enable = true;
gaming.enable = true;
nfs.client.enable = true;
stylix.enable = true;
home-manager.users."lilith".wayland.windowManager.hyprland.settings = { home-manager.users."lilith".wayland.windowManager.hyprland.settings = {
input.kb_layout = lib.mkForce "en"; input.kb_layout = lib.mkForce "en";

14
system/core/default.nix Normal file
View file

@ -0,0 +1,14 @@
{...}: {
imports = [
./audio.nix
./bluetooth.nix
./boot.nix
./btrfs.nix
./env.nix
./fonts.nix
./networking.nix
./nix.nix
./packages.nix
./persistence.nix
];
}

View file

@ -1,29 +1,7 @@
{...}: { {...}: {
imports = [ imports = [
./boot.nix ./core
./packages.nix ./optional
./env.nix
./btrfs.nix
./users.nix
./networking.nix
./persistence.nix
./nix.nix
./audio.nix
./ssh.nix
./syncthing.nix
./wayland.nix
./steam.nix
./nfs.nix
./fonts.nix
./bluetooth.nix
./zsh.nix
./sops.nix
./stylix.nix
]; ];
# system.stateVersion = "24.11";
system.stateVersion = "24.11";
} }

View file

@ -1,13 +0,0 @@
{ ... }: {
fileSystems."/mnt/nas" = {
device = "nixserver:/share";
fsType = "nfs";
options = [
"nfsvers=4.2"
"noauto"
"x-systemd.automount"
"x-systemd.idle-timeout=600"
"_netdev"
];
};
}

View file

@ -0,0 +1,7 @@
{...}: {
imports = [
./nfs.nix
./desktop.nix
./steam.nix
];
}

View file

@ -0,0 +1,28 @@
{ config, lib, ...}: {
options.desktop.enable = lib.mkEnableOption "Enable Wayland compositor with hyprland login";
config = lib.mkIf config.desktop.enable {
hardware.graphics.enable = true;
security.polkit.enable = true;
security.pam.services.hyprlock = {};
services.dbus.enable = true;
programs.hyprland.enable = true;
services.greetd = {
enable = true;
settings = {
default_session = {
user = "lilith";
command = "Hyprland";
};
initial_session = {
user = "lilith";
command = "Hyprland";
};
};
};
};
}

23
system/optional/nfs.nix Normal file
View file

@ -0,0 +1,23 @@
{ config, lib, ... }: {
options.nfs.client.enable = lib.mkEnableOption "Enable Nas (via NFS) as a client";
options.nfs.server.enable = lib.mkEnableOption "Enable Nas (via NFS) as the server";
config = lib.mkIf config.nfs.client.enable {
fileSystems."/mnt/nas" = {
device = "nixserver:/share";
fsType = "nfs";
options = [
"nfsvers=4.2"
"noauto"
"x-systemd.automount"
"x-systemd.idle-timeout=600"
"_netdev"
];
};
};
config = lib.mkIf config.nfs.server.enable {
};
}

27
system/optional/steam.nix Normal file
View file

@ -0,0 +1,27 @@
{ config, lib, ...}: {
options.gaming.enable = lib.mkEnableOption "Enable steam and related software";
config = lib.mkIf config.gaming.enable {
programs = {
gamescope = {
enable = true;
capSysNice = true;
};
steam = {
enable = true;
gamescopeSession.enable = true;
};
gamemode.enable = true;
};
environment = {
systemPackages = with pkgs; [
mangohud
protonup
];
};
};
}

View file

@ -0,0 +1,39 @@
{stylix, pkgs, config, lib, ...}: {
options.stylix.enable = lib.mkEnableOption "Enable Stylix";
config = lib.mkIf config.stylix.enable {
imports = [stylix.nixosModules.stylix];
stylix = {
enable = true;
image = ../wallpapers/default.png;
polarity = "dark";
opacity = {
terminal = 0.8;
popups = 0.8;
};
fonts = {
monospace = {
package = pkgs.nerd-fonts.jetbrains-mono;
name = "JetBrainsMono Nerd Font";
};
emoji = {
package = pkgs.twemoji-color-font;
name = "Twemoji";
};
sizes = { applications = 14; desktop = 12; popups = 12; terminal = 14; };
};
cursor = {
package = pkgs.rose-pine-cursor;
name = "Rosé Pine";
};
};
};
}

View file

@ -1,5 +0,0 @@
{...}: {
programs.steam.enable = true;
programs.steam.remotePlay.openFirewall = true;
}

View file

@ -1,34 +0,0 @@
{stylix, pkgs, ...}: {
imports = [stylix.nixosModules.stylix];
stylix = {
enable = true;
image = ../wallpapers/default.png;
polarity = "dark";
opacity = {
terminal = 0.8;
popups = 0.8;
};
fonts = {
monospace = {
package = pkgs.nerd-fonts.jetbrains-mono;
name = "JetBrainsMono Nerd Font";
};
emoji = {
package = pkgs.twemoji-color-font;
name = "Twemoji";
};
sizes = { applications = 14; desktop = 12; popups = 12; terminal = 14; };
};
cursor = {
package = pkgs.rose-pine-cursor;
name = "Rosé Pine";
};
};
}