Remove more persistence references and move to a simpler, global system

This commit is contained in:
Jimbo 2025-02-28 14:17:13 -05:00
parent 8d1a992bb2
commit 9a8e7d8a9e
6 changed files with 23 additions and 49 deletions

View file

@ -4,7 +4,7 @@
hideMounts = true; hideMounts = true;
directories = [ directories = [
"/etc/nixos" "/etc/nixos"
"/etc/secureboot" "/etc/ssh/"
"/var" "/var"
]; ];
files = [ files = [

View file

@ -23,8 +23,5 @@
dnsovertls = "true"; dnsovertls = "true";
}; };
environment = { environment.systemPackages = with pkgs; [ impala ];
systemPackages = with pkgs; [ impala ];
persistence."/persist".directories = [ "/var/lib/iwd/" ];
};
} }

View file

@ -17,23 +17,10 @@
}; };
}; };
programs.virt-manager.enable = true;
environment.persistence."/persist".directories = [
"/var/lib/libvirt/dnsmasq"
"/var/lib/libvirt/nwfilter"
"/var/lib/libvirt/qemu"
"/var/lib/libvirt/secrets"
"/var/lib/libvirt/storage"
"/var/lib/libvirt/swtpm"
];
# Needed to make NAT work # Needed to make NAT work
networking.firewall.trustedInterfaces = [ networking.firewall.trustedInterfaces = [
"virbr0" "virbr0"
"virbr1" "virbr1"
]; ];
systemd.tmpfiles.rules = [ "f /dev/shm/looking-glass 0660 - libvirtd -" ];
}; };
} }

View file

@ -1,22 +1,20 @@
{ lib, ... }: { lib, ... }:
{ {
imports = [ ./fail2ban ]; services = {
openssh = {
services.openssh = { enable = true;
enable = true; settings = {
settings = { PermitRootLogin = lib.mkForce "no";
PermitRootLogin = lib.mkForce "no"; PrintLastLog = "no";
PrintLastLog = "no"; PasswordAuthentication = false;
PasswordAuthentication = false; UsePAM = false;
UsePAM = false; X11Forwarding = false;
X11Forwarding = false; };
};
fail2ban = {
enable = true;
maxretry = 5;
bantime = "10m";
}; };
}; };
environment.persistence."/persist".files = [
"/etc/ssh/ssh_host_ed25519_key"
"/etc/ssh/ssh_host_ed25519_key.pub"
"/etc/ssh/ssh_host_rsa_key"
"/etc/ssh/ssh_host_rsa_key.pub"
];
} }

View file

@ -1,11 +1,6 @@
{ config, lib, ... }: { config, ... }:
{ {
imports = [ imports = [ ./nginx ];
./nginx
];
config = lib.mkIf config.system.fileserver.enable { services.jellyfin.enable = config.system.server.enable;
services.jellyfin.enable = true;
environment.persistence."/persist".directories = [ "/var/lib/jellyfin" ];
};
} }

View file

@ -1,10 +1,7 @@
{ config, lib, ... }: { config, lib, ... }:
{ {
config = lib.mkIf config.services.nginx.enable { security.acme = lib.mkIf config.services.nginx.enable {
security.acme = { acceptTerms = true;
acceptTerms = true; defaults.email = "contact@example.com";
defaults.email = "contact@nixfox.ca";
};
environment.persistence."/persist".directories = [ "/var/lib/acme" ];
}; };
} }