mirror of
https://github.com/kmein/niveum
synced 2026-03-21 04:11:07 +01:00
fix(retiolum): depend on palos retiolum again
This commit is contained in:
@@ -1,16 +1,6 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
with lib;
|
with lib;
|
||||||
let
|
let
|
||||||
stockholm-systems =
|
|
||||||
let systemsDir = <stockholm> + "/krebs/1systems";
|
|
||||||
in genAttrs
|
|
||||||
(attrNames (filterAttrs (_: value: value == "directory") (builtins.readDir systemsDir)))
|
|
||||||
(name: import <nixpkgs/nixos> {
|
|
||||||
configuration = import (systemsDir + "/${name}/config.nix");
|
|
||||||
});
|
|
||||||
|
|
||||||
hostsPackage = stockholm-systems.filebitch.config.krebs.tinc.retiolum.hostsPackage;
|
|
||||||
|
|
||||||
netname = "retiolum";
|
netname = "retiolum";
|
||||||
cfg = config.networking.retiolum;
|
cfg = config.networking.retiolum;
|
||||||
in {
|
in {
|
||||||
@@ -50,10 +40,7 @@ in {
|
|||||||
|
|
||||||
systemd.services."tinc.${netname}" = {
|
systemd.services."tinc.${netname}" = {
|
||||||
preStart = ''
|
preStart = ''
|
||||||
set -eu
|
cp -R ${toString <retiolum/hosts>} /etc/tinc/retiolum/ || true
|
||||||
|
|
||||||
mkdir -p /etc/tinc/${netname}/hosts/
|
|
||||||
cp ${hostsPackage}/* /etc/tinc/${netname}/hosts/
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# Some hosts require VPN for nixos-rebuild, so we don't want to restart it on update
|
# Some hosts require VPN for nixos-rebuild, so we don't want to restart it on update
|
||||||
@@ -62,9 +49,7 @@ in {
|
|||||||
serviceConfig.ExecReload = "${config.services.tinc.networks.${netname}.package}/bin/tinc -n ${netname} reload";
|
serviceConfig.ExecReload = "${config.services.tinc.networks.${netname}.package}/bin/tinc -n ${netname} reload";
|
||||||
};
|
};
|
||||||
|
|
||||||
networking.extraHosts =
|
networking.extraHosts = builtins.readFile (toString <retiolum/etc.hosts>);
|
||||||
# TODO generate from stockholm
|
|
||||||
builtins.readFile (toString <retiolum/etc.hosts>);
|
|
||||||
|
|
||||||
environment.systemPackages =
|
environment.systemPackages =
|
||||||
[ config.services.tinc.networks.${netname}.package ];
|
[ config.services.tinc.networks.${netname}.package ];
|
||||||
|
|||||||
Reference in New Issue
Block a user