From 965ef9e76e1e16c0bcdf40bde5045da6bab8cf3f Mon Sep 17 00:00:00 2001 From: Hadi <112569860+anotherhadi@users.noreply.github.com> Date: Wed, 23 Oct 2024 20:15:46 +0200 Subject: [PATCH] Init hyprpolkitagent --- flake.lock | 91 +++++++++++++++++++++++++--- flake.nix | 1 + home/system/hyprland/default.nix | 2 +- home/system/hyprland/polkitagent.nix | 7 +++ 4 files changed, 93 insertions(+), 8 deletions(-) create mode 100644 home/system/hyprland/polkitagent.nix diff --git a/flake.lock b/flake.lock index c118c30..ca7a417 100644 --- a/flake.lock +++ b/flake.lock @@ -266,7 +266,7 @@ }, "flake-utils_2": { "inputs": { - "systems": "systems_5" + "systems": "systems_6" }, "locked": { "lastModified": 1726560853, @@ -603,12 +603,32 @@ "type": "github" } }, + "hyprpolkitagent": { + "inputs": { + "hyprutils": "hyprutils_2", + "nixpkgs": "nixpkgs_5", + "systems": "systems_4" + }, + "locked": { + "lastModified": 1729625638, + "narHash": "sha256-QIm0pNs7lXM20E/4yxDseWWD+tsc8eL9tvZuNAZjG40=", + "owner": "hyprwm", + "repo": "hyprpolkitagent", + "rev": "b22dfc2e091c9055fc1b7b14ff51db1b45e34701", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprpolkitagent", + "type": "github" + } + }, "hyprspace": { "inputs": { "hyprland": [ "hyprland" ], - "systems": "systems_4" + "systems": "systems_5" }, "locked": { "lastModified": 1729427131, @@ -650,6 +670,31 @@ "type": "github" } }, + "hyprutils_2": { + "inputs": { + "nixpkgs": [ + "hyprpolkitagent", + "nixpkgs" + ], + "systems": [ + "hyprpolkitagent", + "systems" + ] + }, + "locked": { + "lastModified": 1727300645, + "narHash": "sha256-OvAtVLaSRPnbXzOwlR1fVqCXR7i+ICRX3aPMCdIiv+c=", + "owner": "hyprwm", + "repo": "hyprutils", + "rev": "3f5293432b6dc6a99f26aca2eba3876d2660665c", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprutils", + "type": "github" + } + }, "hyprwayland-scanner": { "inputs": { "nixpkgs": [ @@ -809,6 +854,22 @@ } }, "nixpkgs_5": { + "locked": { + "lastModified": 1728492678, + "narHash": "sha256-9UTxR8eukdg+XZeHgxW5hQA9fIKHsKCdOIUycTryeVw=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "5633bcff0c6162b9e4b5f1264264611e950c8ec7", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_6": { "locked": { "lastModified": 1729413321, "narHash": "sha256-I4tuhRpZFa6Fu6dcH9Dlo5LlH17peT79vx1y1SpeKt0=", @@ -824,7 +885,7 @@ "type": "github" } }, - "nixpkgs_6": { + "nixpkgs_7": { "locked": { "lastModified": 1725194671, "narHash": "sha256-tLGCFEFTB5TaOKkpfw3iYT9dnk4awTP/q4w+ROpMfuw=", @@ -948,9 +1009,10 @@ "home-manager": "home-manager", "hyprland": "hyprland", "hyprpanel": "hyprpanel", + "hyprpolkitagent": "hyprpolkitagent", "hyprspace": "hyprspace", "nixos-hardware": "nixos-hardware", - "nixpkgs": "nixpkgs_5", + "nixpkgs": "nixpkgs_6", "nixvim": "nixvim", "nixy-wallpapers": "nixy-wallpapers", "sops-nix": "sops-nix", @@ -1058,8 +1120,8 @@ "flake-utils": "flake-utils_3", "gnome-shell": "gnome-shell", "home-manager": "home-manager_3", - "nixpkgs": "nixpkgs_6", - "systems": "systems_6", + "nixpkgs": "nixpkgs_7", + "systems": "systems_7", "tinted-foot": "tinted-foot", "tinted-kitty": "tinted-kitty", "tinted-tmux": "tinted-tmux" @@ -1139,6 +1201,21 @@ } }, "systems_5": { + "locked": { + "lastModified": 1689347949, + "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", + "owner": "nix-systems", + "repo": "default-linux", + "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default-linux", + "type": "github" + } + }, + "systems_6": { "locked": { "lastModified": 1681028828, "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", @@ -1153,7 +1230,7 @@ "type": "github" } }, - "systems_6": { + "systems_7": { "locked": { "lastModified": 1681028828, "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", diff --git a/flake.nix b/flake.nix index 52dee8a..ba78a6e 100644 --- a/flake.nix +++ b/flake.nix @@ -33,6 +33,7 @@ url = "github:anotherhadi/nixy-wallpapers"; flake = false; }; + hyprpolkitagent.url = "github:hyprwm/hyprpolkitagent"; hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1"; hyprpanel.url = "github:Jas-SinghFSU/HyprPanel"; stylix.url = "github:danth/stylix"; diff --git a/home/system/hyprland/default.nix b/home/system/hyprland/default.nix index bf7f9f5..49bbbdc 100644 --- a/home/system/hyprland/default.nix +++ b/home/system/hyprland/default.nix @@ -11,7 +11,7 @@ let keyboardLayout = config.var.keyboardLayout; in { - imports = [ ./animations.nix ./bindings.nix ]; + imports = [ ./animations.nix ./bindings.nix ./polkitagent.nix ]; home.packages = with pkgs; [ qt5.qtwayland diff --git a/home/system/hyprland/polkitagent.nix b/home/system/hyprland/polkitagent.nix new file mode 100644 index 0000000..c76587e --- /dev/null +++ b/home/system/hyprland/polkitagent.nix @@ -0,0 +1,7 @@ +{ inputs, pkgs, ... }: { + home.packages = + [ inputs.hyprpolkitagent.packages."${pkgs.system}".hyprpolkitagent ]; + + wayland.windowManager.hyprland.exec-once = + [ "systemctl --user start hyprpolkitagent" ]; +}