Move and refactor dwm configuration
All checks were successful
/ check (push) Successful in 1m36s

This commit is contained in:
Oliver Davies 2025-07-27 20:03:18 +01:00
parent 679a090012
commit 8ca7b4c806
10 changed files with 44 additions and 64 deletions

11
modules2/dwm/config.nix Normal file
View file

@ -0,0 +1,11 @@
{
flake.modules.homeManager.gui =
{ config, ... }:
{
home = {
file."${config.home.sessionVariables.XINITRC}".source = ./xinitrc;
sessionVariables.XINITRC = "${config.xdg.configHome}/X11/xinitrc";
};
};
}

View file

@ -0,0 +1,8 @@
{
flake.modules.nixos.pc.services.dwm-status.settings.order = [
"audio"
"battery"
"network"
"time"
];
}

View file

@ -0,0 +1,3 @@
{
flake.modules.nixos.pc.systemd.user.services.dwm-status.serviceConfig.Restart = "on-failure";
}

16
modules2/dwm/packages.nix Normal file
View file

@ -0,0 +1,16 @@
{
flake.modules.nixos.pc =
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [
dmenu
dmenu-bluetooth
dunst
networkmanager_dmenu
poweralertd
slock
xdotool
xwallpaper
];
};
}

12
modules2/dwm/xinitrc Normal file
View file

@ -0,0 +1,12 @@
systemctl --user import-environment DISPLAY
poweralertd -s &
set-background &
systemctl --user start dwm-status &
sxhkd &
export GPG_TTY=$(tty)
export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
gpg-connect-agent updatestartuptty /bye
exec dwm

View file

@ -0,0 +1,3 @@
{
flake.modules.nixos.pc.services.dwm-status.enable = true;
}

View file

@ -0,0 +1,3 @@
{
flake.modules.nixos.pc.services.xserver.windowManager.dwm.enable = true;
}