Uhhhh, lots of changes I forgot to push earlier
This commit is contained in:
parent
de5e4fe049
commit
5230faf7c4
20 changed files with 1697 additions and 1634 deletions
hosts/nixos/common/optional
|
@ -74,4 +74,9 @@ in
|
|||
};
|
||||
# }}}
|
||||
};
|
||||
|
||||
environment.persistence."/persist/local/cache".directories = [
|
||||
"/var/cache/restic-backups-data"
|
||||
"/var/cache/restic-backups-state"
|
||||
];
|
||||
}
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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)
|
||||
];
|
||||
# }}}
|
||||
};
|
||||
# }}}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue