75 lines
1.7 KiB
Nix
75 lines
1.7 KiB
Nix
{ lib, config, pkgs, inputs, ... }:
|
|
|
|
let
|
|
inherit (pkgs) fetchpatch;
|
|
inherit (lib) getExe;
|
|
|
|
cfg = config.snowhawk.dwm;
|
|
in
|
|
{
|
|
options.snowhawk.dwm = {
|
|
enable = lib.mkEnableOption "dwm";
|
|
};
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
# Enable the X11 windowing system.
|
|
services.xserver.enable = true;
|
|
|
|
# Configure keymap in X11
|
|
services.xserver = {
|
|
xkb = {
|
|
layout = "us";
|
|
variant = "";
|
|
};
|
|
};
|
|
|
|
services.xserver.windowManager.dwm = {
|
|
enable = true;
|
|
package = pkgs.dwm.overrideAttrs (oldAttrs: {
|
|
patches = [
|
|
# Systray patch
|
|
(fetchpatch {
|
|
url = "https://dwm.suckless.org/patches/systray/dwm-systray-20230922-9f88553.diff";
|
|
hash = "sha256-KeNXvXTxgAFomP/68hljeVLHd9JvXy8WHQ+66nQZCKE=";
|
|
})
|
|
|
|
../home/dwm/config.def.h-6.5.diff
|
|
];
|
|
});
|
|
};
|
|
|
|
services.picom = {
|
|
enable = true;
|
|
fade = false;
|
|
};
|
|
|
|
systemd.user.services.xrootdatetime = {
|
|
script = ''
|
|
while true; do
|
|
sleep 1 && date +"<-- %A, %B %d -- %H:%M -->" | xargs -I% ${getExe pkgs.xorg.xsetroot} -name %
|
|
done
|
|
'';
|
|
wantedBy = [ "graphical-session.target" ];
|
|
partOf = [ "graphical-session.target" ];
|
|
};
|
|
|
|
systemd.user.services.fehbg = {
|
|
script = ''
|
|
${getExe pkgs.feh} --no-fehbg --bg-scale '${inputs.backgrounds}/bg-none-nord.webp'
|
|
'';
|
|
wantedBy = [ "graphical-session.target" ];
|
|
partOf = [ "graphical-session.target" ];
|
|
};
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
dmenu
|
|
xclip
|
|
];
|
|
|
|
home-manager.sharedModules = [
|
|
./home/dwm.nix
|
|
{ snowhawk.dwm.enable = lib.mkDefault true; }
|
|
];
|
|
};
|
|
}
|