Compare commits

..

3 commits

Author SHA1 Message Date
cca3ba7d09 hosts/default.nix: cleanup 2025-04-20 20:14:09 +02:00
2f33765b57 flake.lock: bump inputs 2025-04-20 20:14:09 +02:00
11cfbf696f networking/module.nix: networking improvements 2025-04-20 20:14:09 +02:00
13 changed files with 133 additions and 139 deletions

View file

@ -69,7 +69,7 @@
btop.enable = true; btop.enable = true;
nh.enable = true; nh.enable = true;
thunar.enable = true; thunar.enable = true;
schizofox.enable = false; schizofox.enable = true;
}; };
}; };
system.stateVersion = "23.11"; system.stateVersion = "23.11";

View file

@ -12,6 +12,7 @@
brave brave
cachix cachix
calc calc
# calibre
cbonsai cbonsai
cinny-desktop cinny-desktop
cmus cmus
@ -38,14 +39,19 @@
inetutils inetutils
jujutsu jujutsu
just just
jrnl
keepassxc keepassxc
lazygit lazygit
libtool libtool
librewolf librewolf
links2 links2
linuxHeaders linuxHeaders
moc
mpv mpv
ncmpcpp
neofetch
networkmanagerapplet networkmanagerapplet
nicotine-plus
nil nil
nitch nitch
obsidian obsidian
@ -53,10 +59,11 @@
microfetch microfetch
nmap nmap
pamixer pamixer
pwvucontrol pavucontrol
pdfarranger pdfarranger
pdfpc pdfpc
pfetch pfetch
pidgin
playerctl playerctl
polkit polkit
pulsemixer pulsemixer
@ -66,15 +73,26 @@
signal-desktop signal-desktop
smartmontools smartmontools
telegram-desktop telegram-desktop
texliveFull
tldr
thunderbird thunderbird
tor-browser
trash-cli trash-cli
typst typst
util-linux util-linux
v4l-utils v4l-utils
vesktop
vlc vlc
vscodium vscodium
weechat
wireguard-tools wireguard-tools
xournalpp xournalpp
zapzap
zip
zoxide
kakoune
kakoune-lsp
television
; ;
inherit (self.packages.${pkgs.stdenv.system}) helix; inherit (self.packages.${pkgs.stdenv.system}) helix;
}; };

View file

