useless_parens

This commit is contained in:
mjallen18
2026-04-05 15:10:13 -05:00
parent 07b1fc3618
commit a363622659
25 changed files with 76 additions and 93 deletions

View File

@@ -57,7 +57,7 @@ in
wget
]
++ (
if (hasDestopEnvironment) then
if hasDestopEnvironment then
[
boxbuddy
cider-2

View File

@@ -294,7 +294,7 @@ in
systemd.enable = true;
settings = {
mainBar = (
mainBar =
(mkMerge [
{
layer = cfg.layer;
@@ -589,8 +589,7 @@ in
};
})
])
// cfg.extra.settings
);
// cfg.extra.settings;
}
// cfg.extraModules; # keep legacy top-level extra modules for compatibility

View File

@@ -35,17 +35,17 @@ in
description = "The full name of the user.";
};
home = mkOption {
type = (types.nullOr types.str);
type = types.nullOr types.str;
default = home-directory;
description = "The user's home directory.";
};
icon = mkOption {
type = (types.nullOr types.package);
type = types.nullOr types.package;
default = null;
description = "The profile picture to use for the user. Set to a package whose output is the icon file (e.g. a derivation producing a PNG).";
};
name = mkOption {
type = (types.nullOr types.str);
type = types.nullOr types.str;
default = "matt";
description = "The user account.";
};

View File

@@ -62,7 +62,7 @@ in
bcachefs.package = lib.mkOverride 90 pkgs.${namespace}.bcachefs;
consoleLogLevel = lib.mkDefault 0;
bootspec.enable = (!isArm);
bootspec.enable = !isArm;
initrd = {
verbose = lib.mkDefault false;

View File

@@ -16,7 +16,7 @@ in
config = lib.mkIf cfg.enable {
hardware.deviceTree = {
overlays = (
overlays =
with pkgs.${namespace};
(
if (variant == "5") then
@@ -33,8 +33,7 @@ in
dtsFile = "${raspberrypi-overlays}/dtbs/raspberrypi-overlays/pisound-overlay.dts";
}
]
)
);
);
};
};
}

View File

@@ -16,7 +16,7 @@ in
config = lib.mkIf cfg.enable {
hardware.deviceTree = {
overlays = (
overlays =
if (variant == "5") then
[
{
@@ -34,8 +34,7 @@ in
pkgs.${namespace}.raspberrypi-overlays
}/dtbs/raspberrypi-overlays/disable-bt-overlay.dts";
}
]
);
];
};
};
}

View File

@@ -15,7 +15,7 @@ let
# installs raspberry's firmware independent of the nixos generations
# sometimes referred to as "boot code"
raspberryPiFirmware = (
raspberryPiFirmware =
{
pkgs,
firmware,
@@ -33,10 +33,9 @@ let
inherit firmware configTxt;
};
}
);
};
kernelbootGenBuilder = (
kernelbootGenBuilder =
{
pkgs,
deviceTreeInstaller,
@@ -53,10 +52,9 @@ let
installDeviceTree = deviceTreeInstaller;
};
}
);
};
deviceTree = (
deviceTree =
{
pkgs,
firmware,
@@ -73,8 +71,7 @@ let
inherit firmware;
};
}
);
};
mkBootloader =
pkgs:
@@ -113,7 +110,7 @@ let
};
bootloader = (
bootloader =
{
pkgs,
nixosGenerationsDir,
@@ -136,28 +133,25 @@ let
# NixOS-generations -dependent
inherit nixosGenerationsDir nixosGenBuilder;
};
}
);
};
# Builders used to write during system activation
ubootBuilder = import ./uboot-builder.nix {
inherit pkgs;
ubootPackage = (
if (cfg.variant == "5") then pkgs.${namespace}.uboot-pi5 else pkgs.${namespace}.uboot-pi4
);
ubootPackage =
if (cfg.variant == "5") then pkgs.${namespace}.uboot-pi5 else pkgs.${namespace}.uboot-pi4;
firmwareBuilder = firmwarePopulateCmd;
extlinuxConfBuilder = config.boot.loader.generic-extlinux-compatible.populateCmd;
};
uefiBuilder = import ./uefi-builder.nix {
inherit pkgs;
uefiPackage = (
uefiPackage =
if (cfg.variant == "5") then
pkgs.${namespace}.uefi-rpi5
else
pkgs.${namespace}.edk2.override { MODEL = "4"; }
);
pkgs.${namespace}.edk2.override { MODEL = "4"; };
firmwareBuilder = firmwarePopulateCmd;
};
@@ -297,14 +291,16 @@ in
enable = lib.mkDefault (if cfg.bootType == "uefi" then false else true);
useGenerationDeviceTree = lib.mkOverride 60 (if cfg.bootType == "uefi" then false else true);
};
systemd-boot.enable = (if cfg.bootType == "uefi" then true else false);
systemd-boot.extraInstallCommands =
let
bootloaderInstaller = (builder."${cfg.bootType}");
in
''
${bootloaderInstaller} -f /boot/firmware -b /boot -c
'';
systemd-boot = {
enable = if cfg.bootType == "uefi" then true else false;
extraInstallCommands =
let
bootloaderInstaller = builder."${cfg.bootType}";
in
''
${bootloaderInstaller} -f /boot/firmware -b /boot -c
'';
};
grub.enable = lib.mkForce false;
};
};
@@ -350,14 +346,13 @@ in
};
kernel = lib.mkIf (cfg.bootType == "kernel" || cfg.bootType == "uboot") {
enable = true;
value = (
value =
if cfg.bootType == "uboot" then
"u-boot.bin"
else if cfg.bootType == "kernel" then
"kernel.img"
else
""
);
"";
};
};
};

View File

@@ -16,7 +16,7 @@ in
config = lib.mkIf cfg.enable {
hardware.deviceTree = {
overlays = (
overlays =
if (variant == "5") then
[
{
@@ -70,8 +70,7 @@ in
name = "i2c6-overlay";
dtsFile = "${pkgs.${namespace}.raspberrypi-overlays}/dtbs/raspberrypi-overlays/i2c6-overlay.dts";
}
]
);
];
};
};
}

View File

@@ -16,7 +16,7 @@ in
config = lib.mkIf cfg.enable {
hardware.deviceTree = {
overlays = (
overlays =
if (variant == "5") then
[
{
@@ -34,8 +34,7 @@ in
pkgs.${namespace}.raspberrypi-overlays
}/dtbs/raspberrypi-overlays/vc4-fkms-v3d-pi4-overlay.dts";
}
]
);
];
};
};
}

View File

@@ -19,13 +19,12 @@ in
overlays = [
{
name = "enable-pwm";
filter = (if (variant == "5") then "*pi5*" else "*rpi-4-b*");
dtsFile = (
filter = if (variant == "5") then "*pi5*" else "*rpi-4-b*";
dtsFile =
if (variant == "5") then
"${pkgs.${namespace}.raspberrypi-overlays}/dtbs/raspberrypi-overlays/pwm-pio-overlay.dts"
else
"${pkgs.${namespace}.raspberrypi-overlays}/dtbs/raspberrypi-overlays/pwm1-overlay.dts"
);
"${pkgs.${namespace}.raspberrypi-overlays}/dtbs/raspberrypi-overlays/pwm1-overlay.dts";
}
];
};

View File

@@ -16,7 +16,7 @@ in
config = lib.mkIf cfg.enable {
hardware.deviceTree = {
overlays = (
overlays =
if (variant == "5") then
[
{
@@ -38,8 +38,7 @@ in
name = "wifimac-overlay";
dtsFile = "${pkgs.${namespace}.raspberrypi-overlays}/dtbs/raspberrypi-overlays/wifimac-overlay.dts";
}
]
);
];
};
};
}

View File

