From 8b990276c5e9abccd772694b1f7232d8b49b634c Mon Sep 17 00:00:00 2001 From: Collin Williams <96917990+bluedragon1221@users.noreply.github.com> Date: Wed, 15 Jul 2026 06:54:33 -0500 Subject: initial commit --- modules/hjem.nix | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 modules/hjem.nix (limited to 'modules/hjem.nix') diff --git a/modules/hjem.nix b/modules/hjem.nix new file mode 100644 index 0000000..019eada --- /dev/null +++ b/modules/hjem.nix @@ -0,0 +1,58 @@ +{std, ...}: { + pkgs, + lib, + config, + ... +}: let + cfg = config.tsunami; +in { + imports = lib.filesystem.listFilesRecursive ./common; + + _module.args = { + inherit std; + tsunamiLib = { + scriptPath = f: "~/.config/tmux/scripts/${f}.sh"; + filePath = f: "~/.config/tmux/files/${f}"; + }; + }; + + files = lib.mkIf cfg.enable (lib.mkMerge [ + ( + cfg.scripts + |> builtins.mapAttrs (name: value: { + name = ".config/tmux/scripts/${name}.sh"; + value = { + text = value; + executable = true; + }; + }) + |> lib.attrValues + |> builtins.listToAttrs + ) + ( + cfg.files + |> builtins.mapAttrs (name: value: { + name = ".config/tmux/files/${name}"; + value.text = value; + }) + |> lib.attrValues + |> builtins.listToAttrs + ) + ( + cfg.confs + |> builtins.mapAttrs (name: value: { + name = ".config/tmux/conf.d/${name}.conf"; + value.text = value; + }) + |> lib.attrValues + |> builtins.listToAttrs + ) + { + ".config/tmux/tmux.conf".text = '' + run-shell "find ~/.config/tmux/conf.d -print0 | xargs -0 -n1 tmux source-file" + ''; + } + ]); + + packages = lib.optional cfg.enable pkgs.tmux; +} -- cgit v1.3.1