@ -4,7 +4,7 @@
pkgs, pkgs,
... ...
}: let }: let
inherit (lib.meta) getExe getExe'; inherit (lib.meta) getExe;
inherit (lib.modules) mkIf; inherit (lib.modules) mkIf;
inherit (lib.options) mkOption mkEnableOption; inherit (lib.options) mkOption mkEnableOption;
inherit (lib.types) str listOf; inherit (lib.types) str listOf;
@ -36,15 +36,14 @@ in {
config = mkIf cfg.enable { config = mkIf cfg.enable {
services.greetd = let services.greetd = let
session = { session = {
# command = '' command = ''
# ${pkgs.greetd.tuigreet}/bin/tuigreet \ ${pkgs.greetd.tuigreet}/bin/tuigreet \
# -c \"${cfg.session}\" \ -c \"${cfg.session}\" \
# -r -r
# -t --time-format "DD.MM.YYYY" -t --time-format "DD.MM.YYYY"
# --asteriks''; --asteriks'';
# command = "${getExe config.programs.uwsm.package} start hyprland-uwsm.desktop";
command = "${getExe config.programs.uwsm.package} start hyprland-uwsm.desktop"; # user = username;
user = username;
}; };
in { in {
enable = true; enable = true;

View file

@ -1,4 +1,5 @@
{ {
config,
lib, lib,
pkgs, pkgs,
... ...
@ -21,38 +22,29 @@ in {
RestartSec = 1; RestartSec = 1;
TimeoutStopSec = 10; TimeoutStopSec = 10;
CapabilityBoundingSet = [""];
DevicePolicy = "closed";
LockPersonality = true; LockPersonality = true;
MemoryDenyWriteExecute = true; MemoryDenyWriteExecute = true;
NoNewPrivileges = true; NoNewPrivileges = true;
PrivateDevices = true;
PrivateNetwork = true;
PrivateTmp = true; PrivateTmp = true;
PrivateUsers = true; PrivateDevices = true;
ProcSubset = "pid"; DevicePolicy = "closed";
PrivateNetwork = true;
ProtectClock = true; ProtectClock = true;
ProtectControlGroups = true; ProtectControlGroups = true;
ProtectControlGroup = true; ProtectControlGroup = true;
ProtectHome = "true";
ProtectHostname = true;
ProtectKernelLogs = true; ProtectKernelLogs = true;
ProtectKernelModules = true; ProtectKernelModules = true;
ProtectKernelTunables = true; ProtectKernelTunables = true;
ProtectProc = "invisible";
ProtectSystem = "strict"; ProtectSystem = "strict";
ProtectHome = "read-only";
RestrictNamespaces = true; RestrictNamespaces = true;
RestrictRealtime = true; RestrictRealtime = true;
RestrictRealTime = true; RestrictRealTime = true;
RestrictSUIDSGID = true; RestrictSUIDSGID = true;
SystemCallArchitectures = ["native"]; SystemCallFilter = "~@clock @cpu-emulation @debug @obsolete @module @mount @raw-io @reboot @swap";
SystemCallFilter = [
"@system-service"
"~@privileged"
"~@resources"
];
}; };
}; };
} }

View file

@ -4,43 +4,18 @@
pkgs, pkgs,
... ...
}: let }: let
inherit (builtins) toString isBool; inherit (lib.modules) mkIf;
inherit (lib.generators) toINI;
inherit (lib.modules) mkMerge mkIf;
inherit (lib.options) mkOption mkEnableOption; inherit (lib.options) mkOption mkEnableOption;
inherit (lib.types) str package; inherit (lib.types) str package;
inherit (lib.strings) escape;
inherit (lib.trivial) boolToString;
cfg = config.modules.theming.gtk; cfg = config.modules.theming.gtk;
toGtk3Ini = toINI {
mkKeyValue = key: value: let
value' =
if isBool value
then boolToString value
else toString value;
in "${escape ["="] key}=${value'}";
};
gtkIni = {
gtk-application-prefer-dark-theme = 1;
gtk-font-name = "Lexend 11";
gtk-icon-theme-name = "Papirus";
gtk-xft-antialias = 1;
gtk-xft-hinting = 1;
gtk-xft-hintstyle = "hintslight";
gtk-xft-rgba = "rgb";
gtk-cursor-theme-name = "BreezeX-RosePine-Linux";
gtk-theme-name = "Gruvbox-Dark";
};
in { in {
options.modules.theming.gtk = { options.modules.theming.gtk = {
enable = mkEnableOption "Wether to enable GTK theming"; enable = mkEnableOption "Wether to enable GTK theming";
theme = { theme = {
name = mkOption { name = mkOption {
description = "The GTK theme name"; description = "The GTK theme name";
default = "Gruvbox-Dark"; default = "Gruvbox-Dark-BL";
type = str; type = str;
}; };
package = mkOption { package = mkOption {
@ -53,7 +28,7 @@ in {
description = "The GTK icon theme"; description = "The GTK icon theme";
name = mkOption { name = mkOption {
description = "The GTK icon theme name"; description = "The GTK icon theme name";
default = "Papirus"; default = "Papirus-Dark";
type = str; type = str;
}; };
package = mkOption { package = mkOption {
@ -63,49 +38,28 @@ in {
}; };
}; };
}; };
config = let config = mkIf cfg.enable {
cursorSize = 32; # NOTE: we need this or gtk breaks
in programs.dconf.enable = true;
mkIf cfg.enable {
programs.dconf.enable = true;
environment = {
systemPackages = builtins.attrValues {
inherit
(pkgs)
rose-pine-cursor
gruvbox-gtk-theme
papirus-icon-theme
;
};
variables = {
GTK_THEME = cfg.theme.name;
XCURSOR_THEME = "BreezeX-RosePine-Linux";
XCURSOR_SIZE = toString cursorSize;
HYPRCURSOR_THEME = "BreezeX-RosePine-Linux"; environment = {
HYPRCURSOR_SIZE = toString cursorSize; systemPackages = builtins.attrValues {
}; inherit
etc = { (pkgs)
"xdg/gtk-4.0/settings.ini".text = toGtk3Ini { gruvbox-gtk-theme
Settings = gtkIni; papirus-icon-theme
}; ;
"xdg/gtk-3.0/settings.ini".text = toGtk3Ini { };
Settings = gtkIni; variables = let
}; cursorSize = 32;
in {
GTK_THEME = "Gruvbox-Dark";
XCURSOR_THEME = "BreezeX-RosePine-Linux";
XCURSOR_SIZE = cursorSize;
"xdg/gtk-2.0/gtkrc".text = '' HYPRCURSOR_THEME = "BreezeX-RosePine-Linux";
gtk-cursor-theme-name = BreezeX-RosePine-Linux HYPRCURSOR_SIZE = cursorSize;
gtk-cursor-theme-size = ${toString cursorSize}
gtk-theme-name = ${cfg.theme.name}
gtk-icon-theme-name = ${cfg.iconTheme.name}
gtk-font-name = Lexend 11
'';
"xdg/Xresources".text = ''
Xcursor.size: ${toString cursorSize}
Xcursor.theme: BreezeX-RosePine-Linux
'';
};
}; };
}; };
};
} }

View file

@ -4,15 +4,67 @@
pkgs, pkgs,
... ...
}: let }: let
inherit (builtins) toString isBool;
inherit (lib.generators) toINI;
inherit (lib.modules) mkMerge mkIf; inherit (lib.modules) mkMerge mkIf;
inherit (lib.options) mkEnableOption; inherit (lib.options) mkEnableOption;
inherit (lib.strings) escape;
inherit (lib.trivial) boolToString;
cfg = config.modules.theming; cfg = config.modules.theming;
toGtk3Ini = toINI {
mkKeyValue = key: value: let
value' =
if isBool value
then boolToString value
else toString value;
in "${escape ["="] key}=${value'}";
};
gtkIni = {
gtk-application-prefer-dark-theme = 1;
gtk-font-name = "Lexend 11";
gtk-icon-theme-name = "Papirus-Dark";
gtk-xft-antialias = 1;
gtk-xft-hinting = 1;
gtk-xft-hintstyle = "hintslight";
gtk-xft-rgba = "rgb";
gtk-cursor-theme-name = "BreezeX-RosePine-Linux";
gtk-theme-name = "Gruvbox-Dark";
};
in { in {
options.modules.theming = { options.modules.theming = {
qt.enable = mkEnableOption "qt theming"; qt.enable = mkEnableOption "qt theming";
}; };
config = config = mkMerge [
mkMerge [ (mkIf cfg.gtk.enable {
]; environment = {
systemPackages = builtins.attrValues {
inherit (pkgs) rose-pine-cursor;
};
etc = {
"xdg/gtk-4.0/settings.ini".text = toGtk3Ini {
Settings = gtkIni;
};
"xdg/gtk-3.0/settings.ini".text = toGtk3Ini {
Settings = gtkIni;
};
"xdg/gtk-2.0/gtkrc".text = ''
gtk-cursor-theme-name = BreezeX-RosePine-Linux
gtk-cursor-theme-size = 32
gtk-theme-name = Gruvbox-Dark
gtk-icon-theme-name = Papirus-Dark
gtk-font-name = Lexend 11
'';
"xdg/Xresources".text = ''
Xcursor.size: 32
Xcursor.theme: BreezeX-RosePine-Linux
'';
};
};
})
];
} }

View file

@ -35,17 +35,6 @@ in {
]; ];
boot = { boot = {
tmp.useTmpfs = true; tmp.useTmpfs = true;
consoleLogLevel = 0;
kernelParams = [
"quiet"
"splash"
"rd.systemd.show_status=false"
"rd.udev.log_level=3"
"udev.log_priority=3"
"boot.shell_on_fail"
];
initrd = { initrd = {
verbose = false; verbose = false;
systemd.enable = true; systemd.enable = true;

View file

@ -11,7 +11,7 @@ in {
config = mkIf cfg.enable { config = mkIf cfg.enable {
hardware.bluetooth = { hardware.bluetooth = {
enable = true; enable = true;
inherit (cfg) powerOnBoot; powerOnBoot = mkIf cfg.powerOnBoot true;
}; };
environment.systemPackages = builtins.attrValues { environment.systemPackages = builtins.attrValues {
inherit inherit

View file

@ -26,16 +26,15 @@ in {
services.resolved = { services.resolved = {
enable = true; enable = true;
dnssec = "false"; dnssec = "false";
dnsovertls = "oppertunistic";
# quad9 dns # quad9 dns
fallbackDns = ["9.9.9.9" "2620::fe::fe"]; fallbackDns = ["9.9.9.9" "2620::fe::fe"];
}; };
users.users.${username}.extraGroups = ["networkmanager"]; users.users.${username}.extraGroups = ["networkmanager"];
# systemd = { systemd = {
# network = { network = {
# enable = true; enable = true;
# wait-online.anyInterface = true; wait-online.anyInterface = true;
# }; };
# }; };
} }

View file

@ -3,8 +3,8 @@
in { in {
networking.networkmanager = { networking.networkmanager = {
enable = true; enable = true;
# # Removes about 2GB of stuff we do no need. # Removes about 2GB of stuff we do no need.
# plugins = mkForce []; plugins = mkForce [];
dns = "systemd-resolved"; dns = "systemd-resolved";
unmanaged = [ unmanaged = [

View file

@ -2,8 +2,7 @@ _: {
programs.hyprland.settings = { programs.hyprland.settings = {
#Decoration settings #Decoration settings
decoration = { decoration = {
rounding = 10; rounding = 0;
rounding_power = 3;
blur = { blur = {
enabled = false; enabled = false;
size = 3; size = 3;
@ -17,15 +16,15 @@ _: {
]; ];
# Hyprland anomations, using the above bezier curves # Hyprland anomations, using the above bezier curves
animations = { animations = {
enabled = true; enabled = false;
# animation = [
# "windows, 1, 4, dupa, popin"
# "windowsOut, 1, 4, dupa, slide"
# "border, 1, 15, default"
# "fade, 1, 10, default"
# "workspaces, 1, 5, dupa, slidevert"
# ];
}; };
animation = [
"windows, 1, 4, dupa, popin"
"windowsOut, 1, 4, dupa, slide"
"border, 1, 15, default"
"fade, 1, 10, default"
"workspaces, 1, 5, dupa, slidevert"
];
cursor = { cursor = {
hide_on_key_press = true; hide_on_key_press = true;
@ -36,10 +35,8 @@ _: {
enable_swallow = true; enable_swallow = true;
swallow_regex = "foot"; swallow_regex = "foot";
focus_on_activate = true; focus_on_activate = true;
vrr = 1; vrr = 1;
vfr = true; vfr = true;
animate_manual_resizes = false; animate_manual_resizes = false;
animate_mouse_windowdragging = false; animate_mouse_windowdragging = false;
force_default_wallpaper = 0; force_default_wallpaper = 0;

View file

@ -5,7 +5,6 @@
... ...
}: let }: let
# inherit (config.modules.style) cursor; # inherit (config.modules.style) cursor;
inherit (lib.meta) getExe;
in { in {
programs.hyprland.settings = { programs.hyprland.settings = {
# Hyprland settings # Hyprland settings
@ -14,7 +13,6 @@ in {
"uwsm finalize" "uwsm finalize"
"hyprctl setcursor BreezeX-RosePine-Linux 32" "hyprctl setcursor BreezeX-RosePine-Linux 32"
"hyprctl seterror disable"
"[workspace special:keepassxc; silent;tile] ${pkgs.keepassxc}/bin/keepassxc" "[workspace special:keepassxc; silent;tile] ${pkgs.keepassxc}/bin/keepassxc"
"[workspace special:audio; silent;tile] ${pkgs.pwvucontrol}/bin/pwvucontrol" "[workspace special:audio; silent;tile] ${pkgs.pwvucontrol}/bin/pwvucontrol"
@ -27,7 +25,6 @@ in {
"${pkgs.lxqt.lxqt-policykit}/bin/lxqt-policykit-agent" "${pkgs.lxqt.lxqt-policykit}/bin/lxqt-policykit-agent"
"hyprctl dispatch split-workspace 1" "hyprctl dispatch split-workspace 1"
"${getExe pkgs.hyprlock}"
]; ];
}; };
} }

View file

@ -57,9 +57,6 @@ in {
no_border_on_floating = true; no_border_on_floating = true;
}; };
# No annoying startup errors
debug.suppress_errors = true;
ecosystem.no_update_news = true; ecosystem.no_update_news = true;
plugin = { plugin = {