Add hyprland flake (keep disabled until i bisect it)

This commit is contained in:
NullBite 2024-02-19 09:24:48 +01:00
parent 46cbf68a5e
commit ab89da2a39
Signed by: nullbite
GPG Key ID: 6C4D545385D4925A
5 changed files with 194 additions and 14 deletions

198
flake.lock generated
View File

@ -18,7 +18,7 @@
}, },
"flake-utils": { "flake-utils": {
"inputs": { "inputs": {
"systems": "systems" "systems": "systems_2"
}, },
"locked": { "locked": {
"lastModified": 1705309234, "lastModified": 1705309234,
@ -36,7 +36,7 @@
}, },
"flake-utils_2": { "flake-utils_2": {
"inputs": { "inputs": {
"systems": "systems_2" "systems": "systems_3"
}, },
"locked": { "locked": {
"lastModified": 1705309234, "lastModified": 1705309234,
@ -73,6 +73,97 @@
"type": "github" "type": "github"
} }
}, },
"hyprland": {
"inputs": {
"hyprland-protocols": "hyprland-protocols",
"hyprlang": "hyprlang",
"nixpkgs": "nixpkgs",
"systems": "systems",
"wlroots": "wlroots",
"xdph": "xdph"
},
"locked": {
"lastModified": 1708300923,
"narHash": "sha256-TnZ4E2AZbRXcm5tuior9KMNSjruy11Oqic0yc7ySU1U=",
"owner": "hyprwm",
"repo": "Hyprland",
"rev": "69a4f08dbee6dc08d1e2ce498ce80ab20844e4f3",
"type": "github"
},
"original": {
"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"
}
},
"hyprlang": {
"inputs": {
"nixpkgs": [
"hyprland",
"nixpkgs"
]
},
"locked": {
"lastModified": 1708005943,
"narHash": "sha256-9TT3xk++LI5/SPYgjYX34xZ4ebR93c1uerIq+SE/ues=",
"owner": "hyprwm",
"repo": "hyprlang",
"rev": "aeb3e012adc7b3235335c540b214b82267c2b983",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprlang",
"type": "github"
}
},
"hyprlang_2": {
"inputs": {
"nixpkgs": [
"hyprland",
"xdph",
"nixpkgs"
]
},
"locked": {
"lastModified": 1704287638,
"narHash": "sha256-TuRXJGwtK440AXQNl5eiqmQqY4LZ/9+z/R7xC0ie3iA=",
"owner": "hyprwm",
"repo": "hyprlang",
"rev": "6624f2bb66d4d27975766e81f77174adbe58ec97",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprlang",
"type": "github"
}
},
"hyprwm-contrib": { "hyprwm-contrib": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -137,16 +228,16 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1707978831, "lastModified": 1707546158,
"narHash": "sha256-UblFdWQ2MMZNzD9C/w8+7RjAJ2QIbebbzHUniQ/a44o=", "narHash": "sha256-nYYJTpzfPMDxI8mzhQsYjIUX+grorqjKEU9Np6Xwy/0=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "c68a9fc85c2cb3a313be6ff40511635544dde8da", "rev": "d934204a0f8d9198e1e4515dd6fec76a139c87f0",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "owner": "NixOS",
"ref": "nixos-23.11", "ref": "nixos-unstable",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
@ -167,6 +258,22 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_2": {
"locked": {
"lastModified": 1707978831,
"narHash": "sha256-UblFdWQ2MMZNzD9C/w8+7RjAJ2QIbebbzHUniQ/a44o=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "c68a9fc85c2cb3a313be6ff40511635544dde8da",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-23.11",
"repo": "nixpkgs",
"type": "github"
}
},
"pkg-android-tools": { "pkg-android-tools": {
"locked": { "locked": {
"lastModified": 1676239704, "lastModified": 1676239704,
@ -186,14 +293,15 @@
"root": { "root": {
"inputs": { "inputs": {
"home-manager": "home-manager", "home-manager": "home-manager",
"hyprland": "hyprland",
"hyprwm-contrib": "hyprwm-contrib", "hyprwm-contrib": "hyprwm-contrib",
"nix-index-database": "nix-index-database", "nix-index-database": "nix-index-database",
"nix-wsl": "nix-wsl", "nix-wsl": "nix-wsl",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs_2",
"nixpkgs-unstable": "nixpkgs-unstable", "nixpkgs-unstable": "nixpkgs-unstable",
"pkg-android-tools": "pkg-android-tools", "pkg-android-tools": "pkg-android-tools",
"rust-overlay": "rust-overlay", "rust-overlay": "rust-overlay",
"systems": "systems_3" "systems": "systems_4"
} }
}, },
"rust-overlay": { "rust-overlay": {
@ -219,16 +327,16 @@
}, },
"systems": { "systems": {
"locked": { "locked": {
"lastModified": 1681028828, "lastModified": 1689347949,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
"owner": "nix-systems", "owner": "nix-systems",
"repo": "default", "repo": "default-linux",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nix-systems", "owner": "nix-systems",
"repo": "default", "repo": "default-linux",
"type": "github" "type": "github"
} }
}, },
@ -261,6 +369,70 @@
"repo": "default", "repo": "default",
"type": "github" "type": "github"
} }
},
"systems_4": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"wlroots": {
"flake": false,
"locked": {
"host": "gitlab.freedesktop.org",
"lastModified": 1706359063,
"narHash": "sha256-5HUTG0p+nCJv3cn73AmFHRZdfRV5AD5N43g8xAePSKM=",
"owner": "wlroots",
"repo": "wlroots",
"rev": "00b869c1a96f300a8f25da95d624524895e0ddf2",
"type": "gitlab"
},
"original": {
"host": "gitlab.freedesktop.org",
"owner": "wlroots",
"repo": "wlroots",
"rev": "00b869c1a96f300a8f25da95d624524895e0ddf2",
"type": "gitlab"
}
},
"xdph": {
"inputs": {
"hyprland-protocols": [
"hyprland",
"hyprland-protocols"
],
"hyprlang": "hyprlang_2",
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1706521509,
"narHash": "sha256-AInZ50acOJ3wzUwGzNr1TmxGTMx+8j6oSTzz4E7Vbp8=",
"owner": "hyprwm",
"repo": "xdg-desktop-portal-hyprland",
"rev": "c06fd88b3da492b8f9067be021b9184f7012b5a8",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "xdg-desktop-portal-hyprland",
"type": "github"
}
} }
}, },
"root": "root", "root": "root",

View File

@ -29,6 +29,9 @@
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
# no inputs.nixpkgs.follows so i can use cachix
hyprland.url = "github:hyprwm/Hyprland";
hyprwm-contrib = { hyprwm-contrib = {
url = "github:hyprwm/contrib"; url = "github:hyprwm/contrib";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";

View File

@ -60,6 +60,7 @@ in
wayland.windowManager.hyprland = { wayland.windowManager.hyprland = {
enable = true; enable = true;
package = lib.mkIf (osConfig ? programs) lib.mkDefault osConfig.programs.hyprland.package;
settings = { settings = {
# Xwayland fix # Xwayland fix

View File

@ -40,6 +40,7 @@
fun.enable = true; fun.enable = true;
}; };
sessions.hyprland.enable = true; sessions.hyprland.enable = true;
sessions.hyprland.useFlake = false;
sessions.plasma.enable = lib.mkDefault false; sessions.plasma.enable = lib.mkDefault false;
programs = { programs = {
adb.enable = true; adb.enable = true;

View File

@ -1,6 +1,7 @@
{ lib, pkgs, config, ... }: { lib, pkgs, config, inputs, ... }:
let let
cfg = config.nixfiles.sessions.hyprland; cfg = config.nixfiles.sessions.hyprland;
flake-package = inputs.hyprland.packages.${pkgs.system}.hyprland;
in in
{ {
# imports = [ # imports = [
@ -11,6 +12,7 @@ in
options.nixfiles.sessions.hyprland = { options.nixfiles.sessions.hyprland = {
enable = lib.mkEnableOption "hyprland configuration"; enable = lib.mkEnableOption "hyprland configuration";
useFlake = lib.mkEnableOption "hyprland flake package";
}; };
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
@ -28,6 +30,7 @@ in
# TODO base this on if nvidia is enabled # TODO base this on if nvidia is enabled
enableNvidiaPatches = lib.mkDefault true; enableNvidiaPatches = lib.mkDefault true;
xwayland.enable = true; xwayland.enable = true;
package = lib.mkIf cfg.useFlake flake-package;
}; };
xdg.portal = { xdg.portal = {