mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-12-06 21:17:14 -06:00
Compare commits
3 commits
344798ce81
...
60a8eaa374
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
60a8eaa374 | ||
|
|
65cda6178f | ||
|
|
229a1f8b3f |
5 changed files with 43 additions and 24 deletions
0
modules/config/devices/config/lamdagibson.nix
Normal file → Executable file
0
modules/config/devices/config/lamdagibson.nix
Normal file → Executable file
|
|
@ -75,7 +75,7 @@ in
|
||||||
"Z ${serviceCfg.varPaths.path0} 0755 ${serviceCfg.name} ${serviceCfg.name} -"
|
"Z ${serviceCfg.varPaths.path0} 0755 ${serviceCfg.name} ${serviceCfg.name} -"
|
||||||
"Z ${serviceCfg.varPaths.path2} 0755 ${serviceCfg.name} ${serviceCfg.name} -"
|
"Z ${serviceCfg.varPaths.path2} 0755 ${serviceCfg.name} ${serviceCfg.name} -"
|
||||||
"d ${serviceCfg.varPaths.path1} 0755 ${serviceCfg.name} ${serviceCfg.name} -"
|
"d ${serviceCfg.varPaths.path1} 0755 ${serviceCfg.name} ${serviceCfg.name} -"
|
||||||
"Z ${serviceCfg.varPaths.path2} 0755 ${serviceCfg.name} ${serviceCfg.name} -"
|
"Z ${serviceCfg.varPaths.path2} 0775 ${serviceCfg.name} ${serviceCfg.name} -"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -161,9 +161,9 @@ in
|
||||||
users.users.caddy.extraGroups = [ "acme" ];
|
users.users.caddy.extraGroups = [ "acme" ];
|
||||||
|
|
||||||
systemd.tmpfiles.rules = [
|
systemd.tmpfiles.rules = [
|
||||||
"d ${serviceCfg.mntPaths.path0} 0751 microvm wheel - -"
|
"d ${serviceCfg.mntPaths.path0} 0755 microvm wheel - -"
|
||||||
"d ${serviceCfg.mntPaths.path0}/data 0751 microvm wheel - -"
|
"d ${serviceCfg.mntPaths.path0}/data 0755 microvm wheel - -"
|
||||||
"d ${serviceCfg.mntPaths.path0}/cache 0751 microvm wheel - -"
|
"d ${serviceCfg.mntPaths.path0}/cache 0755 microvm wheel - -"
|
||||||
"d ${serviceCfg.mntPaths.path0}/media 0751 microvm wheel - -"
|
"d ${serviceCfg.mntPaths.path0}/media 0775 microvm wheel - -"
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ in
|
||||||
config =
|
config =
|
||||||
let
|
let
|
||||||
macAddress = "02:00:00:00:00:${macOctet}";
|
macAddress = "02:00:00:00:00:${macOctet}";
|
||||||
workers = deviceLogic 45 4 18 6 4;
|
workers = deviceLogic 45 4 18 6 6;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
environment.systemPackages = [
|
environment.systemPackages = [
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,9 @@
|
||||||
{
|
{
|
||||||
pkgs,
|
|
||||||
flake,
|
flake,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
inherit (flake.config.services)
|
inherit (flake.config.services) instances;
|
||||||
instances
|
|
||||||
;
|
|
||||||
service = instances.samba;
|
service = instances.samba;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|
@ -19,8 +16,16 @@ in
|
||||||
openFirewall = true;
|
openFirewall = true;
|
||||||
settings = {
|
settings = {
|
||||||
"storage" = {
|
"storage" = {
|
||||||
path = "/mnt/storage";
|
path = "/mnt/storage/${instances.jellyfin.name}/media";
|
||||||
writable = "true";
|
browseable = "yes";
|
||||||
|
writeable = "yes";
|
||||||
|
"guest ok" = "no";
|
||||||
|
"create mask" = "0664";
|
||||||
|
"directory mask" = "0775";
|
||||||
|
"force user" = "microvm";
|
||||||
|
"force group" = "wheel";
|
||||||
|
"force create mode" = "0664";
|
||||||
|
"force directory mode" = "0775";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -5,26 +5,28 @@
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
inherit (flake.config.people) user0;
|
inherit (flake.config.people) user0;
|
||||||
inherit (flake.config.machines.devices) mars eris;
|
inherit (flake.config.machines.devices) mars eris ceres;
|
||||||
erisSecrets = config.sops.secrets."network/server".path;
|
sambaSecrets = config.sops.secrets."network/server".path;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
fileSystems =
|
fileSystems =
|
||||||
let
|
let
|
||||||
|
|
||||||
storageDrives = [
|
storageDrives = [
|
||||||
"storage0"
|
"storage0"
|
||||||
"storage1"
|
"storage1"
|
||||||
];
|
];
|
||||||
|
erisDrives = [
|
||||||
sambaDrives = [
|
|
||||||
"samba0"
|
"samba0"
|
||||||
];
|
];
|
||||||
|
erisFolders = [
|
||||||
sambaFolders = [
|
|
||||||
"raid0"
|
"raid0"
|
||||||
];
|
];
|
||||||
|
ceresDrives = [
|
||||||
|
"samba0"
|
||||||
|
];
|
||||||
|
ceresFolders = [
|
||||||
|
"storage"
|
||||||
|
];
|
||||||
storageMounts = storageDrive: {
|
storageMounts = storageDrive: {
|
||||||
name = "${mars.${storageDrive}.mount}";
|
name = "${mars.${storageDrive}.mount}";
|
||||||
value = {
|
value = {
|
||||||
|
|
@ -33,14 +35,23 @@ in
|
||||||
options = mars.${storageDrive}.options;
|
options = mars.${storageDrive}.options;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
erisMounts = sambaDrive: folder: {
|
||||||
sambaMounts = sambaDrive: folder: {
|
|
||||||
name = "${eris.${sambaDrive}.mount}/${folder}";
|
name = "${eris.${sambaDrive}.mount}/${folder}";
|
||||||
value = {
|
value = {
|
||||||
device = "${eris.${sambaDrive}.device}/${folder}";
|
device = "${eris.${sambaDrive}.device}/${folder}";
|
||||||
fsType = "cifs";
|
fsType = "cifs";
|
||||||
options = eris.${sambaDrive}.options ++ [
|
options = eris.${sambaDrive}.options ++ [
|
||||||
"credentials=${erisSecrets}"
|
"credentials=${sambaSecrets}"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
ceresMounts = sambaDrive: folder: {
|
||||||
|
name = "${ceres.${sambaDrive}.mount}/${folder}";
|
||||||
|
value = {
|
||||||
|
device = "${ceres.${sambaDrive}.device}/${folder}";
|
||||||
|
fsType = "cifs";
|
||||||
|
options = ceres.${sambaDrive}.options ++ [
|
||||||
|
"credentials=${sambaSecrets}"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
@ -58,7 +69,10 @@ in
|
||||||
}
|
}
|
||||||
// (builtins.listToAttrs (map storageMounts storageDrives))
|
// (builtins.listToAttrs (map storageMounts storageDrives))
|
||||||
// (builtins.listToAttrs (
|
// (builtins.listToAttrs (
|
||||||
builtins.concatMap (drive: map (folder: sambaMounts drive folder) sambaFolders) sambaDrives
|
builtins.concatMap (drive: map (folder: ceresMounts drive folder) ceresFolders) ceresDrives
|
||||||
|
))
|
||||||
|
// (builtins.listToAttrs (
|
||||||
|
builtins.concatMap (drive: map (folder: erisMounts drive folder) erisFolders) erisDrives
|
||||||
));
|
));
|
||||||
|
|
||||||
swapDevices = [
|
swapDevices = [
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue