milahu / nixpkgs

Nix Packages collection
MIT License
1 stars 0 forks source link

nixos-rebuild switch should stop nfs-server #79

Closed milahu closed 2 months ago

milahu commented 2 months ago

currently, when i change services.nfs.server.enable from true to false then nfs-server.service is still active, still listening on port 2049

$ systemctl status nfs-server.service | grep Active
     Active: active (exited) since Wed 2024-09-11 16:31:03 CEST; 1 week 6 days ago

$ netstat -lntup | grep 2049
tcp        0      0 0.0.0.0:2049            0.0.0.0:*               LISTEN      -                   
tcp6       0      0 :::2049                 :::*                    LISTEN      -                   

$ nmap -p2049 192.168.178.20 | grep open
2049/tcp open  nfs

workaround: manuall stop all NFS services

sudo systemctl stop nfs-server.service rpcbind.socket rpcbind.service
$ systemctl status nfs-server.service | grep Active
     Active: inactive (dead) since Wed 2024-09-25 11:13:01 CEST; 10s ago
milahu commented 2 months ago

my bad

i also had services.nfs.server.enable = true; in my hardware-configuration.nix