Pull out exwm related things

This commit is contained in:
Benson Chu 2023-12-30 10:03:02 -06:00
parent 6ade9debe1
commit cf8586a269
2 changed files with 35 additions and 29 deletions

34
common/exwm.nix Normal file
View file

@ -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;
};
};
};
}

View file

@ -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;