From b13a7a31aedae645baa653047022f9899879e6e7 Mon Sep 17 00:00:00 2001 From: "quentin@aristote.fr" Date: Thu, 29 Aug 2024 23:16:11 +0200 Subject: nixos: nix: fix git and auto update --- nixos/nix.nix | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) (limited to 'nixos/nix.nix') diff --git a/nixos/nix.nix b/nixos/nix.nix index df864fd..5587491 100644 --- a/nixos/nix.nix +++ b/nixos/nix.nix @@ -1,16 +1,26 @@ -{pkgs, ...}: { +{...}: { personal.nix = { enable = true; - autoUpgrade = true; + autoUpgrade = { + enable = true; + autoUpdateInputs = [ + "precision-3571/home-manager" + "precision-3571/my-nixpkgs" + "precision-3571/nixos-hardware" + "precision-3571/nixpkgs" + "precision-3571/stylix" + ]; + }; flake = "git+file:///etc/nixos"; gc.enable = true; }; - system.autoUpgrade.flags = pkgs.personal.lib.updateInputFlags [ - "precision-3571/home-manager" - "precision-3571/my-nixpkgs" - "precision-3571/nixos-hardware" - "precision-3571/nixpkgs" - "precision-3571/stylix" - ]; + systemd.services.flake-update = { + preStart = '' + pushd /home/qaristote/code/nix/machines/precision-3571 + git status + popd + ''; + environment.HOME = "/root"; + }; } -- cgit v1.2.3