forked from Bos55/nix-config
This commit is contained in:
parent
5a031b48ed
commit
711dc677ec
29 changed files with 575 additions and 97 deletions
|
|
@ -3,7 +3,19 @@
|
|||
let
|
||||
cfg = config.homelab.users.deploy;
|
||||
in {
|
||||
options.homelab.users.deploy.enable = lib.mkEnableOption "user Deploy";
|
||||
options.homelab.users.deploy = {
|
||||
enable = lib.mkEnableOption "user Deploy";
|
||||
|
||||
authorizedKeys = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.str;
|
||||
default = [];
|
||||
description = ''
|
||||
Additional SSH public keys authorized for the deploy user.
|
||||
The CI runner key should be provided as a base key; personal
|
||||
workstation keys can be appended here per host or globally.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
users = {
|
||||
|
|
@ -15,12 +27,15 @@ in {
|
|||
isSystemUser = true;
|
||||
home = "/var/empty";
|
||||
shell = pkgs.bashInteractive;
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPrG+ldRBdCeHEXrsy/qHXIJYg8xQXVuiUR0DxhFjYNg"
|
||||
openssh.authorizedKeys.keyFiles = [
|
||||
config.sops.secrets.user_keys_deploy.path
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
# Allow the deploy user to push closures to the nix store
|
||||
nix.settings.trusted-users = [ "deploy" ];
|
||||
|
||||
security.sudo.extraRules = [
|
||||
{
|
||||
groups = [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue