treewide: apply statix suggestions
vcunat's comments: - taken from PR #374 - I really like these, sad not to use them for so long - very minimal/safe
Martin Weinelt committed
Jun 22, 2024 at 02:11 UTC
0e4ddbf7943699b9d61bc6eaae9b2ef536ffeb5a
6 files changed
+14
-14
build/flake.nix
+1
-1
@@ -87,7 +87,7 @@
87
deployment = {
88
targetHost = "${name}.nixos.org";
89
};
90
- }) (self.nixosConfigurations);
90
+ }) self.nixosConfigurations;
91
92
# TODO: flake-utils.lib.eachDefaultSystem
93
devShell.x86_64-linux = let
build/hydra-scaler.nix
+1
-1
@@ -8,7 +8,7 @@
8
secretFile = "/root/keys/hydra-scale-equinix-metal-env";
9
interval = ["*:0/5"];
10
config = let
11
- netboot_base = https://netboot.nixos.org/dispatch/hydra/hydra.nixos.org/equinix-metal-builders/main;
11
+ netboot_base = "https://netboot.nixos.org/dispatch/hydra/hydra.nixos.org/equinix-metal-builders/main";
12
in {
13
metro = "any";
14
tags = ["hydra"];
channels.nix
+1
-1
@@ -88,5 +88,5 @@ rec {
88
};
89
};
90
91
- channels-with-urls = (builtins.mapAttrs (name: about: about.job) channels);
91
+ channels-with-urls = builtins.mapAttrs (name: about: about.job) channels;
92
}
macs/nix-darwin.nix
+2
-2
@@ -55,9 +55,9 @@ in
55
'';
56
57
environment.etc."per-user/root/ssh/authorized_keys".text = concatStringsSep "\n"
58
- ([
58
+ [
59
(authorizedNixStoreKey sshKeys.hydra-queue-runner)
60
- ]);
60
+ ];
61
62
63
system.activationScripts.postActivation.text = ''
non-critical-infra/flake.nix
+2
-2
@@ -40,13 +40,13 @@
40
outputs = { self, nixpkgs, flake-utils, colmena, disko, srvos, first-time-contribution-tagger, sops-nix, ... }@inputs:
41
let
42
importConfig = path: (lib.mapAttrs (name: value: import (path + "/${name}/default.nix")) (lib.filterAttrs (_: v: v == "directory") (builtins.readDir path)));
43
- lib = nixpkgs.lib;
43
+ inherit (nixpkgs) lib;
44
in
45
{
46
47
nixosConfigurations = builtins.mapAttrs
48
(name: value: nixpkgs.lib.nixosSystem {
49
- lib = lib;
49
+ inherit lib;
50
system = "x86_64-linux";
51
specialArgs = {
52
inherit inputs;
non-critical-infra/modules/postfix.nix
+7
-7
@@ -10,18 +10,18 @@
10
enable = true;
11
domains = config.networking.fqdn;
12
selector = "mail";
13
- user = config.services.postfix.user;
14
- group = config.services.postfix.group;
13
+ inherit (config.services.postfix)
14
+ user
15
+ group
16
+ ;
17
keyPath = "/run/opendkim-keys";
18
};
19
20
systemd.services.opendkim.serviceConfig = {
21
ExecStartPre = [
20
- (
21
- "+${pkgs.writeShellScript "opendkim-keys" ''
22
- install -o ${config.services.postfix.user} -g ${config.services.postfix.group} -D -m0700 ${config.sops.secrets.opendkim-private-key.path} /run/opendkim-keys/${config.services.opendkim.selector}.private
23
- ''}"
24
- )
22
+ "+${pkgs.writeShellScript "opendkim-keys" ''
23
+ install -o ${config.services.postfix.user} -g ${config.services.postfix.group} -D -m0700 ${config.sops.secrets.opendkim-private-key.path} /run/opendkim-keys/${config.services.opendkim.selector}.private
24
+ ''}"
25
];
26
};
27