-
-
Notifications
You must be signed in to change notification settings - Fork 117
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create an enable option for each module ✨
Fixes #7
- Loading branch information
Showing
18 changed files
with
495 additions
and
382 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -69,6 +69,7 @@ | |
}) | ||
./stylix/fonts.nix | ||
./stylix/pixel.nix | ||
./stylix/target.nix | ||
]; | ||
}; | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,27 @@ | ||
{ config, ... }: | ||
{ config, lib, ... }: | ||
|
||
with config.lib.stylix.colors; | ||
|
||
{ | ||
console = { | ||
colors = [ | ||
base00-hex | ||
base08-hex | ||
base0B-hex | ||
base0A-hex | ||
base0D-hex | ||
base0E-hex | ||
base0C-hex | ||
base05-hex | ||
base03-hex | ||
base09-hex | ||
base01-hex | ||
base02-hex | ||
base04-hex | ||
base06-hex | ||
base0F-hex | ||
base07-hex | ||
]; | ||
}; | ||
options.stylix.targets.console.enable = | ||
config.lib.stylix.mkEnableTarget "the Linux kernel console" true; | ||
|
||
config.console.colors = lib.mkIf config.stylix.targets.console.enable [ | ||
base00-hex | ||
base08-hex | ||
base0B-hex | ||
base0A-hex | ||
base0D-hex | ||
base0E-hex | ||
base0C-hex | ||
base05-hex | ||
base03-hex | ||
base09-hex | ||
base01-hex | ||
base02-hex | ||
base04-hex | ||
base06-hex | ||
base0F-hex | ||
base07-hex | ||
]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,38 @@ | ||
{ config, ... }: | ||
{ config, lib, ... }: | ||
|
||
with config.lib.stylix.colors.withHashtag; | ||
with config.stylix.fonts; | ||
|
||
{ | ||
home-manager.sharedModules = [{ | ||
services.dunst.settings = { | ||
global = { | ||
separator_color = base02; | ||
font = sansSerif.name; | ||
}; | ||
options.stylix.targets.dunst.enable = | ||
config.lib.stylix.mkEnableTarget "Dunst" true; | ||
|
||
urgency_low = { | ||
background = base01; | ||
foreground = base05; | ||
frame_color = base0B; | ||
}; | ||
config = lib.mkIf config.stylix.targets.dunst.enable { | ||
home-manager.sharedModules = [{ | ||
services.dunst.settings = { | ||
global = { | ||
separator_color = base02; | ||
font = sansSerif.name; | ||
}; | ||
|
||
urgency_normal = { | ||
background = base01; | ||
foreground = base05; | ||
frame_color = base0E; | ||
}; | ||
urgency_low = { | ||
background = base01; | ||
foreground = base05; | ||
frame_color = base0B; | ||
}; | ||
|
||
urgency_normal = { | ||
background = base01; | ||
foreground = base05; | ||
frame_color = base0E; | ||
}; | ||
|
||
urgency_critical = { | ||
background = base01; | ||
foreground = base05; | ||
frame_color = base08; | ||
urgency_critical = { | ||
background = base01; | ||
foreground = base05; | ||
frame_color = base08; | ||
}; | ||
}; | ||
}; | ||
}]; | ||
}]; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
{ pkgs, config, lib, ... }: | ||
|
||
with lib; | ||
{ | ||
options.stylix.targets.feh.enable = | ||
config.lib.stylix.mkEnableTarget | ||
"the desktop background using Feh" | ||
(with config.services.xserver.windowManager; xmonad.enable || i3.enable); | ||
|
||
with config.services.xserver.windowManager; | ||
let enable = xmonad.enable || i3.enable; | ||
|
||
in { | ||
services.xserver.displayManager.sessionCommands = mkIf enable | ||
config.services.xserver.displayManager.sessionCommands = | ||
lib.mkIf config.stylix.targets.feh.enable | ||
"${pkgs.feh}/bin/feh --no-fehbg --bg-scale ${config.stylix.image}"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,48 @@ | ||
{ config, ... }: | ||
{ config, lib, ... }: | ||
|
||
{ | ||
home-manager.sharedModules = [{ | ||
programs.kitty = { | ||
font = config.stylix.fonts.monospace; | ||
options.stylix.targets.kitty.enable = | ||
config.lib.stylix.mkEnableTarget "Kitty" true; | ||
|
||
settings = with config.lib.stylix.colors.withHashtag; { | ||
# Based on https://github.com/kdrag0n/base16-kitty/ | ||
active_border_color = base03; | ||
active_tab_background = base00; | ||
active_tab_foreground = base05; | ||
background = base00; | ||
cursor = base05; | ||
foreground = base05; | ||
inactive_border_color = base01; | ||
inactive_tab_background = base01; | ||
inactive_tab_foreground = base04; | ||
selection_background = base05; | ||
selection_foreground = base00; | ||
tab_bar_background = base01; | ||
url_color = base04; | ||
config = lib.mkIf config.stylix.targets.kitty.enable { | ||
home-manager.sharedModules = [{ | ||
programs.kitty = { | ||
font = config.stylix.fonts.monospace; | ||
|
||
color0 = base00; | ||
color1 = base08; | ||
color2 = base0B; | ||
color3 = base0A; | ||
color4 = base0D; | ||
color5 = base0E; | ||
color6 = base0C; | ||
color7 = base05; | ||
color8 = base03; | ||
color9 = base09; | ||
color10 = base01; | ||
color11 = base02; | ||
color12 = base04; | ||
color13 = base06; | ||
color14 = base0F; | ||
color15 = base07; | ||
settings = with config.lib.stylix.colors.withHashtag; { | ||
# Based on https://github.com/kdrag0n/base16-kitty/ | ||
active_border_color = base03; | ||
active_tab_background = base00; | ||
active_tab_foreground = base05; | ||
background = base00; | ||
cursor = base05; | ||
foreground = base05; | ||
inactive_border_color = base01; | ||
inactive_tab_background = base01; | ||
inactive_tab_foreground = base04; | ||
selection_background = base05; | ||
selection_foreground = base00; | ||
tab_bar_background = base01; | ||
url_color = base04; | ||
|
||
color0 = base00; | ||
color1 = base08; | ||
color2 = base0B; | ||
color3 = base0A; | ||
color4 = base0D; | ||
color5 = base0E; | ||
color6 = base0C; | ||
color7 = base05; | ||
color8 = base03; | ||
color9 = base09; | ||
color10 = base01; | ||
color11 = base02; | ||
color12 = base04; | ||
color13 = base06; | ||
color14 = base0F; | ||
color15 = base07; | ||
}; | ||
}; | ||
}; | ||
}]; | ||
}]; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
{ config, ... }: | ||
{ config, lib, ... }: | ||
|
||
{ | ||
services.xserver.displayManager.lightdm.background = config.stylix.image; | ||
options.stylix.targets.lightdm.enable = | ||
config.lib.stylix.mkEnableTarget "LightDM" true; | ||
|
||
config.services.xserver.displayManager.lightdm.background = | ||
lib.mkIf config.stylix.targets.lightdm.enable config.stylix.image; | ||
} |
Oops, something went wrong.