diff --git a/flake.lock b/flake.lock index b3443833..e5d64b13 100644 --- a/flake.lock +++ b/flake.lock @@ -156,11 +156,11 @@ "rust-analyzer-src": "rust-analyzer-src" }, "locked": { - "lastModified": 1735626869, - "narHash": "sha256-hWGkpAWB59YWAOtBC6AE3DDnhMrBaqtiOaw1g+/mdLU=", + "lastModified": 1735799625, + "narHash": "sha256-lFadwWDvVIub11bwfZhsh2WUByf9LOi6yjsSUMmE0xk=", "owner": "nix-community", "repo": "fenix", - "rev": "120e688c881f2233f053dca5a5ddb8945d8ca5d7", + "rev": "a9d84a1545814910cb4ab0515ed6921e8b07ee95", "type": "github" }, "original": { @@ -245,11 +245,11 @@ ] }, "locked": { - "lastModified": 1733312601, - "narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=", + "lastModified": 1735774679, + "narHash": "sha256-soePLBazJk0qQdDVhdbM98vYdssfs3WFedcq+raipRI=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9", + "rev": "f2f7418ce0ab4a5309a4596161d154cfc877af66", "type": "github" }, "original": { @@ -429,11 +429,11 @@ "zig": "zig" }, "locked": { - "lastModified": 1735658428, - "narHash": "sha256-vg5GRc6H1SjVpGbbtq9HLTAilztC+vq3dRmzlIYWVxo=", + "lastModified": 1735765328, + "narHash": "sha256-f4LI34cXP8nOTi4Va6GPUFaJYf0qGbabk+OeUddsfuk=", "owner": "ghostty-org", "repo": "ghostty", - "rev": "eaa872216b577d68c09bfa13758abdedaf4fa80e", + "rev": "94599102e9fb8247af08cbbbcb7ee25e3d31e1bd", "type": "github" }, "original": { @@ -526,11 +526,11 @@ "rust-overlay": "rust-overlay" }, "locked": { - "lastModified": 1735657968, - "narHash": "sha256-MMrHcvx5OXymc38qSwdk4CughMKftUGIwfKroHA6R5k=", + "lastModified": 1735674113, + "narHash": "sha256-X2+0+s6qNxrD+ySlD15jr5H314jOKMKJHBzbtNw1cBk=", "owner": "helix-editor", "repo": "helix", - "rev": "2b4a77b9bfb17e1c4721aa7098fa683b27b99995", + "rev": "b1759f998d527b7014b6be1eb26a518e1b5927c4", "type": "github" }, "original": { @@ -546,11 +546,11 @@ ] }, "locked": { - "lastModified": 1735381016, - "narHash": "sha256-CyCZFhMUkuYbSD6bxB/r43EdmDE7hYeZZPTCv0GudO4=", + "lastModified": 1735774425, + "narHash": "sha256-C73gLFnEh8ZI0uDijUgCDWCd21T6I6tsaWgIBHcfAXg=", "owner": "nix-community", "repo": "home-manager", - "rev": "10e99c43cdf4a0713b4e81d90691d22c6a58bdf2", + "rev": "5f6aa268e419d053c3d5025da740e390b12ac936", "type": "github" }, "original": { @@ -766,11 +766,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1735585949, - "narHash": "sha256-0nT9kNyyQlhpMHakQLyINZoJAjRAui4WsbxrRev6Gwc=", + "lastModified": 1735774442, + "narHash": "sha256-G11VtBRItUM2iAn9bVGdf1w++YB1xn50ruPulGCUj+0=", "owner": "hyprwm", "repo": "hyprland", - "rev": "1989b0049f7fb714a2417dfb14d6b4f3d2a079d3", + "rev": "dde3e082c96cd6987420556bfc430cd5b8e0980c", "type": "github" }, "original": { @@ -812,11 +812,11 @@ ] }, "locked": { - "lastModified": 1728345020, - "narHash": "sha256-xGbkc7U/Roe0/Cv3iKlzijIaFBNguasI31ynL2IlEoM=", + "lastModified": 1735734474, + "narHash": "sha256-9OV4lOqrEJVLdOrpNN/9msNwAhI6FQTu4N7fufilG08=", "owner": "hyprwm", "repo": "hyprland-protocols", - "rev": "a7c183800e74f337753de186522b9017a07a8cee", + "rev": "271df559dd30e4bc5ec6af02d017ac0aaabd63a7", "type": "github" }, "original": { @@ -905,11 +905,11 @@ ] }, "locked": { - "lastModified": 1735584059, - "narHash": "sha256-C24BsZeP3XdLjh+w2BOIBjTZ6D5iNCXIqzHMAJyANPA=", + "lastModified": 1735764512, + "narHash": "sha256-uPydOifWzDjXNnV224ZZGWicPAOzvixsjP/yF+nrqb0=", "owner": "hyprwm", "repo": "hyprlock", - "rev": "836dbfbb136a76e786c1850b28be29a42c35507e", + "rev": "e01afaf107650eb7f84ffe6444d1cfcfbb4a0ff5", "type": "github" }, "original": { @@ -1207,11 +1207,11 @@ "umu": "umu" }, "locked": { - "lastModified": 1735481011, - "narHash": "sha256-u5yRymUN2ZuOavCj1HY1Le0Uyyg2azCTtZRLiXfOpo8=", + "lastModified": 1735696045, + "narHash": "sha256-bQgoL/l1jnFlzWNdo5ZtI8D2UTc6LvGSF9ZS4apREiE=", "owner": "fufexan", "repo": "nix-gaming", - "rev": "578b00c7c0db22464e50d7ae2f492dd9438a284c", + "rev": "a3a26749e81ba3691451adf793242acf2d758574", "type": "github" }, "original": { @@ -1625,11 +1625,11 @@ "systems": "systems_7" }, "locked": { - "lastModified": 1735617733, - "narHash": "sha256-qVUCdK/PyncUCELjEg3x3zd4T6zjNA0tos8zcvSjbo4=", + "lastModified": 1735800691, + "narHash": "sha256-3xH7qejv0VW6OTgLpwDSfCAmfVZfkq6OtPJw8mtPEw0=", "owner": "notashelf", "repo": "nvf", - "rev": "8febf44422f4404dcc1838ee55972733e092866c", + "rev": "e614860a126b0de8feb6e1e5e9bc682f7840d1c5", "type": "github" }, "original": { @@ -3645,11 +3645,11 @@ "rust-analyzer-src": { "flake": false, "locked": { - "lastModified": 1735570005, - "narHash": "sha256-ekN1mLeHM9upiAXykoNm646ctsm0qcS8+G2SjGtXp5k=", + "lastModified": 1735742096, + "narHash": "sha256-q3a80h8Jf8wfmPURUgRR46nQCB3I5fhZ+/swulTF5HY=", "owner": "rust-lang", "repo": "rust-analyzer", - "rev": "1c6b83852b0d3bc129a3558386663373f126337e", + "rev": "7e639ee3dda6ed9cecc79d41f6d38235121e483d", "type": "github" }, "original": { diff --git a/modules/default.nix b/modules/default.nix index 9371c03a..5c9d21ad 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -45,6 +45,7 @@ ./home/services/hypridle ./home/services/hyprpaper ./home/services/mako + ./home/services/nix-index ./home/services/protonmail-bridge ./home/services/swaync ./home/services/syncthing diff --git a/modules/home/services/nix-index/default.nix b/modules/home/services/nix-index/default.nix new file mode 100644 index 00000000..7b3b64e1 --- /dev/null +++ b/modules/home/services/nix-index/default.nix @@ -0,0 +1,53 @@ +# Copied from https://github.com/Misterio77/nix-config +{ + config, + lib, + pkgs, + ... +}: let + inherit (lib) mkEnableOption mkIf getExe; + cfg = config.home.services.nix-index; +in { + options = { + home.services.nix-index.enable = mkEnableOption "Enables dunst"; + }; + config = mkIf cfg.enable { + programs.nix-index = { + enable = true; + enableFishIntegration = true; + }; + + systemd.user.services.nix-index-database-sync = { + Unit.Description = "fetch nix-index-database"; + Service = { + Type = "oneshot"; + ExecStart = getExe ( + pkgs.writeShellApplication { + name = "fetch-nix-index-database"; + runtimeInputs = with pkgs; [ + wget + coreutils + ]; + text = '' + mkdir -p ~/.cache/nix-index + cd ~/.cache/nix-index + name="index-${pkgs.stdenv.system}" + wget -N "https://github.com/nix-community/nix-index-database/releases/latest/download/$name" + ln -sf "$name" "files" + ''; + } + ); + Restart = "on-failure"; + RestartSec = "5m"; + }; + }; + systemd.user.timers.nix-index-database-sync = { + Unit.Description = "Automatic github:nix-community/nix-index-database fetching"; + Timer = { + OnBootSec = "10m"; + OnUnitActiveSec = "24h"; + }; + Install.WantedBy = ["timers.target"]; + }; + }; +} diff --git a/users/cnst/modules.nix b/users/cnst/modules.nix index 4c69df45..6576d135 100644 --- a/users/cnst/modules.nix +++ b/users/cnst/modules.nix @@ -67,7 +67,7 @@ enable = false; }; kitty = { - enable = true; + enable = false; }; misc = { enable = true; @@ -151,6 +151,9 @@ mako = { enable = false; }; + nix-index = { + enable = true; + }; protonmail-bridge = { enable = true; };