{ 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 ]; # }; # }; 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"; }; }