Skip to content

Commit

Permalink
Mount root to home everywhere
Browse files Browse the repository at this point in the history
  • Loading branch information
ifd3f committed Dec 18, 2023
1 parent 94fe3bd commit f9d5331
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 11 deletions.
6 changes: 0 additions & 6 deletions machines/banana/hardware-configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,6 @@
fsType = "zfs";
};

fileSystems."/root" = {
device = "/home/root";
fsType = "none";
options = [ "bind" ];
};

fileSystems."/boot" = {
device = "/dev/disk/by-uuid/9273-1FCA";
fsType = "vfat";
Expand Down
5 changes: 0 additions & 5 deletions machines/gfdesk/fs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,6 @@
fsType = "zfs";
};

fileSystems."/root" = {
device = "/home/root";
options = [ "bind" ];
};

fileSystems."/tmp" = {
device = "nvmepool/tmp";
fsType = "zfs";
Expand Down
12 changes: 12 additions & 0 deletions nix/nixos-modules/astral/mount-root-to-home.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{ config, lib, ... }:
with lib; {
options.astral.mount-root-to-home.enable =
mkEnableOption "mounting root to home";

config = mkIf config.astral.mount-root-to-home.enable {
fileSystems."/root" = {
device = "/home/root";
options = [ "bind" ];
};
};
}
1 change: 1 addition & 0 deletions nix/nixos-modules/roles/pc.nix
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ in {
# dates = "*-*-* 3:00:00 US/Pacific";
# };
xmonad.enable = true;
mount-root-to-home.enable = true;
};

security.rtkit.enable = true;
Expand Down
1 change: 1 addition & 0 deletions nix/nixos-modules/roles/server.nix
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ inputs:
infra-update.enable = false;
net.sshd.enable = true;
monitoring-node.enable = true;
mount-root-to-home.enable = true;

tailscale.enable = true;

Expand Down

0 comments on commit f9d5331

Please sign in to comment.