refactor flake, part 2

now using a homemade `mkSystem` function to make systems more identical
thanks to leah for telling me about genAttrs

note to future self: this is the commit where everything started going to shit.
this is the moment in time where i decided nix was perfection.
this is the precise timestamp in which i found out that there's no coming back from nix.

i bid you farewell, old uku.
This commit is contained in:
uku 2023-11-13 02:08:39 +01:00
parent b1675e8598
commit e9ceb852f9
Signed by: uku
GPG key ID: 7D01D7B105E77166
3 changed files with 18 additions and 27 deletions

View file

@ -37,19 +37,24 @@
lanzaboote, lanzaboote,
... ...
} @ inputs: let } @ inputs: let
modules' = [ragenix.nixosModules.default lanzaboote.nixosModules.lanzaboote]; mkSystem = name:
in { nixpkgs.lib.nixosSystem {
nixosConfigurations.fuji = nixpkgs.lib.nixosSystem { system = "x86_64-linux";
system = "x86_64-linux"; modules = [
modules = [./fuji] ++ modules'; ./common.nix
specialArgs = inputs;
};
nixosConfigurations.kilimandjaro = inputs.nixpkgs.lib.nixosSystem { ./${name}
system = "x86_64-linux"; ./${name}/hardware-configuration.nix
modules = [./kilimandjaro] ++ modules';
specialArgs = inputs; {networking.hostName = name;}
};
ragenix.nixosModules.default
lanzaboote.nixosModules.lanzaboote
];
specialArgs = inputs;
};
in {
nixosConfigurations = nixpkgs.lib.genAttrs ["fuji" "kilimandjaro"] mkSystem;
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.alejandra; formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.alejandra;
}; };

View file

@ -1,11 +1,4 @@
{...}: { _: {
imports = [
../common.nix
./hardware-configuration.nix
];
networking.hostName = "fuji";
services.xserver.videoDrivers = ["amdgpu"]; services.xserver.videoDrivers = ["amdgpu"];
# services.xserver.videoDrivers = ["nvidia"]; # services.xserver.videoDrivers = ["nvidia"];

View file

@ -1,11 +1,4 @@
{pkgs, ...}: { {pkgs, ...}: {
imports = [
../common.nix
./hardware-configuration.nix
];
networking.hostName = "kilimandjaro";
hardware.bluetooth.enable = true; hardware.bluetooth.enable = true;
services.blueman.enable = true; services.blueman.enable = true;