diff --git a/flake.lock b/flake.lock index 8ae5323..fad262b 100644 --- a/flake.lock +++ b/flake.lock @@ -18,7 +18,7 @@ }, "flake-utils": { "inputs": { - "systems": "systems" + "systems": "systems_2" }, "locked": { "lastModified": 1705309234, @@ -36,7 +36,7 @@ }, "flake-utils_2": { "inputs": { - "systems": "systems_2" + "systems": "systems_3" }, "locked": { "lastModified": 1705309234, @@ -73,6 +73,97 @@ "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": { "inputs": { "nixpkgs": [ @@ -137,16 +228,16 @@ }, "nixpkgs": { "locked": { - "lastModified": 1707978831, - "narHash": "sha256-UblFdWQ2MMZNzD9C/w8+7RjAJ2QIbebbzHUniQ/a44o=", + "lastModified": 1707546158, + "narHash": "sha256-nYYJTpzfPMDxI8mzhQsYjIUX+grorqjKEU9Np6Xwy/0=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "c68a9fc85c2cb3a313be6ff40511635544dde8da", + "rev": "d934204a0f8d9198e1e4515dd6fec76a139c87f0", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-23.11", + "ref": "nixos-unstable", "repo": "nixpkgs", "type": "github" } @@ -167,6 +258,22 @@ "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": { "locked": { "lastModified": 1676239704, @@ -186,14 +293,15 @@ "root": { "inputs": { "home-manager": "home-manager", + "hyprland": "hyprland", "hyprwm-contrib": "hyprwm-contrib", "nix-index-database": "nix-index-database", "nix-wsl": "nix-wsl", - "nixpkgs": "nixpkgs", + "nixpkgs": "nixpkgs_2", "nixpkgs-unstable": "nixpkgs-unstable", "pkg-android-tools": "pkg-android-tools", "rust-overlay": "rust-overlay", - "systems": "systems_3" + "systems": "systems_4" } }, "rust-overlay": { @@ -219,16 +327,16 @@ }, "systems": { "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "lastModified": 1689347949, + "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "repo": "default-linux", + "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", "type": "github" }, "original": { "owner": "nix-systems", - "repo": "default", + "repo": "default-linux", "type": "github" } }, @@ -261,6 +369,70 @@ "repo": "default", "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", diff --git a/flake.nix b/flake.nix index 543a9fb..8978d98 100644 --- a/flake.nix +++ b/flake.nix @@ -29,6 +29,9 @@ inputs.nixpkgs.follows = "nixpkgs"; }; + # no inputs.nixpkgs.follows so i can use cachix + hyprland.url = "github:hyprwm/Hyprland"; + hyprwm-contrib = { url = "github:hyprwm/contrib"; inputs.nixpkgs.follows = "nixpkgs"; diff --git a/home/sessions/hyprland.nix b/home/sessions/hyprland.nix index 7b31f7a..4d7387c 100644 --- a/home/sessions/hyprland.nix +++ b/home/sessions/hyprland.nix @@ -60,6 +60,7 @@ in wayland.windowManager.hyprland = { enable = true; + package = lib.mkIf (osConfig ? programs) lib.mkDefault osConfig.programs.hyprland.package; settings = { # Xwayland fix diff --git a/hosts/slab/configuration.nix b/hosts/slab/configuration.nix index e9c4a57..90b1618 100644 --- a/hosts/slab/configuration.nix +++ b/hosts/slab/configuration.nix @@ -40,6 +40,7 @@ fun.enable = true; }; sessions.hyprland.enable = true; + sessions.hyprland.useFlake = false; sessions.plasma.enable = lib.mkDefault false; programs = { adb.enable = true; diff --git a/system/sessions/hyprland.nix b/system/sessions/hyprland.nix index 99e2568..8a52d9a 100644 --- a/system/sessions/hyprland.nix +++ b/system/sessions/hyprland.nix @@ -1,6 +1,7 @@ -{ lib, pkgs, config, ... }: +{ lib, pkgs, config, inputs, ... }: let cfg = config.nixfiles.sessions.hyprland; + flake-package = inputs.hyprland.packages.${pkgs.system}.hyprland; in { # imports = [ @@ -11,6 +12,7 @@ in options.nixfiles.sessions.hyprland = { enable = lib.mkEnableOption "hyprland configuration"; + useFlake = lib.mkEnableOption "hyprland flake package"; }; config = lib.mkIf cfg.enable { @@ -28,6 +30,7 @@ in # TODO base this on if nvidia is enabled enableNvidiaPatches = lib.mkDefault true; xwayland.enable = true; + package = lib.mkIf cfg.useFlake flake-package; }; xdg.portal = {