diff --git a/common/default.nix b/common/default.nix index 48433dad..e1d77f1e 100644 --- a/common/default.nix +++ b/common/default.nix @@ -71,12 +71,15 @@ }; boot.supportedFilesystems = ["ext4" "xfs" "btrfs" "vfat" "ntfs"]; - system.fsPackages = with pkgs; [ - btrfs-progs - nfs-utils - ntfs3g - xfsprogs - ]; + system.fsPackages = builtins.attrValues { + inherit + (pkgs) + btrfs-progs + nfs-utils + ntfs3g + xfsprogs + ; + }; environment.variables.NPM_CONFIG_GLOBALCONFIG = "/etc/npmrc"; environment.etc.npmrc.text = '' @@ -85,13 +88,16 @@ ''; environment.systemPackages = - (with pkgs; [ + (builtins.attrValues { # Peripherals - hdparm - pciutils - usbutils - rar - ]) + inherit + (pkgs) + hdparm + pciutils + usbutils + rar + ; + }) ++ [ nix-melt.packages.${pkgs.system}.default diff --git a/common/home/bash/programs.nix b/common/home/bash/programs.nix index a15ee6e9..ef0708fa 100644 --- a/common/home/bash/programs.nix +++ b/common/home/bash/programs.nix @@ -46,9 +46,9 @@ config.theme = "dracula-bat"; themes.dracula-bat.src = self.legacyPackages.${pkgs.system}.dracula.bat; - extraPackages = with pkgs.bat-extras; [ - batman - ]; + extraPackages = builtins.attrValues { + inherit (pkgs.bat-extras) batman; + }; }; }; } diff --git a/common/home/git/default.nix b/common/home/git/default.nix index 0495ed3a..b36b1a8c 100644 --- a/common/home/git/default.nix +++ b/common/home/git/default.nix @@ -59,10 +59,10 @@ in { }; }; - home.packages = with pkgs; [ - (writeShellApplication { + home.packages = [ + (pkgs.writeShellApplication { name = "chore"; - runtimeInputs = [git]; + runtimeInputs = [pkgs.git]; text = '' DIR=''${1:-"$FLAKE"} diff --git a/common/home/neovim/default.nix b/common/home/neovim/default.nix index 9b1f34d5..01dc77ad 100644 --- a/common/home/neovim/default.nix +++ b/common/home/neovim/default.nix @@ -2,9 +2,7 @@ config, pkgs, ... -}: let - inherit (pkgs) vimPlugins; -in { +}: { imports = [ ./git.nix ./langs @@ -63,11 +61,11 @@ in { ''; plugins = [ - vimPlugins.fzfWrapper - vimPlugins.fzf-vim + pkgs.vimPlugins.fzfWrapper + pkgs.vimPlugins.fzf-vim { - plugin = vimPlugins.todo-comments-nvim; + plugin = pkgs.vimPlugins.todo-comments-nvim; type = "lua"; config = # lua @@ -76,7 +74,7 @@ in { ''; } { - plugin = vimPlugins.mini-nvim; + plugin = pkgs.vimPlugins.mini-nvim; type = "lua"; config = # lua diff --git a/common/home/neovim/git.nix b/common/home/neovim/git.nix index 58b605e8..60e3b80f 100644 --- a/common/home/neovim/git.nix +++ b/common/home/neovim/git.nix @@ -1,13 +1,11 @@ -{pkgs, ...}: let - inherit (pkgs) vimPlugins; -in { +{pkgs, ...}: { programs = { neovim = { plugins = [ - vimPlugins.fugitive + pkgs.vimPlugins.fugitive { - plugin = vimPlugins.gitsigns-nvim; + plugin = pkgs.vimPlugins.gitsigns-nvim; type = "lua"; config = # lua diff --git a/common/home/neovim/langs/bash.nix b/common/home/neovim/langs/bash.nix index e34bbdd6..10b66a2b 100644 --- a/common/home/neovim/langs/bash.nix +++ b/common/home/neovim/langs/bash.nix @@ -4,6 +4,7 @@ lib, ... }: let + inherit (lib) getExe mkIf; inherit (config.vars) neovimIde; in { programs = { @@ -18,13 +19,13 @@ in { viAlias = true; vimAlias = true; - extraPackages = lib.mkIf neovimIde [ + extraPackages = mkIf neovimIde [ pkgs.nodePackages.bash-language-server pkgs.shellcheck ]; extraLuaConfig = - lib.mkIf neovimIde + mkIf neovimIde # lua '' vim.api.nvim_create_autocmd('FileType', { @@ -37,7 +38,7 @@ in { settings = { bashIde = { - shellcheckPath = '${lib.getExe pkgs.shellcheck}', + shellcheckPath = '${getExe pkgs.shellcheck}', }, }, }); diff --git a/common/home/neovim/langs/clang.nix b/common/home/neovim/langs/clang.nix index 23839fe2..bd1fbf9c 100644 --- a/common/home/neovim/langs/clang.nix +++ b/common/home/neovim/langs/clang.nix @@ -4,17 +4,20 @@ lib, ... }: let + inherit (lib) mkIf; inherit (config.vars) neovimIde; - inherit (pkgs) vimPlugins; in - lib.mkIf neovimIde { + mkIf neovimIde { programs = { neovim = { - extraPackages = with pkgs; [ - gcc - clang-tools - cmake-language-server - ]; + extraPackages = builtins.attrValues { + inherit + (pkgs) + gcc + clang-tools + cmake-language-server + ; + }; extraLuaConfig = # lua @@ -41,9 +44,9 @@ in }); ''; - plugins = [ - vimPlugins.clangd_extensions-nvim - ]; + plugins = builtins.attrValues { + inherit (pkgs.vimPlugins) clangd_extensions-nvim; + }; }; }; } diff --git a/common/home/neovim/langs/default.nix b/common/home/neovim/langs/default.nix index 0f168e20..f0824569 100644 --- a/common/home/neovim/langs/default.nix +++ b/common/home/neovim/langs/default.nix @@ -4,9 +4,8 @@ pkgs, ... }: let + inherit (lib) fileContents mkBefore mkIf; inherit (config.vars) neovimIde; - inherit (pkgs) vimPlugins; - inherit (lib) fileContents; in { imports = [ ./bash.nix @@ -22,10 +21,10 @@ in { ./web.nix ]; - programs = lib.mkIf neovimIde { + programs = mkIf neovimIde { neovim = { extraLuaConfig = - lib.mkBefore + mkBefore # lua '' -- Start completion / snippet stuff @@ -69,30 +68,34 @@ in { ''; plugins = - (with vimPlugins; [ - nvim-lspconfig - lsp-status-nvim - lsp_lines-nvim - - cmp-buffer - cmp-nvim-lsp - cmp-path - cmp-spell - vim-vsnip - ]) + (builtins.attrValues { + inherit + (pkgs.vimPlugins) + nvim-lspconfig + lsp-status-nvim + lsp_lines-nvim + cmp-buffer + cmp-nvim-lsp + cmp-path + cmp-spell + vim-vsnip + ; + }) ++ [ { - plugin = vimPlugins.nvim-cmp; + plugin = pkgs.vimPlugins.nvim-cmp; type = "lua"; config = fileContents ../plugins/cmp.lua; } { - plugin = vimPlugins.nvim-autopairs; + plugin = pkgs.vimPlugins.nvim-autopairs; type = "lua"; config = # lua - "require('nvim-autopairs').setup({})"; + '' + require('nvim-autopairs').setup({}); + ''; } ]; }; diff --git a/common/home/neovim/langs/hyprlang.nix b/common/home/neovim/langs/hyprlang.nix index 24982f50..575ae8d7 100644 --- a/common/home/neovim/langs/hyprlang.nix +++ b/common/home/neovim/langs/hyprlang.nix @@ -3,9 +3,10 @@ lib, ... }: let + inherit (lib) mkIf; inherit (config.vars) neovimIde; in - lib.mkIf neovimIde { + mkIf neovimIde { programs = { neovim = { extraLuaConfig = diff --git a/common/home/neovim/langs/java.nix b/common/home/neovim/langs/java.nix index 1f4aa791..03ce807e 100644 --- a/common/home/neovim/langs/java.nix +++ b/common/home/neovim/langs/java.nix @@ -4,13 +4,13 @@ pkgs, ... }: let - inherit (pkgs) vimPlugins; + inherit (lib) getExe mkIf; inherit (config.vars) neovimIde; javaSdk = pkgs.temurin-bin-17; - javaPkgs = with pkgs; [gradle maven]; + javaPkgs = builtins.attrValues {inherit (pkgs) gradle maven;}; in - lib.mkIf neovimIde { + mkIf neovimIde { home.packages = javaPkgs; xdg.dataFile.".gradle/gradle.properties".text = '' @@ -38,7 +38,7 @@ in plugins = [ { # TOOD: setup debugger https://github.com/mfussenegger/nvim-jdtls#debugger-via-nvim-dap - plugin = vimPlugins.nvim-jdtls; + plugin = pkgs.vimPlugins.nvim-jdtls; type = "lua"; config = # lua @@ -48,7 +48,7 @@ in local config = { capabilities = require('cmp_nvim_lsp').default_capabilities(), - cmd = { '${lib.getExe pkgs.jdt-language-server}' }, + cmd = { '${getExe pkgs.jdt-language-server}' }, root_dir = vim.fs.dirname(vim.fs.find( { 'gradlew', '.git', 'mvnw', 'pom.xml' }, { upward = true } diff --git a/common/home/neovim/langs/json.nix b/common/home/neovim/langs/json.nix index 9429af4a..a9511709 100644 --- a/common/home/neovim/langs/json.nix +++ b/common/home/neovim/langs/json.nix @@ -4,15 +4,19 @@ pkgs, ... }: let + inherit (lib) mkIf; inherit (config.vars) neovimIde; in - lib.mkIf neovimIde { + mkIf neovimIde { programs = { neovim = { - extraPackages = [ - pkgs.vscode-langservers-extracted - pkgs.yaml-language-server - ]; + extraPackages = builtins.attrValues { + inherit + (pkgs) + vscode-langservers-extracted + yaml-language-server + ; + }; extraLuaConfig = # lua diff --git a/common/home/neovim/langs/lua.nix b/common/home/neovim/langs/lua.nix index f0783e3f..276702ef 100644 --- a/common/home/neovim/langs/lua.nix +++ b/common/home/neovim/langs/lua.nix @@ -4,21 +4,21 @@ lib, ... }: let + inherit (lib) mkIf; inherit (config.vars) neovimIde; - inherit (pkgs) vimPlugins; flakeEnv = config.programs.bash.sessionVariables.FLAKE; in - lib.mkIf neovimIde { + mkIf neovimIde { programs = { neovim = { - extraPackages = [ - pkgs.lua-language-server - ]; + extraPackages = builtins.attrValues { + inherit (pkgs) lua-language-server; + }; plugins = [ { - plugin = vimPlugins.neodev-nvim; + plugin = pkgs.vimPlugins.neodev-nvim; type = "lua"; config = # lua diff --git a/common/home/neovim/langs/markdown.nix b/common/home/neovim/langs/markdown.nix index 30ee39a5..e0128396 100644 --- a/common/home/neovim/langs/markdown.nix +++ b/common/home/neovim/langs/markdown.nix @@ -6,22 +6,23 @@ vimplugin-easytables-src, ... }: let + inherit (lib) mkIf; inherit (config.vars) neovimIde; - inherit (pkgs) vimPlugins; inherit (import "${self}/lib" {inherit pkgs;}) buildPlugin; in - lib.mkIf neovimIde { + mkIf neovimIde { programs = { neovim = { - extraPackages = [ - pkgs.pandoc - - # LaTeX packages - pkgs.texlab - pkgs.texliveFull - pkgs.rubber - ]; + extraPackages = builtins.attrValues { + inherit + (pkgs) + pandoc + texlab + texliveFull + rubber + ; + }; extraLuaConfig = # lua @@ -56,7 +57,7 @@ in } { - plugin = vimPlugins.knap; + plugin = pkgs.vimPlugins.knap; type = "lua"; config = # lua diff --git a/common/home/neovim/langs/nix.nix b/common/home/neovim/langs/nix.nix index e2dc64e1..b03c878c 100644 --- a/common/home/neovim/langs/nix.nix +++ b/common/home/neovim/langs/nix.nix @@ -6,8 +6,8 @@ self, ... }: let + inherit (lib) getExe hasPrefix mkIf removePrefix; inherit (config.vars) hostName mainUser neovimIde; - inherit (lib) getExe hasPrefix removePrefix; defaultFormatter = self.formatter.${pkgs.system}; @@ -16,7 +16,7 @@ flakeEnv = config.programs.bash.sessionVariables.FLAKE; flakeDir = "${removePrefix "/home/${mainUser}/" flakeEnv}"; in - lib.mkIf neovimIde { + mkIf neovimIde { assertions = [ { assertion = diff --git a/common/home/neovim/langs/python.nix b/common/home/neovim/langs/python.nix index 1fb9a035..e5d28ab8 100644 --- a/common/home/neovim/langs/python.nix +++ b/common/home/neovim/langs/python.nix @@ -4,9 +4,10 @@ pkgs, ... }: let + inherit (lib) mkIf; inherit (config.vars) neovimIde; in - lib.mkIf neovimIde { + mkIf neovimIde { programs = { neovim = { withPython3 = true; diff --git a/common/home/neovim/langs/rust.nix b/common/home/neovim/langs/rust.nix index 393714d8..5487c4f6 100644 --- a/common/home/neovim/langs/rust.nix +++ b/common/home/neovim/langs/rust.nix @@ -4,17 +4,21 @@ lib, ... }: let + inherit (lib) mkIf; inherit (config.vars) neovimIde; in - lib.mkIf neovimIde { + mkIf neovimIde { programs = { neovim = { - extraPackages = with pkgs; [ - cargo - rustc - rust-analyzer - rustfmt - ]; + extraPackages = builtins.attrValues { + inherit + (pkgs) + cargo + rustc + rust-analyzer + rustfmt + ; + }; extraLuaConfig = # lua diff --git a/common/home/neovim/langs/web.nix b/common/home/neovim/langs/web.nix index 61217d2f..aa4ffa3f 100644 --- a/common/home/neovim/langs/web.nix +++ b/common/home/neovim/langs/web.nix @@ -6,23 +6,29 @@ vimplugin-ts-error-translator-src, ... }: let + inherit (lib) mkIf; inherit (config.vars) neovimIde; - inherit (pkgs) vimPlugins; inherit (import "${self}/lib" {inherit pkgs;}) buildPlugin; in - lib.mkIf neovimIde { + mkIf neovimIde { programs = { neovim = { withNodeJs = true; - extraPackages = [ - pkgs.nodejs_latest - pkgs.nodePackages.npm - pkgs.nodePackages.neovim + extraPackages = builtins.attrValues { + inherit + (pkgs) + nodejs_latest + vscode-langservers-extracted + ; - pkgs.vscode-langservers-extracted - ]; + inherit + (pkgs.nodePackages) + npm + neovim + ; + }; extraLuaConfig = # lua @@ -122,11 +128,11 @@ in ''; plugins = [ - vimPlugins.typescript-tools-nvim + pkgs.vimPlugins.typescript-tools-nvim (buildPlugin "ts-error-translator" vimplugin-ts-error-translator-src) { - plugin = vimPlugins.package-info-nvim; + plugin = pkgs.vimPlugins.package-info-nvim; type = "lua"; config = # lua diff --git a/common/home/neovim/theme.nix b/common/home/neovim/theme.nix index 549b57c2..70c5e8f5 100644 --- a/common/home/neovim/theme.nix +++ b/common/home/neovim/theme.nix @@ -5,20 +5,19 @@ nvim-theme-src, ... }: let - inherit (config.vars) neovimIde; inherit (lib) fileContents optionals; - inherit (pkgs) vimPlugins; + inherit (config.vars) neovimIde; in { programs = { neovim = { - extraPackages = with pkgs; [ - bat - ]; + extraPackages = builtins.attrValues { + inherit (pkgs) bat; + }; plugins = [ { - plugin = vimPlugins.dracula-nvim.overrideAttrs { + plugin = pkgs.vimPlugins.dracula-nvim.overrideAttrs { src = nvim-theme-src; }; type = "lua"; @@ -43,7 +42,7 @@ in { ''; } { - plugin = vimPlugins.indent-blankline-nvim; + plugin = pkgs.vimPlugins.indent-blankline-nvim; type = "lua"; config = # lua @@ -80,21 +79,21 @@ in { } # Deps of heirline config - vimPlugins.nvim-web-devicons + pkgs.vimPlugins.nvim-web-devicons { - plugin = vimPlugins.heirline-nvim; + plugin = pkgs.vimPlugins.heirline-nvim; type = "lua"; config = fileContents ./plugins/heirline.lua; } ] ++ optionals neovimIde [ { - plugin = vimPlugins.neo-tree-nvim; + plugin = pkgs.vimPlugins.neo-tree-nvim; type = "lua"; config = fileContents ./plugins/neotree.lua; } { - plugin = vimPlugins.codewindow-nvim; + plugin = pkgs.vimPlugins.codewindow-nvim; type = "lua"; config = # lua @@ -123,7 +122,7 @@ in { ''; } { - plugin = vimPlugins.transparent-nvim; + plugin = pkgs.vimPlugins.transparent-nvim; type = "lua"; config = # lua diff --git a/common/home/neovim/treesitter.nix b/common/home/neovim/treesitter.nix index 974fbedd..c9326be6 100644 --- a/common/home/neovim/treesitter.nix +++ b/common/home/neovim/treesitter.nix @@ -1,40 +1,34 @@ -{pkgs, ...}: let - inherit (pkgs) vimPlugins; -in { - programs = { - neovim = { - plugins = [ - { - plugin = vimPlugins.nvim-treesitter-context; - type = "lua"; - config = - # lua - '' - require('treesitter-context').setup({ - enable = true, - max_lines = 3, - min_window_height = 20, - }); +{pkgs, ...}: { + programs.neovim.plugins = [ + { + plugin = pkgs.vimPlugins.nvim-treesitter-context; + type = "lua"; + config = + # lua + '' + require('treesitter-context').setup({ + enable = true, + max_lines = 3, + min_window_height = 20, + }); - vim.cmd.hi('TreesitterContextBottom', 'gui=underline guisp=Grey'); - ''; - } + vim.cmd.hi('TreesitterContextBottom', 'gui=underline guisp=Grey'); + ''; + } - vimPlugins.nvim-treesitter-textobjects + pkgs.vimPlugins.nvim-treesitter-textobjects - { - plugin = vimPlugins.nvim-treesitter.withAllGrammars; - type = "lua"; - config = - # lua - '' - require('nvim-treesitter.configs').setup({ - highlight = { enable = true }, - indent = { enable = true }, - }); - ''; - } - ]; - }; - }; + { + plugin = pkgs.vimPlugins.nvim-treesitter.withAllGrammars; + type = "lua"; + config = + # lua + '' + require('nvim-treesitter.configs').setup({ + highlight = { enable = true }, + indent = { enable = true }, + }); + ''; + } + ]; } diff --git a/common/home/tmux/default.nix b/common/home/tmux/default.nix index aec2bac0..560b1b21 100644 --- a/common/home/tmux/default.nix +++ b/common/home/tmux/default.nix @@ -11,7 +11,9 @@ newSession = true; historyLimit = 30000; - plugins = with pkgs.tmuxPlugins; [dracula]; + plugins = builtins.attrValues { + inherit (pkgs.tmuxPlugins) dracula; + }; extraConfig = # bash diff --git a/common/modules/locale.nix b/common/modules/locale.nix index 1c78c79a..3f3d9ae2 100644 --- a/common/modules/locale.nix +++ b/common/modules/locale.nix @@ -10,27 +10,33 @@ }; }; - packages = with pkgs; [ - (nerdfonts.override { - fonts = [ - "JetBrainsMono" - "Go-Mono" - "Iosevka" - "NerdFontsSymbolsOnly" - "SpaceMono" - "Ubuntu" - "Noto" - ]; - }) - noto-fonts - noto-fonts-cjk - noto-fonts-emoji - liberation_ttf - font-awesome - meslo-lgs-nf - jetbrains-mono - ubuntu_font_family - ]; + packages = + [ + (pkgs.nerdfonts.override { + fonts = [ + "JetBrainsMono" + "Go-Mono" + "Iosevka" + "NerdFontsSymbolsOnly" + "SpaceMono" + "Ubuntu" + "Noto" + ]; + }) + ] + ++ (builtins.attrValues { + inherit + (pkgs) + noto-fonts + noto-fonts-cjk + noto-fonts-emoji + liberation_ttf + font-awesome + meslo-lgs-nf + jetbrains-mono + ubuntu_font_family + ; + }); }; # Select internationalisation properties. diff --git a/common/packages.nix b/common/packages.nix index 899f6f91..720691eb 100644 --- a/common/packages.nix +++ b/common/packages.nix @@ -4,53 +4,72 @@ ... }: { environment.systemPackages = - (with self.packages.${pkgs.system}; [ - pokemon-colorscripts - repl - ]) - ++ (with pkgs.nodePackages; [ - undollar - ]) - ++ (with pkgs; [ - alejandra + (builtins.attrValues { + inherit + (self.packages.${pkgs.system}) + pokemon-colorscripts + repl + ; + + inherit + (pkgs.nodePackages) + undollar + ; + + inherit (pkgs) alejandra; # Archiving - zip - unzip - p7zip - bzip2 - gzip - gnutar - xz + inherit + (pkgs) + zip + unzip + p7zip + bzip2 + gzip + gnutar + xz + ; # File management - findutils - diffutils - utillinux - which - imagemagick + inherit + (pkgs) + findutils + diffutils + utillinux + which + imagemagick + ; # Networking - dig.dnsutils - openssh - rsync - wget - gnupg + inherit (pkgs.dig) dnsutils; + inherit + (pkgs) + openssh + rsync + wget + gnupg + ; # Misc CLI stuff - killall - nix-output-monitor - progress - tree - gnugrep - gnused + inherit + (pkgs) + killall + nix-output-monitor + progress + tree + gnugrep + gnused + ; # Expected Stuff - hostname - man - perl - tzdata - ]) + inherit + (pkgs) + hostname + man + perl + tzdata + ; + }) ++ [ # This could help as well: nix derivation show -r /run/current-system (pkgs.writeShellApplication { @@ -63,10 +82,13 @@ (pkgs.writeShellApplication { name = "from"; - runtimeInputs = with pkgs; [ - coreutils - which - ]; + runtimeInputs = builtins.attrValues { + inherit + (pkgs) + coreutils + which + ; + }; text = '' for var do diff --git a/devices/android/default.nix b/devices/android/default.nix index 2de5bada..560de942 100644 --- a/devices/android/default.nix +++ b/devices/android/default.nix @@ -21,11 +21,14 @@ environment.packages = [ (pkgs.writeShellApplication { name = "switch"; - runtimeInputs = with pkgs; [ - coreutils - nix-output-monitor - nvd - ]; + runtimeInputs = builtins.attrValues { + inherit + (pkgs) + coreutils + nix-output-monitor + nvd + ; + }; text = '' oldProfile=$(realpath /nix/var/nix/profiles/per-user/nix-on-droid/profile) diff --git a/devices/bbsteamie/modules/desktop/default.nix b/devices/bbsteamie/modules/desktop/default.nix index 90fc512d..dbdb08c1 100644 --- a/devices/bbsteamie/modules/desktop/default.nix +++ b/devices/bbsteamie/modules/desktop/default.nix @@ -17,14 +17,18 @@ in { services.flatpak.enable = true; services.packagekit.enable = true; - environment.systemPackages = with pkgs; [ - # Misc Apps - firefox - kdePackages.discover - kdePackages.krfb + environment.systemPackages = builtins.attrValues { + inherit + (pkgs) + firefox + wl-clipboard + xclip + ; - # Libs - wl-clipboard - xclip - ]; + inherit + (pkgs.kdePackages) + discover + krfb + ; + }; } diff --git a/devices/bbsteamie/modules/desktop/steam.nix b/devices/bbsteamie/modules/desktop/steam.nix index 363a3906..afb69fe1 100644 --- a/devices/bbsteamie/modules/desktop/steam.nix +++ b/devices/bbsteamie/modules/desktop/steam.nix @@ -46,18 +46,19 @@ defaultSession: { stateDir = "/home/${mainUser}/.local/share/decky"; # Keep scoped to user # https://github.com/Jovian-Experiments/Jovian-NixOS/blob/1171169117f63f1de9ef2ea36efd8dcf377c6d5a/modules/decky-loader.nix#L80-L84 - extraPackages = with pkgs; [ - # Generic packages - curl - unzip - util-linux - gnugrep - - readline.out - procps - pciutils - libpulseaudio - ]; + extraPackages = builtins.attrValues { + inherit + (pkgs) + curl + unzip + util-linux + gnugrep + readline + procps + pciutils + libpulseaudio + ; + }; }; # Takes way too long to shutdown diff --git a/devices/binto/hardware-configuration.nix b/devices/binto/hardware-configuration.nix index e97d0fa6..b8bb5bdc 100644 --- a/devices/binto/hardware-configuration.nix +++ b/devices/binto/hardware-configuration.nix @@ -14,10 +14,13 @@ kernelModules = ["kvm-amd"]; # Zenpower for ryzen cpu monitoring - extraModulePackages = with config.boot.kernelPackages; [ - v4l2loopback - zenpower - ]; + extraModulePackages = builtins.attrValues { + inherit + (config.boot.kernelPackages) + v4l2loopback + zenpower + ; + }; blacklistedKernelModules = ["k10temp"]; supportedFilesystems = ["ntfs"]; @@ -85,10 +88,13 @@ libvirtd.enable = true; spiceUSBRedirection.enable = true; }; - environment.systemPackages = with pkgs; [ - qemu - virtiofsd - ]; + environment.systemPackages = builtins.attrValues { + inherit + (pkgs) + qemu + virtiofsd + ; + }; nvidia = { enable = true; diff --git a/devices/cluster/modules/nfs-client.nix b/devices/cluster/modules/nfs-client.nix index 5f7e9743..34a2e86d 100644 --- a/devices/cluster/modules/nfs-client.nix +++ b/devices/cluster/modules/nfs-client.nix @@ -2,7 +2,9 @@ # NFS client setup services.rpcbind.enable = true; boot.supportedFilesystems = ["nfs"]; - environment.systemPackages = with pkgs; [nfs-utils]; + environment.systemPackages = builtins.attrValues { + inherit (pkgs) nfs-utils; + }; systemd.mounts = let host = "10.0.0.249"; diff --git a/devices/nos/modules/docker/freshrss/images/rss-bridge.nix b/devices/nos/modules/docker/freshrss/images/rss-bridge.nix index 89b50ee1..01f58dd3 100644 --- a/devices/nos/modules/docker/freshrss/images/rss-bridge.nix +++ b/devices/nos/modules/docker/freshrss/images/rss-bridge.nix @@ -1,8 +1,8 @@ pkgs: pkgs.dockerTools.pullImage { imageName = "rssbridge/rss-bridge"; - imageDigest = "sha256:327315251d038d2ddae7eb088569470f52255f8a0cdc4df41eab47dab4624318"; - sha256 = "03w1jnhxahbvlmnby7c5v47sm1ypz98v0w5inm8bdwi765r7db60"; + imageDigest = "sha256:ffc5966ca95af2d031a5c7561d3144454898e330a68862bb0299db6349806c25"; + sha256 = "059qly0brjsh3ch6b2kmsn2rfsvlvayiaqkpiiydr6fyh85ryrvj"; finalImageName = "rssbridge/rss-bridge"; finalImageTag = "latest"; } diff --git a/devices/nos/modules/jellyfin/packages.nix b/devices/nos/modules/jellyfin/packages.nix index 55277065..204976fc 100644 --- a/devices/nos/modules/jellyfin/packages.nix +++ b/devices/nos/modules/jellyfin/packages.nix @@ -19,9 +19,12 @@ in { ffmpegPackage = jellyPkgs.jellyfin-ffmpeg; }; - environment.systemPackages = with config.services.jellyfin; [ - finalPackage - webPackage - ffmpegPackage - ]; + environment.systemPackages = builtins.attrValues { + inherit + (config.services.jellyfin) + finalPackage + webPackage + ffmpegPackage + ; + }; } diff --git a/devices/nos/modules/mergerfs.nix b/devices/nos/modules/mergerfs.nix index fb0992d4..a0e08e7e 100644 --- a/devices/nos/modules/mergerfs.nix +++ b/devices/nos/modules/mergerfs.nix @@ -1,5 +1,5 @@ {pkgs, ...}: let - fsPkgs = with pkgs; [mergerfs cifs-utils]; + fsPkgs = builtins.attrValues {inherit (pkgs) mergerfs cifs-utils;}; in { system.fsPackages = fsPkgs; environment.systemPackages = fsPkgs; diff --git a/devices/nos/modules/subtitles/cleanup.nix b/devices/nos/modules/subtitles/cleanup.nix index 5b12ddb6..eeafcf22 100644 --- a/devices/nos/modules/subtitles/cleanup.nix +++ b/devices/nos/modules/subtitles/cleanup.nix @@ -15,11 +15,14 @@ in pkgs.writeShellApplication { name = "sub-clean"; - runtimeInputs = with pkgs; [ - findutils - gnugrep - gawk - ]; + runtimeInputs = builtins.attrValues { + inherit + (pkgs) + findutils + gnugrep + gawk + ; + }; text = '' exec ${script} "$@" diff --git a/devices/nos/modules/subtitles/convert.nix b/devices/nos/modules/subtitles/convert.nix index efa9768c..4193c993 100644 --- a/devices/nos/modules/subtitles/convert.nix +++ b/devices/nos/modules/subtitles/convert.nix @@ -2,9 +2,12 @@ pkgs.writeShellApplication { name = "convertMkv"; - runtimeInputs = with pkgs; [ - ffmpeg-full - ]; + runtimeInputs = builtins.attrValues { + inherit + (pkgs) + ffmpeg-full + ; + }; text = '' extension="$1" diff --git a/devices/servivi/hardware-configuration.nix b/devices/servivi/hardware-configuration.nix index fd9f0be1..9e5f9e7a 100644 --- a/devices/servivi/hardware-configuration.nix +++ b/devices/servivi/hardware-configuration.nix @@ -13,7 +13,13 @@ kernelModules = ["kvm-amd"]; # Zenpower for ryzen cpu monitoring - extraModulePackages = with config.boot.kernelPackages; [zenpower]; + extraModulePackages = builtins.attrValues { + inherit + (config.boot.kernelPackages) + zenpower + ; + }; + blacklistedKernelModules = ["k10temp"]; initrd.availableKernelModules = [ diff --git a/devices/servivi/modules/7-days-to-die.nix b/devices/servivi/modules/7-days-to-die.nix index 3d924310..69376952 100644 --- a/devices/servivi/modules/7-days-to-die.nix +++ b/devices/servivi/modules/7-days-to-die.nix @@ -14,10 +14,13 @@ in { wantedBy = ["multi-user.target"]; serviceConfig.User = "matt"; - path = with pkgs; [ - steam-run - steamcmd - ]; + path = builtins.attrValues { + inherit + (pkgs) + steam-run + steamcmd + ; + }; script = '' # Make sure gamePath exists and cd to it diff --git a/devices/servivi/modules/binary-cache.nix b/devices/servivi/modules/binary-cache.nix index 552f59d3..b829fc1a 100644 --- a/devices/servivi/modules/binary-cache.nix +++ b/devices/servivi/modules/binary-cache.nix @@ -40,13 +40,18 @@ in { }; path = - [nix-fast-buildPkg] - ++ (with pkgs; [ - bash + [ + nix-fast-buildPkg config.nix.package - git - openssh - ]); + ] + ++ (builtins.attrValues { + inherit + (pkgs) + bash + git + openssh + ; + }); script = '' cd /tmp diff --git a/devices/wim/hardware-configuration.nix b/devices/wim/hardware-configuration.nix index 6cae8679..93d9ca00 100644 --- a/devices/wim/hardware-configuration.nix +++ b/devices/wim/hardware-configuration.nix @@ -15,10 +15,13 @@ ]; kernelModules = ["amdgpu" "kvm-amd" "acpi_call"]; - extraModulePackages = with config.boot.kernelPackages; [ - acpi_call - zenpower - ]; + extraModulePackages = builtins.attrValues { + inherit + (config.boot.kernelPackages) + acpi_call + zenpower + ; + }; blacklistedKernelModules = ["k10temp"]; initrd = { @@ -94,10 +97,13 @@ libvirtd.enable = true; waydroid.enable = true; }; - environment.systemPackages = with pkgs; [ - qemu - powertop - ]; + environment.systemPackages = builtins.attrValues { + inherit + (pkgs) + qemu + powertop + ; + }; # enable brightness control programs.light.enable = true; diff --git a/flake.lock b/flake.lock index ac26992a..1a4d2080 100644 --- a/flake.lock +++ b/flake.lock @@ -172,11 +172,11 @@ ] }, "locked": { - "lastModified": 1725001600, - "narHash": "sha256-4RNNipvSQLTSQWuYeqyu+rb0dscUZj++m4upR1Y30VQ=", + "lastModified": 1725087993, + "narHash": "sha256-DZMhzJKruW/CWDW+OZi9DwpISUvYeQcLrv5g3SUOOF4=", "owner": "matt1432", "repo": "discord-nightly-overlay", - "rev": "c61d7927358044647cab2b28bd400f712faef74d", + "rev": "6140012164764a1f3c3cf8aafacfc2158e165680", "type": "github" }, "original": { @@ -417,11 +417,11 @@ "gpu-screen-recorder-src": { "flake": false, "locked": { - "lastModified": 1725058084, - "narHash": "sha256-6WSBV9UTFoXmQvy5fJz1VKpuHbHT3sySiH4U+Si7lPI=", + "lastModified": 1725068518, + "narHash": "sha256-pzFO0ijeYbOFUgywLxCAivR29Zfc8NzbAvXo2yCvHaI=", "ref": "refs/heads/master", - "rev": "b99539af570cc725ca3881dfbb2ed9e6b202e2f6", - "revCount": 753, + "rev": "33251a4799ea57c07b66b9cc1676cf9d377571ba", + "revCount": 756, "type": "git", "url": "https://repo.dec05eba.com/gpu-screen-recorder" }, @@ -476,11 +476,11 @@ "gtk-theme-src": { "flake": false, "locked": { - "lastModified": 1725052067, - "narHash": "sha256-Y0rMdCKYVwKUC0GKgMZlzyTd0BiGPY97gUrk2xJpe6w=", + "lastModified": 1725129614, + "narHash": "sha256-dMM07wqESVHXbhw7wjR3QRQcf+PZxU90FcVLhGQOf2k=", "owner": "dracula", "repo": "gtk", - "rev": "d46b54480979288afdc8f102579deda1c24e2a88", + "rev": "e59324a4166a18fe35684d4a4cc2f7ee931c9015", "type": "github" }, "original": { @@ -596,11 +596,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1725032272, - "narHash": "sha256-A0AiFlPoqDK/IwUiV7SGIi8uW2zOqmmiZY6j8i367LU=", + "lastModified": 1725134108, + "narHash": "sha256-OIOBT4NKPmTUXTND0IDUfhX+8YBQztSvhJ91LfEK4Sk=", "ref": "refs/heads/main", - "rev": "c5fd5771814958ad274ea9abb961fff621a35b9c", - "revCount": 5165, + "rev": "a6315b0af4e417cf396649d9c5792d3c5420b713", + "revCount": 5172, "submodules": true, "type": "git", "url": "https://github.com/hyprwm/Hyprland" @@ -1307,11 +1307,11 @@ ] }, "locked": { - "lastModified": 1725039046, - "narHash": "sha256-B5Ypgx4cO0syxPyUsHTIxVFT8xChPj494WJ5uIOefDM=", + "lastModified": 1725138342, + "narHash": "sha256-mKqQHEFoQs6ovgfSbDdCIRI8PU2EBhO7yfrbzo+yUCI=", "owner": "nix-community", "repo": "nixpkgs-wayland", - "rev": "90cf4eb6d71f1ee8124fd57535a3569048771b33", + "rev": "3f77707cda31a148a5c746b4d53a380e1ca9af3c", "type": "github" }, "original": { @@ -1821,11 +1821,11 @@ "ts-for-gir-src": { "flake": false, "locked": { - "lastModified": 1724145738, - "narHash": "sha256-LxSYZK8/dENY8UMcam+hw0CmgHxCvSSTXp1fqyM/nJQ=", + "lastModified": 1725114558, + "narHash": "sha256-3B/hMCeFfI2pvG92tRsGu13ja82tudVH5Zuq/JgP/P8=", "owner": "gjsify", "repo": "ts-for-gir", - "rev": "dafd5e4794e06201620c90365f9df2d0417d1b32", + "rev": "f0f46a3218568ecc961afd7f0aaf8d667e9a513a", "type": "github" }, "original": { diff --git a/homeManagerModules/firefox/default.nix b/homeManagerModules/firefox/default.nix index bc3479be..2388397e 100644 --- a/homeManagerModules/firefox/default.nix +++ b/homeManagerModules/firefox/default.nix @@ -195,25 +195,28 @@ in { ]; }; - extensions = with firefoxAddons; [ - auto-refresh-page - bitwarden - checkmarks-web-ext - darkreader - floccus - google-container - image-search-options - istilldontcareaboutcookies - opera-gx-witchcraft-purple - return-youtube-dislikes - seventv - sponsorblock - sound-volume - stylus - ttv-lol-pro - ublock-origin - undoclosetabbutton - ]; + extensions = builtins.attrValues { + inherit + (firefoxAddons) + auto-refresh-page + bitwarden + checkmarks-web-ext + darkreader + floccus + google-container + image-search-options + istilldontcareaboutcookies + opera-gx-witchcraft-purple + return-youtube-dislikes + seventv + sponsorblock + sound-volume + stylus + ttv-lol-pro + ublock-origin + undoclosetabbutton + ; + }; }; }; }; diff --git a/legacyPackages/dracula/hyprcursor.nix b/legacyPackages/dracula/hyprcursor.nix index a0577809..806df66f 100644 --- a/legacyPackages/dracula/hyprcursor.nix +++ b/legacyPackages/dracula/hyprcursor.nix @@ -11,7 +11,13 @@ stdenv.mkDerivation { src = "${gtk-theme-src}/kde/cursors"; - buildInputs = with pkgs; [hyprcursor xcur2png]; + buildInputs = builtins.attrValues { + inherit + (pkgs) + hyprcursor + xcur2png + ; + }; installPhase = '' hyprcursor-util --extract ./Dracula-cursors diff --git a/lib/flake-lib.nix b/lib/flake-lib.nix index 58a286d3..1173adea 100644 --- a/lib/flake-lib.nix +++ b/lib/flake-lib.nix @@ -11,10 +11,13 @@ inputs: rec { "jovian" "nixpkgs-wayland" ]) - ++ (with inputs.self.overlays; [ - broken-packages - xdg-desktop-portal-kde - ]); + ++ (builtins.attrValues { + inherit + (inputs.self.overlays) + broken-packages + xdg-desktop-portal-kde + ; + }); }; # Function that makes the attrs that make up the specialArgs @@ -43,10 +46,12 @@ inputs: rec { home-manager-path = inputs.home-manager.outPath; pkgs = extraSpecialArgs.pkgs; - modules = + modules = let + inherit (pkgs.lib) mkOption types; + in [ ({config, ...}: { - options = with pkgs.lib; { + options = { environment.variables.FLAKE = mkOption { type = with types; nullOr str; }; diff --git a/nixosModules/ags/default.nix b/nixosModules/ags/default.nix index 45f74d7a..8d528bd9 100644 --- a/nixosModules/ags/default.nix +++ b/nixosModules/ags/default.nix @@ -111,23 +111,26 @@ in { packages = [ + (pkgs.callPackage ./clipboard {}) # TODO: replace with matugen self.packages.${pkgs.system}.coloryou ] - ++ (with pkgs; [ - # ags - dart-sass - bun - playerctl - (callPackage ./clipboard {}) - - ## gui - pavucontrol # TODO: replace with ags widget - ]) - ++ (optionals cfgDesktop.isTouchscreen (with pkgs; [ - lisgd - ydotool - ])); + ++ (builtins.attrValues { + inherit + (pkgs) + dart-sass + bun + playerctl + pavucontrol # TODO: replace with ags widget + ; + }) + ++ (optionals cfgDesktop.isTouchscreen (builtins.attrValues { + inherit + (pkgs) + lisgd + ydotool + ; + })); }; wayland.windowManager.hyprland = { diff --git a/nixosModules/desktop/environment/default.nix b/nixosModules/desktop/environment/default.nix index 280431c6..ff77e32f 100644 --- a/nixosModules/desktop/environment/default.nix +++ b/nixosModules/desktop/environment/default.nix @@ -51,8 +51,8 @@ in { xdg.portal = { enable = true; - extraPortals = with pkgs; [ - kdePackages.xdg-desktop-portal-kde + extraPortals = [ + pkgs.kdePackages.xdg-desktop-portal-kde ]; config.hyprland = { @@ -203,24 +203,28 @@ in { }; # libs - home.packages = with pkgs; [ - # tools - bluez-tools - brightnessctl - pulseaudio - alsa-utils - - qt5.qtwayland - qt6.qtwayland - libayatana-appindicator - xdg-utils - evtest - glib - xorg.xrandr - libinput - xclip - libnotify - ]; + home.packages = + (builtins.attrValues { + inherit + (pkgs) + bluez-tools + brightnessctl + pulseaudio + alsa-utils + libayatana-appindicator + xdg-utils + evtest + glib + libinput + xclip + libnotify + ; + }) + ++ [ + pkgs.qt5.qtwayland + pkgs.qt6.qtwayland + pkgs.xorg.xrandr + ]; }; }; diff --git a/nixosModules/desktop/environment/home/mpv.nix b/nixosModules/desktop/environment/home/mpv.nix index f40a0c21..6798231c 100644 --- a/nixosModules/desktop/environment/home/mpv.nix +++ b/nixosModules/desktop/environment/home/mpv.nix @@ -3,24 +3,32 @@ self: {pkgs, ...}: { inherit (self.legacyPackages.${pkgs.system}) mpvScripts; in { # For kdialog-open-files - home.packages = with pkgs; [ - kdialog + home.packages = [ + pkgs.kdialog ]; programs.mpv = { enable = true; # https://github.com/mpv-player/mpv/wiki/User-Scripts - scripts = with mpvScripts; [ - modernx - # Dep of touch-gestures - pointer-event - touch-gestures + scripts = builtins.attrValues { + inherit + (mpvScripts) + modernx + persist-properties + undo-redo + ; + + # touch-gestures & deps + inherit + (mpvScripts) + pointer-event + touch-gestures + ; + # Ctrl + o - kdialog-open-files - persist-properties - undo-redo - ]; + inherit (mpvScripts) kdialog-open-files; + }; scriptOpts = { persist_properties = { diff --git a/nixosModules/desktop/environment/modules/dolphin.nix b/nixosModules/desktop/environment/modules/dolphin.nix index f05cb7c2..b337bb0c 100644 --- a/nixosModules/desktop/environment/modules/dolphin.nix +++ b/nixosModules/desktop/environment/modules/dolphin.nix @@ -6,8 +6,8 @@ config = let cfg = config.roles.desktop; in { - environment.systemPackages = with pkgs; [ - plasma5Packages.kio-admin + environment.systemPackages = [ + pkgs.plasma5Packages.kio-admin ]; # To make it work with firefox @@ -26,20 +26,22 @@ }; }; - home-manager.users.${cfg.user}.home.packages = with pkgs; - [ + home-manager.users.${cfg.user}.home.packages = builtins.attrValues { + inherit + (pkgs) gnome-calculator - ] - ++ (with kdePackages; [ + ; + inherit + (pkgs.kdePackages) kde-cli-tools - ]) - ++ (with plasma5Packages; [ + ; + + inherit + (pkgs.plasma5Packages) ark kcharselect kdenlive okular - - # Dolphin & co dolphin dolphin-plugins kdegraphics-thumbnailers @@ -48,7 +50,8 @@ kio-admin # needs to be both here and in system pkgs kio-extras kmime - ]); + ; + }; }; # For accurate stack trace diff --git a/nixosModules/desktop/environment/modules/packages.nix b/nixosModules/desktop/environment/modules/packages.nix index cdf7c219..7949befe 100644 --- a/nixosModules/desktop/environment/modules/packages.nix +++ b/nixosModules/desktop/environment/modules/packages.nix @@ -76,70 +76,84 @@ in { }; home.packages = - (with pkgs; [ + (builtins.attrValues { # School - xournalpp - virt-manager - libreoffice-fresh # TODO: declarative conf? - hunspell - hunspellDicts.en_CA + inherit (pkgs.hunspellDicts) en_CA; + inherit + (pkgs) + xournalpp + virt-manager + libreoffice-fresh # TODO: declarative conf? + hunspell + ; # Apps - protonmail-desktop - protonmail-bridge - spotifywm - photoqt - nextcloud-client - prismlauncher - - /* - Discord themes for Vencord - https://markchan0225.github.io/RoundedDiscord/RoundedDiscord.theme.css - https://raw.githubusercontent.com/dracula/BetterDiscord/master/Dracula_Official.theme.css - */ - (discord.override {withVencord = true;}) - - (symlinkJoin { - name = "gparted"; - paths = [gparted]; - buildInputs = [makeWrapper]; - postBuild = let - newWrapper = writeShellScriptBin "Gparted" '' - ( - sleep 1.5 - while killall -r -0 ksshaskpass > /dev/null 2>&1 - do - sleep 0.1 - if [[ $(hyprctl activewindow | grep Ksshaskpass) == "" ]]; then - killall -r ksshaskpass - fi - done - ) & - exec env SUDO_ASKPASS="${libsForQt5.ksshaskpass}/bin/ksshaskpass" sudo -k -EA "${getExe gparted}" "$@" - ''; - in '' - mkdir $out/.wrapped - mv $out/bin/gparted $out/.wrapped - cp ${getExe newWrapper} $out/bin/gparted - - sed -i "s#Exec.*#Exec=$out/bin/gparted %f#" $out/share/applications/gparted.desktop - ''; - }) + inherit + (pkgs) + protonmail-desktop + protonmail-bridge + spotifywm + photoqt + nextcloud-client + prismlauncher + ; # tools - wl-color-picker - wl-clipboard - cliphist - grim-hyprland - slurp - satty - ]) + inherit + (pkgs) + wl-color-picker + wl-clipboard + cliphist + grim-hyprland + slurp + satty + ; + }) ++ [ (jellyfin-flake .packages .${pkgs.system} .jellyfin-media-player .override {isNvidiaWayland = isNvidia;}) + + /* + Discord themes for Vencord + https://markchan0225.github.io/RoundedDiscord/RoundedDiscord.theme.css + https://raw.githubusercontent.com/dracula/BetterDiscord/master/Dracula_Official.theme.css + */ + (pkgs.discord.override {withVencord = true;}) + + # GParted + (let + inherit (pkgs) writeShellScriptBin libsForQt5 gparted makeWrapper symlinkJoin; + + newWrapper = writeShellScriptBin "Gparted" '' + ( + sleep 1.5 + while killall -r -0 ksshaskpass > /dev/null 2>&1 + do + sleep 0.1 + if [[ $(hyprctl activewindow | grep Ksshaskpass) == "" ]]; then + killall -r ksshaskpass + fi + done + ) & + exec env SUDO_ASKPASS="${libsForQt5.ksshaskpass}/bin/ksshaskpass" sudo -k -EA "${getExe gparted}" "$@" + ''; + in + symlinkJoin { + name = "gparted"; + paths = [gparted]; + buildInputs = [makeWrapper]; + postBuild = let + in '' + mkdir $out/.wrapped + mv $out/bin/gparted $out/.wrapped + cp ${getExe newWrapper} $out/bin/gparted + + sed -i "s#Exec.*#Exec=$out/bin/gparted %f#" $out/share/applications/gparted.desktop + ''; + }) ]; wayland.windowManager.hyprland = { diff --git a/nixosModules/desktop/environment/modules/printer.nix b/nixosModules/desktop/environment/modules/printer.nix index 2c40813a..35172af3 100644 --- a/nixosModules/desktop/environment/modules/printer.nix +++ b/nixosModules/desktop/environment/modules/printer.nix @@ -4,8 +4,9 @@ # Enable CUPS to print documents. printing = { enable = true; - drivers = with pkgs; [ - hplip + + drivers = [ + pkgs.hplip ]; }; }; diff --git a/nixosModules/desktop/manager/ags/default.nix b/nixosModules/desktop/manager/ags/default.nix index 6d0ab0d7..bcf99739 100644 --- a/nixosModules/desktop/manager/ags/default.nix +++ b/nixosModules/desktop/manager/ags/default.nix @@ -58,10 +58,13 @@ in { ]; }; - buildInputs = with pkgs; [ - bun - dart-sass - ]; + buildInputs = builtins.attrValues { + inherit + (pkgs) + bun + dart-sass + ; + }; buildPhase = '' sass ./scss/greeter.scss style.css diff --git a/nixosModules/desktop/theme/gtk/default.nix b/nixosModules/desktop/theme/gtk/default.nix index 916897e3..da0b489d 100644 --- a/nixosModules/desktop/theme/gtk/default.nix +++ b/nixosModules/desktop/theme/gtk/default.nix @@ -9,8 +9,8 @@ cfg = osConfig.roles.desktop; in { - home.packages = with pkgs; [ - gnomeExtensions.user-themes + home.packages = [ + pkgs.gnomeExtensions.user-themes ]; # Gtk settings diff --git a/nixosModules/desktop/theme/hyprpaper.nix b/nixosModules/desktop/theme/hyprpaper.nix index 8c110e38..4bf1af71 100644 --- a/nixosModules/desktop/theme/hyprpaper.nix +++ b/nixosModules/desktop/theme/hyprpaper.nix @@ -6,7 +6,7 @@ self: { config = let wallpaper = toString self.legacyPackages.${pkgs.system}.dracula.wallpaper; in { - home.packages = with pkgs; [hyprpaper]; + home.packages = [pkgs.hyprpaper]; xdg.configFile."hypr/hyprpaper.conf" = { text = lib.hm.generators.toHyprconf { diff --git a/nixosModules/desktop/theme/qt.nix b/nixosModules/desktop/theme/qt.nix index 60456353..942e74bc 100644 --- a/nixosModules/desktop/theme/qt.nix +++ b/nixosModules/desktop/theme/qt.nix @@ -9,9 +9,9 @@ self: { cfg = osConfig.roles.desktop; in { - home.packages = with pkgs; [ - libsForQt5.qtstyleplugin-kvantum - kdePackages.qtstyleplugin-kvantum + home.packages = [ + pkgs.libsForQt5.qtstyleplugin-kvantum + pkgs.kdePackages.qtstyleplugin-kvantum ]; qt = { diff --git a/nixosModules/docker/default.nix b/nixosModules/docker/default.nix index 3a1dfbe6..766243ec 100644 --- a/nixosModules/docker/default.nix +++ b/nixosModules/docker/default.nix @@ -38,8 +38,8 @@ in { }; # Script for updating the images of all images of a compose.nix file - environment.systemPackages = with pkgs; [ - (callPackage ./updateImage.nix {}) + environment.systemPackages = [ + (pkgs.callPackage ./updateImage.nix {}) ]; }; diff --git a/nixosModules/nvidia/default.nix b/nixosModules/nvidia/default.nix index 501c7e55..7fc732b4 100644 --- a/nixosModules/nvidia/default.nix +++ b/nixosModules/nvidia/default.nix @@ -33,12 +33,15 @@ in { enable = true; enable32Bit = true; - extraPackages = with pkgs; [ - vaapiVdpau - libvdpau-va-gl - nvidia-vaapi-driver - ]; - extraPackages32 = with pkgs; [vaapiVdpau]; + extraPackages = builtins.attrValues { + inherit + (pkgs) + vaapiVdpau + libvdpau-va-gl + nvidia-vaapi-driver + ; + }; + extraPackages32 = [pkgs.vaapiVdpau]; }; services.xserver.videoDrivers = ["nvidia"]; @@ -71,13 +74,16 @@ in { environment.systemPackages = optionals cfg.enableCUDA [pkgs.cudaPackages.cudatoolkit] - ++ (with pkgs; [ - libva-utils - nvidia-vaapi-driver - nvtopPackages.nvidia - pciutils - vdpauinfo - ]); + ++ (builtins.attrValues { + inherit (pkgs.nvtopPackages) nvidia; + inherit + (pkgs) + libva-utils + nvidia-vaapi-driver + pciutils + vdpauinfo + ; + }); boot.kernelModules = optionals cfg.enableCUDA ["nvidia-uvm"] diff --git a/outputs.nix b/outputs.nix index 476b3bda..8371ae59 100644 --- a/outputs.nix +++ b/outputs.nix @@ -129,8 +129,8 @@ devShells = perSystem (pkgs: { default = pkgs.mkShell { - packages = with pkgs; [ - (writeShellScriptBin "mkIso" '' + packages = [ + (pkgs.writeShellScriptBin "mkIso" '' isoConfig="nixosConfigurations.live-image.config.system.build.isoImage" nom build $(realpath /etc/nixos)#$isoConfig '') @@ -138,32 +138,47 @@ }; node = pkgs.mkShell { - packages = with pkgs; [ - nodejs_latest - typescript - - (writeShellApplication { - name = "updateNpmDeps"; - runtimeInputs = [prefetch-npm-deps nodejs_latest]; - - text = '' - npm i --package-lock-only || true # this command will fail but still updates the main lockfile - prefetch-npm-deps ./package-lock.json - ''; + packages = + (builtins.attrValues { + inherit + (pkgs) + nodejs_latest + typescript + ; }) - ]; + ++ [ + (pkgs.writeShellApplication { + name = "updateNpmDeps"; + runtimeInputs = builtins.attrValues { + inherit + (pkgs) + prefetch-npm-deps + nodejs_latest + ; + }; + + text = '' + npm i --package-lock-only || true # this command will fail but still updates the main lockfile + prefetch-npm-deps ./package-lock.json + ''; + }) + ]; }; subtitles-dev = pkgs.mkShell { - packages = with pkgs; - [ + packages = builtins.attrValues { + inherit + (pkgs) nodejs_latest ffmpeg-full typescript - ] - ++ (with nodePackages; [ + ; + + inherit + (pkgs.nodePackages) ts-node - ]); + ; + }; }; }); diff --git a/overlays/broken-packages/default.nix b/overlays/broken-packages/default.nix index 49c1707f..0e2fe68a 100644 --- a/overlays/broken-packages/default.nix +++ b/overlays/broken-packages/default.nix @@ -1,94 +1 @@ -final: prev: { - # FIXME: https://pr-tracker.nelim.org/?pr=334866 - rubber = prev.python3Packages.buildPythonApplication rec { - pname = "rubber"; - version = "1.6.6"; - pyproject = true; - - src = prev.fetchFromGitLab { - owner = "latex-rubber"; - repo = "rubber"; - rev = version; - hash = "sha256-C26PN3jyV6qwSjgPem54bykZrpKj+n8iHYYUyR+8dgI="; - }; - - postPatch = '' - sed -i -e '/texi2dvi/d' hatch_build.py - - substituteInPlace tests/run.sh \ - --replace-fail /var/tmp /tmp - ''; - - nativeBuildInputs = [prev.python3Packages.hatchling prev.texinfo]; - - checkPhase = '' - runHook preCheck - - pushd tests >/dev/null - ${prev.stdenv.shell} run.sh - popd >/dev/null - - runHook postCheck - ''; - meta.mainProgram = "rubber"; - }; - - # FIXME: https://pr-tracker.nelim.org/?pr=334814 - delta = prev.rustPlatform.buildRustPackage rec { - pname = "delta"; - version = "0.17.0-unstable-2024-08-12"; - - src = prev.fetchFromGitHub { - owner = "dandavison"; - repo = pname; - rev = "a01141b72001f4c630d77cf5274267d7638851e4"; - hash = "sha256-My51pQw5a2Y2VTu39MmnjGfmCavg8pFqOmOntUildS0="; - }; - - cargoHash = "sha256-Rlc3Bc6Jh89KLLEWBWQB5GjoeIuHnwIVZN/MVFMjY24="; - - nativeBuildInputs = with prev; [ - installShellFiles - pkg-config - ]; - - buildInputs = with prev; - [ - oniguruma - ] - ++ lib.optionals stdenv.isDarwin [ - darwin.apple_sdk_11_0.frameworks.Foundation - ]; - - nativeCheckInputs = [prev.git]; - - env.RUSTONIG_SYSTEM_LIBONIG = true; - - postInstall = '' - installShellCompletion --cmd delta \ - etc/completion/completion.{bash,fish,zsh} - ''; - - # test_env_parsing_with_pager_set_to_bat sets environment variables, - # which can be flaky with multiple threads: - # https://github.com/dandavison/delta/issues/1660 - dontUseCargoParallelTests = true; - - checkFlags = with prev; - lib.optionals stdenv.isDarwin [ - "--skip=test_diff_same_non_empty_file" - ]; - - meta.mainProgram = "delta"; - }; - - egl-wayland = prev.egl-wayland.overrideAttrs (o: { - version = "1.1.15-f30cb0e"; - src = prev.fetchFromGitHub { - owner = "Nvidia"; - repo = "egl-wayland"; - rev = "f30cb0e4c9a215e933dc8250f5dad4e96d4f2136"; - hash = "sha256-EwMj3PqU4yzSucYhx8Yy/MqOwZbfsGkhSA+yNwOh4U0="; - }; - }); -} +final: prev: {} diff --git a/packages/coloryou/default.nix b/packages/coloryou/default.nix index 537936f0..f61755de 100644 --- a/packages/coloryou/default.nix +++ b/packages/coloryou/default.nix @@ -1,19 +1,21 @@ -{python3Packages, ...}: -python3Packages.buildPythonPackage { - pname = "coloryou"; - version = "0.0.1"; +{python3Packages, ...}: let + inherit (python3Packages) buildPythonPackage utils material-color-utilities; +in + buildPythonPackage { + pname = "coloryou"; + version = "0.0.1"; - src = ./.; + src = ./.; - propagatedBuildInputs = with python3Packages; [utils material-color-utilities]; + propagatedBuildInputs = [utils material-color-utilities]; - postInstall = '' - mv -v $out/bin/coloryou.py $out/bin/coloryou - ''; - - meta = { - description = '' - Get Material You colors from an image. + postInstall = '' + mv -v $out/bin/coloryou.py $out/bin/coloryou ''; - }; -} + + meta = { + description = '' + Get Material You colors from an image. + ''; + }; + } diff --git a/packages/coloryou/shell.nix b/packages/coloryou/shell.nix deleted file mode 100644 index 5ac2d6d6..00000000 --- a/packages/coloryou/shell.nix +++ /dev/null @@ -1,7 +0,0 @@ -with import {}; -with pkgs.python311Packages; - buildPythonPackage { - name = "coloryou"; - src = ./.; - propagatedBuildInputs = [material-color-utilities utils]; - }