Compare commits

..

No commits in common. "d472a99976d4543bf4825998b66eb342642535a8" and "76396da7ba082e70635eb4d11339bb995ca56f3a" have entirely different histories.

11 changed files with 78 additions and 189 deletions

View file

@ -17,18 +17,16 @@
# debug # debug
strace ltrace lsof strace ltrace lsof
# apps # apps
firefox qalculate-gtk krita inkscape onlyoffice-bin vlc firefox qalculate-gtk krita inkscape handbrake
# compatibility # compatibility
wineWowPackages.waylandFull winetricks wineWowPackages.waylandFull winetricks
# misc # misc
bat file which yt-dlp wl-screenrec bat file which prismlauncher yt-dlp wl-screenrec
# games
prismlauncher
] ++ (with pkgs.my; [ ] ++ (with pkgs.my; [
# none yet # none yet
]) ++ (with pkgs.gnome; [ ]) ++ (with pkgs.gnome; [
# yay gnomeware!!!!!!!!!!!!!! yum # yay gnomeware!!!!!!!!!!!!!! yum
nautilus gnome-font-viewer gnome-disk-utility ghex pkgs.gnome-text-editor pkgs.baobab file-roller gnome-system-monitor loupe nautilus gnome-disk-utility ghex pkgs.gnome-text-editor pkgs.baobab file-roller gnome-system-monitor loupe
]); ]);
modules = { modules = {
@ -57,8 +55,6 @@
waybar.enable = true; waybar.enable = true;
batsignal.enable = true; batsignal.enable = true;
wob.enable = true; wob.enable = true;
gammastep.enable = true;
clipse.enable = true;
# display manager # display manager
sddm.enable = true; sddm.enable = true;

View file

@ -1,37 +0,0 @@
{ lib, config, pkgs, ... }:
with lib;
let
cfg = config.modules.desktop.clipse;
in {
options.modules.desktop.clipse = {
enable = mkEnableOption "Enable clipse, a generic clipboard manager";
package = mkOption {
type = types.package;
default = pkgs.clipse;
};
};
config = mkIf cfg.enable {
# runtime dependencies
user.packages = with pkgs; [ wl-clipboard ];
hm.wayland.windowManager.hyprland.settings = let
class = "clipse";
in {
exec-once = [ "${lib.getExe cfg.package} -listen-shell" ];
windowrulev2 = [
"float, class:^${class}$"
"size 622 652, class:^${class}$"
"center, class:^${class}$"
"stayfocused, class:^${class}$"
"dimaround, class:^${class}$"
];
bind = [
"$mod, V, exec, ${lib.getExe pkgs.wezterm} start --class ${class} -e '${lib.getExe cfg.package}'"
];
};
};
}

View file

@ -1,21 +0,0 @@
{ lib, config, pkgs, ... }:
with lib;
let
cfg = config.modules.desktop.gammastep;
in {
options.modules.desktop.gammastep = {
enable = mkEnableOption "Enable gammastep, a blue-light filter for Wayland desktop environments";
};
config = mkIf cfg.enable {
hm.wayland.windowManager.hyprland.settings.exec-once = [ "${pkgs.gammastep}/bin/gammastep-indicator" ];
hm.services.gammastep = {
enable = true;
# portland, oregon
latitude = 45.3112;
longitude = -122.4055;
provider = "manual";
};
};
}

View file

@ -174,7 +174,7 @@ in {
exec-once = [ exec-once = [
"${lib.getExe pkgs.networkmanagerapplet}" # network applet "${lib.getExe pkgs.networkmanagerapplet}" # network applet
"${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1" # polkit agent "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1" # polkit agent
"${lib.getExe pkgs.wl-clip-persist} --clipboard regular" # to fix wl clipboards disappearing "${lib.getExe pkgs.wl-clip-persist} --clipboard primary" # to fix wl clipboards disappearing
]; ];
env = [ env = [
@ -197,56 +197,35 @@ in {
# common popups # common popups
"float, class:org.gnome.FileRoller" "float, class:org.gnome.FileRoller"
"size 1100 650, class:org.gnome.FileRoller" "size 1100 650, class:org.gnome.FileRoller"
"center, class:org.gnome.FileRoller"
"float, class:org.gnome.Loupe" "float, class:org.gnome.Loupe"
"size 1100 650, class:org.gnome.Loupe" "size 1100 650, class:org.gnome.Loupe"
"center class:org.gnome.Loupe"
"float, class:com.gabm.satty" "float, class:com.gabm.satty"
"size 1100 650, class:com.gabm.satty" "size 1100 650, class:com.gabm.satty"
"center 1100 650, class:com.gabm.satty"
"float, initialTitle:^Open Folder$" "float, initialTitle:^Open Folder$"
"size 1100 650, initialTitle:^Open Folder$" "size 1100 650, initialTitle:^Open Folder$"
"center, initialTitle:^Open Folder$"
"float, initialTitle:^Open File$" "float, initialTitle:^Open File$"
"size 1100 650, initialTitle:^Open File$" "size 1100 650, initialTitle:^Open File$"
"center, initialTitle:^Open File$"
"float, initialTitle:^Open Files$" "float, initialTitle:^Open Files$"
"size 1100 650, initialTitle:^Open Files$" "size 1100 650, initialTitle:^Open Files$"
"center, initialTitle:^Open Files$"
"float, initialTitle:^Save As$" "float, initialTitle:^Save As$"
"size 1100 650, initialTitle:^Save As$" "size 1100 650, initialTitle:^Save As$"
"center, initialTitle:^Save As$"
"float, initialTitle:^Select a file to open$" "float, initialTitle:^Select a file to open$"
"size 1100 650, initialTitle:^Select a file to open$" "size 1100 650, initialTitle:^Select a file to open$"
"center, initialTitle:^Select a file to open$"
"float, initialTitle:^File Upload$" "float, initialTitle:^File Upload$"
"size 1100 650, initialTitle:^File Upload$" "size 1100 650, initialTitle:^File Upload$"
"center, initialTitle:^File Upload$"
"float, class:\.exe$" "float, class:\.exe$"
# fix focus # fix focus
"stayfocused, class:^gcr-prompter" "stayfocused, class:^gcr-prompter"
"dimaround, class:^gcr-prompter"
"stayfocused, class:^pinentry-" "stayfocused, class:^pinentry-"
"dimaround, class:^pinentry-"
"stayfocused, class:^polkit-" "stayfocused, class:^polkit-"
"dimaround, class:^polkit-"
"stayfocused, class:^rofi-" "stayfocused, class:^rofi-"
# firefox pip
"float, title:^Picture-in-Picture$"
"pin, title:^Picture-in-Picture$"
"noborder, title:^Picture-in-Picture$"
"keepaspectratio, title:^Picture-in-Picture$"
# discord pip
"pin, initialTitle:^Discord Popout$"
"float, initialTitle:^Discord Popout$"
# workspace moving # workspace moving
"workspace 1 silent, class:^firefox" "workspace 1, class:^firefox"
"workspace 2 silent, class:code-url-handler" "workspace 2, class:code-url-handler"
"workspace 4 silent, class:vesktop" "workspace 4, class:vesktop"
]; ];
blurls = [ blurls = [
@ -270,9 +249,9 @@ in {
popups = true; popups = true;
}; };
drop_shadow = true; drop_shadow = false;
shadow_range = 4; #shadow_range = 4;
shadow_render_power = 3; #shadow_render_power = 3;
}; };
animations = { animations = {

View file

@ -73,8 +73,8 @@ in {
col.inactive_border=$surface0 col.inactive_border=$surface0
} }
decoration { decoration {
col.shadow=$crust col.shadow=$surface0
col.shadow_inactive=$crust col.shadow_inactive=$surface0
} }
misc { misc {
background_color=$crust background_color=$crust
@ -95,10 +95,6 @@ in {
}; };
rofi = ./rofi.rasi; rofi = ./rofi.rasi;
wezterm = ''
config.color_scheme = 'Catppuccin ${pascalCase variant}'
'';
}; };
}; };
} }

