diff --git a/flake.lock b/flake.lock index ca2b67b..7c81902 100644 --- a/flake.lock +++ b/flake.lock @@ -74,18 +74,65 @@ "type": "github" } }, - "nixpkgs": { + "hyprland": { + "inputs": { + "hyprland-protocols": "hyprland-protocols", + "nixpkgs": "nixpkgs", + "systems": "systems", + "wlroots": "wlroots", + "xdph": "xdph" + }, "locked": { - "lastModified": 1695346609, - "narHash": "sha256-jur+AjgRvablLA2oBvC4FD89zCXttVQDwi6OXk5x/14=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "e9b4b56e5a20ac322c0c01ccab7ec697ab076ea0", + "lastModified": 1696090070, + "narHash": "sha256-f6/USsOSdb/niLroIh2Xr1ihlDXJnznJ5+D+SgTrnME=", + "owner": "hyprwm", + "repo": "Hyprland", + "rev": "a2a29a60e5301df2cadf58c1bb18495d02710547", "type": "github" }, "original": { - "owner": "nixos", - "ref": "nixos-23.05", + "owner": "hyprwm", + "repo": "Hyprland", + "type": "github" + } + }, + "hyprland-protocols": { + "inputs": { + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1691753796, + "narHash": "sha256-zOEwiWoXk3j3+EoF3ySUJmberFewWlagvewDRuWYAso=", + "owner": "hyprwm", + "repo": "hyprland-protocols", + "rev": "0c2ce70625cb30aef199cb388f99e19a61a6ce03", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprland-protocols", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1694767346, + "narHash": "sha256-5uH27SiVFUwsTsqC5rs3kS7pBoNhtoy9QfTP9BmknGk=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "ace5093e36ab1e95cb9463863491bee90d5a4183", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", "repo": "nixpkgs", "type": "github" } @@ -106,14 +153,94 @@ "type": "github" } }, + "nixpkgs_2": { + "locked": { + "lastModified": 1695346609, + "narHash": "sha256-jur+AjgRvablLA2oBvC4FD89zCXttVQDwi6OXk5x/14=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "e9b4b56e5a20ac322c0c01ccab7ec697ab076ea0", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-23.05", + "repo": "nixpkgs", + "type": "github" + } + }, "root": { "inputs": { "firefox-addons": "firefox-addons", "hardware": "hardware", "home-manager": "home-manager", - "nixpkgs": "nixpkgs", + "hyprland": "hyprland", + "nixpkgs": "nixpkgs_2", "nixpkgs-unstable": "nixpkgs-unstable" } + }, + "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" + } + }, + "wlroots": { + "flake": false, + "locked": { + "host": "gitlab.freedesktop.org", + "lastModified": 1695919988, + "narHash": "sha256-4RBgIZHaVqH0m1POnfzYRzwCWxifIKH4xQ0kCn2LGkA=", + "owner": "wlroots", + "repo": "wlroots", + "rev": "c2aa7fd965cb7ee8bed24f4122b720aca8f0fc1e", + "type": "gitlab" + }, + "original": { + "host": "gitlab.freedesktop.org", + "owner": "wlroots", + "repo": "wlroots", + "rev": "c2aa7fd965cb7ee8bed24f4122b720aca8f0fc1e", + "type": "gitlab" + } + }, + "xdph": { + "inputs": { + "hyprland-protocols": [ + "hyprland", + "hyprland-protocols" + ], + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1694628480, + "narHash": "sha256-Qg9hstRw0pvjGu5hStkr2UX1D73RYcQ9Ns/KnZMIm9w=", + "owner": "hyprwm", + "repo": "xdg-desktop-portal-hyprland", + "rev": "8f45a6435069b9e24ebd3160eda736d7a391cbf2", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "xdg-desktop-portal-hyprland", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index aa63f52..adca8b3 100644 --- a/flake.nix +++ b/flake.nix @@ -26,9 +26,12 @@ url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons"; inputs.nixpkgs.follows = "nixpkgs"; }; + + #Hyprland + hyprland.url = "github:hyprwm/Hyprland"; }; - outputs = { self, nixpkgs, home-manager, ... } @inputs: + outputs = { self, nixpkgs, home-manager, hyprland, ... } @inputs: let inherit (self) outputs; lib = nixpkgs.lib // home-manager.lib; @@ -74,7 +77,11 @@ extraSpecialArgs = { inherit inputs outputs; }; }; "john@pixnix" = lib.homeManagerConfiguration { - modules = [ ./home/pixnix.nix ]; + modules = [ + ./home/pixnix.nix + hyprland.homeManagerModules.default + {wayland.windowManager.hyprland.enable = true;} + ]; pkgs = pkgsFor.x86_64-linux; extraSpecialArgs = { inherit inputs outputs; }; }; diff --git a/home/features/desktop/hyprland/default.nix b/home/features/desktop/hyprland/default.nix new file mode 100644 index 0000000..5503e5c --- /dev/null +++ b/home/features/desktop/hyprland/default.nix @@ -0,0 +1,9 @@ +{ config, inputs, pkgs, ... }: { + wayland.windowManager.hyprland = { + enable = true; + systemdIntegration = true; + extraConfig = '' + # hyprland config goes here + ''; + }; +} diff --git a/home/pixnix.nix b/home/pixnix.nix index 277e25f..5cb4af1 100644 --- a/home/pixnix.nix +++ b/home/pixnix.nix @@ -1,8 +1,10 @@ { inputs, outputs, lib, config, pkgs, ... }: { imports = [ + inputs.hyprland.homeManagerModules.default ./global ./features/cli/extras ./features/desktop + ./features/desktop/hyprland ]; # packages diff --git a/hosts/common/optional/hyprland.nix b/hosts/common/optional/hyprland.nix new file mode 100644 index 0000000..2f90bf5 --- /dev/null +++ b/hosts/common/optional/hyprland.nix @@ -0,0 +1,3 @@ +{pkgs, ... }: { + programs.hyprland.enable = true; +} diff --git a/hosts/pixnix/default.nix b/hosts/pixnix/default.nix index 4a95f0e..baf2ab6 100644 --- a/hosts/pixnix/default.nix +++ b/hosts/pixnix/default.nix @@ -9,6 +9,7 @@ ../common/users/john ../common/optional/docker.nix + ../common/optional/hyprland.nix ../common/optional/libvirtd.nix ../common/optional/pipewire.nix ../common/optional/printing.nix