diff --git a/hosts/chmura/jacekpoz.pl.nix b/hosts/chmura/jacekpoz.pl.nix index 67d80fa..2c80ece 100644 --- a/hosts/chmura/jacekpoz.pl.nix +++ b/hosts/chmura/jacekpoz.pl.nix @@ -4,7 +4,7 @@ pkgs, ... }: let - inherit (lib) getExe'; + inherit (lib.meta) getExe'; systemctl = getExe' pkgs.systemd "systemctl"; diff --git a/hosts/chmura/services/anki-sync-server.nix b/hosts/chmura/services/anki-sync-server.nix index f35d042..445a3b2 100644 --- a/hosts/chmura/services/anki-sync-server.nix +++ b/hosts/chmura/services/anki-sync-server.nix @@ -4,7 +4,7 @@ pkgs, ... }: let - inherit (lib) getExe'; + inherit (lib.meta) getExe'; in { age.secrets.anki-user-credentials.file = ../../../secrets/anki-user-credentials.age; diff --git a/hosts/del/configuration.nix b/hosts/del/configuration.nix index 1e8b348..6b759a7 100644 --- a/hosts/del/configuration.nix +++ b/hosts/del/configuration.nix @@ -5,7 +5,8 @@ pkgs, ... }: let - inherit (lib) getExe getExe'; + inherit (lib.meta) getExe getExe'; + inherit (lib.modules) mkForce; inherit (config.myOptions.other.system) username; in { @@ -105,7 +106,7 @@ in { # https://github.com/NixOS/nixpkgs/issues/270809 systemd.services.ModemManager = { - enable = lib.mkForce true; + enable = mkForce true; path = [ pkgs.libqmi ]; wantedBy = [ "multi-user.target" "network.target" ]; }; diff --git a/hosts/del/waybar.nix b/hosts/del/waybar.nix index 0709201..38fe805 100644 --- a/hosts/del/waybar.nix +++ b/hosts/del/waybar.nix @@ -7,7 +7,7 @@ }: let inherit (config.myOptions.other.system) username; - inherit (lib) getExe getExe'; + inherit (lib.meta) getExe getExe'; iio-hyprland = getExe inputs.iio-hyprland.packages.${pkgs.system}.default; wpctl = getExe' pkgs.wireplumber "wpctl"; @@ -349,7 +349,7 @@ in { .modules-right > widget:first-child > #workspaces { margin-right: 0; } - + #pulseaudio { margin-top: 3px; margin-bottom: 3px; @@ -526,7 +526,7 @@ in { background: @mantle; color: @green; } - + #custom-rot { margin-top: 3px; margin-bottom: 3px; @@ -563,4 +563,3 @@ in { }; }; } - diff --git a/hosts/niks/configuration.nix b/hosts/niks/configuration.nix index 3bd023c..d5736d9 100644 --- a/hosts/niks/configuration.nix +++ b/hosts/niks/configuration.nix @@ -5,7 +5,7 @@ pkgs, ... }: let - inherit (lib) getExe; + inherit (lib.meta) getExe; in { nixpkgs.config = { permittedInsecurePackages = [ diff --git a/hosts/niks/waybar.nix b/hosts/niks/waybar.nix index ffaa177..ebf19e2 100644 --- a/hosts/niks/waybar.nix +++ b/hosts/niks/waybar.nix @@ -7,7 +7,7 @@ }: let inherit (config.myOptions.other.system) username; - inherit (lib) getExe getExe'; + inherit (lib.meta) getExe getExe'; wpctl = getExe' pkgs.wireplumber "wpctl"; brightnessctl = getExe pkgs.brightnessctl; @@ -332,7 +332,7 @@ in { .modules-right > widget:first-child > #workspaces { margin-right: 0; } - + #pulseaudio { margin-top: 3px; margin-bottom: 3px; @@ -524,4 +524,3 @@ in { }; }; } - diff --git a/modules/cli/agenix.nix b/modules/cli/agenix.nix index 28a969b..a02d779 100644 --- a/modules/cli/agenix.nix +++ b/modules/cli/agenix.nix @@ -9,7 +9,7 @@ inherit (config.myOptions.other.system) username; - inherit (lib) mkEnableOption mkIf; + inherit (lib.modules) mkEnableOption mkIf; in { options.myOptions.programs.agenix = { enable = mkEnableOption "agenix"; diff --git a/modules/cli/git.nix b/modules/cli/git.nix index d8fe341..dd77635 100644 --- a/modules/cli/git.nix +++ b/modules/cli/git.nix @@ -7,7 +7,8 @@ cfg = config.myOptions.programs.git; inherit (config.myOptions.other.system) username; - inherit (lib) getExe mkEnableOption mkIf mkOption; + inherit (lib.meta) getExe; + inherit (lib.modules) mkEnableOption mkIf mkOption; inherit (lib.types) nullOr str; delta = getExe pkgs.delta; diff --git a/modules/cli/nh.nix b/modules/cli/nh.nix index e09c187..4d17d01 100644 --- a/modules/cli/nh.nix +++ b/modules/cli/nh.nix @@ -7,7 +7,7 @@ }: let cfg = config.myOptions.programs.nh; - inherit (lib) mkEnableOption mkIf mkOption; + inherit (lib.modules) mkEnableOption mkIf mkOption; inherit (lib.types) str; in { options.myOptions.programs.nh = { diff --git a/modules/cli/starship.nix b/modules/cli/starship.nix index e1826fa..e370e34 100644 --- a/modules/cli/starship.nix +++ b/modules/cli/starship.nix @@ -6,7 +6,7 @@ cfg = config.myOptions.programs.starship; inherit (config.myOptions.other.system) username; - inherit (lib) mkEnableOption mkIf; + inherit (lib.modules) mkEnableOption mkIf; in { options.myOptions.programs.starship.enable = mkEnableOption "starship"; diff --git a/modules/cli/zoxide.nix b/modules/cli/zoxide.nix index c195bd6..773aa9b 100644 --- a/modules/cli/zoxide.nix +++ b/modules/cli/zoxide.nix @@ -6,7 +6,7 @@ cfg = config.myOptions.programs.starship; inherit (config.myOptions.other.system) username; - inherit (lib) mkEnableOption mkIf; + inherit (lib.modules) mkEnableOption mkIf; in { options.myOptions.programs.zoxide.enable = mkEnableOption "zoxide"; diff --git a/modules/cli/zsh.nix b/modules/cli/zsh.nix index 887fbeb..c8a2f64 100644 --- a/modules/cli/zsh.nix +++ b/modules/cli/zsh.nix @@ -7,7 +7,7 @@ cfg = config.myOptions.programs.zsh; inherit (config.myOptions.other.system) username; - inherit (lib) mkEnableOption mkIf mkOption; + inherit (lib.modules) mkEnableOption mkIf mkOption; inherit (lib.types) attrs bool; in { options.myOptions.programs.zsh = { diff --git a/modules/gui/anyrun.nix b/modules/gui/anyrun.nix index 9c136cf..cdc957b 100644 --- a/modules/gui/anyrun.nix +++ b/modules/gui/anyrun.nix @@ -8,7 +8,7 @@ cfg = config.myOptions.programs.anyrun; inherit (config.myOptions.other.system) username; - inherit (lib) mkEnableOption mkIf; + inherit (lib.modules) mkEnableOption mkIf; in { options.myOptions.programs.anyrun.enable = mkEnableOption "anyrun"; diff --git a/modules/gui/cursor.nix b/modules/gui/cursor.nix index 4bee9ca..63cd044 100644 --- a/modules/gui/cursor.nix +++ b/modules/gui/cursor.nix @@ -6,7 +6,7 @@ cfg = config.myOptions.themes.cursor; inherit (config.myOptions.other.system) username; - inherit (lib) mkEnableOption mkIf mkOption; + inherit (lib.modules) mkEnableOption mkIf mkOption; inherit (lib.types) int package str; in { options.myOptions.themes.cursor = { diff --git a/modules/gui/firefox.nix b/modules/gui/firefox.nix index 945e6c5..ea4c59c 100644 --- a/modules/gui/firefox.nix +++ b/modules/gui/firefox.nix @@ -8,7 +8,8 @@ cfg = config.myOptions.programs.firefox; inherit (config.myOptions.other.system) username; - inherit (lib) getExe mkEnableOption mkIf mkOption; + inherit (lib.meta) getExe; + inherit (lib.modules) mkEnableOption mkIf mkOption; inherit (lib.types) attrsOf listOf str submodule; inherit (lib.attrsets) mapAttrs mapAttrsToList; diff --git a/modules/gui/foot.nix b/modules/gui/foot.nix index 888fd56..5273145 100644 --- a/modules/gui/foot.nix +++ b/modules/gui/foot.nix @@ -8,7 +8,8 @@ cfg = config.myOptions.programs.foot; inherit (config.myOptions.other.system) username; - inherit (lib) getExe getExe' mkEnableOption mkIf; + inherit (lib.meta) getExe getExe'; + inherit (lib.modules) mkEnableOption mkIf; notify-send = getExe pkgs.libnotify; xdg-open = getExe' pkgs.xdg-utils "xdg-open"; diff --git a/modules/gui/gtk.nix b/modules/gui/gtk.nix index 9787b92..a301f4b 100644 --- a/modules/gui/gtk.nix +++ b/modules/gui/gtk.nix @@ -7,7 +7,7 @@ inherit (config.myOptions.other.system) username; hmCfg = config.home-manager.users.${username}; - inherit (lib) mkEnableOption mkIf mkOption; + inherit (lib.modules) mkEnableOption mkIf mkOption; inherit (lib.types) package str submodule; in { options.myOptions.themes.gtk = { diff --git a/modules/gui/gtklock.nix b/modules/gui/gtklock.nix index 2f6d0b2..a2bce19 100644 --- a/modules/gui/gtklock.nix +++ b/modules/gui/gtklock.nix @@ -7,10 +7,10 @@ cfg = config.myOptions.programs.gtklock; inherit (config.myOptions.other.system) username; - inherit (lib) mkEnableOption mkIf; + inherit (lib.modules) mkEnableOption mkIf; in { options.myOptions.programs.gtklock.enable = mkEnableOption "gtklock"; - + config = mkIf cfg.enable { # https://github.com/NixOS/nixpkgs/issues/158025 security.pam.services.gtklock.text = "auth include login"; diff --git a/modules/gui/hypr/idle.nix b/modules/gui/hypr/idle.nix index 1c949b9..643792b 100644 --- a/modules/gui/hypr/idle.nix +++ b/modules/gui/hypr/idle.nix @@ -9,7 +9,8 @@ hmCfg = config.home-manager.users.${username}; inherit (config.myOptions.other.system) username; - inherit (lib) getExe' mkEnableOption mkIf; + inherit (lib.meta) getExe getExe'; + inherit (lib.modules) mkEnableOption mkIf; loginctl = getExe' pkgs.systemd "loginctl"; in { @@ -24,7 +25,7 @@ in { package = inputs.hypridle.packages.${pkgs.system}.hypridle; settings = { general = { - lock_cmd = lib.getExe hmCfg.programs.hyprlock.package; + lock_cmd = getExe hmCfg.programs.hyprlock.package; before_sleep_cmd = "${loginctl} lock-session"; }; }; diff --git a/modules/gui/hypr/land.nix b/modules/gui/hypr/land.nix index 74560ee..888c368 100644 --- a/modules/gui/hypr/land.nix +++ b/modules/gui/hypr/land.nix @@ -9,10 +9,12 @@ inherit (config.myOptions.other.system) username; hmCfg = config.home-manager.users.${username}; - inherit (lib) elem getExe getExe' mkEnableOption mkIf mkOption optionals; - inherit (lib.types) bool listOf nullOr package path str submodule; - inherit (lib.strings) removeSuffix; inherit (lib.attrsets) mapAttrsToList; + inherit (lib.lists) elem optionals; + inherit (lib.meta) getExe getExe'; + inherit (lib.modules) mkEnableOption mkIf mkOption; + inherit (lib.strings) removeSuffix; + inherit (lib.types) bool listOf nullOr package path str submodule; isAmdGpuPresent = elem "amdgpu" config.boot.initrd.kernelModules; diff --git a/modules/gui/hypr/lock.nix b/modules/gui/hypr/lock.nix index 1fea8eb..d2005f8 100644 --- a/modules/gui/hypr/lock.nix +++ b/modules/gui/hypr/lock.nix @@ -8,7 +8,7 @@ cfg = config.myOptions.programs.hypr.lock; inherit (config.myOptions.other.system) username; - inherit (lib) mkEnableOption mkIf mkOption; + inherit (lib.modules) mkEnableOption mkIf mkOption; inherit (lib.types) attrs; text_color = "rgba(eae0e4FF)"; diff --git a/modules/gui/mpv.nix b/modules/gui/mpv.nix index 82aee73..347d4ab 100644 --- a/modules/gui/mpv.nix +++ b/modules/gui/mpv.nix @@ -7,7 +7,7 @@ cfg = config.myOptions.programs.mpv; inherit (config.myOptions.other.system) username; - inherit (lib) mkEnableOption mkIf mkOption; + inherit (lib.modules) mkEnableOption mkIf mkOption; inherit (lib.types) nullOr str; in { options.myOptions.programs.mpv = { diff --git a/modules/gui/qt.nix b/modules/gui/qt.nix index fe99bc5..570f44c 100644 --- a/modules/gui/qt.nix +++ b/modules/gui/qt.nix @@ -7,7 +7,7 @@ cfg = config.myOptions.themes.qt; inherit (config.myOptions.other.system) username; - inherit (lib) mkEnableOption mkIf mkOption; + inherit (lib.modules) mkEnableOption mkIf mkOption; inherit (lib.types) package str; in { options.myOptions.themes.qt = { diff --git a/modules/gui/quickshell/default.nix b/modules/gui/quickshell/default.nix index 5635b3b..94afef0 100644 --- a/modules/gui/quickshell/default.nix +++ b/modules/gui/quickshell/default.nix @@ -8,10 +8,11 @@ cfg = config.myOptions.programs.quickshell; inherit (config.myOptions.other.system) username; - inherit (lib) elem mkEnableOption mkIf mkOption; - inherit (lib.types) attrsOf listOf path str; + inherit (lib.attrsets) filterAttrs mapAttrsToList; + inherit (lib.lists) elem; + inherit (lib.modules) mkEnableOption mkIf mkOption; inherit (lib.strings) concatStrings; - inherit (lib.attrsets) mapAttrsToList; + inherit (lib.types) attrsOf listOf path str; defaultConfigs = { powermenu = ./powermenu; @@ -45,7 +46,7 @@ in { xdg.configFile."quickshell/manifest.conf".text = '' ${concatStrings (mapAttrsToList (name: value: '' ${name} = ${value} - '') ((lib.filterAttrs (name: _: elem name cfg.enabledConfigs) defaultConfigs) // cfg.extraConfigs))} + '') ((filterAttrs (name: _: elem name cfg.enabledConfigs) defaultConfigs) // cfg.extraConfigs))} ''; }; }; diff --git a/modules/gui/schizofox.nix b/modules/gui/schizofox.nix index 6e6a331..c9d18a8 100644 --- a/modules/gui/schizofox.nix +++ b/modules/gui/schizofox.nix @@ -7,7 +7,7 @@ cfg = config.myOptions.programs.schizofox; inherit (config.myOptions.other.system) username; - inherit (lib) mkEnableOption mkIf; + inherit (lib.modules) mkEnableOption mkIf; in { options.myOptions.programs.schizofox = { enable = mkEnableOption "schizofox"; diff --git a/modules/gui/swaylock.nix b/modules/gui/swaylock.nix index 077caec..0734938 100644 --- a/modules/gui/swaylock.nix +++ b/modules/gui/swaylock.nix @@ -8,7 +8,7 @@ cfg = config.myOptions.programs.swaylock; inherit (config.myOptions.other.system) username; - inherit (lib) mkEnableOption mkIf; + inherit (lib.modules) mkEnableOption mkIf; in { options.myOptions.programs.swaylock.enable = mkEnableOption "swaylock"; diff --git a/modules/gui/vesktop/default.nix b/modules/gui/vesktop/default.nix index 4210796..cd45ca2 100644 --- a/modules/gui/vesktop/default.nix +++ b/modules/gui/vesktop/default.nix @@ -3,11 +3,11 @@ lib, pkgs, ... -}: let +}: let cfg = config.myOptions.programs.vesktop; inherit (config.myOptions.other.system) username; - inherit (lib) mkEnableOption mkIf; + inherit (lib.modules) mkEnableOption mkIf; inherit (lib.strings) concatStrings; in { options.myOptions.programs.vesktop = { @@ -22,7 +22,7 @@ in { # thanks aleph :3 # https://github.com/AlephNought0/Faery/blob/main/Home/Programs/Vesktop/vesktop.nix#L21 postFixup = concatStrings [ - old.postFixup + old.postFixup '' wrapProgram $out/bin/vesktop \ --add-flags "--ozone-platform=wayland \ diff --git a/modules/gui/zathura.nix b/modules/gui/zathura.nix index 5aeac36..b89f1b8 100644 --- a/modules/gui/zathura.nix +++ b/modules/gui/zathura.nix @@ -7,7 +7,7 @@ cfg = config.myOptions.programs.zathura; inherit (config.myOptions.other.system) username; - inherit (lib) mkEnableOption mkIf; + inherit (lib.modules) mkEnableOption mkIf; in { options.myOptions.programs.zathura.enable = mkEnableOption "zathura"; diff --git a/modules/other/hardware.nix b/modules/other/hardware.nix index 669502f..56ee2cd 100644 --- a/modules/other/hardware.nix +++ b/modules/other/hardware.nix @@ -5,10 +5,10 @@ }: let cfg = config.myOptions.other.hardware; - inherit (lib) mkIf mkOption; + inherit (lib.attrsets) mapAttrsToList; + inherit (lib.modules) mkIf mkOption; inherit (lib.types) attrsOf float int submodule; inherit (lib.types.ints) positive; - inherit (lib.attrsets) mapAttrsToList; in { options.myOptions.other.hardware = { monitors = mkOption { diff --git a/modules/other/home-manager.nix b/modules/other/home-manager.nix index 60e3657..9b8b59f 100644 --- a/modules/other/home-manager.nix +++ b/modules/other/home-manager.nix @@ -8,7 +8,7 @@ cfg = config.myOptions.other.home-manager; inherit (config.myOptions.other.system) username; - inherit (lib) mkEnableOption mkIf; + inherit (lib.modules) mkEnableOption mkIf; in { options.myOptions.other.home-manager = { enable = mkEnableOption "home-manager"; diff --git a/modules/other/system.nix b/modules/other/system.nix index f215e94..e76c529 100644 --- a/modules/other/system.nix +++ b/modules/other/system.nix @@ -5,7 +5,7 @@ }: let cfg = config.myOptions.other.system; - inherit (lib) mkOption; + inherit (lib.modules) mkOption; inherit (lib.types) str; in { options.myOptions.other.system = { diff --git a/modules/services/anki-sync-server.nix b/modules/services/anki-sync-server.nix index 0c19df8..6d33379 100644 --- a/modules/services/anki-sync-server.nix +++ b/modules/services/anki-sync-server.nix @@ -3,10 +3,11 @@ lib, pkgs, ... -}: let +}: let cfg = config.services.anki-sync-server; - inherit (lib) getExe' mkEnableOption mkIf mkOption; + inherit (lib.meta) getExe'; + inherit (lib.modules) mkEnableOption mkIf mkOption; inherit (lib.types) bool package port str; in { options.services.anki-sync-server = { diff --git a/modules/services/dunst.nix b/modules/services/dunst.nix index 19df17a..a0431fc 100644 --- a/modules/services/dunst.nix +++ b/modules/services/dunst.nix @@ -8,7 +8,8 @@ cfg = config.myOptions.services.dunst; inherit (config.myOptions.other.system) username; - inherit (lib) getExe getExe' mkEnableOption mkIf; + inherit (lib.meta) getExe getExe'; + inherit (lib.modules) mkEnableOption mkIf; xdg-open = getExe' pkgs.xdg-utils "xdg-open"; in { diff --git a/modules/services/fcitx/default.nix b/modules/services/fcitx/default.nix index 145688c..8cfe09f 100644 --- a/modules/services/fcitx/default.nix +++ b/modules/services/fcitx/default.nix @@ -7,7 +7,7 @@ cfg = config.myOptions.services.fcitx5; inherit (config.myOptions.other.system) username; - inherit (lib) mkEnableOption mkIf; + inherit (lib.modules) mkEnableOption mkIf; in { # stolen from https://git.outfoxxed.me/outfoxxed/nixnew/src/branch/master/modules/user/modules/fcitx5 options.myOptions.services.fcitx5.enable = mkEnableOption "fcitx5"; diff --git a/modules/services/greetd.nix b/modules/services/greetd.nix index 40c8370..7bec449 100644 --- a/modules/services/greetd.nix +++ b/modules/services/greetd.nix @@ -8,9 +8,10 @@ cfg = config.myOptions.services.greetd; inherit (config.myOptions.other.system) username; - inherit (lib) getExe getExe' mkEnableOption mkIf mkOption; - inherit (lib.types) listOf str; + inherit (lib.meta) getExe getExe'; + inherit (lib.modules) mkEnableOption mkIf mkOption; inherit (lib.strings) concatStringsSep; + inherit (lib.types) listOf str; inherit (inputs.hyprland.packages.${pkgs.system}) hyprland; diff --git a/modules/services/mpd.nix b/modules/services/mpd.nix index d2900a3..acbb2eb 100644 --- a/modules/services/mpd.nix +++ b/modules/services/mpd.nix @@ -6,7 +6,7 @@ cfg = config.myOptions.services.mpd; inherit (config.myOptions.other.system) username; - inherit (lib) mkEnableOption mkIf mkOption; + inherit (lib.modules) mkEnableOption mkIf mkOption; inherit (lib.types) str; in { options.myOptions.services.mpd = { diff --git a/modules/services/pipewire.nix b/modules/services/pipewire.nix index 7222659..6e0804a 100644 --- a/modules/services/pipewire.nix +++ b/modules/services/pipewire.nix @@ -5,7 +5,7 @@ }: let cfg = config.myOptions.services.pipewire; - inherit (lib) mkEnableOption mkIf; + inherit (lib.modules) mkEnableOption mkIf; in { options.myOptions.services.pipewire.enable = mkEnableOption "pipewire"; diff --git a/modules/services/ssh.nix b/modules/services/ssh.nix index 49fddd6..2191276 100644 --- a/modules/services/ssh.nix +++ b/modules/services/ssh.nix @@ -6,7 +6,8 @@ }: let cfg = config.myOptions.services.ssh; - inherit (lib) getExe' mkEnableOption mkIf mkMerge mkOption; + inherit (lib.meta) getExe'; + inherit (lib.modules) mkEnableOption mkIf mkMerge mkOption; inherit (lib.types) attrsOf bool nullOr number str submodule; inherit (lib.strings) concatStrings; inherit (lib.attrsets) mapAttrsToList; diff --git a/modules/services/syncthing.nix b/modules/services/syncthing.nix index 1394f56..00a783d 100644 --- a/modules/services/syncthing.nix +++ b/modules/services/syncthing.nix @@ -8,7 +8,7 @@ hmCfg = config.home-manager.users.${username}; configDir = config.home-manager.users.${username}.xdg.configHome; - inherit (lib) mkEnableOption mkIf mkOption; + inherit (lib.modules) mkEnableOption mkIf mkOption; inherit (lib.types) attrs; in { options.myOptions.services.syncthing = { diff --git a/modules/tui/btop.nix b/modules/tui/btop.nix index 77b543d..7bb17bf 100644 --- a/modules/tui/btop.nix +++ b/modules/tui/btop.nix @@ -6,7 +6,7 @@ cfg = config.myOptions.programs.btop; inherit (config.myOptions.other.system) username; - inherit (lib) mkEnableOption mkIf; + inherit (lib.modules) mkEnableOption mkIf; in { options.myOptions.programs.btop.enable = mkEnableOption "btop"; diff --git a/modules/tui/helix.nix b/modules/tui/helix.nix index 04c9993..4996f60 100644 --- a/modules/tui/helix.nix +++ b/modules/tui/helix.nix @@ -8,7 +8,9 @@ cfg = config.myOptions.programs.helix; inherit (config.myOptions.other.system) username; - inherit (lib) getExe getExe' mkEnableOption mkIf; + inherit (lib.meta) getExe getExe'; + inherit (lib.modules) mkEnableOption mkIf; + inherit (lib.strings) makeBinPath; clangd = getExe' pkgs.clang-tools "clangd"; css-languageserver = getExe pkgs.vscode-langservers-extracted; @@ -27,7 +29,7 @@ in { "--suffix" "PATH" ":" - (lib.makeBinPath [ + (makeBinPath [ rustfmt rust-analyzer nil @@ -69,8 +71,8 @@ in { languages = { language-server = { nil = { - command = lib.getExe pkgs.nil; - config.nil.formatting.command = [ "${lib.getExe pkgs.alejandra}" "-q" ]; + command = getExe pkgs.nil; + config.nil.formatting.command = [ "${getExe pkgs.alejandra}" "-q" ]; }; clangd = { command = clangd; diff --git a/modules/tui/neovim.nix b/modules/tui/neovim.nix index c647723..7ac5956 100644 --- a/modules/tui/neovim.nix +++ b/modules/tui/neovim.nix @@ -8,7 +8,7 @@ cfg = config.myOptions.programs.neovim; inherit (config.myOptions.other.system) username; - inherit (lib) mkEnableOption mkIf; + inherit (lib.modules) mkEnableOption mkIf; in { options.myOptions.programs.neovim.enable = mkEnableOption "neovim"; diff --git a/modules/tui/newsboat.nix b/modules/tui/newsboat.nix index 738573d..9641eb3 100644 --- a/modules/tui/newsboat.nix +++ b/modules/tui/newsboat.nix @@ -6,7 +6,7 @@ cfg = config.myOptions.programs.newsboat; inherit (config.myOptions.other.system) username; - inherit (lib) mkEnableOption mkIf; + inherit (lib.modules) mkEnableOption mkIf; in { options.myOptions.programs.newsboat.enable = mkEnableOption "newsboat"; diff --git a/options/common/dash.nix b/options/common/dash.nix index 8abda34..c704d24 100644 --- a/options/common/dash.nix +++ b/options/common/dash.nix @@ -3,7 +3,7 @@ pkgs, ... }: let - inherit (lib) getExe; + inherit (lib.meta) getExe; in { environment.binsh = getExe pkgs.dash; } diff --git a/options/common/networking.nix b/options/common/networking.nix index 8ccd21d..2a406f8 100644 --- a/options/common/networking.nix +++ b/options/common/networking.nix @@ -5,7 +5,7 @@ }: let inherit (config.myOptions.other.system) username; - inherit (lib) mkForce; + inherit (lib.modules) mkForce; in { networking = { networkmanager = { @@ -27,8 +27,8 @@ in { # don't wait for network to boot faster # https://old.reddit.com/r/NixOS/comments/vdz86j/how_to_remove_boot_dependency_on_network_for_a systemd = { - targets.network-online.wantedBy = lib.mkForce []; # default is [ "multi-user.target" ] - services.NetworkManager-wait-online.wantedBy = lib.mkForce []; # default is [ "network-online.target" ] + targets.network-online.wantedBy = mkForce []; # default is [ "multi-user.target" ] + services.NetworkManager-wait-online.wantedBy = mkForce []; # default is [ "network-online.target" ] }; users.users.${username} = { diff --git a/options/common/pin-registry.nix b/options/common/pin-registry.nix index b14db77..a846df7 100644 --- a/options/common/pin-registry.nix +++ b/options/common/pin-registry.nix @@ -2,6 +2,8 @@ inputs, lib, ... -}: { - nix.registry = lib.mapAttrs (_: v: { flake = v; }) inputs; +}: let + inherit (lib.attrsets) mapAttrs; +in { + nix.registry = mapAttrs (_: v: { flake = v; }) inputs; } diff --git a/options/desktop/adb.nix b/options/desktop/adb.nix index 1f25335..ba6e791 100644 --- a/options/desktop/adb.nix +++ b/options/desktop/adb.nix @@ -1,10 +1,12 @@ { config, ... -}: { +}: let + inherit (config.myOptions.other.system) username; +in { programs.adb.enable = true; - users.users.${config.myOptions.other.system.username} = { + users.users.${username} = { extraGroups = [ "adbusers" ]; }; } diff --git a/options/desktop/gns3.nix b/options/desktop/gns3.nix index e450633..f754c67 100644 --- a/options/desktop/gns3.nix +++ b/options/desktop/gns3.nix @@ -3,7 +3,11 @@ lib, pkgs, ... -}: { +}: let + inherit (config.myOptions.other.system) username; + + inherit (lib.meta) getExe; +in { environment.systemPackages = with pkgs; [ gns3-gui gns3-server @@ -13,7 +17,7 @@ vpcs ]; - users.users.${config.myOptions.other.system.username} = { + users.users.${username} = { extraGroups = [ "ubridge" ]; }; @@ -25,7 +29,7 @@ users.groups.ubridge = {}; security.wrappers.ubridge = { - source = lib.getExe pkgs.ubridge; + source = getExe pkgs.ubridge; capabilities = "cap_net_admin,cap_net_raw=ep"; owner = "root"; group = "ubridge"; diff --git a/options/desktop/power-supply.nix b/options/desktop/power-supply.nix index f478b90..9db063a 100644 --- a/options/desktop/power-supply.nix +++ b/options/desktop/power-supply.nix @@ -4,15 +4,17 @@ lib, pkgs, ... -}: { - services.udev.extraRules = let - inherit (lib) getExe getExe'; - asusctl = getExe' config.services.asusd.package "asusctl"; - supergfxctl = getExe' config.services.asusd.package "supergfxctl"; - cpupower = getExe config.boot.kernelPackages.cpupower; - inherit (inputs.hyprland.packages.${pkgs.system}) hyprland; - hyprctl = getExe' hyprland "hyprctl"; +}: let + inherit (lib.meta) getExe getExe'; + asusctl = getExe' config.services.asusd.package "asusctl"; + supergfxctl = getExe' config.services.asusd.package "supergfxctl"; + cpupower = getExe config.boot.kernelPackages.cpupower; + + inherit (inputs.hyprland.packages.${pkgs.system}) hyprland; + hyprctl = getExe' hyprland "hyprctl"; +in { + services.udev.extraRules = let power_supply = pkgs.writeShellScript "on_power_supply" '' ${asusctl} profile -P Performance #${supergfxctl} -m Hybrid diff --git a/options/desktop/suspend.nix b/options/desktop/suspend.nix index 72bb537..66ad36b 100644 --- a/options/desktop/suspend.nix +++ b/options/desktop/suspend.nix @@ -3,15 +3,16 @@ lib, pkgs, ... -}: { - powerManagement = let - inherit (lib) getExe getExe'; - mpc = getExe pkgs.mpc-cli; - sleep = getExe' pkgs.coreutils-full "sleep"; +}: let + inherit (lib.meta) getExe getExe'; - inherit (inputs.hyprland.packages.${pkgs.system}) hyprland; - hyprctl = getExe' hyprland "hyprctl"; - in { + mpc = getExe pkgs.mpc-cli; + sleep = getExe' pkgs.coreutils-full "sleep"; + + inherit (inputs.hyprland.packages.${pkgs.system}) hyprland; + hyprctl = getExe' hyprland "hyprctl"; +in { + powerManagement = { enable = true; powerDownCommands = '' ${mpc} pause