From 28b5e266e1fc98b77d0a7c8eb8d2a5aaabd7f34e Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Tue, 4 Feb 2025 12:49:44 -0600 Subject: [PATCH] Stuff --- modules/home-manager/default.nix | 16 ++++++++++++++++ modules/home-manager/niri/config.kdl | 2 +- modules/nixos/default.nix | 24 ++++++++++++++++++++++++ 3 files changed, 41 insertions(+), 1 deletion(-) diff --git a/modules/home-manager/default.nix b/modules/home-manager/default.nix index 7072b01..4212b0a 100644 --- a/modules/home-manager/default.nix +++ b/modules/home-manager/default.nix @@ -1211,8 +1211,24 @@ home.packages = with pkgs; [ niri fuzzel + xdg-desktop-portal-gnome + xdg-desktop-portal-gtk ]; + services.gnome-keyring.enable = true; + xdg.portal = { + enable = true; + extraPortals = with pkgs; [xdg-desktop-portal-gtk xdg-desktop-portal-gnome]; + config = { + common = { + default = ["gtk"]; + }; + niri = { + default = ["gtk"]; + }; + }; + }; + home.file."${config.xdg.configHome}/niri" = { source = config.lib.file.mkOutOfStoreSymlink /etc/nix/flake/modules/home-manager/niri; }; diff --git a/modules/home-manager/niri/config.kdl b/modules/home-manager/niri/config.kdl index 82122a9..a0f9df1 100644 --- a/modules/home-manager/niri/config.kdl +++ b/modules/home-manager/niri/config.kdl @@ -111,7 +111,7 @@ layout { // - "always", the focused column will always be centered. // - "on-overflow", focusing a column will center it if it doesn't fit // together with the previously focused column. - center-focused-column "always" + center-focused-column "never" // You can customize the widths that "switch-preset-column-width" (Mod+R) toggles between. preset-column-widths { diff --git a/modules/nixos/default.nix b/modules/nixos/default.nix index 63e9c25..58b1fa5 100644 --- a/modules/nixos/default.nix +++ b/modules/nixos/default.nix @@ -18,6 +18,30 @@ # TODO: include the home-manager modules for daniel? }; + niri = {pkgs, ...}: { + environment.systemPackages = with pkgs; [niri]; + + systemd.user.services.polkit = { + description = "PolicyKit Authentication Agent"; + wantedBy = ["niri.service"]; + after = ["graphical-session.target"]; + partOf = ["graphical-session.target"]; + serviceConfig = { + Type = "simple"; + ExecStart = "${pkgs.libsForQt5.polkit-kde-agent}/libexec/polkit-kde-authentication-agent-1"; + Restart = "on-failure"; + RestartSec = 1; + TimeoutStopSec = 10; + }; + }; + + security.pam.services.swaylock = {}; + programs.dconf.enable = pkgs.lib.mkDefault true; + fonts.enableDefaultPackages = pkgs.lib.mkDefault true; + security.polkit.enable = true; + services.gnome.gnome-keyring.enable = true; + }; + hyprland = {pkgs, ...}: { imports = with nixosModules; [ ewwbar