Compare commits
No commits in common. "1fe332c30221702127a784afe4f89d8a34c18f49" and "b63959f307ce6d568ed988901921bd99f726dde6" have entirely different histories.
1fe332c302
...
b63959f307
3 changed files with 11 additions and 30 deletions
|
@ -48,16 +48,4 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
flake.modules.homeManager.default =
|
|
||||||
{ config, ... }:
|
|
||||||
{
|
|
||||||
imports = [ inputs.impermanence.homeManagerModules.impermanence ];
|
|
||||||
options.persistDirs = mkOpts "directory" { };
|
|
||||||
options.persistFiles = mkOpts "file" { };
|
|
||||||
config.home.persistence."/persist${config.home.homeDirectory}" = {
|
|
||||||
allowOther = true;
|
|
||||||
directories = config.persistDirs;
|
|
||||||
files = config.persistFiles;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,20 +1,10 @@
|
||||||
{ config, lib, ... }:
|
|
||||||
let
|
|
||||||
cfg = config.flake;
|
|
||||||
inherit (lib.modules) mkMerge;
|
|
||||||
inherit (cfg.lib.modules) forAllUsers';
|
|
||||||
in
|
|
||||||
{
|
|
||||||
flake.modules.nixos.default = mkMerge [
|
|
||||||
{
|
{
|
||||||
|
flake.modules.nixos.default = {
|
||||||
persistFiles = [
|
persistFiles = [
|
||||||
"/etc/ssh/ssh_host_ed25519_key"
|
"/etc/ssh/ssh_host_ed25519_key"
|
||||||
"/etc/ssh/ssh_host_ed25519_key.pub"
|
"/etc/ssh/ssh_host_ed25519_key.pub"
|
||||||
"/etc/ssh/ssh_host_rsa_key"
|
"/etc/ssh/ssh_host_rsa_key"
|
||||||
"/etc/ssh/ssh_host_rsa_key.pub"
|
"/etc/ssh/ssh_host_rsa_key.pub"
|
||||||
];
|
];
|
||||||
users.users = forAllUsers' (_: value: { openssh.authorizedKeys.keys = [ value.pubkey ]; });
|
};
|
||||||
}
|
|
||||||
{ users.users.root.openssh.authorizedKeys.keys = [ cfg.admin.pubkey ]; }
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,6 +11,8 @@ in
|
||||||
#TODO: move sudo/security options elsewhere
|
#TODO: move sudo/security options elsewhere
|
||||||
# security.sudo.wheelNeedsPassword = false;
|
# security.sudo.wheelNeedsPassword = false;
|
||||||
# nix.settings.trusted-users = [ "@wheel" ];
|
# nix.settings.trusted-users = [ "@wheel" ];
|
||||||
|
#TODO: move ssh key settings elsewhere
|
||||||
|
# users.users.root.openssh.authorizedKeys.keys = [ owner.pubkey ];
|
||||||
# persist uids and gids
|
# persist uids and gids
|
||||||
persistDirs = [ "/var/lib/nixos" ];
|
persistDirs = [ "/var/lib/nixos" ];
|
||||||
users = {
|
users = {
|
||||||
|
@ -21,6 +23,7 @@ in
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
hashedPasswordFile = config.sops.secrets."${name}/hashedPassword".path;
|
hashedPasswordFile = config.sops.secrets."${name}/hashedPassword".path;
|
||||||
extraGroups = optional (value.primary or false) "wheel";
|
extraGroups = optional (value.primary or false) "wheel";
|
||||||
|
openssh.authorizedKeys.keys = [ value.pubkey ];
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue