Pretty massive changes really

This commit is contained in:
2021-11-28 12:39:03 -08:00
parent 003637f435
commit 6bf378cad7
92 changed files with 126 additions and 10784 deletions
+1 -1
View File
@@ -3,7 +3,7 @@
with lib;
let
make-passwd-file = hostname:
pkgs.lib.fudo.passwd.stablerandom-passwd-file
pkgs.lib.passwd.stablerandom-passwd-file
"${hostname}-fudo-client-passwd"
config.instance.build-seed;
-4
View File
@@ -6,14 +6,10 @@
./bash.nix
./client.nix
./common.nix
./domains.nix
./dns.nix
./groups.nix
./hosts.nix
./instance.nix
./kerberos.nix
./networks.nix
./sites.nix
./users.nix
./user-config.nix
./wireless-networks.nix
+5 -5
View File
@@ -18,8 +18,8 @@ let
in {
config = {
fudo.dns = mkIf is-primary (let
primary-ip = pkgs.lib.fudo.network.host-ipv4 config hostname;
all-ips = pkgs.lib.fudo.network.host-ips config hostname;
primary-ip = pkgs.lib.network.host-ipv4 config hostname;
all-ips = pkgs.lib.network.host-ips config hostname;
in {
enable = true;
identity = "${hostname}.${domain}";
@@ -44,9 +44,9 @@ in {
# TODO: there's no guarantee this exists...
dmarc-report-address = "dmarc-report@${domain}";
network-definition = let
network = config.fudo.networks.${domain};
in network // {
zone-definition = let
zone = config.fudo.zones.${domain};
in zone // {
srv-records = {
tcp = {
domain = [{
+4 -3
View File
@@ -35,7 +35,7 @@ in {
"/boot" = {
device = "/dev/disk/by-label/lambda-boot";
fsType = "ext4";
options = [ "noexec" ];
options = [ "noexec" "noatime" "nodiratime" ];
};
"/" = {
@@ -47,19 +47,20 @@ in {
"/nix" = {
device = "lambda/transient/nix";
fsType = "zfs";
options = [ "noatime" "nodiratime" ];
};
"/var/log" = {
device = "lambda/transient/logs";
fsType = "zfs";
neededForBoot = true;
options = [ "noexec" ];
options = [ "noexec" "noatime" "nodiratime" ];
};
"/state" = {
device = "lambda/persistent/state";
fsType = "zfs";
options = [ "noexec" ];
options = [ "noexec" "noatime" "nodiratime" ];
};
};
+1 -1
View File
@@ -68,7 +68,7 @@ with lib; {
interfaces = {
extif0 = {
macAddress =
pkgs.lib.fudo.network.generate-mac-address "legatus" "extif0";
pkgs.lib.network.generate-mac-address "legatus" "extif0";
};
};
};
+1 -1
View File
@@ -72,7 +72,7 @@ with lib; {
interfaces = {
extif0 = {
macAddress =
pkgs.lib.fudo.network.generate-mac-address config.instance.hostname "extif0";
pkgs.lib.network.generate-mac-address config.instance.hostname "extif0";
};
};
};
+2 -2
View File
@@ -88,7 +88,7 @@ in {
};
fudo = let
backplane-dns-password-file = pkgs.lib.fudo.passwd.stablerandom-passwd-file
backplane-dns-password-file = pkgs.lib.passwd.stablerandom-passwd-file
"dns-service-backplane-passwd"
"dns-service-backplane-passwd-${config.instance.build-seed}";
in {
@@ -118,7 +118,7 @@ in {
};
ldap-root-passwd = {
source-file =
pkgs.lib.fudo.passwd.random-passwd-file "ldap-root-passwd" 20;
pkgs.lib.passwd.random-passwd-file "ldap-root-passwd" 20;
target-file = "/run/openldap/root.passwd";
user = ldap-user;
group = ldap-group;
-6
View File
@@ -36,12 +36,6 @@ in {
# secret-paths = [ "/state/secrets" ];
# };
fudo.games.valheim = {
enable = true;
state-directory = "/state/games/valheim";
password = "silkymilky";
};
systemd.tmpfiles.rules = [
"L /root/.gnupg - - - - ${state-dir}/user/root/gnupg"
"L /root/.ssh/id_rsa - - - - ${state-dir}/user/root/ssh/id_rsa"
+1 -1
View File
@@ -57,7 +57,7 @@ in {
dhcp-dynamic-network = site.dynamic-network;
search-domains = [ domain-name "fudo.org" ];
enable-reverse-mappings = true;
network-definition = config.fudo.networks.${domain-name};
zone-definition = config.fudo.zones.${domain-name};
};
client.dns.external-interface = "enp1s0";
+3 -9
View File
@@ -17,13 +17,15 @@ in {
intif0 = { useDHCP = true; };
};
firewall.enable = false;
};
# Hopefully this'll help with NFS...
boot.kernelModules = [ "rpcsec_gss_krb5" ];
services.nfs = {
# See lib/fudo/users.nix for the user@REALM -> user mapping
# See ../user-config.nix for the user@REALM -> user mapping
server = {
enable = true;
createMountPoints = false;
@@ -56,12 +58,4 @@ in {
# users = [ "niten" ];
# api-address = "/ip4/0.0.0.0/tcp/5001";
# };
virtualisation = {
libvirtd = {
enable = true;
qemuPackage = pkgs.qemu_kvm;
onShutdown = "shutdown";
};
};
}
+4 -3
View File
@@ -3,9 +3,10 @@
enable-gui = false;
rp = "niten";
admin-email = "niten@fudo.org";
domain = "mobile.fudo.org";
site = "mobile";
domain = "sea.fudo.org";
site = "seattle";
profile = "laptop";
arch = "x86_64-linux";
nixos-system = true;
# FIXME: Need a better story for laptops
nixos-system = false;
}
+2 -3
View File
@@ -19,9 +19,8 @@ in {
auth.kdc = mkIf (is-master || is-slave) {
enable = true;
realm = cfg.gssapi-realm;
# TODO: Also bind to ::1?
bind-addresses =
(pkgs.lib.fudo.network.host-ips config hostname) ++
(pkgs.lib.network.host-ips config hostname) ++
[ "127.0.0.1" ] ++ (optional config.networking.enableIPv6 "::1");
master-config = mkIf is-master {
acl = let
@@ -40,7 +39,7 @@ in {
};
dns.domains.${domain} = {
network-definition = mkIf kerberized-domain {
zone-definition = mkIf kerberized-domain {
srv-records = let
get-fqdn = hostname:
"${hostname}.${config.fudo.hosts.${hostname}.domain}";
+2
View File
@@ -10,6 +10,8 @@ with lib;
hostname = config.instance.hostname;
host-cfg = config.fudo.hosts.${hostname};
sys = config.instance;
in {
fudo.auth.ldap-server = {
users = filterAttrs