refactor: use native NixOS to build host configs

instead of nixos-flake, now nixos-unified
This commit is contained in:
teutat3s 2024-10-07 17:00:27 +02:00
parent 151045ca8a
commit d4eaa00b81
Signed by: teutat3s
GPG key ID: 4FA1D3FA524F22C1
4 changed files with 71 additions and 22 deletions

View file

@ -2,14 +2,35 @@
withSystem,
self,
inputs,
config,
...
}:
{
flake = {
nixosConfigurations = {
dumpyourvms = self.nixos-flake.lib.mkLinuxSystem {
nixpkgs.hostPlatform = "x86_64-linux";
nixosModules = {
home-manager = {
imports = [
inputs.home-manager.nixosModules.home-manager
({
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = {
flake = {
inherit self inputs config;
};
};
})
];
};
};
nixosConfigurations = {
dumpyourvms = self.inputs.nixpkgs.lib.nixosSystem {
specialArgs = {
flake = {
inherit self inputs config;
};
};
modules = [
self.nixosModules.base
./dumpyourvms
self.nixosModules.teutat3s
@ -24,9 +45,13 @@
];
};
ryzensun = self.nixos-flake.lib.mkLinuxSystem {
nixpkgs.hostPlatform = "x86_64-linux";
imports = [
ryzensun = self.inputs.nixpkgs.lib.nixosSystem {
specialArgs = {
flake = {
inherit self inputs config;
};
};
modules = [
self.nixosModules.base
./ryzensun
self.nixosModules.teutat3s
@ -40,9 +65,13 @@
];
};
fae = self.nixos-flake.lib.mkLinuxSystem {
nixpkgs.hostPlatform = "aarch64-linux";
imports = [
fae = self.inputs.nixpkgs.lib.nixosSystem {
specialArgs = {
flake = {
inherit self inputs config;
};
};
modules = [
self.nixosModules.base
inputs.nixos-hardware.nixosModules.raspberry-pi-4
./fae
@ -52,9 +81,13 @@
];
};
#powder = self.nixos-flake.lib.mkLinuxSystem {
# nixpkgs.hostPlatform = "aarch64-linux";
# imports = [
#powder = self.inputs.nixpkgs.lib.nixosSystem {
# specialArgs = {
# flake = {
# inherit self inputs config;
# };
# };
# modules = [
# self.nixosModules.base
# inputs.nixos-hardware.nixosModules.raspberry-pi-4
# ./powder
@ -65,9 +98,13 @@
# ];
#};
iso = self.nixos-flake.lib.mkLinuxSystem {
nixpkgs.hostPlatform = "x86_64-linux";
imports = [
iso = self.inputs.nixpkgs.lib.nixosSystem {
specialArgs = {
flake = {
inherit self inputs config;
};
};
modules = [
"${inputs.nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix"
self.nixosModules.base
./iso
@ -75,10 +112,13 @@
];
};
iso-arm = self.nixos-flake.lib.mkLinuxSystem {
nixpkgs.hostPlatform = "aarch64-linux";
nixpkgs.buildPlatform = "x86_64-linux";
imports = [
iso-arm = self.inputs.nixpkgs.lib.nixosSystem {
specialArgs = {
flake = {
inherit self inputs config;
};
};
modules = [
"${inputs.nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix"
self.nixosModules.base
./iso
@ -86,9 +126,13 @@
];
};
iso-graphical = self.nixos-flake.lib.mkLinuxSystem {
nixpkgs.hostPlatform = "x86_64-linux";
imports = [
iso-graphical = self.inputs.nixpkgs.lib.nixosSystem {
specialArgs = {
flake = {
inherit self inputs config;
};
};
modules = [
"${inputs.nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix"
self.nixosModules.base
./iso

View file

@ -43,4 +43,6 @@
size = 18432;
}
];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
}

View file

@ -4,4 +4,5 @@
isoImage.squashfsCompression = "gzip -Xcompression-level 1";
systemd.services.sshd.wantedBy = lib.mkForce [ "multi-user.target" ];
networking.networkmanager.enable = false;
nixpkgs.hostPlatform = "x86_64-linux";
}

View file

@ -36,4 +36,6 @@
};
swapDevices = [ ];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
}