feat: added machanism for not allowing users to sign up with forbidden/restricted usernames.
Names will be added to the nixos config. Closes #23
This commit is contained in:
parent
35952a2030
commit
dadaf73c78
3 changed files with 26 additions and 4 deletions
14
flake.nix
14
flake.nix
|
@ -55,10 +55,11 @@
|
|||
SSH_ROOT = "skynet_old";
|
||||
|
||||
# special categories of users
|
||||
USERS_ADMIN = lib.strings.concatStringsSep "," cfg.users.admin;
|
||||
USERS_COMMITTEE = lib.strings.concatStringsSep "," cfg.users.committee;
|
||||
USERS_LIFETIME = lib.strings.concatStringsSep "," cfg.users.lifetime;
|
||||
USERS_BANNED = lib.strings.concatStringsSep "," cfg.users.banned;
|
||||
USERS_ADMIN = lib.strings.concatStringsSep "," cfg.users.admin;
|
||||
USERS_COMMITTEE = lib.strings.concatStringsSep "," cfg.users.committee;
|
||||
USERS_LIFETIME = lib.strings.concatStringsSep "," cfg.users.lifetime;
|
||||
USERS_BANNED = lib.strings.concatStringsSep "," cfg.users.banned;
|
||||
USERS_RESTRICTED = lib.strings.concatStringsSep "," cfg.users.restricted;
|
||||
};
|
||||
|
||||
service_name = script: lib.strings.sanitizeDerivationName("${cfg.user}@${script}");
|
||||
|
@ -146,6 +147,11 @@
|
|||
default = [];
|
||||
description = "array of banned users";
|
||||
};
|
||||
restricted = mkOption rec {
|
||||
type = types.listOf types.str;
|
||||
default = [];
|
||||
description = "array of restricted user accounts";
|
||||
};
|
||||
};
|
||||
|
||||
host_port = mkOption rec {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue