fix(waybar): Use waybar-hyprland from flake

This fixes an issue where wlr/workspaces is considered experimental in
waybar and thus does not work with the current nixpkgs version on NixOS.

References:
- https://github.com/Alexays/Waybar/issues/1766
- https://github.com/hyprwm/Hyprland/discussions/1729
This commit is contained in:
Donovan Glover 2023-05-09 22:31:23 -04:00
parent 27f7daeece
commit 4df1d91e19
No known key found for this signature in database
GPG Key ID: EA7408A77AE1BE65
4 changed files with 111 additions and 4 deletions

View File

@ -142,7 +142,6 @@
};
};
programs.neovim.enable = true;
programs.hyprland.enable = true;
programs.git.enable = true;
programs.firejail.enable = true;

104
flake.lock generated
View File

@ -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"
}
}
},

View File

@ -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;

View File

@ -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";