apply statix simplication
This commit is contained in:
parent
ee8f7e82b8
commit
1ac5f25092
5 changed files with 4 additions and 5 deletions
2
ci.nix
2
ci.nix
|
@ -4,7 +4,7 @@
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
self = builtins.getFlake (toString ./.);
|
self = builtins.getFlake (toString ./.);
|
||||||
nixpkgs = self.inputs.nixpkgs;
|
inherit (self.inputs) nixpkgs;
|
||||||
stripDomain = name: nixpkgs.lib.head (builtins.match "(.*).nix-community.org" name);
|
stripDomain = name: nixpkgs.lib.head (builtins.match "(.*).nix-community.org" name);
|
||||||
in
|
in
|
||||||
(nixpkgs.lib.mapAttrs' (name: config: nixpkgs.lib.nameValuePair "nixos-${stripDomain name}" config.config.system.build.toplevel) self.outputs.nixosConfigurations) //
|
(nixpkgs.lib.mapAttrs' (name: config: nixpkgs.lib.nameValuePair "nixos-${stripDomain name}" config.config.system.build.toplevel) self.outputs.nixosConfigurations) //
|
||||||
|
|
|
@ -4,7 +4,7 @@ let
|
||||||
owner = "hercules-ci-agent";
|
owner = "hercules-ci-agent";
|
||||||
sopsFile = ./secrets.yaml;
|
sopsFile = ./secrets.yaml;
|
||||||
};
|
};
|
||||||
secrets = config.sops.secrets;
|
inherit (config.sops) secrets;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
sops.secrets."binary-caches.json" = herculesSecret;
|
sops.secrets."binary-caches.json" = herculesSecret;
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
{ ... }:
|
|
||||||
{
|
{
|
||||||
# Make sure that the firewall is enabled, even if it's the default.
|
# Make sure that the firewall is enabled, even if it's the default.
|
||||||
networking.firewall.enable = true;
|
networking.firewall.enable = true;
|
||||||
|
|
|
@ -99,7 +99,7 @@ in
|
||||||
"hydra.nix-community.org" = {
|
"hydra.nix-community.org" = {
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
locations."/".proxyPass = "http://localhost:${toString (config.services.hydra.port)}";
|
locations."/".proxyPass = "http://localhost:${toString config.services.hydra.port}";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ in
|
||||||
let
|
let
|
||||||
chars = lib.stringToCharacters (builtins.substring 0 4 id);
|
chars = lib.stringToCharacters (builtins.substring 0 4 id);
|
||||||
n = builtins.map (c: lib.mod (ord c) 10) chars;
|
n = builtins.map (c: lib.mod (ord c) 10) chars;
|
||||||
s = builtins.concatStringsSep "" (builtins.map (i: builtins.toString i) n);
|
s = builtins.concatStringsSep "" (builtins.map builtins.toString n);
|
||||||
in
|
in
|
||||||
assert builtins.stringLength id >= 4;
|
assert builtins.stringLength id >= 4;
|
||||||
assert builtins.length chars == 4;
|
assert builtins.length chars == 4;
|
||||||
|
|
Loading…
Add table
Reference in a new issue