]> Git — Sourcephile - sourcephile-nix.git/blob - hosts/losurdo/fileSystems.nix
nix: update input julm-nix
[sourcephile-nix.git] / hosts / losurdo / fileSystems.nix
1 { pkgs, lib, config, inputs, hostName, ... }:
2 {
3 imports = [
4 (inputs.julm-nix + "/nixos/profiles/zfs.nix")
5 ];
6
7 fileSystems."/" = {
8 device = "${hostName}/root";
9 fsType = "zfs"; # TODO: options = [ "zfsutil" ];
10 };
11
12 # This will automatically load the zfs password prompt on login
13 # and kill the other prompt so boot can continue
14 # The pkill zfs kills the zfs load-key from the console
15 # allowing the boot to continue.
16 boot.initrd.network.postCommands = ''
17 echo >>/root/.profile "zfs load-key ${hostName} && pkill zfs"
18 '';
19 boot.zfs.requestEncryptionCredentials = [ hostName ];
20
21 fileSystems."/nix" = {
22 device = "${hostName}/nix";
23 fsType = "zfs";
24 };
25
26 fileSystems."/var" = {
27 device = "${hostName}/var";
28 fsType = "zfs";
29 };
30
31 fileSystems."/var/cache" = {
32 device = "${hostName}/var/cache";
33 fsType = "zfs";
34 };
35
36 fileSystems."/var/log" = {
37 device = "${hostName}/var/log";
38 fsType = "zfs";
39 };
40
41 fileSystems."/var/tmp" = {
42 device = "${hostName}/var/tmp";
43 fsType = "zfs";
44 };
45
46 fileSystems."/mnt/key" = {
47 device = "/dev/disk/by-label/key";
48 fsType = "vfat";
49 options = [ "auto" "nofail" "uid=1000" "gid=users" "umask=111" "dmask=007" "utf8=yes" ];
50 };
51
52 # Allow members of the "adbusers" group to mount Android devices via MTP
53 services.udev.packages = [ pkgs.android-udev-rules ];
54 environment.systemPackages = [
55 pkgs.go-mtpfs
56 pkgs.ntfs3g
57 ];
58
59 }