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:
parent
b1675e8598
commit
e9ceb852f9
3 changed files with 18 additions and 27 deletions
29
flake.nix
29
flake.nix
|
@ -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;
|
||||
};
|
||||
|
|
|
@ -1,11 +1,4 @@
|
|||
{...}: {
|
||||
imports = [
|
||||
../common.nix
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
networking.hostName = "fuji";
|
||||
|
||||
_: {
|
||||
services.xserver.videoDrivers = ["amdgpu"];
|
||||
|
||||
# services.xserver.videoDrivers = ["nvidia"];
|
||||
|
|
|
@ -1,11 +1,4 @@
|
|||
{pkgs, ...}: {
|
||||
imports = [
|
||||
../common.nix
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
networking.hostName = "kilimandjaro";
|
||||
|
||||
hardware.bluetooth.enable = true;
|
||||
services.blueman.enable = true;
|
||||
|
||||
|
|
Loading…
Reference in a new issue