nix-config/flake.nix

606 lines
20 KiB
Nix
Raw Normal View History

{
description = "C3D2 NixOS configurations";
2020-06-11 07:50:42 +02:00
inputs = {
2022-05-24 15:05:18 +02:00
nixpkgs.url = "github:nixos/nixpkgs/release-22.05";
nixpkgs-mobilizon.url = "github:minijackson/nixpkgs/mobilizon";
nixpkgs-openwebrx.url = "github:astro/nixpkgs/openwebrx";
2022-04-17 22:45:05 +02:00
nixpkgs-master.url = "github:nixos/nixpkgs";
secrets = {
url = "git+ssh://gitea@gitea.c3d2.de/c3d2-admins/secrets.git";
inputs = {
nixpkgs.follows = "nixpkgs";
sops-nix.follows = "sops-nix";
};
};
2021-10-07 20:19:48 +02:00
nixos-hardware.url = "github:nixos/nixos-hardware";
2022-04-17 22:45:05 +02:00
zentralwerk = {
url = "git+https://gitea.c3d2.de/zentralwerk/network.git";
inputs = {
nixpkgs.follows = "nixpkgs";
nixpkgs-master.follows = "nixpkgs-master";
};
};
2021-03-06 01:13:27 +01:00
yammat.url = "git+https://gitea.c3d2.de/astro/yammat.git?ref=nix";
yammat.inputs.nixpkgs.follows = "nixpkgs";
scrapers.url = "git+https://gitea.c3d2.de/astro/scrapers.git";
scrapers.flake = false;
2021-09-10 00:21:38 +02:00
spacemsg.url = "github:astro/spacemsg";
spacemsg.flake = false;
2021-03-22 16:22:57 +01:00
tigger.url = "github:astro/tigger";
tigger.flake = false;
2022-04-24 21:56:45 +02:00
ticker = {
url = "git+https://gitea.c3d2.de/astro/ticker.git";
inputs.nixpkgs.follows = "nixpkgs";
};
2022-04-17 22:45:05 +02:00
heliwatch = {
url = "git+https://gitea.c3d2.de/astro/heliwatch.git";
inputs = {
fenix.follows = "fenix";
nixpkgs.follows = "nixpkgs";
naersk.follows = "naersk";
};
};
sops-nix = {
url = "github:Mic92/sops-nix";
inputs = {
nixpkgs.follows = "nixpkgs";
};
};
2022-04-24 21:56:45 +02:00
naersk.url = "github:nix-community/naersk";
naersk.inputs.nixpkgs.follows = "nixpkgs";
2022-05-06 23:50:52 +02:00
fenix.url = "github:nix-community/fenix";
fenix.inputs.nixpkgs.follows = "nixpkgs";
2022-05-12 02:58:47 +02:00
hydra = {
url = "github:nixos/hydra";
inputs.nixpkgs.follows = "nixpkgs";
};
2022-05-15 02:46:14 +02:00
microvm.url = "github:astro/microvm.nix";
2020-06-11 07:50:42 +02:00
};
2020-04-15 19:00:56 +02:00
2022-05-15 02:46:14 +02:00
outputs = inputs@{ self, nixpkgs, secrets, nixos-hardware, zentralwerk, yammat, scrapers, spacemsg, tigger, ticker, heliwatch, sops-nix, naersk, fenix, microvm, ... }:
2021-02-22 12:31:58 +01:00
let
2022-01-13 18:38:36 +01:00
inherit (nixpkgs) lib;
forAllSystems = lib.genAttrs [ "aarch64-linux" "x86_64-linux" ];
2021-02-24 11:52:19 +01:00
extractZwHosts = { hosts4, hosts6, ... }:
2022-01-13 18:38:36 +01:00
lib.recursiveUpdate (
builtins.foldl' (result: name:
2022-01-13 18:38:36 +01:00
lib.recursiveUpdate result {
2021-10-31 19:00:03 +01:00
"${name}".ip4 = hosts4."${name}";
}
) {} (builtins.attrNames hosts4)
) (
builtins.foldl' (result: ctx:
builtins.foldl' (result: name:
2022-01-13 18:38:36 +01:00
lib.recursiveUpdate result {
2021-10-31 19:00:03 +01:00
"${name}".ip6 = hosts6."${ctx}"."${name}";
}
2021-10-31 19:00:03 +01:00
) result (builtins.attrNames hosts6."${ctx}")
) {} (builtins.attrNames hosts6)
);
zwHostRegistry = {
hosts =
builtins.foldl' (result: net:
2022-01-13 18:38:36 +01:00
lib.recursiveUpdate result (extractZwHosts zentralwerk.lib.config.site.net."${net}")
) {} [ "core" "c3d2" "serv" ];
};
2022-01-16 13:26:37 +01:00
extraHostRegistry.hosts = import ./host-registry.nix;
2022-01-13 18:38:36 +01:00
hostRegistry = lib.recursiveUpdate zwHostRegistry extraHostRegistry;
getHostAddr = name:
let
2021-10-31 19:00:03 +01:00
hostConf = hostRegistry.hosts."${name}";
in
if hostConf ? ip4
then hostConf.ip4
else if hostConf ? ip6
then hostConf.ip6
else throw "Host ${name} has no ip4 or ip6 address";
in {
2022-01-13 18:38:36 +01:00
overlay = import ./overlay;
2021-02-26 20:22:15 +01:00
2022-01-13 18:38:36 +01:00
legacyPackages = lib.attrsets.mapAttrs
(system: pkgs: pkgs.appendOverlays
[ fenix.overlay naersk.overlay self.overlay ])
nixpkgs.legacyPackages;
2022-01-13 18:38:36 +01:00
packages = lib.attrsets.mapAttrs (system: pkgs:
let overlayPkgs = builtins.intersectAttrs (self.overlay {} {}) pkgs;
in overlayPkgs //
{
2021-02-26 20:22:15 +01:00
2021-09-08 00:34:38 +02:00
list-upgradable = pkgs.writeScriptBin "list-upgradable" ''
#! ${pkgs.runtimeShell}
NORMAL="\033[0m"
RED="\033[0;31m"
YELLOW="\033[0;33m"
GREEN="\033[0;32m"
${pkgs.lib.concatMapStringsSep "\n" (name:
let
addr = getHostAddr name;
in nixpkgs.lib.optionalString (addr != null) ''
echo -n -e "${name}: $RED"
RUNNING=$(ssh -o PreferredAuthentications=publickey -o StrictHostKeyChecking=accept-new root@"${addr}" "readlink /run/current-system")
if [ $? = 0 ] && [ -n "$RUNNING" ]; then
2021-09-08 00:34:38 +02:00
CURRENT=$(nix eval --raw ".#nixosConfigurations.${name}.config.system.build.toplevel" 2>/dev/null)
RUNNING_VER=$(basename $RUNNING|rev|cut -d - -f 1|rev)
RUNNING_DATE=$(echo $RUNNING_VER|cut -d . -f 3)
CURRENT_VER=$(basename $CURRENT|rev|cut -d - -f 1|rev)
CURRENT_DATE=$(echo $CURRENT_VER|cut -d . -f 3)
2021-09-08 00:34:38 +02:00
if [ "$RUNNING" = "$CURRENT" ]; then
echo -e "$GREEN"current"$NORMAL $RUNNING_VER"
elif [ $RUNNING_DATE -gt $CURRENT_DATE ]; then
echo -e "$GREEN"newer"$NORMAL $RUNNING_VER > $CURRENT_VER"
elif [ "$RUNNING_VER" = "$CURRENT_VER" ]; then
echo -e "$YELLOW"modified"$NORMAL $RUNNING_VER"
elif [ -n "$RUNNING_VER" ]; then
echo -e "$RED"outdated"$NORMAL $RUNNING_VER < $CURRENT_VER"
else
echo -e "$RED"error"$NORMAL $RUNNING_VER"
2021-09-08 00:34:38 +02:00
fi
fi
echo -n -e "$NORMAL"
2022-01-20 03:12:37 +01:00
'') (builtins.attrNames self.nixosConfigurations)}
2021-09-08 00:34:38 +02:00
'';
2021-10-18 22:26:38 +02:00
prebuild-all = pkgs.runCommandNoCC "prebuild-all" {
preferLocalBuild = true;
} ''
mkdir $out
${pkgs.lib.concatMapStrings (name: ''
2021-10-31 19:00:03 +01:00
ln -s ${self.nixosConfigurations."${name}".config.system.build.toplevel} name
2022-01-20 03:12:37 +01:00
'') (builtins.attrNames self.nixosConfigurations)}
2021-10-18 22:26:38 +02:00
'';
2021-11-10 00:33:42 +01:00
prebuild-all-remote = pkgs.writeScriptBin "prebuild-all" ''
#!${pkgs.runtimeShell} -e
nix copy --to ssh://$1 ${secrets}
nix copy --to ssh://$1 ${self}
set -x
ssh $1 -- nix build -vL --no-link ${
pkgs.lib.concatMapStringsSep " " (name:
"${self}#nixosConfigurations.${name}.config.system.build.toplevel"
2022-01-20 03:12:37 +01:00
) (builtins.attrNames self.nixosConfigurations)
2021-11-10 00:33:42 +01:00
}
'';
} //
builtins.foldl' (result: host: result // {
2021-09-29 23:26:05 +02:00
# TODO: check if the ethernet address is reachable and if not,
# execute wol on a machine in HQ.
"${host}-wake" = pkgs.writeScriptBin "${host}-wake" ''
#!${pkgs.runtimeShell}
2021-10-31 19:00:03 +01:00
exec ${pkgs.wol}/bin/wol ${hostRegistry.hosts."${host}".ether}
2021-09-29 23:26:05 +02:00
'';
}) {} (builtins.attrNames (nixpkgs.lib.filterAttrs (_: { wol ? false, ... }: wol) hostRegistry.hosts)) //
2021-09-29 23:26:05 +02:00
builtins.foldl' (result: name:
let
host = getHostAddr name;
2021-09-29 23:26:05 +02:00
target = ''root@"${host}"'';
rebuildArg = "--flake ${self}#${name}";
2021-10-31 19:00:03 +01:00
profile = self.nixosConfigurations."${name}".config.system.build.toplevel;
2021-09-29 23:26:05 +02:00
in result // {
# Generate a small script for copying this flake to the
# remote machine and bulding and switching there.
# Can be run with `nix run c3d2#…-nixos-rebuild switch`
"${name}-nixos-rebuild" = pkgs.writeScriptBin "${name}-nixos-rebuild" ''
2021-10-31 12:49:09 +01:00
#!${pkgs.runtimeShell} -ex
[[ $(ssh ${target} cat /etc/hostname) == ${name} ]]
nix copy --to ssh://${target} ${secrets}
nix copy --to ssh://${target} ${self}
ssh ${target} nixos-rebuild ${rebuildArg} "$@"
2021-09-08 22:48:13 +02:00
'';
2021-09-29 23:26:05 +02:00
2021-09-30 20:54:02 +02:00
"${name}-nixos-rebuild-local" = pkgs.writeScriptBin "${name}-nixos-rebuild" ''
2021-10-31 12:49:09 +01:00
#!${pkgs.runtimeShell} -ex
[[ $(ssh ${target} cat /etc/hostname) == ${name} ]]
nix copy --to ssh://${target} ${profile}
ssh ${target} "${profile}/bin/switch-to-configuration $*"
'';
2021-09-29 23:26:05 +02:00
2021-09-30 20:54:02 +02:00
"${name}-cleanup" = pkgs.writeScriptBin "${name}-cleanup" ''
2021-10-31 12:49:09 +01:00
#!${pkgs.runtimeShell} -ex
ssh ${target} "time nix-collect-garbage -d && time nix-store --optimise"
'';
2022-01-20 03:12:37 +01:00
}) {} (builtins.attrNames self.nixosConfigurations) //
2021-09-23 19:34:09 +02:00
builtins.foldl' (result: host:
let
inherit (self.nixosConfigurations.${host}) config;
in
result //
nixpkgs.lib.optionalAttrs (config.system.build ? sdImage) {
"${host}-sdImage" = config.system.build.sdImage;
} //
2022-05-24 17:02:12 +02:00
nixpkgs.lib.optionalAttrs (config.system.build ? vm) {
# boot any machine in a microvm
"${host}-vm" = (self.nixosConfigurations.${host}
.extendModules {
modules = [
microvm.nixosModules.microvm
{
microvm = {
mem = 2048;
hypervisor = "qemu";
socket = null;
shares = [ {
tag = "ro-store";
source = "/nix/store";
mountPoint = "/nix/.ro-store";
} ];
};
boot.isContainer = lib.mkForce false;
users.users.root.password = "";
2022-05-24 17:02:12 +02:00
fileSystems."/".fsType = lib.mkForce "tmpfs";
services.getty.helpLine = ''
Log in as "root" with an empty password.
Use "reboot" to shut qemu down.
'';
2022-05-24 17:02:12 +02:00
}
];
})
.config.microvm.declaredRunner;
} //
nixpkgs.lib.optionalAttrs (config.system.build ? tftproot) {
"${host}-tftproot" = config.system.build.tftproot;
}
) {} (builtins.attrNames self.nixosConfigurations)
2022-01-13 18:38:36 +01:00
) self.legacyPackages;
2020-08-04 17:15:07 +02:00
2021-02-22 12:31:58 +01:00
nixosConfigurations = let
nixosSystem' =
# Our custom NixOS builder
2022-01-13 18:38:36 +01:00
{ nixpkgs ? inputs.nixpkgs, modules, extraArgs ? {}, system ? "x86_64-linux" }:
nixpkgs.lib.nixosSystem {
inherit system;
modules = [
2021-02-22 12:31:58 +01:00
({ pkgs, ... }: {
_module.args = extraArgs // {
inherit hostRegistry inputs zentralwerk;
};
2022-03-29 00:01:14 +02:00
nixpkgs = {
overlays = [ self.overlay ];
};
2021-02-22 12:31:58 +01:00
})
self.nixosModules.c3d2
./config/audio-server
./config/c3d2.nix
./config/cache.nix
./config/ceph-storage.nix
./config/stats.nix
./modules/pi-sensors.nix
] ++ modules;
};
2021-02-22 12:31:58 +01:00
in {
2020-08-04 17:15:07 +02:00
2021-02-26 20:22:15 +01:00
freifunk = nixosSystem' {
2021-03-05 01:16:57 +01:00
modules = [
./hosts/containers/freifunk
2022-01-13 18:38:36 +01:00
{
2021-03-05 01:16:57 +01:00
nixpkgs.overlays = with secrets.overlays; [
freifunk ospf
];
sops.defaultSopsFile = "${secrets}/hosts/freifunk/secrets.yaml";
2022-01-13 18:38:36 +01:00
}
2021-03-05 01:16:57 +01:00
];
2021-02-26 20:22:15 +01:00
};
2021-10-02 20:28:30 +02:00
gitea = nixosSystem' {
2022-04-17 22:45:05 +02:00
nixpkgs = inputs.nixpkgs-master;
2021-10-02 20:28:30 +02:00
modules = [
./config/lxc-container.nix
2021-10-02 20:28:30 +02:00
./hosts/containers/gitea
];
};
2021-02-22 13:21:31 +01:00
glotzbert = nixosSystem' {
modules = [
./hosts/glotzbert
nixos-hardware.nixosModules.common-cpu-intel
nixos-hardware.nixosModules.common-pc-ssd
2021-03-12 17:06:37 +01:00
secrets.nixosModules.admins
{
sops.defaultSopsFile = "${secrets}/hosts/glotzbert/secrets.yaml";
}
];
2021-02-22 13:21:31 +01:00
};
nix-build = nixosSystem' {
modules = [
./hosts/containers/nix-build
];
2022-03-16 23:16:02 +01:00
extraArgs.tftproots = nixpkgs.lib.filterAttrs (name: _:
builtins.match ".+-tftproot" name != null
) self.packages.x86_64-linux;
};
2021-02-22 13:21:31 +01:00
pulsebert = nixosSystem' {
2021-09-23 19:34:09 +02:00
modules = [
"${inputs.nixpkgs}/nixos/modules/installer/sd-card/sd-image-aarch64.nix"
./hosts/pulsebert
];
2021-02-22 13:21:31 +01:00
system = "aarch64-linux";
};
2020-08-04 17:15:07 +02:00
2021-09-23 03:32:17 +02:00
radiobert = nixosSystem' {
modules = [
2022-01-13 18:38:36 +01:00
({ modulesPath, ... }:
{
2022-01-13 18:38:36 +01:00
imports = [ "${modulesPath}/installer/sd-card/sd-image-aarch64.nix" ];
nixpkgs.overlays = [ heliwatch.overlay ];
sops.defaultSopsFile = "${secrets}/hosts/radiobert/secrets.yaml";
2022-01-13 18:38:36 +01:00
})
2021-09-23 03:32:17 +02:00
./hosts/radiobert
];
system = "aarch64-linux";
};
2022-01-15 11:28:23 +01:00
nncp = nixosSystem' {
2022-04-17 22:45:05 +02:00
nixpkgs = inputs.nixpkgs-master;
2022-01-15 11:28:23 +01:00
modules = [
self.nixosModules.nncp
./config/lxc-container.nix
./hosts/containers/nncp
];
};
2021-09-27 22:19:24 +02:00
dacbert = nixosSystem' {
modules = [
2021-10-07 20:19:48 +02:00
nixos-hardware.nixosModules.raspberry-pi-4
2022-03-16 23:16:02 +01:00
self.nixosModules.rpi-netboot
2021-09-27 22:19:24 +02:00
./hosts/dacbert
];
system = "aarch64-linux";
};
2022-03-13 23:49:12 +01:00
rpi-netboot = nixosSystem' {
extraArgs = { inherit nixpkgs; };
modules = [
nixos-hardware.nixosModules.raspberry-pi-4
self.nixosModules.rpi-netboot
2022-03-13 23:49:12 +01:00
./hosts/rpi-netboot
];
system = "aarch64-linux";
};
2021-03-06 01:13:27 +01:00
matemat = nixosSystem' {
modules = [
./config/lxc-container.nix
2021-03-06 01:13:27 +01:00
./hosts/containers/matemat
2021-03-10 01:54:28 +01:00
yammat.nixosModule
secrets.nixosModules.admins
2022-01-13 20:20:48 +01:00
{ nixpkgs.overlays = [ secrets.overlays.matemat ]; }
2021-03-06 01:13:27 +01:00
];
};
2021-03-06 02:57:35 +01:00
scrape = nixosSystem' {
modules = [
./config/lxc-container.nix
2021-03-06 02:57:35 +01:00
./hosts/containers/scrape
2022-01-13 18:38:36 +01:00
{ nixpkgs.overlays = [ secrets.overlays.scrape ]; }
2021-03-06 02:57:35 +01:00
];
extraArgs = { inherit scrapers; };
2021-03-06 02:57:35 +01:00
};
2021-03-11 15:59:00 +01:00
dn42 = nixosSystem' {
modules = [
./config/lxc-container.nix
2021-03-11 15:59:00 +01:00
./hosts/containers/dn42
{
2021-03-11 15:59:00 +01:00
nixpkgs.overlays = [ secrets.overlays.dn42 ];
2022-01-06 23:30:33 +01:00
sops.defaultSopsFile = "${secrets}/hosts/dn42/secrets.yaml";
}
2021-03-11 15:59:00 +01:00
];
};
2021-03-11 16:40:39 +01:00
grafana = nixosSystem' {
modules = [
./config/lxc-container.nix
2021-03-11 16:40:39 +01:00
./hosts/containers/grafana
];
};
2021-03-12 21:45:12 +01:00
hydra = nixosSystem' {
modules = [
2022-05-12 02:58:47 +02:00
inputs.hydra.nixosModules.hydra
2022-05-05 22:34:51 +02:00
./hosts/hydra
{
sops.defaultSopsFile = "${secrets}/hosts/hydra/secrets.yaml";
}
2021-03-12 21:45:12 +01:00
];
};
2021-03-22 16:22:57 +01:00
mucbot = nixosSystem' {
modules = [
./config/lxc-container.nix
2021-03-22 16:22:57 +01:00
"${tigger}/module.nix"
{ nixpkgs.overlays = [ secrets.overlays.mucbot ]; }
./hosts/containers/mucbot
];
extraArgs = { inherit tigger; };
};
2021-05-10 00:28:27 +02:00
kibana = nixosSystem' {
modules = [
./config/lxc-container.nix
2021-05-10 00:28:27 +02:00
./hosts/containers/kibana
];
};
2021-06-23 21:59:10 +02:00
public-access-proxy = nixosSystem' {
modules = [
./config/lxc-container.nix
2021-06-23 21:59:10 +02:00
./hosts/containers/public-access-proxy
];
extraArgs = {
inherit (self) nixosConfigurations;
};
2021-06-23 21:59:10 +02:00
};
2021-09-08 01:22:40 +02:00
ticker = nixosSystem' {
modules = [
./config/lxc-container.nix
2021-09-08 01:22:40 +02:00
"${ticker}/nixos-module.nix"
./hosts/containers/ticker
];
};
2021-09-10 00:21:38 +02:00
spaceapi = nixosSystem' {
modules = [
./config/lxc-container.nix
2021-09-10 00:21:38 +02:00
"${spacemsg}/spaceapi/module.nix"
./hosts/containers/spaceapi
];
};
2021-09-10 22:59:40 +02:00
stream = nixosSystem' {
modules = [
./config/lxc-container.nix
2021-09-10 22:59:40 +02:00
./hosts/containers/stream
];
};
mobilizon = nixosSystem' {
# TODO: pending https://github.com/NixOS/nixpkgs/pull/119132
nixpkgs = inputs.nixpkgs-mobilizon;
modules = [
./config/lxc-container.nix
./hosts/containers/mobilizon
];
};
2021-10-02 00:46:59 +02:00
mail = nixosSystem' {
modules = [
./config/lxc-container.nix
2021-10-02 00:46:59 +02:00
./hosts/containers/mail
];
};
2021-10-05 00:12:02 +02:00
logging = nixosSystem' {
modules = [
./config/lxc-container.nix
2021-10-05 00:12:02 +02:00
./hosts/containers/logging
];
};
2021-10-05 12:53:16 +02:00
keycloak = nixosSystem' {
modules = [
./config/lxc-container.nix
2021-10-05 12:53:16 +02:00
./hosts/containers/keycloak
2022-01-13 18:38:36 +01:00
{ nixpkgs.overlays = with secrets.overlays; [ keycloak ]; }
2021-10-05 12:53:16 +02:00
];
};
2021-10-06 02:55:30 +02:00
c3d2-web = nixosSystem' {
2022-04-17 22:45:05 +02:00
nixpkgs = inputs.nixpkgs-master;
2021-10-06 02:55:30 +02:00
modules = [
./config/lxc-container.nix
2021-10-06 02:55:30 +02:00
./hosts/containers/c3d2-web
2022-01-13 18:38:36 +01:00
{ nixpkgs.overlays = [ secrets.overlays.c3d2-web ]; }
2021-10-06 02:55:30 +02:00
];
extraArgs = {
inherit nixpkgs;
};
};
2021-10-07 23:00:50 +02:00
sdrweb = nixosSystem' {
nixpkgs = inputs.nixpkgs-openwebrx;
2021-10-07 23:00:50 +02:00
modules = [
./config/lxc-container.nix
2021-10-30 02:02:08 +02:00
{ nixpkgs.overlays = [ secrets.overlays.mucbot ]; }
2021-11-09 01:23:35 +01:00
heliwatch.nixosModules.heliwatch
2021-10-07 23:00:50 +02:00
./hosts/containers/sdrweb
];
};
2021-10-15 02:07:50 +02:00
bind = nixosSystem' {
modules = [
2022-01-13 18:38:36 +01:00
{ nixpkgs.overlays = with secrets.overlays; [ bind ]; }
./config/lxc-container.nix
2021-10-15 02:07:50 +02:00
./hosts/containers/bind
];
};
2021-10-18 03:46:25 +02:00
jabber = nixosSystem' {
modules = [
2022-01-13 18:38:36 +01:00
{ nixpkgs.overlays = with secrets.overlays; [ jabber ]; }
./config/lxc-container.nix
2021-10-18 03:46:25 +02:00
./hosts/containers/jabber
];
};
2021-11-11 16:20:45 +01:00
storage-ng = nixosSystem' {
modules = [
./hosts/storage-ng
secrets.nixosModules.admins
2022-01-13 18:38:36 +01:00
{ sops.defaultSopsFile = "${secrets}/hosts/storage-ng/secrets.yaml"; }
2021-11-11 16:20:45 +01:00
];
};
2021-12-24 03:18:20 +01:00
blogs = nixosSystem' {
modules = [
self.nixosModules.plume
./config/lxc-container.nix
2021-12-24 03:18:20 +01:00
./hosts/containers/blogs
2022-01-13 18:38:36 +01:00
{ sops.defaultSopsFile = "${secrets}/hosts/blogs/secrets.yaml"; }
2021-12-24 03:18:20 +01:00
];
};
2022-05-14 20:33:56 +02:00
server10 = nixosSystem' {
modules = [
./hosts/server10
2022-05-15 02:46:14 +02:00
microvm.nixosModules.host
2022-05-14 20:33:56 +02:00
];
};
2020-08-04 17:15:07 +02:00
};
nixosModule = self.nixosModules.c3d2;
2022-01-13 18:38:36 +01:00
nixosModules = {
2022-01-18 21:44:17 +01:00
c3d2 = {
2022-01-16 00:09:17 +01:00
imports = [
sops-nix.nixosModule
./modules/c3d2.nix
2022-01-18 15:39:35 +01:00
./modules/nncp.nix
./modules/autoupdate.nix
2022-01-16 00:09:17 +01:00
];
2022-01-16 13:26:37 +01:00
c3d2.hosts = hostRegistry.hosts;
2022-01-16 00:09:17 +01:00
c3d2.users = import ./users.nix;
2022-01-18 21:44:17 +01:00
c3d2.nncp.neigh = import ./config/nncp-relays.nix;
2022-01-16 00:09:17 +01:00
};
2022-01-15 11:00:01 +01:00
nncp = ./modules/nncp.nix;
2022-01-13 18:38:36 +01:00
plume = {
imports = [ ./modules/plume.nix ];
2022-01-13 18:38:36 +01:00
nixpkgs.overlays = [ fenix.overlay naersk.overlay ];
};
rpi-netboot = ./modules/rpi-netboot.nix;
2022-01-13 18:38:36 +01:00
};
2021-11-10 00:33:29 +01:00
hydraJobs = forAllSystems (system:
builtins.mapAttrs (_: nixpkgs.lib.hydraJob) (
nixpkgs.lib.filterAttrs (_: toplevel:
system == toplevel.system
) (builtins.mapAttrs (_: nixosSystem:
nixosSystem.config.system.build.toplevel
) self.nixosConfigurations)
//
nixpkgs.lib.filterAttrs (name: _:
builtins.match ".+-tftproot" name != null
) self.packages.${system}
)
2021-11-10 00:43:09 +01:00
);
2021-02-22 12:31:58 +01:00
};
}