diff options
| author | Mark Nipper <nipsy@bitgnome.net> | 2024-12-31 01:00:37 -0800 | 
|---|---|---|
| committer | Mark Nipper <nipsy@bitgnome.net> | 2024-12-31 01:00:37 -0800 | 
| commit | 49424d34bf0a8a5355ea13f335ebf6037a19eda7 (patch) | |
| tree | 8e74f9aed72fdb1c08681a45b2f56dcdffd22d18 /hosts | |
| parent | c004f2e37a8794fc04c8044f2e0faf35d2d5fa83 (diff) | |
| download | nix-49424d34bf0a8a5355ea13f335ebf6037a19eda7.tar nix-49424d34bf0a8a5355ea13f335ebf6037a19eda7.tar.gz nix-49424d34bf0a8a5355ea13f335ebf6037a19eda7.tar.bz2 nix-49424d34bf0a8a5355ea13f335ebf6037a19eda7.tar.lz nix-49424d34bf0a8a5355ea13f335ebf6037a19eda7.tar.xz nix-49424d34bf0a8a5355ea13f335ebf6037a19eda7.tar.zst nix-49424d34bf0a8a5355ea13f335ebf6037a19eda7.zip  | |
Fix NFS bind mount dependency
Diffstat (limited to 'hosts')
| -rw-r--r-- | hosts/arrakis/default.nix | 20 | ||||
| -rw-r--r-- | hosts/arrakis/hardware-configuration.nix | 12 | 
2 files changed, 23 insertions, 9 deletions
diff --git a/hosts/arrakis/default.nix b/hosts/arrakis/default.nix index c667419..890474c 100644 --- a/hosts/arrakis/default.nix +++ b/hosts/arrakis/default.nix @@ -283,6 +283,26 @@        wantedBy = [ "multi-user.target" ];      }; +    "nfs-bind-mount" = { +      after = [ "zfs-import-data.service" ]; +      description = "Bind NFS exports to ZFS paths"; +      serviceConfig = { +        Type = "simple"; +        ExecStart = '' +          ${pkgs.util-linux}/bin/mount /srv/nfs/keepers +          ${pkgs.util-linux}/bin/mount /srv/nfs/movies +          ${pkgs.util-linux}/bin/mount /srv/nfs/tv +        ''; +        ExecStop = '' +          ${pkgs.util-linux}/bin/umount /srv/nfs/keepers +          ${pkgs.util-linux}/bin/umount /srv/nfs/movies +          ${pkgs.util-linux}/bin/umount /srv/nfs/tv +        ''; +        RemainAfterExit = true; +      }; +      wantedBy = [ "local-fs.target" ]; +    }; +      "nftables-extra" = let rules_script = ''          ${pkgs.nftables}/bin/nft insert rule inet nixos-fw input 'iifname "wlp5s0" tcp dport { http, https } counter accept # 80, 443'          ${pkgs.nftables}/bin/nft insert rule inet nixos-fw input 'iifname "wlp5s0" udp dport { netbios-ns, netbios-dgm } counter accept # 137, 138' diff --git a/hosts/arrakis/hardware-configuration.nix b/hosts/arrakis/hardware-configuration.nix index 60b1881..3c508e5 100644 --- a/hosts/arrakis/hardware-configuration.nix +++ b/hosts/arrakis/hardware-configuration.nix @@ -26,9 +26,7 @@      fsType = "none";      options = [        "bind" -      "defaults" -      "nofail" -      "x-systemd.requires=zfs-import-data.service" +      "noauto"      ];    }; @@ -37,9 +35,7 @@      fsType = "none";      options = [        "bind" -      "defaults" -      "nofail" -      "x-systemd.requires=zfs-import-data.service" +      "noauto"      ];    }; @@ -48,9 +44,7 @@      fsType = "none";      options = [        "bind" -      "defaults" -      "nofail" -      "x-systemd.requires=zfs-import-data.service" +      "noauto"      ];    };  | 
