diff options
author | lassulus <lassulus@lassul.us> | 2018-01-05 20:59:29 +0100 |
---|---|---|
committer | lassulus <lassulus@lassul.us> | 2018-01-05 20:59:29 +0100 |
commit | 21bd13b2de964b178e5d42b69efc337e09698dd2 (patch) | |
tree | 7cc127e5b22774ab28697cac160450dbc92099f3 /lass/2configs | |
parent | e083b18e34519f30bba79dfd894c3b828fd13da7 (diff) |
l: container hackery
Diffstat (limited to 'lass/2configs')
-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"; + }; + }; +} |