Remove more persistence references and move to a simpler, global system
This commit is contained in:
parent
8d1a992bb2
commit
9a8e7d8a9e
6 changed files with 23 additions and 49 deletions
|
@ -4,7 +4,7 @@
|
|||
hideMounts = true;
|
||||
directories = [
|
||||
"/etc/nixos"
|
||||
"/etc/secureboot"
|
||||
"/etc/ssh/"
|
||||
"/var"
|
||||
];
|
||||
files = [
|
||||
|
|
|
@ -23,8 +23,5 @@
|
|||
dnsovertls = "true";
|
||||
};
|
||||
|
||||
environment = {
|
||||
systemPackages = with pkgs; [ impala ];
|
||||
persistence."/persist".directories = [ "/var/lib/iwd/" ];
|
||||
};
|
||||
environment.systemPackages = with pkgs; [ impala ];
|
||||
}
|
||||
|
|
|
@ -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
|
||||
networking.firewall.trustedInterfaces = [
|
||||
"virbr0"
|
||||
"virbr1"
|
||||
];
|
||||
|
||||
systemd.tmpfiles.rules = [ "f /dev/shm/looking-glass 0660 - libvirtd -" ];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,22 +1,20 @@
|
|||
{ lib, ... }:
|
||||
{
|
||||
imports = [ ./fail2ban ];
|
||||
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
settings = {
|
||||
PermitRootLogin = lib.mkForce "no";
|
||||
PrintLastLog = "no";
|
||||
PasswordAuthentication = false;
|
||||
UsePAM = false;
|
||||
X11Forwarding = false;
|
||||
services = {
|
||||
openssh = {
|
||||
enable = true;
|
||||
settings = {
|
||||
PermitRootLogin = lib.mkForce "no";
|
||||
PrintLastLog = "no";
|
||||
PasswordAuthentication = false;
|
||||
UsePAM = 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"
|
||||
];
|
||||
}
|
||||
|
|
|
@ -1,11 +1,6 @@
|
|||
{ config, lib, ... }:
|
||||
{ config, ... }:
|
||||
{
|
||||
imports = [
|
||||
./nginx
|
||||
];
|
||||
imports = [ ./nginx ];
|
||||
|
||||
config = lib.mkIf config.system.fileserver.enable {
|
||||
services.jellyfin.enable = true;
|
||||
environment.persistence."/persist".directories = [ "/var/lib/jellyfin" ];
|
||||
};
|
||||
services.jellyfin.enable = config.system.server.enable;
|
||||
}
|
||||
|
|
|
@ -1,10 +1,7 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
config = lib.mkIf config.services.nginx.enable {
|
||||
security.acme = {
|
||||
acceptTerms = true;
|
||||
defaults.email = "contact@nixfox.ca";
|
||||
};
|
||||
environment.persistence."/persist".directories = [ "/var/lib/acme" ];
|
||||
security.acme = lib.mkIf config.services.nginx.enable {
|
||||
acceptTerms = true;
|
||||
defaults.email = "contact@example.com";
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue