Compare commits

...

10 commits

23 changed files with 547 additions and 696 deletions

View file

@ -6,6 +6,7 @@
./media ./media
./terminal ./terminal
./discord.nix
./games.nix ./games.nix
./gnome.nix ./gnome.nix
./misc.nix ./misc.nix

View file

@ -1,13 +1,15 @@
{ {
lib, lib,
config, pkgs,
osConfig,
... ...
}: let }: let
cfg = config.local.style; styleCfg = osConfig.local.style;
in { in {
config.home-manager.sharedModules = lib.mkIf cfg.enable [ config = lib.mkIf osConfig.local.profiles.desktop.enable {
{ home.packages = [pkgs.vesktop];
xdg.configFile."vesktop/themes/midnight-base16.css".text = with cfg.scheme.palette; '' xdg.configFile."vesktop/themes/midnight-base16.css".text = with styleCfg.scheme.palette;
lib.mkIf styleCfg.enable ''
/** /**
* @name Midnight-base16 * @name Midnight-base16
* @description A dark, rounded discord theme. Updated to use base16 colors. * @description A dark, rounded discord theme. Updated to use base16 colors.
@ -30,7 +32,7 @@ in {
--font: 'gg sans'; --font: 'gg sans';
/* top left corner text */ /* top left corner text */
--corner-text: '${cfg.scheme.name}'; --corner-text: '${styleCfg.scheme.name}';
/* color of status indicators and window controls */ /* color of status indicators and window controls */
--online-indicator: ${base0B}; /* change to #23a55a for default green */ --online-indicator: ${base0B}; /* change to #23a55a for default green */
@ -108,6 +110,5 @@ in {
fill: var(--text-0) !important; fill: var(--text-0) !important;
} }
''; '';
} };
];
} }

View file

@ -4,13 +4,16 @@
pkgs, pkgs,
osConfig, osConfig,
... ...
}: { }: let
styleCfg = osConfig.local.style;
in {
imports = [inputs.nvf.homeManagerModules.default]; imports = [inputs.nvf.homeManagerModules.default];
config = lib.mkIf osConfig.local.profiles.desktop.enable { config = lib.mkIf osConfig.local.profiles.desktop.enable {
programs.nvf = { programs.nvf = {
enable = true; enable = true;
settings.vim = { settings.vim = lib.mkMerge [
{
viAlias = true; viAlias = true;
vimAlias = true; vimAlias = true;
enableLuaLoader = true; enableLuaLoader = true;
@ -40,12 +43,6 @@
}; };
}; };
theme = lib.mkDefault {
enable = true;
name = "catppuccin";
style = "macchiato";
};
ui = { ui = {
noice.enable = true; noice.enable = true;
}; };
@ -222,7 +219,15 @@
filetree.neo-tree.enable = true; filetree.neo-tree.enable = true;
telescope.enable = true; telescope.enable = true;
}
(lib.mkIf styleCfg.enable {
theme = {
enable = true;
name = "base16";
base16-colors = styleCfg.scheme.palette;
}; };
})
];
}; };
programs.neovide = { programs.neovide = {

View file

@ -4,7 +4,10 @@
pkgs, pkgs,
osConfig, osConfig,
... ...
}: { }: let
inherit (builtins) toString;
styleCfg = osConfig.local.style;
in {
imports = [./binds.nix]; imports = [./binds.nix];
config = lib.mkIf osConfig.local.modules.hyprland.enable { config = lib.mkIf osConfig.local.modules.hyprland.enable {
@ -35,7 +38,8 @@
systemd.enable = false; systemd.enable = false;
settings = { settings = lib.mkMerge [
{
xwayland = { xwayland = {
force_zero_scaling = true; force_zero_scaling = true;
}; };
@ -113,7 +117,24 @@
disable_hyprland_logo = true; disable_hyprland_logo = true;
middle_click_paste = false; middle_click_paste = false;
}; };
}
(lib.mkIf styleCfg.enable {
env = [
"HYPRCURSOR_THEME,${styleCfg.cursorTheme.name}"
"HYPRCURSOR_SIZE,${toString styleCfg.cursorTheme.size}"
"XCURSOR_SIZE,${toString styleCfg.cursorTheme.size}"
];
general = {
border_size = 4;
"col.active_border" = "rgb(${lib.removePrefix "#" styleCfg.scheme.palette.base0E})";
}; };
decoration = {
rounding = 10;
blur.enabled = true;
};
})
];
}; };
}; };
} }

