From 9dae5ede605c65e5cc5e886eaeb606acc726a606 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Sun, 21 Sep 2025 17:07:40 +0100 Subject: [PATCH] Fix zet script Signed-off-by: Oliver Davies --- modules/scripts/zet.nix | 37 +++++++++++++++++++++++++++++++++++++ modules/zet/default.nix | 26 -------------------------- 2 files changed, 37 insertions(+), 26 deletions(-) create mode 100644 modules/scripts/zet.nix delete mode 100644 modules/zet/default.nix diff --git a/modules/scripts/zet.nix b/modules/scripts/zet.nix new file mode 100644 index 00000000..4630d2fb --- /dev/null +++ b/modules/scripts/zet.nix @@ -0,0 +1,37 @@ +{ inputs, withSystem, ... }: + +let + name = "zet"; +in +{ + perSystem = + { pkgs, ... }: + { + packages.${name} = pkgs.writeShellApplication { + inherit name; + + bashOptions = [ "pipefail" ]; + + runtimeInputs = with pkgs; [ + bashInteractive + coreutils + fzf + git + ]; + + text = builtins.readFile "${inputs.zet}/${name}"; + }; + }; + + flake.modules.homeManager.base = + { config, pkgs, ... }: + { + home.packages = [ + (withSystem pkgs.system (psArgs: psArgs.config.packages.${name})) + ]; + + home.sessionVariables = { + ZET_DIR = "${config.xdg.userDirs.documents}/zet"; + }; + }; +} diff --git a/modules/zet/default.nix b/modules/zet/default.nix deleted file mode 100644 index 32b0e75e..00000000 --- a/modules/zet/default.nix +++ /dev/null @@ -1,26 +0,0 @@ -{ inputs, ... }: - -{ - flake.modules.homeManager.base = - { pkgs, ... }: - { - home.packages = - let - name = "zet"; - in - [ - (pkgs.writeShellApplication { - inherit name; - - runtimeInputs = with pkgs; [ - bashInteractive - coreutils - fzf - git - ]; - - text = builtins.readFile "${inputs.zet}/${name}"; - }) - ]; - }; -}