rework secrets

This commit is contained in:
uku 2024-01-18 16:11:18 +01:00
parent e22617306e
commit 0cac64029a
Signed by: uku
GPG key ID: 7D01D7B105E77166
9 changed files with 65 additions and 63 deletions

View file

@ -10,6 +10,8 @@
identityPaths = ["/etc/ssh/ssh_host_ed25519_key"];
secrets = {
rootPassword.file = ../secrets/${config.networking.hostName}/rootPassword.age;
userPassword.file = ../secrets/userPassword.age;
tailscaleKey.file = ../secrets/tailscaleKey.age;
};
};
@ -104,6 +106,8 @@
time.timeZone = "Europe/Paris";
users.users.root.hashedPasswordFile = config.age.secrets.rootPassword.path;
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave

View file

@ -12,13 +12,6 @@ in {
(lib.mkAliasOptionModule ["hm"] ["home-manager" "users" username])
];
age.secrets = let
base = ../secrets/desktop;
in {
rootPassword.file = "${base}/rootPassword.age";
userPassword.file = "${base}/userPassword.age";
};
boot = {
extraModulePackages = with config.boot.kernelPackages; [v4l2loopback];
kernelModules = ["v4l2loopback"];
@ -174,15 +167,11 @@ in {
sound.enable = true;
users.users = {
"${username}" = {
isNormalUser = true;
shell = pkgs.fish;
extraGroups = ["networkmanager" "wheel" "video" "libvirtd"];
hashedPasswordFile = config.age.secrets.userPassword.path;
};
root.hashedPasswordFile = config.age.secrets.rootPassword.path;
users.users."${username}" = {
isNormalUser = true;
shell = pkgs.fish;
extraGroups = ["networkmanager" "wheel" "video" "libvirtd"];
hashedPasswordFile = config.age.secrets.userPassword.path;
};
virtualisation.libvirtd.enable = true;