View file

@ -1,14 +1,114 @@
{ {
lib, lib,
lib',
inputs, inputs,
pkgs, pkgs,
osConfig, osConfig,
... ...
}: { }: let
styleCfg = osConfig.local.style;
rgbaPalette = builtins.mapAttrs (_: c: (lib'.rgba c 1)) styleCfg.scheme.palette;
in {
config = lib.mkIf osConfig.local.modules.hyprland.enable { config = lib.mkIf osConfig.local.modules.hyprland.enable {
programs.hyprlock = { programs.hyprlock = {
enable = true; enable = true;
package = inputs.hyprlock.packages.${pkgs.system}.hyprlock; package = inputs.hyprlock.packages.${pkgs.system}.hyprlock;
settings = lib.mkMerge [
{
general = {
disable_loading_bar = true;
hide_cursor = true;
};
}
(with rgbaPalette;
lib.mkIf styleCfg.enable {
background = [
{
path = "screenshot";
blur_passes = 3;
blur_size = 8;
}
];
label = [
{
monitor = "";
text = "Layout: $LAYOUT";
font_size = 25;
color = base05;
position = "30, -30";
halign = "left";
valign = "top";
}
{
monitor = "";
text = "$TIME";
font_size = 90;
color = base05;
position = "-30, 0";
halign = "right";
valign = "top";
}
{
monitor = "";
text = "cmd[update:43200000] date +\"%A, %d %B %Y\"";
font_size = 25;
color = base05;
position = "-30, -150";
halign = "right";
valign = "top";
}
];
image = {
monitor = "";
path = "${styleCfg.avatar}"; # Replace with your avatar path
size = 100;
border_color = base0D;
position = "0, 75";
halign = "center";
valign = "center";
};
input-field = [
{
monitor = "";
size = "300, 60";
outline_thickness = 4;
dots_size = 0.2;
dots_spacing = 0.2;
dots_center = true;
outer_color = base0D;
inner_color = base02;
font_color = base05;
fade_on_empty = false;
# the span elements still use #RRGGBB, so we use scheme directly
placeholder_text = "<span foreground=\"#${styleCfg.scheme.palette.base05}\"><i>󰌾 Logged in as </i><span foreground=\"#${styleCfg.scheme.palette.base0D}\">$USER</span></span>";
hide_input = false;
check_color = base0D;
fail_color = base08;
fail_text = "<i>$FAIL <b>($ATTEMPTS)</b></i>";
capslock_color = base0E;
position = "0, -47";
halign = "center";
valign = "center";
}
];
})
];
}; };
}; };
} }

View file

@ -19,7 +19,6 @@
playerctl playerctl
proton-pass proton-pass
simple-scan simple-scan
vesktop
wl-clipboard wl-clipboard
]; ];

View file

@ -3,7 +3,11 @@
config, config,
osConfig, osConfig,
... ...
}: { }: let
styleCfg = osConfig.local.style;
# because someone thought this was a great idea: https://github.com/tinted-theming/schemes/commit/61058a8d2e2bd4482b53d57a68feb56cdb991f0b
palette = builtins.mapAttrs (_: color: lib.removePrefix "#" color) styleCfg.scheme.palette;
in {
config = lib.mkIf osConfig.local.modules.hyprland.enable { config = lib.mkIf osConfig.local.modules.hyprland.enable {
programs.foot = { programs.foot = {
enable = true; enable = true;
@ -13,6 +17,37 @@
font = "monospace:size=14"; font = "monospace:size=14";
shell = "${lib.getExe config.programs.fish.package}"; shell = "${lib.getExe config.programs.fish.package}";
}; };
colors = with palette;
lib.mkIf styleCfg.enable {
background = base00;
foreground = base05;
regular0 = base00;
regular1 = base08;
regular2 = base0B;
regular3 = base0A;
regular4 = base0D;
regular5 = base0E;
regular6 = base0C;
regular7 = base05;
bright0 = base02;
bright1 = base08;
bright2 = base0B;
bright3 = base0A;
bright4 = base0D;
bright5 = base0E;
bright6 = base0C;
bright7 = base07;
"16" = base09;
"17" = base0F;
"18" = base01;
"19" = base02;
"20" = base04;
"21" = base06;
};
}; };
}; };
}; };

