overlays refactor
This commit is contained in:
22
flake.nix
22
flake.nix
@@ -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; };
|
||||
|
||||
Reference in New Issue
Block a user