View file

@ -58,8 +58,6 @@ in {
}; };
rofi = mkOpt (nullOr path) null; rofi = mkOpt (nullOr path) null;
wezterm = mkOpt (nullOr str) null;
}; };
config = mkIf (cfg.active != null) { config = mkIf (cfg.active != null) {
@ -80,14 +78,12 @@ in {
cursorTheme = cfg.cursorTheme; cursorTheme = cfg.cursorTheme;
iconTheme = cfg.iconTheme; iconTheme = cfg.iconTheme;
theme = cfg.gtkTheme; theme = cfg.gtkTheme;
gtk3.extraConfig.gtk-application-prefer-dark-theme = mkIf cfg.dark "1";
gtk4.extraConfig.gtk-application-prefer-dark-theme = mkIf cfg.dark "1";
}; };
qt = { hm.qt = {
enable = true; enable = true;
platformTheme = "gnome"; platformTheme.name = "gtk";
style = "adwaita"; style.name = "gtk2";
}; };
hm.home.pointerCursor = { hm.home.pointerCursor = {

View file

@ -13,40 +13,40 @@ in {
tmp.useTmpfs = lib.mkDefault true; tmp.useTmpfs = lib.mkDefault true;
tmp.cleanOnBoot = lib.mkDefault (!config.boot.tmp.useTmpfs); tmp.cleanOnBoot = lib.mkDefault (!config.boot.tmp.useTmpfs);
kernel.sysctl = { kernel.sysctl = {
# magic sysrq key, allows low-level commands through keyboard input # magic sysrq key, allows low-level commands through keyboard input
"kernel.sysrq" = 0; "kernel.sysrq" = 0;
## TCP hardening ## TCP hardening
# prevent bogus ICMP errors from filling up logs # prevent bogus ICMP errors from filling up logs
"net.ipv4.icmp_ignore_bogus_error_responses" = 1; "net.ipv4.icmp_ignore_bogus_error_responses" = 1;
# do not accept IP source packets (we are not a router) # do not accept IP source packets (we are not a router)
"net.ipv4.conf.all.accept_source_route" = 0; "net.ipv4.conf.all.accept_source_route" = 0;
"net.ipv6.conf.all.accept_source_route" = 0; "net.ipv6.conf.all.accept_source_route" = 0;
# don't send ICMP redirects (again, we're not a router) # don't send ICMP redirects (again, we're not a router)
"net.ipv4.conf.all.send_redirects" = 0; "net.ipv4.conf.all.send_redirects" = 0;
"net.ipv4.conf.default.send_redirects" = 0; "net.ipv4.conf.default.send_redirects" = 0;
# refuse ICMP redirects (MITM mitigations) # refuse ICMP redirects (MITM mitigations)
"net.ipv4.conf.all.accept_redirects" = 0; "net.ipv4.conf.all.accept_redirects" = 0;
"net.ipv4.conf.default.accept_redirects" = 0; "net.ipv4.conf.default.accept_redirects" = 0;
"net.ipv4.conf.all.secure_redirects" = 0; "net.ipv4.conf.all.secure_redirects" = 0;
"net.ipv4.conf.default.secure_redirects" = 0; "net.ipv4.conf.default.secure_redirects" = 0;
"net.ipv6.conf.all.accept_redirects" = 0; "net.ipv6.conf.all.accept_redirects" = 0;
"net.ipv6.conf.default.accept_redirects" = 0; "net.ipv6.conf.default.accept_redirects" = 0;
# protects against SYN flood attacks # protects against SYN flood attacks
"net.ipv4.tcp_syncookies" = 1; "net.ipv4.tcp_syncookies" = 1;
# incomplete protection against TIME-WAIT assassination # incomplete protection against TIME-WAIT assassination
"net.ipv4.tcp_rfc1337" = 1; "net.ipv4.tcp_rfc1337" = 1;
## TCP optimization ## TCP optimization
# TCP fastopen # TCP fastopen
"net.ipv4.tcp_fastopen" = 3; "net.ipv4.tcp_fastopen" = 3;
# bufferbloat mitigations + improvement in throughput and latency # bufferbloat mitigations + improvement in throughput and latency
"net.ipv4.tcp_conjestion_control" = "bbr"; "net.ipv4.tcp_conjestion_control" = "bbr";
"net.core.default_qdisc" = "cake"; "net.core.default_qdisc" = "cake";
};
kernelModules = [ "tcp_bbr" ];
}; };
kernelModules = [ "tcp_bbr" ];
};
security = { security = {
# prevents replacing the kernel without a reboot # prevents replacing the kernel without a reboot
@ -59,8 +59,6 @@ in {
# personal computer? no firewall ty :3 # personal computer? no firewall ty :3
networking.firewall.enable = false; networking.firewall.enable = false;
# TODO: usbguard
} // (mkIf cfg.useDoas { } // (mkIf cfg.useDoas {
security.sudo.enable = false; security.sudo.enable = false;
security.doas.enable = true; security.doas.enable = true;

View file

@ -5,6 +5,7 @@ let
cfg = config.modules.software.distractions.discord; cfg = config.modules.software.distractions.discord;
flags = [ flags = [
"--flag-switches-begin" "--flag-switches-begin"
"--flag-switches-end"
"--disable-gpu-memory-buffer-video-frames" "--disable-gpu-memory-buffer-video-frames"
"--enable-accelerated-mjpeg-decode" "--enable-accelerated-mjpeg-decode"
"--enable-accelerated-video" "--enable-accelerated-video"
@ -12,38 +13,36 @@ let
"--enable-native-gpu-memory-buffers" "--enable-native-gpu-memory-buffers"
"--enable-zero-copy" "--enable-zero-copy"
"--ignore-gpu-blocklist" "--ignore-gpu-blocklist"
"--enable-features=UseOzonePlatform" "--disable-features=UseOzonePlatform"
"--enable-features=VaapiVideoDecoder" "--enable-features=VaapiVideoDecoder"
"--enable-features=VaapiVideoEncoder"
"--enable-features=WebRTCPipeWireCapturer"
"--flag-switches-end"
]; ];
vanillaDiscordPackage = pkgs.discord-canary.override {
withOpenASAR = true;
withVencord = true;
};
package = if cfg.armcord then pkgs.armcord else (if cfg.vesktop then pkgs.vesktop else vanillaDiscordPackage);
in { in {
options.modules.software.distractions.discord = { options.modules.software.distractions.discord = {
enable = mkEnableOption "Enable discord, a social messaging app"; enable = mkEnableOption "Enable discord, a social messaging app";
armcord = mkEnableOption "Use Armcord, an alternative Electron client"; vesktop = mkEnableOption "Use vesktop, an alternative discord client.";
vesktop = mkEnableOption "Use Vesktop, an alternative Electron client with vencord preinstalled";
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable (mkMerge [
assertions = [ (mkIf (!cfg.vesktop) {
{ user.packages = let
assertion = !(cfg.armcord && cfg.vesktop); discord = (pkgs.discord-canary.override {
message = "You must either enable Armcord or Vesktop, not both"; withOpenASAR = true;
} withVencord = true;
]; }).overrideAttrs (old: {
preInstall = ''
user.packages = [ gappsWrapperArgs=+("--add-flags" "${concatStringsSep " " flags}")
(package.overrideAttrs (old: { '';
preInstall = '' });
gappsWrapperArgs+=("--add-flags" "${concatStringsSep " " flags}") in [ discord ];
''; })
})) (mkIf cfg.vesktop {
]; user.packages = [
}; (pkgs.vesktop.overrideAttrs (old: {
preInstall = ''
gappsWrapperArgs+=("--add-flags" "${concatStringsSep " " flags}")
'';
}))
];
})
]);
} }

View file

@ -12,7 +12,6 @@ in {
schemeName = "generated"; schemeName = "generated";
in mkIf cfg.enable { in mkIf cfg.enable {
environment.variables.EDITOR = "micro"; environment.variables.EDITOR = "micro";
environment.variables.MICRO_TRUECOLOR = "1";
hm.programs.micro = { hm.programs.micro = {
enable = true; enable = true;
@ -24,7 +23,7 @@ in {
tabsize = 2; tabsize = 2;
tabstospaces = true; tabstospaces = true;
colorscheme = schemeName; colorScheme = schemeName;
}; };
}; };

View file

@ -10,17 +10,9 @@ in {
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
# runtime dependencies of plugins user.packages = with pkgs; [ bat fd fzf grc ];
user.packages = with pkgs; [
# fzf-fish environment.systemPackages = with pkgs.fishPlugins; [ fzf-fish tide ];
bat fd fzf
# grc
grc
# tide
fishPlugins.tide
# done
libnotify
];
users.defaultUserShell = pkgs.fish; users.defaultUserShell = pkgs.fish;
programs.fish.enable = true; programs.fish.enable = true;
@ -28,14 +20,7 @@ in {
colorScript = nix-colors-lib.shellThemeFromScheme { scheme = config.colorScheme; }; colorScript = nix-colors-lib.shellThemeFromScheme { scheme = config.colorScheme; };
in { in {
enable = true; enable = true;
plugins = with pkgs.fishPlugins; [ plugins = [ { name = "grc"; src = pkgs.fishPlugins.grc.src; } ];
{ name = "fzf-fish"; src = fzf-fish.src; }
{ name = "grc"; src = grc.src; }
{ name = "tide"; src = tide.src; }
{ name = "done"; src = done.src; }
{ name = "autopair"; src = autopair.src; }
];
interactiveShellInit = '' interactiveShellInit = ''
sh ${colorScript} sh ${colorScript}
''; '';

View file

@ -24,12 +24,11 @@ in {
config.font_size = ${toString fonts.monospaceBitmap.size} config.font_size = ${toString fonts.monospaceBitmap.size}
config.freetype_load_flags = 'MONOCHROME' config.freetype_load_flags = 'MONOCHROME'
config.enable_wayland = false config.enable_wayland = false
config.color_scheme = 'Catppuccin Mocha'
config.use_fancy_tab_bar = false config.use_fancy_tab_bar = false
config.use_resize_increments = true config.use_resize_increments = true
config.initial_cols = 120 config.initial_cols = 120
config.initial_rows = 40 config.initial_rows = 40
config.window_background_opacity = 0.8
${config.modules.desktop.themes.wezterm or ""}
config.window_frame = { config.window_frame = {
font = wezterm.font '${fonts.sansSerif.family}', font = wezterm.font '${fonts.sansSerif.family}',