aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMihai Fufezan <[email protected]>2022-12-04 21:29:12 +0200
committerMihai Fufezan <[email protected]>2022-12-05 03:12:37 +0200
commit49bb42d2def777c5ca6400cfc620a2a408e12693 (patch)
tree9efe3b55ac11b57cee4aa8bc559641b0f857e172
parent9e4e98acfb0ba4dc01218abb50ffe551dd88949d (diff)
downloadHyprland-xdph.tar.gz
Hyprland-xdph.zip
nix: add xdph to nixos modulexdph
-rw-r--r--flake.lock40
-rw-r--r--flake.nix7
-rw-r--r--nix/module.nix7
3 files changed, 49 insertions, 5 deletions
diff --git a/flake.lock b/flake.lock
index 61593048..572c561e 100644
--- a/flake.lock
+++ b/flake.lock
@@ -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",
diff --git a/flake.nix b/flake.nix
index 6e44eece..bb097d6a 100644
--- a/flake.nix
+++ b/flake.nix
@@ -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];
};
};
}