Use lib and modules from patched nixpkgs
This commit is contained in:
parent
d1d9c0b47d
commit
b4e47c3495
1 changed files with 19 additions and 16 deletions
35
flake.nix
35
flake.nix
|
@ -107,7 +107,7 @@
|
||||||
nur.overlay
|
nur.overlay
|
||||||
www-chvp-be.overlays.default
|
www-chvp-be.overlays.default
|
||||||
];
|
];
|
||||||
baseModules = [
|
commonModules = [
|
||||||
accentor.nixosModules.default
|
accentor.nixosModules.default
|
||||||
agenix.nixosModules.age
|
agenix.nixosModules.age
|
||||||
home-manager.nixosModule
|
home-manager.nixosModule
|
||||||
|
@ -115,21 +115,24 @@
|
||||||
nix-index-database.nixosModules.nix-index
|
nix-index-database.nixosModules.nix-index
|
||||||
./modules
|
./modules
|
||||||
];
|
];
|
||||||
nixosSystem = system: name: nixpkgs.lib.nixosSystem {
|
nixosSystem = system: name: let nixpkgs = nixpkgsForSystem system; in
|
||||||
system = "x86_64-linux";
|
inputs.nixpkgs.lib.nixosSystem {
|
||||||
modules = baseModules ++ [
|
lib = (import nixpkgs { inherit overlays system; }).lib;
|
||||||
({ config, ... }:
|
specialArgs = { modulesPath = toString (nixpkgs + "/nixos/modules"); };
|
||||||
let nixpkgs = nixpkgsForSystem system; in
|
system = "x86_64-linux";
|
||||||
{
|
baseModules = import (nixpkgs + "/nixos/modules/module-list.nix");
|
||||||
nixpkgs.pkgs = import nixpkgs { inherit overlays system; config = config.nixpkgs.config; };
|
modules = commonModules ++ [
|
||||||
networking.hostName = name;
|
({ config, ... }:
|
||||||
nix = {
|
{
|
||||||
extraOptions = "extra-experimental-features = nix-command flakes";
|
nixpkgs.pkgs = import nixpkgs { inherit overlays system; config = config.nixpkgs.config; };
|
||||||
registry = (builtins.mapAttrs (name: v: { flake = v; }) inputs) // { nixpkgs.flake = nixpkgs; };
|
networking.hostName = name;
|
||||||
};
|
nix = {
|
||||||
})
|
extraOptions = "extra-experimental-features = nix-command flakes";
|
||||||
./machines/${name}
|
registry = (builtins.mapAttrs (name: v: { flake = v; }) inputs) // { nixpkgs.flake = nixpkgs; };
|
||||||
];
|
};
|
||||||
|
})
|
||||||
|
./machines/${name}
|
||||||
|
];
|
||||||
};
|
};
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
kharbranth = nixosSystem "x86_64-linux" "kharbranth";
|
kharbranth = nixosSystem "x86_64-linux" "kharbranth";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue