From ea06868e392a09e3a3816363976f722deca09f68 Mon Sep 17 00:00:00 2001 From: matt1432 Date: Sun, 15 Dec 2024 23:10:06 -0500 Subject: [PATCH] feat(base): add nurl --- flake.lock | Bin 56242 -> 56755 bytes flake.nix | Bin 11582 -> 11719 bytes inputs/default.nix | 5 +++++ nixosModules/base/packages/default.nix | 16 ++++++++++++++-- 4 files changed, 19 insertions(+), 2 deletions(-) diff --git a/flake.lock b/flake.lock index e72c998dcc09f8d84864787f0014ea731777b8fa..187225a85ce8753782ea3684ee137a5a47912ccc 100644 GIT binary patch delta 162 zcmdnAoq6+a<_$(OnM;duCSROW&u(O9YG7(=IeDY6oOZaQTVZZaad1XyU|xE*nUAkq zPI{HOe`T_XVTfa3YDl8KiDf}XMo?x|4g1N~QgUGSMH#itu?i1)0Mz0PSO5S3 delta 12 TcmX>ey)SA*titAJ3J-YzDendj 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