diff options
-rw-r--r-- | flake.lock | 40 | ||||
-rw-r--r-- | flake.nix | 7 | ||||
-rw-r--r-- | nix/module.nix | 7 |
3 files changed, 49 insertions, 5 deletions
@@ -1,5 +1,21 @@ { "nodes": { + "hyprland-protocols": { + "flake": false, + "locked": { + "lastModified": 1670185345, + "narHash": "sha256-hxWGqlPecqEsE6nOHDV29KFBKePbY2Ipeac6lrChMKY=", + "owner": "hyprwm", + "repo": "hyprland-protocols", + "rev": "4623a404c091e64743ba310199bb380ec52f1936", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprland-protocols", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1670064435, @@ -19,7 +35,8 @@ "root": { "inputs": { "nixpkgs": "nixpkgs", - "wlroots": "wlroots" + "wlroots": "wlroots", + "xdph": "xdph" } }, "wlroots": { @@ -39,6 +56,27 @@ "repo": "wlroots", "type": "gitlab" } + }, + "xdph": { + "inputs": { + "hyprland-protocols": "hyprland-protocols", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1670202338, + "narHash": "sha256-StTfshdAoSxO+t0wRbq1I3YESLFIQWFjGJse5ICV8rk=", + "owner": "hyprwm", + "repo": "xdg-desktop-portal-hyprland", + "rev": "af840a9e0947a79a37a95a9f62062653721e43fa", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "xdg-desktop-portal-hyprland", + "type": "github" + } } }, "root": "root", @@ -7,6 +7,11 @@ url = "gitlab:wlroots/wlroots?host=gitlab.freedesktop.org"; flake = false; }; + + xdph = { + url = "github:hyprwm/xdg-desktop-portal-hyprland"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; outputs = inputs @ { @@ -92,7 +97,7 @@ formatter = genSystems (system: pkgsFor.${system}.alejandra); - nixosModules.default = import ./nix/module.nix self; + nixosModules.default = import ./nix/module.nix inputs; homeManagerModules.default = import ./nix/hm-module.nix self; }; diff --git a/nix/module.nix b/nix/module.nix index 8d822b0c..55c667a9 100644 --- a/nix/module.nix +++ b/nix/module.nix @@ -1,5 +1,5 @@ # Copied from https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/programs/sway.nix -self: { +inputs: { config, lib, pkgs, @@ -23,7 +23,7 @@ in { package = mkOption { type = types.nullOr types.package; - default = self.packages.${pkgs.system}.default; + default = inputs.self.packages.${pkgs.system}.default; defaultText = literalExpression "<Hyprland flake>.packages.<system>.default"; example = literalExpression "<Hyprland flake>.packages.<system>.default.override { }"; description = '' @@ -60,7 +60,8 @@ in { services.xserver.displayManager.sessionPackages = lib.optional (cfg.package != null) cfg.package; xdg.portal = { enable = mkDefault true; - extraPortals = [pkgs.xdg-desktop-portal-wlr]; + # xdg-desktop-portal-hyprland + extraPortals = [inputs.xdph.packages.${pkgs.system}.default]; }; }; } |