dotfiles
My PC Dotfiles & Websitegit clone https://github.com/maydayv7/dotfiles
commit 90bae3c738bdb96b987963ab2bc430fbf646120c parent 7e777d9b9edbbf118117fa929a0c009c772ef4a9 Author: maydayv7 <maydayv7@gmail.com> Date: Sat, 16 Mar 2024 14:01:27 +0530 feat: Update Nix to v2.20 and Hyprland to v0.37 Also drop `flake-utils-plus` and use `flake-utils` instead
Diffstat:
| M | README.md | | | 1 | - |
| M | files/vscode/settings.json | | | 2 | +- |
| M | flake.lock | | | 198 | +++++++++++++++++++++++++++++++++++++++++++++++-------------------------------- |
| M | flake.nix | | | 12 | ++++++------ |
| M | modules/gui/desktop/hyprland/apps/default.nix | | | 3 | +-- |
| M | modules/gui/desktop/hyprland/apps/rules.nix | | | 5 | ++++- |
| M | modules/nix/default.nix | | | 42 | ++++++------------------------------------ |
| A | modules/nix/registry.nix | | | 23 | +++++++++++++++++++++++ |
| A | modules/nix/tools.nix | | | 22 | ++++++++++++++++++++++ |
| M | packages/flake.nix | | | 4 | ++-- |
10 files changed, 183 insertions(+), 129 deletions(-)
diff --git a/README.md b/README.md @@ -65,7 +65,6 @@ This [repository](https://github.com/maydayv7/dotfiles) contains the configurati - Ephemeral, Opt-In File System State using the [`impermanence`](https://github.com/nix-community/impermanence) module and [ZFS](https://zfsonlinux.org/) - Support for Secure Boot using [`lanzaboote`](https://github.com/nix-community/lanzaboote) - Support for Multiple Programming Language Development [`shells`](./shells) integrated with [`direnv`](https://direnv.net/) and [`lorri`](https://github.com/nix-community/lorri) -- Auto-Magic using [`flake-utils-plus`](https://github.com/gytis-ivaskevicius/flake-utils-plus) helper functions - Automatic `packages` Updates using [`update.sh`](./packages/update.sh) - Install Media and Device Images using [`nixos-generators`](https://github.com/nix-community/nixos-generators) image generation modules - Syntax [Formatting](./modules/nix/format.nix) using [`treefmt`](https://github.com/numtide/treefmt) and [`treefmt-nix`](https://github.com/numtide/treefmt-nix) diff --git a/files/vscode/settings.json b/files/vscode/settings.json @@ -32,7 +32,7 @@ "search.useGlobalIgnoreFiles": true, "search.useParentIgnoreFiles": true, "terminal.integrated.cursorStyle": "line", - "terminal.integrated.enableBell": true, + "terminal.integrated.enableVisualBell": true, "terminal.integrated.tabs.separator": " / ", "update.mode": "none", "window.autoDetectColorScheme": true, diff --git a/flake.lock b/flake.lock @@ -155,8 +155,7 @@ "framework" ], "flake-utils": [ - "utils", - "flake-utils" + "utils" ], "nixpkgs": [ "nixpkgs" @@ -330,24 +329,6 @@ }, "flake-utils": { "inputs": { - "systems": "systems_3" - }, - "locked": { - "lastModified": 1709126324, - "narHash": "sha256-q6EQdSeUZOG26WelxqkmR7kArjgWCdw5sfJVHPH/7j8=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "d465f4819400de7c8d874d50b982301f28a84605", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_2": { - "inputs": { "systems": "systems_4" }, "locked": { @@ -564,23 +545,50 @@ ] }, "locked": { - "lastModified": 1709043503, - "narHash": "sha256-GHrgunfo+UARnf3OgNhdXoNFALRAmQEGhlZ8x5TBvkQ=", - "owner": "DreamMaoMao", + "lastModified": 1709466277, + "narHash": "sha256-fSujEAViKqQusHyYe7Qg8QnLlyUNOf0/Jk1P70BmiyE=", + "owner": "Ayuei", "repo": "hycov", - "rev": "7d48cff8364a7b6ae52a3472ad1dfe01b9f728ae", + "rev": "db6ea8a24f0a58fa69f86db49d7c853754b1b8e1", "type": "github" }, "original": { - "owner": "DreamMaoMao", + "owner": "Ayuei", "repo": "hycov", "type": "github" } }, + "hyprcursor": { + "inputs": { + "hyprlang": "hyprlang", + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1710257359, + "narHash": "sha256-43re5pzE/cswFAgw92/ugsB3+d5ufDaCcLtl9ztKfBo=", + "owner": "hyprwm", + "repo": "hyprcursor", + "rev": "1761f6cefd77f4fcd2039d930c88d6716ddc4974", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprcursor", + "type": "github" + } + }, "hyprland": { "inputs": { + "hyprcursor": "hyprcursor", "hyprland-protocols": "hyprland-protocols", - "hyprlang": "hyprlang", + "hyprlang": "hyprlang_2", "nixpkgs": "nixpkgs_2", "systems": [ "systems" @@ -589,11 +597,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1709080360, - "narHash": "sha256-oZe4k6jtO/0govmERGcbeyvE9EfTvXY5bnyIs6AsL9U=", + "lastModified": 1710547119, + "narHash": "sha256-xLxbGRsKs40j+4tKeHydW1VUpCPOizYcduYQvBUitoY=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "1c460e98f870676b15871fe4e5bfeb1a32a3d6d8", + "rev": "19c90048d65a5660384d2fb865926a366696d6be", "type": "github" }, "original": { @@ -606,14 +614,19 @@ "inputs": { "hyprland": [ "hyprland" + ], + "systems": [ + "hyprland-plugins", + "hyprland", + "systems" ] }, "locked": { - "lastModified": 1708270226, - "narHash": "sha256-PCsEiFKBDZ1VKw8rlo8D/J+22gic7ls5zDWcU3AAxGQ=", + "lastModified": 1710512163, + "narHash": "sha256-bj3waHL6vTBWPw4f+vUdJ1MC5I8UWv2mNX3v/FPHBKQ=", "owner": "hyprwm", "repo": "hyprland-plugins", - "rev": "f99822818ec8276cfd6ec99ab60c4708c9884e3d", + "rev": "50758aa0244372af3d6f058dce39970a8d96ce2d", "type": "github" }, "original": { @@ -651,6 +664,29 @@ "inputs": { "nixpkgs": [ "hyprland", + "hyprcursor", + "nixpkgs" + ], + "systems": "systems" + }, + "locked": { + "lastModified": 1709914708, + "narHash": "sha256-bR4o3mynoTa1Wi4ZTjbnsZ6iqVcPGriXp56bZh5UFTk=", + "owner": "hyprwm", + "repo": "hyprlang", + "rev": "a685493fdbeec01ca8ccdf1f3655c044a8ce2fe2", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprlang", + "type": "github" + } + }, + "hyprlang_2": { + "inputs": { + "nixpkgs": [ + "hyprland", "nixpkgs" ], "systems": [ @@ -659,11 +695,11 @@ ] }, "locked": { - "lastModified": 1708787654, - "narHash": "sha256-7ACgM3ZuAhPqurXHUvR2nWMRcnmzGGPjLK6q4DSTelI=", + "lastModified": 1709914708, + "narHash": "sha256-bR4o3mynoTa1Wi4ZTjbnsZ6iqVcPGriXp56bZh5UFTk=", "owner": "hyprwm", "repo": "hyprlang", - "rev": "0fce791ba2334aca183f2ed42399518947550d0d", + "rev": "a685493fdbeec01ca8ccdf1f3655c044a8ce2fe2", "type": "github" }, "original": { @@ -709,7 +745,7 @@ }, "lib-aggregate": { "inputs": { - "flake-utils": "flake-utils_2", + "flake-utils": "flake-utils", "nixpkgs-lib": "nixpkgs-lib" }, "locked": { @@ -818,11 +854,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1708807242, - "narHash": "sha256-sRTRkhMD4delO/hPxxi+XwLqPn8BuUq6nnj4JqLwOu0=", + "lastModified": 1710272261, + "narHash": "sha256-g0bDwXFmTE7uGDOs9HcJsfLFhH7fOsASbAuOzDC+fhQ=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "73de017ef2d18a04ac4bfd0c02650007ccb31c2a", + "rev": "0ad13a6833440b8e238947e47bea7f11071dc2b2", "type": "github" }, "original": { @@ -953,7 +989,7 @@ "proprietary": "proprietary", "sops": "sops", "stylix": "stylix", - "systems": "systems_2", + "systems": "systems_3", "unstable": "unstable", "utils": "utils_2", "vscode": "vscode", @@ -1031,21 +1067,37 @@ ] }, "locked": { - "lastModified": 1706043974, - "narHash": "sha256-L81/nhZLqmAApEZhGfa27h6OOE0EL0XNDG66/vF+Ok8=", + "lastModified": 1705668784, + "narHash": "sha256-U/1Qol9H5nb8FtWSXSiHY8T4Y7TOIo7NHuqe4uuiBec=", "owner": "danth", "repo": "stylix", - "rev": "bf31640f49cb115508c31bf3bd0b4b80bb8ab71d", + "rev": "a9e3ce064a778b386fb88fb152c02ae95aa2cbd2", "type": "github" }, "original": { "owner": "danth", + "ref": "release-23.11", "repo": "stylix", "type": "github" } }, "systems": { "locked": { + "lastModified": 1689347949, + "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", + "owner": "nix-systems", + "repo": "default-linux", + "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default-linux", + "type": "github" + } + }, + "systems_2": { + "locked": { "lastModified": 1681028828, "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", "owner": "nix-systems", @@ -1059,7 +1111,7 @@ "type": "github" } }, - "systems_2": { + "systems_3": { "flake": false, "locked": { "lastModified": 1707463813, @@ -1076,21 +1128,6 @@ "type": "github" } }, - "systems_3": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, "systems_4": { "locked": { "lastModified": 1681028828, @@ -1130,11 +1167,11 @@ }, "unstable": { "locked": { - "lastModified": 1709703039, - "narHash": "sha256-6hqgQ8OK6gsMu1VtcGKBxKQInRLHtzulDo9Z5jxHEFY=", + "lastModified": 1710451336, + "narHash": "sha256-pP86Pcfu3BrAvRO7R64x7hs+GaQrjFes+mEPowCfkxY=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "9df3e30ce24fd28c7b3e2de0d986769db5d6225d", + "rev": "d691274a972b3165335d261cc4671335f5c67de9", "type": "github" }, "original": { @@ -1146,7 +1183,7 @@ }, "utils": { "inputs": { - "systems": "systems" + "systems": "systems_2" }, "locked": { "lastModified": 1694529238, @@ -1164,19 +1201,21 @@ }, "utils_2": { "inputs": { - "flake-utils": "flake-utils" + "systems": [ + "systems" + ] }, "locked": { - "lastModified": 1696331477, - "narHash": "sha256-YkbRa/1wQWdWkVJ01JvV+75KIdM37UErqKgTf0L54Fk=", - "owner": "gytis-ivaskevicius", - "repo": "flake-utils-plus", - "rev": "bfc53579db89de750b25b0c5e7af299e0c06d7d3", + "lastModified": 1710146030, + "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", "type": "github" }, "original": { - "owner": "gytis-ivaskevicius", - "repo": "flake-utils-plus", + "owner": "numtide", + "repo": "flake-utils", "type": "github" } }, @@ -1184,8 +1223,7 @@ "inputs": { "flake-compat": "flake-compat_3", "flake-utils": [ - "utils", - "flake-utils" + "utils" ], "nixpkgs": [ "nixpkgs" @@ -1291,18 +1329,18 @@ "flake": false, "locked": { "host": "gitlab.freedesktop.org", - "lastModified": 1708558866, - "narHash": "sha256-Mz6hCtommq7RQfcPnxLINigO4RYSNt23HeJHC6mVmWI=", + "lastModified": 1709983277, + "narHash": "sha256-wXWIJLd4F2JZeMaihWVDW/yYXCLEC8OpeNJZg9a9ly8=", "owner": "wlroots", "repo": "wlroots", - "rev": "0cb091f1a2d345f37d2ee445f4ffd04f7f4ec9e5", + "rev": "50eae512d9cecbf0b3b1898bb1f0b40fa05fe19b", "type": "gitlab" }, "original": { "host": "gitlab.freedesktop.org", "owner": "wlroots", "repo": "wlroots", - "rev": "0cb091f1a2d345f37d2ee445f4ffd04f7f4ec9e5", + "rev": "50eae512d9cecbf0b3b1898bb1f0b40fa05fe19b", "type": "gitlab" } }, @@ -1326,11 +1364,11 @@ ] }, "locked": { - "lastModified": 1708696469, - "narHash": "sha256-shh5wmpeYy3MmsBfkm4f76yPsBDGk6OLYRVG+ARy2F0=", + "lastModified": 1709299639, + "narHash": "sha256-jYqJM5khksLIbqSxCLUUcqEgI+O2LdlSlcMEBs39CAU=", "owner": "hyprwm", "repo": "xdg-desktop-portal-hyprland", - "rev": "1b713911c2f12b96c2574474686e4027ac4bf826", + "rev": "2d2fb547178ec025da643db57d40a971507b82fe", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix @@ -74,8 +74,8 @@ # Flake Utility Functions utils = { - url = "github:gytis-ivaskevicius/flake-utils-plus"; - inputs.flake-utils.inputs.systems.follows = "systems"; + url = "github:numtide/flake-utils"; + inputs.systems.follows = "systems"; }; # Source Filter Functions @@ -103,7 +103,7 @@ inputs = { nixpkgs.follows = "nixpkgs"; flake-parts.follows = "framework"; - flake-utils.follows = "utils/flake-utils"; + flake-utils.follows = "utils"; }; }; @@ -136,7 +136,7 @@ # Base16 Theming stylix = { - url = "github:danth/stylix"; + url = "github:danth/stylix?ref=release-23.11"; inputs = { nixpkgs.follows = "nixpkgs"; home-manager.follows = "home-manager"; @@ -160,7 +160,7 @@ }; hycov = { - url = "github:DreamMaoMao/hycov"; + url = "github:Ayuei/hycov"; inputs.hyprland.follows = "hyprland"; }; @@ -172,7 +172,7 @@ url = "github:nix-community/nix-vscode-extensions"; inputs = { nixpkgs.follows = "nixpkgs"; - flake-utils.follows = "utils/flake-utils"; + flake-utils.follows = "utils"; }; }; diff --git a/modules/gui/desktop/hyprland/apps/default.nix b/modules/gui/desktop/hyprland/apps/default.nix @@ -42,7 +42,7 @@ in { mate.atril mission-center custom.nwg-clipman - nwg-displays + unstable.nwg-displays custom.nwg-drawer nwg-wrapper unstable.overskride @@ -110,7 +110,6 @@ in { wayland.windowManager.hyprland.settings.bind = [ "$mod SHIFT, slash, exec, pkill -f -1 nwg-wrapper" # Binds List "$mod, slash, exec, ulauncher-toggle" - "$mod, slash, focuswindow, ulauncher" "$mod, A, exec, nwg-drawer" "$mod SHIFT, C, exec, hyprpicker -arf hex" "$mod, D, exec, pypr toggle displays" diff --git a/modules/gui/desktop/hyprland/apps/rules.nix b/modules/gui/desktop/hyprland/apps/rules.nix @@ -9,10 +9,11 @@ _: { ## Window Rules windowrulev2 = [ # Clipboard - "float, title:^(nwg-clipman)$" + "float, title:^(clipman)$" # Application Launcher "opacity 0.9 override, class:^(ulauncher)$" + "move cursor -50% -50%, class:^(ulauncher)$" # PiP Window "float, title:^(Picture-in-Picture)$" @@ -31,6 +32,8 @@ _: { "dimaround, class:^(gcr-prompter)$" "dimaround, class:^(xdg-desktop-portal-gtk)$" "dimaround, class:^(polkit-gnome-authentication-agent-1)$" + "stayfocused, class:^(polkit-gnome-authentication-agent-1)" + "stayfocused, class:^(pinentry-)" # Screen Share "maxsize 1 1, class:^(xwaylandvideobridge)$" diff --git a/modules/nix/default.nix b/modules/nix/default.nix @@ -1,21 +1,10 @@ -{ - config, - lib, - inputs, - pkgs, - ... -}: let - inherit (lib) mkEnableOption optionals; - inherit (config.nix) tools; - flake = (import ../../flake.nix).nixConfig; -in { - imports = [./index.nix inputs.utils.nixosModules.autoGenFromInputs]; - - options.nix.tools = mkEnableOption "Enable Additional Nix Tools"; +{pkgs, ...}: { + imports = [./index.nix ./registry.nix ./tools.nix]; ## Nix Settings ## config = { # Settings + user.persist.directories = [".cache/nix"]; nix = { # Version package = pkgs.nixFlakes; @@ -28,22 +17,15 @@ in { options = "--delete-older-than 7d"; }; - # Registry - linkInputs = true; - generateNixPathFromInputs = true; - generateRegistryFromInputs = true; - settings = { + sandbox = true; + # User Permissions allowed-users = ["root" "@wheel"]; trusted-users = ["root" "@wheel"]; # Binary Cache - inherit (flake) trusted-substituters trusted-public-keys; - - # Additional Features - sandbox = true; - system-features = optionals tools ["kvm" "big-parallel" "recursive-nix"]; + inherit ((import ../../flake.nix).nixConfig) trusted-substituters trusted-public-keys; }; extraOptions = '' @@ -54,17 +36,5 @@ in { max-free = ${toString (10 * 1024 * 1024 * 1024)} ''; }; - - # Utilities - user.persist.directories = [".cache/nix"] ++ optionals tools [".cache/manix"]; - environment.systemPackages = - [pkgs.cachix] - ++ optionals tools (with pkgs; [ - alejandra - manix - nodePackages.prettier - shellcheck - statix - ]); }; } diff --git a/modules/nix/registry.nix b/modules/nix/registry.nix @@ -0,0 +1,23 @@ +{ + lib, + inputs, + ... +}: { + ## Nix Registry ## + config = { + nix = { + nixPath = ["/etc/nix/inputs"]; + registry = + builtins.mapAttrs (_: value: {flake = value;}) + (lib.filterAttrs (_: value: value ? outputs) inputs); + }; + + environment.etc = + lib.mapAttrs' + (name: value: { + name = "nix/inputs/${name}"; + value = {source = value.outPath;}; + }) + inputs; + }; +} diff --git a/modules/nix/tools.nix b/modules/nix/tools.nix @@ -0,0 +1,22 @@ +{ + config, + lib, + pkgs, + ... +}: { + options.nix.tools = lib.mkEnableOption "Enable Additional Nix Tools"; + + ## Nix Tools ## + config = lib.mkIf config.nix.tools { + user.persist.directories = [".cache/manix"]; + nix.settings.system-features = ["kvm" "big-parallel" "recursive-nix"]; + environment.systemPackages = with pkgs; [ + alejandra + cachix + manix + nodePackages.prettier + shellcheck + statix + ]; + }; +} diff --git a/packages/flake.nix b/packages/flake.nix @@ -49,8 +49,8 @@ in { overlays = [ vscode-catppuccin.overlays.default - (final: prev: { - nixFlakes = prev.nixVersions.nix_2_19; + (pkg: _: { + nixFlakes = pkg.unstable.nixVersions.nix_2_20; custom = self.packages."${system}"; unstable = import unstable {inherit system config;};