refactor nixos configs
This commit is contained in:
49
flake.nix
49
flake.nix
@@ -12,49 +12,42 @@
|
|||||||
self,
|
self,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
{
|
let
|
||||||
nixosConfigurations = {
|
inherit (nixpkgs) lib;
|
||||||
|
hosts = {
|
||||||
# VivoBook laptop
|
# VivoBook laptop
|
||||||
haze = nixpkgs.lib.nixosSystem {
|
haze = {
|
||||||
specialArgs = {
|
|
||||||
inherit inputs;
|
|
||||||
inherit (import ./parts) keys;
|
|
||||||
};
|
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
modules = [
|
|
||||||
./hosts/haze
|
|
||||||
./system
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# Hetzner VPS
|
# Hetzner VPS
|
||||||
crocus = nixpkgs.lib.nixosSystem {
|
crocus = {
|
||||||
specialArgs = {
|
|
||||||
inherit inputs;
|
|
||||||
inherit (import ./parts) keys;
|
|
||||||
};
|
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
modules = [
|
|
||||||
./hosts/crocus
|
|
||||||
./system
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# Raspberry Pi 4
|
# Raspberry Pi 4
|
||||||
genepi = nixpkgs.lib.nixosSystem {
|
genepi = {
|
||||||
|
system = "aarch64-linux";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
nixosConfigurations =
|
||||||
|
let
|
||||||
|
mkNixosConfig =
|
||||||
|
hostname:
|
||||||
|
{ system }:
|
||||||
|
lib.nixosSystem {
|
||||||
|
inherit system;
|
||||||
specialArgs = {
|
specialArgs = {
|
||||||
inherit inputs self;
|
inherit inputs self;
|
||||||
inherit (import ./parts) keys;
|
inherit (import ./parts) keys;
|
||||||
};
|
};
|
||||||
system = "aarch64-linux";
|
|
||||||
modules = [
|
modules = [
|
||||||
./hosts/genepi
|
./hosts/${hostname}
|
||||||
./system
|
./system
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
in
|
||||||
};
|
builtins.mapAttrs mkNixosConfig hosts;
|
||||||
|
|
||||||
# Raspberry Pi 4 installer ISO.
|
# Raspberry Pi 4 installer ISO.
|
||||||
packages.aarch64-linux.installer-sd-image = nixos-generators.nixosGenerate {
|
packages.aarch64-linux.installer-sd-image = nixos-generators.nixosGenerate {
|
||||||
|
|||||||
Reference in New Issue
Block a user