diff --git a/flake.lock b/flake.lock index 33b8ff0..c733140 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,38 @@ { "nodes": { + "aquamarine": { + "inputs": { + "hyprutils": [ + "hyprland", + "hyprutils" + ], + "hyprwayland-scanner": [ + "hyprland", + "hyprwayland-scanner" + ], + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1734906446, + "narHash": "sha256-6OWluVE2A8xi+8V3jN9KA72RCgJjYdyyuLBUjxZ2q2U=", + "owner": "hyprwm", + "repo": "aquamarine", + "rev": "eecb74dc79bb6752a2a507e6edee3042390a6091", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "aquamarine", + "type": "github" + } + }, "crane": { "inputs": { "nixpkgs": [ @@ -75,6 +108,22 @@ } }, "flake-compat_3": { + "flake": false, + "locked": { + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-compat_4": { "locked": { "lastModified": 1696426674, "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", @@ -88,7 +137,7 @@ "url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz" } }, - "flake-compat_4": { + "flake-compat_5": { "flake": false, "locked": { "lastModified": 1733328505, @@ -184,7 +233,7 @@ }, "flake-utils": { "inputs": { - "systems": "systems" + "systems": "systems_3" }, "locked": { "lastModified": 1710146030, @@ -202,7 +251,7 @@ }, "flake-utils_2": { "inputs": { - "systems": "systems_2" + "systems": "systems_4" }, "locked": { "lastModified": 1731533236, @@ -224,7 +273,7 @@ "nixvim", "flake-compat" ], - "gitignore": "gitignore_2", + "gitignore": "gitignore_3", "nixpkgs": [ "nixvim", "nixpkgs" @@ -249,6 +298,28 @@ } }, "gitignore": { + "inputs": { + "nixpkgs": [ + "hyprland", + "pre-commit-hooks", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1709087332, + "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", + "owner": "hercules-ci", + "repo": "gitignore.nix", + "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "gitignore.nix", + "type": "github" + } + }, + "gitignore_2": { "inputs": { "nixpkgs": [ "lanzaboote", @@ -270,7 +341,7 @@ "type": "github" } }, - "gitignore_2": { + "gitignore_3": { "inputs": { "nixpkgs": [ "nixvim", @@ -334,6 +405,271 @@ "type": "github" } }, + "hyprcursor": { + "inputs": { + "hyprlang": [ + "hyprland", + "hyprlang" + ], + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1734906540, + "narHash": "sha256-vQ/L9hZFezC0LquLo4TWXkyniWtYBlFHAKIsDc7PYJE=", + "owner": "hyprwm", + "repo": "hyprcursor", + "rev": "69270ba8f057d55b0e6c2dca0e165d652856e613", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprcursor", + "type": "github" + } + }, + "hyprgraphics": { + "inputs": { + "hyprutils": [ + "hyprland", + "hyprutils" + ], + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1734906236, + "narHash": "sha256-vH/ysV2ONGQgYZPtcJKwc8jJivzyVxru2aaOxC20ZOE=", + "owner": "hyprwm", + "repo": "hyprgraphics", + "rev": "6dea3fba08fd704dd624b6d4b261638fb4003c9c", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprgraphics", + "type": "github" + } + }, + "hyprland": { + "inputs": { + "aquamarine": "aquamarine", + "hyprcursor": "hyprcursor", + "hyprgraphics": "hyprgraphics", + "hyprland-protocols": "hyprland-protocols", + "hyprland-qtutils": "hyprland-qtutils", + "hyprlang": "hyprlang", + "hyprutils": "hyprutils", + "hyprwayland-scanner": "hyprwayland-scanner", + "nixpkgs": "nixpkgs", + "pre-commit-hooks": "pre-commit-hooks", + "systems": "systems", + "xdph": "xdph" + }, + "locked": { + "lastModified": 1735084675, + "narHash": "sha256-PhQgwy3B/QYPefsCXpOds4Pa93h8u4agpv96rq3Knqs=", + "owner": "hyprwm", + "repo": "Hyprland", + "rev": "2a24a61126dcebd2e1f7862e5c21c105900110ac", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "Hyprland", + "type": "github" + } + }, + "hyprland-protocols": { + "inputs": { + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1728345020, + "narHash": "sha256-xGbkc7U/Roe0/Cv3iKlzijIaFBNguasI31ynL2IlEoM=", + "owner": "hyprwm", + "repo": "hyprland-protocols", + "rev": "a7c183800e74f337753de186522b9017a07a8cee", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprland-protocols", + "type": "github" + } + }, + "hyprland-qtutils": { + "inputs": { + "hyprutils": [ + "hyprland", + "hyprutils" + ], + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1734906472, + "narHash": "sha256-pWPRv/GA/X/iAwoE6gMNUqn/ZeJX1IeLPRpZI0tTPK0=", + "owner": "hyprwm", + "repo": "hyprland-qtutils", + "rev": "c77109d7e1ddbcdb87cafd32ce411f76328ae152", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprland-qtutils", + "type": "github" + } + }, + "hyprland-qtutils_2": { + "inputs": { + "hyprutils": "hyprutils_2", + "nixpkgs": "nixpkgs_2", + "systems": "systems_2" + }, + "locked": { + "lastModified": 1734906472, + "narHash": "sha256-pWPRv/GA/X/iAwoE6gMNUqn/ZeJX1IeLPRpZI0tTPK0=", + "owner": "hyprwm", + "repo": "hyprland-qtutils", + "rev": "c77109d7e1ddbcdb87cafd32ce411f76328ae152", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprland-qtutils", + "type": "github" + } + }, + "hyprlang": { + "inputs": { + "hyprutils": [ + "hyprland", + "hyprutils" + ], + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1734906259, + "narHash": "sha256-P79t/7HbACO4/PuJBroGpTptvCWJtXTv+gWsF+sM6MI=", + "owner": "hyprwm", + "repo": "hyprlang", + "rev": "0404833ea18d543df44df935ebf1b497310eb046", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprlang", + "type": "github" + } + }, + "hyprutils": { + "inputs": { + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1734796073, + "narHash": "sha256-TnuKsa8OHrSJEmHm3TLGOWbPNA1gRjmZLsRzKrCqOsg=", + "owner": "hyprwm", + "repo": "hyprutils", + "rev": "c3331116ebd0b71df5ae8c6efe9a7f94148b03bf", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprutils", + "type": "github" + } + }, + "hyprutils_2": { + "inputs": { + "nixpkgs": [ + "hyprland-qtutils", + "nixpkgs" + ], + "systems": [ + "hyprland-qtutils", + "systems" + ] + }, + "locked": { + "lastModified": 1734796073, + "narHash": "sha256-TnuKsa8OHrSJEmHm3TLGOWbPNA1gRjmZLsRzKrCqOsg=", + "owner": "hyprwm", + "repo": "hyprutils", + "rev": "c3331116ebd0b71df5ae8c6efe9a7f94148b03bf", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprutils", + "type": "github" + } + }, + "hyprwayland-scanner": { + "inputs": { + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1734793513, + "narHash": "sha256-rrrHcXapXJvGFqX+L/Bb0182L25jofAZ0fm1FInvrTQ=", + "owner": "hyprwm", + "repo": "hyprwayland-scanner", + "rev": "4d7367b6eee87397e2dbca2e78078dd0a4ef4c61", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprwayland-scanner", + "type": "github" + } + }, "ixx": { "inputs": { "flake-utils": [ @@ -365,7 +701,7 @@ "lanzaboote": { "inputs": { "crane": "crane", - "flake-compat": "flake-compat", + "flake-compat": "flake-compat_2", "flake-parts": "flake-parts", "flake-utils": "flake-utils", "nixpkgs": [ @@ -412,9 +748,9 @@ }, "nixos-cli": { "inputs": { - "flake-compat": "flake-compat_2", + "flake-compat": "flake-compat_3", "flake-parts": "flake-parts_2", - "nixpkgs": "nixpkgs", + "nixpkgs": "nixpkgs_3", "zig-deps-fod": "zig-deps-fod" }, "locked": { @@ -449,16 +785,16 @@ }, "nixpkgs": { "locked": { - "lastModified": 1721970117, - "narHash": "sha256-Hwm46lggqtihMaRuxbNaC1ACcU2a0jO/HXqrdjMatXk=", + "lastModified": 1734649271, + "narHash": "sha256-4EVBRhOjMDuGtMaofAIqzJbg4Ql7Ai0PSeuVZTHjyKQ=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "733453ac54a40997a6a690b60f3942d79560247c", + "rev": "d70bd19e0a38ad4790d3913bf08fcbfc9eeca507", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixpkgs-unstable", + "ref": "nixos-unstable", "repo": "nixpkgs", "type": "github" } @@ -488,6 +824,22 @@ } }, "nixpkgs-stable": { + "locked": { + "lastModified": 1730741070, + "narHash": "sha256-edm8WG19kWozJ/GqyYx2VjW99EdhjKwbY3ZwdlPAAlo=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "d063c1dd113c91ab27959ba540c0d9753409edf3", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-24.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-stable_2": { "locked": { "lastModified": 1710695816, "narHash": "sha256-3Eh7fhEID17pv9ZxrPwCLfqXnYP006RKzSs0JptsN84=", @@ -504,6 +856,38 @@ } }, "nixpkgs_2": { + "locked": { + "lastModified": 1734649271, + "narHash": "sha256-4EVBRhOjMDuGtMaofAIqzJbg4Ql7Ai0PSeuVZTHjyKQ=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "d70bd19e0a38ad4790d3913bf08fcbfc9eeca507", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { + "locked": { + "lastModified": 1721970117, + "narHash": "sha256-Hwm46lggqtihMaRuxbNaC1ACcU2a0jO/HXqrdjMatXk=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "733453ac54a40997a6a690b60f3942d79560247c", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_4": { "locked": { "lastModified": 1718428119, "narHash": "sha256-WdWDpNaq6u1IPtxtYHHWpl5BmabtpmLnMAx0RdJ/vo8=", @@ -519,7 +903,7 @@ "type": "github" } }, - "nixpkgs_3": { + "nixpkgs_5": { "locked": { "lastModified": 1734649271, "narHash": "sha256-4EVBRhOjMDuGtMaofAIqzJbg4Ql7Ai0PSeuVZTHjyKQ=", @@ -538,7 +922,7 @@ "nixvim": { "inputs": { "devshell": "devshell", - "flake-compat": "flake-compat_3", + "flake-compat": "flake-compat_4", "flake-parts": "flake-parts_4", "git-hooks": "git-hooks", "home-manager": "home-manager_2", @@ -586,18 +970,42 @@ "type": "github" } }, + "pre-commit-hooks": { + "inputs": { + "flake-compat": "flake-compat", + "gitignore": "gitignore", + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "nixpkgs-stable": "nixpkgs-stable" + }, + "locked": { + "lastModified": 1734797603, + "narHash": "sha256-ulZN7ps8nBV31SE+dwkDvKIzvN6hroRY8sYOT0w+E28=", + "owner": "cachix", + "repo": "git-hooks.nix", + "rev": "f0f0dc4920a903c3e08f5bdb9246bb572fcae498", + "type": "github" + }, + "original": { + "owner": "cachix", + "repo": "git-hooks.nix", + "type": "github" + } + }, "pre-commit-hooks-nix": { "inputs": { "flake-compat": [ "lanzaboote", "flake-compat" ], - "gitignore": "gitignore", + "gitignore": "gitignore_2", "nixpkgs": [ "lanzaboote", "nixpkgs" ], - "nixpkgs-stable": "nixpkgs-stable" + "nixpkgs-stable": "nixpkgs-stable_2" }, "locked": { "lastModified": 1717664902, @@ -616,10 +1024,12 @@ "root": { "inputs": { "home-manager": "home-manager", + "hyprland": "hyprland", + "hyprland-qtutils": "hyprland-qtutils_2", "lanzaboote": "lanzaboote", "nixos-cli": "nixos-cli", "nixos-hardware": "nixos-hardware", - "nixpkgs": "nixpkgs_3", + "nixpkgs": "nixpkgs_5", "nixvim": "nixvim", "spicetify-nix": "spicetify-nix" } @@ -651,7 +1061,7 @@ }, "spicetify-nix": { "inputs": { - "flake-compat": "flake-compat_4", + "flake-compat": "flake-compat_5", "nixpkgs": [ "nixpkgs" ] @@ -671,6 +1081,36 @@ } }, "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": 1689347949, + "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", + "owner": "nix-systems", + "repo": "default-linux", + "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default-linux", + "type": "github" + } + }, + "systems_3": { "locked": { "lastModified": 1681028828, "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", @@ -685,7 +1125,7 @@ "type": "github" } }, - "systems_2": { + "systems_4": { "locked": { "lastModified": 1681028828, "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", @@ -721,10 +1161,51 @@ "type": "github" } }, + "xdph": { + "inputs": { + "hyprland-protocols": [ + "hyprland", + "hyprland-protocols" + ], + "hyprlang": [ + "hyprland", + "hyprlang" + ], + "hyprutils": [ + "hyprland", + "hyprutils" + ], + "hyprwayland-scanner": [ + "hyprland", + "hyprwayland-scanner" + ], + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1734907020, + "narHash": "sha256-p6HxwpRKVl1KIiY5xrJdjcEeK3pbmc///UOyV6QER+w=", + "owner": "hyprwm", + "repo": "xdg-desktop-portal-hyprland", + "rev": "d7f18dda5e511749fa1511185db3536208fb1a63", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "xdg-desktop-portal-hyprland", + "type": "github" + } + }, "zig-deps-fod": { "inputs": { "flake-parts": "flake-parts_3", - "nixpkgs": "nixpkgs_2" + "nixpkgs": "nixpkgs_4" }, "locked": { "lastModified": 1720999842, diff --git a/flake.nix b/flake.nix index 06556d6..0fb6207 100644 --- a/flake.nix +++ b/flake.nix @@ -38,6 +38,14 @@ url = "github:nix-community/nixvim"; inputs.nixpkgs.follows = "nixpkgs"; }; + + hyprland = { + url = "github:hyprwm/Hyprland"; + }; + + hyprland-qtutils = { + url = "github:hyprwm/hyprland-qtutils"; + }; }; outputs = { @@ -49,6 +57,7 @@ nixos-cli, lanzaboote, nixvim, + hyprland-qtutils, ... } @ inputs: let lib = nixpkgs.lib; @@ -60,6 +69,9 @@ modules = [ home-manager.nixosModules.home-manager { + home-manager.extraSpecialArgs = { + inherit inputs; + }; home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; home-manager.backupFileExtension = "backup"; diff --git a/home/home.nix b/home/home.nix index a4b951a..bc7cc0a 100644 --- a/home/home.nix +++ b/home/home.nix @@ -1,4 +1,4 @@ -{ config, pkgs, ... }: +{ config, pkgs, inputs, ... }: { imports = [ ./modules/default.nix diff --git a/home/modules/hyprland.nix b/home/modules/hyprland.nix index 289ae7c..4ab9e16 100644 --- a/home/modules/hyprland.nix +++ b/home/modules/hyprland.nix @@ -1,8 +1,34 @@ -{ - programs.kitty.enable = true; - programs.waybar.enable = true; +{pkgs, inputs, ...}: { + programs.kitty.enable = true; + programs.waybar.enable = true; - wayland.windowManager.hyprland = { - enable = true; - }; + home.packages = [ + inputs.hyprland-qtutils.packages."${pkgs.system}".default + ]; + + wayland.windowManager.hyprland = { + enable = true; + + settings = { + "$mod" = "SUPER"; + bind = + [ + "$mod, F, exec, firefox" + "$mod, Return, exec, kitty" + ] + ++ ( + # workspaces + # binds $mod + [shift +] {1..9} to [move to] workspace {1..9} + builtins.concatLists (builtins.genList ( + i: let + ws = i + 1; + in [ + "$mod, code:1${toString i}, workspace, ${toString ws}" + "$mod SHIFT, code:1${toString i}, movetoworkspace, ${toString ws}" + ] + ) + 9) + ); + }; + }; } diff --git a/home/modules/neovim.nix b/home/modules/neovim.nix index 127e1f5..6b9d625 100644 --- a/home/modules/neovim.nix +++ b/home/modules/neovim.nix @@ -12,36 +12,38 @@ clipboard.providers.wl-copy.enable = true; plugins = { + web-devicons.enable = true; + bufferline = { - enable = true; - settings = { - options.hover = { - enabled = true; - delay = 200; - }; - }; + enable = true; + settings = { + options.hover = { + enabled = true; + delay = 200; + }; + }; }; lualine = { - enable = true; + enable = true; }; neo-tree = { - enable = true; - enableDiagnostics = true; - enableGitStatus = true; - enableModifiedMarkers = true; - enableRefreshOnWrite = true; + enable = true; + enableDiagnostics = true; + enableGitStatus = true; + enableModifiedMarkers = true; + enableRefreshOnWrite = true; }; rustaceanvim.enable = true; which-key = { - enable = true; + enable = true; }; snacks = { - enable = true; + enable = true; }; }; }; diff --git a/system/modules/wayland.nix b/system/modules/wayland.nix index e33a82b..8c1e3c1 100644 --- a/system/modules/wayland.nix +++ b/system/modules/wayland.nix @@ -1,15 +1,19 @@ -{pkgs, ...}: { +{pkgs, inputs, ...}: { + + # Nix flake Cachix stuff + nix.settings = { + substituters = ["https://hyprland.cachix.org"]; + trusted-public-keys = ["hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="]; + }; + programs.hyprland = { enable = true; + package = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland; + portalPackage = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.xdg-desktop-portal-hyprland; xwayland.enable = true; }; environment.sessionVariables = { NIXOS_OZONE_WL = "1"; }; - - xdg.portal = { - enable = true; - extraPortals = [ pkgs.xdg-desktop-portal-hyprland ]; - }; }