+20
nixos/doc/manual/release-notes/rl-2305.section.md
+20
nixos/doc/manual/release-notes/rl-2305.section.md
···- `services.peertube` now requires you to specify the secret file `secrets.secretsFile`. It can be generated by running `openssl rand -hex 32`.
···+- NixOS swap partitions with random encryption can now control the sector size, cipher, and key size used to setup the plain encryption device over the+underlying block device rather than allowing them to be determined by `cryptsetup(8)`. One can use these features like so:- `services.peertube` now requires you to specify the secret file `secrets.secretsFile`. It can be generated by running `openssl rand -hex 32`.
+36
-3
nixos/modules/config/swap.nix
+36
-3
nixos/modules/config/swap.nix
······-realDevice = if config.randomEncryption.enable then "/dev/mapper/${deviceName}" else config.device;···-${optionalString sw.randomEncryption.allowDiscards "--allow-discards"} ${sw.device} ${sw.deviceName}
······+realDevice = if config.randomEncryption.enable then "/dev/mapper/${config.deviceName}" else config.device;···+(optionalString (sw.randomEncryption.sectorSize != null) "--sector-size=${toString sw.randomEncryption.sectorSize} \\")+(optionalString (sw.randomEncryption.keySize != null) "--key-size=${toString sw.randomEncryption.keySize} \\")
+1
nixos/tests/all-tests.nix
+1
nixos/tests/all-tests.nix
···
+80
nixos/tests/swap-random-encryption.nix
+80
nixos/tests/swap-random-encryption.nix
···
···+raise Exception ("swap device encryption does not use the cipher specified in the configuration")+raise Exception ("swap device encryption does not use the key size specified in the configuration")