@@ -13,13 +13,13 @@ in
sops = {
secrets = {
"jallen-nas/govee2mqtt/govee-email" = {
sopsFile = (lib.snowfall.fs.get-file "secrets/nas-secrets.yaml");
sopsFile = lib.snowfall.fs.get-file "secrets/nas-secrets.yaml";
};
"jallen-nas/govee2mqtt/govee-password" = {
sopsFile = (lib.snowfall.fs.get-file "secrets/nas-secrets.yaml");
sopsFile = lib.snowfall.fs.get-file "secrets/nas-secrets.yaml";
};
"jallen-nas/govee2mqtt/govee-api" = {
sopsFile = (lib.snowfall.fs.get-file "secrets/nas-secrets.yaml");
sopsFile = lib.snowfall.fs.get-file "secrets/nas-secrets.yaml";
};
};
templates = {

View File

@@ -32,13 +32,13 @@ in
sops = {
secrets = {
"home-assistant/auth-client-id" = {
sopsFile = (lib.snowfall.fs.get-file "secrets/nuc-secrets.yaml");
sopsFile = lib.snowfall.fs.get-file "secrets/nuc-secrets.yaml";
owner = config.users.users.hass.name;
group = config.users.users.hass.group;
restartUnits = [ "home-assistant.service" ];
};
"home-assistant/auth-client-secret" = {
sopsFile = (lib.snowfall.fs.get-file "secrets/nuc-secrets.yaml");
sopsFile = lib.snowfall.fs.get-file "secrets/nuc-secrets.yaml";
owner = config.users.users.hass.name;
group = config.users.users.hass.group;
restartUnits = [ "home-assistant.service" ];

View File

@@ -18,19 +18,19 @@ let
sops = {
secrets = {
"jallen-nas/sabnzbd/password" = {
sopsFile = (lib.snowfall.fs.get-file "secrets/nas-secrets.yaml");
sopsFile = lib.snowfall.fs.get-file "secrets/nas-secrets.yaml";
};
"jallen-nas/sabnzbd/api-key" = {
sopsFile = (lib.snowfall.fs.get-file "secrets/nas-secrets.yaml");
sopsFile = lib.snowfall.fs.get-file "secrets/nas-secrets.yaml";
};
"jallen-nas/sabnzbd/nzb-key" = {
sopsFile = (lib.snowfall.fs.get-file "secrets/nas-secrets.yaml");
sopsFile = lib.snowfall.fs.get-file "secrets/nas-secrets.yaml";
};
"jallen-nas/sabnzbd/server/username" = {
sopsFile = (lib.snowfall.fs.get-file "secrets/nas-secrets.yaml");
sopsFile = lib.snowfall.fs.get-file "secrets/nas-secrets.yaml";
};
"jallen-nas/sabnzbd/server/password" = {
sopsFile = (lib.snowfall.fs.get-file "secrets/nas-secrets.yaml");
sopsFile = lib.snowfall.fs.get-file "secrets/nas-secrets.yaml";
};
};
templates = {

View File

@@ -4,7 +4,6 @@
namespace,
...
}:
with lib;
let
cfg = config.${namespace}.services.caddy;
in
@@ -13,45 +12,45 @@ in
sops = {
secrets = {
"jallen-nas/traefik/crowdsec/lapi-key" = {
sopsFile = (lib.snowfall.fs.get-file "secrets/nas-secrets.yaml");
sopsFile = lib.snowfall.fs.get-file "secrets/nas-secrets.yaml";
owner = config.users.users.caddy.name;
group = config.users.users.caddy.group;
restartUnits = [ "caddy.service" ];
};
"jallen-nas/traefik/crowdsec/capi-machine-id" = {
sopsFile = (lib.snowfall.fs.get-file "secrets/nas-secrets.yaml");
sopsFile = lib.snowfall.fs.get-file "secrets/nas-secrets.yaml";
owner = config.users.users.caddy.name;
group = config.users.users.caddy.group;
restartUnits = [ "caddy.service" ];
};
"jallen-nas/traefik/crowdsec/capi-password" = {
sopsFile = (lib.snowfall.fs.get-file "secrets/nas-secrets.yaml");
sopsFile = lib.snowfall.fs.get-file "secrets/nas-secrets.yaml";
owner = config.users.users.caddy.name;
group = config.users.users.caddy.group;
restartUnits = [ "caddy.service" ];
};
"jallen-nas/traefik/cloudflare-dns-api-token" = {
sopsFile = (lib.snowfall.fs.get-file "secrets/nas-secrets.yaml");
sopsFile = lib.snowfall.fs.get-file "secrets/nas-secrets.yaml";
owner = config.users.users.caddy.name;
group = config.users.users.caddy.group;
restartUnits = [ "caddy.service" ];
};
"jallen-nas/traefik/cloudflare-zone-api-token" = {
sopsFile = (lib.snowfall.fs.get-file "secrets/nas-secrets.yaml");
sopsFile = lib.snowfall.fs.get-file "secrets/nas-secrets.yaml";
owner = config.users.users.caddy.name;
group = config.users.users.caddy.group;
restartUnits = [ "caddy.service" ];
};
"jallen-nas/traefik/cloudflare-api-key" = {
sopsFile = (lib.snowfall.fs.get-file "secrets/nas-secrets.yaml");
sopsFile = lib.snowfall.fs.get-file "secrets/nas-secrets.yaml";
owner = config.users.users.caddy.name;
group = config.users.users.caddy.group;
restartUnits = [ "caddy.service" ];
};
"jallen-nas/traefik/cloudflare-email" = {
sopsFile = (lib.snowfall.fs.get-file "secrets/nas-secrets.yaml");
sopsFile = lib.snowfall.fs.get-file "secrets/nas-secrets.yaml";
owner = config.users.users.caddy.name;
group = config.users.users.caddy.group;
restartUnits = [ "caddy.service" ];

View File

@@ -4,7 +4,6 @@
namespace,
...
}:
with lib;
let
name = "kavita";
cfg = config.${namespace}.services.${name};
@@ -17,7 +16,7 @@ let
sops = {
secrets = {
"jallen-nas/kavita/token" = {
sopsFile = (lib.snowfall.fs.get-file "secrets/nas-secrets.yaml");
sopsFile = lib.snowfall.fs.get-file "secrets/nas-secrets.yaml";
owner = config.users.users.kavita.name;
group = config.users.users.kavita.group;
restartUnits = [ "kavita.service" ];