refactored theme configuration to use stylix instead of individually theming each program

This commit is contained in:
pagedmov
2024-10-18 16:45:02 -04:00
parent 1e7b095bcd
commit 9d19902fbd
31 changed files with 728 additions and 4300 deletions

View File

@@ -7,13 +7,12 @@
config,
home-manager,
...
}:
let
desktop_modules = if (host == "onagesson") then
[(import ./programs/steam.nix)] else [];
in
{
}: let
desktop_modules =
if (host == "onagesson")
then [(import ./programs/steam.nix)]
else [];
in {
imports =
[(import ./programs/btop.nix)]
++ [(import ./programs/yazi.nix)]
@@ -36,5 +35,5 @@ in
++ [(import ./hyprland)]
++ [(import ./scripts)]
++ [(import ./swaync/swaync.nix)]
++ desktop_modules;
++ desktop_modules;
}

View File

@@ -1,42 +1,48 @@
{
pkgs,
inputs,
host,
host,
...
}: let
nvim = inputs.nvim.packages."x86_64-linux".default;
toilet = inputs.toilet.packages."x86_64-linux".default;
desktop_pkgs = if (host == "oganesson") then with pkgs; [
uhk-agent
zathura
handbrake
snes9x-gtk
obs-studio
] else [ ];
desktop_pkgs =
if (host == "oganesson")
then
with pkgs; [
uhk-agent
zathura
handbrake
snes9x-gtk
obs-studio
]
else [];
in {
home.packages = with pkgs; [
gtk3
sqlite
gimp
imagemagick
yt-dlp
vlc
lolcat
speedtest-cli
vesktop
qbittorrent
neovide
zsh
zsh-syntax-highlighting
zsh-history-substring-search
zsh-autosuggestions
audacity
rustup
libreoffice
gtrash
ripgrep
nvim
toilet
python3
] ++ desktop_pkgs;
home.packages = with pkgs;
[
gtk3
sqlite
gimp
imagemagick
yt-dlp
vlc
lolcat
speedtest-cli
vesktop
qbittorrent
neovide
zsh
zsh-syntax-highlighting
zsh-history-substring-search
zsh-autosuggestions
audacity
rustup
libreoffice
gtrash
ripgrep
nvim
toilet
python3
]
++ desktop_pkgs;
}

View File

@@ -5,28 +5,9 @@
}: {
fonts.fontconfig.enable = true;
home.packages = [
pkgs.nerdfonts
(pkgs.nerdfonts.override {fonts = ["JetBrainsMono" "Noto"];})
pkgs.twemoji-color-font
pkgs.noto-fonts-emoji
];
gtk = {
enable = true;
font = {
name = "JetBrainsMono Nerd Font";
size = 11;
};
iconTheme = {
name = "Papirus-Dark";
package = pkgs.catppuccin-papirus-folders.override {
flavor = "mocha";
accent = "lavender";
};
};
theme = {
name = "Dracula";
package = pkgs.dracula-theme;
};
};
}

View File

@@ -20,7 +20,5 @@ in {
hidePodcasts
shuffle # shuffle+ (special characters are sanitized out of extension names)
];
theme = spicePkgs.themes.catppuccin;
colorScheme = "mocha";
};
}

View File

@@ -6,58 +6,54 @@
programs.starship = {
enable = true;
enableZshIntegration = false;
settings =
{
add_newline = true;
right_format = "($custom)";
settings = {
add_newline = true;
right_format = "($custom)";
format = lib.concatStrings [
"($username)(bold white)($cmd_duration)($character)"
"($git_branch)($git_status)($rust)($nix-shell)"
"($directory)"
"$line_break[ > ](bold #89b4fa)"
];
format = lib.concatStrings [
"($username)(bold white)($cmd_duration)($character)"
"($git_branch)($git_status)($rust)($nix-shell)"
"($directory)"
"$line_break[ > ](bold #89b4fa)"
];
username = {
show_always = true;
style_user = "bold white";
format = "[$user]($style)";
};
directory = {
format = "\n[$path](bold cyan)[/](bold green) ";
style = "bold #b4befe";
};
username = {
show_always = true;
style_user = "bold white";
format = "[$user]($style)";
};
directory = {
format = "\n[$path](bold cyan)[/](bold green) ";
style = "bold #b4befe";
};
character = {
success_symbol = "[ -> ](bold green)";
error_symbol = "[ -> ](bold red)";
# error_symbol = "[ ](bold #89dceb)[ ✗](bold red)";
};
character = {
success_symbol = "[ -> ](bold green)";
error_symbol = "[ -> ](bold red)";
# error_symbol = "[ ](bold #89dceb)[ ✗](bold red)";
};
cmd_duration = {
format = "[ 󰔛 $duration]($style)";
disabled = false;
style = "bg:none fg:#f9e2af";
show_notifications = false;
min_time_to_notify = 60000;
};
cmd_duration = {
format = "[ 󰔛 $duration]($style)";
disabled = false;
style = "bg:none fg:#f9e2af";
show_notifications = false;
min_time_to_notify = 60000;
};
git_branch = {
format = "\non [$symbol$branch](bold purple)";
symbol = " ";
truncation_length = 15;
style = "bold purple";
};
git_branch = {
format = "\non [$symbol$branch](bold purple)";
symbol = " ";
truncation_length = 15;
style = "bold purple";
};
custom.shellver = {
command = "zsh --version";
when = ''test $SHELL = "/run/current-system/sw/bin/zsh"'';
symbol = "";
style = "bold magenta";
};
palette = "catppuccin_mocha";
}
// builtins.fromTOML (builtins.readFile "${inputs.catppuccin-starship}/themes/mocha.toml");
custom.shellver = {
command = "zsh --version";
when = ''test $SHELL = "/run/current-system/sw/bin/zsh"'';
symbol = "";
style = "bold magenta";
};
};
};
}

