Compare commits
4
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
51960e200e
|
||
|
|
db72f30b56
|
||
|
|
88ddae75e0 | ||
|
|
a0e664f4f5 |
@@ -26,4 +26,14 @@ Run ` lspci -k | grep -iA4 ethernet `
|
||||
` [ ] `
|
||||
|
||||
*Example:*
|
||||
`[ "r8169" ]`
|
||||
`[ "r8169" ]`
|
||||
|
||||
## cfg.ip
|
||||
|
||||
I hate DHCP! Set static ip or ip = hosts.malobeo.hosts.${hostname}.network.address;
|
||||
|
||||
*Default:*
|
||||
`Null` - Will error when not set
|
||||
|
||||
*Example:*
|
||||
`hosts.malobeo.hosts.fanny.network.address;`
|
||||
@@ -72,6 +72,7 @@ in
|
||||
enable = true;
|
||||
authorizedKeys = sshKeys.admins;
|
||||
ethernetDrivers = ["e1000e"];
|
||||
ip = hosts.malobeo.hosts.albert.network.address;
|
||||
};
|
||||
|
||||
services.malobeo.vpn = {
|
||||
@@ -86,6 +87,11 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
systemd.network.networks."05-unmanaged-docker" = {
|
||||
matchConfig = { Name = "veth*"; Kind = "veth"; };
|
||||
linkConfig = { Unmanaged = true; };
|
||||
};
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
boot.binfmt.emulatedSystems = [ "aarch64-linux" "i686-linux" ];
|
||||
services.acpid.enable = true;
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
|
||||
let
|
||||
sshKeys = import ../ssh_keys.nix;
|
||||
hosts = import ../hosts.nix {};
|
||||
|
||||
in
|
||||
{
|
||||
imports =
|
||||
@@ -35,6 +37,7 @@ in
|
||||
enable = true;
|
||||
authorizedKeys = sshKeys.admins;
|
||||
ethernetDrivers = ["r8169"];
|
||||
ip = hosts.malobeo.hosts.bakunin.network.address;
|
||||
};
|
||||
|
||||
malobeo.users.malobeo = true;
|
||||
|
||||
@@ -90,6 +90,7 @@ in
|
||||
authorizedKeys = sshKeys.admins;
|
||||
ethernetDrivers = ["r8169"];
|
||||
zfsExtraPools = [ "storage" ];
|
||||
ip = hosts.malobeo.hosts.fanny.network.address;
|
||||
};
|
||||
|
||||
boot.initrd = {
|
||||
|
||||
@@ -1,17 +1,12 @@
|
||||
{pkgs, ...}:
|
||||
{
|
||||
sops.secrets.njalacloud = {};
|
||||
sops.secrets.njalazines = {};
|
||||
sops.secrets.njalaantamap = {};
|
||||
sops.secrets.njalarm16 = {};
|
||||
systemd.services."dyndns" = {
|
||||
script = ''
|
||||
KEYCLOUD=$(cat /run/secrets/njalacloud)
|
||||
KEYZINES=$(cat /run/secrets/njalazines)
|
||||
KEYANATAMAP=$(cat /run/secrets/njalaantamap)
|
||||
KEYRM16=$(cat /run/secrets/njalarm16)
|
||||
${pkgs.curl}/bin/curl --fail --silent --show-error "https://njal.la/update/?h=cloud.malobeo.org&k="$KEYCLOUD"&auto"
|
||||
${pkgs.curl}/bin/curl --fail --silent --show-error "https://njal.la/update/?h=zines.malobeo.org&k="$KEYZINES"&auto"
|
||||
${pkgs.curl}/bin/curl --fail --silent --show-error "https://njal.la/update/?h=antamap.malobeo.org&k="$KEYANATAMAP"&auto"
|
||||
${pkgs.curl}/bin/curl --fail --silent --show-error "https://njal.la/update/?h=rm16bleibt.org&k="$KEYRM16"&auto"
|
||||
'';
|
||||
serviceConfig = {
|
||||
|
||||
@@ -27,6 +27,10 @@ in
|
||||
default = [ ];
|
||||
description = "Name or GUID of extra ZFS pools that you wish to import during boot.";
|
||||
};
|
||||
ip = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "The requested static ip for the machine";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf (cfg.enable && config.malobeo.disks.encryption) {
|
||||
@@ -73,7 +77,7 @@ in
|
||||
"/etc/ssh/initrd" = "/etc/ssh/initrd";
|
||||
};
|
||||
};
|
||||
kernelParams = [ "ip=::::${hostName}-initrd::dhcp" ];
|
||||
kernelParams = [ "ip=${cfg.ip}::::${hostName}::" ];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user