diff --git a/flake.lock b/flake.lock index e72c998d..187225a8 100644 Binary files a/flake.lock and b/flake.lock differ diff --git a/flake.nix b/flake.nix index 3bc8e042..8f714276 100644 Binary files a/flake.nix and b/flake.nix differ diff --git a/inputs/default.nix b/inputs/default.nix index 20e25164..ed96cc20 100644 --- a/inputs/default.nix +++ b/inputs/default.nix @@ -24,6 +24,11 @@ let repo = "nh"; }; + nurl = mkDep { + owner = "nix-community"; + repo = "nurl"; + }; + # These are here to make sure all 'systems' are the same flake-utils = mkInput { owner = "numtide"; diff --git a/nixosModules/base/packages/default.nix b/nixosModules/base/packages/default.nix index 5441586a..3b7462be 100644 --- a/nixosModules/base/packages/default.nix +++ b/nixosModules/base/packages/default.nix @@ -4,7 +4,7 @@ self: { pkgs, ... }: let - inherit (lib) attrValues mkIf; + inherit (lib) attrValues makeBinPath mkIf optional; cfg = config.roles.base; in { @@ -30,7 +30,19 @@ in { ]; environment.systemPackages = - (attrValues { + (optional (cfg.user != "nixos") (self.inputs.nurl.packages.${pkgs.system}.default.overrideAttrs { + postInstall = '' + wrapProgram $out/bin/nurl \ + --prefix PATH : ${makeBinPath [ + (config.home-manager.users.${cfg.user}.programs.git.package or pkgs.gitMinimal) + (config.nix.package or pkgs.nix) + pkgs.mercurial + ]} + installManPage artifacts/nurl.1 + installShellCompletion artifacts/nurl.{bash,fish} --zsh artifacts/_nurl + ''; + })) + ++ (attrValues { inherit (self.packages.${pkgs.system}) pokemon-colorscripts