diff options
author | makefu <github@syntax-fehler.de> | 2018-01-06 21:27:05 +0100 |
---|---|---|
committer | makefu <github@syntax-fehler.de> | 2018-01-06 21:27:05 +0100 |
commit | 3aaab59b7f2eaa635106826bd4a4229a0a7a794c (patch) | |
tree | 5588d5b2fb3e416bba13473c5fbcfcccf3c7930d /lass/2configs/rebuild-on-boot.nix | |
parent | 149aad4cb79de44e095b82ffdf7fa65cc95c2f93 (diff) | |
parent | acecab429219d9086e23fa8912ecb05c017211d1 (diff) |
Merge remote-tracking branch 'lass/master'
Diffstat (limited to 'lass/2configs/rebuild-on-boot.nix')
-rw-r--r-- | lass/2configs/rebuild-on-boot.nix | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/lass/2configs/rebuild-on-boot.nix b/lass/2configs/rebuild-on-boot.nix new file mode 100644 index 000000000..60198be7b --- /dev/null +++ b/lass/2configs/rebuild-on-boot.nix @@ -0,0 +1,18 @@ +{ config, pkgs, ... }: +with import <stockholm/lib>; +{ + systemd.services.rebuild-on-boot = { + wantedBy = [ "multi-user.target" ]; + environment = { + NIX_REMOTE = "daemon"; + HOME = "/var/empty"; + }; + serviceConfig = { + ExecStart = pkgs.writeScript "rebuild" '' + #!${pkgs.bash}/bin/bash + (/run/current-system/sw/bin/nixos-rebuild -I /var/src switch) & + ''; + ExecStop = "${pkgs.coreutils}/bin/sleep 10"; + }; + }; +} |