Refactor back to a more modular configuration
This commit is contained in:
parent
19ea08a716
commit
2bedd41d83
178 changed files with 2245 additions and 1847 deletions
57
modules/nixos/desktop/dwm/default.nix
Normal file
57
modules/nixos/desktop/dwm/default.nix
Normal file
|
@ -0,0 +1,57 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.nixosModules.desktop.dwm;
|
||||
in
|
||||
{
|
||||
options.nixosModules.desktop.dwm.enable = mkEnableOption "Enable dwm";
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
services = {
|
||||
dwm-status = {
|
||||
enable = true;
|
||||
|
||||
order = [
|
||||
"audio"
|
||||
"battery"
|
||||
"network"
|
||||
"time"
|
||||
];
|
||||
};
|
||||
|
||||
xserver.windowManager.dwm.enable = true;
|
||||
};
|
||||
|
||||
systemd.user.services.dwm-status.serviceConfig.Restart = "on-failure";
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
dmenu
|
||||
dmenu-bluetooth
|
||||
dunst
|
||||
networkmanager_dmenu
|
||||
poweralertd
|
||||
slock
|
||||
xdotool
|
||||
xwallpaper
|
||||
];
|
||||
|
||||
home-manager.users.opdavies =
|
||||
{ config, ... }:
|
||||
{
|
||||
home = {
|
||||
file."${config.home.sessionVariables.XINITRC}".source = ./xinitrc;
|
||||
|
||||
sessionVariables = {
|
||||
XINITRC = "${config.xdg.configHome}/X11/xinitrc";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue