treewide: Drop usage of inherit (pkgs)

Having to change the package list in two places was a bit redundant. We
can also use `with` patterns now since nixd warns if there are escaping
variables being used.

Note that variables used in multiple places are kept to make it easier
to recognize that those variables must be changed together. Also note
that inherit (pkgs) inside of mkMerge are currently kept to reduce the
diff.
This commit is contained in:
Donovan Glover 2024-08-07 16:32:53 -04:00
parent b3f5c61625
commit 2297fb41e3
No known key found for this signature in database
GPG Key ID: EA7408A77AE1BE65
13 changed files with 17 additions and 43 deletions

View File

@ -10,7 +10,6 @@ let
inherit (nix-config.inputs.sakaya.packages.${pkgs.system}) sakaya;
inherit (config.modules.system) username;
inherit (lib) singleton getExe;
inherit (pkgs) su winetricks wineWowPackages;
sakayaPort = 39493;
in
@ -32,7 +31,7 @@ in
Type = "simple";
};
path = [ su ];
path = with pkgs; [ su ];
serviceConfig = {
ExecStart = "/usr/bin/env su ${username} --command=${getExe sakaya}";
@ -41,9 +40,10 @@ in
wantedBy = [ "multi-user.target" ];
};
environment.systemPackages = [
environment.systemPackages = (with pkgs; [
wineWowPackages.waylandFull
winetricks
]) ++ [
sakaya
];

View File

@ -1,12 +1,9 @@
{ pkgs, ... }:
let
inherit (pkgs) ungoogled-chromium;
in
{
programs.chromium = {
enable = true;
package = ungoogled-chromium;
package = pkgs.ungoogled-chromium;
commandLineArgs = [
"--ozone-platform=wayland"

View File

@ -3,7 +3,6 @@
let
inherit (config.home) homeDirectory;
inherit (config.lib.stylix.colors.withHashtag) base00 base05;
inherit (pkgs) eww;
inherit (config.xdg.userDirs)
download
@ -16,7 +15,7 @@ let
fluent-icons = pkgs.callPackage ../packages/fluent-icons.nix { };
in
{
home.packages = [ eww ];
home.packages = with pkgs; [ eww ];
xdg.configFile."eww/eww.yuck".text = # yuck
''

View File

@ -1,10 +1,7 @@
{ pkgs, ... }:
let
inherit (pkgs) tig mgitstatus;
in
{
home.packages = [
home.packages = with pkgs; [
tig
mgitstatus
];

View File

@ -1,8 +1,5 @@
{ pkgs, ... }:
let
inherit (pkgs) pinentry-curses;
in
{
programs.gpg = {
enable = true;
@ -21,7 +18,7 @@ in
services.gpg-agent = {
enable = true;
pinentryPackage = pinentry-curses;
pinentryPackage = pkgs.pinentry-curses;
defaultCacheTtl = 43200;
maxCacheTtl = 43200;
};

View File

@ -1,8 +1,5 @@
{ pkgs, ... }:
let
inherit (pkgs) fluent-icon-theme;
in
{
gtk = {
enable = true;
@ -17,7 +14,7 @@ in
};
iconTheme = {
package = fluent-icon-theme;
package = pkgs.fluent-icon-theme;
name = "Fluent-dark";
};
};

View File

@ -1,12 +1,9 @@
{ pkgs, ... }:
let
inherit (pkgs) htop-vim;
in
{
programs.htop = {
enable = true;
package = htop-vim;
package = pkgs.htop-vim;
settings = {
tree_view = true;

View File

@ -6,14 +6,13 @@
}:
let
inherit (pkgs) polkit_gnome callPackage;
inherit (lib) mkForce;
inherit (vars) notifySend;
opacity = "0.95";
super = "SUPER";
osu-backgrounds = callPackage ../packages/osu-backgrounds.nix { };
osu-backgrounds = pkgs.callPackage ../packages/osu-backgrounds.nix { };
gapsScript = "hypr/gaps.fish";
randomBackgroundScript = "hypr/random-bg.fish";
@ -76,7 +75,7 @@ in
"fcitx5"
"mpdris2-rs"
"hyprctl dispatch workspace 5000000"
"${polkit_gnome}/libexec/polkit-gnome-authentication-agent-1"
"${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1"
"hyprdim --no-dim-when-only --persist --ignore-leaving-special --dialog-dim"
"sleep 1 && eww open desktop-icons"
"~/.config/${randomBackgroundScript}"

View File

@ -7,7 +7,6 @@
let
inherit (lib) singleton;
inherit (pkgs) ironbar inotify-tools;
inherit (builtins) toJSON;
inherit (config.lib.stylix.colors.withHashtag)
@ -23,7 +22,7 @@ let
volumeGet = "ironbar/volume-get.fish";
in
{
home.packages = [ ironbar ];
home.packages = with pkgs; [ ironbar ];
xdg.configFile = {
"ironbar/config.json".text = toJSON {
@ -249,7 +248,7 @@ in
get_mullvad_status
set initialized true
${inotify-tools}/bin/inotifywait -q -e close_write,moved_to,create -m /etc/mullvad-vpn |
${pkgs.inotify-tools}/bin/inotifywait -q -e close_write,moved_to,create -m /etc/mullvad-vpn |
while read directory events filename
get_mullvad_status
end

View File

@ -1,13 +1,10 @@
{ pkgs, ... }:
let
inherit (pkgs) librewolf;
in
{
programs.librewolf = {
enable = true;
package = librewolf.override { cfg.speechSynthesisSupport = false; };
package = pkgs.librewolf.override { cfg.speechSynthesisSupport = false; };
settings = {
"middlemouse.paste" = false;

View File

@ -1,8 +1,5 @@
{ pkgs, ... }:
let
inherit (pkgs.mpvScripts) mpris uosc thumbfast;
in
{
programs.mpv = {
enable = true;
@ -38,7 +35,7 @@ in
"ctrl+a" = "script-message osc-visibility cycle";
};
scripts = [
scripts = with pkgs.mpvScripts; [
mpris
uosc
thumbfast

View File

@ -6,7 +6,6 @@
}:
let
inherit (pkgs) rofi-wayland;
inherit (lib) mkForce;
inherit (config.lib.formats.rasi) mkLiteral;
inherit (config.lib.stylix.colors.withHashtag) base00 base05;
@ -16,7 +15,7 @@ in
enable = true;
cycle = false;
package = rofi-wayland;
package = pkgs.rofi-wayland;
extraConfig = {
modi = "drun,filebrowser";

View File

@ -7,13 +7,12 @@
let
inherit (config.modules.system) username;
inherit (pkgs) xterm;
in
{
services = {
xserver = {
enable = true;
excludePackages = [ xterm ];
excludePackages = with pkgs; [ xterm ];
};
displayManager = {