Put every variables in top of the file for easy copy to another config

This commit is contained in:
Hadi 2024-10-09 15:12:50 +02:00
parent 55c7c7068a
commit 0bd55fdc10
27 changed files with 298 additions and 301 deletions

View File

@ -16,4 +16,6 @@ feel free to contribute <3 ([CONTRIBUTING.md](CONTRIBUTING.md))
- [ ] neotest golang - [ ] neotest golang
- [ ] nvim dap - [ ] nvim dap
- [ ] Find a good md2pdf
- [ ] Update config screenshots - [ ] Update config screenshots

View File

@ -1,8 +1,12 @@
{ config, ... }: { { config, ... }:
let
username = config.var.git.username;
email = config.var.git.email;
in {
programs.git = { programs.git = {
enable = true; enable = true;
userName = config.var.git.username; userName = username;
userEmail = config.var.git.email; userEmail = email;
ignores = [ ignores = [
".cache/" ".cache/"
".DS_Store" ".DS_Store"

View File

@ -1,4 +1,4 @@
{ config, ... }: { {
programs.kitty = { programs.kitty = {
enable = true; enable = true;
keybindings = { keybindings = {
@ -21,8 +21,8 @@
disable_ligatures = "never"; disable_ligatures = "never";
url_style = "curly"; url_style = "curly";
cursor_shape = "Underline"; cursor_shape = "Underline";
cursor_underline_thickness = config.var.theme.border-size; cursor_underline_thickness = 3;
window_padding_width = config.var.theme.gaps-in; window_padding_width = 10;
}; };
}; };
} }

View File

@ -0,0 +1 @@
{ pkgs, ... }: { home.packages = with pkgs; [ wkhtmltopdf ]; }

View File

@ -78,6 +78,11 @@
action = "<cmd>lua require('flash').jump()<cr>"; action = "<cmd>lua require('flash').jump()<cr>";
options.desc = "Flash"; options.desc = "Flash";
} }
{
key = "K";
action = "<cmd>lua vim.lsp.buf.hover()<cr>";
options.desc = "LSP Hover";
}
{ {
key = "<C-h>"; key = "<C-h>";

View File

@ -1,9 +1,15 @@
{ config, ... }: { { config, ... }:
let
accent = "#${config.lib.stylix.colors.base0D}";
muted = "#${config.lib.stylix.colors.base03}";
foreground = "#${config.lib.stylix.colors.base05}";
configDir = config.var.configDirectory;
in {
programs.nixvim.highlight = { programs.nixvim.highlight = {
AlphaHeaderColor.fg = "#${config.lib.stylix.colors.base0D}"; AlphaHeaderColor.fg = accent;
AlphaTextColor.fg = "#${config.lib.stylix.colors.base05}"; AlphaTextColor.fg = foreground;
AlphaShortcutColor.fg = "#${config.lib.stylix.colors.base03}"; AlphaShortcutColor.fg = muted;
}; };
programs.nixvim.plugins.alpha = { programs.nixvim.plugins.alpha = {
@ -70,8 +76,7 @@
{ {
type = "button"; type = "button";
val = " NixOs Config"; val = " NixOs Config";
on_press.__raw = on_press.__raw = "function() vim.cmd[[Neotree ${configDir}]] end";
"function() vim.cmd[[Neotree ${config.var.configDirectory}]] end";
opts = { opts = {
shortcut = "nc"; shortcut = "nc";
position = "center"; position = "center";
@ -86,7 +91,7 @@
type = "button"; type = "button";
val = " Keybindings"; val = " Keybindings";
on_press.__raw = on_press.__raw =
"function() vim.cmd[[e ${config.var.configDirectory}/docs/KEYBINDINGS.md]] end"; "function() vim.cmd[[e ${configDir}/docs/KEYBINDINGS.md]] end";
opts = { opts = {
shortcut = "nc"; shortcut = "nc";
position = "center"; position = "center";

View File

@ -1,5 +1,11 @@
# The render-markdown.nvim plugin is a plugin that renders markdown files in a neovim in a more readable way. # The render-markdown.nvim plugin is a plugin that renders markdown files in a neovim in a more readable way.
{ pkgs, config, inputs, ... }: { { pkgs, config, inputs, ... }:
let
accent = "#${config.lib.stylix.colors.base0D}";
muted = "#${config.lib.stylix.colors.base03}";
background = "#${config.lib.stylix.colors.base00}";
in {
programs.nixvim = { programs.nixvim = {
extraFiles = { extraFiles = {
"ftplugin/markdown.lua".text = '' "ftplugin/markdown.lua".text = ''
@ -8,13 +14,13 @@
''; '';
}; };
highlight = { highlight = {
RenderMarkdownBg.bg = "#${config.lib.stylix.colors.base00}"; RenderMarkdownBg.bg = background;
RenderMarkdownH1.fg = "#${config.lib.stylix.colors.base0D}"; RenderMarkdownH1.fg = accent;
RenderMarkdownH2.fg = "#${config.lib.stylix.colors.base0D}"; RenderMarkdownH2.fg = muted;
RenderMarkdownH3.fg = "#${config.lib.stylix.colors.base05}"; RenderMarkdownH3.fg = muted;
RenderMarkdownH4.fg = "#${config.lib.stylix.colors.base05}"; RenderMarkdownH4.fg = muted;
RenderMarkdownH5.fg = "#${config.lib.stylix.colors.base03}"; RenderMarkdownH5.fg = muted;
RenderMarkdownH6.fg = "#${config.lib.stylix.colors.base03}"; RenderMarkdownH6.fg = muted;
}; };
extraPlugins = [ extraPlugins = [
(pkgs.vimUtils.buildVimPlugin { (pkgs.vimUtils.buildVimPlugin {

View File

@ -1,20 +1,25 @@
{ config, ... }: { { config, ... }:
let
accent = "#${config.lib.stylix.colors.base0D}";
background = "#${config.lib.stylix.colors.base00}";
background-alt = "#${config.lib.stylix.colors.base01}";
in {
programs.nixvim = { programs.nixvim = {
highlight = { highlight = {
TelescopePromptPrefix.fg = "#${config.lib.stylix.colors.base0D}"; TelescopePromptPrefix.fg = accent;
TelescopeSelectionCaret = { TelescopeSelectionCaret = {
fg = "#${config.lib.stylix.colors.base0D}"; fg = accent;
bg = "#${config.lib.stylix.colors.base01}"; bg = background-alt;
}; };
TelescopeSelection.bg = "#${config.lib.stylix.colors.base01}"; TelescopeSelection.bg = background-alt;
TelescopePromptTitle = { TelescopePromptTitle = {
bg = "#${config.lib.stylix.colors.base00}"; bg = background;
fg = "#${config.lib.stylix.colors.base0D}"; fg = accent;
}; };
TelescopePromptNormal.bg = "#${config.lib.stylix.colors.base00}"; TelescopePromptNormal.bg = background;
TelescopePromptBorder = { TelescopePromptBorder = {
bg = "#${config.lib.stylix.colors.base00}"; bg = background;
fg = "#${config.lib.stylix.colors.base0D}"; fg = accent;
}; };
}; };
plugins.telescope = { plugins.telescope = {

View File

@ -1,5 +1,11 @@
{ pkgs, config, ... }: { pkgs, config, ... }:
let let
accent = "#${config.lib.stylix.colors.base0D}";
background = "#${config.lib.stylix.colors.base00}";
foreground = "#${config.lib.stylix.colors.base05}";
muted = "#${config.lib.stylix.colors.base03}";
settings = '' settings = ''
{ {
"config": { "config": {
@ -7,10 +13,10 @@ let
"openLinksInNewTab": false, "openLinksInNewTab": false,
"locale": "fr-FR", "locale": "fr-FR",
"colors": { "colors": {
"primary": "#${config.lib.stylix.colors.base0D}", "primary": "${accent}",
"background": "#${config.lib.stylix.colors.base00}", "background": "${background}",
"foreground": "#${config.lib.stylix.colors.base05}", "foreground": "${foreground}",
"muted": "#${config.lib.stylix.colors.base03}" "muted": "#${muted}"
}, },
"folders": [ "folders": [
{ {
@ -117,98 +123,12 @@ in {
}; };
colors = { colors = {
# tabs = {
# odd.bg = "#${config.var.theme.colors.bg}";
# odd.fg = "#${config.var.theme.colors.fg}";
# even.bg = "#${config.var.theme.colors.bg}";
# even.fg = "#${config.var.theme.colors.fg}";
# selected = {
# odd = {
# bg = "#${config.var.theme.colors.accent}";
# fg = "#${config.var.theme.colors.accentFg}";
# };
# even = {
# bg = "#${config.var.theme.colors.accent}";
# fg = "#${config.var.theme.colors.accentFg}";
# };
# };
# indicator = {
# error = "#${config.var.theme.colors.c1}";
# start = "#${config.var.theme.colors.bgalt}";
# stop = "#${config.var.theme.colors.bgalt}";
# };
# };
#
# hints = {
# bg = "#${config.var.theme.colors.bgalt}";
# fg = "#${config.var.theme.colors.fgalt}";
# match.fg = "#${config.var.theme.colors.bg}";
# };
#
# completion = {
# category = {
# bg = "#${config.var.theme.colors.bg}";
# fg = "#${config.var.theme.colors.fg}";
# border = {
# top = "#${config.var.theme.colors.bg}";
# bottom = "#${config.var.theme.colors.bg}";
# };
# };
#
# odd.bg = "#${config.var.theme.colors.bg}";
# even.bg = "#${config.var.theme.colors.bg}";
#
# fg = [ "#FFFFFF" "#FFFFFF" "#FFFFFF" ];
#
# match.fg = "#${config.var.theme.colors.accent}";
#
# item.selected = {
# bg = "#${config.var.theme.colors.accent}";
# border.top = "#${config.var.theme.colors.accent}";
# border.bottom = "#${config.var.theme.colors.accent}";
# fg = "#${config.var.theme.colors.accentFg}";
# match.fg = "#${config.var.theme.colors.accentFg}";
# };
# };
#
# statusbar = {
# normal.bg = "#${config.var.theme.colors.bg}";
# normal.fg = "#${config.var.theme.colors.fg}";
# private.bg = "#${config.var.theme.colors.bg}";
# private.fg = "#${config.var.theme.colors.fg}";
# insert.bg = "#${config.var.theme.colors.accent}";
# insert.fg = "#${config.var.theme.colors.accentFg}";
# command = {
# bg = "#${config.var.theme.colors.bgalt}";
# fg = "#${config.var.theme.colors.fgalt}";
# private.bg = "#${config.var.theme.colors.bgalt}";
# private.fg = "#${config.var.theme.colors.fgalt}";
# };
# };
#
# messages = {
# info = {
# bg = "#${config.var.theme.colors.bgalt}";
# fg = "#${config.var.theme.colors.fgalt}";
# border = "#${config.var.theme.colors.bgalt}";
# };
#
# error = {
# bg = "#${config.var.theme.colors.c1}";
# fg = "#${config.var.theme.colors.fgalt}";
# border = "#${config.var.theme.colors.c1}";
# };
# };
#webpage.darkmode.enabled = true; # Enable dark mode for all websites (Weird on images)
webpage.preferred_color_scheme = webpage.preferred_color_scheme =
"dark"; # Enable dark mode for websites that support it "dark"; # Enable dark mode for websites that support it
}; };
statusbar.show = "in-mode"; statusbar.show = "in-mode";
# fonts = { default_family = "${config.var.theme.font}"; };
completion = { completion = {
height = "30%"; height = "30%";
open_categories = [ "history" ]; open_categories = [ "history" ];
@ -235,10 +155,7 @@ in {
remove_finished = 0; remove_finished = 0;
}; };
hints = { hints = { radius = 1; };
# border = "none";
radius = 1;
};
scrolling = { scrolling = {
bar = "never"; bar = "never";

View File

@ -1,11 +1,18 @@
{ config, ... }: { { config, ... }:
let
accent = config.lib.stylix.colors.base0D;
background = config.lib.stylix.colors.base00;
foreground = config.lib.stylix.colors.base05;
background-alt = config.lib.stylix.colors.base01;
foreground-alt = config.lib.stylix.colors.base06;
in {
home.file.".duckduckgo-colorscheme.js".text = home.file.".duckduckgo-colorscheme.js".text =
# js # js
'' ''
// Go to DuckDuckGo settings page, open the console, paste the code and hit enter. // Go to DuckDuckGo settings page, open the console, paste the code and hit enter.
// based on https://ddg.codingcodax.dev/ // based on https://ddg.codingcodax.dev/
// Cookies string for your theme // Cookies string for your theme
const cookie = '7=${config.lib.stylix.colors.base00}; j=${config.lib.stylix.colors.base00}; 9=${config.lib.stylix.colors.base05}; aa=${config.lib.stylix.colors.base06}; 8=${config.lib.stylix.colors.base05}; x=${config.lib.stylix.colors.base0D}; 21=${config.lib.stylix.colors.base01};'; const cookie = '7=${background}; j=${background}; 9=${foreground}; aa=${foreground-alt}; 8=${foreground}; x=${accent}; 21=${background-alt};';
// Converts cookie string into formatted JSON // Converts cookie string into formatted JSON
const cookieToJSON = (cookieRaw) => { const cookieToJSON = (cookieRaw) => {

View File

@ -1,14 +1,19 @@
{ config, lib, ... }: { { config, lib, ... }:
let
accent = "#" + config.lib.stylix.colors.base0D;
foreground = "#" + config.lib.stylix.colors.base05;
muted = "#" + config.lib.stylix.colors.base03;
in {
programs.fzf = { programs.fzf = {
enable = true; enable = true;
enableZshIntegration = true; enableZshIntegration = true;
colors = lib.mkForce { colors = lib.mkForce {
"fg+" = "#" + config.lib.stylix.colors.base0D; "fg+" = accent;
"bg+" = "-1"; "bg+" = "-1";
"fg" = "#" + config.lib.stylix.colors.base05; "fg" = foreground;
"bg" = "-1"; "bg" = "-1";
"prompt" = "#" + config.lib.stylix.colors.base03; "prompt" = muted;
"pointer" = "#" + config.lib.stylix.colors.base0D; "pointer" = accent;
}; };
defaultOptions = [ defaultOptions = [
"--margin=1" "--margin=1"

View File

@ -1,4 +1,8 @@
{ config, lib, ... }: { { config, lib, ... }:
let
accent = "#${config.lib.stylix.colors.base0D}";
background-alt = "#${config.lib.stylix.colors.base01}";
in {
programs.starship = { programs.starship = {
enable = true; enable = true;
settings = { settings = {
@ -10,20 +14,18 @@
"$git_status" "$git_status"
"$character" "$character"
]; ];
directory = { style = "#${config.lib.stylix.colors.base0D}"; }; directory = { style = accent; };
character = { character = {
success_symbol = "[](#${config.lib.stylix.colors.base0D})"; success_symbol = "[](${accent})";
error_symbol = "[](red)"; error_symbol = "[](red)";
vimcmd_symbol = "[](cyan)"; vimcmd_symbol = "[](cyan)";
}; };
git_branch = { git_branch = {
symbol = "[](#${config.lib.stylix.colors.base01}) "; symbol = "[](${background-alt}) ";
style = style = "fg:${accent} bg:${background-alt}";
"fg:#${config.lib.stylix.colors.base0D} bg:#${config.lib.stylix.colors.base01}"; format = "on [$symbol$branch]($style)[](${background-alt}) ";
format =
"on [$symbol$branch]($style)[](#${config.lib.stylix.colors.base01}) ";
}; };
git_status = { git_status = {

View File

@ -1,4 +1,6 @@
{ pkgs, lib, config, ... }: { { pkgs, lib, config, ... }:
let fetch = config.var.theme.fetch; # neofetch, nerdfetch, pfetch
in {
home.packages = with pkgs; [ bat ripgrep tldr sesh ]; home.packages = with pkgs; [ bat ripgrep tldr sesh ];
@ -13,11 +15,11 @@
initExtraFirst = '' initExtraFirst = ''
bindkey -e bindkey -e
${if config.var.theme.fetch == "neofetch" then ${if fetch == "neofetch" then
pkgs.neofetch + "/bin/neofetch" pkgs.neofetch + "/bin/neofetch"
else if config.var.theme.fetch == "nerdfetch" then else if fetch == "nerdfetch" then
"nerdfetch" "nerdfetch"
else if config.var.theme.fetch == "pfetch" then else if fetch == "pfetch" then
"echo; ${pkgs.pfetch}/bin/pfetch" "echo; ${pkgs.pfetch}/bin/pfetch"
else else
""} ""}
@ -63,7 +65,8 @@
wireguard-import = "nmcli connection import type wireguard file"; wireguard-import = "nmcli connection import type wireguard file";
notes = "cd ~/nextcloud/Notes && -c ':Telescope find_files' index.md"; notes =
"cd ~/nextcloud/Notes && nvim -c ':Telescope find_files' index.md";
note = "notes"; note = "notes";
# git # git

View File

@ -1,5 +1,7 @@
{ pkgs, config, lib, inputs, ... }: { pkgs, config, lib, inputs, ... }:
let spicePkgs = inputs.spicetify-nix.legacyPackages.${pkgs.system}; let
spicePkgs = inputs.spicetify-nix.legacyPackages.${pkgs.system};
accent = "#${config.lib.stylix.colors.base0D}";
in { in {
imports = [ inputs.spicetify-nix.homeManagerModules.default ]; imports = [ inputs.spicetify-nix.homeManagerModules.default ];
@ -11,9 +13,9 @@ in {
# TODO: Colors not working # TODO: Colors not working
customColorScheme = lib.mkForce { customColorScheme = lib.mkForce {
button = "#${config.lib.stylix.colors.base0D}"; button = accent;
button-active = "#${config.lib.stylix.colors.base0D}"; button-active = accent;
tab-active = "#${config.lib.stylix.colors.base0D}"; tab-active = accent;
}; };
enabledExtensions = with spicePkgs.extensions; [ enabledExtensions = with spicePkgs.extensions; [

View File

@ -8,7 +8,6 @@
#- - `night-shift-status` checks if Night-Shift is active. (0/1) #- - `night-shift-status` checks if Night-Shift is active. (0/1)
#- - `night-shift-status-icon` checks if Night-Shift is active. (icon) #- - `night-shift-status-icon` checks if Night-Shift is active. (icon)
{ pkgs, ... }: { pkgs, ... }:
let let
night-shift-on = pkgs.writeShellScriptBin "night-shift-on" '' night-shift-on = pkgs.writeShellScriptBin "night-shift-on" ''

View File

@ -7,6 +7,10 @@
#- - `nixy ...` - ... see the script for more commands. #- - `nixy ...` - ... see the script for more commands.
{ pkgs, config, inputs, ... }: { pkgs, config, inputs, ... }:
let let
configDirectory = config.var.configDirectory;
hostname = config.var.hostname;
nixy = pkgs.writeShellScriptBin "nixy" nixy = pkgs.writeShellScriptBin "nixy"
# bash # bash
'' ''
@ -24,7 +28,7 @@ let
"󰚰;Update;nixy update" "󰚰;Update;nixy update"
";Collect Garbage;nixy gc" ";Collect Garbage;nixy gc"
"󰍜;Clean Boot Menu;nixy cb" "󰍜;Clean Boot Menu;nixy cb"
"󰌌;Hyprland Keybindings;nvim ${config.var.configDirectory}/docs/KEYBINDINGS-HYPRLAND.md" "󰌌;Hyprland Keybindings;nvim ${configDirectory}/docs/KEYBINDINGS-HYPRLAND.md"
"󰋩;Wallpapers;nvim ${inputs.nixy-wallpapers}/docs/MOBILE-VIEW.md" "󰋩;Wallpapers;nvim ${inputs.nixy-wallpapers}/docs/MOBILE-VIEW.md"
) )
@ -46,13 +50,13 @@ let
[[ $1 == "" ]] && ui [[ $1 == "" ]] && ui
if [[ $1 == "rebuild" ]];then if [[ $1 == "rebuild" ]];then
sudo nixos-rebuild switch --flake ${config.var.configDirectory}#${config.var.hostname} sudo nixos-rebuild switch --flake ${configDirectory}#${hostname}
elif [[ $1 == "upgrade" ]];then elif [[ $1 == "upgrade" ]];then
sudo nixos-rebuild switch --upgrade --flake ${config.var.configDirectory}#${config.var.hostname} sudo nixos-rebuild switch --upgrade --flake ${configDirectory}#${hostname}
elif [[ $1 == "update" ]];then elif [[ $1 == "update" ]];then
cd ${config.var.configDirectory} && nix flake update cd ${configDirectory} && nix flake update
elif [[ $1 == "gc" ]];then elif [[ $1 == "gc" ]];then
cd ${config.var.configDirectory} && sudo nix-collect-garbage -d cd ${configDirectory} && sudo nix-collect-garbage -d
elif [[ $1 == "cb" ]];then elif [[ $1 == "cb" ]];then
sudo /run/current-system/bin/switch-to-configuration boot sudo /run/current-system/bin/switch-to-configuration boot
elif [[ $1 == "remote" ]];then elif [[ $1 == "remote" ]];then

View File

@ -1,4 +1,4 @@
{ config, pkgs, ... }: { { pkgs, ... }: {
qt = { qt = {
enable = true; enable = true;

View File

@ -1,6 +1,5 @@
{ config, ... }: { { config, ... }:
wayland.windowManager.hyprland.settings = { let
animations = let
animationSpeed = config.var.theme.animation-speed; animationSpeed = config.var.theme.animation-speed;
animationDuration = if animationSpeed == "slow" then animationDuration = if animationSpeed == "slow" then
@ -15,7 +14,9 @@
"6" "6"
else else
"3"; "3";
in { in {
wayland.windowManager.hyprland.settings = {
animations = {
enabled = true; enabled = true;
bezier = [ bezier = [
"linear, 0, 0, 1, 1" "linear, 0, 0, 1, 1"

View File

@ -1,4 +1,15 @@
{ pkgs, config, inputs, ... }: { { pkgs, config, inputs, ... }:
let
border-size = config.var.theme.border-size;
gaps-in = config.var.theme.gaps-in;
gaps-out = config.var.theme.gaps-out;
active-opacity = config.var.theme.active-opacity;
inactive-opacity = config.var.theme.inactive-opacity;
rounding = config.var.theme.rounding;
blur = config.var.theme.blur;
keyboardLayout = config.var.keyboardLayout;
in {
imports = [ ./animations.nix ./bindings.nix ]; imports = [ ./animations.nix ./bindings.nix ];
@ -78,21 +89,21 @@
general = { general = {
resize_on_border = true; resize_on_border = true;
gaps_in = config.var.theme.gaps-in; gaps_in = gaps-in;
gaps_out = config.var.theme.gaps-out; gaps_out = gaps-out;
border_size = config.var.theme.border-size; border_size = border-size;
border_part_of_window = true; border_part_of_window = true;
layout = "master"; layout = "master";
}; };
decoration = { decoration = {
active_opacity = config.var.theme.active-opacity; active_opacity = active-opacity;
inactive_opacity = config.var.theme.inactive-opacity; inactive_opacity = inactive-opacity;
rounding = config.var.theme.rounding; rounding = rounding;
drop_shadow = true; drop_shadow = true;
shadow_range = 20; shadow_range = 20;
shadow_render_power = 3; shadow_render_power = 3;
blur = { enabled = if config.var.theme.blur then "true" else "false"; }; blur = { enabled = if blur then "true" else "false"; };
}; };
master = { master = {
@ -113,7 +124,7 @@
}; };
input = { input = {
kb_layout = config.var.keyboardLayout; kb_layout = keyboardLayout;
kb_options = "caps:escape"; kb_options = "caps:escape";
follow_mouse = 1; follow_mouse = 1;

View File

@ -1,5 +1,8 @@
{ config, ... }: { config, ... }:
let foreground = "rgba(216, 222, 233, 0.70)"; let
foreground = "rgba(216, 222, 233, 0.70)";
imageStr = toString config.stylix.image;
font = config.stylix.fonts.serif.name;
in { in {
programs.hyprlock = { programs.hyprlock = {
enable = true; enable = true;
@ -13,7 +16,7 @@ in {
# BACKGROUND # BACKGROUND
background = { background = {
monitor = ""; monitor = "";
path = toString config.stylix.image; path = imageStr;
blur_passes = 0; blur_passes = 0;
contrast = 0.8916; contrast = 0.8916;
brightness = 0.7172; brightness = 0.7172;
@ -28,7 +31,7 @@ in {
text = ''cmd[update:1000] echo -e "$(date +"%A, %B %d")"''; text = ''cmd[update:1000] echo -e "$(date +"%A, %B %d")"'';
color = foreground; color = foreground;
font_size = 28; font_size = 28;
font_family = config.stylix.fonts.serif.name + " Bold"; font_family = font + " Bold";
position = "0, 490"; position = "0, 490";
halign = "center"; halign = "center";
valign = "center"; valign = "center";
@ -54,7 +57,7 @@ in {
dots_spacing = 0.2; # Scale of dots' absolute size, 0.0 - 1.0 dots_spacing = 0.2; # Scale of dots' absolute size, 0.0 - 1.0
dots_center = true; dots_center = true;
font_size = 18; font_size = 18;
font_family = config.stylix.fonts.serif.name + " Bold"; font_family = font + " Bold";
position = "0, -180"; position = "0, -180";
halign = "center"; halign = "center";
valign = "center"; valign = "center";
@ -73,7 +76,7 @@ in {
inner_color = "rgba(255, 255, 255, 0.1)"; inner_color = "rgba(255, 255, 255, 0.1)";
font_color = foreground; font_color = foreground;
fade_on_empty = false; fade_on_empty = false;
font_family = config.stylix.fonts.serif.name + " Bold"; font_family = font + " Bold";
placeholder_text = "<i>🔒 Enter Password</i>"; placeholder_text = "<i>🔒 Enter Password</i>";
hide_input = false; hide_input = false;
position = "0, -250"; position = "0, -250";

View File

@ -1,4 +1,25 @@
{ pkgs, config, ... }: { { pkgs, config, ... }:
let
accent = "#${config.lib.stylix.colors.base0D}";
accent-alt = "#${config.lib.stylix.colors.base03}";
background = "#${config.lib.stylix.colors.base00}";
background-alt = "#${config.lib.stylix.colors.base01}";
foreground = "#${config.lib.stylix.colors.base05}";
font = "${config.stylix.fonts.serif.name}";
fontSize = "${toString config.var.theme.bar.font-size}";
rounding = config.var.theme.rounding;
border-size = config.var.theme.border-size;
gaps-out = config.var.theme.gaps-out;
gaps-in = config.var.theme.gaps-in;
floating = config.var.theme.bar.floating;
transparent = config.var.theme.bar.transparent;
location = config.var.location;
username = config.var.username;
in {
wayland.windowManager.hyprland.settings.exec-once = wayland.windowManager.hyprland.settings.exec-once =
[ "${pkgs.hyprpanel}/bin/hyprpanel" ]; [ "${pkgs.hyprpanel}/bin/hyprpanel" ];
@ -67,50 +88,33 @@
] ]
} }
}, },
"theme.font.name": "${config.stylix.fonts.serif.name}", "theme.font.name": "${font}",
"theme.font.size": "${toString config.var.theme.bar.font-size}px", "theme.font.size": "${fontSize}px",
"theme.bar.outer_spacing": "${ "theme.bar.outer_spacing": "${
if config.var.theme.bar.floating if floating && transparent then "0" else "8"
&& config.var.theme.bar.transparent then
"0"
else
"8"
}px", }px",
"theme.bar.buttons.y_margins": "${ "theme.bar.buttons.y_margins": "${
if config.var.theme.bar.floating if floating && transparent then "0" else "8"
&& config.var.theme.bar.transparent then
"0"
else
"8"
}px", }px",
"theme.bar.buttons.spacing": "0.3em", "theme.bar.buttons.spacing": "0.3em",
"theme.bar.buttons.radius": "${ "theme.bar.buttons.radius": "${
if config.var.theme.bar.transparent then if transparent then toString rounding else toString (rounding - 8)
toString config.var.theme.rounding
else
toString (config.var.theme.rounding - 8)
}px", }px",
"theme.bar.floating": ${ "theme.bar.floating": ${if floating then "true" else "false"},
if config.var.theme.bar.floating then "true" else "false"
},
"theme.bar.buttons.padding_x": "0.8rem", "theme.bar.buttons.padding_x": "0.8rem",
"theme.bar.buttons.padding_y": "0.4rem", "theme.bar.buttons.padding_y": "0.4rem",
"theme.bar.buttons.workspaces.hover": "#${config.lib.stylix.colors.base0A}", "theme.bar.buttons.workspaces.hover": "${accent-alt}",
"theme.bar.buttons.workspaces.active": "#${config.lib.stylix.colors.base0D}", "theme.bar.buttons.workspaces.active": "${accent}",
"theme.bar.buttons.workspaces.available": "#${config.lib.stylix.colors.base00}", "theme.bar.buttons.workspaces.available": "${background}",
"theme.bar.margin_top": "${ "theme.bar.margin_top": "${toString (gaps-in * 2)}px",
toString (config.var.theme.gaps-in * 2) "theme.bar.margin_sides": "${toString gaps-out}px",
}px",
"theme.bar.margin_sides": "${toString config.var.theme.gaps-out}px",
"theme.bar.margin_bottom": "0px", "theme.bar.margin_bottom": "0px",
"theme.bar.border_radius": "${toString config.var.theme.rounding}px", "theme.bar.border_radius": "${toString rounding}px",
"bar.launcher.icon": "", "bar.launcher.icon": "",
"theme.bar.transparent": ${ "theme.bar.transparent": ${if transparent then "true" else "false"},
if config.var.theme.bar.transparent then "true" else "false"
},
"bar.workspaces.show_numbered": false, "bar.workspaces.show_numbered": false,
"bar.workspaces.workspaces": 5, "bar.workspaces.workspaces": 5,
"bar.workspaces.monitorSpecific": true, "bar.workspaces.monitorSpecific": true,
@ -121,19 +125,17 @@
"bar.bluetooth.label": false, "bar.bluetooth.label": false,
"bar.clock.format": "%a %b %d %I:%M %p", "bar.clock.format": "%a %b %d %I:%M %p",
"bar.notifications.show_total": true, "bar.notifications.show_total": true,
"theme.notification.border_radius": "${ "theme.notification.border_radius": "${toString rounding}px",
toString config.var.theme.rounding
}px",
"theme.osd.enable": true, "theme.osd.enable": true,
"theme.osd.orientation": "vertical", "theme.osd.orientation": "vertical",
"theme.osd.location": "left", "theme.osd.location": "left",
"theme.osd.radius": "${toString config.var.theme.rounding}px", "theme.osd.radius": "${toString rounding}px",
"theme.osd.margins": "0px 0px 0px 10px", "theme.osd.margins": "0px 0px 0px 10px",
"theme.osd.muted_zero": true, "theme.osd.muted_zero": true,
"menus.clock.weather.location": "${config.var.location}", "menus.clock.weather.location": "${location}",
"menus.clock.weather.key": "myapikey", "menus.clock.weather.key": "myapikey",
"menus.clock.weather.unit": "metric", "menus.clock.weather.unit": "metric",
"menus.dashboard.powermenu.avatar.image": "/home/${config.var.username}/.profile_picture.png", "menus.dashboard.powermenu.avatar.image": "/home/${username}/.profile_picture.png",
"menus.dashboard.powermenu.confirmation": false, "menus.dashboard.powermenu.confirmation": false,
"menus.dashboard.shortcuts.left.shortcut1.icon": "", "menus.dashboard.shortcuts.left.shortcut1.icon": "",
@ -170,61 +172,55 @@
"theme.bar.menus.monochrome": true, "theme.bar.menus.monochrome": true,
"wallpaper.enable": false, "wallpaper.enable": false,
"theme.bar.menus.background": "#${config.lib.stylix.colors.base00}", "theme.bar.menus.background": "${background}",
"theme.bar.menus.cards": "#${config.lib.stylix.colors.base01}", "theme.bar.menus.cards": "${background-alt}",
"theme.bar.menus.card_radius": "${ "theme.bar.menus.card_radius": "${toString rounding}px",
toString config.var.theme.rounding "theme.bar.menus.label": "${foreground}",
}px", "theme.bar.menus.text": "${foreground}",
"theme.bar.menus.label": "#${config.lib.stylix.colors.base05}", "theme.bar.menus.border.size": "${toString border-size}px",
"theme.bar.menus.text": "#${config.lib.stylix.colors.base05}", "theme.bar.menus.border.color": "${accent}",
"theme.bar.menus.border.size": "${ "theme.bar.menus.border.radius": "${toString rounding}px",
toString config.var.theme.border-size "theme.bar.menus.popover.text": "${foreground}",
}px", "theme.bar.menus.popover.background": "${background-alt}",
"theme.bar.menus.border.color": "#${config.lib.stylix.colors.base0D}", "theme.bar.menus.listitems.active": "${accent}",
"theme.bar.menus.border.radius": "${ "theme.bar.menus.icons.active": "${accent}",
toString config.var.theme.rounding "theme.bar.menus.switch.enabled":"${accent}",
}px", "theme.bar.menus.check_radio_button.active": "${accent}",
"theme.bar.menus.popover.text": "#${config.lib.stylix.colors.base05}", "theme.bar.menus.buttons.default": "${accent}",
"theme.bar.menus.popover.background": "#${config.lib.stylix.colors.base01}", "theme.bar.menus.buttons.active": "${accent}",
"theme.bar.menus.listitems.active": "#${config.lib.stylix.colors.base0D}", "theme.bar.menus.iconbuttons.active": "${accent}",
"theme.bar.menus.icons.active": "#${config.lib.stylix.colors.base0D}", "theme.bar.menus.progressbar.foreground": "${accent}",
"theme.bar.menus.switch.enabled": "#${config.lib.stylix.colors.base0D}", "theme.bar.menus.slider.primary": "${accent}",
"theme.bar.menus.check_radio_button.active": "#${config.lib.stylix.colors.base0D}", "theme.bar.menus.tooltip.background": "${background-alt}",
"theme.bar.menus.buttons.default": "#${config.lib.stylix.colors.base0D}", "theme.bar.menus.tooltip.text": "${foreground}",
"theme.bar.menus.buttons.active": "#${config.lib.stylix.colors.base0D}", "theme.bar.menus.dropdownmenu.background":"${background-alt}",
"theme.bar.menus.iconbuttons.active": "#${config.lib.stylix.colors.base0D}", "theme.bar.menus.dropdownmenu.text": "${foreground}",
"theme.bar.menus.progressbar.foreground": "#${config.lib.stylix.colors.base0D}", "theme.bar.background": "${background}",
"theme.bar.menus.slider.primary": "#${config.lib.stylix.colors.base0D}",
"theme.bar.menus.tooltip.background": "#${config.lib.stylix.colors.base01}",
"theme.bar.menus.tooltip.text": "#${config.lib.stylix.colors.base05}",
"theme.bar.menus.dropdownmenu.background": "#${config.lib.stylix.colors.base01}",
"theme.bar.menus.dropdownmenu.text": "#${config.lib.stylix.colors.base05}",
"theme.bar.background": "#${config.lib.stylix.colors.base00}",
"theme.bar.buttons.style": "default", "theme.bar.buttons.style": "default",
"theme.bar.buttons.monochrome": true, "theme.bar.buttons.monochrome": true,
"theme.bar.buttons.text": "#${config.lib.stylix.colors.base05}", "theme.bar.buttons.text": "${foreground}",
"theme.bar.buttons.background": "#${config.lib.stylix.colors.base01}", "theme.bar.buttons.background": "${background-alt}",
"theme.bar.buttons.icon": "#${config.lib.stylix.colors.base0D}", "theme.bar.buttons.icon": "${accent}",
"theme.bar.buttons.notifications.background": "#${config.lib.stylix.colors.base01}", "theme.bar.buttons.notifications.background": "${background-alt}",
"theme.bar.buttons.hover": "#${config.lib.stylix.colors.base00}", "theme.bar.buttons.hover": "${background}",
"theme.bar.buttons.notifications.hover": "#${config.lib.stylix.colors.base00}", "theme.bar.buttons.notifications.hover": "${background}",
"theme.bar.buttons.notifications.total": "#${config.lib.stylix.colors.base0D}", "theme.bar.buttons.notifications.total": "${accent}",
"theme.bar.buttons.notifications.icon": "#${config.lib.stylix.colors.base0D}", "theme.bar.buttons.notifications.icon": "${accent}",
"theme.notification.background": "#${config.lib.stylix.colors.base01}", "theme.notification.background": "${background-alt}",
"theme.notification.actions.background": "#${config.lib.stylix.colors.base0D}", "theme.notification.actions.background": "${accent}",
"theme.notification.actions.text": "#${config.lib.stylix.colors.base05}", "theme.notification.actions.text": "${foreground}",
"theme.notification.label": "#${config.lib.stylix.colors.base0D}", "theme.notification.label": "${accent}",
"theme.notification.border": "#${config.lib.stylix.colors.base01}", "theme.notification.border": "${background-alt}",
"theme.notification.text": "#${config.lib.stylix.colors.base05}", "theme.notification.text": "${foreground}",
"theme.notification.labelicon": "#${config.lib.stylix.colors.base0D}", "theme.notification.labelicon": "${accent}",
"theme.osd.bar_color": "#${config.lib.stylix.colors.base0D}", "theme.osd.bar_color": "${accent}",
"theme.osd.bar_overflow_color": "#${config.lib.stylix.colors.base0A}", "theme.osd.bar_overflow_color": "${accent-alt}",
"theme.osd.icon": "#${config.lib.stylix.colors.base00}", "theme.osd.icon": "${background}",
"theme.osd.icon_container": "#${config.lib.stylix.colors.base0D}", "theme.osd.icon_container": "${accent}",
"theme.osd.label": "#${config.lib.stylix.colors.base0D}", "theme.osd.label": "${accent}",
"theme.osd.bar_container": "#${config.lib.stylix.colors.base01}", "theme.osd.bar_container": "${background-alt}",
"theme.bar.menus.menu.media.background.color": "#${config.lib.stylix.colors.base01}", "theme.bar.menus.menu.media.background.color": "${background-alt}",
"theme.bar.menus.menu.media.card.color": "#${config.lib.stylix.colors.base01}", "theme.bar.menus.menu.media.card.color": "${background-alt}",
"theme.bar.menus.menu.media.card.tint": 90, "theme.bar.menus.menu.media.card.tint": 90,
"bar.customModules.updates.pollingInterval": 1440000, "bar.customModules.updates.pollingInterval": 1440000,
"bar.media.show_active_only": true "bar.media.show_active_only": true

View File

@ -1,4 +1,12 @@
{ config, pkgs, lib, ... }: { { config, pkgs, lib, ... }:
let
accent = "#${config.lib.stylix.colors.base0D}";
background = "#${config.lib.stylix.colors.base00}";
background-alt = "#${config.lib.stylix.colors.base01}";
foreground = "#${config.lib.stylix.colors.base05}";
font = config.stylix.fonts.serif.name;
rounding = config.var.theme.rounding;
in {
home.packages = with pkgs; [ wofi-emoji ]; home.packages = with pkgs; [ wofi-emoji ];
@ -37,15 +45,15 @@
# css # css
'' ''
* { * {
font-family: "${config.stylix.fonts.serif.name}"; font-family: "${font}";
font-weight: 500; font-weight: 500;
font-size: 13px; font-size: 13px;
} }
#window { #window {
background-color: #${config.lib.stylix.colors.base01}; background-color: ${background};
color: #${config.lib.stylix.colors.base06}; color: ${foreground};
border-radius: ${toString config.var.theme.rounding}px; border-radius: ${toString rounding}px;
} }
#outer-box { #outer-box {
@ -53,9 +61,9 @@
} }
#input { #input {
background-color: #${config.lib.stylix.colors.base00}; background-color: ${background-alt};
border: 0px solid #${config.lib.stylix.colors.base0D}; border: 0px solid ${accent};
color: #${config.lib.stylix.colors.base05}; color: ${foreground};
padding: 8px 12px; padding: 8px 12px;
} }
@ -70,11 +78,11 @@
} }
#text { #text {
color: #${config.lib.stylix.colors.base05}; color: ${foreground};
} }
#text:selected { #text:selected {
color: #${config.lib.stylix.colors.base05}; color: ${foreground};
} }
#entry { #entry {
@ -82,8 +90,8 @@
} }
#entry:selected { #entry:selected {
background-color: #${config.lib.stylix.colors.base0D}; background-color: ${accent};
color: #${config.lib.stylix.colors.base05}; color: ${foreground};
} }
#unselected {} #unselected {}
@ -92,7 +100,7 @@
#input, #input,
#entry:selected { #entry:selected {
border-radius: ${toString config.var.theme.rounding}px; border-radius: ${toString rounding}px;
} }
''; '';
}; };

View File

@ -13,6 +13,7 @@
../../home/programs/spicetify ../../home/programs/spicetify
../../home/programs/nextcloud ../../home/programs/nextcloud
../../home/programs/yazi ../../home/programs/yazi
../../home/programs/markdown
# Scripts # Scripts
../../home/scripts # All scripts ../../home/scripts # All scripts

View File

@ -1,8 +1,10 @@
{ config, ... }: { { config, ... }:
let configDir = config.var.configDirectory;
in {
system.autoUpgrade = { system.autoUpgrade = {
enable = config.var.autoUpgrade; enable = config.var.autoUpgrade;
dates = "04:00"; dates = "04:00";
flake = "${config.var.configDirectory}"; flake = "${configDir}";
flags = [ "--update-input" "nixpkgs" "--commit-lock-file" ]; flags = [ "--update-input" "nixpkgs" "--commit-lock-file" ];
allowReboot = false; allowReboot = false;
}; };

View File

@ -1,4 +1,6 @@
{ config, ... }: { { config, ... }:
let autoGarbageCollector = config.var.autoGarbageCollector;
in {
nixpkgs.config = { nixpkgs.config = {
allowUnfree = true; allowUnfree = true;
allowBroken = true; allowBroken = true;
@ -16,7 +18,7 @@
]; ];
}; };
gc = { gc = {
automatic = config.var.autoGarbageCollector; automatic = autoGarbageCollector;
persistent = true; persistent = true;
dates = "weekly"; dates = "weekly";
options = "--delete-older-than 7d"; options = "--delete-older-than 7d";

View File

@ -1,10 +1,12 @@
{ config, pkgs, ... }: { { config, pkgs, ... }:
let username = config.var.username;
in {
programs.zsh.enable = true; programs.zsh.enable = true;
users = { users = {
defaultUserShell = pkgs.zsh; defaultUserShell = pkgs.zsh;
users.${config.var.username} = { users.${username} = {
isNormalUser = true; isNormalUser = true;
description = "${config.var.username} account"; description = "${username} account";
extraGroups = [ "networkmanager" "wheel" ]; extraGroups = [ "networkmanager" "wheel" ];
}; };
}; };

View File

@ -1,16 +1,20 @@
{ pkgs, config, ... }: { { pkgs, config, ... }:
let
hostname = config.var.hostname;
keyboardLayout = config.var.keyboardLayout;
in {
networking.hostName = config.var.hostname; networking.hostName = hostname;
services = { services = {
xserver = { xserver = {
enable = true; enable = true;
xkb.layout = config.var.keyboardLayout; xkb.layout = keyboardLayout;
xkb.variant = ""; xkb.variant = "";
}; };
gnome.gnome-keyring.enable = true; gnome.gnome-keyring.enable = true;
}; };
console.keyMap = config.var.keyboardLayout; console.keyMap = keyboardLayout;
environment.variables = { environment.variables = {
XDG_DATA_HOME = "$HOME/.local/share"; XDG_DATA_HOME = "$HOME/.local/share";