knot: sourcephile.fr: setup lebureau as a secondary NS
[sourcephile-nix.git] / hosts / losurdo / fileSystems.nix
index 7c40c290f37233d6c69332ea9f23a9247c1c67dd..3a35c79639e62b6c33779b98ba1db79c88db0dda 100644 (file)
@@ -1,59 +1,52 @@
-{ pkgs, lib, config, inputs, hostName, ... }:
+{ pkgs, inputs, hostName, ... }:
 {
-imports = [
-  (inputs.julm-nix + "/nixos/profiles/zfs.nix")
-];
-
-fileSystems."/" = {
-  device = "${hostName}/root";
-  fsType = "zfs"; # TODO: options = [ "zfsutil" ];
-};
-
-# This will automatically load the zfs password prompt on login
-# and kill the other prompt so boot can continue
-# The pkill zfs kills the zfs load-key from the console
-# allowing the boot to continue.
-boot.initrd.network.postCommands = ''
-  echo >>/root/.profile "zfs load-key ${hostName} && pkill zfs"
-'';
-boot.zfs.requestEncryptionCredentials = [ hostName ];
-
-fileSystems."/nix" = {
-  device = "${hostName}/nix";
-  fsType = "zfs";
-};
-
-fileSystems."/var" = {
-  device = "${hostName}/var";
-  fsType = "zfs";
-};
-
-fileSystems."/var/cache" = {
-  device = "${hostName}/var/cache";
-  fsType = "zfs";
-};
-
-fileSystems."/var/log" = {
-  device = "${hostName}/var/log";
-  fsType = "zfs";
-};
-
-fileSystems."/var/tmp" = {
-  device = "${hostName}/var/tmp";
-  fsType = "zfs";
-};
-
-fileSystems."/mnt/key" = {
-  device = "/dev/disk/by-label/key";
-  fsType = "vfat";
-  options = [ "auto" "nofail" "uid=1000" "gid=users" "umask=111" "dmask=007" "utf8=yes" ];
-};
-
-# Allow members of the "adbusers" group to mount Android devices via MTP
-services.udev.packages = [ pkgs.android-udev-rules ];
-environment.systemPackages = [
-  pkgs.go-mtpfs
-  pkgs.ntfs3g
-];
+  imports = [
+    (inputs.julm-nix + "/nixos/profiles/zfs.nix")
+  ];
+
+  fileSystems."/" = {
+    device = "${hostName}/root";
+    fsType = "zfs"; # TODO: options = [ "zfsutil" ];
+  };
+
+  boot.zfs.requestEncryptionCredentials = [ hostName ];
+
+  fileSystems."/nix" = {
+    device = "${hostName}/nix";
+    fsType = "zfs";
+  };
+
+  fileSystems."/var" = {
+    device = "${hostName}/var";
+    fsType = "zfs";
+  };
+
+  fileSystems."/var/cache" = {
+    device = "${hostName}/var/cache";
+    fsType = "zfs";
+  };
+
+  fileSystems."/var/log" = {
+    device = "${hostName}/var/log";
+    fsType = "zfs";
+  };
+
+  fileSystems."/var/tmp" = {
+    device = "${hostName}/var/tmp";
+    fsType = "zfs";
+  };
+
+  fileSystems."/mnt/key" = {
+    device = "/dev/disk/by-label/key";
+    fsType = "vfat";
+    options = [ "auto" "nofail" "uid=1000" "gid=users" "umask=111" "dmask=007" "utf8=yes" ];
+  };
+
+  # Allow members of the "adbusers" group to mount Android devices via MTP
+  services.udev.packages = [ pkgs.android-udev-rules ];
+  environment.systemPackages = [
+    pkgs.go-mtpfs
+    pkgs.ntfs3g
+  ];
 
 }