diff options
author | tv <tv@krebsco.de> | 2023-10-10 22:30:48 +0200 |
---|---|---|
committer | tv <tv@krebsco.de> | 2023-10-10 22:30:48 +0200 |
commit | 90eb0891c25177b427da5224138f26f6549bdc75 (patch) | |
tree | 41e05bbb9420d0b9f3b42a7218da302a5058455c /krebs | |
parent | edc9552c6a2f75912cfbc15386d1835a1fbc9dc6 (diff) | |
parent | 4f4b7a63da0758d80b74e26dd9d65cd69d200bb2 (diff) |
Merge remote-tracking branch 'orange/master'
Diffstat (limited to 'krebs')
-rw-r--r-- | krebs/2configs/default.nix | 2 | ||||
-rw-r--r-- | krebs/2configs/tor/initrd.nix | 2 | ||||
-rw-r--r-- | krebs/3modules/sync-containers3.nix | 20 |
3 files changed, 12 insertions, 12 deletions
diff --git a/krebs/2configs/default.nix b/krebs/2configs/default.nix index bd4f36cbe..905eaaef7 100644 --- a/krebs/2configs/default.nix +++ b/krebs/2configs/default.nix @@ -48,9 +48,7 @@ with import ../../lib/pure.nix { inherit lib; }; users.mutableUsers = false; users.extraUsers.root.openssh.authorizedKeys.keys = [ - config.krebs.users.jeschli-brauerei.pubkey config.krebs.users.lass.pubkey - config.krebs.users.lass-mors.pubkey config.krebs.users.makefu.pubkey config.krebs.users.tv.pubkey config.krebs.users.kmein.pubkey diff --git a/krebs/2configs/tor/initrd.nix b/krebs/2configs/tor/initrd.nix index 21c46a0a7..768439734 100644 --- a/krebs/2configs/tor/initrd.nix +++ b/krebs/2configs/tor/initrd.nix @@ -7,9 +7,7 @@ enable = true; port = 22; authorizedKeys = [ - config.krebs.users.jeschli-brauerei.pubkey config.krebs.users.lass.pubkey - config.krebs.users.lass-mors.pubkey config.krebs.users.makefu.pubkey config.krebs.users.tv.pubkey ]; diff --git a/krebs/3modules/sync-containers3.nix b/krebs/3modules/sync-containers3.nix index c88dd5919..6d3a71324 100644 --- a/krebs/3modules/sync-containers3.nix +++ b/krebs/3modules/sync-containers3.nix @@ -32,6 +32,17 @@ in { type = lib.types.bool; default = true; }; + startCommand = lib.mkOption { + type = lib.types.str; + default = '' + set -efu + mkdir -p /var/state/var_src + ln -Tfrs /var/state/var_src /var/src + if test -e /var/src/nixos-config; then + /run/current-system/sw/bin/nixos-rebuild -I /var/src switch || : + fi + ''; + }; }; })); }; @@ -52,14 +63,7 @@ in { NIX_REMOTE = "daemon"; }; wantedBy = [ "multi-user.target" ]; - serviceConfig.ExecStart = pkgs.writers.writeDash "autoswitch" '' - set -efu - mkdir -p /var/state/var_src - ln -Tfrs /var/state/var_src /var/src - if test -e /var/src/nixos-config; then - /run/current-system/sw/bin/nixos-rebuild -I /var/src switch || : - fi - ''; + serviceConfig.ExecStart = pkgs.writers.writeDash "autoswitch" ctr.startCommand; unitConfig.X-StopOnRemoval = false; }; }; |