From 8fd6c8df14de9535b9ab2792296406cabe168e9c Mon Sep 17 00:00:00 2001 From: Doloro1978 Date: Fri, 17 Oct 2025 13:21:18 +0100 Subject: [PATCH] chore(direnv@modules): moved to modules --- nix/hosts/doloro-wsl/home.nix | 7 +------ nix/hosts/doloro/home.nix | 4 +++- nix/modules/direnv/default.nix | 3 +++ nix/modules/direnv/home.nix | 22 ++++++++++++++++++++++ 4 files changed, 29 insertions(+), 7 deletions(-) create mode 100644 nix/modules/direnv/default.nix create mode 100644 nix/modules/direnv/home.nix diff --git a/nix/hosts/doloro-wsl/home.nix b/nix/hosts/doloro-wsl/home.nix index ea9d510..825bce9 100644 --- a/nix/hosts/doloro-wsl/home.nix +++ b/nix/hosts/doloro-wsl/home.nix @@ -28,6 +28,7 @@ tmux.enable = true; fish.enable = true; stylix.enable = true; + direnv.enable = true; }; # Home Manager needs a bit of information about you and the paths it should # manage. @@ -102,11 +103,5 @@ # Let Home Manager install and manage itself. programs = { home-manager.enable = true; - direnv = { - enable = true; - # enableBashIntegration = true; # see note on other shells below - enableFishIntegration = true; - nix-direnv.enable = true; - }; }; } diff --git a/nix/hosts/doloro/home.nix b/nix/hosts/doloro/home.nix index 9b2b7b7..377082c 100644 --- a/nix/hosts/doloro/home.nix +++ b/nix/hosts/doloro/home.nix @@ -34,6 +34,8 @@ blender.enable = true; fish.enable = true; youtube-music.enable = true; + unityhub.enable = true; + direnv.enable = true; }; # Home Manager needs a bit of information about you and the paths it should # manage. @@ -45,6 +47,7 @@ userName = "Doloro1978"; userEmail = "doloroo@proton.me"; }; + xdg.mimeApps.enable = true; # This value determines the Home Manager release that your configuration is # compatible with. This helps avoid breakage when a new Home Manager release @@ -68,7 +71,6 @@ btop sops alcom - unityhub ]; # sops.age.keyFile = "/home/doloro/.config/sops/age/key.txt"; diff --git a/nix/modules/direnv/default.nix b/nix/modules/direnv/default.nix new file mode 100644 index 0000000..3f46f00 --- /dev/null +++ b/nix/modules/direnv/default.nix @@ -0,0 +1,3 @@ +_: { + home = ./home.nix; +} diff --git a/nix/modules/direnv/home.nix b/nix/modules/direnv/home.nix new file mode 100644 index 0000000..5c0060c --- /dev/null +++ b/nix/modules/direnv/home.nix @@ -0,0 +1,22 @@ +{ + pkgs, + lib, + config, + ... +}: +let + cfg = config.modules.direnv; +in +{ + options.modules.direnv = { + enable = lib.mkEnableOption "direnv"; + }; + config = lib.mkIf cfg.enable { + programs.direnv = { + enable = true; + # enableBashIntegration = true; # see note on other shells below + enableFishIntegration = true; + nix-direnv.enable = true; + }; + }; +}