mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-03-22 23:29:08 +01:00
Compare commits
4 commits
68be114017
...
050d607cd3
| Author | SHA1 | Date | |
|---|---|---|---|
| 050d607cd3 | |||
| 0ea72891c8 | |||
| a3bae7baec | |||
| d92342ab4c |
8 changed files with 39 additions and 54 deletions
|
|
@ -7,19 +7,19 @@
|
|||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
packages =
|
||||
"${self}/scripts"
|
||||
|> lib.filesystem.listFilesRecursive
|
||||
|> lib.map (file: {
|
||||
let
|
||||
mkScript = file: rec {
|
||||
name =
|
||||
file
|
||||
|> lib.unsafeDiscardStringContext
|
||||
|> lib.removePrefix "${self}/scripts/"
|
||||
|> lib.removeSuffix ".nix"
|
||||
|> lib.replaceString "/" "-";
|
||||
value = import file { inherit self' pkgs lib; };
|
||||
})
|
||||
|> lib.listToAttrs;
|
||||
value = pkgs.writeShellApplication ({ inherit name; } // import file { inherit self' pkgs lib; });
|
||||
};
|
||||
in
|
||||
{
|
||||
packages =
|
||||
"${self}/scripts" |> lib.filesystem.listFilesRecursive |> lib.map mkScript |> lib.listToAttrs;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,18 +2,14 @@
|
|||
{
|
||||
perSystem =
|
||||
{ pkgs, lib, ... }:
|
||||
{
|
||||
checks =
|
||||
"${self}/tests"
|
||||
|> builtins.readDir
|
||||
|> lib.attrNames
|
||||
|> lib.map (name: {
|
||||
name = "${name}-test";
|
||||
let
|
||||
mkTest = dir: rec {
|
||||
name = "${dir}-test";
|
||||
value = pkgs.testers.runNixOSTest (
|
||||
{
|
||||
name = "${name}-test";
|
||||
inherit name;
|
||||
}
|
||||
// import "${self}/tests/${name}" {
|
||||
// import "${self}/tests/${dir}" {
|
||||
inherit
|
||||
inputs
|
||||
self
|
||||
|
|
@ -22,7 +18,9 @@
|
|||
;
|
||||
}
|
||||
);
|
||||
})
|
||||
|> lib.listToAttrs;
|
||||
};
|
||||
in
|
||||
{
|
||||
checks = "${self}/tests" |> builtins.readDir |> lib.attrNames |> lib.map mkTest |> lib.listToAttrs;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -70,6 +70,6 @@
|
|||
./flake-parts
|
||||
|> builtins.readDir
|
||||
|> builtins.attrNames
|
||||
|> builtins.map (name: ./flake-parts + "/${name}");
|
||||
|> builtins.map (name: ./flake-parts/${name});
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ in
|
|||
options.custom.networking.overlay = {
|
||||
networkCidr = lib.mkOption {
|
||||
type = lib.types.nonEmptyStr;
|
||||
default = "";
|
||||
default = "10.254.250.0/24";
|
||||
};
|
||||
networkAddress = lib.mkOption {
|
||||
type = lib.types.nonEmptyStr;
|
||||
|
|
@ -25,7 +25,7 @@ in
|
|||
};
|
||||
domain = lib.mkOption {
|
||||
type = lib.types.nonEmptyStr;
|
||||
default = "";
|
||||
default = "splitleaf.de";
|
||||
};
|
||||
fqdn = lib.mkOption {
|
||||
type = lib.types.nonEmptyStr;
|
||||
|
|
@ -43,11 +43,11 @@ in
|
|||
};
|
||||
interface = lib.mkOption {
|
||||
type = lib.types.nonEmptyStr;
|
||||
default = "";
|
||||
default = "nebula";
|
||||
};
|
||||
systemdUnit = lib.mkOption {
|
||||
type = lib.types.nonEmptyStr;
|
||||
default = "";
|
||||
default = "nebula@mesh.service";
|
||||
};
|
||||
|
||||
isLighthouse = lib.mkEnableOption "";
|
||||
|
|
|
|||
|
|
@ -51,13 +51,6 @@ in
|
|||
message = "`${netCfg.hostName}` is a Nebula lighthouse, but `underlay.isPublic` is not set. Lighthouses must be publicly reachable.";
|
||||
};
|
||||
|
||||
custom.networking.overlay = {
|
||||
networkCidr = "10.254.250.0/24";
|
||||
domain = "splitleaf.de";
|
||||
interface = "nebula";
|
||||
systemdUnit = "nebula@mesh.service";
|
||||
};
|
||||
|
||||
sops.secrets."nebula/host-key" = lib.mkIf (cfg.privateKeyPath == null) {
|
||||
owner = config.users.users.nebula-mesh.name;
|
||||
restartUnits = [ "nebula@mesh.service" ];
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
{ pkgs, ... }:
|
||||
pkgs.writeShellApplication {
|
||||
name = "install-anywhere";
|
||||
|
||||
{
|
||||
runtimeInputs = [
|
||||
pkgs.sops
|
||||
pkgs.ssh-to-age
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
{ self', pkgs, ... }:
|
||||
pkgs.writeShellApplication {
|
||||
name = "nebula-recert-all-hosts";
|
||||
|
||||
{
|
||||
runtimeInputs = [
|
||||
pkgs.bitwarden-cli
|
||||
pkgs.jq
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
{ pkgs, ... }:
|
||||
pkgs.writeShellApplication {
|
||||
name = "nebula-recert-host";
|
||||
|
||||
{
|
||||
runtimeInputs = [
|
||||
pkgs.nebula
|
||||
pkgs.bitwarden-cli
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue