refactor!: restructure and document configuration

This commit is contained in:
Alexandre Cavalheiro S. Tiago da Silva 2025-03-06 05:30:47 -03:00
parent 4a02e072a7
commit f87f9995be
Signed by: wizardlink
GPG key ID: A5767B54367CFBDF
126 changed files with 957 additions and 590 deletions

View file

@ -0,0 +1,136 @@
{ pkgs, clipboard-sync, ... }:
{
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;
home.file = {
# My utility scripts
".local/share/scripts" = {
source = ./scripts;
recursive = true;
};
# Configuration for mako, a notification daemon.
".config/mako".source = ./dotfiles/mako;
# Configure pipewire for microphone noise supression.
".config/pipewire/pipewire.conf.d/99-input-denoising.conf".text = ''
context.modules = [
{ name = libpipewire-module-filter-chain
args = {
node.description = "Noise Canceling source"
media.name = "Noise Canceling source"
filter.graph = {
nodes = [
{
type = ladspa
name = rnnoise
plugin = ${pkgs.rnnoise-plugin}/lib/ladspa/librnnoise_ladspa.so
label = noise_suppressor_mono
control = {
"VAD Threshold (%)" = 60.0
"VAD Grace Period (ms)" = 175
"Retroactive VAD Grace (ms)" = 50
}
}
]
}
capture.props = {
node.name = "capture.rnnoise_source"
node.passive = true
audio.rate = 48000
}
playback.props = {
node.name = "rnnoise_source"
media.class = Audio/Source
audio.rate = 48000
}
}
}
]
'';
};
# Configure XDG
xdg.mimeApps.defaultApplications = {
"inode/directory" = [ "thunar.desktop" ];
"text/html" = [ "firefox.desktop" ];
"video/mp4" = [ "vlc.desktop" ];
"video/x-matroska" = [ "vlc.desktop" ];
"x-scheme-handler/about" = [ "firefox.desktop" ];
"x-scheme-handler/http" = [ "firefox.desktop" ];
"x-scheme-handler/https" = [ "firefox.desktop" ];
"x-scheme-handler/unknown" = [ "firefox.desktop" ];
};
home.packages = with pkgs; [
# # You can also create simple shell scripts directly inside your
# # configuration. For example, this adds a command 'my-hello' to your
# # environment:
# (pkgs.writeShellScriptBin "my-hello" ''
# echo "Hello, ${config.home.username}!"
# '')
## Tools
# Utilities
fastfetch
firefox
pavucontrol
protonvpn-gui
qbittorrent
qdirstat
speedcrunch
vlc
yt-dlp
zathura
# Personal utilities
anki
ledger
(vesktop.override {
# FIXME: Need to pin until https://github.com/NixOS/nixpkgs/issues/380429 gets resolved.
electron = electron_33;
})
# Editing
libreoffice
# Creative work
aseprite
blender
krita
lmms
orca-slicer
shotcut
vcv-rack
vhs
## Entertainment
jellyfin-media-player
## Libraries
libsForQt5.kdegraphics-thumbnailers
libsForQt5.kio-extras
rnnoise-plugin
## Development
beekeeper-studio
godot_4
hoppscotch
lazygit
## Desktop environment
clipboard-sync.packages.${pkgs.stdenv.hostPlatform.system}.default
cliphist
grim
libsForQt5.ark
loupe
mako
slurp
swww
# Mail client
thunderbird
];
}

View file

@ -0,0 +1,10 @@
{ ... }:
{
imports = [
./common.nix
./dotfiles
./gaming.nix
./theming.nix
];
}

View file

@ -0,0 +1,37 @@
{ pkgs, ... }:
let
catppuccin-theme = pkgs.fetchFromGitHub {
owner = "catppuccin";
repo = "alacritty";
rev = "94800165c13998b600a9da9d29c330de9f28618e";
hash = "sha256-Pi1Hicv3wPALGgqurdTzXEzJNx7vVh+8B9tlqhRpR2Y=";
};
in
{
programs.alacritty = {
enable = true;
settings = {
general.import = [ "${catppuccin-theme}/catppuccin-frappe.toml" ];
font = {
normal = {
family = "BlexMono Nerd Font";
style = "Regular";
};
size = 12;
};
window = {
decorations = "None";
opacity = 0.8;
padding = {
x = 18;
y = 18;
};
};
};
};
}

View file

@ -0,0 +1,16 @@
{ ... }:
{
imports = [
./alacritty.nix
./direnv
./fish
./git.nix
./mangohud.nix
./obs-studio.nix
./rofi
./spotify
./tmux
./waybar.nix
];
}

View file

@ -0,0 +1,8 @@
{ ... }:
{
programs.direnv = {
enable = true;
nix-direnv.enable = true;
};
}

View file

@ -0,0 +1,30 @@
# name: 'Catppuccin frappe'
# url: 'https://github.com/catppuccin/fish'
# preferred_background: 303446
fish_color_normal c6d0f5
fish_color_command 8caaee
fish_color_param eebebe
fish_color_keyword e78284
fish_color_quote a6d189
fish_color_redirection f4b8e4
fish_color_end ef9f76
fish_color_comment 838ba7
fish_color_error e78284
fish_color_gray 737994
fish_color_selection --background=414559
fish_color_search_match --background=414559
fish_color_option a6d189
fish_color_operator f4b8e4
fish_color_escape ea999c
fish_color_autosuggestion 737994
fish_color_cancel e78284
fish_color_cwd e5c890
fish_color_user 81c8be
fish_color_host 8caaee
fish_color_host_remote a6d189
fish_color_status e78284
fish_pager_color_progress 737994
fish_pager_color_prefix f4b8e4
fish_pager_color_completion c6d0f5
fish_pager_color_description 737994

View file

@ -0,0 +1,76 @@
{ ... }:
{
home.file = {
# Cattpuccin theme for fish shell.
".config/fish/themes/Catppuccin-Frappe.theme".source = ./Catppuccin-Frappe.theme;
};
programs.fish = {
enable = true;
interactiveShellInit = ''
## Set vim mode
set -g fish_key_bindings fish_vi_key_bindings
# Configure FZF
set -x FZF_DEFAULT_OPTS '--color=fg:#f8f8f2,hl:#bd93f9 --color=fg+:#f8f8f2,bg+:#44475a,hl+:#bd93f9 --color=info:#ffb86c,prompt:#50fa7b,pointer:#ff79c6 --color=marker:#ff79c6,spinner:#ffb86c,header:#6272a4 --layout=reverse --height 50%'
# Remove welcome message
set -x fish_greeting ""
## Add directories to $PATH
fish_add_path /home/wizardlink/.local/share/scripts \
/home/wizardlink/.config/emacs/bin \
/home/wizardlink/.nimble/bin \
/home/wizardlink/.cargo/bin \
/home/wizardlink/.local/bin \
/lib/flatpak/exports/bin
zoxide init --cmd cd fish | source
'';
shellAbbrs = {
z = "zoxide";
pkg_expr = {
position = "anywhere";
expansion = "--expr 'with import <nixpkgs> { % }; '";
};
impure_cmd = {
position = "command";
expansion = "NIXPKGS_ALLOW_UNFREE=1 nix % --impure";
};
};
shellAliases = {
del = "trash_file";
dev = "nix develop -c fish";
doom = "~/.config/emacs/bin/doom";
repl = "NIXPKGS_ALLOW_UNFREE=1 nix repl --impure --extra-experimental-features 'flakes' nixpkgs#legacyPackages.x86_64-linux";
};
functions = {
fish_prompt.body = ''
set_color CC241D
echo '&' (set_color normal)
'';
fzf_edit.body = ''
fzf --multi --bind 'enter:become(nvim {+})'
'';
trash_file.body = ''
mv $argv ~/.local/share/Trash
'';
ya.body = ''
set tmp (mktemp -t "yazi-cwd.XXXXX")
yazi $argv --cwd-file="$tmp"
if set cwd (cat -- "$tmp"); and [ -n "$cwd" ]; and [ "$cwd" != "$PWD" ]
cd -- "$cwd"
end
rm -f -- "$tmp"
'';
};
};
}

View file

@ -0,0 +1,76 @@
[general]
; The reaper thread will check every 5 seconds for exited clients, for config file changes, and for the CPU/iGPU power balance
reaper_freq=5
; The desired governor is used when entering GameMode instead of "performance"
desiredgov=performance
; The default governor is used when leaving GameMode instead of restoring the original value
;defaultgov=powersave
; GameMode can change the scheduler policy to SCHED_ISO on kernels which support it (currently
; not supported by upstream kernels). Can be set to "auto", "on" or "off". "auto" will enable
; with 4 or more CPU cores. "on" will always enable. Defaults to "off".
softrealtime=off
; GameMode can renice game processes. You can put any value between 0 and 20 here, the value
; will be negated and applied as a nice value (0 means no change). Defaults to 0.
renice=0
; By default, GameMode adjusts the iopriority of clients to BE/0, you can put any value
; between 0 and 7 here (with 0 being highest priority), or one of the special values
; "off" (to disable) or "reset" (to restore Linux default behavior based on CPU priority),
; currently, only the best-effort class is supported thus you cannot set it here
ioprio=reset
; Sets whether gamemode will inhibit the screensaver when active
; Defaults to 1
inhibit_screensaver=0
[filter]
; If "whitelist" entry has a value(s)
; gamemode will reject anything not in the whitelist
;whitelist=RiseOfTheTombRaider
; Gamemode will always reject anything in the blacklist
;blacklist=HalfLife3
; glxgears
[gpu]
; Here Be Dragons!
; Warning: Use these settings at your own risk
; Any damage to hardware incurred due to this feature is your responsibility and yours alone
; It is also highly recommended you try these settings out first manually to find the sweet spots
; Setting this to the keyphrase "accept-responsibility" will allow gamemode to apply GPU optimisations such as overclocks
;apply_gpu_optimisations=accept-responsibility
; The DRM device number on the system (usually 0), ie. the number in /sys/class/drm/card0/
;gpu_device=1
; AMD specific settings
; Requires a relatively up to date AMDGPU kernel module
; See: https://dri.freedesktop.org/docs/drm/gpu/amdgpu.html#gpu-power-thermal-controls-and-monitoring
; It is also highly recommended you use lm-sensors (or other available tools) to verify card temperatures
; This corresponds to power_dpm_force_performance_level, "manual" is not supported for now
;amd_performance_level=auto
[supervisor]
; This section controls the new gamemode functions gamemode_request_start_for and gamemode_request_end_for
; The whilelist and blacklist control which supervisor programs are allowed to make the above requests
;supervisor_whitelist=
;supervisor_blacklist=
; In case you want to allow a supervisor to take full control of gamemode, this option can be set
; This will only allow gamemode clients to be registered by using the above functions by a supervisor client
;require_supervisor=0
[custom]
; Custom scripts (executed using the shell) when gamemode starts and ends
;start=notify-send "GameMode started"
; /home/me/bin/stop_ethmining.sh
;end=notify-send "GameMode ended"
; /home/me/bin/start_ethmining.sh
; Timeout for scripts (seconds). Scripts will be killed if they do not complete within this time.
;script_timeout=10

View file

@ -0,0 +1,91 @@
{ ... }:
{
# Enable GIT.
programs.git = {
enable = true;
aliases = {
# List aliases
aliases = "config --get-regexp alias";
# List all the contributors with commit amount
contributors = "shortlog --summary --numbered";
# Output verbose info about branches and tags
branches = "branch -avv";
# List all tags
tags = "tag -l";
# Pretty logs
plog = "log --graph --decorate --all";
# Pretty grep
gcommit = "log --graph --decorate --grep";
};
extraConfig = {
core = {
# Set the editor to be used by GIT
editor = "nvim";
# Custom .gitignore
excludesfile = "~/.gitignore";
# Treat trailing whitespaces and spaces before tabs as an error
whitespace = "space-before-tab,-indent-with-non-tab,trailing-space";
};
color = {
# Use colors in GIT commmands.
ui = "auto";
};
commit = {
# https://help.github.com/articles/signing-commits-using-gpg/
gpgsign = true;
};
tag = {
gpgsign = true;
};
difftool = {
prompt = true;
};
mergetool = {
# https://www.git-scm.com/docs/git-mergetool#Documentation/git-mergetool.txt---no-prompt
prompt = false;
};
merge = {
# https://git-scm.com/docs/git-merge#_how_conflicts_are_presented
conflictstyle = "diff3";
};
push = {
# https://stackoverflow.com/questions/21839651/git-what-is-the-difference-between-push-default-matching-and-simple
default = "simple";
# git-push pushes relevant annotated tags when pushing branches out
followTags = true;
};
user = {
name = "Alexandre Cavalheiro S. Tiago da Silva";
email = "contact@thewizard.link";
signingkey = "A1D3A2B4E14BD7C0445BB749A5767B54367CFBDF";
};
pull = {
ff = "only";
};
init = {
defaultBranch = "main";
};
};
};
}

View file

@ -0,0 +1,32 @@
anchor=bottom-right
background-color=#282a36
border-color=#282a36
border-radius=20
border-size=2
default-timeout=10000
format=<span font="IBM Plex Serif weight=325 Italic" size="12288">%s</span>\n<span font="IBM Plex Serif weight=325" size="12288">%b</span>
group-by=summary
height=125
icon-location=right
layer=top
margin=0,20,15
markup=1
max-icon-size=48
padding=10,5,10
text-color=#44475a
width=300
[grouped]
format=<span font="IBM Plex Serif weight=325 Italic" size="12288">%s</span>\n<span font="IBM Plex Serif weight=325" size="12288">%b</span>
[mode=do-not-disturb]
invisible=1
[urgency=low]
border-color=#282a36
[urgency=normal]
border-color=#f1fa8c
[urgency=high]
border-color=#ff5555

View file

@ -0,0 +1,101 @@
{ ... }:
{
programs.mangohud = {
enable = true;
settings = {
# Limitations
fps_limit = 165;
#vsync = 1; # Disables VSync
#gl_vsync = 0; # - in OpenGL applications
# GPU Statistics
gpu_core_clock = true;
gpu_fan = true;
gpu_junction_temp = true;
gpu_load_change = true;
gpu_load_color = [
"39F900"
"FDFD09"
"B22222"
];
gpu_load_value = [
60
90
];
gpu_mem_clock = true;
gpu_mem_temp = true;
gpu_power = true;
gpu_stats = true;
gpu_temp = true;
gpu_voltage = true;
# CPU Statistics
cpu_load_change = true;
cpu_load_color = [
"39F900"
"FDFD09"
"B22222"
];
cpu_load_value = [
60
90
];
cpu_mhz = true;
cpu_power = true;
cpu_stats = true;
cpu_temp = true;
# IO Statistics
io_read = true;
io_stats = true;
io_write = true;
# RAM Statistics
ram = true;
swap = true;
vram = true;
# FPS Statistics
fps = true;
fps_color_change = true;
fps_value = [
60
90
];
fps_color = [
"B22222"
"FDFD09"
"39F900"
];
frametime = true;
frame_timing = true; # Display graphs
histogram = true; # ^
# Show whether gamemode is enabled for the application.
gamemode = true;
# Make so MangoHud starts hidden.
no_display = true;
# Show whether the GPU is throttling.
throttling_status = true;
# Show wine/proton version.
wine = true;
# Show the vulkan driver in-use.
vulkan_driver = true;
# Display the process' memory usage.
procmem = true;
# Show the application's architecture.
arch = true;
# Where to output log files.
output_folder = /home/wizardlink/.config/MangoHud;
};
};
}

View file

@ -0,0 +1,12 @@
{ pkgs, ... }:
{
programs.obs-studio = {
enable = true;
plugins = with pkgs.obs-studio-plugins; [
input-overlay
obs-backgroundremoval
obs-pipewire-audio-capture
];
};
}

View file

@ -0,0 +1,4 @@
[ColorScheme]
active_colors=#ffc6d0f5, #ff292c3c, #ffa5adce, #ff949cbb, #ff51576d, #ff737994, #ffc6d0f5, #ffc6d0f5, #ffc6d0f5, #ff303446, #ff292c3c, #ff838ba7, #ff8caaee, #ff303446, #ff8caaee, #ffe78284, #ff303446, #ffc6d0f5, #ff232634, #ffc6d0f5, #80838ba7
disabled_colors=#ffa5adce, #ff292c3c, #ffa5adce, #ff949cbb, #ff51576d, #ff737994, #ffa5adce, #ffa5adce, #ffa5adce, #ff303446, #ff292c3c, #ff838ba7, #ff626880, #ffb5bfe2, #ff8caaee, #ffe78284, #ff303446, #ffc6d0f5, #ff232634, #ffc6d0f5, #80838ba7
inactive_colors=#ffc6d0f5, #ff292c3c, #ffa5adce, #ff949cbb, #ff51576d, #ff737994, #ffc6d0f5, #ffc6d0f5, #ffc6d0f5, #ff303446, #ff292c3c, #ff838ba7, #ff414559, #ffa5adcb, #ff8caaee, #ffe78284, #ff303446, #ffc6d0f5, #ff232634, #ffc6d0f5, #80838ba7

View file

@ -0,0 +1,4 @@
[ColorScheme]
active_colors=#ff4c4f69, #ffe6e9ef, #ff6c6f85, #ff7c7f93, #ffbcc0cc, #ff9ca0b0, #ff4c4f69, #ff4c4f69, #ff4c4f69, #ffeff1f5, #ffe6e9ef, #ff8c8fa1, #ff1e66f5, #ffeff1f5, #ff7287fd, #ffe64553, #ffeff1f5, #ff4c4f69, #ffdce0e8, #ff4c4f69, #808c8fa1
disabled_colors=#ff6c6f85, #ffe6e9ef, #ff6c6f85, #ff7c7f93, #ffbcc0cc, #ff9ca0b0, #ff6c6f85, #ff6c6f85, #ff6c6f85, #ffeff1f5, #ffe6e9ef, #ff8c8fa1, #ff9ca0b0, #ff5c5f77, #ff7287fd, #ffe64553, #ffeff1f5, #ff4c4f69, #ffdce0e8, #ff4c4f69, #808c8fa1
inactive_colors=#ff4c4f69, #ffe6e9ef, #ff6c6f85, #ff7c7f93, #ffbcc0cc, #ff9ca0b0, #ff4c4f69, #ff4c4f69, #ff4c4f69, #ffeff1f5, #ffe6e9ef, #ff8c8fa1, #ffccd0da, #ff6c6f85, #ff7287fd, #ffe64553, #ffeff1f5, #ff4c4f69, #ffdce0e8, #ff4c4f69, #808c8fa1

View file

@ -0,0 +1,4 @@
[ColorScheme]
active_colors=#ffcad3f5, #ff1e2030, #ffa5adcb, #ff939ab7, #ff494d64, #ff6e738d, #ffcad3f5, #ffcad3f5, #ffcad3f5, #ff24273a, #ff1e2030, #ff8087a2, #ff8aadf4, #ff24273a, #ff8aadf4, #ffed8796, #ff24273a, #ffcad3f5, #ff181926, #ffcad3f5, #808087a2
disabled_colors=#ffa5adcb, #ff1e2030, #ffa5adcb, #ff939ab7, #ff494d64, #ff6e738d, #ffa5adcb, #ffa5adcb, #ffa5adcb, #ff24273a, #ff1e2030, #ff8087a2, #ff8aadf4, #ff494d64, #ff8aadf4, #ffed8796, #ff24273a, #ffcad3f5, #ff181926, #ffcad3f5, #808087a2
inactive_colors=#ffcdd6f4, #ff1e2030, #ffa5adcb, #ff939ab7, #ff494d64, #ff6e738d, #ffcad3f5, #ffcad3f5, #ffcad3f5, #ff24273a, #ff1e2030, #ff8087a2, #ff8aadf4, #ffa5adcb, #ff8aadf4, #ffed8796, #ff24273a, #ffcad3f5, #ff181926, #ffcad3f5, #808087a2

View file

@ -0,0 +1,4 @@
[ColorScheme]
active_colors=#ffcdd6f4, #ff1e1e2e, #ffa6adc8, #ff9399b2, #ff45475a, #ff6c7086, #ffcdd6f4, #ffcdd6f4, #ffcdd6f4, #ff1e1e2e, #ff181825, #ff7f849c, #ff89b4fa, #ff1e1e2e, #ff89b4fa, #fff38ba8, #ff1e1e2e, #ffcdd6f4, #ff11111b, #ffcdd6f4, #807f849c
disabled_colors=#ffa6adc8, #ff1e1e2e, #ffa6adc8, #ff9399b2, #ff45475a, #ff6c7086, #ffa6adc8, #ffa6adc8, #ffa6adc8, #ff1e1e2e, #ff11111b, #ff7f849c, #ff89b4fa, #ff45475a, #ff89b4fa, #fff38ba8, #ff1e1e2e, #ffcdd6f4, #ff11111b, #ffcdd6f4, #807f849c
inactive_colors=#ffcdd6f4, #ff1e1e2e, #ffa6adc8, #ff9399b2, #ff45475a, #ff6c7086, #ffcdd6f4, #ffcdd6f4, #ffcdd6f4, #ff1e1e2e, #ff181825, #ff7f849c, #ff89b4fa, #ffa6adc8, #ff89b4fa, #fff38ba8, #ff1e1e2e, #ffcdd6f4, #ff11111b, #ffcdd6f4, #807f849c

View file

@ -0,0 +1,111 @@
* {
bg-col: #303446;
bg-col-light: #303446;
border-col: #303446;
selected-col: #303446;
blue: #8caaee;
fg-col: #c6d0f5;
fg-col2: #e78284;
grey: #737994;
width: 600;
font: "IBM Plex Sans 14";
}
element-text, element-icon , mode-switcher {
background-color: inherit;
text-color: inherit;
}
window {
height: 360px;
border: 3px;
border-color: @border-col;
background-color: @bg-col;
}
mainbox {
background-color: @bg-col;
}
inputbar {
children: [prompt,entry];
background-color: @bg-col;
border-radius: 5px;
padding: 2px;
}
prompt {
background-color: @blue;
padding: 6px;
text-color: @bg-col;
border-radius: 3px;
margin: 20px 0px 0px 20px;
}
textbox-prompt-colon {
expand: false;
str: ":";
}
entry {
padding: 6px;
margin: 20px 0px 0px 10px;
text-color: @fg-col;
background-color: @bg-col;
}
listview {
border: 0px 0px 0px;
padding: 6px 0px 0px;
margin: 10px 0px 0px 20px;
columns: 2;
lines: 5;
background-color: @bg-col;
}
element {
padding: 5px;
background-color: @bg-col;
text-color: @fg-col ;
}
element-icon {
size: 25px;
}
element selected {
background-color: @selected-col ;
text-color: @fg-col2 ;
}
mode-switcher {
spacing: 0;
}
button {
padding: 10px;
background-color: @bg-col-light;
text-color: @grey;
vertical-align: 0.5;
horizontal-align: 0.5;
}
button selected {
background-color: @bg-col;
text-color: @blue;
}
message {
background-color: @bg-col-light;
margin: 2px;
padding: 2px;
border-radius: 5px;
}
textbox {
padding: 6px;
margin: 20px 0px 0px 20px;
text-color: @blue;
background-color: @bg-col-light;
}

View file

@ -0,0 +1,28 @@
{ pkgs, ... }:
{
programs.rofi = {
enable = true;
package = pkgs.rofi-wayland;
font = "IBM Plex Sans";
extraConfig = {
disable-history = false;
display-Network = " 󰤨 Network";
display-drun = " Apps ";
display-run = " Run ";
display-window = " Window";
drun-display-format = "{icon} {name}";
hide-scrollbar = true;
icon-theme = "Papirus-Dark";
location = 0;
modi = "run,drun,window";
show-icons = true;
sidebar-mode = true;
terminal = "alacritty";
};
theme = ./catppuccin-frappe.rasi;
};
}

View file

@ -0,0 +1,19 @@
{ pkgs, spicetify-nix, ... }:
let
spicePkgs = spicetify-nix.legacyPackages.${pkgs.system};
in
{
imports = [ spicetify-nix.homeManagerModules.default ];
programs.spicetify = {
enable = true;
theme = spicePkgs.themes.catppuccin;
colorScheme = "frappe";
enabledExtensions = with spicePkgs.extensions; [
autoVolume
shuffle
];
};
}

View file

@ -0,0 +1,25 @@
{ pkgs, ... }:
{
programs.tmux = {
enable = true;
clock24 = true;
keyMode = "vi";
terminal = "screen-256color";
extraConfig = ''
# Fix colors
set -sg terminal-overrides ",*:RGB"
'';
plugins = with pkgs.tmuxPlugins; [
{
plugin = catppuccin;
extraConfig = ''
# Set theme
set -g @catppuccin_flavour 'frappe'
'';
}
];
};
}

View file

@ -0,0 +1,205 @@
{ ... }:
{
programs.waybar = {
enable = true;
settings = {
mainBar = {
layer = "top";
margin = "10px 10px 0";
height = 30;
modules-left = [ "hyprland/workspaces" ];
modules-center = [ "clock" ];
modules-right = [
"network"
"memory"
"cpu"
"temperature"
"battery"
"tray"
];
"hyprland/workspaces" = {
format = "{icon}";
format-icons = {
active = "";
default = "";
empty = "";
persistent = "";
special = "";
urgent = "";
};
};
clock = {
format = "{:%H:%M} ";
format-alt = "{:%A; %B %d, %Y (%R)} ";
tooltip-format = "<tt><small>{calendar}</small></tt>";
calendar = {
mode = "month";
mode-mon-col = 3;
weeks-pos = "right";
on-scroll = 1;
on-click-right = "mode";
format = {
months = "<span color='#e5c890'><b>{}</b></span>";
days = "<span color='#c6d0f5'><b>{}</b></span>";
weeks = "<span color='#81c8be'><b>W{}</b></span>";
weekdays = "<span color='#ef9f76'><b>{}</b></span>";
today = "<span color='#a6d189'><b><u>{}</u></b></span>";
};
actions = {
on-click-backward = "tz_down";
on-click-forward = "tz_up";
on-click-right = "mode";
on-scroll-down = "shift_down";
on-scroll-up = "shift_up";
};
};
};
network = {
interval = 5;
format = " {bandwidthUpBits} 󰇙 {bandwidthDownBits} ";
format-disconnected = " No connection";
tooltip-format-wifi = " {essid} ({signalStrength}%)";
};
memory = {
interval = 5;
format = " {percentage}%";
states = {
warning = 70;
critical = 90;
};
"tooltip-format" = " {used:0.1f}G/{total:0.1f}G";
};
cpu = {
interval = 5;
tooltip = false;
format = " {usage}%";
format-alt = " {load}";
states = {
warning = 70;
critical = 90;
};
};
temperature = {
critical-threshold = 90;
interval = 5;
format = "{icon} {temperatureC}°";
format-icons = [
""
""
""
""
""
];
tooltip = false;
};
# Module configuration
battery = {
interval = 10;
states = {
warning = 30;
critical = 15;
};
format-time = "{H}:{M:02}";
format = "{icon} {capacity}% ({time})";
format-charging = " {capacity}% ({time})";
format-charging-full = " {capacity}%";
format-full = "{icon} {capacity}%";
format-alt = "{icon} {power}W";
format-icons = [
""
""
""
""
""
];
tooltip = false;
};
tray = {
icon-size = 18;
spacing = 10;
};
};
};
style = ''
/* Using https://github.com/catppuccin/catppuccin for color reference. */
/* Keyframes */
@keyframes blink-critical {
to {
/*color: @white;*/
background-color: @critical;
}
}
* {
all: unset;
color: #c6d0f5;
font-family: "IBM Plex Sans", 'Courier New', Courier, monospace;
font-size: 14px;
}
.modules-left,
.modules-right,
.modules-center {
padding: 0 20px;
border-radius: 10px;
background-color: rgba(48, 52, 70, 0.85);
}
tooltip {
background-color: rgba(48, 52, 70, 0.85);
border-radius: 10px;
padding: 8px;
}
tooltip label {
color: #c6d0f5;
}
#workspaces {
margin-left: -5px;
padding-left: 0px;
}
#workspaces button {
margin: 0 8px;
}
#workspaces button:hover {
background: #414559;
border: none;
}
#clock {
padding: 0 10px;
}
#network, #cpu, #memory, #temperature {
margin: 0 8px;
}
#tray {
margin-left: 8px;
}
#tray menu {
background-color: rgba(48, 52, 70, 0.85);
border-radius: 10px;
padding: 8px;
}
'';
};
}

View file

@ -0,0 +1,28 @@
{ pkgs, ... }:
{
home.file = {
# Configuration for gamemode, for running games with optimizations.
".config/gamemode.ini".source = ./dotfiles/gamemode.ini;
# Configure DXVK
".config/dxvk.conf".text = ''
dxvk.enableGraphicsPipelineLibrary = Auto
'';
};
home.packages = with pkgs; [
gamescope
heroic
protontricks
wineWowPackages.unstableFull
winetricks
# Games
openttd
prismlauncher
shattered-pixel-dungeon
xonotic
];
}

View file

@ -0,0 +1,18 @@
#!/bin/sh
#
# Load sinks
#
pactl load-module module-null-sink formats=pcm,float32le sink_name=output sink_properties=device.description="Output"
pactl load-module module-null-sink formats=pcm,float32le sink_name=applications sink_properties=device.description="Applications"
#
# Loopback audio to the correct places
#
# Application audio forwarded to microphone
pactl load-module module-loopback latency_msec=25 source=applications.monitor sink=output
# Microphone
pactl load-module module-loopback latency_msec=25 source=rnnoise_source sink=output
# Application audio forwarded to me
pactl load-module module-loopback latency_msec=25 source=applications.monitor sink=alsa_output.usb-Burr-Brown_from_TI_USB_Audio_CODEC-00.pro-output-0

View file

@ -0,0 +1,4 @@
#!/bin/sh
pactl unload-module module-loopback
pactl unload-module module-null-sink

View file

@ -0,0 +1,7 @@
#!/bin/sh
# I've removed all environment variables
# but there might be useful ones in the future.
# https://docs.mesa3d.org/envvars.html
mangohud gamemoderun "$@"

View file

@ -0,0 +1,79 @@
{ pkgs, ... }:
{
home.packages = with pkgs; [
ibm-plex
nerd-fonts.blex-mono
nerd-fonts.symbols-only
libsForQt5.qtstyleplugin-kvantum
libsForQt5.qtwayland
qt6Packages.qtstyleplugin-kvantum
qt6Packages.qtwayland
];
home.file = {
## Kvantum's theme configuration.
".config/Kvantum/catppuccin-frappe-lavender" = {
source = "${
pkgs.catppuccin-kvantum.override {
accent = "lavender";
variant = "frappe";
}
}/share/Kvantum/catppuccin-frappe-lavender";
};
".config/Kvantum/kvantum.kvconfig".text = ''
[General]
theme=catppuccin-frappe-lavender
'';
##
## Theming configuration for qt5 and qt6
".config/qt5ct/colors".source = ./dotfiles/qt5ct;
".config/qt6ct/colors".source = ./dotfiles/qt5ct; # We use the qt5ct because it's the SAME spec
##
".local/share/SpeedCrunch/color-schemes/catppuccin-frappe.json" = {
recursive = true;
source = builtins.fetchurl {
url = "https://raw.githubusercontent.com/catppuccin/speedcrunch/34f2b382de0188d2fd85f59a8a366f313fc30a71/themes/catppuccin-frappe.json";
sha256 = "sha256:0imx5a53p3ls5kddplgr7mbpbidrmzl9qiwpv7r8jjmsf8yxs0i4";
};
};
};
home.pointerCursor = {
package = pkgs.catppuccin-cursors.frappeLavender;
name = "catppuccin-frappe-lavender-cursors";
size = 24;
gtk.enable = true;
x11.enable = true;
};
# Configure GTK.
gtk = {
enable = true;
gtk3.extraConfig = {
gtk-application-prefer-dark-theme = true;
};
gtk4.extraConfig = {
gtk-application-prefer-dark-theme = true;
};
iconTheme = {
name = "Papirus-Dark";
package = pkgs.papirus-icon-theme.override { color = "violet"; };
};
};
# Configure QT
qt = {
enable = true;
platformTheme.name = "qtct";
};
}