disko | 365 Members | |
| disko - declarative disk partitioning - https://github.com/nix-community/disko | 95 Servers |
| Sender | Message | Time |
|---|---|---|
| 12 Dec 2024 | ||
| swap files specifically? or swap in general? I do not know enough about either really to have an opinion. | 04:07:06 | |
| Swap on CoW filesystems like BTRFS and ZFS is a bad idea | 04:07:47 | |
| swap is a write heavy requirement and CoW amplifies writes | 04:08:03 | |
| it will thrash your storage devices, especially if its SSDs | 04:08:13 | |
| if you must use swap, create a dedicated partition for it | 04:08:39 | |
| I see, thanks. I had read some of the btrfs docs and it seems like it is aware of files which are used for swap and alters behavior accordingly (disabling CoW and such), but maybe that is more in theory than in practice? | 04:10:13 | |
| Im not sure but that output you posted does show that the kernel have some safeguards to prevent mixing swap and CoW | 04:10:49 | |
| The best way to solve it is to create a new luks partition on the end of your disk, set its content to be a swap partition and then set the luks keyfile to a location on the root filesystem | 04:12:51 | |
| that way when the root filesystem is decrypted, a keyfile is available to decrypt swap | 04:13:02 | |
| or do what I do and go without swap which is possible on modern hardware | 04:13:26 | |
| or even zram | 04:13:44 | |
| the only downside with the two options is no hibernation | 04:14:04 | |
| Thanks, yes that is what I will do in future deployments. I am not sure how often my swap on this btrfs system is even used right now so I will probably not worry about repartitioning this deployment. | 04:14:19 | |
| sounds good | 04:14:31 | |
Hi, I'm having a bit of an unusual question in regards to the LUKS option passowrdFile. Is it somehow possible to let the passworFile be used by a postCreateHook?In my special case it would be to call systemd-cryptenroll --unlock-key-file=<path to file> .... | 08:12:17 | |
I have tried using the keyfile path directly in the hook but as far as I understand this doesn't work. Especially when I look at the ouptut of nixos-anywhere it seems the passwordFile is read in and then distributed by an internal mechanism (haven't found the code bits for that) to something like this: --key-file /dev/fd/63 | 08:17:53 | |
Is it possible by any chance to give a postCreateHook access to this "transformed" keyfile path? | 08:19:19 | |
| is this in disko or in nixos generally? | 10:58:44 | |
| oh right disko | 10:58:55 | |
| disko and in my case disko via nixos-anywhere | 11:31:04 | |
| 14:34:09 | ||
| 15:09:37 | ||
| Hi I am having an issue I was hoping someone could help me out with. Disko is working fine in my basic configuration.nix, but when I switch to my flake setup that my actual config is on it breaks with this strange error: | 15:11:00 | |
| … while calling the 'head' builtin at /nix/store/k5l01g2zwhysjyl5zjvg5zxnj0lyxpp1-source/lib/attrsets.nix:967:11: 966| || pred here (elemAt values 1) (head values) then 967| head values | ^ 968| else … while evaluating the attribute 'value' at /nix/store/k5l01g2zwhysjyl5zjvg5zxnj0lyxpp1-source/lib/modules.nix:809:9: 808| in warnDeprecation opt // 809| { value = builtins.addErrorContext "while evaluating the option `${showOption loc}':" value; | ^ 810| inherit (res.defsFinal') highestPrio; … while evaluating the option `system.build.toplevel': … while evaluating definitions from `/nix/store/k5l01g2zwhysjyl5zjvg5zxnj0lyxpp1-source/nixos/modules/system/activation/top-level.nix': … while evaluating the option `assertions': … while evaluating definitions from `/nix/store/k5l01g2zwhysjyl5zjvg5zxnj0lyxpp1-source/nixos/modules/tasks/filesystems/zfs.nix': … while evaluating the option `boot.zfs.enabled': … while evaluating the option `boot.initrd.supportedFilesystems': … while evaluating definitions from `/nix/store/k5l01g2zwhysjyl5zjvg5zxnj0lyxpp1-source/nixos/modules/system/boot/stage-1.nix': … while evaluating definitions from `/nix/store/k5l01g2zwhysjyl5zjvg5zxnj0lyxpp1-source/nixos/modules/tasks/filesystems.nix': … while evaluating the option `fileSystems."/".device': … while evaluating definitions from `/nix/store/fp2j5w8ly5k2s5sqx8qnhvmlwqr3i21j-source/module.nix': … while evaluating the option `disko.devices.disk.main.content.partitions.root.content.device': … while evaluating the module argument `device' in "/nix/store/fp2j5w8ly5k2s5sqx8qnhvmlwqr3i21j-source/lib/types/btrfs.nix": … while evaluating definitions from `/nix/store/drdviskxkwcg7q1la067n6dqzq0kfi18-source/hosts/skadi/disk-config.nix': … while evaluating the option `disko.devices.disk.main.content.partitions.root.device': (stack trace truncated; use '--show-trace' to show the full, detailed trace) error: attribute 'match' missing at /nix/store/fp2j5w8ly5k2s5sqx8qnhvmlwqr3i21j-source/lib/default.nix:114:16: 113| lib.stringAsChars 114| (c: if lib.match allowedChars c != null || c == "" then c else "\\x" + charToHex c); | ^ 115| Did you mean path? | 15:11:37 | |
| 13 Dec 2024 | ||
| Please use triple backticks | 14:10:02 | |
| ``` like this! ``` | 22:49:49 | |
| 14 Dec 2024 | ||
| I would think so too but whenever I run disko-install without disk arguments I get
| 23:14:08 | |
| * I would think so too but whenever I run disko-install without disk arguments I get
| 23:18:33 | |
| 18 Dec 2024 | ||
In reply to @beat_link:matrix.org if you require encryption, then not having swap on the root encrypted filesystem really complicates things because with zfs and btrfs you want them to be directly on the hardware ideally but if you have swap, you need an lvm for swap and the btrfs/zfs to put the lvm into a luks. or i guess you could you zfs' built-in encryption (not sure if btrfs has that) and create a luks partition in addition for the swap and make them both have the same password or so | 17:42:35 | |
In reply to @blimbus:matrix.orgcan you check if there is a device for home in repl? | 17:52:31 | |