diff options
| author | Kleidi Bujari <mail@4kb.net> | 2026-10-24 22:52:35 -0700 |
|---|---|---|
| committer | Kleidi Bujari <mail@4kb.net> | 2026-10-24 22:59:09 -0700 |
| commit | 48c8a4145c5a73874797a6de3f05ce584b1d1798 (patch) | |
| tree | bd4c627e8c8944fb7082b7a9982e8d3677c2a2c4 /modules/xnet/disk.nix | |
| parent | 1a181be93f37a94b347b2f5f97a1fef57e11cf89 (diff) | |
| parent | 27db59cac4f3c3e7a1e4187a5f56d4ec61895c5a (diff) | |
| download | depot-48c8a4145c5a73874797a6de3f05ce584b1d1798.tar.gz depot-48c8a4145c5a73874797a6de3f05ce584b1d1798.tar.bz2 depot-48c8a4145c5a73874797a6de3f05ce584b1d1798.zip | |
Diffstat (limited to 'modules/xnet/disk.nix')
| -rw-r--r-- | modules/xnet/disk.nix | 34 |
1 files changed, 26 insertions, 8 deletions
diff --git a/modules/xnet/disk.nix b/modules/xnet/disk.nix index 82e9c87..e6835f4 100644 --- a/modules/xnet/disk.nix +++ b/modules/xnet/disk.nix @@ -1,4 +1,9 @@ -{ config, lib, modulesPath, inputs, ... }: +{ + config, + lib, + modulesPath, + ... +}: let cfg = config.xnet.disk; commonOpts = { @@ -11,12 +16,16 @@ let "com.sun:auto-snapshot" = "false"; }; - inherit (lib) mkOption mkDefault mkIf types; + inherit (lib) + mkOption + mkDefault + mkIf + types + ; in { imports = [ (modulesPath + "/installer/scan/not-detected.nix") - inputs.disko.nixosModules.default ]; options.xnet.disk = { @@ -33,8 +42,7 @@ in }; config = mkIf cfg.enable { - networking.hostId = builtins.substring 0 8 - (builtins.hashString "md5" config.networking.hostName); + networking.hostId = builtins.substring 0 8 (builtins.hashString "md5" config.networking.hostName); services.zfs = { autoScrub.enable = true; @@ -46,8 +54,14 @@ in zramSwap.enable = mkDefault true; boot = { - kernelParams = [ "nohibernate" "elevator=none" ]; - supportedFilesystems = [ "vfat" "zfs" ]; + kernelParams = [ + "nohibernate" + "elevator=none" + ]; + supportedFilesystems = [ + "vfat" + "zfs" + ]; zfs.devNodes = mkDefault "/dev/disk/by-partuuid"; loader = { systemd-boot.enable = true; @@ -94,7 +108,11 @@ in disko.devices = { nodev."/" = { fsType = "tmpfs"; - mountOptions = [ "defaults" "size=2G" "mode=755" ]; + mountOptions = [ + "defaults" + "size=2G" + "mode=755" + ]; }; zpool.zroot = { |
