mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 12:29:19 -08:00
chore(gengetsu): common nixos.hw.c4130
This commit is contained in:
parent
64efbaf503
commit
3c5e7179bb
18 changed files with 217 additions and 132 deletions
|
|
@ -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 = ''
|
||||
[0m[1;35m${config.networking.hostName}.${config.networking.domain}[0m
|
||||
|
||||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue