Auto: cleanup-2026-05-24T10-18-36Z

This commit is contained in:
2026-05-24 12:18:49 +02:00
parent 4dc460dc0c
commit 16c01a5e67
71 changed files with 1770 additions and 1731 deletions
+52 -52
View File
@@ -1,58 +1,58 @@
{ ... }: {
flake.nixosModules.anki = { pkgs, ... }: {
_: {
flake.nixosModules.anki = {pkgs, ...}: {
environment.systemPackages = [
(pkgs.anki.withAddons [
(pkgs.ankiAddons.recolor.withConfig {
config = {
# we must specify all the colors or it crashes as this overwrite the whole colors set
colors = {
# ===== Foregrounds =====
FG = ["Foreground" "#ebdbb2" "#ebdbb2" ""];
FG_SUBTLE = ["Subtle FG" "#d5c4a1" "#d5c4a1" ""];
FG_FAINT = ["Faint FG" "#a89984" "#a89984" ""];
FG_DISABLED = ["Disabled FG" "#928374" "#928374" ""];
# ===== Main Background Layers =====
BG = ["Background" "#1d2021" "#1d2021" ""];
MAIN_BG = ["Main Background" "#1d2021" "#1d2021" ""];
VIEW_BG = ["View Background" "#282828" "#282828" ""];
EDITOR_BG = ["Editor Background" "#282828" "#282828" ""];
CANVAS = ["Canvas" "#282828" "#282828" ""];
CANVAS_ELEVATED = ["Elevated Canvas" "#32302f" "#32302f" ""];
# ===== Tables & Lists =====
TABLE_BG = ["Table Background" "#282828" "#282828" ""];
TABLE_ALT_BG = ["Table Alt Background" "#32302f" "#32302f" ""];
HEADER_BG = ["Header Background" "#3c3836" "#3c3836" ""];
SELECTED_BG = ["Selected Background" "#504945" "#504945" ""];
# ===== Borders =====
BORDER = ["Border" "#504945" "#504945" ""];
FAINT_BORDER = ["Faint Border" "#3c3836" "#3c3836" ""];
# ===== Buttons =====
BUTTON_GRADIENT_START = ["Button Start" "#3c3836" "#3c3836" ""];
BUTTON_GRADIENT_END = ["Button End" "#3c3836" "#3c3836" ""];
BUTTON_HOVER = ["Button Hover" "#665c54" "#665c54" ""];
# ===== Accent & Links =====
ACCENT = ["Accent" "#458588" "#458588" ""];
LINK = ["Link" "#83a598" "#83a598" ""];
LINK_HOVER = ["Link Hover" "#8ec07c" "#8ec07c" ""];
# ===== Status =====
WARNING = ["Warning" "#fe8019" "#fe8019" ""];
ERROR = ["Error" "#fb4934" "#fb4934" ""];
SUCCESS = ["Success" "#8ec07c" "#8ec07c" ""];
};
(pkgs.anki.withAddons [
(pkgs.ankiAddons.recolor.withConfig {
config = {
# we must specify all the colors or it crashes as this overwrite the whole colors set
colors = {
# ===== Foregrounds =====
FG = ["Foreground" "#ebdbb2" "#ebdbb2" ""];
FG_SUBTLE = ["Subtle FG" "#d5c4a1" "#d5c4a1" ""];
FG_FAINT = ["Faint FG" "#a89984" "#a89984" ""];
FG_DISABLED = ["Disabled FG" "#928374" "#928374" ""];
# ===== Main Background Layers =====
BG = ["Background" "#1d2021" "#1d2021" ""];
MAIN_BG = ["Main Background" "#1d2021" "#1d2021" ""];
VIEW_BG = ["View Background" "#282828" "#282828" ""];
EDITOR_BG = ["Editor Background" "#282828" "#282828" ""];
CANVAS = ["Canvas" "#282828" "#282828" ""];
CANVAS_ELEVATED = ["Elevated Canvas" "#32302f" "#32302f" ""];
# ===== Tables & Lists =====
TABLE_BG = ["Table Background" "#282828" "#282828" ""];
TABLE_ALT_BG = ["Table Alt Background" "#32302f" "#32302f" ""];
HEADER_BG = ["Header Background" "#3c3836" "#3c3836" ""];
SELECTED_BG = ["Selected Background" "#504945" "#504945" ""];
# ===== Borders =====
BORDER = ["Border" "#504945" "#504945" ""];
FAINT_BORDER = ["Faint Border" "#3c3836" "#3c3836" ""];
# ===== Buttons =====
BUTTON_GRADIENT_START = ["Button Start" "#3c3836" "#3c3836" ""];
BUTTON_GRADIENT_END = ["Button End" "#3c3836" "#3c3836" ""];
BUTTON_HOVER = ["Button Hover" "#665c54" "#665c54" ""];
# ===== Accent & Links =====
ACCENT = ["Accent" "#458588" "#458588" ""];
LINK = ["Link" "#83a598" "#83a598" ""];
LINK_HOVER = ["Link Hover" "#8ec07c" "#8ec07c" ""];
# ===== Status =====
WARNING = ["Warning" "#fe8019" "#fe8019" ""];
ERROR = ["Error" "#fb4934" "#fb4934" ""];
SUCCESS = ["Success" "#8ec07c" "#8ec07c" ""];
};
# version = { major = 3; minor = 1; };
# let nixpkgs handle the version
})
])
];
};
# version = { major = 3; minor = 1; };
# let nixpkgs handle the version
})
])
];
};
flake.homeModules.anki = { ... }: {
flake.homeModules.anki = _: {
programs.anki = {
# we enable system wide with nixpkgs because it offers some addon configuration. We just use this for some config
#enable = true;
+2 -2
View File
@@ -1,6 +1,6 @@
{ ... }: {
_: {
# unused at the moment see ../hardware/battery.nix
flake.homeModules.batsignal = { ... }: {
flake.homeModules.batsignal = _: {
services.batsignal.enable = true;
};
}
+33 -29
View File
@@ -1,12 +1,16 @@
{ self, ...}: {
flake.nixosModules.browsers = { pkgs, pkgs-unstable, ...}: {
{self, ...}: {
flake.nixosModules.browsers = {
pkgs,
pkgs-unstable,
...
}: {
environment.systemPackages = with pkgs; [
chromium # used only to flash the firmware on my framework laptop 16 (keyboard.frame.work) as only chromium based browser support webHID.
pkgs-unstable.tor-browser
self.packages.${pkgs.system}.custom-librewolfprofiles
];
};
flake.homeModules.librewolf = { ... }: {
flake.homeModules.librewolf = _: {
# adapted from https://github.com/contre95/dotfiles/blob/main/dotfiles/nixos/programs/librewolf.nix
home.sessionVariables = {
MOZ_ENABLE_WAYLAND = 1;
@@ -45,7 +49,7 @@
"browser.toolbars.bookmarks.visibility" = "newtab"; # hide bookmarks toolbar; always, never, newtab
"browser.aboutConfig.showWarning" = false; # disable warning about about:config
"media.videocontrols.picture-in-picture.video-toggle.enabled" = false; # disable picture in picture button
# Privacy
"privacy.resistFingerprinting" = true;
# "privacy.clearOnShutdown.cache" = false;
@@ -69,12 +73,12 @@
"browser.contentblocking.category" = "standart"; # set tracking protection to standart to not interfer with adnauseam
"dom.private-attribution.submission.enabled" = false; # stop doing dumb stuff mozilla
"browser.protections_panel.infoMessage.seen" = true; # disable tracking protection info
# Theme
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
"svg.context-properties.content.enabled" = true;
"layout.css.color-mix.enabled" = true;
# Disable telemetry
"toolkit.telemetry.enabled" = false;
"toolkit.telemetry.unified" = false;
@@ -90,7 +94,7 @@
"browser.newtabpage.activity-stream.telemetry" = false;
"toolkit.telemetry.shutdownPingSender.enabled" = false;
"browser.newtabpage.activity-stream.feeds.telemetry" = false;
"browser.tabs.loadInBackground" = true; # open new tab in background
"browser.tabs.loadBookmarksInTabs" = true; # open bookmarks in new tab
"browser.tabs.warnOnOpen" = false; # don't warn when opening multiple tabs
@@ -99,7 +103,7 @@
"browser.tabs.loadDivertedInBackground" = false; # open new tab in background
"browser.tabs.warnOnCloseOtherTabs" = false; # don't warn when closing multiple tabs
"browser.tabs.closeWindowWithLastTab" = false; # don't close window when last tab is closed
# other
"media.autoplay.default" = 0; # enable autoplay on open
"devtools.toolbox.host" = "right"; # move devtools to right
@@ -108,7 +112,7 @@
"media.rdd-vpx.enabled" = true; # enable hardware acceleration
"devtools.cache.disabled" = true; # disable caching in devtools
"media.ffmpeg.vaapi.enabled" = true; # enable hardware acceleration
# Fonts
"font.size.fixed.x-western" = 15;
"font.minimum-size.x-western" = 13;
@@ -130,12 +134,12 @@
installation_mode = "normal_installed";
install_url = "https://addons.mozilla.org/firefox/downloads/latest/enhancer-for-youtube/latest.xpi";
};
"sponsorBlocker@ajay.app" = {
install_url = "https://addons.mozilla.org/firefox/downloads/latest/sponsorblock/latest.xpi";
installation_mode = "force_installed";
};
"adnauseam@rednoise.org" = {
install_url = "https://addons.mozilla.org/firefox/downloads/latest/adnauseam/latest.xpi";
installation_mode = "force_installed";
@@ -215,23 +219,23 @@
# };
# "trackmenot@mrl.nyu.edu".settings = {
# enabled = true;
# # Query behavior
# runAtStartup = true;
# useTab = false; # don't open visible tab
# showQueries = false; # don't display fake queries
# # Frequency (seconds between bursts)
# timeout = 600; # 10 minutes
# burstEnabled = true;
# burstTimeout = 20; # burst interval
# burstCount = 5;
# # Query source
# useRssFeeds = true; # use dynamic trending feeds
# useUserQueries = false; # don't mix your real queries
# useBlackList = true;
# # Search engines to generate noise for
# searchEngines = {
# google = true;
@@ -240,12 +244,12 @@
# baidu = false;
# duckduckgo = false;
# };
# # Logging
# enableLogging = false;
# };
# "sponsorBlocker@ajay.app".settings = {
# # Core behavior
# isEnabled = true;
# autoSkip = false;
@@ -282,15 +286,15 @@
# actionType = 0;
# };
# };
# # Privacy
# disableTelemetry = true;
# showDonationLink = false;
# # UX
# showUpsells = false;
# hideSkipButtonPlayerControls = false;
# # Advanced
# useLocalCache = true;
# trackViewCount = false;
@@ -496,23 +500,23 @@
# };
# "trackmenot@mrl.nyu.edu".settings = {
# enabled = true;
# # Query behavior
# runAtStartup = true;
# useTab = false; # don't open visible tab
# showQueries = false; # don't display fake queries
# # Frequency (seconds between bursts)
# timeout = 600; # 10 minutes
# burstEnabled = true;
# burstTimeout = 20; # burst interval
# burstCount = 5;
# # Query source
# useRssFeeds = true; # use dynamic trending feeds
# useUserQueries = false; # don't mix your real queries
# useBlackList = true;
# # Search engines to generate noise for
# searchEngines = {
# google = true;
@@ -521,12 +525,12 @@
# baidu = false;
# duckduckgo = false;
# };
# # Logging
# enableLogging = false;
# };
# "sponsorBlocker@ajay.app".settings = {
# # Core behavior
# isEnabled = true;
# autoSkip = false;
@@ -563,15 +567,15 @@
# actionType = 0;
# };
# };
# # Privacy
# disableTelemetry = true;
# showDonationLink = false;
# # UX
# showUpsells = false;
# hideSkipButtonPlayerControls = false;
# # Advanced
# useLocalCache = true;
# trackViewCount = false;
+3 -4
View File
@@ -1,17 +1,16 @@
{ self, ... }: {
flake.nixosModules.caelestia = { pkgs, ... }: {
{self, ...}: {
flake.nixosModules.caelestia = {pkgs, ...}: {
qt.enable = true;
# to resolve this https://wiki.nixos.org/wiki/Home_Manager#I_cannot_set_GNOME_or_Gtk_themes_via_Home_Manager
programs.dconf.enable = true;
environment.systemPackages = with pkgs; [
self.packages.${pkgs.system}.qtbatticon
kdePackages.qtdeclarative # provides qmlls and other things
quickshell # we have it but adding it there solves "WARN qt.qpa.services: Failed to register with host portal QDBusError("org.freedesktop.portal.Error.Failed", "Could not register app ID: App info not found for 'org.quickshell'")"
];
};
flake.homeModules.caelestia = { ... }: let
flake.homeModules.caelestia = _: let
sisyphe = ../../assets/sisyphe.gif;
pepe-music = ../../assets/pepe-music.gif;
in {
+4 -4
View File
@@ -1,5 +1,5 @@
{ ... }: {
flake.homeModules.eza = { ... }: {
_: {
flake.homeModules.eza = _: {
# ls replacement
# see ./zsh.nix for the alias (usefull to se default flags)
programs.eza = {
@@ -8,7 +8,7 @@
theme = {
# from https://github.com/eza-community/eza-themes/blob/main/themes/gruvbox-dark.yml
colourful = true;
filekinds = {
normal = {foreground = "#ebdbb2";};
directory = {foreground = "#83a598";};
@@ -103,7 +103,7 @@
header = {foreground = "#ebdbb2";};
octal = {foreground = "#8ec07c";};
flags = {foreground = "#d3869b";};
symlink_path = {foreground = "#8ec07c";};
control_char = {foreground = "#83a598";};
broken_symlink = {foreground = "#fb4934";};
+29 -29
View File
@@ -1,42 +1,42 @@
{ ... }: {
flake.homeModules.fastfetch = { ... }: {
_: {
flake.homeModules.fastfetch = _: {
# Adapted from https://github.com/dacrab/fastfetch-config/blob/main/config.jsonc
programs.fastfetch = {
enable = true;
settings = {
logo = {
type = "none";
#source = "nixos";
};
modules = [
# ───────────── Hardware ─────────────
{
type = "custom";
format = " Hardware ";
outputColor = "blue";
}
{
type = "title";
key = " PC";
keyColor = "green";
}
{
type = "host";
key = " 󰇅 Laptop";
keyColor = "green";
}
{
type = "display";
key = " 󰍹 Display";
keyColor = "green";
}
{
type = "cpu";
key = " 󰍛 CPU";
@@ -44,63 +44,63 @@
format = "{1}";
keyColor = "green";
}
{
type = "gpu";
key = " 󰍛 GPU";
keyColor = "green";
}
{
type = "memory";
key = " 󰍛 Memory";
keyColor = "green";
}
{
type = "custom";
format = "";
outputColor = "blue";
}
# ───────────── Software ─────────────
{
type = "custom";
format = " Software ";
outputColor = "blue";
}
{
type = "os";
key = " OS";
keyColor = "cyan";
}
{
type = "kernel";
key = " Kernel";
keyColor = "cyan";
}
{
type = "packages";
key = " 󰏖 Packages";
keyColor = "cyan";
}
{
type = "shell";
key = " Shell";
keyColor = "cyan";
}
{
type = "terminal";
key = " Terminal";
keyColor = "cyan";
}
{
type = "command";
key = " OS Age";
@@ -113,50 +113,50 @@
echo $days_difference days
'';
}
{
type = "uptime";
key = " Uptime";
keyColor = "cyan";
}
{
type = "de";
key = " DE";
keyColor = "blue";
}
{
type = "wm";
key = " WM";
keyColor = "magenta";
}
{
type = "gpu";
key = " 󰍛 GPU Driver";
format = "{3}";
keyColor = "magenta";
}
{
type = "brightness";
key = " 󰃟 Brightness";
keyColor = "magenta";
}
{
type = "version";
key = " FastFetch";
keyColor = "magenta";
}
{
type = "custom";
format = "";
outputColor = "blue";
}
#{
# type = "custom";
# format = ''
@@ -167,7 +167,7 @@
type = "colors";
symbol = "diamond";
}
"break"
];
};
+1 -1
View File
@@ -1,4 +1,4 @@
{ ... }: {
_: {
flake.nixosModules.games = {pkgs, ...}: {
environment.systemPackages = with pkgs; [
supertux # fuck mario
+2 -2
View File
@@ -1,5 +1,5 @@
{ ... }: {
flake.homeModules.git = { ... }: {
_: {
flake.homeModules.git = _: {
programs.git = {
enable = true;
settings = {
+1 -1
View File
@@ -1,4 +1,4 @@
{ ... }: {
_: {
flake.homeModules.gtk = {pkgs, ...}: {
# gtk config
gtk.theme = {
+3 -3
View File
@@ -1,6 +1,6 @@
{ ... }: {
# this was in my home-manager config, but looks like more
flake.nixosModules.hypridle = { ... }: {
_: {
# this was in my home-manager config, but looks like more
flake.nixosModules.hypridle = _: {
services.hypridle = {
enable = true;
settings = {
+27 -23
View File
@@ -1,5 +1,9 @@
{ self, ... }: {
flake.nixosModules.hyprland = { pkgs, pkgs-unstable, ... }: {
{self, ...}: {
flake.nixosModules.hyprland = {
pkgs,
pkgs-unstable,
...
}: {
environment.systemPackages = with pkgs; [
swww #wallpaper daemon
gruvbox-gtk-theme
@@ -31,10 +35,10 @@
# removes uxterm
services.xserver.excludePackages = [pkgs.xterm];
# Enable the X11 windowing system.
# Enable the X11 windowing system.
services.xserver.enable = true;
};
flake.homeModules.hyprland-laptop = { ... }: {
flake.homeModules.hyprland-laptop = _: {
wayland.windowManager.hyprland.settings = {
exec-once = [
"qtbatticon" # custom battery tray
@@ -84,10 +88,10 @@
"workspaces, 1, 5, wind"
];
};
# █▀▀ █▄░█ █░█
# ██▄ █░▀█ ▀▄▀
# See https://wiki.hyprland.org/Configuring/Environment-variables/
env = [
"PATH, $PATH:$scrPath"
@@ -100,22 +104,22 @@
"MOZ_ENABLE_WAYLAND,1"
"GDK_SCALE,1"
];
# █ █▄░█ █▀█ █░█ ▀█▀
# █ █░▀█ █▀▀ █▄█ ░█░
input = {
kb_layout = ["ch"];
follow_mouse = 1;
sensitivity = 0;
force_no_accel = 1;
};
# █▄▀ █▀▀ █▄█ █▄▄ █ █▄░█ █▀▄ █ █▄░█ █▀▀ █▀
# █░█ ██▄ ░█░ █▄█ █ █░▀█ █▄▀ █ █░▀█ █▄█ ▄█
# caelestia shell drawers toggle dashboard
# caelestia shell drawers toggle utilities
bind = [
#hyprland/utility keybindings
"$mod, W, togglefloating"
@@ -210,7 +214,7 @@
"Ctrl+Alt, 9, exec, anki"
# if hyprexpo plugin enabled bind = $mainMod, Space, hyprexpo:expo, toggle
# maybe exec sudo framework-tools-tui
#plugins keybindings
#"$mod, SPACE, overview:toggle, "
];
@@ -285,20 +289,20 @@
"3, right, move, +col"
"3, left, move, -col"
];
# █░░ ▄▀█ █▄█ █▀█ █░█ ▀█▀ █▀
# █▄▄ █▀█ ░█░ █▄█ █▄█ ░█░ ▄█
dwindle = {
preserve_split = true;
};
scrolling = {
column_width = 0.45;
};
# █▀▄▀█ █ █▀ █▀▀
# █░▀░█ █ ▄█ █▄▄
misc = {
vrr = 0;
force_default_wallpaper = 0;
@@ -306,7 +310,7 @@
xwayland = {
force_zero_scaling = true;
};
# █▀▄▀█ █▀█ █▄░█ █ ▀█▀ █▀█ █▀█
# █░▀░█ █▄█ █#░▀█ █ ░█░ █▄█ █▀▄
monitor = [
@@ -343,17 +347,17 @@
speed = 4.0;
# how much the speed is influenced by the current shake intensitiy
influence = 0.0;
# maximal magnification the cursor can reach
# values below 1 disable the limit (e.g. 0)
limit = 0.0;
# time in millseconds the cursor will stay magnified after a shake has ended
timeout = 2000;
# show cursor behaviour `tilt`, `rotate`, etc. while shaking
effects = true;
# enable ipc events for shake
ipc = false;
};
@@ -364,7 +368,7 @@
workspaceActiveBorder = "rgb(ab7746)";
disableBlur = true;
};
#####################################################
#####################################################
# theme
@@ -397,7 +401,7 @@
};
####################################################
##################################################
# /$$ /$$ /$$
#| $$ /$ | $$ | $$
#| $$ /$$$| $$ /$$$$$$ /$$$$$$ | $$ /$$ /$$$$$$$ /$$$$$$ /$$$$$$ /$$$$$$$ /$$$$$$
@@ -418,7 +422,7 @@
#"w[tv1], gapsout:1, gapsin:1"
#"f[1], gapsout:1, gapsin:1"
];
# █░█░█ █ █▄░█ █▀▄ █▀█ █░█░█   █▀█ █░█ █░░ █▀▀ █▀
# ▀▄▀▄▀ █ █░▀█ █▄▀ █▄█ ▀▄▀▄▀   █▀▄ █▄█ █▄▄ ██▄ ▄█
windowrule = [
+58 -56
View File
@@ -1,50 +1,51 @@
{ ...}: { # for some reason perSystem can't expose pkgs-unstable so we need to expose it here
# -----------------------------------------------------
# Here are a bunch of scripts that interact with hyprland
# Some are still used. Some are broken. Some are deprecated. But I do still keep them in case I want to go back to old tools
# -----------------------------------------------------
perSystem = { pkgs, ... }: let
_: {
# for some reason perSystem can't expose pkgs-unstable so we need to expose it here
# -----------------------------------------------------
# Here are a bunch of scripts that interact with hyprland
# Some are still used. Some are broken. Some are deprecated. But I do still keep them in case I want to go back to old tools
# -----------------------------------------------------
perSystem = {pkgs, ...}: let
wallpaper1 = ../../assets/wallpaper1.jpg;
wallpaper2 = ../../assets/wallpaper2.jpg;
wallpaper3 = ../../assets/wallpaper3.jpg;
wallpaper4 = ../../assets/wallpaper4.jpg;
wallpaper5 = ../../assets/wallpaper5.jpg;
in {
# kills the app, but when it's steam or custom-pomodoro
packages.custom-dontkillsteam = pkgs.writeShellApplication {
name = "custom-dontkillsteam";
runtimeInputs = with pkgs; [
hyprland
jq
];
text = ''
class=$(hyprctl activewindow -j | jq -r ".class")
if [[ "$class" == "Steam" || "$class" == "custom-pomodoro" ]]; then
hyprctl dispatch movetoworkspacesilent special
else
hyprctl dispatch killactive ""
fi
'';
};
packages.custom-killall = pkgs.writeShellApplication {
name = "custom-killall";
runtimeInputs = [
pkgs.hyprland # for some reason pkgs-unstable doesn't work here
pkgs.jq
];
text = ''
active_workspace_id=$(hyprctl activeworkspace -j | jq -r '.id')
hyprctl clients -j |
jq -r ".[]
| select(.workspace.id==''${active_workspace_id})
| select(.focusHistoryID!=0)
| .pid" |
xargs -r kill
'';
};
packages.custom-wallpaper = pkgs.writeShellApplication {
# kills the app, but when it's steam or custom-pomodoro
packages.custom-dontkillsteam = pkgs.writeShellApplication {
name = "custom-dontkillsteam";
runtimeInputs = with pkgs; [
hyprland
jq
];
text = ''
class=$(hyprctl activewindow -j | jq -r ".class")
if [[ "$class" == "Steam" || "$class" == "custom-pomodoro" ]]; then
hyprctl dispatch movetoworkspacesilent special
else
hyprctl dispatch killactive ""
fi
'';
};
packages.custom-killall = pkgs.writeShellApplication {
name = "custom-killall";
runtimeInputs = [
pkgs.hyprland # for some reason pkgs-unstable doesn't work here
pkgs.jq
];
text = ''
active_workspace_id=$(hyprctl activeworkspace -j | jq -r '.id')
hyprctl clients -j |
jq -r ".[]
| select(.workspace.id==''${active_workspace_id})
| select(.focusHistoryID!=0)
| .pid" |
xargs -r kill
'';
};
packages.custom-wallpaper = pkgs.writeShellApplication {
name = "custom-wallpaper";
runtimeInputs = with pkgs; [
socat
@@ -77,21 +78,22 @@
;;
esac
}
socat -U - UNIX-CONNECT:"$XDG_RUNTIME_DIR"/hypr/"$HYPRLAND_INSTANCE_SIGNATURE"/.socket2.sock | while read -r line; do handle "$line"; done
'';
};
packages.custom-launch = pkgs.writeShellApplication {
# used for the terminal autostart. Needs to get cleared and recall fastfetch so that the bar from oh-my-zsh get resized
# unused
name = "custom-launch";
runtimeInputs = with pkgs; [
zsh
];
text = ''
sleep 2
clear
zsh
'';
};
};
packages.custom-launch = pkgs.writeShellApplication {
# used for the terminal autostart. Needs to get cleared and recall fastfetch so that the bar from oh-my-zsh get resized
# unused
name = "custom-launch";
runtimeInputs = with pkgs; [
zsh
];
text = ''
sleep 2
clear
zsh
'';
};
};}
}
+28 -27
View File
@@ -1,5 +1,5 @@
{ self, ... }: {
flake.nixosModules.kdrive = { pkgs-unstable, ... }: {
{self, ...}: {
flake.nixosModules.kdrive = {pkgs-unstable, ...}: {
environment.systemPackages = with pkgs-unstable; [
rclone
self.packages.${pkgs.system}.custom-checkKdrive
@@ -11,7 +11,7 @@
enable = true;
};
};
perSystem = { pkgs, ... }: {
perSystem = {pkgs, ...}: {
packages.custom-checkKdrive = pkgs.writeShellApplication {
name = "custom-checkKdrive";
runtimeInputs = with pkgs; [
@@ -20,21 +20,21 @@
libnotify
];
text = ''
# waits for an internet connection. It pings both Google DNS and Cloudfare dns in case one of them is down
until ping -c1 -W1 1.1.1.1 >/dev/null 2>&1 || \
ping -c1 -W1 8.8.8.8 >/dev/null 2>&1
do
sleep 1
done
set +e
output=$(rclone lsd kdrive: 2>&1)
status=$?
set -e
if [ $status -eq 0 ]; then
echo "kdrive OK"
else
@@ -47,23 +47,24 @@
'';
};
packages.custom-mountkdrive = pkgs.writeShellApplication {
name = "custom-mountkdrive";
runtimeInputs = with pkgs; [
rclone
libnotify
];
text = ''
REMOTE_NAME="kdrive"
MOUNT_POINT="$HOME/kdrive"
if rclone listremotes | rg "^''${REMOTE_NAME}:"; then
echo "Mounting ''${REMOTE_NAME}..."
rclone mount "''${REMOTE_NAME}:" "$MOUNT_POINT" --vfs-cache-mode writes --allow-non-empty &
else
notify-send "rclone mount failed" \
"Remote ''${REMOTE_NAME} not found.\nConfigure rclone and create the dir ~/kdrive/ or comment out the exec line in hyprland.nix."
echo "Remote ''${REMOTE_NAME} not found. Configure rclone or comment out the exec line in hyprland.nix."
fi
'';
name = "custom-mountkdrive";
runtimeInputs = with pkgs; [
rclone
libnotify
];
text = ''
REMOTE_NAME="kdrive"
MOUNT_POINT="$HOME/kdrive"
if rclone listremotes | rg "^''${REMOTE_NAME}:"; then
echo "Mounting ''${REMOTE_NAME}..."
rclone mount "''${REMOTE_NAME}:" "$MOUNT_POINT" --vfs-cache-mode writes --allow-non-empty &
else
notify-send "rclone mount failed" \
"Remote ''${REMOTE_NAME} not found.\nConfigure rclone and create the dir ~/kdrive/ or comment out the exec line in hyprland.nix."
echo "Remote ''${REMOTE_NAME} not found. Configure rclone or comment out the exec line in hyprland.nix."
fi
'';
};
};
};}
}
+24 -24
View File
@@ -1,5 +1,5 @@
{ ... }: {
flake.homeModules.kitty = { ... }: {
_: {
flake.homeModules.kitty = _: {
programs.kitty = {
enable = true;
#font.name = nerd-fonts._0xproto;
@@ -11,53 +11,53 @@
bold_font auto
italic_font auto
bold_italic_font auto
window_padding_width 25
# --- Core ---
foreground #ece0d9
background #18120e
selection_foreground #18120e
selection_background #ece0d9
cursor #ffb878
cursor_text_color #18120e
# --- Tabs ---
active_tab_foreground #18120e
active_tab_background #5c412a
inactive_tab_foreground #d6c3b5
inactive_tab_background #241e1a
# --- Black / Gray ---
color0 #353433
color8 #b29f91
# --- Red ---
color1 #e17300
color9 #ff8a20
# --- Green ---
color2 #ffc071
color10 #ffd6a8
# --- Yellow ---
color3 #ffe0c6
color11 #fff2e8
# --- Blue ---
color4 #b9ab66
color12 #d7be91
# --- Magenta ---
color5 #ed9562
color13 #fcad7e
# --- Cyan ---
color6 #f4c16d
color14 #ffd497
# --- White ---
color7 #ebd4c1
color15 #FFFFFF
@@ -76,43 +76,43 @@
selection_background #FFFFFF
cursor #C3AC76
cursor_text_color #0F1010
active_tab_foreground #1B1D1C
active_tab_background #6B5540
inactive_tab_foreground #6B5540
inactive_tab_background #1B1D1C
# black
color0 #29523D
color8 #578F73
# red
#color1 #FFF0CC
#color9 #F0DBAA
# we need actual red colors
color1 #CC241D
color9 #9D0006
# green
color2 #FFEECC
color10 #F0D9AA
# yellow
color3 #FFE5CC
color11 #F0CCAA
# blue
color4 #9AE6C0
color12 #9AE6C0
# magenta
color5 #E6CC9A
color13 #E6CC9A
# cyan
color6 #E6BF9A
color14 #E6BF9A
# white
color7 #FFF0CC
color15 #F0DBAA
+2 -2
View File
@@ -1,5 +1,5 @@
{ ... }: {
flake.nixosModules.ly = { ... }: {
_: {
flake.nixosModules.ly = _: {
# a minimal ly config as the big config (ly.nix) didnt worked
services.displayManager.ly = {
enable = true;
+6 -6
View File
@@ -1,5 +1,5 @@
{ inputs, ... }: {
flake.hostModules.micro = { pkgs-unstable, ... }: {
{inputs, ...}: {
flake.hostModules.micro = {pkgs-unstable, ...}: {
programs.micro = {
enable = true;
package = pkgs-unstable.micro-full;
@@ -18,19 +18,19 @@
text = ''
local buffer = import("micro/buffer")
local shell = import("micro/shell")
function vivifyOpen(buf)
local cursor = buf:GetActiveCursor()
local line = cursor.Loc.Y + 1
shell.ExecCommand("viv", string.format("%s:%d", buf.AbsPath, line))
end
function onBufferOpen(buf)
if os.getenv("MICRO_VIVIFY") ~= "1" then
return
end
-- only run for real files (not help/log/etc)
if buf.Type.Kind == buffer.BTDefault then
vivifyOpen(buf)
+1 -1
View File
@@ -1,4 +1,4 @@
{ ... }: {
_: {
flake.nixosModules.mullvad = {pkgs-unstable, ...}: {
services.mullvad-vpn = {
enable = true;
+48 -48
View File
@@ -1,4 +1,4 @@
{ ... }: {
_: {
flake.homeModules.neovim = {pkgs-unstable, ...}: {
programs.neovim = {
enable = true;
@@ -64,9 +64,9 @@
pkgs-unstable.vimPlugins.garbage-day-nvim
];
extraLuaConfig = ''
local vim = vim
-- =========================
-- LEADER & KEY DISABLE
-- =========================
@@ -125,40 +125,40 @@
vim.opt.inccommand = 'split'
vim.opt.cursorline = true
vim.opt.scrolloff = 10
-- =========================
-- BASIC KEYMAPS
-- =========================
vim.keymap.set('n', '<Esc>', '<cmd>nohlsearch<CR>')
vim.keymap.set('t', '<Esc><Esc>', '<C-\\><C-n>', { desc = 'Exit terminal mode' })
-- Disable arrow keys in normal mode
vim.keymap.set('n', '<left>', '<cmd>echo "Use h to move!!"<CR>')
vim.keymap.set('n', '<right>', '<cmd>echo "Use l to move!!"<CR>')
vim.keymap.set('n', '<up>', '<cmd>echo "Use k to move!!"<CR>')
vim.keymap.set('n', '<down>', '<cmd>echo "Use j to move!!"<CR>')
-- Window navigation
vim.keymap.set('n', '<C-Left>', '<C-w><C-h>', { desc = 'Move focus to the left window' })
vim.keymap.set('n', '<C-Right>', '<C-w><C-l>', { desc = 'Move focus to the right window' })
vim.keymap.set('n', '<C-Down>', '<C-w><C-j>', { desc = 'Move focus to the lower window' })
vim.keymap.set('n', '<C-Up>', '<C-w><C-k>', { desc = 'Move focus to the upper window' })
-- Cheatsheet
vim.keymap.set("n","§", "<cmd>Cheatsheet<CR>")
require("cheatsheet").setup({
bundled_cheatsheets = { enabled = { "default" } },
bundled_plugin_cheatsheets = { disabled = { "gitsigns.nvim" } }
})
-- Highlight yanked text
vim.api.nvim_create_autocmd('TextYankPost', {
desc = 'Highlight on yank',
group = vim.api.nvim_create_augroup('kickstart-highlight-yank', { clear = true }),
callback = function() vim.highlight.on_yank() end,
})
-- ========================
-- terminal
-- =======================
@@ -166,10 +166,10 @@
position = 'right', -- position of the terminal window when using the shell_handler
-- can be: top, left, right, bottom
-- will be overwritten when using the telescope mapping to open horizontally or vertically
width = 80, -- width of window when position is left or right
height = 10, -- height of window when position is top or bottom
handlers = {
lua = function(bufnr)
vim.print('Running lua file in buffer ' .. bufnr)
@@ -177,13 +177,13 @@
end
}
})
vim.keymap.set("n", "<leader><leader>", function() require("runner-nvim").run() end)
-- =========================
-- SCROLLBAR
-- =========================
require("scrollbar").setup()
-- =========================
-- UFO FOLDING
-- =========================
@@ -196,7 +196,7 @@
require('ufo').setup({
provider_selector = function() return {'treesitter', 'indent'} end
})
-- =========================
-- treesitter
-- ========================
@@ -219,7 +219,7 @@
renderer = { group_empty = true },
filters = { dotfiles = true },
})
-- =========================
-- CMP CONFIGURATION
-- =========================
@@ -235,25 +235,25 @@
}),
sources = cmp.config.sources({ { name = 'nvim_lsp' }, { name = 'vsnip' } }, { { name = 'buffer' } }),
})
cmp.setup.cmdline({ '/', '?' }, { mapping = cmp.mapping.preset.cmdline(), sources = { { name = 'buffer' } } })
cmp.setup.cmdline(':', { mapping = cmp.mapping.preset.cmdline(), sources = cmp.config.sources({ { name = 'path' } }, { { name = 'cmdline' } }), matching = { disallow_symbol_nonprefix_matching = false } })
-- =========================
-- LSP CONFIGURATION
-- =========================
local capabilities = require('cmp_nvim_lsp').default_capabilities()
-- Diagnostics
vim.keymap.set("n", "<leader>e4", function() vim.diagnostic.jump({ prev=true, count = 1 }) end, { desc = "Previous diagnostic" })
vim.keymap.set("n", "<leader>e5", function() vim.diagnostic.jump({ prev=false, count = 1 }) end, { desc = "Next diagnostic" })
vim.keymap.set("n", "<leader>e1", vim.diagnostic.open_float, { desc = "Show diagnostic" })
vim.keymap.set("n", "<leader>e3", vim.diagnostic.setloclist, { desc = "Diagnostic list" })
vim.keymap.set("n", "<leader>e2", vim.lsp.buf.code_action, { desc = "Show correction" })
vim.keymap.set("n", "<leader>e<Tab>", function()
local clients = vim.lsp.get_clients({ name = "ltex" })
if #clients > 0 then
-- Stop LTeX
for _, client in ipairs(clients) do
@@ -266,7 +266,7 @@
print("LTeX ON")
end
end, { desc = "Toggle LTeX" })
vim.diagnostic.config({
update_in_insert = false, -- i don't get any new error when in insert
})
@@ -282,17 +282,17 @@
},
priority = 2003, -- the priority of virtual text
inline = false,
})
-- LSP functionality
vim.keymap.set("n", "<leader>g1", vim.lsp.buf.hover, { desc = "Hover documentation" })
vim.keymap.set("n", "<leader>g2", vim.lsp.buf.definition, { desc = "Go to definition" })
vim.keymap.set("n", "<leader>g3", vim.lsp.buf.declaration, { desc = "Go to declaration" })
vim.keymap.set("n", "<leader>g4", vim.lsp.buf.implementation, { desc = "Go to implementation" })
vim.keymap.set("n", "<leader>g5", vim.lsp.buf.references, { desc = "Show references" })
-- LSP server setup
vim.lsp.config("lua_ls", { cmd = { "lua-language-server" }, filetypes = { "lua" }, root_dir = vim.fs.dirname, on_attach = on_attach })
vim.lsp.config("clangd", {
@@ -300,7 +300,7 @@
filetypes = { "c","cpp","objc","objcpp" },
on_attach = on_attach ,
init_options = {
clangdFileStatus = true,
usePlaceholders = true,
completeUnimported = false, -- this adds a bunch of #include even thought they are #included in another header file
@@ -332,26 +332,26 @@
cmd = { "ltex-ls-plus" },
filetypes = { "markdown", "text", "tex", "plaintex" },
on_attach = on_attach,
settings = {
ltex = {
language = "fr",
enabled = {
"markdown",
"text",
"tex",
"plaintex",
},
completionEnabled = true,
diagnosticSeverity = "information",
additionalRules = {
enablePickyRules = false,
motherTongue = "fr",
},
dictionary = {
["fr"] = {
"icelle",
@@ -367,7 +367,7 @@
},
},
})
vim.lsp.enable({ "lua_ls", "clangd", "pylsp", "texlab", "nixd", "ltex"})
-- =========================
-- DASHBOARD
@@ -400,41 +400,41 @@
footer = {},
}
}
-- jumps cursor when was last cursor last time
require("nvim-lastplace").setup({
-- Filetypes to ignore
ignore_filetypes = {
"gitcommit", "gitrebase", "svn", "hgcommit", "xxd", "COMMIT_EDITMSG"
},
-- Buffer types to ignore
ignore_buftypes = {
"quickfix", "nofile", "help", "terminal"
},
-- Center cursor after jumping
center_on_jump = true,
-- Only jump if target line is not visible
jump_only_if_not_visible = false,
-- Minimum lines required to enable jumping
min_lines = 10,
-- Maximum line to jump to (0 = no limit)
max_line = 0,
-- Open folds after jumping
open_folds = true,
-- Enable debug messages
debug = false,
})
-- ======================
-- gruvbox
-- ======================
require("gruvbox").setup({
terminal_colors = false, -- add neovim terminal colors
undercurl = true,
@@ -470,18 +470,18 @@
-- LUALINE
-- =========================
require('lualine').setup { options = { theme = "gruvbox_dark" } }
--==================0
-- Some utils
--==================
vim.keymap.set('n', '<leader>r1', '<cmd>Fugit2<CR>', { desc = 'Open git helper' })
vim.keymap.set("n", "t", function()
local line = vim.api.nvim_get_current_line()
local result = vim.fn.system({ "custom-syllabes" }, line)
print(vim.trim(result))
end, { desc = "Count syllables (current line)" })
-- =========================
@@ -492,7 +492,7 @@
vim.keymap.set('n', '<leader>f2', builtin.live_grep, { desc = 'Telescope live grep' })
vim.keymap.set('n', '<leader>f3', builtin.buffers, { desc = 'Telescope buffers' })
vim.keymap.set('n', '<leader>f4', builtin.help_tags, { desc = 'Telescope help tags' })
-- Disable relative numbers even if plugins override
vim.api.nvim_create_autocmd("VimEnter", { callback = function() vim.opt.colorcolumn = ""; vim.opt.relativenumber = false end })
'';
+98 -97
View File
@@ -1,6 +1,6 @@
{ ... }: {
_: {
# obsidian is unused -> see my project https://github.com/tomasriveral/NoteWrapper
flake.homeModules.obsidian = { ... }: {
flake.homeModules.obsidian = _: {
programs.obsidian = {
enable = true;
@@ -27,99 +27,100 @@
};
};
perSystem = {pkgs, ...}: {
packages.custom-obsidianbackup = pkgs.writeShellApplication {
name = "custom-obsidianbackup";
runtimeInputs = with pkgs; [
rclone
libnotify
rsync
];
text = ''
#!/usr/bin/env bash
SOURCE_DIR="$HOME/Documents/Notes"
DEST_DIR="$HOME/kdrive/Notes"
BACKUP_DIR="$HOME/.Notes.backup"
mkdir -p "$DEST_DIR"
mkdir -p "$BACKUP_DIR"
while true; do
# Timestamp for this run
TIMESTAMP=$(date +%Y-%m-%d_%H-%M)
TIMESTAMPED_BACKUP="$BACKUP_DIR/$TIMESTAMP"
mkdir -p "$TIMESTAMPED_BACKUP"
echo "[$(date)] Starting Obsidian backup..."
# Check rclone mount
status=$(rclone about kdrive: 2>&1 || true)
if [[ "$status" =~ .*CRITICAL.* ]]; then
echo "[$(date)] rclone failed:"
echo "$status"
notify-send -u critical "rclone failed" \
"rclone might be broken or you need to deactivate this script in HomeManager."
else
# Run rsync with verbose debugging
echo "[$(date)] Running rsync..."
rsync -Lavh --progress --update --backup --backup-dir="$TIMESTAMPED_BACKUP" \
--exclude='.obsidian/cache/**' \
"$SOURCE_DIR/" "$DEST_DIR/"
echo "[$(date)] Backup completed for this run."
fi
# Safely remove backups older than 30 days
if [[ -d "$BACKUP_DIR" && "$BACKUP_DIR" == "$HOME/.Notes.backup" ]]; then
echo "[$(date)] Cleaning old backups..."
find "$BACKUP_DIR/" -mindepth 1 -maxdepth 1 -type d -mtime +30 -exec rm -rf {} \;
else
echo "[$(date)] Backup directory not safe. Skipping cleanup."
fi
# Wait 1 hour
echo "[$(date)] Sleeping for 1 hour..."
sleep 3600
done
'';
packages.custom-obsidianbackup = pkgs.writeShellApplication {
name = "custom-obsidianbackup";
runtimeInputs = with pkgs; [
rclone
libnotify
rsync
];
text = ''
#!/usr/bin/env bash
SOURCE_DIR="$HOME/Documents/Notes"
DEST_DIR="$HOME/kdrive/Notes"
BACKUP_DIR="$HOME/.Notes.backup"
mkdir -p "$DEST_DIR"
mkdir -p "$BACKUP_DIR"
while true; do
# Timestamp for this run
TIMESTAMP=$(date +%Y-%m-%d_%H-%M)
TIMESTAMPED_BACKUP="$BACKUP_DIR/$TIMESTAMP"
mkdir -p "$TIMESTAMPED_BACKUP"
echo "[$(date)] Starting Obsidian backup..."
# Check rclone mount
status=$(rclone about kdrive: 2>&1 || true)
if [[ "$status" =~ .*CRITICAL.* ]]; then
echo "[$(date)] rclone failed:"
echo "$status"
notify-send -u critical "rclone failed" \
"rclone might be broken or you need to deactivate this script in HomeManager."
else
# Run rsync with verbose debugging
echo "[$(date)] Running rsync..."
rsync -Lavh --progress --update --backup --backup-dir="$TIMESTAMPED_BACKUP" \
--exclude='.obsidian/cache/**' \
"$SOURCE_DIR/" "$DEST_DIR/"
echo "[$(date)] Backup completed for this run."
fi
# Safely remove backups older than 30 days
if [[ -d "$BACKUP_DIR" && "$BACKUP_DIR" == "$HOME/.Notes.backup" ]]; then
echo "[$(date)] Cleaning old backups..."
find "$BACKUP_DIR/" -mindepth 1 -maxdepth 1 -type d -mtime +30 -exec rm -rf {} \;
else
echo "[$(date)] Backup directory not safe. Skipping cleanup."
fi
# Wait 1 hour
echo "[$(date)] Sleeping for 1 hour..."
sleep 3600
done
'';
};
# this might be broken after dendritic nix. As it searched for the obsidian.nix to get list of vaults
packages.custom-obsidianbvaults = pkgs.writeShellApplication {
name = "custom-obsidianvaults";
runtimeInputs = with pkgs; [
zsh
fzf
ripgrep
];
text = ''
# Path to your obsidian.nix
obsidian_nix="$HOME/nixos/modules/home-manager/obsidian.nix"
# Extract vault names without line numbers and colors
mapfile -t vaults < <(rg -N --color=never -Po 'vaults\.\K[[:alnum:]_]+' "$obsidian_nix")
# Let user select a vault with fzf
selected=$(printf "%s\n" "''${vaults[@]}" \
| fzf --height 6 --reverse --prompt="Select Obsidian vault:")
# Exit if user cancels
[[ -z "$selected" ]] && exit 0
# Remove any stray ANSI codes (optional)
selected=$(echo "$selected" | sed -r 's/\x1B\[[0-9;]*[mK]//g')
# Find the target path of the selected vault
vault_path=$(rg -N --color=never -A2 "vaults.$selected" "$obsidian_nix" \
| rg 'target =' | sed -E 's/.*"([^"]+)".*/\1/')
# Expand ~ if present
vault_path="''${vault_path/#\~/$HOME}"
# Launch Obsidian with the selected vault using URI
[[ -n "$vault_path" ]] && setsid xdg-open "obsidian://open?vault=$selected" >/dev/null 2>&1 &
# Exit the kitty terminal after selection
pkill -f "kitty.*Select Obsidian vault"
exit
'';
};
};
# this might be broken after dendritic nix. As it searched for the obsidian.nix to get list of vaults
packages.custom-obsidianbvaults = pkgs.writeShellApplication {
name = "custom-obsidianvaults";
runtimeInputs = with pkgs; [
zsh
fzf
ripgrep
];
text = ''
# Path to your obsidian.nix
obsidian_nix="$HOME/nixos/modules/home-manager/obsidian.nix"
# Extract vault names without line numbers and colors
mapfile -t vaults < <(rg -N --color=never -Po 'vaults\.\K[[:alnum:]_]+' "$obsidian_nix")
# Let user select a vault with fzf
selected=$(printf "%s\n" "''${vaults[@]}" \
| fzf --height 6 --reverse --prompt="Select Obsidian vault:")
# Exit if user cancels
[[ -z "$selected" ]] && exit 0
# Remove any stray ANSI codes (optional)
selected=$(echo "$selected" | sed -r 's/\x1B\[[0-9;]*[mK]//g')
# Find the target path of the selected vault
vault_path=$(rg -N --color=never -A2 "vaults.$selected" "$obsidian_nix" \
| rg 'target =' | sed -E 's/.*"([^"]+)".*/\1/')
# Expand ~ if present
vault_path="''${vault_path/#\~/$HOME}"
# Launch Obsidian with the selected vault using URI
[[ -n "$vault_path" ]] && setsid xdg-open "obsidian://open?vault=$selected" >/dev/null 2>&1 &
# Exit the kitty terminal after selection
pkill -f "kitty.*Select Obsidian vault"
exit
'';
};
};}
}
+2 -2
View File
@@ -1,5 +1,5 @@
{ ... }: {
flake.homeModules.oh-my-posh = { ... }: {
_: {
flake.homeModules.oh-my-posh = _: {
programs.oh-my-posh = {
enable = true;
enableZshIntegration = true;
+117 -117
View File
@@ -1,123 +1,123 @@
{ ... }:
{
flake.homeModules.quickshell = { ... }: {
_: {
flake.homeModules.quickshell = _: {
# pulled from https://codeberg.org/zacoons/rivendell-hyprdots
# replaced by caelestia-shell
qt.enable = true;
programs.quickshell = {
systemd.enable = true;
enable = true;
};
home.file.".config/quickshell" = {
source = ../../other/quickshell;
recursive = true;
};
programs.quickshell = {
systemd.enable = true;
enable = true;
};
home.file.".config/quickshell" = {
source = ../../other/quickshell;
recursive = true;
};
};
perSystem = {pkgs, ...}: {
# creates and maintains cache file for the notification history
packages.QS-notifycache = pkgs.writeShellApplication {
name = "QS-notifycache";
text = ''
CACHE="$HOME/.cache/notify_history"
# Create or erase existing cache
mkdir -p "$(dirname "$CACHE")"
: > "$CACHE" # truncate file
echo "Notification history initialized at $(date)" >> "$CACHE"
'';
# creates and maintains cache file for the notification history
packages.QS-notifycache = pkgs.writeShellApplication {
name = "QS-notifycache";
text = ''
CACHE="$HOME/.cache/notify_history"
# Create or erase existing cache
mkdir -p "$(dirname "$CACHE")"
: > "$CACHE" # truncate file
echo "Notification history initialized at $(date)" >> "$CACHE"
'';
};
packages.QS-notifyhistory = pkgs.writeShellApplication {
name = "QS-notifyhistory";
text = ''
app="$1"
title="$2"
body="$3"
date="$(date +%T)"
urgency="$4"
case "$urgency" in
0) urgency_text="low";;
1) urgency_text="normal";;
2) urgency_text="critical";;
*) urgency_text="unknown";;
esac
{
echo "$app"
echo "$title"
echo "$body"
echo "$date"
echo "$urgency_text"
} >> "$HOME/.cache/notify_history"
'';
};
packages.QS-sysinfo = pkgs.writeShellApplication {
name = "QS-sysinfo";
runtimeInputs = with pkgs; [
ripgrep
gawkInteractive
iproute2
coreutils
procps
upower
];
text = ''
# Pad CPU, MEM, DISK to 2 chars (right-aligned)
cpu=$(awk '/^cpu /{printf("%.0f", ($2+$4)*100/($2+$4+$5))}' /proc/stat)
cpu=$(printf "%2s" "$cpu")
sum=0
count=0
for f in /sys/class/hwmon/hwmon*/temp*_input; do
if [ -r "$f" ]; then
val=$(cat "$f" 2>/dev/null) || continue
sum=$((sum + val))
count=$((count + 1))
fi
done
temp=$(( sum / count / 1000 ))
sum=0
count=0
for f in /sys/class/hwmon/hwmon*/fan*_input; do
if [ -r "$f" ]; then
val=$(cat "$f" 2>/dev/null) || continue
sum=$((sum + val))
count=$((count + 1))
fi
done
fan=$(( sum / count ))
fan=$(printf "%4s" "$fan")
mem=$(free | awk '/Mem:/ {printf("%.0f",$3/$2*100)}')
mem=$(printf "%2s" "$mem")
disk=$(df / | awk 'NR==2 {gsub("%",""); print $5}')
disk=$(printf "%2s" "$disk")
# Pad POWER to 5 chars (XX.XX)
power=$(upower -b | awk -F: '/energy-rate/ {gsub(/^[ \t]+/, "", $2); split($2,a," "); printf("%.2f", a[1])}')
power=$(printf "%5s" "$power")
# network calculations
iface=$(ip route get 1.1.1.1 | awk '{print $5; exit}')
rx1=$(cat "/sys/class/net/$iface/statistics/rx_bytes")
tx1=$(cat "/sys/class/net/$iface/statistics/tx_bytes")
sleep 1
rx2=$(cat "/sys/class/net/$iface/statistics/rx_bytes")
tx2=$(cat "/sys/class/net/$iface/statistics/tx_bytes")
down_speed=$(( (rx2 - rx1) / 1024 ))
up_speed=$(( (tx2 - tx1) / 1024 ))
# Output JSON
echo "{\"cpu\":\"$cpu\",\"temp\":\"$temp\",\"fan\":\"$fan\",\"mem\":\"$mem\",\"disk\":\"$disk\",\"power\":\"$power\",\"down\":\"$down_speed\",\"up\":\"$up_speed\"}"
'';
};
};
packages.QS-notifyhistory = pkgs.writeShellApplication {
name = "QS-notifyhistory";
text = ''
app="$1"
title="$2"
body="$3"
date="$(date +%T)"
urgency="$4"
case "$urgency" in
0) urgency_text="low";;
1) urgency_text="normal";;
2) urgency_text="critical";;
*) urgency_text="unknown";;
esac
{
echo "$app"
echo "$title"
echo "$body"
echo "$date"
echo "$urgency_text"
} >> "$HOME/.cache/notify_history"
'';
};
packages.QS-sysinfo = pkgs.writeShellApplication {
name = "QS-sysinfo";
runtimeInputs = with pkgs; [
ripgrep
gawkInteractive
iproute2
coreutils
procps
upower
];
text = ''
# Pad CPU, MEM, DISK to 2 chars (right-aligned)
cpu=$(awk '/^cpu /{printf("%.0f", ($2+$4)*100/($2+$4+$5))}' /proc/stat)
cpu=$(printf "%2s" "$cpu")
sum=0
count=0
for f in /sys/class/hwmon/hwmon*/temp*_input; do
if [ -r "$f" ]; then
val=$(cat "$f" 2>/dev/null) || continue
sum=$((sum + val))
count=$((count + 1))
fi
done
temp=$(( sum / count / 1000 ))
sum=0
count=0
for f in /sys/class/hwmon/hwmon*/fan*_input; do
if [ -r "$f" ]; then
val=$(cat "$f" 2>/dev/null) || continue
sum=$((sum + val))
count=$((count + 1))
fi
done
fan=$(( sum / count ))
fan=$(printf "%4s" "$fan")
mem=$(free | awk '/Mem:/ {printf("%.0f",$3/$2*100)}')
mem=$(printf "%2s" "$mem")
disk=$(df / | awk 'NR==2 {gsub("%",""); print $5}')
disk=$(printf "%2s" "$disk")
# Pad POWER to 5 chars (XX.XX)
power=$(upower -b | awk -F: '/energy-rate/ {gsub(/^[ \t]+/, "", $2); split($2,a," "); printf("%.2f", a[1])}')
power=$(printf "%5s" "$power")
# network calculations
iface=$(ip route get 1.1.1.1 | awk '{print $5; exit}')
rx1=$(cat "/sys/class/net/$iface/statistics/rx_bytes")
tx1=$(cat "/sys/class/net/$iface/statistics/tx_bytes")
sleep 1
rx2=$(cat "/sys/class/net/$iface/statistics/rx_bytes")
tx2=$(cat "/sys/class/net/$iface/statistics/tx_bytes")
down_speed=$(( (rx2 - rx1) / 1024 ))
up_speed=$(( (tx2 - tx1) / 1024 ))
# Output JSON
echo "{\"cpu\":\"$cpu\",\"temp\":\"$temp\",\"fan\":\"$fan\",\"mem\":\"$mem\",\"disk\":\"$disk\",\"power\":\"$power\",\"down\":\"$down_speed\",\"up\":\"$up_speed\"}"
'';
};
};}
}
+2 -2
View File
@@ -1,5 +1,5 @@
{ ... }: {
flake.homeModules.ripgrep = { ... }: {
_: {
flake.homeModules.ripgrep = _: {
programs.ripgrep = {
enable = true;
arguments = [
+2 -2
View File
@@ -1,5 +1,5 @@
{ ... }: {
flake.homeModules.rofi = { ... }: {
_: {
flake.homeModules.rofi = _: {
programs.rofi = {
enable = true;
theme = "gruvbox-dark-hard";
+4 -4
View File
@@ -1,7 +1,7 @@
{ ... }: {
flake.homeModules.sbb-tui = { pkgs-unstable, ... }: {
home.packages = [
pkgs-unstable.sbb-tui
_: {
flake.homeModules.sbb-tui = {pkgs-unstable, ...}: {
home.packages = [
pkgs-unstable.sbb-tui
];
home.file.".config/sbb-tui/config.yaml" = {
enable = true;
+2 -2
View File
@@ -1,5 +1,5 @@
{ ... }: {
flake.homeModules.ssh = { ... }: {
_: {
flake.homeModules.ssh = _: {
programs.ssh = {
enable = true;
enableDefaultConfig = false; # will be removed in the futur. Removes evaluation warning
+3 -3
View File
@@ -1,11 +1,11 @@
{ ... }: {
_: {
# replaced by caelestia
flake.homeModules.swaync = { ... }: {
flake.homeModules.swaync = _: {
services.swaync = {
enable = true;
};
};
flake.homeModules.swaylock = { ... }: {
flake.homeModules.swaylock = _: {
programs.swaylock = {
enable = true;
settings = {
+2 -2
View File
@@ -1,5 +1,5 @@
{ ... }: {
flake.homeModules.thunderbird = { ... }: {
_: {
flake.homeModules.thunderbird = _: {
programs.thunderbird = {
enable = true;
profiles.tomasr = {
+1 -1
View File
@@ -1,4 +1,4 @@
{ ... }: {
_: {
flake.homeModules.vivify = {pkgs-unstable, ...}: {
home.file.".config/vivify/config.json" = {
enable = true;
+69 -69
View File
@@ -1,6 +1,5 @@
{ ... }:
{
flake.homeModules.waybar = { ... }: {
_: {
flake.homeModules.waybar = _: {
# replaced by caelestia
programs.waybar = {
enable = true;
@@ -372,7 +371,7 @@
@define-color foreground #c5c5c5;
@define-color background #191919;
@define-color cursor #c5c5c5;
@define-color color0 #191919;
@define-color color1 #3a3632;
@define-color color2 #582c1e;
@@ -389,9 +388,9 @@
@define-color color13 #855f2f;
@define-color color14 #796d62;
@define-color color15 #c5c5c5;
@define-color active @color6;
* {
font-size: 23px;
font-family: "0xProto Nerd Font";
@@ -403,9 +402,9 @@
text-shadow: none;
padding: 0px;
margin: 0px;
}
window#waybar {
transition-property: background-color;
transition-duration: 0.5s;
@@ -415,23 +414,23 @@
background: alpha(@background, 0.7);
color: lighter(@active);
}
menu,
tooltip {
border-radius: 8px;
padding: 2px;
border: 1px solid lighter(@active);
background: alpha(@background, 0.6);
color: lighter(@active);
}
menu label,
tooltip label {
font-size: 20px;
color: lighter(@active);
}
#submap,
#tray>.needs-attention {
animation-name: blink-active;
@@ -440,14 +439,14 @@
animation-iteration-count: infinite;
animation-direction: alternate;
}
.modules-right {
margin: 0px 6px 6px 6px;
border-radius: 4px;
background: alpha(@background, 0.4);
color: lighter(@active);
}
.modules-left {
transition-property: background-color;
transition-duration: 0.5s;
@@ -456,7 +455,7 @@
background: alpha(@background, 0.4);
color: lighter(@active);
}
#gcpu,
#custom-github,
#memory,
@@ -466,7 +465,7 @@
#custom-weather {
font-size: 17px;
}
#custom-recorder,
#connection,
#cnoti,
@@ -481,38 +480,38 @@
margin: 2px 2px 4px 2px;
background: alpha(darker(@active), 0.3);
}
#custom-notifications {
padding-left: 4px;
}
#custom-hotspot,
#custom-github,
#custom-notifications {
font-size: 20px;
}
#custom-hotspot {
padding-right: 2px;
}
#custom-vpn,
#custom-hotspot {
background: alpha(darker(@active), 0.3);
}
#privacy-item {
padding: 6px 0px 6px 6px;
}
#gcpu {
padding: 8px 0px 8px 0px;
}
#custom-cpu-icon {
font-size: 36px;
}
#custom-cputemp,
#temperature {
font-size: 17px;
@@ -523,30 +522,30 @@
font-size: 20px;
font-weight: bold;
}
#custom-github {
padding-top: 2px;
padding-right: 4px;
}
#custom-dmark {
color: alpha(@foreground, 0.3);
}
#submap {
margin-bottom: 0px;
}
#hyprland.window {
margin-left: 20px;
}
#workspaces {
margin: 0px 2px;
padding: 4px 0px 0px 0px;
border-radius: 8px;
}
#workspaces button {
transition-property: background-color;
transition-duration: 0.5s;
@@ -555,49 +554,49 @@
border-radius: 4px;
color: alpha(@foreground, 0.3);
}
#workspaces button.urgent {
font-weight: bold;
color: @foreground;
}
#workspaces button.active {
padding: 4px 2px;
background: alpha(@active, 0.4);
color: lighter(@active);
border-radius: 4px;
}
#network.wifi {
padding-right: 4px;
}
#submap {
min-width: 0px;
margin: 4px 6px 4px 6px;
}
#tray {
padding: 0px 0px 0px 0px;
}
#bluetooth {
padding-top: 2px;
}
#window {
border-radius: 8px;
padding: 4px 14px;
margin: 4px 2px 4px 2px;
}
#battery {
font-size: 17px;
border-radius: 8px;
padding: 4px 0px;
margin: 4px 2px 4px 2px;
}
#battery.discharging.warning {
animation-name: blink-yellow;
animation-duration: 1s;
@@ -605,7 +604,7 @@
animation-iteration-count: infinite;
animation-direction: alternate;
}
#battery.discharging.critical {
animation-name: blink-red;
animation-duration: 1s;
@@ -613,7 +612,7 @@
animation-iteration-count: infinite;
animation-direction: alternate;
}
#battery.powerdraw {
font-size: 17px;
padding: 0;
@@ -626,25 +625,25 @@
margin-left: -20px;
margin-right: -20px;
}
#clock {
font-weight: bold;
padding: 4px 2px 2px 2px;
}
#pulseaudio.mic {
border-radius: 4px;
color: @background;
background: alpha(darker(@foreground), 0.6);
padding-left: 4px;
}
#backlight-slider slider,
#pulseaudio-slider slider {
background-color: transparent;
box-shadow: none;
}
#backlight-slider trough,
#pulseaudio-slider trough {
margin-top: 4px;
@@ -653,13 +652,13 @@
border-radius: 8px;
background-color: alpha(@background, 0.6);
}
#backlight-slider highlight,
#pulseaudio-slider highlight {
border-radius: 8px;
background-color: lighter(@active);
}
#bluetooth.discoverable,
#bluetooth.discovering,
#bluetooth.pairable {
@@ -670,21 +669,21 @@
animation-iteration-count: infinite;
animation-direction: alternate;
}
@keyframes blink-active {
to {
background-color: @active;
color: @foreground;
}
}
@keyframes blink-red {
to {
background-color: #c64d4f;
color: @foreground;
}
}
@keyframes blink-yellow {
to {
background-color: #cf9022;
@@ -694,23 +693,24 @@
'';
};
};
perSystem = { pkgs, ... }: {
packages.custom-weatherwaybar = pkgs.writeShellApplication {
name = "custom-weatherwaybar";
runtimeInputs = with pkgs; [
curl
];
text = ''
PATTERN="C"
PATTERN2=" "
TEXT1="''$(curl -s "https://wttr.in/?format=%c")"
TEXT1=''${TEXT1/$PATTERN2/}
TEXT2="''$(curl -s "https://wttr.in/?format=%t")"
TEXT2=''${TEXT2/$PATTERN/}
TEXT3="''$(curl -s "https://wttr.in/?format=%f")"
TEXT3=''${TEXT3/$PATTERN/}
printf '{"text":" %s\\n %s\\n %s", "tooltip": false, "class": "weather"}\\n' \
"$TEXT1" "$TEXT2" "$TEXT3"
'';
perSystem = {pkgs, ...}: {
packages.custom-weatherwaybar = pkgs.writeShellApplication {
name = "custom-weatherwaybar";
runtimeInputs = with pkgs; [
curl
];
text = ''
PATTERN="C"
PATTERN2=" "
TEXT1="''$(curl -s "https://wttr.in/?format=%c")"
TEXT1=''${TEXT1/$PATTERN2/}
TEXT2="''$(curl -s "https://wttr.in/?format=%t")"
TEXT2=''${TEXT2/$PATTERN/}
TEXT3="''$(curl -s "https://wttr.in/?format=%f")"
TEXT3=''${TEXT3/$PATTERN/}
printf '{"text":" %s\\n %s\\n %s", "tooltip": false, "class": "weather"}\\n' \
"$TEXT1" "$TEXT2" "$TEXT3"
'';
};
};
};}
}
+10 -10
View File
@@ -1,6 +1,6 @@
{ ... }: {
_: {
# replaced by wlogout
flake.homeModules.wlogout = { ... }: let
flake.homeModules.wlogout = _: let
wallpaper = ../../assets/wallpaper1.jpg;
lock = ../../assets/lock.png;
lock-hover = ../../assets/lock-hover.png;
@@ -46,7 +46,7 @@
color: #000000; /* text */
background-color: rgba(40, 40, 40, 0.76);
}
button {
background-repeat: no-repeat;
background-position: center;
@@ -61,17 +61,17 @@
box-shadow 0.3s ease-in-out,
background-color 0.3s ease-in-out;
}
button:hover {
background-color: rgba(250, 137, 26, 0.3);
color: #282828;
}
button:focus {
background-color: #ebdbb2;
color: #282828;
}
#lock {
background-image: image(url("${lock}"));
}
@@ -81,7 +81,7 @@
#lock:hover {
background-image: image(url("${lock-hover}"));
}
#logout {
background-image: image(url("${logout}"));
}
@@ -91,8 +91,8 @@
#logout:hover {
background-image: image(url("${logout-hover}"));
}
#shutdown {
background-image: image(url("${shutdown}"));
}
@@ -102,7 +102,7 @@
#shutdown:hover {
background-image: image(url("${shutdown-hover}"));
}
#reboot {
background-image: image(url("${reboot}"));
}
+2 -2
View File
@@ -1,5 +1,5 @@
{ ... }: {
flake.homeModules.zoxide = { ... }: {
_: {
flake.homeModules.zoxide = _: {
programs.zoxide = {
enable = true;
enableZshIntegration = true;
+6 -6
View File
@@ -1,5 +1,5 @@
{ self, ... }: {
flake.homeModules.zsh-laptop = { ... }: {
{self, ...}: {
flake.homeModules.zsh-laptop = _: {
programs.zsh = {
shellAliases = {
snrt = "git -C ~/nixos add -A && time sudo nixos-rebuild test --flake ~/nixos/#laptop && pkill shell || true && pkill caelestia-shell || true && caelestia-shell -n > /dev/null 2>&1 & disown";
@@ -7,12 +7,12 @@
};
};
};
flake.homeModules.zsh = {pkgs,...}: {
flake.homeModules.zsh = {pkgs, ...}: {
home.packages = [
self.packages.${pkgs.system}.dejaManuallyDerived
#pkgs-unstable.deja
];
programs.zsh = {
enable = true;
autosuggestion.enable = false; # zsh-autocomplete is replaced by deja
@@ -25,7 +25,7 @@
command cat "$@"
fi
}
custom-eza() { # behaves differently if we just call it or if we pipe initContent
if [[ -t 1 ]]; then
eza -hlF -aa --color=always --hyperlink --group-directories-first --show-symlinks --icons=always --git --no-permissions "$@"
@@ -67,7 +67,7 @@
};
};
};
flake.homeModules.oh-my-zsh = { ... }: {
flake.homeModules.oh-my-zsh = _: {
programs.zsh.oh-my-zsh = {
enable = true;
theme = "jonathan";