dotfiles/host/hummelberg-old/filesystems.nix

64 lines
1.6 KiB
Nix

{ config, pkgs, lib, ... }:
let
networkShares = let
hsr_options = [
"defaults"
"noauto"
#"iocharset=utf8"
"soft"
"user=fhauser"
"domain=hsr.ch"
"uid=1000"
"gid=1000"
];
hsr_share = share_name:
{ domain ? "hsr.ch/root", path ? share_name, extra_options ? [ ] }:
lib.nameValuePair "/mnt/hsr/${share_name}" {
device = "//${domain}/${path}";
fsType = "cifs";
options = hsr_options ++ extra_options;
noCheck = true;
};
in lib.mapAttrs' hsr_share {
"skripte".path = "alg/skripte";
"scratch".path = "alg/scratch";
"fhauser".domain = "c101.hsr.ch";
#"fabian.hauser".domain = "svm-c113.ost.ch"; # User!
"afe" = { };
"auw" = { };
"ebooks" = {
path = "alg/ebooks";
extra_options = [ "ro" ];
};
};
in {
boot.initrd.luks.devices = {
"root".device = "/dev/disk/by-uuid/28d2914f-c053-40a8-ad90-f2743190c772";
"swap".device = "/dev/disk/by-uuid/ed89158d-4460-4012-86d7-f8761127371c";
};
fileSystems = {
"/" = {
device = "/dev/disk/by-uuid/6396b6eb-a7e6-430c-8c97-970404f88b35";
fsType = "btrfs";
options = [ "subvol=nixos" ];
};
"/home" = {
device = "/dev/disk/by-uuid/6396b6eb-a7e6-430c-8c97-970404f88b35";
fsType = "btrfs";
options = [ "subvol=home" ];
};
"/boot" = {
device = "/dev/disk/by-uuid/E86E-3C6C";
fsType = "vfat";
};
} // networkShares;
swapDevices = [{ device = "/dev/mapper/swap"; }];
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
}