From 15463b253aed5ad82a5fc519ec5b0aed399f2b65 Mon Sep 17 00:00:00 2001 From: Infinidoge Date: Sun, 22 May 2022 16:57:46 -0400 Subject: [PATCH] fix(general): update nix channels on boot with service --- modules/global/general.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/global/general.nix b/modules/global/general.nix index be1c83c..67c84ff 100644 --- a/modules/global/general.nix +++ b/modules/global/general.nix @@ -21,4 +21,10 @@ # FIX: command-not-found database doesn't exist normally channels-update.text = "${pkgs.nix}/bin/nix-channel --update"; }; + systemd.services.update-root-nix-channels = { + description = "Runs nix-channel --update on startup"; + wantedBy = [ "multi-user.target" ]; + serviceConfig.Type = "oneshot"; + script = "${pkgs.nix}/bin/nix-channel --update"; + }; }