Add new server modules and configurations for various services
/ update-readme (push) Has been cancelled

- Introduced `default-creds` module for managing default credentials with Umami integration.
- Added `fail2ban` module for brute-force attack protection with configurable ban times.
- Created `firewall` module to enable and configure basic firewall settings.
- Implemented `gitea` module for self-hosted Git service with PostgreSQL backend.
- Developed `glance` module for a customizable dashboard with various widgets and themes.
- Added `iknowyou` module for a self-hosted password manager with production and demo environments.
- Introduced `kernel-hardening` module for enhancing kernel security settings.
- Created `mazanoke` module for a simple web application with Nginx integration.
- Added `mealie` module for a self-hosted meal planning application.
- Implemented `stirling-pdf` module for PDF generation service.
- Developed `umami` module for self-hosted analytics with secret management.
- Added `ssh` module for secure SSH configuration with user restrictions.
- Introduced `nixy` theme for a customized aesthetic experience across services.
This commit is contained in:
KptltD00M
2026-06-16 23:03:39 +02:00
commit 5082521524
140 changed files with 9740 additions and 0 deletions
@@ -0,0 +1,50 @@
{
pkgs,
config,
...
}: let
inherit (config.theme) bar-rounding bar-thickness;
inherit (config.stylix) fonts;
in {
home.packages = with pkgs; [
papirus-icon-theme
];
programs.caelestia.settings = {
paths.sessionGif = ./session-gif-hacker-cat.gif;
background.enabled = false;
appearance = {
transparency = {
enabled = true;
base = config.theme.active-opacity;
layers = config.theme.inactive-opacity;
};
font.family = {
material = "Material Symbols Rounded";
mono = fonts.monospace.name;
sans = fonts.sansSerif.name;
};
};
utilities = {
enabled = true;
maxToasts = 4;
toasts = {
audioInputChanged = false;
audioOutputChanged = false;
capsLockChanged = false;
chargingChanged = true;
configLoaded = false;
dndChanged = true;
gameModeChanged = true;
numLockChanged = false;
nowPlaying = false;
kbLayoutChanged = false;
};
};
dashboard.showOnHover = false;
border = {
rounding = bar-rounding;
thickness = bar-thickness;
};
};
}
+68
View File
@@ -0,0 +1,68 @@
{
programs.caelestia.settings.bar = {
clock.showIcon = false;
popouts.activeWindow = false;
persistent = true;
status = {
showBattery = true;
showMicrophone = false;
showLockStatus = false;
showBluetooth = true;
showAudio = true;
showKbLayout = false;
showNetwork = true;
};
workspaces = {
activeIndicator = true;
activeLabel = "󰪥 ";
activeTrail = false;
label = " ";
occupiedBg = true;
occupiedLabel = "󰪥 ";
showWindows = false;
shown = 5;
};
entries = [
{
id = "logo";
enabled = true;
}
{
id = "workspaces";
enabled = true;
}
{
id = "spacer";
enabled = true;
}
{
id = "activeWindow";
enabled = true;
}
{
id = "spacer";
enabled = true;
}
{
id = "tray";
enabled = true;
}
{
id = "clock";
enabled = true;
}
{
id = "statusIcons";
enabled = true;
}
{
id = "power";
enabled = true;
}
];
tray = {
background = false;
recolour = false;
};
};
}
+80
View File
@@ -0,0 +1,80 @@
# Caelestia Shell Home Manager Configuration
# See https://github.com/caelestia-dots/shell
{
pkgs,
inputs,
lib,
...
}: {
imports = [
inputs.caelestia-shell.homeManagerModules.default
./bar.nix
./launcher.nix
./appearance.nix
./scheme.nix
./swappy.nix
];
programs.caelestia = {
enable = true;
systemd.enable = false;
settings = {
services.weatherLocation = "Paris";
general = {
apps = {
terminal = ["ghostty"];
audio = ["pavucontrol"];
explorer = ["thunar"];
};
idle = {
timeouts = [];
};
};
};
cli = {
enable = true;
settings.theme = {
enableTerm = false;
enableDiscord = false;
enableSpicetify = false;
enableBtop = false;
enableCava = false;
enableHypr = false;
enableGtk = false;
enableQt = false;
};
};
};
home.packages = with pkgs; [
gpu-screen-recorder
];
wayland.windowManager.hyprland.settings.exec-once = [
"uwsm app -- caelestia resizer -d"
"uwsm app -- caelestia shell -d"
"caelestia scheme set -n onedark"
"caelestia scheme set -n custom"
];
# shell.json is managed by home-manager (read-only symlink) but caelestia
# needs to write to it at runtime: replace the symlink with a mutable copy.
# The stale .hm-backup must be removed before linkGeneration so HM can
# back up the runtime-modified shell.json without hitting a conflict.
home.activation.caelestiaCleanBackup = lib.hm.dag.entryBefore ["linkGeneration"] ''
$DRY_RUN_CMD rm -f "$HOME/.config/caelestia/shell.json.hm-backup"
'';
home.activation.caelestiaWritableShellConfig = lib.hm.dag.entryAfter ["linkGeneration"] ''
if [ -L "$HOME/.config/caelestia/shell.json" ]; then
$DRY_RUN_CMD cp --remove-destination \
"$(readlink -f "$HOME/.config/caelestia/shell.json")" \
"$HOME/.config/caelestia/shell.json"
fi
'';
services.cliphist = {
enable = true;
allowImages = true;
};
}
+188
View File
@@ -0,0 +1,188 @@
{
programs.caelestia.settings = {
session.commands = {
shutdown = [
"systemctl"
"poweroff"
];
logout = [
"loginctl"
"lock-session"
];
hibernate = [
"systemctl"
"hibernate"
];
reboot = [
"systemctl"
"reboot"
];
};
launcher = {
actionPrefix = "/";
actions = [
{
name = "Calculator";
icon = "calculate";
description = "Do simple math equations (powered by Qalc)";
command = [
"autocomplete"
"calc"
];
enabled = true;
dangerous = false;
}
{
name = "Shutdown";
icon = "power_settings_new";
description = "Shutdown the system";
command = [
"systemctl"
"poweroff"
];
enabled = true;
dangerous = true;
}
{
name = "Reboot";
icon = "cached";
description = "Reboot the system";
command = [
"systemctl"
"reboot"
];
enabled = true;
dangerous = true;
}
{
name = "Logout";
icon = "exit_to_app";
description = "Log out of the current session";
command = [
"loginctl"
"terminate-user"
""
];
enabled = true;
dangerous = true;
}
{
name = "Lock";
icon = "lock";
description = "Lock the current session";
command = [
"loginctl"
"lock-session"
];
enabled = true;
dangerous = false;
}
{
name = "Sleep";
icon = "bedtime";
description = "Suspend then hibernate";
command = [
"systemctl"
"suspend-then-hibernate"
];
enabled = true;
dangerous = false;
}
{
name = "Restart caelestia";
icon = "cached";
description = "Restart caelestia";
command = [
"hyprctl"
"dispatch"
"exec"
"caelestia-shell kill | sleep 1 | caelestia-shell"
];
enabled = true;
dangerous = false;
}
{
name = "Emoji Picker";
icon = "mood";
description = "Toggle the emoji picker";
command = [
"caelestia"
"emoji"
"-p"
];
enabled = true;
dangerous = false;
}
{
name = "Clipboard History";
icon = "content_paste";
description = "Toggle the clipboard history";
command = [
"caelestia"
"clipboard"
];
enabled = true;
dangerous = false;
}
{
name = "Delete from Clipboard History";
icon = "content_paste_off";
description = "Delete a line from the clipboard history";
command = [
"caelestia"
"clipboard"
];
enabled = true;
dangerous = false;
}
{
name = "Night Shift";
icon = "moon_stars";
description = "Toggle Night Shift, the blue light filter";
command = ["nightshift-toggle"];
enabled = true;
dangerous = false;
}
{
name = "Hyprpicker";
icon = "colorize";
description = "Pick an hex color";
command = [
"hyprpicker"
"-a"
];
enabled = true;
dangerous = false;
}
{
name = "Run in background";
icon = "play_circle";
description = "Type and run any shell command in the background";
command = [
"ghostty"
"--title=run-bg"
"-e"
"bash"
"-c"
"printf 'Run: '; read -r cmd; [ -n \"$cmd\" ] && hyprctl dispatch exec \"$cmd\""
];
enabled = true;
dangerous = false;
}
];
dragThreshold = 50;
enableDangerousActions = false;
maxShown = 7;
specialPrefix = "@";
useFuzzy = {
apps = false;
actions = false;
schemes = false;
variants = false;
wallpapers = false;
};
showOnHover = false;
hiddenApps = [];
};
};
}
+137
View File
@@ -0,0 +1,137 @@
# This Nix module customizes the color scheme of the Caelestia CLI application using the Stylix base16 color palette.
{
pkgs,
inputs,
config,
...
}: let
colors = config.lib.stylix.colors;
customSchemeFile = pkgs.writeText "custom-dark.txt" ''
primary_paletteKeyColor ${colors.base0D}
secondary_paletteKeyColor ${colors.base04}
tertiary_paletteKeyColor ${colors.base08}
neutral_paletteKeyColor ${colors.base03}
neutral_variant_paletteKeyColor ${colors.base03}
background ${colors.base00}
onBackground ${colors.base05}
surface ${colors.base00}
surfaceDim ${colors.base00}
surfaceBright ${colors.base02}
surfaceContainerLowest ${colors.base01}
surfaceContainerLow ${colors.base01}
surfaceContainer ${colors.base01}
surfaceContainerHigh ${colors.base02}
surfaceContainerHighest ${colors.base02}
onSurface ${colors.base05}
surfaceVariant ${colors.base02}
onSurfaceVariant ${colors.base04}
inverseSurface ${colors.base05}
inverseOnSurface ${colors.base00}
outline ${colors.base03}
outlineVariant ${colors.base02}
shadow ${colors.base00}
scrim ${colors.base00}
surfaceTint ${colors.base0D}
primary ${colors.base0D}
onPrimary ${colors.base00}
primaryContainer ${colors.base0D}
onPrimaryContainer ${colors.base05}
inversePrimary ${colors.base0D}
secondary ${colors.base0C}
onSecondary ${colors.base00}
secondaryContainer ${colors.base02}
onSecondaryContainer ${colors.base0C}
tertiary ${colors.base08}
onTertiary ${colors.base00}
tertiaryContainer ${colors.base08}
onTertiaryContainer ${colors.base00}
error ${colors.base08}
onError ${colors.base00}
errorContainer ${colors.base08}
onErrorContainer ${colors.base05}
primaryFixed ${colors.base0D}
primaryFixedDim ${colors.base0D}
onPrimaryFixed ${colors.base00}
onPrimaryFixedVariant ${colors.base00}
secondaryFixed ${colors.base0C}
secondaryFixedDim ${colors.base0C}
onSecondaryFixed ${colors.base00}
onSecondaryFixedVariant ${colors.base02}
tertiaryFixed ${colors.base08}
tertiaryFixedDim ${colors.base08}
onTertiaryFixed ${colors.base00}
onTertiaryFixedVariant ${colors.base00}
term0 ${colors.base00}
term1 ${colors.base08}
term2 ${colors.base0B}
term3 ${colors.base0A}
term4 ${colors.base0D}
term5 ${colors.base0E}
term6 ${colors.base0C}
term7 ${colors.base05}
term8 ${colors.base03}
term9 ${colors.base08}
term10 ${colors.base0B}
term11 ${colors.base0A}
term12 ${colors.base0D}
term13 ${colors.base0E}
term14 ${colors.base0C}
term15 ${colors.base07}
rosewater ${colors.base06}
flamingo ${colors.base0F}
pink ${colors.base0E}
mauve ${colors.base0D}
red ${colors.base08}
maroon ${colors.base08}
peach ${colors.base09}
yellow ${colors.base0A}
green ${colors.base0B}
teal ${colors.base0C}
sky ${colors.base0C}
sapphire ${colors.base0C}
blue ${colors.base0D}
lavender ${colors.base0D}
klink ${colors.base0D}
klinkSelection ${colors.base0D}
kvisited ${colors.base0E}
kvisitedSelection ${colors.base0E}
knegative ${colors.base08}
knegativeSelection ${colors.base08}
kneutral ${colors.base0A}
kneutralSelection ${colors.base0A}
kpositive ${colors.base0B}
kpositiveSelection ${colors.base0B}
text ${colors.base05}
subtext1 ${colors.base04}
subtext0 ${colors.base03}
overlay2 ${colors.base03}
overlay1 ${colors.base03}
overlay0 ${colors.base02}
surface2 ${colors.base02}
surface1 ${colors.base01}
surface0 ${colors.base01}
base ${colors.base00}
mantle ${colors.base00}
crust ${colors.base00}
success ${colors.base0B}
onSuccess ${colors.base00}
successContainer ${colors.base0B}
onSuccessContainer ${colors.base05}
'';
colorsHash = builtins.hashString "sha256" (builtins.toJSON colors);
customCli =
inputs.caelestia-cli.packages.${pkgs.stdenv.hostPlatform.system}.default.overrideAttrs
(oldAttrs: {
name = "${oldAttrs.name or "caelestia-cli"}-themed-${colorsHash}";
postUnpack = ''
mkdir -p $sourceRoot/src/caelestia/data/schemes/custom/main
cp ${customSchemeFile} $sourceRoot/src/caelestia/data/schemes/custom/main/dark.txt
echo "Custom scheme added to source"
'';
});
in {
programs.caelestia.cli.package = customCli;
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

+11
View File
@@ -0,0 +1,11 @@
{
xdg.configFile."swappy/config".text = ''
[Default]
save_dir=~/Pictures/Screenshots
save_filename_format=screenshot-%Y%m%d-%H%M%S.png
show_panel=false
line_size=5
text_size=20
text_font=sans-serif
'';
}
+52
View File
@@ -0,0 +1,52 @@
{config, ...}: let
animationSpeed = config.theme.animation-speed;
animationDuration =
if animationSpeed == "slow"
then "4"
else if animationSpeed == "medium"
then "2.5"
else "1.5";
borderDuration =
if animationSpeed == "slow"
then "10"
else if animationSpeed == "medium"
then "6"
else "3";
in {
wayland.windowManager.hyprland.settings = {
animations = {
enabled = true;
bezier = [
"linear, 0, 0, 1, 1"
"md3_standard, 0.2, 0, 0, 1"
"md3_decel, 0.05, 0.7, 0.1, 1"
"md3_accel, 0.3, 0, 0.8, 0.15"
"overshot, 0.05, 0.9, 0.1, 1.1"
"crazyshot, 0.1, 1.5, 0.76, 0.92"
"hyprnostretch, 0.05, 0.9, 0.1, 1.0"
"menu_decel, 0.1, 1, 0, 1"
"menu_accel, 0.38, 0.04, 1, 0.07"
"easeInOutCirc, 0.85, 0, 0.15, 1"
"easeOutCirc, 0, 0.55, 0.45, 1"
"easeOutExpo, 0.16, 1, 0.3, 1"
"softAcDecel, 0.26, 0.26, 0.15, 1"
"md2, 0.4, 0, 0.2, 1"
];
animation = [
"windows, 1, ${animationDuration}, md3_decel, popin 60%"
"windowsIn, 1, ${animationDuration}, md3_decel, popin 60%"
"windowsOut, 1, ${animationDuration}, md3_accel, popin 60%"
"border, 1, ${borderDuration}, default"
"fade, 1, ${animationDuration}, md3_decel"
"layersIn, 1, ${animationDuration}, menu_decel, slide"
"layersOut, 1, ${animationDuration}, menu_accel"
"fadeLayersIn, 1, ${animationDuration}, menu_decel"
"fadeLayersOut, 1, ${animationDuration}, menu_accel"
"workspaces, 1, ${animationDuration}, menu_decel, slide"
"specialWorkspace, 1, ${animationDuration}, md3_decel, slidevert"
];
};
};
}
+207
View File
@@ -0,0 +1,207 @@
{
pkgs,
lib,
config,
...
}: let
colors = config.lib.stylix.colors;
mkMenu = menu: let
configFile = pkgs.writeText "config.yaml" (
lib.generators.toYAML {} {
anchor = "bottom-right";
border = "#${colors.base0D}80";
background = "#${colors.base01}EE";
color = "#${colors.base05}";
margin_right = 15;
margin_bottom = 15;
rows_per_column = 5;
inherit menu;
}
);
in
pkgs.writeShellScriptBin "menu" ''
exec ${lib.getExe pkgs.wlr-which-key} ${configFile}
'';
in {
wayland.windowManager.hyprland.settings = {
"$mod" = "SUPER";
"$shiftMod" = "SUPER_SHIFT";
bind =
[
# Applications
(
"$shiftMod, A, exec, "
+ lib.getExe (mkMenu [
{
key = "a";
desc = "Proton Authenticator";
cmd = "env WEBKIT_DISABLE_COMPOSITING_MODE=1 ${pkgs.proton-authenticator}/bin/proton-authenticator";
}
{
key = "p";
desc = "Proton Pass";
cmd = "${pkgs.proton-pass}/bin/proton-pass";
}
{
key = "v";
desc = "Proton VPN";
cmd = "${pkgs.proton-vpn}/bin/protonvpn-app";
}
{
key = "c";
desc = "Proton Calendar";
cmd = "${config.programs.helium.package}/bin/helium 'https://calendar.proton.me/'";
}
{
key = "m";
desc = "Proton Mail";
cmd = "${config.programs.helium.package}/bin/helium 'https://mail.proton.me/'";
}
{
key = "o";
desc = "Obsidian";
cmd = "${pkgs.obsidian}/bin/obsidian";
}
{
key = "s";
desc = "Signal";
cmd = "${pkgs.signal-desktop}/bin/signal-desktop";
}
{
key = "t";
desc = "TickTick";
cmd = "${pkgs.ticktick}/bin/ticktick";
}
{
key = "b";
desc = "Helium";
cmd = "${config.programs.helium.package}/bin/helium";
}
{
key = "i";
desc = "Helium (Incognito)";
cmd = "${config.programs.helium.package}/bin/helium --incognito";
}
])
)
"$mod,B, exec, uwsm app -- ${config.programs.helium.package}/bin/helium" # Browser
# Power
"$mod, X, global, caelestia:session" # Powermenu
(
"$shiftMod, X, exec, "
+ lib.getExe (mkMenu [
{
key = "l";
desc = "Lock";
cmd = "hyprctl dispatch global caelestia:lock";
}
{
key = "s";
desc = "Suspend";
cmd = "systemctl suspend";
}
{
key = "r";
desc = "Reboot";
cmd = "systemctl reboot";
}
{
key = "p";
desc = "Power Off";
cmd = "systemctl poweroff";
}
{
key = "n";
desc = "Nightshift";
cmd = "nightshift-toggle";
}
{
key = "c";
desc = "Restart caelestia";
cmd = "hyprctl dispatch exec 'caelestia-shell kill | sleep 1 | caelestia-shell'";
}
])
)
# Quick launch
"$mod,RETURN, exec, uwsm app -- ${pkgs.ghostty}/bin/ghostty" # Ghostty (terminal)
"$mod,E, exec, uwsm app -- ${pkgs.thunar}/bin/thunar" # Thunar
"$shiftMod, E, exec, pkill fuzzel || caelestia emoji -p" # Emoji picker
"$mod, SPACE, global, caelestia:launcher" # Launcher
"$mod, N, exec, caelestia shell drawers toggle sidebar" # Sidebar (Notifications, quick actions)
"$mod, D, exec, caelestia shell drawers toggle dashboard" # Dashboard
# Windows
"$mod,Q, killactive," # Close window
"$mod,F, fullscreen" # Toggle Fullscreen
"$shiftMod,F, togglefloating," # Toggle Floating
# Focus Windows
"$mod,H, movefocus, l" # Move focus left
"$mod,J, movefocus, d" # Move focus Down
"$mod,K, movefocus, u" # Move focus Up
"$mod,L, movefocus, r" # Move focus Right
"$shiftMod,H, focusmonitor, -1" # Focus previous monitor
"$shiftMod,J, layoutmsg, removemaster" # Remove from master
"$shiftMod,K, layoutmsg, addmaster" # Add to master
"$shiftMod,L, focusmonitor, 1" # Focus next monitor
# Utilities
"$shiftMod, SPACE, exec, caelestia shell gameMode toggle" # Toggle Focus/Game mode
"$shiftMod, S, global, caelestia:screenshotFreeze" # Capture region (freeze)
", Print, global, caelestia:screenshotFreeze" # Capture region (freeze)
"$shiftMod+Alt, S, global, caelestia:screenshot" # Capture region
]
++ (builtins.concatLists (
builtins.genList (
i: let
ws = i + 1;
in [
"$mod,code:1${toString i}, workspace, ${toString ws}"
"$mod SHIFT,code:1${toString i}, movetoworkspace, ${toString ws}"
]
)
9
));
bindm = [
"$mod,mouse:272, movewindow" # Move Window (mouse)
"$mod,R, resizewindow" # Resize Window (mouse)
];
bindl = [
# Brightness
", XF86MonBrightnessUp, global, caelestia:brightnessUp"
", XF86MonBrightnessDown, global, caelestia:brightnessDown"
# Media
", XF86AudioPlay, global, caelestia:mediaToggle"
", XF86AudioPause, global, caelestia:mediaToggle"
", XF86AudioNext, global, caelestia:mediaNext"
", XF86AudioPrev, global, caelestia:mediaPrev"
", XF86AudioStop, global, caelestia:mediaStop"
# Sound
", XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
", XF86AudioRaiseVolume, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ 0; wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+"
", XF86AudioLowerVolume, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ 0; wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"
];
bindin = [
# Launcher
"$mod, mouse:272, global, caelestia:launcherInterrupt"
"$mod, mouse:273, global, caelestia:launcherInterrupt"
"$mod, mouse:274, global, caelestia:launcherInterrupt"
"$mod, mouse:275, global, caelestia:launcherInterrupt"
"$mod, mouse:276, global, caelestia:launcherInterrupt"
"$mod, mouse:277, global, caelestia:launcherInterrupt"
"$mod, mouse_up, global, caelestia:launcherInterrupt"
"$mod, mouse_down, global, caelestia:launcherInterrupt"
];
};
}
+171
View File
@@ -0,0 +1,171 @@
# Hyprland is a dynamic tiling Wayland compositor that is highly customizable and performant.
{
pkgs,
config,
lib,
...
}: let
border-size = config.theme.border-size;
gaps-in = config.theme.gaps-in;
gaps-out = config.theme.gaps-out;
active-opacity = config.theme.active-opacity;
inactive-opacity = config.theme.inactive-opacity;
rounding = config.theme.rounding;
blur = config.theme.blur;
keyboardLayout = config.var.keyboardLayout;
background = "rgba(" + config.lib.stylix.colors.base00 + "EE)";
in {
imports = [
./animations.nix
./bindings.nix
./polkitagent.nix
./keyboard-backlight.nix # CHANGEME: This is for omen laptop only
];
home.packages = with pkgs; [
qt5.qtwayland
qt6.qtwayland
libsForQt5.qt5ct
qt6Packages.qt6ct
xcb-util-cursor
libxcb
hyprland-qtutils
adw-gtk3
hyprshot
hyprpicker
swappy
imv
wf-recorder
wlr-randr
brightnessctl
gnome-themes-extra
dconf
wayland-utils
wayland-protocols
];
wayland.windowManager.hyprland = {
enable = true;
configType = "hyprlang";
xwayland.enable = true;
systemd = {
enable = false;
variables = [
"--all"
]; # https://wiki.hyprland.org/Nix/Hyprland-on-Home-Manager/#programs-dont-work-in-systemd-services-but-do-on-the-terminal
};
package = null;
portalPackage = null;
settings = {
exec-once = [
"dbus-update-activation-environment --systemd --all &"
];
monitor = [
",prefered,auto,1" # default
];
env = [
"XDG_CURRENT_DESKTOP,Hyprland"
"XDG_SESSION_TYPE,wayland"
"XDG_SESSION_DESKTOP,Hyprland"
"ANKI_WAYLAND,1"
"DISABLE_QT5_COMPAT,0"
"QT_AUTO_SCREEN_SCALE_FACTOR,1"
"QT_QPA_PLATFORM,wayland;xcb"
"QT_QPA_PLATFORMTHEME,gtk3"
"QT_WAYLAND_DISABLE_WINDOWDECORATION,1"
"ELECTRON_OZONE_PLATFORM_HINT,auto"
"DIRENV_LOG_FORMAT,"
"SDL_VIDEODRIVER,wayland"
"CLUTTER_BACKEND,wayland"
];
cursor = {
no_hardware_cursors = true;
default_monitor = "eDP-2";
};
general = {
resize_on_border = true;
gaps_in = gaps-in;
gaps_out = gaps-out;
border_size = border-size;
layout = "master";
"col.inactive_border" = lib.mkForce background;
};
decoration = {
active_opacity = active-opacity;
inactive_opacity = inactive-opacity;
rounding = rounding;
shadow = {
enabled = true;
range = 20;
render_power = 3;
};
blur = {
enabled =
if blur
then "true"
else "false";
size = 18;
};
};
master = {
new_status = "slave";
allow_small_split = true;
mfact = 0.5;
};
gesture = "3, horizontal, workspace";
windowrule = [
"match:class .*, suppress_event maximize"
"match:class helium, suppress_event fullscreen"
"match:class helium, sync_fullscreen false"
"match:class proton-authenticator, float on"
"match:class proton-authenticator, center on"
"match:class proton-authenticator, size 500 400"
"match:class protonvpn-app, float on"
"match:class protonvpn-app, center on"
"match:class protonvpn-app, size 500 400"
"match:title run-bg, float on"
"match:title run-bg, center on"
"match:title run-bg, size 700 80"
];
misc = {
disable_hyprland_logo = true;
disable_splash_rendering = true;
disable_autoreload = true;
focus_on_activate = true;
};
input = {
kb_layout = keyboardLayout;
kb_options = "caps:escape";
follow_mouse = 1;
sensitivity = 0.5;
repeat_delay = 300;
repeat_rate = 50;
numlock_by_default = true;
touchpad = {
natural_scroll = true;
clickfinger_behavior = true;
};
};
ecosystem = {
no_update_news = true;
};
};
};
}
@@ -0,0 +1,44 @@
# Turn the keyboard red/off when the battery is low
# Include this one only if you have a omen laptop with RGB keyboard
{
pkgs,
config,
...
}: let
alert-when-low-battery = false;
keyboard-backlight = pkgs.writeShellScriptBin "keyboard-backlight" ''
function set_keyboard_backlight {
local color=$1
echo $color > /sys/devices/platform/hp-wmi/rgb_zones/zone00
echo $color > /sys/devices/platform/hp-wmi/rgb_zones/zone01
echo $color > /sys/devices/platform/hp-wmi/rgb_zones/zone02
echo $color > /sys/devices/platform/hp-wmi/rgb_zones/zone03
}
state="white"
set_keyboard_backlight ${config.lib.stylix.colors.base0D}
if [ "${toString alert-when-low-battery}" = "false" ]; then
exit 0
fi
while true; do
BATTERY_LEVEL=$(cat /sys/class/power_supply/BAT*/capacity)
IS_CHARGING=$(cat /sys/class/power_supply/BAT*/status)
if [[ $BATTERY_LEVEL -le 10 && $IS_CHARGING != "Charging" ]]; then
if [[ $state == "red" ]];then
state="white"
set_keyboard_backlight "000000"
else
state="red"
set_keyboard_backlight "FF0000"
fi
else
state="white"
set_keyboard_backlight ${config.lib.stylix.colors.base0D}
fi
sleep 2
done
'';
command = "bash ${keyboard-backlight}/bin/keyboard-backlight &";
in {
wayland.windowManager.hyprland.settings.exec-once = [command];
}
+6
View File
@@ -0,0 +1,6 @@
# HyprPolkitAgent is a simple polkit agent for wayland compositors
{pkgs, ...}: {
home.packages = with pkgs; [hyprpolkitagent];
wayland.windowManager.hyprland.settings.exec-once = ["systemctl --user start hyprpolkitagent"];
}
+16
View File
@@ -0,0 +1,16 @@
# Hyprpaper is used to set the wallpaper on the system
{lib, ...}: {
# The wallpaper is set by stylix
services.hyprpaper = {
enable = true;
settings = {
ipc = "on";
splash = false;
};
};
systemd.user.services.hyprpaper.Unit.After = lib.mkForce "graphical-session.target";
wayland.windowManager.hyprland.settings.exec-once = [
"systemctl --user enable --now hyprpaper.service"
];
}
+150
View File
@@ -0,0 +1,150 @@
# Mime type associations for the system.
{
lib,
pkgs,
...
}:
with lib; let
defaultApps = {
# check desktop files here: `ls $(echo $XDG_DATA_DIRS| sed "s/:/ /g")`
text = [
# "org.gnome.TextEditor.desktop"
"nvim-ghostty.desktop"
];
code = ["nvim-ghostty.desktop"];
image = ["imv-dir.desktop"];
audio = ["mpv.desktop"];
video = ["mpv.desktop"];
directory = ["thunar.desktop"];
office = ["libreoffice.desktop"];
pdf = ["zathura.desktop"];
terminal = ["ghostty.desktop"];
archive = ["xarchiver.desktop"];
browser = ["helium.desktop"];
};
mimeMap = {
text = ["text/plain"];
code = [
"text/x-csrc"
"text/x-chdr"
"text/x-c++src"
"text/x-c++hdr"
"text/x-rust"
"text/x-go"
"text/x-java"
"text/x-csharp"
"text/x-python"
"application/x-shellscript"
"text/javascript"
"application/javascript"
"text/css"
"text/x-php"
"text/x-ruby"
"application/json"
"application/xml"
"text/xml"
"text/x-yaml"
"application/x-yaml"
"application/toml"
"text/x-nix"
"text/markdown"
"text/x-dockerfile"
"application/x-yaml"
"text/x-terraform"
"application/x-perl"
"text/x-lua"
"text/x-haskell"
];
image = [
"image/bmp"
"image/gif"
"image/jpeg"
"image/jpg"
"image/png"
"image/svg+xml"
"image/tiff"
"image/vnd.microsoft.icon"
"image/webp"
];
audio = [
"audio/aac"
"audio/mpeg"
"audio/ogg"
"audio/opus"
"audio/wav"
"audio/webm"
"audio/x-matroska"
];
video = [
"video/mp2t"
"video/mp4"
"video/mpeg"
"video/ogg"
"video/webm"
"video/x-flv"
"video/x-matroska"
"video/x-msvideo"
];
directory = ["inode/directory"];
office = [
"application/vnd.oasis.opendocument.text"
"application/vnd.oasis.opendocument.spreadsheet"
"application/vnd.oasis.opendocument.presentation"
"application/vnd.openxmlformats-officedocument.wordprocessingml.document"
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
"application/vnd.openxmlformats-officedocument.presentationml.presentation"
"application/msword"
"application/vnd.ms-excel"
"application/vnd.ms-powerpoint"
"application/rtf"
];
pdf = ["application/pdf"];
terminal = ["terminal"];
archive = [
"application/zip"
"application/rar"
"application/7z"
"application/*tar"
];
browser = [
"text/html"
"application/xhtml+xml"
"x-scheme-handler/http"
"x-scheme-handler/https"
"x-scheme-handler/ftp"
];
};
nvim-ghostty = pkgs.makeDesktopItem {
name = "nvim-ghostty";
desktopName = "Neovim (Ghostty)";
exec = ''ghostty --title="Neovim Editor" -e nvim %F'';
terminal = false;
categories = [
"Development"
"TextEditor"
];
mimeTypes = mimeMap.code ++ mimeMap.text;
};
associations = with lists;
listToAttrs (
flatten (mapAttrsToList (key: map (type: attrsets.nameValuePair type defaultApps."${key}")) mimeMap)
);
in {
home.packages = [nvim-ghostty];
xdg = {
configFile."mimeapps.list".force = true;
mimeApps = {
enable = true;
associations.added = associations;
defaultApplications = associations;
};
};
}
+8
View File
@@ -0,0 +1,8 @@
# Udiskie is a simple daemon that uses udisks to automatically mount removable storage devices.
{
services.udiskie = {
enable = true;
notify = true;
automount = true;
};
}