refactor: make nixd happy
All checks were successful
Discord / discord commits (push) Has been skipped

This commit is contained in:
matt1432 2024-05-05 23:07:06 -04:00
parent 551880cc24
commit ac9aa96522
16 changed files with 60 additions and 72 deletions

View file

@ -3,8 +3,8 @@
pkgs, pkgs,
... ...
}: { }: {
environment.systemPackages = with pkgs; [ environment.systemPackages = [
(writeShellApplication { (pkgs.writeShellApplication {
name = "rebuild-no-cache"; name = "rebuild-no-cache";
runtimeInputs = [config.programs.nh.package]; runtimeInputs = [config.programs.nh.package];
text = '' text = ''

View file

@ -1,12 +0,0 @@
diff --git a/src/libstore/path.cc b/src/libstore/path.cc
index e642abcd5..0e584ef33 100644
--- a/src/libstore/path.cc
+++ b/src/libstore/path.cc
@@ -12,7 +12,7 @@ static void checkName(std::string_view path, std::string_view name)
if (!((c >= '0' && c <= '9')
|| (c >= 'a' && c <= 'z')
|| (c >= 'A' && c <= 'Z')
- || c == '+' || c == '-' || c == '.' || c == '_' || c == '?' || c == '='))
+ || c == '+' || c == '-' || c == '.' || c == '_' || c == '?' || c == '=' || c == '!'))
throw BadStorePath("store path '%s' contains illegal character '%s'", path, c);
}

View file

@ -35,9 +35,10 @@ in {
default = import ./prompt-schemes.nix cfg.promptMainColor; default = import ./prompt-schemes.nix cfg.promptMainColor;
readOnly = true; readOnly = true;
type = with types; type = types.submodule {
submodule { options = let
options = { inherit (types) str;
in {
textColor = mkOption {type = str;}; textColor = mkOption {type = str;};
firstColor = mkOption {type = str;}; firstColor = mkOption {type = str;};
secondColor = mkOption {type = str;}; secondColor = mkOption {type = str;};

View file

@ -66,20 +66,20 @@ in {
}; };
home-manager.users.${mainUser} = { home-manager.users.${mainUser} = {
home.packages = with pkgs; [ home.packages = [
gsr gsr
(writeShellApplication { (pkgs.writeShellApplication {
name = "gpu-save-replay"; name = "gpu-save-replay";
runtimeInputs = [procps]; runtimeInputs = [pkgs.procps];
text = '' text = ''
pkill --signal SIGUSR1 -f gpu-screen-recorder pkill --signal SIGUSR1 -f gpu-screen-recorder
''; '';
}) })
(writeShellApplication { (pkgs.writeShellApplication {
name = "gsr-start"; name = "gsr-start";
runtimeInputs = [pulseaudio hyprPkgs xorg.xrandr]; runtimeInputs = [pkgs.pulseaudio hyprPkgs pkgs.xorg.xrandr];
text = '' text = ''
main="${removePrefix "desc:" mainMonitor}" main="${removePrefix "desc:" mainMonitor}"
WINDOW=$(hyprctl -j monitors | jq '.[] |= (.description |= gsub(","; ""))' | jq -r ".[] | select(.description | test(\"$main\")) | .name") WINDOW=$(hyprctl -j monitors | jq '.[] |= (.description |= gsub(","; ""))' | jq -r ".[] | select(.description | test(\"$main\")) | .name")

View file

@ -15,8 +15,8 @@
}; };
}; };
environment.systemPackages = with pkgs; [ environment.systemPackages = [
(lutris.override { (pkgs.lutris.override {
extraLibraries = pkgs: [ extraLibraries = pkgs: [
# List library dependencies here # List library dependencies here
]; ];

View file

@ -26,11 +26,12 @@ in {
Group = config.users.users.${mainUser}.group; Group = config.users.users.${mainUser}.group;
}; };
path = with pkgs; [ path = [
findutils pkgs.findutils
(writeShellApplication {
(pkgs.writeShellApplication {
name = "sub-clean"; name = "sub-clean";
runtimeInputs = [findutils gnugrep gawk]; runtimeInputs = with pkgs; [findutils gnugrep gawk];
text = '' text = ''
exec ${script} "$@" exec ${script} "$@"
''; '';

View file

@ -22,8 +22,8 @@ in {
Group = config.users.users.${mainUser}.group; Group = config.users.users.${mainUser}.group;
}; };
path = with pkgs; [ path = [
findutils pkgs.findutils
node-syncsub node-syncsub
]; ];

View file

@ -19,7 +19,7 @@
fi fi
done done
) & ) &
exec env SUDO_ASKPASS=${pkgs.plasma5Packages.ksshaskpass}/bin/${pkgs.plasma5Packages.ksshaskpass.pname} sudo -k -EA "${gparted}/bin/${gparted.pname}" "$@" exec env SUDO_ASKPASS=${plasma5Packages.ksshaskpass}/bin/${plasma5Packages.ksshaskpass.pname} sudo -k -EA "${gparted}/bin/${gparted.pname}" "$@"
'') '')
]); ]);

View file

@ -176,14 +176,14 @@ in {
]; ];
}; };
extensions = with config.nur.repos; extensions =
(with bandithedoge.firefoxAddons; [ (with config.nur.repos.bandithedoge.firefoxAddons; [
sponsorblock sponsorblock
stylus stylus
#tridactyl #tridactyl
ublock-origin ublock-origin
]) ])
++ (with rycee.firefox-addons; [ ++ (with config.nur.repos.rycee.firefox-addons; [
bitwarden bitwarden
darkreader darkreader
istilldontcareaboutcookies istilldontcareaboutcookies
@ -193,13 +193,13 @@ in {
]) ])
++ (with firefox-addons; [ ++ (with firefox-addons; [
floccus floccus
sound-volume
google-container google-container
checkmarks-web-ext checkmarks-web-ext
ttv-lol-pro ttv-lol-pro
seventv seventv
opera-gx-witchcraft-purple opera-gx-witchcraft-purple
]); ])
++ [sound-volume];
}; };
}; };
} }

View file

@ -1,8 +1,4 @@
{ {config, ...}: let
config,
pkgs,
...
}: let
inherit (config.vars) mainUser; inherit (config.vars) mainUser;
in { in {
programs.adb.enable = true; programs.adb.enable = true;

View file

@ -26,7 +26,7 @@ in {
}: { }: {
options = { options = {
paths = mkOption { paths = mkOption {
type = with types; nullOr (coercedTo str lib.singleton (listOf str)); type = types.nullOr (types.coercedTo types.str lib.singleton (types.listOf types.str));
default = null; default = null;
}; };
dumpCommand = mkOption { dumpCommand = mkOption {
@ -177,14 +177,13 @@ in {
}; };
existingRepos = mkOption { existingRepos = mkOption {
type = with types; type = types.listOf (types.submodule {
listOf (submodule {
options = { options = {
name = mkOption { name = mkOption {
type = str; type = types.str;
}; };
authorizedKeys = mkOption { authorizedKeys = mkOption {
type = listOf str; type = types.listOf types.str;
default = []; default = [];
}; };
}; };

View file

@ -27,7 +27,7 @@ in {
home-manager.users.${mainUser}.home.packages = with pkgs; home-manager.users.${mainUser}.home.packages = with pkgs;
[] []
++ (with pkgs.plasma5Packages; [ ++ (with plasma5Packages; [
ark ark
kcharselect kcharselect
kdenlive kdenlive
@ -43,7 +43,7 @@ in {
kio-extras kio-extras
kmime kmime
]) ])
++ (with pkgs.gnome; [ ++ (with gnome; [
gnome-calculator gnome-calculator
]); ]);
} }

View file

@ -34,7 +34,9 @@ in {
xserver.wacom.enable = isTouchscreen; xserver.wacom.enable = isTouchscreen;
}; };
programs.hyprland = with hyprland.packages.${pkgs.system}; { programs.hyprland = let
inherit (hyprland.packages.${pkgs.system}) default xdg-desktop-portal-hyprland;
in {
enable = true; enable = true;
package = default; package = default;
portalPackage = xdg-desktop-portal-hyprland; portalPackage = xdg-desktop-portal-hyprland;

View file

@ -33,8 +33,8 @@ in {
hypridle.homeManagerModules.default hypridle.homeManagerModules.default
]; ];
home.packages = with pkgs; [ home.packages = [
gnome.seahorse pkgs.gnome.seahorse
lockPkg lockPkg
]; ];

View file

@ -62,9 +62,9 @@ in {
open = cfg.enableWayland; open = cfg.enableWayland;
package = with config.boot.kernelPackages.nvidiaPackages; package =
if !cfg.enableWayland if !cfg.enableWayland
then stable then config.boot.kernelPackages.nvidiaPackages.stable
else let else let
rcu_patch = pkgs.fetchpatch { rcu_patch = pkgs.fetchpatch {
url = "https://github.com/gentoo/gentoo/raw/c64caf53/x11-drivers/nvidia-drivers/files/nvidia-drivers-470.223.02-gpl-pfn_valid.patch"; url = "https://github.com/gentoo/gentoo/raw/c64caf53/x11-drivers/nvidia-drivers/files/nvidia-drivers-470.223.02-gpl-pfn_valid.patch";
@ -74,7 +74,7 @@ in {
# Keep the driver version at 535.xx.xx for Wayland desktop # Keep the driver version at 535.xx.xx for Wayland desktop
# games stutter on more recent versions # games stutter on more recent versions
# https://github.com/NixOS/nixpkgs/blob/e256f39bec8e01808c0a3e411d961cbced3f4e09/pkgs/os-specific/linux/nvidia-x11/default.nix#L70 # https://github.com/NixOS/nixpkgs/blob/e256f39bec8e01808c0a3e411d961cbced3f4e09/pkgs/os-specific/linux/nvidia-x11/default.nix#L70
mkDriver rec { config.boot.kernelPackages.nvidiaPackages.mkDriver rec {
version = "535.43.28"; version = "535.43.28";
persistencedVersion = "535.98"; persistencedVersion = "535.98";
settingsVersion = "535.98"; settingsVersion = "535.98";
@ -88,14 +88,15 @@ in {
}; };
}; };
environment.systemPackages = with pkgs; ([ environment.systemPackages =
optionals cfg.enableCUDA [pkgs.cudaPackages.cudatoolkit]
++ (with pkgs; [
libva-utils libva-utils
nvidia-vaapi-driver nvidia-vaapi-driver
nvtopPackages.nvidia nvtopPackages.nvidia
pciutils pciutils
vdpauinfo vdpauinfo
] ]);
++ optionals cfg.enableCUDA [cudaPackages.cudatoolkit]);
boot.kernelModules = optionals cfg.enableCUDA ["nvidia-uvm"]; boot.kernelModules = optionals cfg.enableCUDA ["nvidia-uvm"];
}; };

View file

@ -13,8 +13,8 @@
}; };
}; };
environment.systemPackages = with pkgs; [ environment.systemPackages = [
(piper.overrideAttrs { (pkgs.piper.overrideAttrs {
name = "piper-${piper-src.shortRev}"; name = "piper-${piper-src.shortRev}";
src = piper-src; src = piper-src;