2019-09-18 02:23:45 +04:00
|
|
|
{ pkgs, lib, config, ... }:
|
|
|
|
with rec {
|
|
|
|
inherit (config) deviceSpecific secrets;
|
|
|
|
};
|
|
|
|
with deviceSpecific; {
|
2019-08-27 23:41:02 +04:00
|
|
|
fileSystems = {
|
|
|
|
"/" = {
|
2019-09-18 02:23:45 +04:00
|
|
|
options = if isSSD then
|
2019-09-14 22:12:56 +04:00
|
|
|
[ "ssd" "noatime" "compress=zstd" ]
|
2019-08-27 23:54:21 +04:00
|
|
|
else
|
2019-09-14 22:12:56 +04:00
|
|
|
[ "noatime" "compress=zstd" ];
|
2019-08-27 23:41:02 +04:00
|
|
|
};
|
2019-09-18 02:23:45 +04:00
|
|
|
"/shared/nixos" = lib.mkIf isVM {
|
2019-08-27 23:41:02 +04:00
|
|
|
fsType = "vboxsf";
|
|
|
|
device = "shared";
|
2019-09-16 15:01:09 +04:00
|
|
|
options = [
|
|
|
|
"rw"
|
|
|
|
"nodev"
|
|
|
|
"relatime"
|
|
|
|
"nofail"
|
|
|
|
"dmode=0755"
|
|
|
|
"fmode=0644"
|
|
|
|
"uid=${toString config.users.users.alukard.uid}"
|
|
|
|
"gid=${toString config.users.groups.smbgrp.gid}"
|
|
|
|
];
|
2019-08-27 23:41:02 +04:00
|
|
|
};
|
2019-09-18 02:23:45 +04:00
|
|
|
"/media/windows/files" = lib.mkIf (!isHost) {
|
|
|
|
fsType = "cifs";
|
|
|
|
device = "//192.168.0.100/Files";
|
|
|
|
options = [
|
|
|
|
"user=${secrets.windows-samba.user}"
|
|
|
|
"password=${secrets.windows-samba.password}"
|
|
|
|
"nofail"
|
|
|
|
"uid=${toString config.users.users.alukard.uid}"
|
|
|
|
"gid=${toString config.users.groups.users.gid}"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
"/media/windows/data" = lib.mkIf (!isHost) {
|
|
|
|
fsType = "cifs";
|
|
|
|
device = "//192.168.0.100/Data";
|
|
|
|
options = [
|
|
|
|
"ro"
|
|
|
|
"user=${secrets.windows-samba.user}"
|
|
|
|
"password=${secrets.windows-samba.password}"
|
|
|
|
"nofail"
|
|
|
|
"uid=${toString config.users.users.alukard.uid}"
|
|
|
|
"gid=${toString config.users.groups.users.gid}"
|
|
|
|
];
|
|
|
|
};
|
2019-08-27 23:41:02 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
# mount swap
|
|
|
|
swapDevices = [
|
|
|
|
{ label = "swap"; }
|
|
|
|
];
|
|
|
|
}
|