refactor: replaced all with with builtins.attrValues

This commit is contained in:
Nick 2024-11-04 19:24:06 -06:00
parent f87d465a2c
commit b08a7694a5
12 changed files with 236 additions and 153 deletions

View file

@ -65,7 +65,9 @@ let
in { in {
flake.homeModules = { flake.homeModules = {
desktop = { desktop = {
imports = with modules; [ imports = builtins.attrValues {
inherit
(modules)
brave brave
firefox firefox
misc-android misc-android
@ -73,45 +75,63 @@ in {
misc-internet misc-internet
qbittorrent qbittorrent
vscode vscode
]; ;
};
}; };
entertainment = { entertainment = {
imports = with modules; [ imports = builtins.attrValues {
inherit
(modules)
freetube freetube
misc-entertainment misc-entertainment
mpv mpv
steam steam
]; ;
};
}; };
productionArt = { productionArt = {
imports = with modules; [ imports = builtins.attrValues {
inherit
(modules)
misc-productionArt misc-productionArt
]; ;
};
}; };
productionAudio = { productionAudio = {
imports = with modules; [ imports = builtins.attrValues {
inherit
(modules)
misc-productionAudio misc-productionAudio
]; ;
};
}; };
productionVideo = { productionVideo = {
imports = with modules; [ imports = builtins.attrValues {
inherit
(modules)
misc-productionVideo misc-productionVideo
obs-studio obs-studio
]; ;
};
}; };
productionWriting = { productionWriting = {
imports = with modules; [ imports = builtins.attrValues {
inherit
(modules)
misc-productionWriting misc-productionWriting
]; ;
};
}; };
shared = { shared = {
imports = with modules; [ imports = builtins.attrValues {
inherit
(modules)
bat bat
bottom bottom
direnv direnv
@ -125,9 +145,11 @@ in {
starship starship
wezterm wezterm
# yazi # yazi
zellij zellij
zoxide zoxide
]; ;
};
}; };
}; };
} }

View file

@ -2,11 +2,14 @@
programs = { programs = {
obs-studio = { obs-studio = {
enable = true; enable = true;
plugins = with pkgs.obs-studio-plugins; [ plugins = builtins.attrValues {
inherit
(pkgs.obs-studio-plugins)
obs-tuna obs-tuna
obs-vkcapture obs-vkcapture
obs-multi-rtmp obs-multi-rtmp
]; ;
};
}; };
}; };
home = { home = {

View file

@ -14,20 +14,20 @@
# when = "textInputFocus"; # when = "textInputFocus";
# } # }
# ]; # ];
extensions = with pkgs.vscode-extensions; [ extensions = builtins.attrValues {
eamodio.gitlens inherit (pkgs.vscode-extensions.catppuccin) catppuccin-vsc;
catppuccin.catppuccin-vsc inherit (pkgs.vscode-extensions.eamodio) gitlens;
james-yu.latex-workshop inherit (pkgs.vscode-extensions.esbenp) prettier-vscode;
jnoortheen.nix-ide inherit (pkgs.vscode-extensions.haskell) haskell;
kamadorueda.alejandra inherit (pkgs.vscode-extensions.james-yu) latex-workshop;
mkhl.direnv inherit (pkgs.vscode-extensions.jnoortheen) nix-ide;
pkief.material-icon-theme inherit (pkgs.vscode-extensions.kamadorueda) alejandra;
streetsidesoftware.code-spell-checker inherit (pkgs.vscode-extensions.mattn) lisp;
tamasfe.even-better-toml inherit (pkgs.vscode-extensions.mkhl) direnv;
esbenp.prettier-vscode inherit (pkgs.vscode-extensions.pkief) material-icon-theme;
mattn.lisp inherit (pkgs.vscode-extensions.streetsidesoftware) code-spell-checker;
haskell.haskell inherit (pkgs.vscode-extensions.tamasfe) even-better-toml;
]; };
userSettings = { userSettings = {
"git.confirmSync" = false; "git.confirmSync" = false;
"editor.insertSpaces" = false; "editor.insertSpaces" = false;

View file

@ -58,7 +58,9 @@ let
in { in {
flake.nixosModules = { flake.nixosModules = {
personal = { personal = {
imports = with modules; [ imports = builtins.attrValues {
inherit
(modules)
android android
audio audio
bluetooth bluetooth
@ -75,24 +77,34 @@ in {
steam steam
sysstat sysstat
virtualization virtualization
]; ;
};
}; };
desktop = { desktop = {
imports = with modules; [ imports = builtins.attrValues {
inherit
(modules)
syncthing syncthing
# ollama # ollama
];
;
};
}; };
server = { server = {
imports = with modules; [ imports = builtins.attrValues {
inherit
(modules)
services services
]; ;
};
}; };
shared = { shared = {
imports = with modules; [ imports = builtins.attrValues {
inherit
(modules)
accounts accounts
doas doas
environment environment
@ -105,7 +117,8 @@ in {
ssh ssh
system system
xserver xserver
]; ;
};
}; };
}; };
} }

View file

@ -1,6 +1,9 @@
{pkgs, ...}: { {pkgs, ...}: {
programs.adb.enable = true; programs.adb.enable = true;
services.udev.packages = with pkgs; [ services.udev.packages = builtins.attrValues {
inherit
(pkgs)
android-udev-rules android-udev-rules
]; ;
};
} }

View file

@ -1,9 +1,12 @@
{pkgs, ...}: { {pkgs, ...}: {
fonts = { fonts = {
fontconfig.defaultFonts.emoji = ["Noto Fonts Color Emoji"]; fontconfig.defaultFonts.emoji = ["Noto Fonts Color Emoji"];
packages = with pkgs; [ packages = builtins.attrValues {
inherit
(pkgs)
noto-fonts-color-emoji noto-fonts-color-emoji
open-dyslexic open-dyslexic
]; ;
};
}; };
} }

View file

@ -14,17 +14,21 @@
games.enable = false; games.enable = false;
gnome-online-accounts.enable = true; gnome-online-accounts.enable = true;
}; };
udev.packages = with pkgs; [ udev.packages = builtins.attrValues {
gnome.gnome-settings-daemon inherit
]; (pkgs.gnome)
gnome-settings-daemon
;
};
}; };
environment = { environment = {
variables = { variables = {
# WEBKIT_FORCE_SANDBOX = "0"; # WEBKIT_FORCE_SANDBOX = "0";
# WEBKIT_DISABLE_COMPOSITING_MODE = "1"; # WEBKIT_DISABLE_COMPOSITING_MODE = "1";
}; };
gnome.excludePackages = gnome.excludePackages = builtins.attrValues {
(with pkgs; [ inherit
(pkgs)
gnome-photos gnome-photos
gnome-tour gnome-tour
epiphany # web browser epiphany # web browser
@ -34,8 +38,9 @@
totem # video player totem # video player
yelp # help viewer yelp # help viewer
gnome-calendar gnome-calendar
]) ;
++ (with pkgs.gnome; [ inherit
(pkgs.gnome)
gnome-music gnome-music
tali # poker game tali # poker game
iagno # go game iagno # go game
@ -46,6 +51,7 @@
gnome-maps gnome-maps
gnome-contacts gnome-contacts
gnome-characters gnome-characters
]); ;
};
}; };
} }

View file

@ -2,12 +2,15 @@
services = { services = {
desktopManager.plasma6.enable = true; desktopManager.plasma6.enable = true;
}; };
environment.plasma6.excludePackages = with pkgs.kdePackages; [ environment.plasma6.excludePackages = builtins.attrValues {
inherit
(pkgs.kdePackages)
plasma-browser-integration plasma-browser-integration
konsole konsole
kate kate
spectacle spectacle
kdeconnect-kde kdeconnect-kde
khelpcenter khelpcenter
]; ;
};
} }

View file

@ -23,12 +23,15 @@ in {
user = service.name; user = service.name;
plugins = { plugins = {
enable = true; enable = true;
plugins = with pkgs; [ plugins = builtins.attrValues {
inherit
(pkgs)
peertube-plugin-livechat peertube-plugin-livechat
peertube-plugin-matomo peertube-plugin-matomo
peertube-plugin-transcoding-custom-quality peertube-plugin-transcoding-custom-quality
peertube-theme-dark peertube-theme-dark
]; ;
};
}; };
secrets = { secrets = {

View file

@ -2,13 +2,22 @@
hardware = { hardware = {
graphics = { graphics = {
enable = true; enable = true;
extraPackages = with pkgs; [ extraPackages = builtins.attrValues {
rocmPackages.clr.icd inherit
(pkgs)
amdvlk amdvlk
]; ;
extraPackages32 = with pkgs; [ inherit
driversi686Linux.amdvlk (pkgs.rocmPackages.clr)
]; icd
;
};
extraPackages32 = builtins.attrValues {
inherit
(pkgs.driversi686Linux)
amdvlk
;
};
}; };
}; };
boot.initrd.kernelModules = ["amdgpu"]; boot.initrd.kernelModules = ["amdgpu"];

View file

@ -2,13 +2,22 @@
hardware = { hardware = {
graphics = { graphics = {
enable = true; enable = true;
extraPackages = with pkgs; [ extraPackages = builtins.attrValues {
rocmPackages.clr.icd inherit
(pkgs)
amdvlk amdvlk
]; ;
extraPackages32 = with pkgs; [ inherit
driversi686Linux.amdvlk (pkgs.rocmPackages.clr)
]; icd
;
};
extraPackages32 = builtins.attrValues {
inherit
(pkgs.driversi686Linux)
amdvlk
;
};
}; };
}; };
boot.initrd.kernelModules = ["amdgpu"]; boot.initrd.kernelModules = ["amdgpu"];

View file

@ -2,13 +2,22 @@
hardware = { hardware = {
graphics = { graphics = {
enable = true; enable = true;
extraPackages = with pkgs; [ extraPackages = builtins.attrValues {
rocmPackages.clr.icd inherit
(pkgs)
amdvlk amdvlk
]; ;
extraPackages32 = with pkgs; [ inherit
driversi686Linux.amdvlk (pkgs.rocmPackages.clr)
]; icd
;
};
extraPackages32 = builtins.attrValues {
inherit
(pkgs.driversi686Linux)
amdvlk
;
};
}; };
}; };
boot.initrd.kernelModules = ["amdgpu"]; boot.initrd.kernelModules = ["amdgpu"];