test
This commit is contained in:
parent
e77313d713
commit
5e08bde94e
2 changed files with 20 additions and 4 deletions
|
@ -20,8 +20,6 @@
|
||||||
libx = import ./lib { inherit inputs outputs stateVersion hmStateVersion; };
|
libx = import ./lib { inherit inputs outputs stateVersion hmStateVersion; };
|
||||||
in {
|
in {
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
# Generic Images / ISOs
|
|
||||||
nixos-rpi4-img = libx.mkHost { hostname = "nixos-rpi4-img"; platform = "aarch64-linux"; installer = nixpkgs + "/nixos/modules/installer/sd-card/sd-image-aarch64.nix"; };
|
|
||||||
# Virtual Machines
|
# Virtual Machines
|
||||||
nixos-vm-01 = libx.mkHost { hostname = "nixos-vm-01"; };
|
nixos-vm-01 = libx.mkHost { hostname = "nixos-vm-01"; };
|
||||||
# Physical Machines
|
# Physical Machines
|
||||||
|
@ -32,8 +30,6 @@
|
||||||
nixos-rpi4-03 = libx.mkHost { hostname = "nixos-rpi4-03"; platform = "aarch64-linux"; };
|
nixos-rpi4-03 = libx.mkHost { hostname = "nixos-rpi4-03"; platform = "aarch64-linux"; };
|
||||||
};
|
};
|
||||||
homeConfigurations = {
|
homeConfigurations = {
|
||||||
# Generic Images / ISOs
|
|
||||||
"albert@nixos-rpi4-img" = libx.mkHome { hostname = "nixos-rpi4-img"; platform = "aarch64-linux"; };
|
|
||||||
# Virtual Machines
|
# Virtual Machines
|
||||||
"albert@nixos-vm-01" = libx.mkHome { hostname = "nixos-vm-01"; };
|
"albert@nixos-vm-01" = libx.mkHome { hostname = "nixos-vm-01"; };
|
||||||
# Physical Machines
|
# Physical Machines
|
||||||
|
@ -43,5 +39,9 @@
|
||||||
"albert@nixos-rpi4-02" = libx.mkHome { hostname = "nixos-rpi4-02"; platform = "aarch64-linux"; };
|
"albert@nixos-rpi4-02" = libx.mkHome { hostname = "nixos-rpi4-02"; platform = "aarch64-linux"; };
|
||||||
"albert@nixos-rpi4-03" = libx.mkHome { hostname = "nixos-rpi4-03"; platform = "aarch64-linux"; };
|
"albert@nixos-rpi4-03" = libx.mkHome { hostname = "nixos-rpi4-03"; platform = "aarch64-linux"; };
|
||||||
};
|
};
|
||||||
|
imageConfigurations = {
|
||||||
|
# Raspberry Pi 4 Image
|
||||||
|
nixos-rpi4-img = libx.mkImage { hostname = "nixos-rpi4-img"; platform = "aarch64-linux"; installer = nixpkgs + "/nixos/modules/installer/sd-card/sd-image-aarch64.nix"; };
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
|
@ -34,6 +34,22 @@
|
||||||
] ++ (inputs.nixpkgs.lib.optionals (installer != null) [ installer ]);
|
] ++ (inputs.nixpkgs.lib.optionals (installer != null) [ installer ]);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Combines mkHost and mkHome for image building
|
||||||
|
mkImage = {
|
||||||
|
hostname,
|
||||||
|
username ? "albert",
|
||||||
|
desktop ? null,
|
||||||
|
platform ? "x86_64-linux",
|
||||||
|
theme ? "default",
|
||||||
|
installer ? null,
|
||||||
|
gpu ? null,
|
||||||
|
theme ? "default"
|
||||||
|
}: {
|
||||||
|
specialArgs = { inherit inputs outputs desktop hostname username stateVersion gpu platform theme; };
|
||||||
|
hostname = mkHost { hostname = hostname; platform = platform; installer = installer; };
|
||||||
|
"$username@$hostname" = mkHome { hostname = hostname; platform = platform; };
|
||||||
|
};
|
||||||
|
|
||||||
forAllSystems = inputs.nixpkgs.lib.genAttrs [
|
forAllSystems = inputs.nixpkgs.lib.genAttrs [
|
||||||
"aarch64-linux"
|
"aarch64-linux"
|
||||||
"i686-linux"
|
"i686-linux"
|
||||||
|
|
Loading…
Reference in a new issue