forked from Fachschaft/nixConfig
Compare commits
2 commits
72610eb2bf
...
f0bd165b0c
Author | SHA1 | Date | |
---|---|---|---|
f0bd165b0c | |||
7c1baf8d1d |
2 changed files with 9 additions and 8 deletions
|
@ -1,4 +1,4 @@
|
||||||
{
|
{config, ...}: {
|
||||||
imports = [
|
imports = [
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
../../roles
|
../../roles
|
||||||
|
@ -12,4 +12,11 @@
|
||||||
# System configuration here
|
# System configuration here
|
||||||
networking.hostName = "bragi";
|
networking.hostName = "bragi";
|
||||||
system.stateVersion = "23.11";
|
system.stateVersion = "23.11";
|
||||||
|
|
||||||
|
sops.secrets.backupKey = {
|
||||||
|
sopsFile = ./backupKey.yaml;
|
||||||
|
owner = config.users.users.fsaccount.name;
|
||||||
|
inherit (config.users.users.fsaccount) group;
|
||||||
|
mode = "0400";
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -121,7 +121,7 @@ in {
|
||||||
jobs.fsaccount = {
|
jobs.fsaccount = {
|
||||||
preHook = ''
|
preHook = ''
|
||||||
mkdir -p /home/fsaccount/sicherung # Create if it does not exist
|
mkdir -p /home/fsaccount/sicherung # Create if it does not exist
|
||||||
${pkgs.rsync}/bin/rsync -e 'ssh -i /run/secrets/backupKey' -r fachschaft@gw1.mathematik.tu-darmstadt.de:/home/fachschaft/* /home/fsaccount/sicherung
|
${pkgs.rsync}/bin/rsync --rsh='ssh -i /run/secrets/backupKey' --recursive --delete fachschaft@gw1.mathematik.tu-darmstadt.de:/home/fachschaft/* /home/fsaccount/sicherung
|
||||||
'';
|
'';
|
||||||
paths = "/home/fsaccount/sicherung";
|
paths = "/home/fsaccount/sicherung";
|
||||||
encryption.mode = "none"; # Otherwise the key is next to the backup or we have human interaction.
|
encryption.mode = "none"; # Otherwise the key is next to the backup or we have human interaction.
|
||||||
|
@ -161,11 +161,5 @@ in {
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
sops.secrets.backupKey = {
|
|
||||||
sopsFile = ../machines/bragi/backupKey.yaml;
|
|
||||||
owner = config.users.users.fsaccount.name;
|
|
||||||
inherit (config.users.users.fsaccount) group;
|
|
||||||
mode = "0400";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue