From 9ffe30640ec20c8a190396f975f54acc35debd5b Mon Sep 17 00:00:00 2001 From: Leon Wilzer Date: Thu, 5 Dec 2024 19:59:24 +0100 Subject: [PATCH] feat polkit --- common.nix | 34 ++++++++++++++++++++++++++++++++-- home.nix | 11 ----------- 2 files changed, 32 insertions(+), 13 deletions(-) diff --git a/common.nix b/common.nix index c50c7f5..def516e 100644 --- a/common.nix +++ b/common.nix @@ -341,6 +341,7 @@ in home.sessionVariables = { PAGER = "less -RFX --tabs=4"; MANPAGER = "nvim +'setl filetype=terminal' +'Man!'"; + QT_QPA_PLATFORMTHEME = "qt5ct"; }; xdg.mimeApps = { @@ -398,7 +399,6 @@ in ydotool # wayland automation tool lunarvim # IDE layer for Neovim cloudflared # cloudflare things - sbctl # For debugging and troubleshooting Secure Boot killall # killall dmenu # (program) picker for Xorg @@ -475,6 +475,8 @@ in nixfmt-rfc-style # official nix formatter ripgrep # some nice grep alternative netcat-gnu # networking connection debugging + libsForQt5.qtstyleplugin-kvantum # qt theme + libsForQt5.qt5ct # qt theme ]; programs = { @@ -557,6 +559,16 @@ in user = "git"; identityFile = "${sshDir}/github"; }; + "*.cs.upb.de *.cs.uni-paderborn.de" = { + extraOptions = { + "GSSAPIAuthentication" = "yes"; + "GSSAPIDelegateCredentials" = "yes"; + }; + user = "lwilzer"; + }; + "*.cs.upb.de *.cs.uni-paderborn.de,!sshgate.*,!git.*" = lib.hm.dag.entryAfter ["*.cs.upb.de *.cs.uni-paderborn.de"] { + proxyJump = "sshgate.cs.uni-paderborn.de"; + }; } // config.programs.ssh.customMatchBlocks; }; @@ -640,7 +652,7 @@ in }; qt = { enable = true; - platformTheme.name = "gtk"; + platformTheme.name = "qt5ct"; style = { name = "Catppuccin Mocha"; package = pkgs.catppuccin; @@ -677,6 +689,24 @@ in }; }; +systemd.user.services = { + hyprpolkitagent = { + Unit = { + Description = "hyprpolkit agent"; + After = "graphical-session.target"; + WantedBy = [ "graphical-session.target" ]; + Wants = [ "graphical-session.target" ]; + }; + Service = { + Type = "simple"; + ExecStart = "${pkgs.hyprpolkitagent}/libexec/hyprpolkitagent"; + Restart = "on-failure"; + RestartSec = 1; + TimeoutStopSec = 10; + }; + }; +}; + # This value determines the Home Manager release that your # configuration is compatible with. This helps avoid breakage # when a new Home Manager release introduces backwards diff --git a/home.nix b/home.nix index 890aac9..feddd1a 100644 --- a/home.nix +++ b/home.nix @@ -27,17 +27,6 @@ in }; }; - programs.ssh.customMatchBlocks = - let - sshDir = "${homeDir}/.ssh"; - in - { - "uni-paderborn.de upb.de *.uni-paderborn.de *.upb.de" = { - user = "lwilzer"; - identityFile = "${sshDir}/unipaderborn"; - }; - }; - programs.git = { signing = { signByDefault = true;