From 598350bd830f9832973aa288467dd5a18696a9c5 Mon Sep 17 00:00:00 2001 From: jopejoe1 Date: Sat, 30 Sep 2023 10:57:13 +0200 Subject: [PATCH] Only apply patches to nix conf if they are needed --- modules/auto-update/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/auto-update/default.nix b/modules/auto-update/default.nix index 3549bbf..dafec0c 100644 --- a/modules/auto-update/default.nix +++ b/modules/auto-update/default.nix @@ -1,10 +1,10 @@ -{ pkgs, ... }: +{ pkgs, config, ... }: { system.autoUpgrade = { enable = true; randomizedDelaySec = "30min"; - flake = "$(${pkgs.coreutils}/bin/rm -rf /var/lib/update-repo && ${pkgs.git}/bin/git clone git@codeberg.org:jopejoe1/nix-conf.git /var/lib/update-repo -q && ${pkgs.git}/bin/git -C /var/lib/update-repo am /home/jopejoe1/.config/patches/0001-add-liscense.patch -q)/var/lib/update-repo"; + flake = if config.services.archisteamfarm.enable then "$(${pkgs.coreutils}/bin/rm -rf /var/lib/update-repo && ${pkgs.git}/bin/git clone git@codeberg.org:jopejoe1/nix-conf.git /var/lib/update-repo -q && ${pkgs.git}/bin/git -C /var/lib/update-repo am /home/jopejoe1/.config/patches/0001-add-liscense.patch -q)/var/lib/update-repo" else "github:jopejoe1/nix-conf"; dates = "hourly"; }; }