split configs

This commit is contained in:
2026-05-11 22:03:23 -05:00
parent 5f569c1a32
commit 2d23b501f0
2 changed files with 55 additions and 28 deletions
+4 -3
View File
@@ -2,6 +2,7 @@
config, config,
lib, lib,
pkgs, pkgs,
meta,
... ...
}: }:
@@ -56,8 +57,8 @@
}; };
}; };
networking.hostName = "roy-laptop"; networking.hostName = meta.hostname;
networking.hostId = "4cb9fc76"; networking.hostId = meta.hostId;
networking = { networking = {
useDHCP = true; useDHCP = true;
@@ -116,7 +117,7 @@
users.mutableUsers = false; users.mutableUsers = false;
users.users.roy = { users.users.roy = {
isNormalUser = true; isNormalUser = true;
hashedPassword = "$y$j9T$4yOAv6R7Xtn23XmhSSC8g.$T1CckfWgxjEyZshjBzcaMO9WidP.q..OG7LwtXFTw12"; hashedPassword = meta.hashedPass;
extraGroups = [ extraGroups = [
"wheel" "wheel"
"networkmanager" "networkmanager"
+27 -1
View File
@@ -37,8 +37,32 @@
sops-nix, sops-nix,
firefox-addons, firefox-addons,
}@inputs: }@inputs:
# Place all config differences between laptop/desktop here
# If they grow sufficiently different, maybe split them out completely
let
platforms = [
{ {
nixosConfigurations.default = nixpkgs.lib.nixosSystem { name = "roy-laptop";
hostId = "4cb9fc76";
hashedPass = "$y$j9T$4yOAv6R7Xtn23XmhSSC8g.$T1CckfWgxjEyZshjBzcaMO9WidP.q..OG7LwtXFTw12";
}
{
name = "roy-desktop";
hostId = "67cf9bc4";
hashedPass = "$y$j9T$4yOAv6R7Xtn23XmhSSC8g.$T1CckfWgxjEyZshjBzcaMO9WidP.q..OG7LwtXFTw12";
}
];
in
{
nixosConfigurations = builtins.listToAttrs (
map (platform: {
name = platform.name;
value = nixpkgs.lib.nixosSystem {
specialArgs.meta = {
hostname = platform.name;
hostId = platform.hostId;
hashedPass = platform.hashedPass;
};
system = "x86_64-linux"; system = "x86_64-linux";
modules = [ modules = [
./configuration.nix ./configuration.nix
@@ -64,5 +88,7 @@
} }
]; ];
}; };
}) platforms
);
}; };
} }