chore(gengetsu): common nixos.hw.c4130

This commit is contained in:
arcnmx 2024-11-24 13:51:35 -08:00
parent 64efbaf503
commit 3c5e7179bb
18 changed files with 217 additions and 132 deletions

View file

@ -2,11 +2,20 @@
config,
pkgs,
meta,
lib,
...
}: {
security.sudo.wheelNeedsPassword = false;
}: let
inherit (lib.modules) mkIf mkDefault;
in {
imports = let
inherit (meta) nixos;
in [
nixos.users
];
security.polkit.extraConfig = ''
security.sudo.wheelNeedsPassword = mkDefault false;
security.polkit.extraConfig = mkIf (!config.security.sudo.wheelNeedsPassword) ''
polkit.addRule(function(action, subject) {
if (subject.isInGroup("wheel")) {
return polkit.Result.YES;
@ -14,12 +23,6 @@
});
'';
imports = let
inherit (meta) nixos;
in [
nixos.users
];
users.motd = ''
${config.networking.hostName}.${config.networking.domain}
@ -27,7 +30,7 @@
users.defaultUserShell = pkgs.zsh;
users.users.root = {
hashedPassword = "$6$SLue7utn4qXtW1TE$yQOliCPKgkiFST5H6iqCCwT2dn3o4e/h39MaCbhOXVreFQrkWe7ZzJUOzC0u28/0.Hzs6xKSiJnGjbLXvGstr1";
hashedPassword = mkDefault "$6$SLue7utn4qXtW1TE$yQOliCPKgkiFST5H6iqCCwT2dn3o4e/h39MaCbhOXVreFQrkWe7ZzJUOzC0u28/0.Hzs6xKSiJnGjbLXvGstr1";
openssh.authorizedKeys.keys = with pkgs.lib; (concatLists (mapAttrsToList
(name: user:
if elem "wheel" user.extraGroups