initial commit
This commit is contained in:
commit
5679c003d8
26 changed files with 296 additions and 0 deletions
32
export/iso.nix
Normal file
32
export/iso.nix
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
{ nixosUsers ? {}, nixosGroups ? {}, nixosModules, hmModules ? { default = {}; }, ...}@flake: { ... }@inputs: { host, ... }@imports: let
|
||||
host' = name: snippets: let
|
||||
|
||||
overlay = self: super: {
|
||||
makeModulesClosure = x: super.makeModulesClosure (x // { allowMissing = true; });
|
||||
};
|
||||
|
||||
common = { modulesPath, lib, ... }: {
|
||||
config.nixpkgs.overlays = [ overlay ];
|
||||
config.networking.hostName = lib.mkForce name;
|
||||
config.home-manager = {
|
||||
sharedModules = [ hmModules.default ] ;
|
||||
};
|
||||
|
||||
imports = [
|
||||
(modulesPath + "/installer/cd-dvd/installation-cd-minimal-new-kernel-no-zfs.nix")
|
||||
nixosModules.default
|
||||
inputs.home-manager.nixosModules.default
|
||||
];
|
||||
};
|
||||
|
||||
system = inputs.nixpkgs.lib.nixosSystem {
|
||||
specialArgs = { inherit inputs flake; };
|
||||
modules = [ common ]
|
||||
++ snippets
|
||||
++ builtins.attrValues nixosUsers
|
||||
++ builtins.attrValues nixosGroups
|
||||
;
|
||||
};
|
||||
in system.config.system.build.isoImage;
|
||||
|
||||
in builtins.mapAttrs host' host
|
||||
Loading…
Add table
Add a link
Reference in a new issue