flake: decouple nixpkgs from mkSystem
This commit is contained in:
parent
1bf3cdf993
commit
e0ec7ceb2a
1 changed files with 8 additions and 13 deletions
21
flake.nix
21
flake.nix
|
|
@ -62,17 +62,9 @@
|
||||||
me = prev.callPackage ./packages { inherit inputs; } // { inherit inputs; };
|
me = prev.callPackage ./packages { inherit inputs; } // { inherit inputs; };
|
||||||
})];
|
})];
|
||||||
|
|
||||||
pkgs = import nixpkgs {
|
|
||||||
inherit overlays;
|
|
||||||
system = "x86_64-linux";
|
|
||||||
};
|
|
||||||
|
|
||||||
lib = pkgs.lib;
|
|
||||||
modules = import ./modules { inherit lib; };
|
|
||||||
|
|
||||||
mkSystem =
|
mkSystem =
|
||||||
if !(self ? rev) then throw "Dirty git tree detected." else
|
if !(self ? rev) then throw "Dirty git tree detected." else
|
||||||
name: arch: enableGUI: nixpkgs.lib.nixosSystem {
|
nixpkgs: name: arch: enableGUI: nixpkgs.lib.nixosSystem {
|
||||||
system = arch;
|
system = arch;
|
||||||
modules = [
|
modules = [
|
||||||
{ nixpkgs.overlays = overlays; }
|
{ nixpkgs.overlays = overlays; }
|
||||||
|
|
@ -80,13 +72,16 @@
|
||||||
agenix.nixosModules.age
|
agenix.nixosModules.age
|
||||||
(./hosts + "/${name}")
|
(./hosts + "/${name}")
|
||||||
];
|
];
|
||||||
specialArgs = { inherit inputs modules enableGUI; };
|
specialArgs = {
|
||||||
|
inherit inputs enableGUI;
|
||||||
|
modules = import ./modules { lib = nixpkgs.lib; };
|
||||||
|
};
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
nixosConfigurations."apricot" = mkSystem "apricot" "x86_64-linux" false;
|
nixosConfigurations."apricot" = mkSystem nixpkgs "apricot" "x86_64-linux" false;
|
||||||
nixosConfigurations."blossom" = mkSystem "blossom" "x86_64-linux" true;
|
nixosConfigurations."blossom" = mkSystem nixpkgs "blossom" "x86_64-linux" true;
|
||||||
nixosConfigurations."fondue" = mkSystem "fondue" "x86_64-linux" false;
|
nixosConfigurations."fondue" = mkSystem nixpkgs "fondue" "x86_64-linux" false;
|
||||||
|
|
||||||
# TODO: currently broken
|
# TODO: currently broken
|
||||||
# devShells.x86_64-linux = pkgs.callPackage ./shells { inherit inputs; };
|
# devShells.x86_64-linux = pkgs.callPackage ./shells { inherit inputs; };
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue