diff --git a/configuration.nix b/configuration.nix index c1e3f698..0098b4a8 100644 --- a/configuration.nix +++ b/configuration.nix @@ -142,7 +142,6 @@ }; }; programs.neovim.enable = true; - programs.hyprland.enable = true; programs.git.enable = true; programs.firejail.enable = true; diff --git a/flake.lock b/flake.lock index 2023eb98..c2e052ab 100644 --- a/flake.lock +++ b/flake.lock @@ -21,7 +21,65 @@ "type": "github" } }, + "hyprland": { + "inputs": { + "hyprland-protocols": "hyprland-protocols", + "nixpkgs": "nixpkgs", + "wlroots": "wlroots", + "xdph": "xdph" + }, + "locked": { + "lastModified": 1683648078, + "narHash": "sha256-p9vcDqWrbnS5E+8VBXtduqrElPXIDxXHvgAil15daVo=", + "owner": "hyprwm", + "repo": "Hyprland", + "rev": "7fde80f38eefef4ec1e682947c4ae152aa0974db", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "Hyprland", + "type": "github" + } + }, + "hyprland-protocols": { + "inputs": { + "nixpkgs": [ + "hyprland", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1681065697, + "narHash": "sha256-QPzwwlGKX95tl6ZEshboZbEwwAXww6lNLdVYd6T9Mrc=", + "owner": "hyprwm", + "repo": "hyprland-protocols", + "rev": "4d29e48433270a2af06b8bc711ca1fe5109746cd", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprland-protocols", + "type": "github" + } + }, "nixpkgs": { + "locked": { + "lastModified": 1683014792, + "narHash": "sha256-6Va9iVtmmsw4raBc3QKvQT2KT/NGRWlvUlJj46zN8B8=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "1a411f23ba299db155a5b45d5e145b85a7aafc42", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { "locked": { "lastModified": 1683286087, "narHash": "sha256-xseOd7W7xwF5GOF2RW8qhjmVGrKoBz+caBlreaNzoeI=", @@ -40,7 +98,51 @@ "root": { "inputs": { "home-manager": "home-manager", - "nixpkgs": "nixpkgs" + "hyprland": "hyprland", + "nixpkgs": "nixpkgs_2" + } + }, + "wlroots": { + "flake": false, + "locked": { + "host": "gitlab.freedesktop.org", + "lastModified": 1682436395, + "narHash": "sha256-GGEjkQO9m7YLYIXIXM76HWdhjg4Ye+oafOtyaFAYKI4=", + "owner": "wlroots", + "repo": "wlroots", + "rev": "6830bfc17fd94709e2cdd4da0af989f102a26e59", + "type": "gitlab" + }, + "original": { + "host": "gitlab.freedesktop.org", + "owner": "wlroots", + "repo": "wlroots", + "type": "gitlab" + } + }, + "xdph": { + "inputs": { + "hyprland-protocols": [ + "hyprland", + "hyprland-protocols" + ], + "nixpkgs": [ + "hyprland", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1682439384, + "narHash": "sha256-zHDa8LCZs05TZHQSIZ3ucwyMPglBGHcqTBzfkLjYXTM=", + "owner": "hyprwm", + "repo": "xdg-desktop-portal-hyprland", + "rev": "c0e233955568fbea4e859336f6d3d14d51294d7c", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "xdg-desktop-portal-hyprland", + "type": "github" } } }, diff --git a/flake.nix b/flake.nix index 203c2eb7..64e072c4 100644 --- a/flake.nix +++ b/flake.nix @@ -3,9 +3,10 @@ nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; home-manager.url = "github:nix-community/home-manager/master"; home-manager.inputs.nixpkgs.follows = "nixpkgs"; + hyprland.url = "github:hyprwm/Hyprland"; }; - outputs = { self, nixpkgs, home-manager, ... }@attrs: { + outputs = { self, nixpkgs, home-manager, hyprland, ... }@attrs: { nixosConfigurations.nixos = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; specialArgs = attrs; @@ -13,6 +14,10 @@ ./configuration.nix ./modules/editor.nix ./modules/desktop.nix + hyprland.nixosModules.default + { + programs.hyprland.enable = true; + } home-manager.nixosModules.home-manager { home-manager.useGlobalPkgs = true; diff --git a/modules/desktop.nix b/modules/desktop.nix index a8f619ed..feeef4a2 100644 --- a/modules/desktop.nix +++ b/modules/desktop.nix @@ -1,4 +1,4 @@ -{ config, lib, nixpkgs, home-manager, ... }: { +{ config, lib, nixpkgs, home-manager, hyprland, ... }: { imports = [ home-manager.nixosModule ]; home-manager.users.user = { pkgs, ... }: { programs.kitty = { @@ -33,6 +33,7 @@ }; programs.waybar = { enable = true; + package = hyprland.packages."x86_64-linux".waybar-hyprland; settings = { mainBar = { layer = "bottom";