Skip to content

Commit d67bdee

Browse files
authored
Check with statix (#150)
* Ignore repeated keys * Run `statix fix`
1 parent b0b5a8c commit d67bdee

8 files changed

Lines changed: 16 additions & 13 deletions

File tree

‎hosts/glyph/services/torrents.nix‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@
88
file = ./../secrets/pushover-user-token.age;
99
mode = "550";
1010
owner = config.services.transmission.user;
11-
group = config.services.transmission.group;
11+
inherit (config.services.transmission) group;
1212
};
1313
age.secrets.pushover-app-token = {
1414
file = ./../secrets/pushover-app-token.age;
1515
mode = "550";
1616
owner = config.services.transmission.user;
17-
group = config.services.transmission.group;
17+
inherit (config.services.transmission) group;
1818
};
1919
services.transmission = {
2020
enable = true;

‎hosts/spore/services/default.nix‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@
1515
file = ../secrets/tailscale-auth-key.age;
1616
mode = "440";
1717
owner = config.services.golink.user;
18-
group = config.services.golink.group;
18+
inherit (config.services.golink) group;
1919
};
2020

2121
services.glances = {
22-
enable = config.services.homepage-dashboard.enable;
22+
inherit (config.services.homepage-dashboard) enable;
2323
};
2424

2525
services.golink = {

‎hosts/spore/services/web/auth.nix‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
file = ./../../secrets/pocket-id-encryption-key.age;
1414
mode = "440";
1515
owner = config.services.pocket-id.user;
16-
group = config.services.pocket-id.group;
16+
inherit (config.services.pocket-id) group;
1717
};
1818

1919
rc.web.auth = {

‎hosts/zeta/services/znc.nix‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
age.secrets.znc-conf = {
77
file = ./../secrets/znc-conf.age;
88
owner = config.services.znc.user;
9-
group = config.services.znc.group;
9+
inherit (config.services.znc) group;
1010
};
1111
services.znc = {
1212
enable = true;

‎modules/darwin/programs/fastscripts.nix‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ with lib; let
2626
fi
2727
'';
2828
userScripts = filter (f: f.enable) (attrValues config.programs.fastscripts.userScripts);
29-
plistFile = config.programs.fastscripts.plistFile;
29+
inherit (config.programs.fastscripts) plistFile;
3030
in {
3131
options.programs.fastscripts = {
3232
enable = mkEnableOption "FastScripts";

‎modules/home/rustmission.nix‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ in {
1818

1919
# TODO: Require settings.connection.url to be set
2020
settings = mkOption {
21-
type = tomlFormat.type;
21+
inherit (tomlFormat) type;
2222
default = {};
2323
example = lib.literalExpression ''
2424
{

‎modules/nixos/web/auth.nix‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -150,10 +150,10 @@ in {
150150
enable = true;
151151
provider = "oidc";
152152
oidcIssuerUrl = "https://${cfg.issuer.host}";
153-
keyFile = cfg.authProxy.keyFile;
153+
inherit (cfg.authProxy) keyFile;
154154
reverseProxy = true;
155155
setXauthrequest = true;
156-
clientID = cfg.authProxy.clientID;
156+
inherit (cfg.authProxy) clientID;
157157
redirectURL = "https://${cfg.authProxy.host}/oauth2/callback";
158158
nginx.domain = cfg.authProxy.host;
159159
cookie.domain = cfg.authProxy.domain;
@@ -171,7 +171,7 @@ in {
171171

172172
virtualHosts.${cfg.issuer.host} = {
173173
forceSSL = true;
174-
useACMEHost = cfg.issuer.useACMEHost;
174+
inherit (cfg.issuer) useACMEHost;
175175
locations."/" = {
176176
proxyPass = "http://127.0.0.1:1411";
177177
proxyWebsockets = true;
@@ -180,7 +180,7 @@ in {
180180

181181
virtualHosts.${cfg.authProxy.host} = {
182182
forceSSL = true;
183-
useACMEHost = cfg.authProxy.useACMEHost;
183+
inherit (cfg.authProxy) useACMEHost;
184184
locations."/oauth2/" = {
185185
proxyPass = "http://127.0.0.1:4180";
186186
extraConfig = ''
@@ -206,7 +206,7 @@ in {
206206
})
207207
(let
208208
vhosts = config.services.nginx.virtualHosts;
209-
vhostsRequiringAuth = mapNames (lib.filter (set: set.value.requireAuth == true) (lib.attrsToList vhosts));
209+
vhostsRequiringAuth = mapNames (lib.filter (set: set.value.requireAuth) (lib.attrsToList vhosts));
210210
mapNames = e: toString (lib.map (set: set.name) e);
211211
in
212212
mkIf (!cfg.enable && vhostsRequiringAuth != "") {

‎statix.toml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
disabled = [
2+
"repeated_keys"
3+
]

0 commit comments

Comments
 (0)