Created
April 15, 2018 13:19
-
-
Save shlevy/febe235cc99919e78a4fdf38104d6a27 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ config, pkgs, ... }: | |
let subvol-mount = path: { name = path; | |
value = { fsType = "btrfs"; | |
label = "root"; | |
options = [ "defaults" | |
"subvol=${path}" | |
]; | |
}; | |
}; | |
subvols = builtins.listToAttrs (map subvol-mount | |
[ "/etc-persistent" | |
"/home-persistent/shlevy" | |
"/nix" | |
"/var/lib/cups" | |
"/var/log" | |
"/var/lib/kanboard" | |
]); | |
in { | |
fileSystems = | |
({ "/" = { device = "tmpfs"; | |
fsType = "tmpfs"; | |
options = [ "defaults" "mode=755" ]; | |
}; | |
"/boot" = { label = "ESP"; | |
fsType = "vfat"; | |
}; | |
} // subvols); | |
environment.etc = | |
{ systemd-mutable.source = "/etc-persistent/systemd-mutable"; | |
"nixos/configuration.nix".text = | |
"import /etc-persistent/nixos/configuration.nix\n"; | |
machine-id.text = "2c83968a55a1443c971598294d34f9ed\n"; | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment