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,
...
}: {
environment.systemPackages = with pkgs; [
(writeShellApplication {
environment.systemPackages = [
(pkgs.writeShellApplication {
name = "rebuild-no-cache";
runtimeInputs = [config.programs.nh.package];
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,16 +35,17 @@ in {
default = import ./prompt-schemes.nix cfg.promptMainColor;
readOnly = true;
type = with types;
submodule {
options = {
textColor = mkOption {type = str;};
firstColor = mkOption {type = str;};
secondColor = mkOption {type = str;};
thirdColor = mkOption {type = str;};
fourthColor = mkOption {type = str;};
};
type = types.submodule {
options = let
inherit (types) str;
in {
textColor = mkOption {type = str;};
firstColor = mkOption {type = str;};
secondColor = mkOption {type = str;};
thirdColor = mkOption {type = str;};
fourthColor = mkOption {type = str;};
};
};
};
configDir = mkOption {

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -26,7 +26,7 @@ in {
}: {
options = {
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;
};
dumpCommand = mkOption {
@ -177,18 +177,17 @@ in {
};
existingRepos = mkOption {
type = with types;
listOf (submodule {
options = {
name = mkOption {
type = str;
};
authorizedKeys = mkOption {
type = listOf str;
default = [];
};
type = types.listOf (types.submodule {
options = {
name = mkOption {
type = types.str;
};
});
authorizedKeys = mkOption {
type = types.listOf types.str;
default = [];
};
};
});
default = [];
};
};

View file

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

View file

@ -34,7 +34,9 @@ in {
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;
package = default;
portalPackage = xdg-desktop-portal-hyprland;

View file

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

View file

@ -62,9 +62,9 @@ in {
open = cfg.enableWayland;
package = with config.boot.kernelPackages.nvidiaPackages;
package =
if !cfg.enableWayland
then stable
then config.boot.kernelPackages.nvidiaPackages.stable
else let
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";
@ -74,7 +74,7 @@ in {
# Keep the driver version at 535.xx.xx for Wayland desktop
# games stutter on more recent versions
# 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";
persistencedVersion = "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
nvidia-vaapi-driver
nvtopPackages.nvidia
pciutils
vdpauinfo
]
++ optionals cfg.enableCUDA [cudaPackages.cudatoolkit]);
]);
boot.kernelModules = optionals cfg.enableCUDA ["nvidia-uvm"];
};

View file

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