Compare commits
2 Commits
d85b00971e
...
e191f9b386
Author | SHA1 | Date |
---|---|---|
coolneng | e191f9b386 | |
coolneng | 51eca1d4f3 |
|
@ -1,9 +1,4 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
# ZFS automatic snapshots
|
||||
|
@ -93,4 +88,48 @@
|
|||
};
|
||||
};
|
||||
|
||||
# Automount external storage
|
||||
systemd.mounts = [
|
||||
# UGent Samba
|
||||
{
|
||||
what = "//files.ugent.be/akasroua/home";
|
||||
type = "cifs";
|
||||
where = "/ugent";
|
||||
options =
|
||||
"credentials=${config.age.secrets.samba-ugent.path},noperm,vers=3.11,sec=ntlmv2i,noserverino";
|
||||
mountConfig = { TimeoutSec = "5"; };
|
||||
}
|
||||
];
|
||||
systemd.automounts = [
|
||||
# UGent Samba
|
||||
{
|
||||
where = "/ugent";
|
||||
automountConfig = { TimeoutIdleSec = "5"; };
|
||||
wantedBy = [ "default.target" ];
|
||||
}
|
||||
];
|
||||
|
||||
# HACK Workaround to change the configuration of keyutils in order to get CIFS working
|
||||
environment.etc."request-key.conf" = {
|
||||
text = let
|
||||
upcall = "${pkgs.cifs-utils}/bin/cifs.upcall";
|
||||
keyctl = "${pkgs.keyutils}/bin/keyctl";
|
||||
in ''
|
||||
#OP TYPE DESCRIPTION CALLOUT_INFO PROGRAM
|
||||
# -t is required for DFS share servers...
|
||||
create cifs.spnego * * ${upcall} -t %k
|
||||
create dns_resolver * * ${upcall} %k
|
||||
# Everything below this point is essentially the default configuration,
|
||||
# modified minimally to work under NixOS. Notably, it provides debug
|
||||
# logging.
|
||||
create user debug:* negate ${keyctl} negate %k 30 %S
|
||||
create user debug:* rejected ${keyctl} reject %k 30 %c %S
|
||||
create user debug:* expired ${keyctl} reject %k 30 %c %S
|
||||
create user debug:* revoked ${keyctl} reject %k 30 %c %S
|
||||
create user debug:loop:* * |${pkgs.coreutils}/bin/cat
|
||||
create user debug:* * ${pkgs.keyutils}/share/keyutils/request-key-debug.sh %k %d %c %S
|
||||
negate * * * ${keyctl} negate %k 30 %S
|
||||
'';
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -97,6 +97,8 @@ in
|
|||
zip
|
||||
unzip
|
||||
unar
|
||||
cifs-utils
|
||||
keyutils
|
||||
# Overlays
|
||||
cachix
|
||||
# Budgeting
|
||||
|
|
Loading…
Reference in New Issue