View file

@ -14,6 +14,7 @@
starship module cmd_duration starship module cmd_duration
end end
''; '';
styleCfg = osConfig.local.style;
in { in {
config = lib.mkIf osConfig.local.profiles.desktop.enable { config = lib.mkIf osConfig.local.profiles.desktop.enable {
programs.fish = { programs.fish = {
@ -24,7 +25,43 @@ in {
set fish_greeting # Disable greeting set fish_greeting # Disable greeting
fish_vi_key_bindings # Enable Vi mode fish_vi_key_bindings # Enable Vi mode
''
+ lib.optionalString styleCfg.enable
''
set fish_cursor_default block blink
set fish_cursor_insert line blink
set fish_cursor_replace_one underscore blink
set fish_cursor_visual block
set -x fish_color_autosuggestion brblack
set -x fish_color_cancel -r
set -x fish_color_command brgreen
set -x fish_color_comment brmagenta
set -x fish_color_cwd green
set -x fish_color_cwd_root red
set -x fish_color_end brmagenta
set -x fish_color_error brred
set -x fish_color_escape brcyan
set -x fish_color_history_current --bold
set -x fish_color_host normal
set -x fish_color_host_remote yellow
set -x fish_color_match --background=brblue
set -x fish_color_normal normal
set -x fish_color_operator cyan
set -x fish_color_param brblue
set -x fish_color_quote yellow
set -x fish_color_redirection bryellow
set -x fish_color_search_match 'bryellow' '--background=brblack'
set -x fish_color_selection 'white' '--bold' '--background=brblack'
set -x fish_color_status red
set -x fish_color_user brgreen
set -x fish_color_valid_path --underline
set -x fish_pager_color_completion normal
set -x fish_pager_color_description yellow
set -x fish_pager_color_prefix 'white' '--bold' '--underline'
set -x fish_pager_color_progress 'brwhite' '--background=cyan'
''; '';
plugins = [ plugins = [
{ {
name = "fzf"; name = "fzf";

View file

@ -1,6 +1,7 @@
{ {
imports = [ imports = [
./gammastep.nix ./gammastep.nix
./gtk.nix
./syncthing.nix ./syncthing.nix
./swaync ./swaync
./udiskie.nix ./udiskie.nix

View file

@ -1,20 +1,19 @@
{ {
lib, lib,
config, osConfig,
... ...
}: let }: let
cfg = config.local.style; styleCfg = osConfig.local.style;
inherit (cfg) scheme;
in { in {
home-manager.sharedModules = lib.mkIf cfg.enable [ config = with styleCfg;
{ lib.mkIf styleCfg.enable {
gtk = rec { gtk = rec {
enable = true; enable = true;
iconTheme = { iconTheme = {
inherit (cfg.gtk.iconTheme) name package; inherit (gtk.iconTheme) name package;
}; };
theme = { theme = {
inherit (cfg.gtk.theme) name package; inherit (gtk.theme) name package;
}; };
gtk3.extraConfig = { gtk3.extraConfig = {
@ -24,6 +23,5 @@ in {
}; };
dconf.settings."org/gnome/desktop/interface".color-scheme = "prefer-${scheme.variant}"; dconf.settings."org/gnome/desktop/interface".color-scheme = "prefer-${scheme.variant}";
} };
];
} }

View file

@ -1,14 +1,15 @@
{ {
lib, lib,
lib',
osConfig, osConfig,
... ...
}: let }: let
inherit (builtins) readFile; styleCfg = osConfig.local.style;
in { in {
config = lib.mkIf osConfig.local.modules.hyprland.enable { config = lib.mkIf osConfig.local.modules.hyprland.enable {
services.swaync = { services.swaync = lib.mkMerge [
{
enable = true; enable = true;
style = readFile ./style.css;
settings = { settings = {
positionX = "right"; positionX = "right";
positionY = "top"; positionY = "top";
@ -26,8 +27,15 @@ in {
notification-body-image-height = 100; notification-body-image-height = 100;
notification-body-image-width = 200; notification-body-image-width = 200;
}; };
}; }
# systemd.user.services.swaync.Service.Environment = "WAYLAND_DISPLAY=wayland-1";
(lib.mkIf styleCfg.enable {
style =
lib'.generateGtkColors lib styleCfg.scheme.palette
+ builtins.readFile ./style.css;
})
];
systemd.user.services.swaync.Unit.ConditionEnvironment = lib.mkForce ""; systemd.user.services.swaync.Unit.ConditionEnvironment = lib.mkForce "";
}; };
} }

View file

@ -5,6 +5,7 @@
... ...
}: let }: let
inherit (config.local.systemVars) username; inherit (config.local.systemVars) username;
lib' = import ../../../shared/lib inputs.nixpkgs.lib;
in { in {
imports = [ imports = [
inputs.home-manager.nixosModules.default inputs.home-manager.nixosModules.default
@ -16,7 +17,7 @@ in {
useGlobalPkgs = true; useGlobalPkgs = true;
useUserPackages = true; useUserPackages = true;
extraSpecialArgs = {inherit inputs;}; extraSpecialArgs = {inherit inputs lib';};
sharedModules = [../../hm]; sharedModules = [../../hm];
}; };

View file

@ -1,8 +1,8 @@
{ {
config,
inputs,
lib, lib,
inputs,
pkgs, pkgs,
config,
... ...
}: }:
# thanks https://git.jacekpoz.pl/poz/niksos/src/commit/f8d5e7ccd9c769f7c0b564f10dff419285e75248/modules/services/greetd.nix # thanks https://git.jacekpoz.pl/poz/niksos/src/commit/f8d5e7ccd9c769f7c0b564f10dff419285e75248/modules/services/greetd.nix
@ -10,6 +10,8 @@ let
inherit (lib) getExe getExe'; inherit (lib) getExe getExe';
inherit (inputs.hyprland.packages.${pkgs.stdenv.system}) hyprland; inherit (inputs.hyprland.packages.${pkgs.stdenv.system}) hyprland;
styleCfg = config.local.style;
hyprctl = getExe' hyprland "hyprctl"; hyprctl = getExe' hyprland "hyprctl";
Hyprland = getExe' hyprland "Hyprland"; Hyprland = getExe' hyprland "Hyprland";
@ -46,10 +48,26 @@ in {
}; };
}; };
programs.regreet = { programs.regreet = lib.mkMerge [
{
enable = true; enable = true;
}
(lib.mkIf styleCfg.enable {
theme = {
inherit (styleCfg.gtk.theme) name package;
}; };
cursorTheme = {
inherit (styleCfg.cursorTheme) name package;
};
iconTheme = {
inherit (styleCfg.gtk.iconTheme) name package;
};
})
];
security.pam.services = { security.pam.services = {
greetd.enableGnomeKeyring = true; greetd.enableGnomeKeyring = true;
login.enableGnomeKeyring = true; login.enableGnomeKeyring = true;

View file

@ -1,46 +0,0 @@
{
lib,
config,
...
}: let
cfg = config.local.style;
in {
config.home-manager.sharedModules = lib.mkIf cfg.enable [
{
programs.fish.interactiveShellInit = ''
set fish_cursor_default block blink
set fish_cursor_insert line blink
set fish_cursor_replace_one underscore blink
set fish_cursor_visual block
set -x fish_color_autosuggestion brblack
set -x fish_color_cancel -r
set -x fish_color_command brgreen
set -x fish_color_comment brmagenta
set -x fish_color_cwd green
set -x fish_color_cwd_root red
set -x fish_color_end brmagenta
set -x fish_color_error brred
set -x fish_color_escape brcyan
set -x fish_color_history_current --bold
set -x fish_color_host normal
set -x fish_color_host_remote yellow
set -x fish_color_match --background=brblue
set -x fish_color_normal normal
set -x fish_color_operator cyan
set -x fish_color_param brblue
set -x fish_color_quote yellow
set -x fish_color_redirection bryellow
set -x fish_color_search_match 'bryellow' '--background=brblack'
set -x fish_color_selection 'white' '--bold' '--background=brblack'
set -x fish_color_status red
set -x fish_color_user brgreen
set -x fish_color_valid_path --underline
set -x fish_pager_color_completion normal
set -x fish_pager_color_description yellow
set -x fish_pager_color_prefix 'white' '--bold' '--underline'
set -x fish_pager_color_progress 'brwhite' '--background=cyan'
'';
}
];
}

View file

@ -1,45 +0,0 @@
{
lib,
config,
...
}: let
cfg = config.local.style;
in {
config.home-manager.sharedModules = lib.mkIf cfg.enable [
{
programs.foot.settings.colors = let
# because someone thought this was a great idea: https://github.com/tinted-theming/schemes/commit/61058a8d2e2bd4482b53d57a68feb56cdb991f0b
palette = builtins.mapAttrs (_: color: lib.removePrefix "#" color) cfg.scheme.palette;
in
with palette; {
background = base00;
foreground = base05;
regular0 = base00;
regular1 = base08;
regular2 = base0B;
regular3 = base0A;
regular4 = base0D;
regular5 = base0E;
regular6 = base0C;
regular7 = base05;
bright0 = base02;
bright1 = base08;
bright2 = base0B;
bright3 = base0A;
bright4 = base0D;
bright5 = base0E;
bright6 = base0C;
bright7 = base07;
"16" = base09;
"17" = base0F;
"18" = base01;
"19" = base02;
"20" = base04;
"21" = base06;
};
}
];
}

View file

@ -1,27 +0,0 @@
{
lib,
config,
...
}: let
cfg = config.local.style;
inherit (cfg) scheme;
in {
config.home-manager.sharedModules = lib.mkIf cfg.enable [
{
programs.fuzzel.settings = {
main = {
font = "sans-serif:size=16";
};
colors = with scheme.palette; {
background = "${base01}f2";
text = "${base05}ff";
match = "${base0E}ff";
selection = "${base03}ff";
selection-text = "${base06}ff";
selection-match = "${base0E}ff";
border = "${base0E}ff";
};
};
}
];
}

View file

@ -1,27 +0,0 @@
{
lib,
config,
...
}: let
cfg = config.local.style;
in {
config.home-manager.sharedModules = lib.mkIf cfg.enable [
{
wayland.windowManager.hyprland.settings = {
env = [
"HYPRCURSOR_THEME,phinger-cursors-light"
"HYPRCURSOR_SIZE,32"
"XCURSOR_SIZE,32"
];
general = {
border_size = 4;
"col.active_border" = "rgb(${lib.removePrefix "#" cfg.scheme.palette.base0E})";
};
decoration = {
rounding = 10;
blur.enabled = true;
};
};
}
];
}

View file

@ -1,109 +0,0 @@
{
lib,
lib',
config,
...
}: let
cfg = config.local.style;
# hyprlock takes colors such as rgb[a](r, g, b [, a])
rgbaPalette = builtins.mapAttrs (_: c: (lib'.rgba c 1)) cfg.scheme.palette;
in {
config.home-manager.sharedModules = with rgbaPalette;
lib.mkIf cfg.enable [
{
programs.hyprlock = {
settings = {
background = [
{
path = "screenshot";
blur_passes = 3;
blur_size = 8;
}
];
general = {
disable_loading_bar = true;
hide_cursor = true;
};
label = [
{
monitor = "";
text = "Layout: $LAYOUT";
font_size = 25;
color = base05;
position = "30, -30";
halign = "left";
valign = "top";
}
{
monitor = "";
text = "$TIME";
font_size = 90;
color = base05;
position = "-30, 0";
halign = "right";
valign = "top";
}
{
monitor = "";
text = "cmd[update:43200000] date +\"%A, %d %B %Y\"";
font_size = 25;
color = base05;
position = "-30, -150";
halign = "right";
valign = "top";
}
];
image = {
monitor = "";
path = "${cfg.avatar}"; # Replace with your avatar path
size = 100;
border_color = base0D;
position = "0, 75";
halign = "center";
valign = "center";
};
input-field = [
{
monitor = "";
size = "300, 60";
outline_thickness = 4;
dots_size = 0.2;
dots_spacing = 0.2;
dots_center = true;
outer_color = base0D;
inner_color = base02;
font_color = base05;
fade_on_empty = false;
# the span elements still use #RRGGBB, so we use scheme directly
placeholder_text = "<span foreground=\"#${cfg.scheme.palette.base05}\"><i>󰌾 Logged in as </i><span foreground=\"#${cfg.scheme.palette.base0D}\">$USER</span></span>";
hide_input = false;
check_color = base0D;
fail_color = base08;
fail_text = "<i>$FAIL <b>($ATTEMPTS)</b></i>";
capslock_color = base0E;
position = "0, -47";
halign = "center";
valign = "center";
}
];
};
};
}
];
}

View file

@ -1,21 +0,0 @@
{
lib,
config,
...
}: let
cfg = config.local.style;
in {
config.home-manager.sharedModules = lib.mkIf cfg.enable [
{
programs.niri = {
settings = {
layout.focus-ring.active.color = cfg.scheme.palette.base0D;
cursor = {
inherit (cfg.cursorTheme) size;
theme = cfg.cursorTheme.name;
};
};
};
}
];
}

View file

@ -1,17 +0,0 @@
{
lib,
config,
...
}: let
cfg = config.local.style;
in {
config.home-manager.sharedModules = lib.mkIf cfg.enable [
{
programs.nvf.settings.vim.theme = {
enable = true;
name = "base16";
base16-colors = cfg.scheme.palette;
};
}
];
}

View file

@ -1,21 +0,0 @@
{
lib,
config,
...
}: let
cfg = config.local.style;
in {
config.programs.regreet = lib.mkIf cfg.enable {
theme = {
inherit (cfg.gtk.theme) name package;
};
cursorTheme = {
inherit (cfg.cursorTheme) name package;
};
iconTheme = {
inherit (cfg.gtk.iconTheme) name package;
};
};
}

View file

@ -1,47 +0,0 @@
{
lib,
config,
...
}: let
cfg = config.local.style;
in {
config.home-manager.sharedModules = with cfg.scheme.palette;
lib.mkIf cfg.enable [
{
programs.swaylock.settings = {
inside-color = base01;
line-color = base01;
ring-color = base05;
text-color = base05;
inside-clear-color = base0A;
line-clear-color = base0A;
ring-clear-color = base00;
text-clear-color = base00;
inside-caps-lock-color = base03;
line-caps-lock-color = base03;
ring-caps-lock-color = base00;
text-caps-lock-color = base00;
inside-ver-color = base0D;
line-ver-color = base0D;
ring-ver-color = base00;
text-ver-color = base00;
inside-wrong-color = base08;
line-wrong-color = base08;
ring-wrong-color = base00;
text-wrong-color = base00;
caps-lock-bs-hl-color = base08;
caps-lock-key-hl-color = base0D;
bs-hl-color = base08;
key-hl-color = base0D;
separator-color = "#00000000"; # transparent
layout-bg-color = "#00000050"; # semi-transparent black
};
}
];
}

View file

@ -1,14 +0,0 @@
{
config,
lib,
lib',
...
}: let
cfg = config.local.style;
in {
config.home-manager.sharedModules = lib.mkIf cfg.enable [
{
services.swaync.style = lib'.generateGtkColors lib cfg.scheme.palette;
}
];
}