From 9b21f7a0d44ac4c60d6786c383941f1d4f09d2b6 Mon Sep 17 00:00:00 2001 From: Sakooooo <78461130+Sakooooo@users.noreply.github.com> Date: Thu, 1 Aug 2024 16:24:09 +0400 Subject: [PATCH] eradicate with lib; --- modules/desktop/apps/calibre/default.nix | 5 ++--- modules/desktop/apps/kcc/default.nix | 5 ++--- modules/desktop/apps/kdeconnect/default.nix | 5 ++--- modules/desktop/apps/keepassxc/default.nix | 5 ++--- modules/desktop/apps/mangal/default.nix | 5 ++--- modules/desktop/apps/nemo/default.nix | 5 ++--- modules/desktop/apps/nextcloud/default.nix | 6 +++--- modules/desktop/apps/nicotineplus/default.nix | 9 ++------- modules/desktop/apps/obs/default.nix | 6 +++--- modules/desktop/apps/pass/default.nix | 6 +++--- modules/desktop/apps/rssguard/default.nix | 5 ++--- modules/desktop/apps/transmission/daemon.nix | 5 ++--- modules/desktop/apps/transmission/default.nix | 5 ++--- modules/desktop/apps/transmission/remote-tui.nix | 5 ++--- modules/desktop/awesome/default.nix | 6 +++--- modules/desktop/browsers/chromium/default.nix | 5 ++--- modules/desktop/browsers/firefox/default.nix | 6 +++--- modules/desktop/browsers/qutebrowser/default.nix | 5 ++--- modules/desktop/bspwm/default.nix | 6 +++--- modules/desktop/bspwm/lemonbar/default.nix | 5 ++--- modules/desktop/bspwm/polybar/default.nix | 5 ++--- modules/desktop/chat/discord/default.nix | 6 +++--- modules/desktop/chat/signal/default.nix | 6 +++--- modules/desktop/chat/teams/default.nix | 5 ++--- modules/desktop/chat/telegram/default.nix | 6 +++--- modules/desktop/chat/weechat/default.nix | 6 +++--- modules/desktop/chat/whatsapp/default.nix | 5 ++--- modules/desktop/chat/zoom/default.nix | 5 ++--- modules/desktop/dunst/default.nix | 5 ++--- modules/desktop/dwm/default.nix | 6 +++--- modules/desktop/exwm/default.nix | 6 +++--- modules/desktop/game/grapejuice/default.nix | 5 ++--- modules/desktop/game/lutris/default.nix | 5 ++--- modules/desktop/game/steam/default.nix | 5 ++--- modules/desktop/game/tetrio/default.nix | 6 +++--- modules/desktop/game/wine/default.nix | 5 ++--- modules/desktop/gnome/default.nix | 5 ++--- modules/desktop/hyprland/default.nix | 5 ++--- modules/desktop/i3/default.nix | 6 +++--- modules/desktop/kde/default.nix | 5 ++--- modules/desktop/kitty/default.nix | 6 +++--- modules/desktop/media/blender/default.nix | 5 ++--- modules/desktop/media/feishin/default.nix | 5 ++--- modules/desktop/media/gimp/default.nix | 5 ++--- modules/desktop/media/jellyfin/default.nix | 6 +++--- modules/desktop/media/kdenlive/default.nix | 5 ++--- modules/desktop/media/krita/default.nix | 5 ++--- modules/desktop/media/lmms/default.nix | 5 ++--- modules/desktop/media/mpv/default.nix | 5 ++--- modules/desktop/media/resolve/default.nix | 6 ++---- modules/desktop/picom/default.nix | 6 +++--- modules/desktop/plymouth/default.nix | 6 +++--- modules/desktop/printing/default.nix | 6 +++--- modules/desktop/qtile/default.nix | 6 +++--- modules/desktop/wezterm/default.nix | 6 +++--- modules/desktop/wireguard/default.nix | 6 +++--- modules/desktop/xmonad/default.nix | 6 +++--- modules/dev/cc.nix | 5 ++--- modules/dev/cs.nix | 5 ++--- modules/dev/editors/emacs/default.nix | 12 ++++++------ modules/dev/editors/nvim/default.nix | 6 +++--- modules/dev/editors/vscode/default.nix | 6 +++--- modules/dev/editors/vscode/fhs.nix | 6 +++--- modules/dev/javascript.nix | 5 ++--- modules/dev/lua.nix | 6 +++--- modules/dev/nil.nix | 5 ++--- modules/dev/nixd.nix | 6 +++--- modules/dev/python.nix | 6 +++--- modules/dev/rust.nix | 5 ++--- modules/hardware/bluetooth/default.nix | 5 ++--- modules/hardware/intel/default.nix | 5 ++--- modules/hardware/nvidia/default.nix | 6 +++--- modules/hardware/nvidia/prime.nix | 12 ++++++------ modules/hardware/pipewire/default.nix | 5 ++--- modules/media/mopidy/default.nix | 6 +++--- modules/media/mpd/default.nix | 5 ++--- modules/media/ncmpcpp/default.nix | 5 ++--- modules/security/age.nix | 5 ++--- modules/security/certs/default.nix | 6 +++--- modules/security/sops.nix | 6 +++--- modules/shell/aria/default.nix | 5 ++--- modules/shell/newsboat/default.nix | 5 ++--- modules/shell/nix/optimization.nix | 5 ++--- modules/shell/nix/search.nix | 5 ++--- modules/shell/ranger/default.nix | 6 +++--- modules/shell/tmux/default.nix | 5 ++--- modules/shell/zsh/default.nix | 6 +++--- modules/virtualization/virt-manager.nix | 5 ++--- modules/work/libreoffice/default.nix | 6 +++--- modules/work/onlyoffice/default.nix | 5 ++--- 90 files changed, 224 insertions(+), 281 deletions(-) diff --git a/modules/desktop/apps/calibre/default.nix b/modules/desktop/apps/calibre/default.nix index d9bacd36..9618e783 100644 --- a/modules/desktop/apps/calibre/default.nix +++ b/modules/desktop/apps/calibre/default.nix @@ -1,14 +1,13 @@ { outputs, options, config, lib, pkgs, ...}: -with lib; let cfg = config.modules.desktop.apps.calibre; in { options.modules.desktop.apps.calibre = { - enable = mkEnableOption false; + enable = lib.mkEnableOption false; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { users.users.sako.packages = with pkgs; [ calibre ]; diff --git a/modules/desktop/apps/kcc/default.nix b/modules/desktop/apps/kcc/default.nix index ce22d56d..59b114b0 100644 --- a/modules/desktop/apps/kcc/default.nix +++ b/modules/desktop/apps/kcc/default.nix @@ -1,14 +1,13 @@ { outputs, options, config, lib, pkgs, ...}: -with lib; let cfg = config.modules.desktop.apps.kindle-comic-converter; in { options.modules.desktop.apps.kindle-comic-converter = { - enable = mkEnableOption false; + enable = lib.mkEnableOption false; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { users.users.sako.packages = with pkgs; [ kcc ]; diff --git a/modules/desktop/apps/kdeconnect/default.nix b/modules/desktop/apps/kdeconnect/default.nix index 811d5721..e40a2970 100644 --- a/modules/desktop/apps/kdeconnect/default.nix +++ b/modules/desktop/apps/kdeconnect/default.nix @@ -1,14 +1,13 @@ { outputs, options, config, lib, pkgs, ...}: -with lib; let cfg = config.modules.desktop.apps.kdeconnect; in { options.modules.desktop.apps.kdeconnect = { - enable = mkEnableOption false; + enable = lib.mkEnableOption false; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { #users.users.sako.packages = with pkgs; [ # kdeconnect #]; diff --git a/modules/desktop/apps/keepassxc/default.nix b/modules/desktop/apps/keepassxc/default.nix index 286c9c70..e0f24c09 100644 --- a/modules/desktop/apps/keepassxc/default.nix +++ b/modules/desktop/apps/keepassxc/default.nix @@ -1,14 +1,13 @@ { outputs, options, config, lib, pkgs, ...}: -with lib; let cfg = config.modules.desktop.apps.keepassxc; in { options.modules.desktop.apps.keepassxc = { - enable = mkEnableOption false; + enable = lib.mkEnableOption false; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { users.users.sako.packages = with pkgs; [ keepassxc ]; diff --git a/modules/desktop/apps/mangal/default.nix b/modules/desktop/apps/mangal/default.nix index fb8d70bd..2c8dc9a4 100644 --- a/modules/desktop/apps/mangal/default.nix +++ b/modules/desktop/apps/mangal/default.nix @@ -1,14 +1,13 @@ { outputs, options, config, lib, pkgs, ...}: -with lib; let cfg = config.modules.desktop.apps.mangal; in { options.modules.desktop.apps.mangal = { - enable = mkEnableOption false; + enable = lib.mkEnableOption false; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { users.users.sako.packages = with pkgs; [ mangal ]; diff --git a/modules/desktop/apps/nemo/default.nix b/modules/desktop/apps/nemo/default.nix index 99f753bf..6ce55adb 100644 --- a/modules/desktop/apps/nemo/default.nix +++ b/modules/desktop/apps/nemo/default.nix @@ -1,14 +1,13 @@ { outputs, options, config, lib, pkgs, ...}: -with lib; let cfg = config.modules.desktop.apps.nemo; in { options.modules.desktop.apps.nemo = { - enable = mkEnableOption false; + enable = lib.mkEnableOption false; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { users.users.sako.packages = with pkgs; [ cinnamon.nemo ]; diff --git a/modules/desktop/apps/nextcloud/default.nix b/modules/desktop/apps/nextcloud/default.nix index d9dfc43e..dff91f54 100644 --- a/modules/desktop/apps/nextcloud/default.nix +++ b/modules/desktop/apps/nextcloud/default.nix @@ -6,14 +6,14 @@ pkgs, ... }: -with lib; let +let cfg = config.modules.desktop.apps.nextcloud; in { options.modules.desktop.apps.nextcloud = { - enable = mkEnableOption false; + enable = lib.mkEnableOption false; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { users.users.sako.packages = with pkgs; [ nextcloud-client ]; diff --git a/modules/desktop/apps/nicotineplus/default.nix b/modules/desktop/apps/nicotineplus/default.nix index 9f02b9cb..be57fb26 100644 --- a/modules/desktop/apps/nicotineplus/default.nix +++ b/modules/desktop/apps/nicotineplus/default.nix @@ -1,18 +1,13 @@ -# ITS A FILE SHARING THING -# NOT A GOD DAMN ADDICTION -# IM NOT ADDICTED TO MUSIC -# I SWEAR { outputs, options, config, lib, pkgs, ...}: -with lib; let cfg = config.modules.desktop.apps.nicotineplus; in { options.modules.desktop.apps.nicotineplus = { - enable = mkEnableOption false; + enable = lib.mkEnableOption false; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { users.users.sako.packages = with pkgs; [ nicotine-plus ]; diff --git a/modules/desktop/apps/obs/default.nix b/modules/desktop/apps/obs/default.nix index 04251ebd..f0c791dd 100644 --- a/modules/desktop/apps/obs/default.nix +++ b/modules/desktop/apps/obs/default.nix @@ -6,14 +6,14 @@ pkgs, ... }: -with lib; let +let cfg = config.modules.desktop.apps.obs; in { options.modules.desktop.apps.obs = { - enable = mkEnableOption false; + enable = lib.mkEnableOption false; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { users.users.sako.packages = with pkgs; [ obs-studio ]; diff --git a/modules/desktop/apps/pass/default.nix b/modules/desktop/apps/pass/default.nix index 4fe5e70c..e16db217 100644 --- a/modules/desktop/apps/pass/default.nix +++ b/modules/desktop/apps/pass/default.nix @@ -6,14 +6,14 @@ pkgs, ... }: -with lib; let +let cfg = config.modules.desktop.apps.pass; in { options.modules.desktop.apps.pass = { - enable = mkEnableOption false; + enable = lib.mkEnableOption false; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { users.users.sako.packages = with pkgs; [ (pass.withExtensions (pkgs: with pkgs; [pass-otp pass-import pass-genphrase pass-checkup])) rofi-pass diff --git a/modules/desktop/apps/rssguard/default.nix b/modules/desktop/apps/rssguard/default.nix index 2d6bce88..23a0dd3f 100644 --- a/modules/desktop/apps/rssguard/default.nix +++ b/modules/desktop/apps/rssguard/default.nix @@ -1,14 +1,13 @@ { outputs, options, config, lib, pkgs, ...}: -with lib; let cfg = config.modules.desktop.apps.rssguard; in { options.modules.desktop.apps.rssguard = { - enable = mkEnableOption false; + enable = lib.mkEnableOption false; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { users.users.sako.packages = with pkgs; [ rssguard ]; diff --git a/modules/desktop/apps/transmission/daemon.nix b/modules/desktop/apps/transmission/daemon.nix index 200317a1..cd6eba19 100644 --- a/modules/desktop/apps/transmission/daemon.nix +++ b/modules/desktop/apps/transmission/daemon.nix @@ -1,14 +1,13 @@ { outputs, options, config, lib, pkgs, ...}: -with lib; let cfg = config.modules.desktop.apps.transmission; in { options.modules.desktop.apps.transmission = { - daemon = mkEnableOption false; + daemon = lib.mkEnableOption false; }; - config = mkIf cfg.daemon { + config = lib.mkIf cfg.daemon { #TODO(sako):: figure out service users.users.sako.packages = with pkgs; [ transmission diff --git a/modules/desktop/apps/transmission/default.nix b/modules/desktop/apps/transmission/default.nix index 49b8f932..a100a443 100644 --- a/modules/desktop/apps/transmission/default.nix +++ b/modules/desktop/apps/transmission/default.nix @@ -1,5 +1,4 @@ { outputs, options, config, lib, pkgs, ...}: -with lib; let cfg = config.modules.desktop.apps.transmission; in @@ -9,10 +8,10 @@ in ./daemon.nix ]; options.modules.desktop.apps.transmission = { - enable = mkEnableOption false; + enable = lib.mkEnableOption false; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { #TODO(sako):: figure out service users.users.sako.packages = with pkgs; [ transmission-gtk diff --git a/modules/desktop/apps/transmission/remote-tui.nix b/modules/desktop/apps/transmission/remote-tui.nix index 9b4083e0..0fff32e8 100644 --- a/modules/desktop/apps/transmission/remote-tui.nix +++ b/modules/desktop/apps/transmission/remote-tui.nix @@ -1,14 +1,13 @@ { outputs, options, config, lib, pkgs, ...}: -with lib; let cfg = config.modules.desktop.apps.transmission.tui; in { options.modules.desktop.apps.transmission= { - tui = mkEnableOption false; + tui = lib.mkEnableOption false; }; - config = mkIf cfg { + config = lib.mkIf cfg { users.users.sako.packages = with pkgs; [ stig ]; diff --git a/modules/desktop/awesome/default.nix b/modules/desktop/awesome/default.nix index dafc88ed..3840412d 100644 --- a/modules/desktop/awesome/default.nix +++ b/modules/desktop/awesome/default.nix @@ -6,14 +6,14 @@ pkgs, ... }: -with lib; let +let cfg = config.modules.desktop.awesome; in { options.modules.desktop.awesome = { - enable = mkEnableOption false; + enable = lib.mkEnableOption false; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { # this needs to be enabled for gtk apps programs.dconf.enable = true; diff --git a/modules/desktop/browsers/chromium/default.nix b/modules/desktop/browsers/chromium/default.nix index 884bf2a2..8839bafc 100644 --- a/modules/desktop/browsers/chromium/default.nix +++ b/modules/desktop/browsers/chromium/default.nix @@ -1,14 +1,13 @@ { outputs, options, config, lib, pkgs, ...}: -with lib; let cfg = config.modules.desktop.browsers.chromium; in { options.modules.desktop.browsers.chromium = { - enable = mkEnableOption false; + enable = lib.mkEnableOption false; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { users.users.sako.packages = with pkgs; [ chromium ]; diff --git a/modules/desktop/browsers/firefox/default.nix b/modules/desktop/browsers/firefox/default.nix index 12c17df5..a0e1f114 100644 --- a/modules/desktop/browsers/firefox/default.nix +++ b/modules/desktop/browsers/firefox/default.nix @@ -5,17 +5,17 @@ pkgs, ... }: -with lib; let +let cfg = config.modules.desktop.browsers.firefox; in { options.modules.desktop.browsers.firefox = { - enable = mkEnableOption false; + enable = lib.mkEnableOption false; }; # TODO add this # https://github.com/Dook97/firefox-qutebrowser-userchrome - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { programs.firefox = { enable = true; preferences = { diff --git a/modules/desktop/browsers/qutebrowser/default.nix b/modules/desktop/browsers/qutebrowser/default.nix index df0531e4..cc8cd994 100644 --- a/modules/desktop/browsers/qutebrowser/default.nix +++ b/modules/desktop/browsers/qutebrowser/default.nix @@ -1,14 +1,13 @@ { options, config, lib, pkgs, ...}: -with lib; let cfg = config.modules.desktop.browsers.qutebrowser; in { options.modules.desktop.browsers.qutebrowser = { - enable = mkEnableOption false; + enable = lib.mkEnableOption false; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { users.users.sako.packages = with pkgs; [ qutebrowser-qt6 python310Packages.pynacl diff --git a/modules/desktop/bspwm/default.nix b/modules/desktop/bspwm/default.nix index c64ec5aa..c1e9035d 100644 --- a/modules/desktop/bspwm/default.nix +++ b/modules/desktop/bspwm/default.nix @@ -6,7 +6,7 @@ pkgs, ... }: -with lib; let +let cfg = config.modules.desktop.bspwm; in { imports = [ @@ -14,10 +14,10 @@ in { ./lemonbar ]; options.modules.desktop.bspwm = { - enable = mkEnableOption false; + enable = lib.mkEnableOption false; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { # this is needed for gtk configuration to work programs.dconf.enable = true; diff --git a/modules/desktop/bspwm/lemonbar/default.nix b/modules/desktop/bspwm/lemonbar/default.nix index 4e5d6f3d..b777f7a3 100644 --- a/modules/desktop/bspwm/lemonbar/default.nix +++ b/modules/desktop/bspwm/lemonbar/default.nix @@ -1,14 +1,13 @@ { outputs, options, config, lib, pkgs, ...}: -with lib; let cfg = config.modules.desktop.bspwm.lemonbar; in { options.modules.desktop.bspwm.lemonbar = { - enable = mkEnableOption false; + enable = lib.mkEnableOption false; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { users.users.sako.packages = with pkgs; [ lemonbar-xft ]; diff --git a/modules/desktop/bspwm/polybar/default.nix b/modules/desktop/bspwm/polybar/default.nix index ec882f70..6ee83c4c 100644 --- a/modules/desktop/bspwm/polybar/default.nix +++ b/modules/desktop/bspwm/polybar/default.nix @@ -1,14 +1,13 @@ { outputs, options, config, lib, pkgs, ...}: -with lib; let cfg = config.modules.desktop.bspwm.polybar; in { options.modules.desktop.bspwm.polybar = { - enable = mkEnableOption false; + enable = lib.mkEnableOption false; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { users.users.sako.packages = with pkgs; [ polybar ]; diff --git a/modules/desktop/chat/discord/default.nix b/modules/desktop/chat/discord/default.nix index 051dca61..aa46418d 100644 --- a/modules/desktop/chat/discord/default.nix +++ b/modules/desktop/chat/discord/default.nix @@ -6,14 +6,14 @@ pkgs, ... }: -with lib; let +let cfg = config.modules.desktop.chat.discord; in { options.modules.desktop.chat.discord = { - enable = mkEnableOption false; + enable = lib.mkEnableOption false; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { users.users.sako.packages = [ (pkgs.discord.override { withOpenASAR = true; diff --git a/modules/desktop/chat/signal/default.nix b/modules/desktop/chat/signal/default.nix index 24af24f7..2a364d3f 100644 --- a/modules/desktop/chat/signal/default.nix +++ b/modules/desktop/chat/signal/default.nix @@ -6,14 +6,14 @@ pkgs, ... }: -with lib; let +let cfg = config.modules.desktop.chat.signal; in { options.modules.desktop.chat.signal = { - enable = mkEnableOption false; + enable = lib.mkEnableOption false; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { users.users.sako.packages = with pkgs; [ signal-desktop ]; diff --git a/modules/desktop/chat/teams/default.nix b/modules/desktop/chat/teams/default.nix index 9bda885c..cea22b7e 100644 --- a/modules/desktop/chat/teams/default.nix +++ b/modules/desktop/chat/teams/default.nix @@ -1,14 +1,13 @@ { outputs, options, config, lib, pkgs, ...}: -with lib; let cfg = config.modules.desktop.chat.teams; in { options.modules.desktop.chat.teams = { - enable = mkEnableOption false; + enable = lib.mkEnableOption false; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { users.users.sako.packages = with pkgs; [ teams-for-linux ]; diff --git a/modules/desktop/chat/telegram/default.nix b/modules/desktop/chat/telegram/default.nix index 0bfba288..98d15f1d 100644 --- a/modules/desktop/chat/telegram/default.nix +++ b/modules/desktop/chat/telegram/default.nix @@ -6,14 +6,14 @@ pkgs, ... }: -with lib; let +let cfg = config.modules.desktop.chat.telegram; in { options.modules.desktop.chat.telegram = { - enable = mkEnableOption false; + enable = lib.mkEnableOption false; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { users.users.sako.packages = with pkgs; [ telegram-desktop ]; diff --git a/modules/desktop/chat/weechat/default.nix b/modules/desktop/chat/weechat/default.nix index 1bffead2..74c622cc 100644 --- a/modules/desktop/chat/weechat/default.nix +++ b/modules/desktop/chat/weechat/default.nix @@ -6,14 +6,14 @@ pkgs, ... }: -with lib; let +let cfg = config.modules.desktop.chat.weechat; in { options.modules.desktop.chat.weechat = { - enable = mkEnableOption false; + enable = lib.mkEnableOption false; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { users.users.sako.packages = with pkgs; [ weechat ]; diff --git a/modules/desktop/chat/whatsapp/default.nix b/modules/desktop/chat/whatsapp/default.nix index 6ffd76b8..4dd83238 100644 --- a/modules/desktop/chat/whatsapp/default.nix +++ b/modules/desktop/chat/whatsapp/default.nix @@ -1,14 +1,13 @@ { outputs, options, config, lib, pkgs, ...}: -with lib; let cfg = config.modules.desktop.chat.whatsapp; in { options.modules.desktop.chat.whatsapp = { - enable = mkEnableOption false; + enable = lib.mkEnableOption false; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { users.users.sako.packages = with pkgs; [ whatsapp-for-linux ]; diff --git a/modules/desktop/chat/zoom/default.nix b/modules/desktop/chat/zoom/default.nix index 53fc0a81..8c5a518e 100644 --- a/modules/desktop/chat/zoom/default.nix +++ b/modules/desktop/chat/zoom/default.nix @@ -1,14 +1,13 @@ { outputs, options, config, lib, pkgs, ...}: -with lib; let cfg = config.modules.desktop.chat.zoom; in { options.modules.desktop.chat.zoom = { - enable = mkEnableOption false; + enable = lib.mkEnableOption false; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { users.users.sako.packages = with pkgs; [ zoom-us ]; diff --git a/modules/desktop/dunst/default.nix b/modules/desktop/dunst/default.nix index a44b10ec..2b80fca9 100644 --- a/modules/desktop/dunst/default.nix +++ b/modules/desktop/dunst/default.nix @@ -1,14 +1,13 @@ { outputs, options, config, lib, pkgs, ...}: -with lib; let cfg = config.modules.desktop.dunst; in { options.modules.desktop.dunst = { - enable = mkEnableOption false; + enable = lib.mkEnableOption false; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { environment.systemPackages = with pkgs; [ dunst libnotify diff --git a/modules/desktop/dwm/default.nix b/modules/desktop/dwm/default.nix index 5da383e0..2a1a0136 100644 --- a/modules/desktop/dwm/default.nix +++ b/modules/desktop/dwm/default.nix @@ -6,14 +6,14 @@ pkgs, ... }: -with lib; let +let cfg = config.modules.desktop.dwm; in { options.modules.desktop.dwm = { - enable = mkEnableOption false; + enable = lib.mkEnableOption false; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { # this needs to be enabled for gtk apps programs.dconf.enable = true; # enable dwm diff --git a/modules/desktop/exwm/default.nix b/modules/desktop/exwm/default.nix index 8475ed79..6866a34b 100644 --- a/modules/desktop/exwm/default.nix +++ b/modules/desktop/exwm/default.nix @@ -6,17 +6,17 @@ pkgs, ... }: -with lib; let +let cfg = config.modules.desktop.exwm; imports = [ ../../dev/editors/emacs ]; in { options.modules.desktop.exwm = { - enable = mkEnableOption false; + enable = lib.mkEnableOption false; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { modules.dev.editors.emacs.daemon = lib.mkForce false; modules.dev.editors.emacs.enable = lib.mkForce true; # this needs to be enabled for gtk apps diff --git a/modules/desktop/game/grapejuice/default.nix b/modules/desktop/game/grapejuice/default.nix index 48f5b4c6..f3ea8402 100644 --- a/modules/desktop/game/grapejuice/default.nix +++ b/modules/desktop/game/grapejuice/default.nix @@ -1,14 +1,13 @@ { outputs, options, config, lib, pkgs, ...}: -with lib; let cfg = config.modules.desktop.game.grapejuice; in { options.modules.desktop.game.grapejuice = { - enable = mkEnableOption false; + enable = lib.mkEnableOption false; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { users.users.sako.packages = with pkgs; [ grapejuice ]; diff --git a/modules/desktop/game/lutris/default.nix b/modules/desktop/game/lutris/default.nix index d5404d34..842a3291 100644 --- a/modules/desktop/game/lutris/default.nix +++ b/modules/desktop/game/lutris/default.nix @@ -1,14 +1,13 @@ { outputs, options, config, lib, pkgs, ...}: -with lib; let cfg = config.modules.desktop.game.lutris; in { options.modules.desktop.game.lutris = { - enable = mkEnableOption false; + enable = lib.mkEnableOption false; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { users.users.sako.packages = with pkgs; [ lutris ]; diff --git a/modules/desktop/game/steam/default.nix b/modules/desktop/game/steam/default.nix index 53338c28..918f64fc 100644 --- a/modules/desktop/game/steam/default.nix +++ b/modules/desktop/game/steam/default.nix @@ -1,14 +1,13 @@ { outputs, options, config, lib, pkgs, ...}: -with lib; let cfg = config.modules.desktop.game.steam; in { options.modules.desktop.game.steam = { - enable = mkEnableOption false; + enable = lib.mkEnableOption false; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { users.users.sako.packages = with pkgs; [ steam ]; diff --git a/modules/desktop/game/tetrio/default.nix b/modules/desktop/game/tetrio/default.nix index cd7c1559..f04913ab 100644 --- a/modules/desktop/game/tetrio/default.nix +++ b/modules/desktop/game/tetrio/default.nix @@ -6,14 +6,14 @@ pkgs, ... }: -with lib; let +let cfg = config.modules.desktop.game.tetrio; in { options.modules.desktop.game.tetrio = { - enable = mkEnableOption false; + enable = lib.mkEnableOption false; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { users.users.sako.packages = with pkgs; [ (tetrio-desktop.override { withTetrioPlus = true; diff --git a/modules/desktop/game/wine/default.nix b/modules/desktop/game/wine/default.nix index a3b307d0..7a847023 100644 --- a/modules/desktop/game/wine/default.nix +++ b/modules/desktop/game/wine/default.nix @@ -1,14 +1,13 @@ { outputs, options, config, lib, pkgs, ...}: -with lib; let cfg = config.modules.desktop.game.wine; in { options.modules.desktop.game.wine = { - enable = mkEnableOption false; + enable = lib.mkEnableOption false; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { users.users.sako.packages = with pkgs; [ winetricks wineWowPackages.staging diff --git a/modules/desktop/gnome/default.nix b/modules/desktop/gnome/default.nix index e388ee9c..bfbe4bdb 100644 --- a/modules/desktop/gnome/default.nix +++ b/modules/desktop/gnome/default.nix @@ -1,14 +1,13 @@ { outputs, options, config, lib, pkgs, ...}: -with lib; let cfg = config.modules.desktop.gnome; in { options.modules.desktop.gnome = { - enable = mkEnableOption false; + enable = lib.mkEnableOption false; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { services.xserver = { enable = true; displayManager = { diff --git a/modules/desktop/hyprland/default.nix b/modules/desktop/hyprland/default.nix index 825c9c77..52d1ef09 100644 --- a/modules/desktop/hyprland/default.nix +++ b/modules/desktop/hyprland/default.nix @@ -1,14 +1,13 @@ { outputs, options, config, lib, pkgs, ...}: -with lib; let cfg = config.modules.desktop.hyprland; in { options.modules.desktop.hyprland = { - enable = mkEnableOption false; + enable = lib.mkEnableOption false; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { services.xserver = { enable = true; displayManager = { diff --git a/modules/desktop/i3/default.nix b/modules/desktop/i3/default.nix index c0c8915f..99cd6e0e 100644 --- a/modules/desktop/i3/default.nix +++ b/modules/desktop/i3/default.nix @@ -6,14 +6,14 @@ pkgs, ... }: -with lib; let +let cfg = config.modules.desktop.i3; in { options.modules.desktop.i3 = { - enable = mkEnableOption false; + enable = lib.mkEnableOption false; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { # this is needed for gtk configuration to work programs.dconf.enable = true; diff --git a/modules/desktop/kde/default.nix b/modules/desktop/kde/default.nix index 94d844eb..82dc86a3 100644 --- a/modules/desktop/kde/default.nix +++ b/modules/desktop/kde/default.nix @@ -1,14 +1,13 @@ { outputs, options, config, lib, pkgs, ...}: -with lib; let cfg = config.modules.desktop.kde; in { options.modules.desktop.kde = { - enable = mkEnableOption false; + enable = lib.mkEnableOption false; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { services.xserver = { enable = true; libinput.enable = true; diff --git a/modules/desktop/kitty/default.nix b/modules/desktop/kitty/default.nix index 39f58df0..3c8695cc 100644 --- a/modules/desktop/kitty/default.nix +++ b/modules/desktop/kitty/default.nix @@ -5,14 +5,14 @@ pkgs, ... }: -with lib; let +let cfg = config.modules.desktop.kitty; in { options.modules.desktop.kitty = { - enable = mkEnableOption false; + enable = lib.mkEnableOption false; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { users.users.sako.packages = with pkgs; [ kitty ]; diff --git a/modules/desktop/media/blender/default.nix b/modules/desktop/media/blender/default.nix index bc6b6773..646c6a7f 100644 --- a/modules/desktop/media/blender/default.nix +++ b/modules/desktop/media/blender/default.nix @@ -1,14 +1,13 @@ { outputs, options, config, lib, pkgs, ...}: -with lib; let cfg = config.modules.desktop.media.blender; in { options.modules.desktop.media.blender = { - enable = mkEnableOption false; + enable = lib.mkEnableOption false; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { users.users.sako.packages = with pkgs; [ blender ]; diff --git a/modules/desktop/media/feishin/default.nix b/modules/desktop/media/feishin/default.nix index 0ae094ba..85440146 100644 --- a/modules/desktop/media/feishin/default.nix +++ b/modules/desktop/media/feishin/default.nix @@ -1,14 +1,13 @@ { outputs, options, config, lib, pkgs, ...}: -with lib; let cfg = config.modules.desktop.media.feishin; in { options.modules.desktop.media.feishin = { - enable = mkEnableOption false; + enable = lib.mkEnableOption false; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { users.users.sako.packages = with pkgs; [ feishin ]; diff --git a/modules/desktop/media/gimp/default.nix b/modules/desktop/media/gimp/default.nix index 46e9b757..5942c985 100644 --- a/modules/desktop/media/gimp/default.nix +++ b/modules/desktop/media/gimp/default.nix @@ -1,14 +1,13 @@ { outputs, options, config, lib, pkgs, ...}: -with lib; let cfg = config.modules.desktop.media.gimp; in { options.modules.desktop.media.gimp = { - enable = mkEnableOption false; + enable = lib.mkEnableOption false; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { users.users.sako.packages = with pkgs; [ gimp ]; diff --git a/modules/desktop/media/jellyfin/default.nix b/modules/desktop/media/jellyfin/default.nix index b4416098..d2442601 100644 --- a/modules/desktop/media/jellyfin/default.nix +++ b/modules/desktop/media/jellyfin/default.nix @@ -6,14 +6,14 @@ pkgs, ... }: -with lib; let +let cfg = config.modules.desktop.media.jellyfin; in { options.modules.desktop.media.jellyfin = { - enable = mkEnableOption false; + enable = lib.mkEnableOption false; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { users.users.sako.packages = with pkgs; [ jellyfin-media-player ]; diff --git a/modules/desktop/media/kdenlive/default.nix b/modules/desktop/media/kdenlive/default.nix index 0c269d9f..5baf59d6 100644 --- a/modules/desktop/media/kdenlive/default.nix +++ b/modules/desktop/media/kdenlive/default.nix @@ -1,14 +1,13 @@ { outputs, options, config, lib, pkgs, ...}: -with lib; let cfg = config.modules.desktop.media.kdenlive; in { options.modules.desktop.media.kdenlive = { - enable = mkEnableOption false; + enable = lib.mkEnableOption false; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { users.users.sako.packages = with pkgs; [ kdenlive mediainfo diff --git a/modules/desktop/media/krita/default.nix b/modules/desktop/media/krita/default.nix index ab2d5dc5..2f8007b0 100644 --- a/modules/desktop/media/krita/default.nix +++ b/modules/desktop/media/krita/default.nix @@ -1,14 +1,13 @@ { outputs, options, config, lib, pkgs, ...}: -with lib; let cfg = config.modules.desktop.media.krita; in { options.modules.desktop.media.krita = { - enable = mkEnableOption false; + enable = lib.mkEnableOption false; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { users.users.sako.packages = with pkgs; [ krita ]; diff --git a/modules/desktop/media/lmms/default.nix b/modules/desktop/media/lmms/default.nix index 50900522..459c4692 100644 --- a/modules/desktop/media/lmms/default.nix +++ b/modules/desktop/media/lmms/default.nix @@ -1,14 +1,13 @@ { outputs, options, config, lib, pkgs, ...}: -with lib; let cfg = config.modules.desktop.media.lmms; in { options.modules.desktop.media.lmms = { - enable = mkEnableOption false; + enable = lib.mkEnableOption false; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { users.users.sako.packages = with pkgs; [ lmms ]; diff --git a/modules/desktop/media/mpv/default.nix b/modules/desktop/media/mpv/default.nix index b2e3e426..04c3c8ce 100644 --- a/modules/desktop/media/mpv/default.nix +++ b/modules/desktop/media/mpv/default.nix @@ -1,14 +1,13 @@ { outputs, options, config, lib, pkgs, ...}: -with lib; let cfg = config.modules.desktop.media.mpv; in { options.modules.desktop.media.mpv = { - enable = mkEnableOption false; + enable = lib.mkEnableOption false; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { users.users.sako.packages = with pkgs; [ mpv ]; diff --git a/modules/desktop/media/resolve/default.nix b/modules/desktop/media/resolve/default.nix index d1158b4b..89f279c4 100644 --- a/modules/desktop/media/resolve/default.nix +++ b/modules/desktop/media/resolve/default.nix @@ -1,15 +1,13 @@ { outputs, options, config, lib, pkgs, ...}: -with lib; -# lmao this is broken let cfg = config.modules.desktop.media.resolve; in { options.modules.desktop.media.resolve = { - enable = mkEnableOption false; + enable = lib.mkEnableOption false; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { users.users.sako.packages = with pkgs; [ sako.davinci-resolve ]; diff --git a/modules/desktop/picom/default.nix b/modules/desktop/picom/default.nix index 9c17decd..315c804a 100644 --- a/modules/desktop/picom/default.nix +++ b/modules/desktop/picom/default.nix @@ -6,14 +6,14 @@ pkgs, ... }: -with lib; let +let cfg = config.modules.desktop.picom; in { options.modules.desktop.picom = { - enable = mkEnableOption false; + enable = lib.mkEnableOption false; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { users.users.sako.packages = with pkgs; [ picom ]; diff --git a/modules/desktop/plymouth/default.nix b/modules/desktop/plymouth/default.nix index ce96e46d..7ca5dcaa 100644 --- a/modules/desktop/plymouth/default.nix +++ b/modules/desktop/plymouth/default.nix @@ -6,14 +6,14 @@ pkgs, ... }: -with lib; let +let cfg = config.modules.desktop.plymouth; in { options.modules.desktop.plymouth = { - enable = mkEnableOption false; + enable = lib.mkEnableOption false; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { boot.plymouth = { enable = true; }; diff --git a/modules/desktop/printing/default.nix b/modules/desktop/printing/default.nix index dfacf60a..42c427c1 100644 --- a/modules/desktop/printing/default.nix +++ b/modules/desktop/printing/default.nix @@ -5,14 +5,14 @@ pkgs, ... }: -with lib; let +let cfg = config.modules.desktop.printing; in { options.modules.desktop.printing = { - enable = mkEnableOption false; + enable = lib.mkEnableOption false; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { # enable printing itself services.printing = { enable = true; diff --git a/modules/desktop/qtile/default.nix b/modules/desktop/qtile/default.nix index d8ea1faa..8b2b8cc6 100644 --- a/modules/desktop/qtile/default.nix +++ b/modules/desktop/qtile/default.nix @@ -6,16 +6,16 @@ pkgs, ... }: -with lib; let +let cfg = config.modules.desktop.qtile; in { options.modules.desktop.qtile = { - enable = mkEnableOption false; + enable = lib.mkEnableOption false; }; #TODO Do this - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { services.xserver = { enable = true; windowManager.qtile = { diff --git a/modules/desktop/wezterm/default.nix b/modules/desktop/wezterm/default.nix index e7708728..3855cff2 100644 --- a/modules/desktop/wezterm/default.nix +++ b/modules/desktop/wezterm/default.nix @@ -5,14 +5,14 @@ pkgs, ... }: -with lib; let +let cfg = config.modules.desktop.wezterm; in { options.modules.desktop.wezterm = { - enable = mkEnableOption false; + enable = lib.mkEnableOption false; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { users.users.sako.packages = with pkgs; [ wezterm ]; diff --git a/modules/desktop/wireguard/default.nix b/modules/desktop/wireguard/default.nix index af4b61b9..0120a996 100644 --- a/modules/desktop/wireguard/default.nix +++ b/modules/desktop/wireguard/default.nix @@ -6,14 +6,14 @@ pkgs, ... }: -with lib; let +let cfg = config.modules.desktop.wireguard; in { options.modules.desktop.wireguard = { - enable = mkEnableOption false; + enable = lib.mkEnableOption false; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { # todo declaritivly setting it up networking.wireguard.enable = true; }; diff --git a/modules/desktop/xmonad/default.nix b/modules/desktop/xmonad/default.nix index 20e13d1f..557e8d3e 100644 --- a/modules/desktop/xmonad/default.nix +++ b/modules/desktop/xmonad/default.nix @@ -5,14 +5,14 @@ pkgs, ... }: -with lib; let +let cfg = config.modules.desktop.xmonad; in { options.modules.desktop.xmonad = { - enable = mkEnableOption false; + enable = lib.mkEnableOption false; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { # this needs to be enabled for gtk apps programs.dconf.enable = true; diff --git a/modules/dev/cc.nix b/modules/dev/cc.nix index fefd5b87..3995f4cf 100644 --- a/modules/dev/cc.nix +++ b/modules/dev/cc.nix @@ -1,14 +1,13 @@ { outputs, options, config, lib, pkgs, ...}: -with lib; let cfg = config.modules.dev.cc; in { options.modules.dev.cc = { - enable = mkEnableOption false; + enable = lib.mkEnableOption false; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { users.users.sako.packages = with pkgs; [ gcc gnumake diff --git a/modules/dev/cs.nix b/modules/dev/cs.nix index 2e73b4c2..0a5779eb 100644 --- a/modules/dev/cs.nix +++ b/modules/dev/cs.nix @@ -1,14 +1,13 @@ { outputs, options, config, lib, pkgs, ...}: -with lib; let cfg = config.modules.dev.csharp; in { options.modules.dev.csharp = { - enable = mkEnableOption false; + enable = lib.mkEnableOption false; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { users.users.sako.packages = with pkgs; [ omnisharp-roslyn ]; diff --git a/modules/dev/editors/emacs/default.nix b/modules/dev/editors/emacs/default.nix index 036a23a9..f5fae77b 100644 --- a/modules/dev/editors/emacs/default.nix +++ b/modules/dev/editors/emacs/default.nix @@ -7,7 +7,7 @@ inputs, ... }: -with lib; let +let cfg = config.modules.dev.editors.emacs; @@ -72,16 +72,16 @@ with lib; let }; in { options.modules.dev.editors.emacs = { - enable = mkEnableOption false; - daemon = mkEnableOption true; - package = mkOption { - type = with types; package; + enable = lib.mkEnableOption false; + daemon = lib.mkEnableOption true; + package = lib.mkOption { + type = with lib.types; package; default = pkgs.emacs-unstable; description = "pkgs. followed by the name of the emacs overlay package"; }; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { nixpkgs.overlays = [ inputs.emacs-overlay.overlay ]; diff --git a/modules/dev/editors/nvim/default.nix b/modules/dev/editors/nvim/default.nix index 8b4c2f32..d26e9a9e 100644 --- a/modules/dev/editors/nvim/default.nix +++ b/modules/dev/editors/nvim/default.nix @@ -6,14 +6,14 @@ pkgs, ... }: -with lib; let +let cfg = config.modules.dev.editors.nvim; in { options.modules.dev.editors.nvim = { - enable = mkEnableOption false; + enable = lib.mkEnableOption false; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { # because yes users.users.sako.packages = with pkgs; [ neovim diff --git a/modules/dev/editors/vscode/default.nix b/modules/dev/editors/vscode/default.nix index f22f8617..df6328fc 100644 --- a/modules/dev/editors/vscode/default.nix +++ b/modules/dev/editors/vscode/default.nix @@ -6,17 +6,17 @@ pkgs, ... }: -with lib; let +let cfg = config.modules.dev.editors.vscode; in { imports = [ ./fhs.nix ]; options.modules.dev.editors.vscode = { - enable = mkEnableOption false; + enable = lib.mkEnableOption false; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { users.users.sako.packages = with pkgs; [ (vscode-with-extensions.override { vscodeExtensions = with vscode-extensions; diff --git a/modules/dev/editors/vscode/fhs.nix b/modules/dev/editors/vscode/fhs.nix index e1fa32e9..d3b6d3c6 100644 --- a/modules/dev/editors/vscode/fhs.nix +++ b/modules/dev/editors/vscode/fhs.nix @@ -6,14 +6,14 @@ pkgs, ... }: -with lib; let +let cfg = config.modules.dev.editors.vscode.fhs; in { options.modules.dev.editors.vscode.fhs = { - enable = mkEnableOption false; + enable = lib.mkEnableOption false; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { users.users.sako.packages = with pkgs; [ vscode.fhs ]; diff --git a/modules/dev/javascript.nix b/modules/dev/javascript.nix index cea1c53b..62789f30 100644 --- a/modules/dev/javascript.nix +++ b/modules/dev/javascript.nix @@ -1,14 +1,13 @@ { outputs, options, config, lib, pkgs, ...}: -with lib; let cfg = config.modules.dev.javascript; in { options.modules.dev.javascript = { - enable = mkEnableOption false; + enable = lib.mkEnableOption false; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { users.users.sako.packages = with pkgs; [ nodejs yarn diff --git a/modules/dev/lua.nix b/modules/dev/lua.nix index cd945d40..52abb03d 100644 --- a/modules/dev/lua.nix +++ b/modules/dev/lua.nix @@ -6,14 +6,14 @@ pkgs, ... }: -with lib; let +let cfg = config.modules.dev.lua; in { options.modules.dev.lua = { - enable = mkEnableOption false; + enable = lib.mkEnableOption false; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { users.users.sako.packages = with pkgs; [ lua-language-server lua diff --git a/modules/dev/nil.nix b/modules/dev/nil.nix index 687805bf..d3432f95 100644 --- a/modules/dev/nil.nix +++ b/modules/dev/nil.nix @@ -1,14 +1,13 @@ { outputs, options, config, lib, pkgs, ...}: -with lib; let cfg = config.modules.dev.nil; in { options.modules.dev.nil = { - enable = mkEnableOption false; + enable = lib.mkEnableOption false; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { environment.systemPackages = with pkgs; [ nil alejandra diff --git a/modules/dev/nixd.nix b/modules/dev/nixd.nix index 9a390995..6796ed31 100644 --- a/modules/dev/nixd.nix +++ b/modules/dev/nixd.nix @@ -8,16 +8,16 @@ pkgs, ... }: -with lib; let +let cfg = config.modules.dev.nixd; in { options.modules.dev.nixd = { - enable = mkEnableOption false; + enable = lib.mkEnableOption false; }; # TODO(sako):: figure out how .nixd.json works - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { environment.systemPackages = with pkgs; [ unstable.nixd alejandra diff --git a/modules/dev/python.nix b/modules/dev/python.nix index c6744196..dfb8cf6a 100644 --- a/modules/dev/python.nix +++ b/modules/dev/python.nix @@ -6,14 +6,14 @@ pkgs, ... }: -with lib; let +let cfg = config.modules.dev.python; in { options.modules.dev.python = { - enable = mkEnableOption false; + enable = lib.mkEnableOption false; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { users.users.sako.packages = with pkgs; [ python3 black diff --git a/modules/dev/rust.nix b/modules/dev/rust.nix index 897083c0..78f7a2cf 100644 --- a/modules/dev/rust.nix +++ b/modules/dev/rust.nix @@ -1,14 +1,13 @@ { outputs, options, config, lib, pkgs, ...}: -with lib; let cfg = config.modules.dev.rust; in { options.modules.dev.rust= { - enable = mkEnableOption false; + enable = lib.mkEnableOption false; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { users.users.sako.packages = with pkgs; [ rustup cargo diff --git a/modules/hardware/bluetooth/default.nix b/modules/hardware/bluetooth/default.nix index 66731d71..eb54d85e 100644 --- a/modules/hardware/bluetooth/default.nix +++ b/modules/hardware/bluetooth/default.nix @@ -1,14 +1,13 @@ { options, config, lib, pkgs, ...}: -with lib; let cfg = config.modules.hardware.bluetooth; in { options.modules.hardware.bluetooth = { - enable = mkEnableOption false; + enable = lib.mkEnableOption false; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { hardware.bluetooth = { enable = true; settings = { diff --git a/modules/hardware/intel/default.nix b/modules/hardware/intel/default.nix index df8b0f07..af4c9ca0 100644 --- a/modules/hardware/intel/default.nix +++ b/modules/hardware/intel/default.nix @@ -1,14 +1,13 @@ { outputs, options, config, lib, pkgs, ...}: -with lib; let cfg = config.modules.hardware.intelgputools; in { options.modules.hardware.intelgputools = { - enable = mkEnableOption false; + enable = lib.mkEnableOption false; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { users.users.sako.packages = with pkgs; [ intel-gpu-tools ]; diff --git a/modules/hardware/nvidia/default.nix b/modules/hardware/nvidia/default.nix index 3f8f2c6f..508f4bf4 100644 --- a/modules/hardware/nvidia/default.nix +++ b/modules/hardware/nvidia/default.nix @@ -6,17 +6,17 @@ pkgs, ... }: -with lib; let +let cfg = config.modules.hardware.nvidia; in { imports = [ ./prime.nix ]; options.modules.hardware.nvidia = { - enable = mkEnableOption false; + enable = lib.mkEnableOption false; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { hardware.opengl = { enable = true; driSupport = true; diff --git a/modules/hardware/nvidia/prime.nix b/modules/hardware/nvidia/prime.nix index eb47491f..352d13f6 100644 --- a/modules/hardware/nvidia/prime.nix +++ b/modules/hardware/nvidia/prime.nix @@ -6,26 +6,26 @@ pkgs, ... }: -with lib; let +let cfg = config.modules.hardware.nvidia.prime; busIDType = lib.types.strMatching "([[:print:]]+[\:\@][0-9]{1,3}\:[0-9]{1,2}\:[0-9])?"; in { options.modules.hardware.nvidia.prime = { - enable = mkOption { - type = types.bool; + enable = lib.mkOption { + type = lib.types.bool; default = false; }; - intelBusId = mkOption { + intelBusId = lib.mkOption { type = busIDType; default = ""; }; - nvidiaBusId = mkOption { + nvidiaBusId = lib.mkOption { type = busIDType; default = ""; }; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { hardware.nvidia = { prime = { offload = { diff --git a/modules/hardware/pipewire/default.nix b/modules/hardware/pipewire/default.nix index 50c351f1..2b2e048c 100644 --- a/modules/hardware/pipewire/default.nix +++ b/modules/hardware/pipewire/default.nix @@ -1,14 +1,13 @@ { outputs, options, config, lib, pkgs, ...}: -with lib; let cfg = config.modules.hardware.pipewire; in { options.modules.hardware.pipewire = { - enable = mkEnableOption false; + enable = lib.mkEnableOption false; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { # resolve racial conflict between # pulseaudio and pipewire sound.enable = lib.mkDefault false; diff --git a/modules/media/mopidy/default.nix b/modules/media/mopidy/default.nix index d29cc361..f52a0b89 100644 --- a/modules/media/mopidy/default.nix +++ b/modules/media/mopidy/default.nix @@ -5,14 +5,14 @@ lib, ... }: -with lib; let +let cfg = config.modules.media.mopidy; in { options.modules.media.mopidy = { - enable = mkEnableOption false; + enable = lib.mkEnableOption false; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { services.mopidy = { enable = true; extensionPackages = with pkgs; [ diff --git a/modules/media/mpd/default.nix b/modules/media/mpd/default.nix index 00468811..1693d27a 100644 --- a/modules/media/mpd/default.nix +++ b/modules/media/mpd/default.nix @@ -1,14 +1,13 @@ { outputs, options, config, lib, pkgs, ...}: -with lib; let cfg = config.modules.media.mpd; in { options.modules.media.mpd = { - enable = mkEnableOption false; + enable = lib.mkEnableOption false; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { services.mpd = { enable = true; user = "sako"; diff --git a/modules/media/ncmpcpp/default.nix b/modules/media/ncmpcpp/default.nix index 6fa2058a..37e2c5d6 100644 --- a/modules/media/ncmpcpp/default.nix +++ b/modules/media/ncmpcpp/default.nix @@ -1,14 +1,13 @@ { outputs, options, config, lib, pkgs, ...}: -with lib; let cfg = config.modules.media.ncmpcpp; in { options.modules.media.ncmpcpp = { - enable = mkEnableOption false; + enable = lib.mkEnableOption false; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { users.users.sako.packages = with pkgs; [ ncmpcpp ]; diff --git a/modules/security/age.nix b/modules/security/age.nix index 4ca213c8..caca238a 100644 --- a/modules/security/age.nix +++ b/modules/security/age.nix @@ -1,14 +1,13 @@ { outputs, options, config, lib, pkgs, ...}: -with lib; let cfg = config.modules.security.age; in { options.modules.security.age = { - enable = mkEnableOption false; + enable = lib.mkEnableOption false; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { environment.systemPackages = with pkgs; [ age ]; diff --git a/modules/security/certs/default.nix b/modules/security/certs/default.nix index 1b72a884..70374e7c 100644 --- a/modules/security/certs/default.nix +++ b/modules/security/certs/default.nix @@ -6,14 +6,14 @@ pkgs, ... }: -with lib; let +let cfg = config.modules.security.certs; in { options.modules.security.certs = { - enable = mkEnableOption false; + enable = lib.mkEnableOption false; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { security.pki.certificateFiles = [./trust/homelab.pem]; }; } diff --git a/modules/security/sops.nix b/modules/security/sops.nix index cfc5933b..6ac09427 100644 --- a/modules/security/sops.nix +++ b/modules/security/sops.nix @@ -6,14 +6,14 @@ pkgs, ... }: -with lib; let +let cfg = config.modules.security.age; in { options.modules.security.sops = { - enable = mkEnableOption false; + enable = lib.mkEnableOption false; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { environment.systemPackages = with pkgs; [ sops ]; diff --git a/modules/shell/aria/default.nix b/modules/shell/aria/default.nix index 5c2d7ee3..8eece254 100644 --- a/modules/shell/aria/default.nix +++ b/modules/shell/aria/default.nix @@ -1,14 +1,13 @@ { outputs, options, config, lib, pkgs, ...}: -with lib; let cfg = config.modules.shell.aria; in { options.modules.shell.aria= { - enable = mkEnableOption false; + enable = lib.mkEnableOption false; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { users.users.sako.packages = with pkgs; [ aria ]; diff --git a/modules/shell/newsboat/default.nix b/modules/shell/newsboat/default.nix index 27c5cd22..63203e92 100644 --- a/modules/shell/newsboat/default.nix +++ b/modules/shell/newsboat/default.nix @@ -1,14 +1,13 @@ { outputs, options, config, lib, pkgs, ...}: -with lib; let cfg = config.modules.shell.newsboat; in { options.modules.shell.newsboat= { - enable = mkEnableOption false; + enable = lib.mkEnableOption false; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { users.users.sako.packages = with pkgs; [ newsboat ]; diff --git a/modules/shell/nix/optimization.nix b/modules/shell/nix/optimization.nix index 095e108e..0d990c6e 100644 --- a/modules/shell/nix/optimization.nix +++ b/modules/shell/nix/optimization.nix @@ -2,15 +2,14 @@ # this automatically optimizes stuff like nix-store # and cleans out garbage weekly # also limits generations -with lib; let cfg = config.modules.shell.nix.optimize; in { options.modules.shell.nix.optimize = { - enable = mkEnableOption false; + enable = lib.mkEnableOption false; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { nix = { # garbage collection gc = { diff --git a/modules/shell/nix/search.nix b/modules/shell/nix/search.nix index 0bec6288..0e1a448a 100644 --- a/modules/shell/nix/search.nix +++ b/modules/shell/nix/search.nix @@ -2,15 +2,14 @@ # this makes # nix search nixpkgs # ALOT faster -with lib; let cfg = config.modules.shell.nix.search; in { options.modules.shell.nix.search = { - enable = mkEnableOption false; + enable = lib.mkEnableOption false; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { nix = { registry = { nixpkgs.flake = inputs.nixpkgs; diff --git a/modules/shell/ranger/default.nix b/modules/shell/ranger/default.nix index 3e627b38..5e3e2c25 100644 --- a/modules/shell/ranger/default.nix +++ b/modules/shell/ranger/default.nix @@ -6,14 +6,14 @@ pkgs, ... }: -with lib; let +let cfg = config.modules.shell.ranger; in { options.modules.shell.ranger = { - enable = mkEnableOption false; + enable = lib.mkEnableOption false; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { users.users.sako.packages = with pkgs; [ ranger # pdf viewer diff --git a/modules/shell/tmux/default.nix b/modules/shell/tmux/default.nix index 4d043183..2e410e5e 100644 --- a/modules/shell/tmux/default.nix +++ b/modules/shell/tmux/default.nix @@ -1,14 +1,13 @@ { outputs, options, config, lib, pkgs, ...}: -with lib; let cfg = config.modules.shell.tmux; in { options.modules.shell.tmux = { - enable = mkEnableOption false; + enable = lib.mkEnableOption false; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { environment.systemPackages = with pkgs; [ tmux ]; diff --git a/modules/shell/zsh/default.nix b/modules/shell/zsh/default.nix index 5d5e321b..897ea075 100644 --- a/modules/shell/zsh/default.nix +++ b/modules/shell/zsh/default.nix @@ -6,14 +6,14 @@ pkgs, ... }: -with lib; let +let cfg = config.modules.shell.zsh; in { options.modules.shell.zsh = { - enable = mkEnableOption false; + enable = lib.mkEnableOption false; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { users.users.sako.shell = pkgs.zsh; programs.zsh = { diff --git a/modules/virtualization/virt-manager.nix b/modules/virtualization/virt-manager.nix index 5c5cbb91..ed1ea5b4 100644 --- a/modules/virtualization/virt-manager.nix +++ b/modules/virtualization/virt-manager.nix @@ -1,14 +1,13 @@ { outputs, options, config, lib, pkgs, ...}: -with lib; let cfg = config.modules.virtualization.libvirtd; in { options.modules.virtualization.libvirtd = { - enable = mkEnableOption false; + enable = lib.mkEnableOption false; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { virtualization.libvirtd.enable = true; programs.dconf.enable = true; environtment.systemPackages = with pkgs; [ diff --git a/modules/work/libreoffice/default.nix b/modules/work/libreoffice/default.nix index 108e85cf..bb72a8a8 100644 --- a/modules/work/libreoffice/default.nix +++ b/modules/work/libreoffice/default.nix @@ -6,14 +6,14 @@ pkgs, ... }: -with lib; let +let cfg = config.modules.work.libreoffice; in { options.modules.work.libreoffice = { - enable = mkEnableOption false; + enable = lib.mkEnableOption false; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { users.users.sako.packages = with pkgs; [ libreoffice ]; diff --git a/modules/work/onlyoffice/default.nix b/modules/work/onlyoffice/default.nix index 73668c26..76f17b14 100644 --- a/modules/work/onlyoffice/default.nix +++ b/modules/work/onlyoffice/default.nix @@ -1,16 +1,15 @@ # i wonder what the difference is { outputs, options, config, lib, pkgs, ...}: -with lib; let cfg = config.modules.work.onlyoffice; in { options.modules.work.onlyoffice = { - enable = mkEnableOption false; + enable = lib.mkEnableOption false; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { users.users.sako.packages = with pkgs; [ onlyoffice-bin ];