split configs
This commit is contained in:
+4
-3
@@ -2,6 +2,7 @@
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
meta,
|
||||
...
|
||||
}:
|
||||
|
||||
@@ -56,8 +57,8 @@
|
||||
};
|
||||
};
|
||||
|
||||
networking.hostName = "roy-laptop";
|
||||
networking.hostId = "4cb9fc76";
|
||||
networking.hostName = meta.hostname;
|
||||
networking.hostId = meta.hostId;
|
||||
|
||||
networking = {
|
||||
useDHCP = true;
|
||||
@@ -116,7 +117,7 @@
|
||||
users.mutableUsers = false;
|
||||
users.users.roy = {
|
||||
isNormalUser = true;
|
||||
hashedPassword = "$y$j9T$4yOAv6R7Xtn23XmhSSC8g.$T1CckfWgxjEyZshjBzcaMO9WidP.q..OG7LwtXFTw12";
|
||||
hashedPassword = meta.hashedPass;
|
||||
extraGroups = [
|
||||
"wheel"
|
||||
"networkmanager"
|
||||
|
||||
@@ -37,8 +37,32 @@
|
||||
sops-nix,
|
||||
firefox-addons,
|
||||
}@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";
|
||||
modules = [
|
||||
./configuration.nix
|
||||
@@ -64,5 +88,7 @@
|
||||
}
|
||||
];
|
||||
};
|
||||
}) platforms
|
||||
);
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user