From ef5252e13ca25a54a90b8816b11d4e68b0b18c66 Mon Sep 17 00:00:00 2001 From: "Reid \"reidlab" Date: Fri, 26 Jul 2024 01:59:14 -0700 Subject: [PATCH 01/14] hyprland changes --- modules/desktop/hyprland.nix | 12 ++++++------ modules/desktop/themes/catppuccin/default.nix | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/modules/desktop/hyprland.nix b/modules/desktop/hyprland.nix index 028ef82..86f279b 100644 --- a/modules/desktop/hyprland.nix +++ b/modules/desktop/hyprland.nix @@ -223,9 +223,9 @@ in { "stayfocused, class:^rofi-" # workspace moving - "workspace 1, class:^firefox" - "workspace 2, class:code-url-handler" - "workspace 4, class:vesktop" + "workspace 1 silent, class:^firefox" + "workspace 2 silent, class:code-url-handler" + "workspace 4 silent, class:vesktop" ]; blurls = [ @@ -249,9 +249,9 @@ in { popups = true; }; - drop_shadow = false; - #shadow_range = 4; - #shadow_render_power = 3; + drop_shadow = true; + shadow_range = 4; + shadow_render_power = 3; }; animations = { diff --git a/modules/desktop/themes/catppuccin/default.nix b/modules/desktop/themes/catppuccin/default.nix index 54987d2..88952b0 100644 --- a/modules/desktop/themes/catppuccin/default.nix +++ b/modules/desktop/themes/catppuccin/default.nix @@ -73,8 +73,8 @@ in { col.inactive_border=$surface0 } decoration { - col.shadow=$surface0 - col.shadow_inactive=$surface0 + col.shadow=$crust + col.shadow_inactive=$crust } misc { background_color=$crust From b5714e30bb550196c118e28cd2313f2be675ac49 Mon Sep 17 00:00:00 2001 From: "Reid \"reidlab" Date: Sat, 27 Jul 2024 02:12:52 -0700 Subject: [PATCH 02/14] deprecate gtk2 --- modules/desktop/themes/default.nix | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/modules/desktop/themes/default.nix b/modules/desktop/themes/default.nix index d38dbc4..c087999 100644 --- a/modules/desktop/themes/default.nix +++ b/modules/desktop/themes/default.nix @@ -80,11 +80,13 @@ in { theme = cfg.gtkTheme; }; - hm.qt = { - enable = true; - platformTheme.name = "gtk"; - style.name = "gtk2"; - }; + # unfortunately broken because the catppucciin maintainers removed gtk2 support + # TODO: kvantum? + #hm.qt = { + # enable = true; + # platformTheme.name = "gtk"; + # style.name = "gtk2"; + #}; hm.home.pointerCursor = { gtk.enable = true; From 69a20370bc70a4d8b0f6080152f85bc741cffc53 Mon Sep 17 00:00:00 2001 From: "Reid \"reidlab" Date: Thu, 1 Aug 2024 01:37:08 -0700 Subject: [PATCH 03/14] fix micro theme --- modules/software/editors/micro.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/software/editors/micro.nix b/modules/software/editors/micro.nix index 0618cf1..2fcc456 100644 --- a/modules/software/editors/micro.nix +++ b/modules/software/editors/micro.nix @@ -12,6 +12,7 @@ in { schemeName = "generated"; in mkIf cfg.enable { environment.variables.EDITOR = "micro"; + environment.variables.MICRO_TRUECOLOR = "1"; hm.programs.micro = { enable = true; @@ -23,7 +24,7 @@ in { tabsize = 2; tabstospaces = true; - colorScheme = schemeName; + colorscheme = schemeName; }; }; From e7098c477fee7b70dce3865bbf2b5071a728637b Mon Sep 17 00:00:00 2001 From: "Reid \"reidlab" Date: Thu, 1 Aug 2024 01:42:01 -0700 Subject: [PATCH 04/14] better qt i guess --- modules/desktop/themes/default.nix | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/modules/desktop/themes/default.nix b/modules/desktop/themes/default.nix index c087999..f5576e1 100644 --- a/modules/desktop/themes/default.nix +++ b/modules/desktop/themes/default.nix @@ -78,15 +78,15 @@ in { cursorTheme = cfg.cursorTheme; iconTheme = cfg.iconTheme; 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"; }; - # unfortunately broken because the catppucciin maintainers removed gtk2 support - # TODO: kvantum? - #hm.qt = { - # enable = true; - # platformTheme.name = "gtk"; - # style.name = "gtk2"; - #}; + qt = { + enable = true; + platformTheme = "gnome"; + style = "adwaita"; + }; hm.home.pointerCursor = { gtk.enable = true; From 1a519aeeaeb65fb8effa6d9ffca9a3af970c799e Mon Sep 17 00:00:00 2001 From: "Reid \"reidlab" Date: Thu, 1 Aug 2024 01:49:14 -0700 Subject: [PATCH 05/14] cooler wezterm --- modules/desktop/themes/catppuccin/default.nix | 4 ++++ modules/desktop/themes/default.nix | 2 ++ modules/software/system/wezterm.nix | 3 ++- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/modules/desktop/themes/catppuccin/default.nix b/modules/desktop/themes/catppuccin/default.nix index 88952b0..8f093d9 100644 --- a/modules/desktop/themes/catppuccin/default.nix +++ b/modules/desktop/themes/catppuccin/default.nix @@ -95,6 +95,10 @@ in { }; rofi = ./rofi.rasi; + + wezterm = '' + config.color_scheme = 'Catppuccin ${pascalCase variant}' + ''; }; }; } diff --git a/modules/desktop/themes/default.nix b/modules/desktop/themes/default.nix index f5576e1..8cc93d7 100644 --- a/modules/desktop/themes/default.nix +++ b/modules/desktop/themes/default.nix @@ -58,6 +58,8 @@ in { }; rofi = mkOpt (nullOr path) null; + + wezterm = mkOpt (nullOr str) null; }; config = mkIf (cfg.active != null) { diff --git a/modules/software/system/wezterm.nix b/modules/software/system/wezterm.nix index e6740a8..04f349e 100644 --- a/modules/software/system/wezterm.nix +++ b/modules/software/system/wezterm.nix @@ -24,11 +24,12 @@ in { config.font_size = ${toString fonts.monospaceBitmap.size} config.freetype_load_flags = 'MONOCHROME' config.enable_wayland = false - config.color_scheme = 'Catppuccin Mocha' config.use_fancy_tab_bar = false config.use_resize_increments = true config.initial_cols = 120 config.initial_rows = 40 + config.window_background_opacity = 0.8 + ${config.modules.desktop.themes.wezterm or ""} config.window_frame = { font = wezterm.font '${fonts.sansSerif.family}', From f0354690b5791fc683c792ab88652401118e77e7 Mon Sep 17 00:00:00 2001 From: "Reid \"reidlab" Date: Thu, 1 Aug 2024 01:55:40 -0700 Subject: [PATCH 06/14] window rules --- modules/desktop/hyprland.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/modules/desktop/hyprland.nix b/modules/desktop/hyprland.nix index 86f279b..de772b5 100644 --- a/modules/desktop/hyprland.nix +++ b/modules/desktop/hyprland.nix @@ -218,10 +218,19 @@ in { # fix focus "stayfocused, class:^gcr-prompter" + "dimaround, class:^gcr-prompter" "stayfocused, class:^pinentry-" + "dimaround, class:^pinentry-" "stayfocused, class:^polkit-" + "dimaround, class:^polkit-" "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$" + # workspace moving "workspace 1 silent, class:^firefox" "workspace 2 silent, class:code-url-handler" From 96c27a348f1a0059beb2907890d41f39ef6e7ce3 Mon Sep 17 00:00:00 2001 From: "Reid \"reidlab" Date: Thu, 1 Aug 2024 02:34:26 -0700 Subject: [PATCH 07/14] gammastep --- hosts/goopnet-interface/default.nix | 1 + modules/desktop/gammastep.nix | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 modules/desktop/gammastep.nix diff --git a/hosts/goopnet-interface/default.nix b/hosts/goopnet-interface/default.nix index 82b4f8b..176afe9 100755 --- a/hosts/goopnet-interface/default.nix +++ b/hosts/goopnet-interface/default.nix @@ -55,6 +55,7 @@ waybar.enable = true; batsignal.enable = true; wob.enable = true; + gammastep.enable = true; # display manager sddm.enable = true; diff --git a/modules/desktop/gammastep.nix b/modules/desktop/gammastep.nix new file mode 100644 index 0000000..0e2a8fc --- /dev/null +++ b/modules/desktop/gammastep.nix @@ -0,0 +1,21 @@ +{ 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"; + }; + }; +} \ No newline at end of file From 369a767b08285361dd6f87a7fe939ac55adeb56b Mon Sep 17 00:00:00 2001 From: "Reid \"reidlab" Date: Thu, 1 Aug 2024 03:41:23 -0700 Subject: [PATCH 08/14] mess around with fish --- modules/software/system/fish.nix | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/modules/software/system/fish.nix b/modules/software/system/fish.nix index 6ad2453..9b7e163 100644 --- a/modules/software/system/fish.nix +++ b/modules/software/system/fish.nix @@ -10,9 +10,17 @@ in { }; config = mkIf cfg.enable { - user.packages = with pkgs; [ bat fd fzf grc ]; - - environment.systemPackages = with pkgs.fishPlugins; [ fzf-fish tide ]; + # runtime dependencies of plugins + user.packages = with pkgs; [ + # fzf-fish + bat fd fzf + # grc + grc + # tide + fishPlugins.tide + # done + libnotify + ]; users.defaultUserShell = pkgs.fish; programs.fish.enable = true; @@ -20,7 +28,14 @@ in { colorScript = nix-colors-lib.shellThemeFromScheme { scheme = config.colorScheme; }; in { enable = true; - plugins = [ { name = "grc"; src = pkgs.fishPlugins.grc.src; } ]; + plugins = with pkgs.fishPlugins; [ + { 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 = '' sh ${colorScript} ''; From d1f61ed5e1d60f2b0ae11901535a4c358130fa82 Mon Sep 17 00:00:00 2001 From: "Reid \"reidlab" Date: Thu, 1 Aug 2024 16:12:33 -0700 Subject: [PATCH 09/14] window rules and clipboard persist fix --- modules/desktop/hyprland.nix | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/modules/desktop/hyprland.nix b/modules/desktop/hyprland.nix index de772b5..7bef95e 100644 --- a/modules/desktop/hyprland.nix +++ b/modules/desktop/hyprland.nix @@ -174,7 +174,7 @@ in { exec-once = [ "${lib.getExe pkgs.networkmanagerapplet}" # network applet "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1" # polkit agent - "${lib.getExe pkgs.wl-clip-persist} --clipboard primary" # to fix wl clipboards disappearing + "${lib.getExe pkgs.wl-clip-persist} --clipboard regular" # to fix wl clipboards disappearing ]; env = [ @@ -197,22 +197,31 @@ in { # common popups "float, class:org.gnome.FileRoller" "size 1100 650, class:org.gnome.FileRoller" + "center, class:org.gnome.FileRoller" "float, class:org.gnome.Loupe" "size 1100 650, class:org.gnome.Loupe" + "center class:org.gnome.Loupe" "float, class:com.gabm.satty" "size 1100 650, class:com.gabm.satty" + "center 1100 650, class:com.gabm.satty" "float, initialTitle:^Open Folder$" "size 1100 650, initialTitle:^Open Folder$" + "center, initialTitle:^Open Folder$" "float, initialTitle:^Open File$" "size 1100 650, initialTitle:^Open File$" + "center, initialTitle:^Open File$" "float, initialTitle:^Open Files$" "size 1100 650, initialTitle:^Open Files$" + "center, initialTitle:^Open Files$" "float, initialTitle:^Save As$" "size 1100 650, initialTitle:^Save As$" + "center, initialTitle:^Save As$" "float, 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$" "size 1100 650, initialTitle:^File Upload$" + "center, initialTitle:^File Upload$" "float, class:\.exe$" From 4291e0cbb4558956f87628a3ac6ed63d0d8e6861 Mon Sep 17 00:00:00 2001 From: "Reid \"reidlab" Date: Thu, 1 Aug 2024 16:27:41 -0700 Subject: [PATCH 10/14] clipse --- hosts/goopnet-interface/default.nix | 1 + modules/desktop/clipse.nix | 37 +++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 modules/desktop/clipse.nix diff --git a/hosts/goopnet-interface/default.nix b/hosts/goopnet-interface/default.nix index 176afe9..7bb89e4 100755 --- a/hosts/goopnet-interface/default.nix +++ b/hosts/goopnet-interface/default.nix @@ -56,6 +56,7 @@ batsignal.enable = true; wob.enable = true; gammastep.enable = true; + clipse.enable = true; # display manager sddm.enable = true; diff --git a/modules/desktop/clipse.nix b/modules/desktop/clipse.nix new file mode 100644 index 0000000..2cf47db --- /dev/null +++ b/modules/desktop/clipse.nix @@ -0,0 +1,37 @@ +{ 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}'" + ]; + }; + }; +} \ No newline at end of file From a88bfaa5d75ea105435bec982aeb42a81e420454 Mon Sep 17 00:00:00 2001 From: "Reid \"reidlab" Date: Thu, 1 Aug 2024 16:27:47 -0700 Subject: [PATCH 11/14] window rules --- modules/desktop/hyprland.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/desktop/hyprland.nix b/modules/desktop/hyprland.nix index 7bef95e..e4f8266 100644 --- a/modules/desktop/hyprland.nix +++ b/modules/desktop/hyprland.nix @@ -239,6 +239,9 @@ in { "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 1 silent, class:^firefox" From 5558bf7ee81d82f7fb00b9f45fba1e3f13775a9e Mon Sep 17 00:00:00 2001 From: "Reid \"reidlab" Date: Thu, 1 Aug 2024 17:05:28 -0700 Subject: [PATCH 12/14] update apps --- hosts/goopnet-interface/default.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/hosts/goopnet-interface/default.nix b/hosts/goopnet-interface/default.nix index 7bb89e4..17740ef 100755 --- a/hosts/goopnet-interface/default.nix +++ b/hosts/goopnet-interface/default.nix @@ -17,16 +17,18 @@ # debug strace ltrace lsof # apps - firefox qalculate-gtk krita inkscape handbrake + firefox qalculate-gtk krita inkscape onlyoffice-bin vlc # compatibility wineWowPackages.waylandFull winetricks # misc - bat file which prismlauncher yt-dlp wl-screenrec + bat file which yt-dlp wl-screenrec + # games + prismlauncher ] ++ (with pkgs.my; [ # none yet ]) ++ (with pkgs.gnome; [ # yay gnomeware!!!!!!!!!!!!!! yum - nautilus gnome-disk-utility ghex pkgs.gnome-text-editor pkgs.baobab file-roller gnome-system-monitor loupe + nautilus gnome-font-viewer gnome-disk-utility ghex pkgs.gnome-text-editor pkgs.baobab file-roller gnome-system-monitor loupe ]); modules = { From 4a7d8858e598360631f8a1079e18a4b9c4bd2fa8 Mon Sep 17 00:00:00 2001 From: "Reid \"reidlab" Date: Thu, 1 Aug 2024 17:15:47 -0700 Subject: [PATCH 13/14] some security touchups --- modules/security.nix | 64 +++++++++++++++++++++++--------------------- 1 file changed, 33 insertions(+), 31 deletions(-) diff --git a/modules/security.nix b/modules/security.nix index c4db9ad..32fbd61 100755 --- a/modules/security.nix +++ b/modules/security.nix @@ -13,40 +13,40 @@ in { tmp.useTmpfs = lib.mkDefault true; tmp.cleanOnBoot = lib.mkDefault (!config.boot.tmp.useTmpfs); - kernel.sysctl = { - # magic sysrq key, allows low-level commands through keyboard input - "kernel.sysrq" = 0; + kernel.sysctl = { + # magic sysrq key, allows low-level commands through keyboard input + "kernel.sysrq" = 0; - ## TCP hardening - # prevent bogus ICMP errors from filling up logs - "net.ipv4.icmp_ignore_bogus_error_responses" = 1; - # do not accept IP source packets (we are not a router) - "net.ipv4.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) - "net.ipv4.conf.all.send_redirects" = 0; - "net.ipv4.conf.default.send_redirects" = 0; - # refuse ICMP redirects (MITM mitigations) - "net.ipv4.conf.all.accept_redirects" = 0; - "net.ipv4.conf.default.accept_redirects" = 0; - "net.ipv4.conf.all.secure_redirects" = 0; - "net.ipv4.conf.default.secure_redirects" = 0; - "net.ipv6.conf.all.accept_redirects" = 0; - "net.ipv6.conf.default.accept_redirects" = 0; - # protects against SYN flood attacks - "net.ipv4.tcp_syncookies" = 1; - # incomplete protection against TIME-WAIT assassination - "net.ipv4.tcp_rfc1337" = 1; + ## TCP hardening + # prevent bogus ICMP errors from filling up logs + "net.ipv4.icmp_ignore_bogus_error_responses" = 1; + # do not accept IP source packets (we are not a router) + "net.ipv4.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) + "net.ipv4.conf.all.send_redirects" = 0; + "net.ipv4.conf.default.send_redirects" = 0; + # refuse ICMP redirects (MITM mitigations) + "net.ipv4.conf.all.accept_redirects" = 0; + "net.ipv4.conf.default.accept_redirects" = 0; + "net.ipv4.conf.all.secure_redirects" = 0; + "net.ipv4.conf.default.secure_redirects" = 0; + "net.ipv6.conf.all.accept_redirects" = 0; + "net.ipv6.conf.default.accept_redirects" = 0; + # protects against SYN flood attacks + "net.ipv4.tcp_syncookies" = 1; + # incomplete protection against TIME-WAIT assassination + "net.ipv4.tcp_rfc1337" = 1; - ## TCP optimization - # TCP fastopen - "net.ipv4.tcp_fastopen" = 3; - # bufferbloat mitigations + improvement in throughput and latency - "net.ipv4.tcp_conjestion_control" = "bbr"; - "net.core.default_qdisc" = "cake"; - }; - kernelModules = [ "tcp_bbr" ]; + ## TCP optimization + # TCP fastopen + "net.ipv4.tcp_fastopen" = 3; + # bufferbloat mitigations + improvement in throughput and latency + "net.ipv4.tcp_conjestion_control" = "bbr"; + "net.core.default_qdisc" = "cake"; }; + kernelModules = [ "tcp_bbr" ]; + }; security = { # prevents replacing the kernel without a reboot @@ -59,6 +59,8 @@ in { # personal computer? no firewall ty :3 networking.firewall.enable = false; + + # TODO: usbguard } // (mkIf cfg.useDoas { security.sudo.enable = false; security.doas.enable = true; From d472a99976d4543bf4825998b66eb342642535a8 Mon Sep 17 00:00:00 2001 From: "Reid \"reidlab" Date: Fri, 2 Aug 2024 19:17:44 -0700 Subject: [PATCH 14/14] discord experimentatioj --- modules/software/distractions/discord.nix | 53 ++++++++++++----------- 1 file changed, 27 insertions(+), 26 deletions(-) diff --git a/modules/software/distractions/discord.nix b/modules/software/distractions/discord.nix index 8f66e18..2fd207b 100644 --- a/modules/software/distractions/discord.nix +++ b/modules/software/distractions/discord.nix @@ -5,7 +5,6 @@ let cfg = config.modules.software.distractions.discord; flags = [ "--flag-switches-begin" - "--flag-switches-end" "--disable-gpu-memory-buffer-video-frames" "--enable-accelerated-mjpeg-decode" "--enable-accelerated-video" @@ -13,36 +12,38 @@ let "--enable-native-gpu-memory-buffers" "--enable-zero-copy" "--ignore-gpu-blocklist" - "--disable-features=UseOzonePlatform" + "--enable-features=UseOzonePlatform" "--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 { options.modules.software.distractions.discord = { enable = mkEnableOption "Enable discord, a social messaging app"; - vesktop = mkEnableOption "Use vesktop, an alternative discord client."; + armcord = mkEnableOption "Use Armcord, an alternative Electron client"; + vesktop = mkEnableOption "Use Vesktop, an alternative Electron client with vencord preinstalled"; }; - config = mkIf cfg.enable (mkMerge [ - (mkIf (!cfg.vesktop) { - user.packages = let - discord = (pkgs.discord-canary.override { - withOpenASAR = true; - withVencord = true; - }).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}") - ''; - })) - ]; - }) - ]); + config = mkIf cfg.enable { + assertions = [ + { + assertion = !(cfg.armcord && cfg.vesktop); + message = "You must either enable Armcord or Vesktop, not both"; + } + ]; + + user.packages = [ + (package.overrideAttrs (old: { + preInstall = '' + gappsWrapperArgs+=("--add-flags" "${concatStringsSep " " flags}") + ''; + })) + ]; + }; } \ No newline at end of file