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;
supportedFilesystems = [ "zfs" ];
# zfs = {
# extraPools = [
# #"Main" + " " + "Pool"
# #main-pool
# #''"Safe\ SSD"''
# "Junk"
# ];
# };
};
# Hardware configs
@@ -137,26 +128,31 @@ in
pulse.enable = true;
};
# enable auto discovery of printers
# avahi = {
# enable = true;
# nssmdns4 = true;
# openFirewall = true;
# };
# Enable Flatpak
flatpak.enable = false;
# Enable RDP
xrdp = {
enable = true;
defaultWindowManager = "plasmawayland";
openFirewall = true;
};
};
systemd.services.nas-mounts = {
path = [ pkgs.zfs ];
path = [ pkgs.zfs pkgs.bash ];
script = ''
zpool import -R /mnt -f "Main Pool"
zpool import -R /mnt -f "Safe SSD"
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
if test -d /mnt/Safe\ SSD/ssd_app_data; then
echo "NAS ZFS Pools Mounted."
else
zpool import -R /mnt -f "Main Pool"
zpool import -R /mnt -f "Safe SSD"
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" ];
};
@@ -164,17 +160,23 @@ in
# Networking configs enp7s0
networking = {
hostName = hostname;
interfaces.enp7s0.ipv4.routes = [{
address = "10.0.1.18";
prefixLength = 16;
}];
hostId = "4b501480";
# 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 = {
# Set your time zone.

View File

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