Compare commits

...

4 commits

Author SHA1 Message Date
fbbe4ebe3c flake: checks: enable 'nixf-diagnose'
Some checks failed
ci/woodpecker/push/check Pipeline failed
2026-02-10 14:53:50 +00:00
5414f4c38d nixos: services: servarr: remove redundant 'lib'
My personal style preference (currently) is to use `with lib` on option
declarations, avoiding the `lib` prefix.
2026-02-10 14:53:50 +00:00
184a6a13cc treewide: remove redundant 'builtins'
I keep forgetting `map` and `removeAttrs` are included at the top-level
in the prelude.
2026-02-10 14:53:50 +00:00
6c35c04c1f treewide: remove unused 'with pkgs' 2026-02-10 14:53:50 +00:00
17 changed files with 22 additions and 18 deletions

View file

@ -15,6 +15,10 @@
enable = true;
};
nixf-diagnose = {
enable = true;
};
nixpkgs-fmt = {
enable = true;
};

View file

@ -10,7 +10,7 @@ in
};
config = lib.mkIf cfg.enable {
home.packages = with pkgs; [
home.packages = [
cfg.package
];
};

View file

@ -17,7 +17,7 @@ in
config = lib.mkIf cfg.enable (lib.mkMerge [
{
home.packages = with pkgs; [
home.packages = [
cfg.package
];

View file

@ -11,7 +11,7 @@ let
lib.mkDefault [ (lib.getExe pkgs.ambroisie.rbw-pass) "Mail" passName ];
address = mkMailAddress address domain;
aliases = builtins.map (lib.flip mkMailAddress domain) aliases;
aliases = map (lib.flip mkMailAddress domain) aliases;
inherit primary;

View file

@ -10,7 +10,7 @@ in
};
config = lib.mkIf cfg.enable {
home.packages = with pkgs; [
home.packages = [
cfg.package
];
};

View file

@ -69,7 +69,7 @@ in
inactive_state = "Idle";
};
in
builtins.map (block: defaults // block) cfg.vpn.blockConfigs
map (block: defaults // block) cfg.vpn.blockConfigs
)
)
{

View file

@ -23,7 +23,7 @@ in
enable = true;
};
environment.systemPackages = builtins.map lib.hiPrio [
environment.systemPackages = map lib.hiPrio [
# Respect XDG conventions, leave my HOME alone
(pkgs.writeShellScriptBin "steam" ''
mkdir -p "${cfg.dataDir}"

View file

@ -96,7 +96,7 @@ in
# Contains the UID/GID map, and other useful state
"/var/lib/nixos"
# SSH host keys (and public keys for convenience)
(builtins.map (key: [ key.path "${key.path}.pub" ]) config.services.openssh.hostKeys)
(map (key: [ key.path "${key.path}.pub" ]) config.services.openssh.hostKeys)
];
services.restic.backups.backblaze = {

View file

@ -188,14 +188,14 @@ in
++ (lib.flip lib.mapAttrsToList cfg.virtualHosts (_: { subdomain, ... } @ args:
let
conflicts = [ "port" "root" "socket" "redirect" ];
optionsNotNull = builtins.map (v: args.${v} != null) conflicts;
optionsNotNull = map (v: args.${v} != null) conflicts;
optionsSet = lib.filter lib.id optionsNotNull;
in
{
assertion = builtins.length optionsSet == 1;
message = ''
Subdomain '${subdomain}' must have exactly one of ${
lib.concatStringsSep ", " (builtins.map (v: "'${v}'") conflicts)
lib.concatStringsSep ", " (map (v: "'${v}'") conflicts)
} configured.
'';
}))
@ -208,7 +208,7 @@ in
assertion = args.websocketsLocations != [ ] -> proxyPassUsed;
message = ''
Subdomain '${subdomain}' can only use 'websocketsLocations' with one of ${
lib.concatStringsSep ", " (builtins.map (v: "'${v}'") proxyPass)
lib.concatStringsSep ", " (map (v: "'${v}'") proxyPass)
}.
'';
}))

View file

@ -4,7 +4,7 @@ let
in
{
options.my.services.servarr.bazarr = with lib; {
enable = lib.mkEnableOption "Bazarr" // {
enable = mkEnableOption "Bazarr" // {
default = config.my.services.servarr.enableAll;
};

View file

@ -4,7 +4,7 @@ let
in
{
options.my.services.servarr.jackett = with lib; {
enable = lib.mkEnableOption "Jackett" // {
enable = mkEnableOption "Jackett" // {
default = config.my.services.servarr.enableAll;
};

View file

@ -4,7 +4,7 @@ let
in
{
options.my.services.servarr.nzbhydra = with lib; {
enable = lib.mkEnableOption "NZBHydra2" // {
enable = mkEnableOption "NZBHydra2" // {
default = config.my.services.servarr.enableAll;
};
};

View file

@ -5,7 +5,7 @@ let
in
{
options.my.services.servarr.prowlarr = with lib; {
enable = lib.mkEnableOption "Prowlarr" // {
enable = mkEnableOption "Prowlarr" // {
default = config.my.services.servarr.enableAll;
};

View file

@ -12,7 +12,7 @@ let
in
{
options.my.services.servarr.${starr} = with lib; {
enable = lib.mkEnableOption (lib.toSentenceCase starr) // {
enable = mkEnableOption (lib.toSentenceCase starr) // {
default = config.my.services.servarr.enableAll;
};

View file

@ -1,6 +1,6 @@
# Automatically import all overlays in the directory
let
files = builtins.readDir ./.;
overlays = builtins.removeAttrs files [ "default.nix" ];
overlays = removeAttrs files [ "default.nix" ];
in
builtins.mapAttrs (name: _: import "${./.}/${name}") overlays

View file

@ -95,7 +95,7 @@
self.packages.${system}.project
];
packages = with pkgs; [
packages = [
self.checks.${system}.pre-commit.enabledPackages
];

View file

@ -95,7 +95,7 @@
self.packages.${system}.project
];
packages = with pkgs; [
packages = [
self.checks.${system}.pre-commit.enabledPackages
];