fix swag, add rdp to nas

This commit is contained in:
mjallen18
2024-02-18 20:34:44 -06:00
parent 4b15be1b8d
commit 422773da19
2 changed files with 31 additions and 28 deletions

View File

@@ -46,15 +46,6 @@ in
bootspec.enable = true; bootspec.enable = true;
supportedFilesystems = [ "zfs" ]; supportedFilesystems = [ "zfs" ];
# zfs = {
# extraPools = [
# #"Main" + " " + "Pool"
# #main-pool
# #''"Safe\ SSD"''
# "Junk"
# ];
# };
}; };
# Hardware configs # Hardware configs
@@ -137,26 +128,31 @@ in
pulse.enable = true; pulse.enable = true;
}; };
# enable auto discovery of printers
# avahi = {
# enable = true;
# nssmdns4 = true;
# openFirewall = true;
# };
# Enable Flatpak # Enable Flatpak
flatpak.enable = false; flatpak.enable = false;
# Enable RDP
xrdp = {
enable = true;
defaultWindowManager = "plasmawayland";
openFirewall = true;
};
}; };
systemd.services.nas-mounts = { systemd.services.nas-mounts = {
path = [ pkgs.zfs ]; path = [ pkgs.zfs pkgs.bash ];
script = '' script = ''
zpool import -R /mnt -f "Main Pool" if test -d /mnt/Safe\ SSD/ssd_app_data; then
zpool import -R /mnt -f "Safe SSD" echo "NAS ZFS Pools Mounted."
zpool import -R /mnt -f "Junk" else
zfs load-key -L file:///root/main-pool.key "Main Pool" zpool import -R /mnt -f "Main Pool"
zfs load-key -L file:///root/safe-ssd.key "Safe SSD" zpool import -R /mnt -f "Safe SSD"
zfs mount -a zpool import -R /mnt -f "Junk"
zfs load-key -L file:///root/main-pool.key "Main Pool"
zfs load-key -L file:///root/safe-ssd.key "Safe SSD"
zfs mount -a
echo "NAS ZFS Pools Mounted."
fi
''; '';
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
}; };
@@ -164,17 +160,23 @@ in
# Networking configs enp7s0 # Networking configs enp7s0
networking = { networking = {
hostName = hostname; hostName = hostname;
interfaces.enp7s0.ipv4.routes = [{
address = "10.0.1.18";
prefixLength = 16;
}];
hostId = "4b501480"; hostId = "4b501480";
# Enable Network Manager # Enable Network Manager
networkmanager.enable = false; networkmanager.enable = true;
firewall = {
enable = true;
allowedTCPPorts = [ 80 443 ];
allowedUDPPorts = [ 80 443 ];
};
}; };
services.xrdp.enable = true;
services.xrdp.defaultWindowManager = "startplasma-x11";
services.xrdp.openFirewall = true;
# Time config # Time config
time = { time = {
# Set your time zone. # Set your time zone.

View File

@@ -11,6 +11,7 @@
environment = { environment = {
PGID = "1000"; PGID = "1000";
PUID = "1000"; PUID = "1000";
EMAIL = "jalle008@proton.me";
TZ = "America/Chicago"; TZ = "America/Chicago";
URL = "mjallen.dev"; URL = "mjallen.dev";
VALIDATION = "http"; VALIDATION = "http";