feat(roles): Parameterize hardcoded values in printing, nfs-mounts, and virtualisation roles
- printing role: Add configurable printerName, printerUri, and printerModel options to replace hardcoded Brother printer values - nfs-mounts role: Add configurable server, remotePath, and mountPoint options to replace hardcoded NFS server IP (10.0.0.43) - virtualisation role: Add configurable dockerUsers option as list type to replace hardcoded 'johno' docker group membership All options have sensible defaults matching the original hardcoded values, ensuring backward compatibility while allowing per-host customization. Implements bead: nixos-configs-fkt
This commit is contained in:
@@ -8,6 +8,11 @@ in
|
||||
{
|
||||
options.roles.virtualisation = {
|
||||
enable = mkEnableOption "Enable virtualisation";
|
||||
dockerUsers = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [ "johno" ];
|
||||
description = "List of users to add to the docker group";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable
|
||||
@@ -15,6 +20,6 @@ in
|
||||
virtualisation.libvirtd.enable = true;
|
||||
programs.virt-manager.enable = true;
|
||||
virtualisation.docker.enable = true;
|
||||
users.extraGroups.docker.members = [ "johno" ];
|
||||
users.extraGroups.docker.members = cfg.dockerUsers;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user