File tree Expand file tree Collapse file tree 1 file changed +51
-13
lines changed
Expand file tree Collapse file tree 1 file changed +51
-13
lines changed Original file line number Diff line number Diff line change 1- {
2- imports = [ ../common/optional/ephemeral-btrfs.nix ] ;
1+ { inputs , ...} : {
2+ imports = [
3+ ../common/optional/ephemeral-btrfs.nix
4+ inputs . disko . nixosModules . disko
5+ ] ;
36
47 boot = {
58 initrd = {
1821 } ;
1922 } ;
2023
21- fileSystems . "/boot" = {
22- device = "/dev/disk/by-label/alcyone" ;
23- fsType = "btrfs" ;
24- options = [ "subvol=boot" ] ;
24+ disko . devices . disk . main = {
25+ device = "/dev/vda" ;
26+ type = "disk" ;
27+ # TODO: switch to gpt when reinstalling alcyone, eventually.
28+ content = {
29+ type = "table" ;
30+ format = "msdos" ;
31+ partitions = [ {
32+ content = {
33+ type = "btrfs" ;
34+ postCreateHook = ''
35+ MNTPOINT=$(mktemp -d)
36+ mount -t btrfs "$device" "$MNTPOINT"
37+ trap 'umount $MNTPOINT; rm -d $MNTPOINT' EXIT
38+ btrfs subvolume snapshot -r $MNTPOINT/root $MNTPOINT/root-blank
39+ '' ;
40+ subvolumes = {
41+ "/boot" = {
42+ mountOptions = [ ] ;
43+ mountpoint = "/boot" ;
44+ } ;
45+ "/root" = {
46+ mountOptions = [ "compress=zstd" ] ;
47+ mountpoint = "/" ;
48+ } ;
49+ "/nix" = {
50+ mountOptions = [ "noatime" "compress=zstd" ] ;
51+ mountpoint = "/nix" ;
52+ } ;
53+ "/persist" = {
54+ mountOptions = [ "compress=zstd" ] ;
55+ mountpoint = "/persist" ;
56+ } ;
57+ "/swap" = {
58+ mountOptions = [ "compress=zstd" "noatime" ] ;
59+ mountpoint = "/swap" ;
60+ swap . swapfile = {
61+ size = "3072M" ;
62+ path = "swapfile" ;
63+ } ;
64+ } ;
65+ } ;
66+ } ;
67+ } ] ;
68+ } ;
2569 } ;
26-
27- swapDevices = [
28- {
29- device = "/swap/swapfile" ;
30- size = 3072 ;
31- }
32- ] ;
70+ fileSystems . "/persist" . neededForBoot = true ;
3371
3472 hardware . cpu . intel . updateMicrocode = true ;
3573
You can’t perform that action at this time.
0 commit comments