Skip to content

Commit

Permalink
Refactor xserver programs into roles
Browse files Browse the repository at this point in the history
  • Loading branch information
rake5k committed Sep 27, 2024
1 parent 1801eff commit 6b76e07
Show file tree
Hide file tree
Showing 11 changed files with 176 additions and 220 deletions.
25 changes: 0 additions & 25 deletions home/programs/trayer/default.nix

This file was deleted.

161 changes: 0 additions & 161 deletions home/programs/xmonad/default.nix

This file was deleted.

27 changes: 25 additions & 2 deletions home/roles/desktop/xserver/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ with lib;

let

cfg = config.custom.roles.desktop.xserver;
desktopCfg = config.custom.roles.desktop;
cfg = desktopCfg.xserver;

in

Expand Down Expand Up @@ -51,7 +52,29 @@ in
cursors.enable = true;
grobi.enable = true;
redshift.enable = true;
xmonad.enable = true;

xmonad = {
inherit (cfg) colorScheme;

enable = true;
autoruns = {
"${desktopCfg.terminal.spawnCmd}" = 1;
"blueberry-tray" = 1;
"nm-applet" = 1;
"parcellite" = 1;
"steam -silent" = 8;
};
launcherCmd = "dmenu_run -c -i -fn \"${desktopCfg.font.family}:style=Bold:size=20:antialias=true\" -l 8 -nf \"#C5C8C6\" -sb \"#373B41\" -sf \"#C5C8C6\" -p \"run:\"";
terminalCmd = mkDefault desktopCfg.terminal.spawnCmd;
passwordManager = {
command = mkDefault "1password";
wmClassName = mkDefault "1Password";
};
wiki = {
command = mkDefault "logseq";
wmClassName = mkDefault "Logseq";
};
};
};
};
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ with lib;

let

cfg = config.custom.programs.dmenu;
cfg = config.custom.roles.desktop.xserver.dmenu;

dmenuPatched = pkgs.dmenu.override {
patches = builtins.map builtins.fetchurl [
Expand All @@ -23,7 +23,7 @@ in

{
options = {
custom.programs.dmenu = {
custom.roles.desktop.xserver.dmenu = {
enable = mkEnableOption "Dmenu launcher";

font = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ with lib;

let

cfg = config.custom.programs.dunst;
cfg = config.custom.roles.desktop.xserver.dunst;

in

{
options = {
custom.programs.dunst = {
custom.roles.desktop.xserver.dunst = {
enable = mkEnableOption "Dunst desktop notification daemon";

font = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ with lib;

let

cfg = config.custom.programs.picom;
cfg = config.custom.roles.desktop.xserver.picom;

in

{
options = {
custom.programs.picom = {
custom.roles.desktop.xserver.picom = {
enable = mkEnableOption "Picom compositor";
};
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ with lib;

let

cfg = config.custom.programs.polybar;
cfg = config.custom.roles.desktop.xserver.polybar;

package = pkgs.polybar.override {
pulseSupport = true;
Expand All @@ -14,7 +14,7 @@ in

{
options = {
custom.programs.polybar = {
custom.roles.desktop.xserver.polybar = {
enable = mkEnableOption "Polybar status bar";

colorScheme = {
Expand Down
Loading

0 comments on commit 6b76e07

Please sign in to comment.