move common zfs settings to modules/base

This commit is contained in:
2023-07-26 13:58:42 +03:00
parent d4527c24a6
commit cff18bfb8f
5 changed files with 48 additions and 33 deletions

View File

@@ -17,25 +17,9 @@ in {
stateVersion = "22.11";
timeZone = "UTC";
services = {
postfix = {
enable = true;
saslPasswdPath = config.age.secrets.sasl-passwd.path;
};
zfsunlock = {
enable = true;
targets."vno1-oh2.servers.jakst" = {
sshEndpoint = myData.hosts."vno1-oh2.servers.jakst".publicIP;
pingEndpoint = "vno1-oh2.servers.jakst";
remotePubkey = myData.hosts."vno1-oh2.servers.jakst".initrdPubKey;
pwFile = config.age.secrets.zfs-passphrase-vno1-oh2.path;
startAt = "*-*-* *:00/5:00";
};
};
};
base = {
zfs.enable = true;
users.passwd = {
root.passwordFile = config.age.secrets.root-passwd-hash.path;
motiejus.passwordFile = config.age.secrets.motiejus-passwd-hash.path;
@@ -81,7 +65,25 @@ in {
unitstatus = {
enable = true;
email = "motiejus+alerts@jakstys.lt";
units = ["zfs-scrub" "nixos-upgrade"];
units = ["nixos-upgrade"];
};
};
services = {
postfix = {
enable = true;
saslPasswdPath = config.age.secrets.sasl-passwd.path;
};
zfsunlock = {
enable = true;
targets."vno1-oh2.servers.jakst" = {
sshEndpoint = myData.hosts."vno1-oh2.servers.jakst".publicIP;
pingEndpoint = "vno1-oh2.servers.jakst";
remotePubkey = myData.hosts."vno1-oh2.servers.jakst".initrdPubKey;
pwFile = config.age.secrets.zfs-passphrase-vno1-oh2.path;
startAt = "*-*-* *:00/5:00";
};
};
};
};
@@ -120,12 +122,6 @@ in {
};
};
zfs = {
autoScrub.enable = true;
trim.enable = true;
expandOnBoot = "all";
};
openssh = {
extraConfig = ''
AcceptEnv GIT_PROTOCOL

View File

@@ -29,6 +29,7 @@
timeZone = "Europe/Vilnius";
base = {
zfs.enable = true;
users.passwd = {
root.passwordFile = config.age.secrets.root-passwd-hash.path;
motiejus.passwordFile = config.age.secrets.motiejus-passwd-hash.path;
@@ -38,6 +39,12 @@
enable = true;
mountpoints = ["/home"];
};
unitstatus = {
enable = true;
email = "motiejus+alerts@jakstys.lt";
units = ["nixos-upgrade"];
};
};
services = {
@@ -97,12 +104,6 @@
"jakstys.lt.".data = myData.jakstysLTZone;
};
};
zfs = {
autoScrub.enable = true;
trim.enable = true;
expandOnBoot = "all";
};
};
networking = {