refactor: replace 'with' with attrValues
All checks were successful
Discord / discord commits (push) Has been skipped

This commit is contained in:
matt1432 2024-08-31 19:16:06 -04:00
parent b47c11362d
commit 194c140dc1
56 changed files with 675 additions and 608 deletions

View file

@ -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

View file

@ -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;
};
};
};
}

View file

@ -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"}

View file

@ -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

View file

@ -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

View file

@ -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}',
},
},
});

View file

@ -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;
};
};
};
}

View file

@ -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({});
'';
}
];
};

View file

@ -3,9 +3,10 @@
lib,
...
}: let
inherit (lib) mkIf;
inherit (config.vars) neovimIde;
in
lib.mkIf neovimIde {
mkIf neovimIde {
programs = {
neovim = {
extraLuaConfig =

View file

@ -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 }

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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 =

View file

@ -4,9 +4,10 @@
pkgs,
...
}: let
inherit (lib) mkIf;
inherit (config.vars) neovimIde;
in
lib.mkIf neovimIde {
mkIf neovimIde {
programs = {
neovim = {
withPython3 = true;

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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 },
});
'';
}
];
}

View file

@ -11,7 +11,9 @@
newSession = true;
historyLimit = 30000;
plugins = with pkgs.tmuxPlugins; [dracula];
plugins = builtins.attrValues {
inherit (pkgs.tmuxPlugins) dracula;
};
extraConfig =
# bash

View file

@ -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.

View file

@ -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

View file

@ -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)

View file

@ -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
;
};
}

View file

@ -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

View file

@ -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;

View file

@ -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";

View file

@ -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";
}

View file

@ -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
;
};
}

View file

@ -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;

View file

@ -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} "$@"

View file

@ -2,9 +2,12 @@
pkgs.writeShellApplication {
name = "convertMkv";
runtimeInputs = with pkgs; [
ffmpeg-full
];
runtimeInputs = builtins.attrValues {
inherit
(pkgs)
ffmpeg-full
;
};
text = ''
extension="$1"

View file

@ -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 = [

View file

@ -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

View file

@ -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

View file

@ -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;

View file

@ -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": {

View file

@ -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
;
};
};
};
};

View file

@ -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

View file

@ -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;
};

View file

@ -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 = {

View file

@ -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
];
};
};

View file

@ -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 = {

View file

@ -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

View file

@ -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 = {

View file

@ -4,8 +4,9 @@
# Enable CUPS to print documents.
printing = {
enable = true;
drivers = with pkgs; [
hplip
drivers = [
pkgs.hplip
];
};
};

View file

@ -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

View file

@ -9,8 +9,8 @@
cfg = osConfig.roles.desktop;
in {
home.packages = with pkgs; [
gnomeExtensions.user-themes
home.packages = [
pkgs.gnomeExtensions.user-themes
];
# Gtk settings

View file

@ -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 {

View file

@ -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 = {

View file

@ -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 {})
];
};

View file

@ -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"]

View file

@ -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
]);
;
};
};
});

View file

@ -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: {}

View file

@ -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.
'';
};
}

View file

@ -1,7 +0,0 @@
with import <nixpkgs> {};
with pkgs.python311Packages;
buildPythonPackage {
name = "coloryou";
src = ./.;
propagatedBuildInputs = [material-color-utilities utils];
}