Skip to content

Commit

Permalink
Add merged automount.
Browse files Browse the repository at this point in the history
  • Loading branch information
grmrgecko committed Aug 13, 2024
1 parent 085d3b5 commit d5b23c1
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,5 @@ After install is complete, you can then rsync the nixos dir to the user account
nix-shell -p rsync
mount -o compress=zstd /dev/mapper/crypted /mnt/hdd
rsync -av /root/nixos/ /mnt/hdd/home/grmrgecko/nixos/
umount /mnt/hdd
```
21 changes: 21 additions & 0 deletions modules/nixos/mnt-merged.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{ config, lib, pkgs, settings, ... }:

{
services.rpcbind.enable = true; # needed for NFS
systemd.mounts = [{
type = "nfs";
mountConfig = {
Options = "noatime";
};
what = "10.0.0.5:/mnt/merged";
where = "/mnt/merged";
}];

systemd.automounts = [{
wantedBy = [ "multi-user.target" ];
automountConfig = {
TimeoutIdleSec = "600";
};
where = "/mnt/merged";
}];
}
1 change: 1 addition & 0 deletions profiles/desktop.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@
../modules/nixos/management.nix
../modules/nixos/desktop.nix
../modules/nixos/docker.nix
../modules/nixos/mnt-merged.nix
];
}

0 comments on commit d5b23c1

Please sign in to comment.