weilite: fix virtiofs mount

This commit is contained in:
xinyangli 2024-12-22 14:10:58 +08:00
parent d31c7ad8a7
commit 404badefec
Signed by: xin
SSH key fingerprint: SHA256:UU5pRTl7NiLFJbWJZa+snLylZSXIz5rgHmwjzv8v4oE
3 changed files with 29 additions and 13 deletions

View file

@ -34,7 +34,10 @@
"usb_storage" "usb_storage"
"sd_mod" "sd_mod"
]; ];
kernelModules = [ "kvm-intel" ]; kernelModules = [
"kvm-intel"
];
kernelPackages = pkgs.linuxPackages_6_12;
}; };
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
@ -42,6 +45,7 @@
environment.systemPackages = [ environment.systemPackages = [
pkgs.virtiofsd pkgs.virtiofsd
pkgs.intel-gpu-tools pkgs.intel-gpu-tools
pkgs.pciutils
]; ];
sops = { sops = {
@ -92,18 +96,10 @@
wantedBy = [ "immich-server.service" ]; wantedBy = [ "immich-server.service" ];
} }
{ {
what = "restic"; what = "nixos";
where = "/var/lib/restic"; where = "/mnt/nixos";
type = "virtiofs"; type = "virtiofs";
options = "rw,nodev,nosuid"; options = "rw,nodev,nosuid";
wantedBy = [ "restic-rest-server.service" ];
}
{
what = "ocis";
where = "/var/lib/ocis";
type = "virtiofs";
options = "rw,nodev,nosuid";
wantedBy = [ "ocis.service" ];
} }
{ {
what = "media"; what = "media";
@ -111,6 +107,27 @@
type = "virtiofs"; type = "virtiofs";
options = "rw,nodev,nosuid"; options = "rw,nodev,nosuid";
} }
{
what = "/mnt/nixos/ocis";
where = "/var/lib/ocis";
options = "bind";
after = [ "mnt-nixos.mount" ];
wantedBy = [ "ocis.service" ];
}
{
what = "/mnt/nixos/restic";
where = "/var/lib/restic";
options = "bind";
after = [ "mnt-nixos.mount" ];
wantedBy = [ "restic-rest-server.service" ];
}
{
what = "/mnt/nixos/immich";
where = "/var/lib/immich";
options = "bind";
after = [ "mnt-nixos.mount" ];
wantedBy = [ "immich-server.service" ];
}
]; ];
hardware.graphics = { hardware.graphics = {

View file

@ -46,7 +46,6 @@ in
services.immich = { services.immich = {
enable = true; enable = true;
mediaLocation = "/mnt/XinPhotos/immich";
host = "127.0.0.1"; host = "127.0.0.1";
port = 3001; port = 3001;
openFirewall = true; openFirewall = true;

View file

@ -11,7 +11,7 @@ let
in in
{ {
config = { config = {
systemd.services.tailscaled.after = systemd.services.tailscaled.before =
(lib.optional cfg.node.enable "prometheus-node-exporters.service") (lib.optional cfg.node.enable "prometheus-node-exporters.service")
++ (lib.optional cfg.blackbox.enable "prometheus-blackbox-exporters.service") ++ (lib.optional cfg.blackbox.enable "prometheus-blackbox-exporters.service")
++ (lib.optional config.services.caddy.enable "caddy.service"); ++ (lib.optional config.services.caddy.enable "caddy.service");