1
Fork 0

Uhhhh, lots of changes I forgot to push earlier

This commit is contained in:
prescientmoon 2024-09-24 05:41:40 +02:00
parent de5e4fe049
commit 5230faf7c4
Signed by: prescientmoon
SSH key fingerprint: SHA256:WFp/cO76nbarETAoQcQXuV+0h7XJsEsOCI0UsyPIy6U
20 changed files with 1697 additions and 1634 deletions
hosts/nixos/common/optional

View file

@ -74,4 +74,9 @@ in
};
# }}}
};
environment.persistence."/persist/local/cache".directories = [
"/var/cache/restic-backups-data"
"/var/cache/restic-backups-state"
];
}

View file

@ -18,7 +18,7 @@ in
overrideFolders = true;
settings = {
# {{{ Device ids
# {{{ Device ids
devices = {
enceladus.id = "QWOAERM-V2FNXPI-TB7NFUS-LKW7JTB-IZY4OEZ-FYDPJNP-6IKPW4Y-YREXDQM";
lapetus.id = "VVHM7RC-ZSDOZJI-EGBIJR4-2DOGAXG-OEJZWSH-OYUK5XT-7CDMWSL-3AVM2AZ";

View file

@ -21,6 +21,9 @@
# Configure users through nix only
mutableUsers = false;
# Sync up root and `pilot` shell
users.root.shell = config.users.users.pilot.shell;
# {{{ Create pilot user
users.pilot = {
inherit (config.satellite.pilot) name;
@ -46,27 +49,6 @@
hashedPasswordFile = config.sops.secrets.pilot_password.path;
shell = pkgs.fish;
# {{{ Authorize ssh keys
openssh.authorizedKeys.keyFiles =
let
# Record containing all the hosts
hosts = outputs.nixosConfigurations;
# Function from hostname to relative path to public ssh key
idKey = host: ../../${host}/keys/id_ed25519.pub;
in
lib.pipe hosts [
# attrsetof host -> attrsetof path
(builtins.mapAttrs (name: _: idKey name)) # string -> host -> path
# attrsetof path -> path[]
builtins.attrValues
# path[] -> path[]
(builtins.filter builtins.pathExists)
];
# }}}
};
# }}}
};