mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-07-13 08:02:40 +02:00
fix(security): enable sudo password for ryan, use root for remote deployment
This commit is contained in:
@@ -36,14 +36,10 @@
|
|||||||
"libvirtd"
|
"libvirtd"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# root's ssh key are mainly used for remote deployment
|
||||||
users.users.root = {
|
users.users.root = {
|
||||||
initialHashedPassword = config.users.users."${username}".initialHashedPassword;
|
initialHashedPassword = config.users.users."${username}".initialHashedPassword;
|
||||||
openssh.authorizedKeys.keys = config.users.users."${username}".openssh.authorizedKeys.keys;
|
openssh.authorizedKeys.keys = config.users.users."${username}".openssh.authorizedKeys.keys;
|
||||||
};
|
};
|
||||||
|
|
||||||
# The wheel group is a special user group,
|
|
||||||
# which can access to the `su` or `sudo` command to run commands as super user.
|
|
||||||
#
|
|
||||||
# Don't ask for password for wheel group
|
|
||||||
security.sudo.wheelNeedsPassword = false;
|
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-1
@@ -7,6 +7,7 @@ with allSystemAttrs; let
|
|||||||
inherit home-manager;
|
inherit home-manager;
|
||||||
inherit nixpkgs; # or nixpkgs-unstable
|
inherit nixpkgs; # or nixpkgs-unstable
|
||||||
specialArgs = allSystemSpecialArgs.x64_system;
|
specialArgs = allSystemSpecialArgs.x64_system;
|
||||||
|
targetUser = "root";
|
||||||
};
|
};
|
||||||
|
|
||||||
# riscv64 related
|
# riscv64 related
|
||||||
@@ -38,7 +39,7 @@ with allSystemAttrs; let
|
|||||||
inherit home-manager;
|
inherit home-manager;
|
||||||
inherit (nixos-rk3588.inputs) nixpkgs; # or nixpkgs-unstable
|
inherit (nixos-rk3588.inputs) nixpkgs; # or nixpkgs-unstable
|
||||||
specialArgs = rk3588_specialArgs;
|
specialArgs = rk3588_specialArgs;
|
||||||
targetUser = "ryan";
|
targetUser = "root";
|
||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
# colmena - remote deployment via SSH
|
# colmena - remote deployment via SSH
|
||||||
|
|||||||
Reference in New Issue
Block a user