[user module] default enable users to prevent lockouts
All checks were successful
Check flake syntax / flake-check (push) Successful in 6m18s
All checks were successful
Check flake syntax / flake-check (push) Successful in 6m18s
also, add admin to trusted users
This commit is contained in:
@@ -5,8 +5,16 @@ let
|
|||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.malobeo.users = {
|
options.malobeo.users = {
|
||||||
malobeo = lib.mkEnableOption "enable malobeo user";
|
malobeo = lib.mkOption {
|
||||||
admin = lib.mkEnableOption "enable admin user";
|
type = lib.types.bool;
|
||||||
|
default = true;
|
||||||
|
description = "enable malobeo user, defaults to on";
|
||||||
|
};
|
||||||
|
admin = lib.mkOption {
|
||||||
|
type = lib.types.bool;
|
||||||
|
default = true;
|
||||||
|
description = "enable admin user, defaults to on to prevent lockouts";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
config = lib.mkMerge [
|
config = lib.mkMerge [
|
||||||
(lib.mkIf cfg.malobeo {
|
(lib.mkIf cfg.malobeo {
|
||||||
@@ -27,6 +35,7 @@ in
|
|||||||
extraGroups = [ "networkmanager" ];
|
extraGroups = [ "networkmanager" ];
|
||||||
};
|
};
|
||||||
environment.systemPackages = with pkgs; [];
|
environment.systemPackages = with pkgs; [];
|
||||||
|
nix.settings.trusted-users = [ "admin" ];
|
||||||
security.sudo.extraRules = [
|
security.sudo.extraRules = [
|
||||||
{
|
{
|
||||||
users = [ "admin" ];
|
users = [ "admin" ];
|
||||||
|
|||||||
Reference in New Issue
Block a user