Major refactor of dotspace config

This commit is contained in:
Lauren Lagarde 2025-08-21 22:25:10 -05:00
parent 53c3b2bb19
commit f6e96617df
24 changed files with 198 additions and 172 deletions

50
dotspace/parts/cifs.nix Normal file
View file

@ -0,0 +1,50 @@
{ config, ... }: let
SMBShares = [
{
host = "bastion.mlaga97.space";
share = "MyBook";
}
{
host = "bastion.mlaga97.space";
share = "Frigate";
}
{
host = "blockhouse.mlaga97.space";
share = "Parlor";
}
{
host = "blockhouse.mlaga97.space";
share = "Archive";
}
];
in {
sops.secrets = builtins.listToAttrs(
map (
x: {
name = "dotspace/smb/${x.share}";
value = {};
}
) SMBShares
);
systemd.mounts = map (
x: {
type = "cifs";
options = "rw,vers=3,credentials=${config.sops.secrets."dotspace/smb/${x.share}".path},uid=1000,gid=100,dir_mode=0775,file_mode=0775";
what = "//${x.host}.mlaga97.space/${x.share}";
where = "/${x.share}";
}
) SMBShares;
systemd.automounts = map (
x: {
wantedBy = [ "multi-user.target" ];
automountConfig = {
TimeoutIdleSec = "60";
DeviceTimeout = "5";
MountTimeout = "5";
};
where = "/${x.share}";
}
) SMBShares;
}