chore: split nixos and opentofu
This commit is contained in:
parent
d125848b82
commit
06500a8f01
68 changed files with 44 additions and 61 deletions
|
|
@ -1,37 +0,0 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
{
|
||||
options.homelab.appUsers = lib.mkOption {
|
||||
type = lib.types.attrsOf (lib.types.submodule {
|
||||
options = {
|
||||
uid = lib.mkOption {
|
||||
type = lib.types.int;
|
||||
description = "The user ID for the app user";
|
||||
};
|
||||
group = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = config.users.groups.apps.name;
|
||||
description = "The primary group for the app user";
|
||||
};
|
||||
extraGroups = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.str;
|
||||
default = [];
|
||||
description = "Extra groups for the app user";
|
||||
};
|
||||
};
|
||||
});
|
||||
default = {};
|
||||
description = "App users to automatically create with standard homelab options";
|
||||
};
|
||||
|
||||
config = {
|
||||
users.users = lib.mapAttrs (name: cfg: {
|
||||
uid = lib.mkForce cfg.uid;
|
||||
isSystemUser = true;
|
||||
group = cfg.group;
|
||||
extraGroups = cfg.extraGroups;
|
||||
home = "/var/empty";
|
||||
shell = null;
|
||||
}) config.homelab.appUsers;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue