diff options
author | Kjetil Orbekk <kj@orbekk.com> | 2021-02-20 20:40:06 -0500 |
---|---|---|
committer | Kjetil Orbekk <kj@orbekk.com> | 2021-02-20 20:40:06 -0500 |
commit | da90af5fa0bc6078b98aa60e23cb44ff9c6f4272 (patch) | |
tree | 4945eb2ccaf60f21179e622489e45fc15b83a66d /config | |
parent | 233cc970b3f9104ddaea4a3e1046df7038fba5ff (diff) |
Upgrade from flake
Diffstat (limited to 'config')
-rw-r--r-- | config/auto-upgrade.nix | 43 |
1 files changed, 24 insertions, 19 deletions
diff --git a/config/auto-upgrade.nix b/config/auto-upgrade.nix index d7c145d..d7a9a9d 100644 --- a/config/auto-upgrade.nix +++ b/config/auto-upgrade.nix @@ -1,27 +1,32 @@ { config, lib, pkgs, ... }: { - systemd.services = { - nixos-config-pull = { - description = "Pull nixos config from git."; - path = [ pkgs.git ]; - wantedBy = [ "nixos-upgrade.service" ]; - before = [ "nixos-upgrade.service" ]; - serviceConfig = { - Type = "oneshot"; - User = "orbekk"; - }; - script = '' - cd /opt/site/nixos-config - git pull https://git.orbekk.com/nixos-config.git - ''; - }; - nixos-upgrade = { - path = [ pkgs.bzip2.bin ]; - }; - }; + # systemd.services = { + # nixos-config-pull = { + # description = "Pull nixos config from git."; + # path = [ pkgs.git ]; + # wantedBy = [ "nixos-upgrade.service" ]; + # before = [ "nixos-upgrade.service" ]; + # serviceConfig = { + # Type = "oneshot"; + # User = "orbekk"; + # }; + # script = '' + # cd /opt/site/nixos-config + # git pull https://git.orbekk.com/nixos-config.git + # ''; + # }; + # nixos-upgrade = { + # path = [ pkgs.bzip2.bin ]; + # }; + # }; system.autoUpgrade = { enable = true; dates = "weekly"; + flake = + if config.networking.hostName == "dragon" then + "git+file:///storage/projects/nixos-config.git" + else + "git+https://git.orbekk.com/nixos-config.git"; }; } |