Skip to content

Commit

Permalink
treewide: apply statix suggestions
Browse files Browse the repository at this point in the history
vcunat's comments:
 - taken from PR #374
 - I really like these, sad not to use them for so long
 - very minimal/safe
  • Loading branch information
mweinelt authored and vcunat committed Jul 13, 2024
1 parent 39c0600 commit 0e4ddbf
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion build/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
deployment = {
targetHost = "${name}.nixos.org";
};
}) (self.nixosConfigurations);
}) self.nixosConfigurations;

# TODO: flake-utils.lib.eachDefaultSystem
devShell.x86_64-linux = let
Expand Down
2 changes: 1 addition & 1 deletion build/hydra-scaler.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
secretFile = "/root/keys/hydra-scale-equinix-metal-env";
interval = ["*:0/5"];
config = let
netboot_base = https://netboot.nixos.org/dispatch/hydra/hydra.nixos.org/equinix-metal-builders/main;
netboot_base = "https://netboot.nixos.org/dispatch/hydra/hydra.nixos.org/equinix-metal-builders/main";
in {
metro = "any";
tags = ["hydra"];
Expand Down
2 changes: 1 addition & 1 deletion channels.nix
Original file line number Diff line number Diff line change
Expand Up @@ -88,5 +88,5 @@ rec {
};
};

channels-with-urls = (builtins.mapAttrs (name: about: about.job) channels);
channels-with-urls = builtins.mapAttrs (name: about: about.job) channels;
}
4 changes: 2 additions & 2 deletions macs/nix-darwin.nix
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ in
'';

environment.etc."per-user/root/ssh/authorized_keys".text = concatStringsSep "\n"
([
[
(authorizedNixStoreKey sshKeys.hydra-queue-runner)
]);
];


system.activationScripts.postActivation.text = ''
Expand Down
4 changes: 2 additions & 2 deletions non-critical-infra/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@
outputs = { self, nixpkgs, flake-utils, colmena, disko, srvos, first-time-contribution-tagger, sops-nix, ... }@inputs:
let
importConfig = path: (lib.mapAttrs (name: value: import (path + "/${name}/default.nix")) (lib.filterAttrs (_: v: v == "directory") (builtins.readDir path)));
lib = nixpkgs.lib;
inherit (nixpkgs) lib;
in
{

nixosConfigurations = builtins.mapAttrs
(name: value: nixpkgs.lib.nixosSystem {
lib = lib;
inherit lib;
system = "x86_64-linux";
specialArgs = {
inherit inputs;
Expand Down
14 changes: 7 additions & 7 deletions non-critical-infra/modules/postfix.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@
enable = true;
domains = config.networking.fqdn;
selector = "mail";
user = config.services.postfix.user;
group = config.services.postfix.group;
inherit (config.services.postfix)
user
group
;
keyPath = "/run/opendkim-keys";
};

systemd.services.opendkim.serviceConfig = {
ExecStartPre = [
(
"+${pkgs.writeShellScript "opendkim-keys" ''
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
''}"
)
"+${pkgs.writeShellScript "opendkim-keys" ''
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
''}"
];
};

Expand Down

0 comments on commit 0e4ddbf

Please sign in to comment.