summaryrefslogtreecommitdiff
path: root/modules/xnet/disk.nix
diff options
context:
space:
mode:
authorKleidi Bujari <mail@4kb.net>2026-10-03 19:56:13 -0700
committerKleidi Bujari <mail@4kb.net>2026-10-03 20:59:26 -0700
commit0d15a4d19f7925be328c2d24214a11e5ac541c40 (patch)
treeff75c552989cec4651f941126628a3702f6c6bcf /modules/xnet/disk.nix
parent16918d62b34b7e4d7817837057b88acb44e4f63c (diff)
downloaddepot-0d15a4d19f7925be328c2d24214a11e5ac541c40.tar.gz
depot-0d15a4d19f7925be328c2d24214a11e5ac541c40.tar.bz2
depot-0d15a4d19f7925be328c2d24214a11e5ac541c40.zip
nixfmt formatting pass
Diffstat (limited to 'modules/xnet/disk.nix')
-rw-r--r--modules/xnet/disk.nix34
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 = {