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,
...
} @ inputs: let
modules' = [ragenix.nixosModules.default lanzaboote.nixosModules.lanzaboote];
in {
nixosConfigurations.fuji = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [./fuji] ++ modules';
specialArgs = inputs;
};
mkSystem = name:
nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./common.nix
nixosConfigurations.kilimandjaro = inputs.nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [./kilimandjaro] ++ modules';
specialArgs = inputs;
};
./${name}
./${name}/hardware-configuration.nix
{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;
};

View file

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

View file

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