From cf8586a26920f442294cd9527c4a61b7903f1a53 Mon Sep 17 00:00:00 2001 From: Benson Chu Date: Sat, 30 Dec 2023 10:03:02 -0600 Subject: [PATCH] Pull out exwm related things --- common/exwm.nix | 34 +++++++++++++++++++++++++++++++++ hosts/NixDawn/configuration.nix | 30 +---------------------------- 2 files changed, 35 insertions(+), 29 deletions(-) create mode 100644 common/exwm.nix diff --git a/common/exwm.nix b/common/exwm.nix new file mode 100644 index 0000000..3bd174d --- /dev/null +++ b/common/exwm.nix @@ -0,0 +1,34 @@ +{ config, pkgs, ... }: + +{ + services.xserver.windowManager.exwm = { + enable = true; + enableDefaultConfig = false; + }; + + programs = { + nm-applet.enable = true; + gnupg.agent = { + enable = true; + pinentryFlavor = "gtk2"; + enableSSHSupport = true; + }; + }; + + security.polkit.enable = true; + systemd = { + user.services.polkit-gnome-authentication-agent-1 = { + description = "polkit-gnome-authentication-agent-1"; + wantedBy = [ "graphical-session.target" ]; + wants = [ "graphical-session.target" ]; + after = [ "graphical-session.target" ]; + serviceConfig = { + Type = "simple"; + ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1"; + Restart = "on-failure"; + RestartSec = 1; + TimeoutStopSec = 10; + }; + }; + }; +} diff --git a/hosts/NixDawn/configuration.nix b/hosts/NixDawn/configuration.nix index 13ece03..d0ed0ff 100644 --- a/hosts/NixDawn/configuration.nix +++ b/hosts/NixDawn/configuration.nix @@ -13,6 +13,7 @@ in ../../common/configuration.nix ../../common/lxd-setup.nix ../../common/sshd-home.nix + ../../common/exwm.nix # Include the results of the hardware scan. ./hardware-configuration.nix ]; @@ -37,14 +38,7 @@ in programs = { evince.enable = true; - nm-applet.enable = true; thunar.enable = true; - - gnupg.agent = { - enable = true; - pinentryFlavor = "gtk2"; - enableSSHSupport = true; - }; }; services = { @@ -86,11 +80,6 @@ in displayManager.sddm.enable = true; desktopManager.plasma5.enable = true; - windowManager.exwm = { - enable = true; - enableDefaultConfig = false; - }; - xrandrHeads = [ { output = "HDMI-1"; primary = false; monitorConfig = "Option \"PreferredMode\" \"2560x2880\""; } { output = "DP-3"; primary = true; } @@ -105,23 +94,6 @@ in virtualisation.virtualbox.host.enable = true; users.extraGroups.vboxusers.members = [ "benson" ]; - security.polkit.enable = true; - systemd = { - user.services.polkit-gnome-authentication-agent-1 = { - description = "polkit-gnome-authentication-agent-1"; - wantedBy = [ "graphical-session.target" ]; - wants = [ "graphical-session.target" ]; - after = [ "graphical-session.target" ]; - serviceConfig = { - Type = "simple"; - ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1"; - Restart = "on-failure"; - RestartSec = 1; - TimeoutStopSec = 10; - }; - }; - }; - environment.systemPackages = with pkgs; [ pavucontrol ] ++ commonPackages;