overlays refactor

This commit is contained in:
Lennart J. Kurzweg (Nx2)
2025-06-17 19:48:31 +02:00
parent fbd045d53e
commit d2d1ce7830
103 changed files with 156 additions and 323 deletions

View File

@@ -31,13 +31,19 @@
domain = "nx2.site";
home = "/home/${user}/";
webroot = "/var/lib/hugo/nx2site/public";
pkgs-version = "25.05";
};
pkgs = (import nixpkgs { inherit system config; }) // {
unstable = import nixpkgs-unstable { inherit system config; };
latest = import nixpkgs-latest { inherit system config; };
version = "25.05";
};
pkgs = builtins.removeAttrs (import nixpkgs {
inherit system config;
overlays = [
(final: prev: {
unstable = import nixpkgs-unstable { inherit system config; };
latest = import nixpkgs-latest { inherit system config; };
version = "25.05";
})
];
}) [ "hyper" "host" ]; # this removes the programs from pkgs so I can use the variable name
nvidia-base = import ./flake-modules/nvidia.nix;
secrets = import ./git-crypt/secrets.nix;
@@ -45,16 +51,18 @@
in {
nixosConfigurations = let
make-nixos-system = host: nvidia-settings: nixpkgs.lib.nixosSystem {
inherit pkgs;
modules = [ ./configuration.nix ];
specialArgs = let
hyper = hyper-base // { inherit host; nvidia = (nvidia-base // nvidia-settings); };
in { inherit pkgs inputs hyper rice secrets; };
in { inherit inputs hyper rice secrets; };
};
make-nixos-wsl-system = host: nixpkgs.lib.nixosSystem {
inherit pkgs;
modules = [ ./nixos-wsl.nix ];
specialArgs = let
hyper = hyper-base // { inherit host; };
in { inherit pkgs inputs hyper rice; };
in { inherit inputs hyper rice; };
};
in {
NxXPS = make-nixos-system "NxXPS" { enable = true; prime = true; };