Compare commits

...

5 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
89db8883e9 flake: bump inputs 2026-02-10 14:53:50 +00:00
18 changed files with 40 additions and 36 deletions

36
flake.lock generated
View file

@ -14,11 +14,11 @@
]
},
"locked": {
"lastModified": 1762618334,
"narHash": "sha256-wyT7Pl6tMFbFrs8Lk/TlEs81N6L+VSybPfiIgzU8lbQ=",
"lastModified": 1770165109,
"narHash": "sha256-9VnK6Oqai65puVJ4WYtCTvlJeXxMzAp/69HhQuTdl/I=",
"owner": "ryantm",
"repo": "agenix",
"rev": "fcdea223397448d35d9b31f798479227e80183f6",
"rev": "b027ee29d959fda4b60b57566d64c98a202e0feb",
"type": "github"
},
"original": {
@ -73,11 +73,11 @@
]
},
"locked": {
"lastModified": 1768135262,
"narHash": "sha256-PVvu7OqHBGWN16zSi6tEmPwwHQ4rLPU9Plvs8/1TUBY=",
"lastModified": 1769996383,
"narHash": "sha256-AnYjnFWgS49RlqX7LrC4uA+sCCDBj0Ry/WOJ5XWAsa0=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "80daad04eddbbf5a4d883996a73f3f542fa437ac",
"rev": "57928607ea566b5db3ad13af0e57e921e6b12381",
"type": "github"
},
"original": {
@ -117,11 +117,11 @@
]
},
"locked": {
"lastModified": 1769069492,
"narHash": "sha256-Efs3VUPelRduf3PpfPP2ovEB4CXT7vHf8W+xc49RL/U=",
"lastModified": 1770726378,
"narHash": "sha256-kck+vIbGOaM/dHea7aTBxdFYpeUl/jHOy5W3eyRvVx8=",
"owner": "cachix",
"repo": "git-hooks.nix",
"rev": "a1ef738813b15cf8ec759bdff5761b027e3e1d23",
"rev": "5eaaedde414f6eb1aea8b8525c466dc37bba95ae",
"type": "github"
},
"original": {
@ -159,11 +159,11 @@
]
},
"locked": {
"lastModified": 1769442288,
"narHash": "sha256-p+Xqr+P22TYW2RqbwccSd4UlUDEwl7PnoW3qiH8wVoE=",
"lastModified": 1770654520,
"narHash": "sha256-mg5WZMIPGsFu9MxSrUcuJUPMbfMsF77el5yb/7rc10k=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "384786dc70c4992643f916c7e57f378714fec4f1",
"rev": "6c4fdbe1ad198fac36c320fd45c5957324a80b8e",
"type": "github"
},
"original": {
@ -175,11 +175,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1769170682,
"narHash": "sha256-oMmN1lVQU0F0W2k6OI3bgdzp2YOHWYUAw79qzDSjenU=",
"lastModified": 1770562336,
"narHash": "sha256-ub1gpAONMFsT/GU2hV6ZWJjur8rJ6kKxdm9IlCT0j84=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "c5296fdd05cfa2c187990dd909864da9658df755",
"rev": "d6c71932130818840fc8fe9509cf50be8c64634f",
"type": "github"
},
"original": {
@ -199,11 +199,11 @@
]
},
"locked": {
"lastModified": 1769444957,
"narHash": "sha256-2VIGLo/Xj7v+ZZqR/k2uoaZ75vpYB1FLa2UAW5ZhIK8=",
"lastModified": 1770732881,
"narHash": "sha256-yGkibRit67Pz1uo1Kk55kZBHQq90K3gc0N762JGW/uQ=",
"owner": "nix-community",
"repo": "NUR",
"rev": "9183819b926f1f58e8af86e86f28cc7d1e87698f",
"rev": "06490c1287ab62a8c5075c440fd3e247913bc29c",
"type": "github"
},
"original": {

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