View File

@@ -10,6 +10,6 @@
in {
imports =
[(import ./hyprland.nix)]
++ [(import ./hyprpaper.nix)]
# ++ [(import ./hyprpaper.nix)]
++ host_config;
}

View File

@@ -1,12 +1,19 @@
{username, host, ...}: {
{
username,
host,
...
}: {
wayland.windowManager.hyprland = {
settings = {
monitor = if (host == "oganesson") then [
"DP-1, 1920x1080@144, 1920x0, 1"
"HDMI-A-1, 1920x1080, 0x0, 1"
] else [
"eDP-1, 1600x900, 0x0, 1"
];
monitor =
if (host == "oganesson")
then [
"DP-1, 1920x1080@144, 1920x0, 1"
"HDMI-A-1, 1920x1080, 0x0, 1"
]
else [
"eDP-1, 1600x900, 0x0, 1"
];
exec-once = [
"waybar &"
@@ -19,19 +26,22 @@
"aplay /home/${username}/sound/sys/login.wav &"
];
workspace = if (host == "oganesson") then [
"1,persistent=true,monitor:HDMI-A-1"
"2,persistent=true,monitor:HDMI-A-1"
"3,persistent=true,monitor:HDMI-A-1"
"4,persistent=true,monitor:DP-1"
"5,persistent=true,monitor:DP-1"
"6,persistent=true,monitor:DP-1"
] else [
"1,persistent=true,monitor:eDP-1"
"2,persistent=true,monitor:eDP-1"
"3,persistent=true,monitor:eDP-1"
"4,persistent=true,monitor:eDP-1"
];
workspace =
if (host == "oganesson")
then [
"1,persistent=true,monitor:HDMI-A-1"
"2,persistent=true,monitor:HDMI-A-1"
"3,persistent=true,monitor:HDMI-A-1"
"4,persistent=true,monitor:DP-1"
"5,persistent=true,monitor:DP-1"
"6,persistent=true,monitor:DP-1"
]
else [
"1,persistent=true,monitor:eDP-1"
"2,persistent=true,monitor:eDP-1"
"3,persistent=true,monitor:eDP-1"
"4,persistent=true,monitor:eDP-1"
];
input = {
kb_layout = "us";
@@ -47,8 +57,6 @@
gaps_in = 4;
gaps_out = 8;
border_size = 2;
"col.active_border" = "rgb(cba6f7) rgb(94e2d5) 45deg";
"col.inactive_border" = "0x00000000";
border_part_of_window = false;
no_border_on_floating = false;
};
@@ -104,7 +112,6 @@
shadow_offset = "0 2";
shadow_range = 20;
shadow_render_power = 3;
"col.shadow" = "rgba(00000055)";
};
animations = {

View File

@@ -1,26 +0,0 @@
{
host,
username,
self,
...
}: {
services.hyprpaper = {
enable = true;
settings = {
ipc = "on";
splash = false;
splash_offset = 2.0;
preload = ["${self}/media/wallpapers/catppuccin/cat-leaves.png"];
wallpaper =
if (host == "oganesson")
then [
"DP-1,${self}/media/wallpapers/catppuccin/cat-leaves.png"
"HDMI-A-1,${self}/media/wallpapers/catppuccin/cat-leaves.png"
]
else [
"eDP-1,${self}/media/wallpapers/catppuccin/cat-leaves.png"
];
};
};
}

View File

@@ -3,7 +3,6 @@
enable = true;
config = {
pager = "less -FR";
theme = "Dracula";
};
};
}

View File

@@ -3,8 +3,6 @@
enable = true;
settings = {
color_theme = "tokyo-night";
theme_background = false;
update_ms = 500;
vim_keys = true;
proc_tree = true;

View File

@@ -6,11 +6,4 @@
programs.cava = {
enable = true;
};
# https://github.com/catppuccin/cava
home.file.".config/cava/config".text =
''
# custom cava config
''
+ builtins.readFile "${inputs.catppuccin-cava}/themes/mocha.cava";
}

View File

@@ -3,27 +3,16 @@
enable = true;
settings = {
main = {
font = "JetBrainsMono Nerd Font:weight=bold:size=14";
line-height = 25;
fields = "name,generic,comment,categories,filename,keywords";
terminal = "kitty";
prompt = "' '";
icon-theme = "Papirus-Dark";
layer = "top";
lines = 10;
width = 35;
horizontal-pad = 25;
inner-pad = 5;
};
colors = {
background = "1e1e2ecc";
text = "cdd6f4ff";
match = "f38ba8ff";
selection = "b4befeaa";
selection-match = "f38ba8ff";
selection-text = "cdd6f4ff";
border = "b4befeff";
};
border = {
radius = 15;
width = 3;

View File

@@ -2,16 +2,9 @@
programs.kitty = {
enable = true;
themeFile = "Catppuccin-Mocha";
font = {
name = "JetBrainsMono Nerd Font";
size = 13;
};
settings = {
confirm_os_window_close = 0;
background_opacity = "0.60";
window_padding_width = 10;
scrollback_lines = 10000;
enable_audio_bell = false;
@@ -24,10 +17,6 @@
inactive_tab_font_style = "normal";
tab_bar_style = "powerline";
tab_powerline_style = "round";
active_tab_foreground = "#1e1e2e";
active_tab_background = "#cba6f7";
inactive_tab_foreground = "#bac2de";
inactive_tab_background = "#313244";
};
keybindings = {

File diff suppressed because it is too large Load Diff

View File

@@ -4,14 +4,15 @@
pkgs,
}:
pkgs.writeShellScriptBin "rebuild" ''
#!/run/current-system/sw/bin/bash
#!/run/current-system/sw/bin/bash
scheck && runbg aplay ${self}/media/sound/nixswitch-start.wav
set -e
sudo nixos-rebuild switch --flake "$HOME/.sysflake#${host}"
if [ $? -eq 0 ]; then
scheck && runbg aplay ${self}/media/sound/update.wav
else
scheck && runbg aplay ${self}/media/sound/error.wav
fi
scheck && runbg aplay ${self}/media/sound/nixswitch-start.wav
set -e
nh os switch -H ${host} $HOME/.sysflake
sudo nixos-rebuild switch --flake "$HOME/.sysflake#${host}"
if [ $? -eq 0 ]; then
scheck && runbg aplay ${self}/media/sound/update.wav
else
scheck && runbg aplay ${self}/media/sound/error.wav
fi
''

View File

@@ -6,22 +6,22 @@
username,
host,
...
}:
let
desktop_modules = if (host == "oganesson") then [
./software/virtualization.nix
] else [ ];
in
{
}: let
desktop_modules =
if (host == "oganesson")
then [
./software/virtualization.nix
]
else [];
in {
imports =
[(import ./hardware/bootloader.nix)]
++ [(import ./hardware/network.nix)]
++ [(import ./software/fonts.nix)]
++ [(import ./software/sddm.nix)]
++ [(import ./software/packages.nix)]
++ [(import ./software/programs.nix)]
++ [(import ./software/services.nix)]
++ [(import ./software/users.nix)]
++ [(import ./environment/sddm.nix)]
++ [(import ./environment/users.nix)]
++ [(import ./environment/stylix.nix)]
++ desktop_modules;
}

View File

@@ -0,0 +1,12 @@
{
pkgs,
self,
config,
...
}: {
services.displayManager.sddm = {
enable = true;
wayland.enable = true;
package = pkgs.kdePackages.sddm;
};
}

View File

@@ -0,0 +1,36 @@
{
pkgs,
self,
...
}: {
stylix = {
enable = true;
base16Scheme = "${pkgs.base16-schemes}/share/themes/material-darker.yaml";
image = ../../../media/wallpapers/catppuccin/cat-leaves.png;
polarity = "dark";
autoEnable = true;
targets = {
console.enable = true;
feh.enable = true;
grub.enable = true;
};
cursor = {
package = pkgs.bibata-cursors;
name = "Bibata-Modern-Ice";
};
fonts = {
monospace = {
package = pkgs.nerdfonts.override {fonts = ["JetBrainsMono"];};
name = "JetBrainsMono Nerd Font Mono";
};
sansSerif = {
package = pkgs.dejavu_fonts;
name = "DejaVu Sans";
};
serif = {
package = pkgs.dejavu_fonts;
name = "DejaVu Serif";
};
};
};
}

View File

@@ -0,0 +1,53 @@
{
config,
inputs,
pkgs,
username,
self,
host,
...
}: let
nur = config.nur;
in {
imports = [inputs.home-manager.nixosModules.home-manager];
home-manager = {
useUserPackages = true;
useGlobalPkgs = true;
backupFileExtension = "backup";
extraSpecialArgs = {inherit self inputs host username nur;};
users.${username} = {
dconf.settings = {
"org/virt-manager/virt-manager/connections" = {
autoconnect = ["qemu:///system"];
uris = ["qemu:///system"];
};
};
programs.home-manager.enable = true;
imports = [
./../../home
];
home = {
username = "${username}";
homeDirectory = "/home/${username}";
stateVersion = "24.05";
};
};
};
users = {
groups.persist = {};
users = {
root.initialPassword = "1234";
${username} = {
isNormalUser = true;
initialPassword = "1234";
shell = pkgs.zsh;
extraGroups = ["wheel" "persist" "libvirtd"];
};
};
};
security.sudo.extraConfig = ''
${username} ALL=(ALL) NOPASSWD: /run/current-system/sw/bin/nixos-rebuild
'';
nix.settings.allowed-users = ["${username}"];
}

View File

@@ -1,7 +0,0 @@
{pkgs, ...}: {
fonts.packages = with pkgs; [
times-newer-roman
nerdfonts
jetbrains-mono
];
}

View File

@@ -38,13 +38,13 @@
mullvad
mesa
neofetch
nh
nh
nix-index
nix-output-monitor
nix-output-monitor
nix-prefetch-scripts
nixos-option
nix-search-cli
nvd
nvd
openssl
p7zip
jq
@@ -56,7 +56,6 @@
protonmail-bridge
protontricks
pyright
quintom-cursor-theme
socat
sox
stress
@@ -74,6 +73,6 @@
xpad
libnotify
file
libvirt-glib
libvirt-glib
];
}

View File

@@ -1,23 +0,0 @@
{
pkgs,
self,
config,
...
}: {
environment.systemPackages = [
(
pkgs.catppuccin-sddm.override {
flavor = "mocha";
font = "JetBrains Mono";
fontSize = "9";
background = "${self}/media/wallpapers/catppuccin/nixos-catppuccin.png";
}
)
];
services.displayManager.sddm = {
enable = true;
wayland.enable = true;
theme = "catppuccin-mocha";
package = pkgs.kdePackages.sddm;
};
}

View File

@@ -1,57 +0,0 @@
{
config,
inputs,
pkgs,
username,
self,
host,
...
}: let
nur = config.nur;
in {
imports = [inputs.home-manager.nixosModules.home-manager];
home-manager = {
useUserPackages = true;
useGlobalPkgs = true;
backupFileExtension = "backup";
extraSpecialArgs = {inherit self inputs host username nur;};
users.${username} = {
dconf.settings = {
"org/virt-manager/virt-manager/connections" = {
autoconnect = ["qemu:///system"];
uris = ["qemu:///system"];
};
};
programs.home-manager.enable = true;
imports = [
./../../home
];
home = {
username = "${username}";
homeDirectory = "/home/${username}";
stateVersion = "24.05";
pointerCursor = {
name = "Quintom_Ink";
size = 36;
package = pkgs.quintom-cursor-theme;
};
};
};
};
users = {
groups.persist = {};
users = {
root.initialPassword = "1234";
${username} = {
isNormalUser = true;
initialPassword = "1234";
shell = pkgs.zsh;
extraGroups = ["wheel" "persist" "libvirtd"];
};
};
};
security.sudo.extraConfig = ''
${username} ALL=(ALL) NOPASSWD: /run/current-system/sw/bin/nixos-rebuild
'';
nix.settings.allowed-users = ["${username}"];
}

View File

@@ -1,6 +1,4 @@
{ username, ... }:
{
virtualisation.libvirtd.enable = true;
programs.virt-manager.enable = true;
{username, ...}: {
virtualisation.libvirtd.enable = true;
programs.virt-manager.enable = true;
}