Fix filesystem mounts and add tunnel config
This commit is contained in:
@ -34,41 +34,49 @@ with lib.my;
|
|||||||
];
|
];
|
||||||
wants = [ "network-online.target" ];
|
wants = [ "network-online.target" ];
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type=Simple;
|
Type="simple";
|
||||||
ExecStart='''
|
ExecStart=pkgs.lib.mkForce ''
|
||||||
ssh \
|
${pkgs.openssh}/bin/ssh \
|
||||||
-NT
|
-NT \
|
||||||
-o ExitOnForwardFailure=yes \
|
-o ExitOnForwardFailure=yes \
|
||||||
-o ServerAliveInterval=60 \
|
-o ServerAliveInterval=60 \
|
||||||
-o TCPKeepAlive=no \
|
-o TCPKeepAlive=no \
|
||||||
-i %h/.ssh/id_jellyfin \
|
-i %h/.ssh/id_jellyfin \
|
||||||
-R localhost:8096:localhost:8096 \
|
-R localhost:8096:localhost:8096 \
|
||||||
jellyfin@vps1.mesh.vimium.net
|
jellyfin@vps1.mesh.vimium.net
|
||||||
''';
|
'';
|
||||||
Restart=on-failure;
|
Restart="on-failure";
|
||||||
};
|
};
|
||||||
wantedBy = [ "default.target" ];
|
wantedBy = [ "default.target" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
virtualisation.podman.enable = true;
|
virtualisation.podman = {
|
||||||
|
enable = true;
|
||||||
|
extraPackages = [ pkgs.zfs ];
|
||||||
|
};
|
||||||
|
virtualisation.containers.storage.settings = {
|
||||||
|
storage = {
|
||||||
|
driver = "zfs";
|
||||||
|
graphroot = "/var/lib/containers/storage";
|
||||||
|
runroot = "/run/containers/storage";
|
||||||
|
};
|
||||||
|
};
|
||||||
virtualisation.oci-containers.containers = {
|
virtualisation.oci-containers.containers = {
|
||||||
jellyfin = {
|
jellyfin = {
|
||||||
user = "1000:1000";
|
|
||||||
image = "docker.io/jellyfin/jellyfin:10.8.10";
|
image = "docker.io/jellyfin/jellyfin:10.8.10";
|
||||||
autoStart = true;
|
autoStart = true;
|
||||||
ports = "8096:8096/tcp";
|
ports = [ "8096:8096/tcp" ];
|
||||||
volumes = [
|
volumes = [
|
||||||
"jellyfin-cache:/cache:Z"
|
"jellyfin-cache:/cache:Z"
|
||||||
"jellyfin-config:/config:Z"
|
"jellyfin-config:/config:Z"
|
||||||
];
|
];
|
||||||
extraOptions = [
|
extraOptions = [
|
||||||
"--detach"
|
"--detach"
|
||||||
"--label io.containers.autoupdate=registry"
|
|
||||||
"--privileged"
|
"--privileged"
|
||||||
"--userns keep-id"
|
"--label=io.containers.autoupdate=registry"
|
||||||
"--group-add=989"
|
"--group-add=989"
|
||||||
"--mount type=bind,source=/mnt/library,target=/library"
|
"--mount=type=bind,source=/mnt/library,target=/library,ro=true"
|
||||||
"--device /dev/dri:/dev/dri"
|
"--device=/dev/dri:/dev/dri"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -8,9 +8,9 @@
|
|||||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
|
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod" ];
|
||||||
boot.initrd.kernelModules = [ ];
|
boot.initrd.kernelModules = [ ];
|
||||||
boot.kernelModules = [ "kvm-intel" ];
|
boot.kernelModules = [ "kvm-amd" ];
|
||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
fileSystems."/" =
|
fileSystems."/" =
|
||||||
@ -18,21 +18,11 @@
|
|||||||
fsType = "zfs";
|
fsType = "zfs";
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/home" =
|
|
||||||
{ device = "rpool/user/home";
|
|
||||||
fsType = "zfs";
|
|
||||||
};
|
|
||||||
|
|
||||||
fileSystems."/var" =
|
fileSystems."/var" =
|
||||||
{ device = "rpool/system/var";
|
{ device = "rpool/system/var";
|
||||||
fsType = "zfs";
|
fsType = "zfs";
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/tmp" =
|
|
||||||
{ device = "rpool/local/tmp";
|
|
||||||
fsType = "zfs";
|
|
||||||
};
|
|
||||||
|
|
||||||
fileSystems."/var/log" =
|
fileSystems."/var/log" =
|
||||||
{ device = "rpool/system/var/log";
|
{ device = "rpool/system/var/log";
|
||||||
fsType = "zfs";
|
fsType = "zfs";
|
||||||
@ -44,12 +34,27 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/var/lib/containers/storage" =
|
fileSystems."/var/lib/containers/storage" =
|
||||||
{ device = "rpool/system/var/lib/containers/storage";
|
{ device = "rpool/system/var/lib-containers-storage";
|
||||||
|
fsType = "zfs";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/nix" =
|
||||||
|
{ device = "rpool/local/nix";
|
||||||
|
fsType = "zfs";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/tmp" =
|
||||||
|
{ device = "rpool/local/tmp";
|
||||||
|
fsType = "zfs";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/home" =
|
||||||
|
{ device = "rpool/user/home";
|
||||||
fsType = "zfs";
|
fsType = "zfs";
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/boot" =
|
fileSystems."/boot" =
|
||||||
{ device = "/dev/disk/by-uuid/E63E-8E75";
|
{ device = "/dev/disk/by-uuid/F697-F1C0";
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -58,6 +63,46 @@
|
|||||||
fsType = "zfs";
|
fsType = "zfs";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
fileSystems."/mnt/library/books" =
|
||||||
|
{ device = "library/books";
|
||||||
|
fsType = "zfs";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/mnt/library/fonts" =
|
||||||
|
{ device = "library/fonts";
|
||||||
|
fsType = "zfs";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/mnt/library/movies" =
|
||||||
|
{ device = "library/movies";
|
||||||
|
fsType = "zfs";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/mnt/library/music" =
|
||||||
|
{ device = "library/music";
|
||||||
|
fsType = "zfs";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/mnt/library/software" =
|
||||||
|
{ device = "library/software";
|
||||||
|
fsType = "zfs";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/mnt/library/tv" =
|
||||||
|
{ device = "library/tv";
|
||||||
|
fsType = "zfs";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/mnt/library/videos" =
|
||||||
|
{ device = "library/videos";
|
||||||
|
fsType = "zfs";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/mnt/library/web" =
|
||||||
|
{ device = "library/web";
|
||||||
|
fsType = "zfs";
|
||||||
|
};
|
||||||
|
|
||||||
swapDevices = [ ];
|
swapDevices = [ ];
|
||||||
|
|
||||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||||
@ -68,4 +113,5 @@
|
|||||||
# networking.interfaces.eno1.useDHCP = lib.mkDefault true;
|
# networking.interfaces.eno1.useDHCP = lib.mkDefault true;
|
||||||
|
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user