2020-04-11 21:47:33 +00:00
|
|
|
{ config, pkgs, ... }:
|
2021-01-15 19:27:51 +00:00
|
|
|
let
|
|
|
|
cifs_opts = [ "x-systemd.automount" "noauto" "x-systemd.idle-timeout=60" "x-systemd.device-timeout=5s" "x-systemd.mount-timeout=5s" "uid=${builtins.toString config.users.users.artemis.uid}" "gid=100" ];
|
|
|
|
luna_opts = cifs_opts ++ [ "credentials=/var/private/luna_creds" ];
|
|
|
|
in
|
2020-04-11 21:47:33 +00:00
|
|
|
{
|
2020-08-15 03:06:11 +00:00
|
|
|
imports = [ ../../externals/systemd-boot-secure ];
|
2020-04-11 21:47:33 +00:00
|
|
|
boot = {
|
|
|
|
kernelPackages = pkgs.linuxPackages_latest;
|
2021-01-04 00:41:24 +00:00
|
|
|
extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback ];
|
2020-04-11 21:47:33 +00:00
|
|
|
kernel.sysctl."vm.swappiness" = 5;
|
|
|
|
cleanTmpDir = true;
|
2020-05-13 01:19:30 +00:00
|
|
|
loader.systemd-boot-secure = {
|
|
|
|
enable = true;
|
|
|
|
signed = true;
|
|
|
|
signing-key = "/root/secure-boot/db.key";
|
|
|
|
signing-certificate = "/root/secure-boot/db.crt";
|
|
|
|
};
|
2020-04-11 21:47:33 +00:00
|
|
|
|
2020-11-26 18:56:31 +00:00
|
|
|
# Device fails with uas
|
|
|
|
kernelParams = [ "usb-storage.quirks=152d:0578:u" ];
|
|
|
|
|
2020-11-26 04:17:41 +00:00
|
|
|
# Encrypted drives
|
2020-04-11 21:47:33 +00:00
|
|
|
initrd.luks = {
|
|
|
|
reusePassphrases = true;
|
|
|
|
devices = {
|
2020-04-27 23:19:31 +00:00
|
|
|
"${config.networking.hostName}" = {
|
2020-04-11 21:47:33 +00:00
|
|
|
device = "/dev/disk/by-uuid/274ec302-20b7-43bf-aa72-895ffdd96919";
|
|
|
|
preLVM = true;
|
|
|
|
allowDiscards = true;
|
|
|
|
};
|
2020-05-24 21:03:53 +00:00
|
|
|
glimmer = {
|
|
|
|
preLVM = true;
|
|
|
|
allowDiscards = true;
|
|
|
|
};
|
2020-04-11 21:47:33 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2021-01-15 19:27:51 +00:00
|
|
|
|
|
|
|
fileSystems."/media/luna/media".options = luna_opts;
|
|
|
|
fileSystems."/media/luna/private".options = luna_opts;
|
2020-04-11 21:47:33 +00:00
|
|
|
}
|