| 10 Dec 2024 |
Mic92 | no. disko requires all disks to be specified explicitly | 06:48:40 |
Mic92 | *disko-install | 06:48:50 |
Mic92 | It's because it allows users to flash storage devices that from a different computer without overwriting their own disks. | 06:49:45 |
Mic92 | This is some sort of safety feature. | 06:50:00 |
| BeatLink joined the room. | 12:52:44 |
BeatLink | Hey guys, So i have a somewhat unusual problem. My laptop contains 2 drives. A root drive that's running NixOS and a data drive thats intended to store my documents, videos, pictures, etc
I want to use disko to manage the mounting of both on the running system but NixOS Anywhere should only format the root drive while leaving the data drive alone. The data drive should only be formatted via a dedicated bash script called "format-data-drive.sh"
I recalled somewhere in the documentation you can generate a format script from disko that can then be consumed by the NixOS anywhere script as an argument but i cant seem to find the documentation | 12:56:08 |
BeatLink | my plan was basically to generate 2 seperate disko scripts. One for the root drive and one for the data drive. The former would be consumed by nixos anywhere, the latter by the data drive format script | 12:57:11 |
BeatLink | Am i on the right path? | 12:57:15 |
Mic92 | BeatLink: disko will only format the disks that you have configured. However I would use not generic names such as nvme0 but instead longer ids that contain the nvme serial numbers. Because nvmes might be not stable and change after reboot: lsblk --output NAME,ID-LINK,FSTYPE,SIZE,MOUNTPOINT | 19:51:17 |
Mic92 | Just include your main drive for nixos-anywhere in your nixos configuration. and for your data partition use the disko cli | 19:52:12 |
BeatLink | thanks | 19:52:42 |
BeatLink | I wanted to also use disko to handle mounting the drive in the installed system | 19:52:55 |
Mic92 | You will need to add a fileSystems entry in your nixos configuration for your data drive. | 19:53:01 |
BeatLink | right | 19:53:07 |
BeatLink | I've already went ahead and coded in my script to comment out the data drive during installation and uncomment it once the installation is complete | 19:53:34 |
Mic92 | I guess that also works. | 19:53:48 |
BeatLink | yeah, that way its disko all the way down | 19:54:08 |
BeatLink | a bit risky tho, since if the script fails to comment the line, there goes my cat pictures lol | 19:54:23 |
BeatLink | i have an off site backup setup tho so im not tooo worried | 19:54:41 |
Mic92 | Still time consuming | 19:54:52 |
BeatLink | yep | 19:54:58 |
BeatLink | it would be great if disko took an argument with a list of which devices to ignore | 19:55:27 |
BeatLink | like --ignore-device=/dev/sda | 19:55:39 |
BeatLink | and that could be repeated numerous times | 19:55:49 |
| 11 Dec 2024 |
| kagehisa joined the room. | 10:06:32 |
| marijan changed their profile picture. | 14:20:18 |
| SkamDart joined the room. | 21:03:43 |
SkamDart | Running this https://gist.github.com/SkamDart/30af3d3e4d93ee2dbd732ff3645bb29e config and getting the following error
/nix/store/32ycfg2axcjxdii9irj0fddbcb2xlr9z-disko-format-mount/bin/disko-format-mount: line 6
3: mkfs.fat32: command not found
nothing came up in my nix-locate search and mkfs.fat32 isn't provided by dosfstools or e2fsprogs.
does it make more sense to write a custom _create attribute that calls out to mkfs.fat -F 32 or am I missing the obvious way to do this?
| 21:13:36 |
netpleb | in my disks.nix I have a btrfs setup like the example https://github.com/nix-community/disko/blob/master/example/luks-btrfs-subvolumes.nix but only recently noticed when trying to nixos-rebuild switch that I get this error:
Dec 11 15:26:26 aleph0 systemd[1]: Activating swap /.swapvol/swapfile...
Dec 11 15:26:26 aleph0 kernel: BTRFS warning (device dm-2): swapfile must not be copy-on-write
Dec 11 15:26:26 aleph0 swapon[367622]: swapon: /.swapvol/swapfile: swapon failed: Invalid argument
Dec 11 15:26:26 aleph0 systemd[1]: \x2eswapvol-swapfile.swap: Swap process exited, code=exited, status=255/EXCEPTION
Dec 11 15:26:26 aleph0 systemd[1]: \x2eswapvol-swapfile.swap: Failed with result 'exit-code'.
Does disko need to set some mount option differently for the swap subvolume?
| 23:46:16 |
| 12 Dec 2024 |
netpleb | I found the issue. At the bottom of this answer it says: "Swap file can't be located on a btrfs raid of any sort." | 00:04:11 |