From 2359a79c1459eba7b5d92a9a80b411ef9491fb94 Mon Sep 17 00:00:00 2001 From: Doloro1978 Date: Tue, 9 Jun 2026 22:27:33 +0100 Subject: [PATCH] meow --- config/modules/dunst.nix | 3 +- config/modules/fish.nix | 34 +++- flake.lock | 423 ++++++++++++++++++++++++--------------- flake.nix | 6 +- 4 files changed, 290 insertions(+), 176 deletions(-) diff --git a/config/modules/dunst.nix b/config/modules/dunst.nix index 0afb9a7..ec76ee5 100644 --- a/config/modules/dunst.nix +++ b/config/modules/dunst.nix @@ -1,5 +1,4 @@ -{ modules, ... }: -{ +{modules, ...}: { modules.dunst = { homeManager = { services.dunst = { diff --git a/config/modules/fish.nix b/config/modules/fish.nix index b520dfb..748d936 100644 --- a/config/modules/fish.nix +++ b/config/modules/fish.nix @@ -1,5 +1,12 @@ -{ modules, ... }: { + modules, + inputs, + ... +}: +{ + flake-file.inputs = { + direnv-instant.url = "github:Mic92/direnv-instant"; + }; modules.fish = { nixos = { programs.fish.enable = true; @@ -7,8 +14,13 @@ homeManager = { pkgs, ... }: { + imports = [ inputs.direnv-instant.homeModules.direnv-instant ]; + programs.direnv-instant.enable = true; home.shell.enableFishIntegration = true; - home.packages = [ pkgs.nix-output-monitor ]; + home.packages = [ + pkgs.nix-output-monitor + # pkgs.devenv + ]; programs = { fish = { enable = true; @@ -18,12 +30,24 @@ set -g theme_display_user yes set -g fish_color_autosuggestion 6F6578 alias nik 'nix' + if not set -q TMUX set -gx COLORTERM truecolor end ''; - # alias nos 'sudo echo; sudo nixos-rebuild switch --flake .#${aspect-name} --log-format internal-json -v &| nom --json' - # alias hms 'home-manager switch --flake .#${aspect-name} --log-format internal-json -v &| nom --json' + interactiveShellInit = '' + # direnv-instant registers its hook on both fish_prompt and PWD, + # causing double execution on every cd. Re-register on PWD only. + functions --erase _direnv_hook + function _direnv_hook --on-variable PWD + set -gx DIRENV_INSTANT_SHELL fish + set -gx DIRENV_INSTANT_SHELL_PID $fish_pid + if test "$DIRENV_INSTANT_USE_CACHE" != 0 -a -n "$__DIRENV_INSTANT_ENV_FILE" -a -f "$__DIRENV_INSTANT_ENV_FILE" + source "$__DIRENV_INSTANT_ENV_FILE" + end + direnv-instant start | source + end + ''; plugins = [ { name = "bobthefish"; @@ -45,7 +69,7 @@ }; direnv = { enable = true; - nix-direnv.enable = true; + enableFishIntegration = false; }; }; }; diff --git a/flake.lock b/flake.lock index c75a00a..0cf4f3b 100644 --- a/flake.lock +++ b/flake.lock @@ -165,9 +165,29 @@ "type": "github" } }, + "direnv-instant": { + "inputs": { + "flake-parts": "flake-parts", + "nixpkgs": "nixpkgs", + "treefmt-nix": "treefmt-nix" + }, + "locked": { + "lastModified": 1780557299, + "narHash": "sha256-FF1zYCdsh9q1QS8kFMYYGiaDUzxdBBfdtQT+x/15CpA=", + "owner": "Mic92", + "repo": "direnv-instant", + "rev": "0df681e3c0d544d7dc723cc9750a50cfc37b0095", + "type": "github" + }, + "original": { + "owner": "Mic92", + "repo": "direnv-instant", + "type": "github" + } + }, "disko": { "inputs": { - "nixpkgs": "nixpkgs" + "nixpkgs": "nixpkgs_2" }, "locked": { "lastModified": 1780290312, @@ -280,6 +300,7 @@ "flake-parts": { "inputs": { "nixpkgs-lib": [ + "direnv-instant", "nixpkgs" ] }, @@ -299,7 +320,9 @@ }, "flake-parts_2": { "inputs": { - "nixpkgs-lib": "nixpkgs-lib" + "nixpkgs-lib": [ + "nixpkgs" + ] }, "locked": { "lastModified": 1778716662, @@ -316,6 +339,24 @@ } }, "flake-parts_3": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib" + }, + "locked": { + "lastModified": 1778716662, + "narHash": "sha256-m1Yf0wZ8j1OHjTc2UwHwyQRSnNeSgLJOd7q5Y45hzi4=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "f7c1a2d347e4c52d5fb8d10cb4d94b5884e546fb", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-parts_4": { "inputs": { "nixpkgs-lib": [ "nixvim", @@ -336,7 +377,7 @@ "type": "github" } }, - "flake-parts_4": { + "flake-parts_5": { "inputs": { "nixpkgs-lib": [ "stylix", @@ -377,7 +418,7 @@ }, "font-patcher": { "inputs": { - "nixpkgs": "nixpkgs_2" + "nixpkgs": "nixpkgs_3" }, "locked": { "lastModified": 1765841187, @@ -558,7 +599,7 @@ "hyprutils": "hyprutils", "hyprwayland-scanner": "hyprwayland-scanner", "hyprwire": "hyprwire", - "nixpkgs": "nixpkgs_3", + "nixpkgs": "nixpkgs_4", "pre-commit-hooks": "pre-commit-hooks", "systems": "systems_2", "xdph": "xdph" @@ -860,9 +901,7 @@ "nik-pkgs": { "inputs": { "flake-utils": "flake-utils", - "nixpkgs": [ - "nixpkgs" - ] + "nixpkgs": "nixpkgs_5" }, "locked": { "lastModified": 1780649164, @@ -941,8 +980,8 @@ "cachyos-kernel": "cachyos-kernel", "cachyos-kernel-patches": "cachyos-kernel-patches", "flake-compat": "flake-compat_2", - "flake-parts": "flake-parts_2", - "nixpkgs": "nixpkgs_4" + "flake-parts": "flake-parts_3", + "nixpkgs": "nixpkgs_6" }, "locked": { "lastModified": 1780771919, @@ -961,7 +1000,7 @@ }, "nixos-hardware": { "inputs": { - "nixpkgs": "nixpkgs_5" + "nixpkgs": "nixpkgs_7" }, "locked": { "lastModified": 1780310866, @@ -1009,7 +1048,7 @@ "argononed": "argononed", "flake-compat": "flake-compat_3", "nixos-images": "nixos-images", - "nixpkgs": "nixpkgs_6" + "nixpkgs": "nixpkgs_8" }, "locked": { "lastModified": 1779023229, @@ -1029,7 +1068,7 @@ "nixos-wsl": { "inputs": { "flake-compat": "flake-compat_4", - "nixpkgs": "nixpkgs_7" + "nixpkgs": "nixpkgs_9" }, "locked": { "lastModified": 1780765279, @@ -1047,16 +1086,16 @@ }, "nixpkgs": { "locked": { - "lastModified": 1780030872, - "narHash": "sha256-u6WU/yd/o8iYQrHX3RAwO1hYa3LkoSL+WNQD0rJfJZQ=", + "lastModified": 1780243769, + "narHash": "sha256-x5UQuRsH3MqI0U9afaXSNqzTPSeZlRLvFAav2Ux1pNw=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "e9a7635a57597d9754eccebdfc7045e6c8600e6b", + "rev": "331800de5053fcebacf6813adb5db9c9dca22a0c", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixpkgs-unstable", + "ref": "nixos-unstable", "repo": "nixpkgs", "type": "github" } @@ -1094,156 +1133,21 @@ }, "nixpkgs_10": { "locked": { - "lastModified": 1774709303, - "narHash": "sha256-D3Q07BbIA2KnTcSXIqqu9P586uWxN74zNoCH3h2ESHg=", - "owner": "nixos", + "lastModified": 1780243769, + "narHash": "sha256-x5UQuRsH3MqI0U9afaXSNqzTPSeZlRLvFAav2Ux1pNw=", + "owner": "NixOS", "repo": "nixpkgs", - "rev": "8110df5ad7abf5d4c0f6fb0f8f978390e77f9685", + "rev": "331800de5053fcebacf6813adb5db9c9dca22a0c", "type": "github" }, "original": { - "owner": "nixos", + "owner": "NixOS", "ref": "nixos-unstable", "repo": "nixpkgs", "type": "github" } }, "nixpkgs_11": { - "locked": { - "lastModified": 1745279238, - "narHash": "sha256-AQ7M9wTa/Pa/kK5pcGTgX/DGqMHyzsyINfN7ktsI7Fo=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "9684b53175fc6c09581e94cc85f05ab77464c7e3", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-24.11", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_12": { - "locked": { - "lastModified": 1779560665, - "narHash": "sha256-NpH8iEQ5JHv/BtUuzTEXUMDxPLetCDzIv4OxL8H7Kps=", - "rev": "64c08a7ca051951c8eae34e3e3cb1e202fe36786", - "type": "tarball", - "url": "https://releases.nixos.org/nixos/unstable/nixos-26.05pre1004030.64c08a7ca051/nixexprs.tar.xz" - }, - "original": { - "type": "tarball", - "url": "https://channels.nixos.org/nixos-unstable/nixexprs.tar.xz" - } - }, - "nixpkgs_2": { - "locked": { - "lastModified": 1704008649, - "narHash": "sha256-rGPSWjXTXTurQN9beuHdyJhB8O761w1Zc5BqSSmHvoM=", - "path": "/nix/store/kh5mw1hsalj27ha1wfvksljxyaikcmyb-source", - "rev": "d44d59d2b5bd694cd9d996fd8c51d03e3e9ba7f7", - "type": "path" - }, - "original": { - "id": "nixpkgs", - "type": "indirect" - } - }, - "nixpkgs_3": { - "locked": { - "lastModified": 1779357205, - "narHash": "sha256-cCO8aTqss5x9Ky8GWkpY0Hy5fyTZEbtifSUV8QjSzic=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "f83fc3c307e74bc5fd5adb7eb6b8b13ffd2a36e1", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_4": { - "locked": { - "lastModified": 1780751787, - "narHash": "sha256-nWR7F46SyrLvN8Ot39XJDpVCswekGakXlOD4KsTYKW0=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "00fa9a692bafc08a86061886f888b843bf7fbdb0", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable-small", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_5": { - "locked": { - "lastModified": 1767892417, - "narHash": "sha256-8bW3q88CEg2u4hSP66Vf4lpbLonHz7hqDNBMcCY7E9U=", - "rev": "3497aa5c9457a9d88d71fa93a4a8368816fbeeba", - "type": "tarball", - "url": "https://releases.nixos.org/nixos/unstable/nixos-26.05pre924538.3497aa5c9457/nixexprs.tar.xz" - }, - "original": { - "type": "tarball", - "url": "https://channels.nixos.org/nixos-unstable/nixexprs.tar.xz" - } - }, - "nixpkgs_6": { - "locked": { - "lastModified": 1778737229, - "narHash": "sha256-6xWoytx8jFW4PF1GjRm/i/53trbpKGfz6zjzQGBr4cI=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "d7a713c0b7e47c908258e71cba7a2d77cc8d71d5", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-25.11", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_7": { - "locked": { - "lastModified": 1780243769, - "narHash": "sha256-x5UQuRsH3MqI0U9afaXSNqzTPSeZlRLvFAav2Ux1pNw=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "331800de5053fcebacf6813adb5db9c9dca22a0c", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_8": { - "locked": { - "lastModified": 1780243769, - "narHash": "sha256-x5UQuRsH3MqI0U9afaXSNqzTPSeZlRLvFAav2Ux1pNw=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "331800de5053fcebacf6813adb5db9c9dca22a0c", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_9": { "locked": { "lastModified": 1780336545, "narHash": "sha256-vhVhuXzFrIOfcssC/9hDHx7MHzDKjF3keHuREOQqQiQ=", @@ -1259,10 +1163,177 @@ "type": "github" } }, + "nixpkgs_12": { + "locked": { + "lastModified": 1774709303, + "narHash": "sha256-D3Q07BbIA2KnTcSXIqqu9P586uWxN74zNoCH3h2ESHg=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "8110df5ad7abf5d4c0f6fb0f8f978390e77f9685", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_13": { + "locked": { + "lastModified": 1745279238, + "narHash": "sha256-AQ7M9wTa/Pa/kK5pcGTgX/DGqMHyzsyINfN7ktsI7Fo=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "9684b53175fc6c09581e94cc85f05ab77464c7e3", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-24.11", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_14": { + "locked": { + "lastModified": 1779560665, + "narHash": "sha256-NpH8iEQ5JHv/BtUuzTEXUMDxPLetCDzIv4OxL8H7Kps=", + "rev": "64c08a7ca051951c8eae34e3e3cb1e202fe36786", + "type": "tarball", + "url": "https://releases.nixos.org/nixos/unstable/nixos-26.05pre1004030.64c08a7ca051/nixexprs.tar.xz" + }, + "original": { + "type": "tarball", + "url": "https://channels.nixos.org/nixos-unstable/nixexprs.tar.xz" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1780030872, + "narHash": "sha256-u6WU/yd/o8iYQrHX3RAwO1hYa3LkoSL+WNQD0rJfJZQ=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "e9a7635a57597d9754eccebdfc7045e6c8600e6b", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { + "locked": { + "lastModified": 1704008649, + "narHash": "sha256-rGPSWjXTXTurQN9beuHdyJhB8O761w1Zc5BqSSmHvoM=", + "path": "/nix/store/kh5mw1hsalj27ha1wfvksljxyaikcmyb-source", + "rev": "d44d59d2b5bd694cd9d996fd8c51d03e3e9ba7f7", + "type": "path" + }, + "original": { + "id": "nixpkgs", + "type": "indirect" + } + }, + "nixpkgs_4": { + "locked": { + "lastModified": 1779357205, + "narHash": "sha256-cCO8aTqss5x9Ky8GWkpY0Hy5fyTZEbtifSUV8QjSzic=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "f83fc3c307e74bc5fd5adb7eb6b8b13ffd2a36e1", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_5": { + "locked": { + "lastModified": 1780895883, + "narHash": "sha256-y4ys7/dYufqXMIDH0qIC4C3Qkq7F+9syjlkz1vH7Apo=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "0265069a40f500e713cbf64f29185b3cfa6c9ba9", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable-small", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_6": { + "locked": { + "lastModified": 1780751787, + "narHash": "sha256-nWR7F46SyrLvN8Ot39XJDpVCswekGakXlOD4KsTYKW0=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "00fa9a692bafc08a86061886f888b843bf7fbdb0", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable-small", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_7": { + "locked": { + "lastModified": 1767892417, + "narHash": "sha256-8bW3q88CEg2u4hSP66Vf4lpbLonHz7hqDNBMcCY7E9U=", + "rev": "3497aa5c9457a9d88d71fa93a4a8368816fbeeba", + "type": "tarball", + "url": "https://releases.nixos.org/nixos/unstable/nixos-26.05pre924538.3497aa5c9457/nixexprs.tar.xz" + }, + "original": { + "type": "tarball", + "url": "https://channels.nixos.org/nixos-unstable/nixexprs.tar.xz" + } + }, + "nixpkgs_8": { + "locked": { + "lastModified": 1778737229, + "narHash": "sha256-6xWoytx8jFW4PF1GjRm/i/53trbpKGfz6zjzQGBr4cI=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "d7a713c0b7e47c908258e71cba7a2d77cc8d71d5", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-25.11", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_9": { + "locked": { + "lastModified": 1780243769, + "narHash": "sha256-x5UQuRsH3MqI0U9afaXSNqzTPSeZlRLvFAav2Ux1pNw=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "331800de5053fcebacf6813adb5db9c9dca22a0c", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "nixvim": { "inputs": { - "flake-parts": "flake-parts_3", - "nixpkgs": "nixpkgs_9", + "flake-parts": "flake-parts_4", + "nixpkgs": "nixpkgs_11", "systems": "systems_4" }, "locked": { @@ -1306,7 +1377,7 @@ }, "omp-nix": { "inputs": { - "nixpkgs": "nixpkgs_10" + "nixpkgs": "nixpkgs_12" }, "locked": { "lastModified": 1780786850, @@ -1350,7 +1421,7 @@ "inputs": { "libcamera-src": "libcamera-src", "libpisp-src": "libpisp-src", - "nixpkgs": "nixpkgs_11", + "nixpkgs": "nixpkgs_13", "rpi-bluez-firmware-src": "rpi-bluez-firmware-src", "rpi-firmware-nonfree-src": "rpi-firmware-nonfree-src", "rpi-firmware-src": "rpi-firmware-src", @@ -1374,9 +1445,10 @@ "root": { "inputs": { "den": "den", + "direnv-instant": "direnv-instant", "disko": "disko", "flake-file": "flake-file", - "flake-parts": "flake-parts", + "flake-parts": "flake-parts_2", "font-patcher": "font-patcher", "heliumFlake": "heliumFlake", "home-manager": "home-manager", @@ -1388,7 +1460,7 @@ "nixos-hardware": "nixos-hardware", "nixos-raspberrypi": "nixos-raspberrypi", "nixos-wsl": "nixos-wsl", - "nixpkgs": "nixpkgs_8", + "nixpkgs": "nixpkgs_10", "nixvim": "nixvim", "omp-nix": "omp-nix", "raspberry-pi-nix": "raspberry-pi-nix", @@ -1506,7 +1578,7 @@ }, "spicetify-nix": { "inputs": { - "nixpkgs": "nixpkgs_12", + "nixpkgs": "nixpkgs_14", "systems": "systems_5" }, "locked": { @@ -1530,7 +1602,7 @@ "base16-helix": "base16-helix", "base16-vim": "base16-vim", "firefox-gnome-theme": "firefox-gnome-theme", - "flake-parts": "flake-parts_4", + "flake-parts": "flake-parts_5", "gnome-shell": "gnome-shell", "nixpkgs": [ "nixpkgs" @@ -1711,6 +1783,27 @@ "type": "github" } }, + "treefmt-nix": { + "inputs": { + "nixpkgs": [ + "direnv-instant", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1780220602, + "narHash": "sha256-eynAfOmbmxJnkp7YewvCEbShNnnYJ9gLLqkzsYtBPeM=", + "owner": "numtide", + "repo": "treefmt-nix", + "rev": "db947814a175b7ca6ded66e21383d938df01c227", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "treefmt-nix", + "type": "github" + } + }, "utils": { "inputs": { "systems": "systems" diff --git a/flake.nix b/flake.nix index 0db7a39..cc8cbbb 100644 --- a/flake.nix +++ b/flake.nix @@ -4,6 +4,7 @@ inputs = { den.url = "github:vic/den?ref=8101ec865c0bf4027d40b9fd8951e3e435a86d64"; + direnv-instant.url = "github:Mic92/direnv-instant"; disko.url = "github:nix-community/disko"; flake-file.url = "github:vic/flake-file"; flake-parts = { @@ -21,10 +22,7 @@ }; hyprland.url = "github:hyprwm/Hyprland"; import-tree.url = "github:vic/import-tree"; - nik-pkgs = { - url = "git+https://git.scug.io/nikkuss/pkgs.git"; - inputs.nixpkgs.follows = "nixpkgs"; - }; + nik-pkgs.url = "git+https://git.scug.io/nikkuss/pkgs.git"; niri-flake = { url = "github:sodiboo/niri-flake"; inputs.nixpkgs.follows = "nixpkgs";