mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-08-08 21:04:38 -05:00
refactor: abstacted records
This commit is contained in:
parent
64572cb106
commit
06a684fa32
42 changed files with 211 additions and 202 deletions
|
@ -176,10 +176,106 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = {
|
config =
|
||||||
people = import ./users;
|
let
|
||||||
services = import ./instances;
|
moduleFunctions = {
|
||||||
machines = import ./devices;
|
devicesFunctions = {
|
||||||
aesthetics = import ./themes;
|
ownerWriteOthersReadMask = [
|
||||||
|
"fmask=0022"
|
||||||
|
"dmask=0022"
|
||||||
|
];
|
||||||
|
ownerExclusiveReadWriteMask = [
|
||||||
|
"fmask=0077"
|
||||||
|
"dmask=0077"
|
||||||
|
];
|
||||||
|
readWritePermissions = [
|
||||||
|
"rw"
|
||||||
|
];
|
||||||
|
sambaPermissions = [
|
||||||
|
"rw"
|
||||||
|
"gid=100"
|
||||||
|
"vers=3.0"
|
||||||
|
"x-systemd.automount"
|
||||||
|
"x-systemd.requires=network-online.target"
|
||||||
|
];
|
||||||
|
sshfsOptions = [
|
||||||
|
"allow_other"
|
||||||
|
"_netdev"
|
||||||
|
"x-systemd.automount"
|
||||||
|
"reconnect"
|
||||||
|
"user"
|
||||||
|
"ServerAliveInterval=15"
|
||||||
|
"IdentityFile=/var/run/secrets/ssh/private"
|
||||||
|
];
|
||||||
|
fileModeAndDirMode = [
|
||||||
|
"file_mode=0644"
|
||||||
|
"dir_mode=0755"
|
||||||
|
];
|
||||||
|
userIdForUser0 = [
|
||||||
|
"uid=1000"
|
||||||
|
];
|
||||||
|
userIdForUser1 = [
|
||||||
|
"uid=1002"
|
||||||
|
];
|
||||||
|
dummy = [
|
||||||
|
];
|
||||||
|
ceresStorageDriveName = "NAS1";
|
||||||
|
ceresIP = "192.168.50.140";
|
||||||
|
deimosIP = "192.168.50.142";
|
||||||
|
marsIP = "192.168.50.218";
|
||||||
|
phoneIP = "192.168.50.243";
|
||||||
|
phobosIP = "192.168.50.180";
|
||||||
|
synologyIP = "192.168.50.210";
|
||||||
|
brotherIP = "192.168.50.195";
|
||||||
|
externalIP = "24.76.173.0";
|
||||||
|
};
|
||||||
|
|
||||||
|
instancesFunctions = {
|
||||||
|
domain0 = "cloudbert.fun";
|
||||||
|
domain1 = "the-nutrivore.social";
|
||||||
|
domain2 = "the-nutrivore.com";
|
||||||
|
domain3 = "uprootnutrition.com";
|
||||||
|
servicePath = "/mnt/media/NAS1";
|
||||||
|
sopsPath = "/var/lib/secrets";
|
||||||
|
sslPath = "/var/lib/acme";
|
||||||
|
varLib = "/var/lib";
|
||||||
|
dummy = "";
|
||||||
|
};
|
||||||
|
|
||||||
|
themesFunctions = {
|
||||||
|
brogrammer = "brogrammer";
|
||||||
|
catppuccin-frappe = "catppuccin-frappe";
|
||||||
|
catppuccin-latte = "catppuccin-latte";
|
||||||
|
catppuccin-macchiato = "catppuccin-macchiato";
|
||||||
|
catppuccin-mocha = "catppuccin-mocha";
|
||||||
|
chalk = "chalk";
|
||||||
|
deep-oceanic-next = "deep-oceanic-next";
|
||||||
|
dracula = "dracula";
|
||||||
|
espresso = "espresso";
|
||||||
|
flat = "flat";
|
||||||
|
framer = "framer";
|
||||||
|
github = "github";
|
||||||
|
hardcore = "hardcore";
|
||||||
|
one-black = "one-black";
|
||||||
|
one-dark = "one-dark";
|
||||||
|
one-light = "one light";
|
||||||
|
sparky = "sparky";
|
||||||
|
};
|
||||||
|
|
||||||
|
usersFunctions = {
|
||||||
|
user0 = "nick";
|
||||||
|
user0Label = "Nick";
|
||||||
|
user1 = "streaming";
|
||||||
|
user1Label = "Streaming";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
inheritFunctions = { inherit moduleFunctions; };
|
||||||
|
in
|
||||||
|
{
|
||||||
|
people = import ./users inheritFunctions;
|
||||||
|
services = import ./instances inheritFunctions;
|
||||||
|
machines = import ./devices inheritFunctions;
|
||||||
|
aesthetics = import ./themes inheritFunctions;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ devicesFunctions }:
|
{ moduleFunctions }:
|
||||||
let
|
let
|
||||||
inherit (devicesFunctions)
|
inherit (moduleFunctions.devicesFunctions)
|
||||||
sshfsOptions
|
sshfsOptions
|
||||||
fileModeAndDirMode
|
fileModeAndDirMode
|
||||||
ceresStorageDriveName
|
ceresStorageDriveName
|
||||||
|
@ -10,6 +10,9 @@ let
|
||||||
userIdForUser0
|
userIdForUser0
|
||||||
ceresIP
|
ceresIP
|
||||||
;
|
;
|
||||||
|
inherit (moduleFunctions.usersFunctions) user0;
|
||||||
|
inherit (moduleFunctions.devicesFunctions) externalIP;
|
||||||
|
|
||||||
ceresName = "ceres";
|
ceresName = "ceres";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
@ -36,7 +39,7 @@ in
|
||||||
};
|
};
|
||||||
remote0 = {
|
remote0 = {
|
||||||
mount = "/mnt/media/remote";
|
mount = "/mnt/media/remote";
|
||||||
device = "nick@24.76.173.0:/mnt/media/${ceresStorageDriveName}";
|
device = "${user0}@${externalIP}:/mnt/media/${ceresStorageDriveName}";
|
||||||
options = sshfsOptions;
|
options = sshfsOptions;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ devicesFunctions }:
|
{ moduleFunctions }:
|
||||||
let
|
let
|
||||||
inherit (devicesFunctions)
|
inherit (moduleFunctions.devicesFunctions)
|
||||||
ownerWriteOthersReadMask
|
ownerWriteOthersReadMask
|
||||||
deimosIP
|
deimosIP
|
||||||
;
|
;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ devicesFunctions }:
|
{ moduleFunctions }:
|
||||||
let
|
let
|
||||||
inherit (devicesFunctions)
|
inherit (moduleFunctions.devicesFunctions)
|
||||||
ownerWriteOthersReadMask
|
ownerWriteOthersReadMask
|
||||||
readWritePermissions
|
readWritePermissions
|
||||||
marsIP
|
marsIP
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ devicesFunctions }:
|
{ moduleFunctions }:
|
||||||
let
|
let
|
||||||
inherit (devicesFunctions)
|
inherit (moduleFunctions.devicesFunctions)
|
||||||
ownerWriteOthersReadMask
|
ownerWriteOthersReadMask
|
||||||
phobosIP
|
phobosIP
|
||||||
;
|
;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ devicesFunctions }:
|
{ moduleFunctions }:
|
||||||
let
|
let
|
||||||
inherit (devicesFunctions)
|
inherit (moduleFunctions.devicesFunctions)
|
||||||
phoneIP
|
phoneIP
|
||||||
dummy
|
dummy
|
||||||
;
|
;
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
{ devicesFunctions }:
|
{ moduleFunctions }:
|
||||||
let
|
let
|
||||||
inherit (devicesFunctions)
|
inherit (moduleFunctions.devicesFunctions) dummy;
|
||||||
dummy
|
|
||||||
;
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
name = dummy;
|
name = dummy;
|
||||||
|
|
|
@ -1,9 +1,7 @@
|
||||||
{ devicesFunctions }:
|
{ moduleFunctions }:
|
||||||
let
|
let
|
||||||
inherit (devicesFunctions)
|
inherit (moduleFunctions.devicesFunctions) brotherIP dummy;
|
||||||
brotherIP
|
|
||||||
dummy
|
|
||||||
;
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
name = dummy;
|
name = dummy;
|
||||||
|
|
|
@ -1,15 +1,12 @@
|
||||||
{ devicesFunctions }:
|
{ moduleFunctions }:
|
||||||
let
|
let
|
||||||
inherit (devicesFunctions)
|
inherit (moduleFunctions.devicesFunctions)
|
||||||
sambaPermissions
|
sambaPermissions
|
||||||
userIdForUser0
|
userIdForUser0
|
||||||
userIdForUser1
|
userIdForUser1
|
||||||
synologyIP
|
synologyIP
|
||||||
;
|
;
|
||||||
|
inherit (moduleFunctions.usersFunctions) user0 user0Label user1;
|
||||||
user0 = "nick";
|
|
||||||
user1 = "streaming";
|
|
||||||
user0Name = "Nick";
|
|
||||||
synologyName = "synology";
|
synologyName = "synology";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
@ -24,13 +21,13 @@ in
|
||||||
# Nick Home Folder
|
# Nick Home Folder
|
||||||
folder0 = {
|
folder0 = {
|
||||||
mount = "/mnt/media/${synologyName}/${user0}";
|
mount = "/mnt/media/${synologyName}/${user0}";
|
||||||
device = "//${synologyIP}/homes/${user0Name}";
|
device = "//${synologyIP}/homes/${user0Label}";
|
||||||
options = sambaPermissions ++ userIdForUser0;
|
options = sambaPermissions ++ userIdForUser0;
|
||||||
};
|
};
|
||||||
# Streaming Folder
|
# Streaming Folder
|
||||||
folder1 = {
|
folder1 = {
|
||||||
mount = "/mnt/media/${synologyName}/${user1}";
|
mount = "/mnt/media/${synologyName}/${user1}";
|
||||||
device = "//${synologyIP}/homes/${user0Name}";
|
device = "//${synologyIP}/homes/${user0Label}";
|
||||||
options = sambaPermissions ++ userIdForUser1;
|
options = sambaPermissions ++ userIdForUser1;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,64 +1,16 @@
|
||||||
|
{ moduleFunctions }:
|
||||||
let
|
let
|
||||||
|
|
||||||
configPath = ./config;
|
configPath = ./config;
|
||||||
printerPath = configPath + /printers;
|
printerPath = configPath + /printers;
|
||||||
|
|
||||||
devicesFunctions = {
|
|
||||||
ownerWriteOthersReadMask = [
|
|
||||||
"fmask=0022"
|
|
||||||
"dmask=0022"
|
|
||||||
];
|
|
||||||
ownerExclusiveReadWriteMask = [
|
|
||||||
"fmask=0077"
|
|
||||||
"dmask=0077"
|
|
||||||
];
|
|
||||||
readWritePermissions = [
|
|
||||||
"rw"
|
|
||||||
];
|
|
||||||
sambaPermissions = [
|
|
||||||
"rw"
|
|
||||||
"gid=100"
|
|
||||||
"vers=3.0"
|
|
||||||
"x-systemd.automount"
|
|
||||||
"x-systemd.requires=network-online.target"
|
|
||||||
];
|
|
||||||
sshfsOptions = [
|
|
||||||
"allow_other"
|
|
||||||
"_netdev"
|
|
||||||
"x-systemd.automount"
|
|
||||||
"reconnect"
|
|
||||||
"user"
|
|
||||||
"ServerAliveInterval=15"
|
|
||||||
"IdentityFile=/var/run/secrets/ssh/private"
|
|
||||||
];
|
|
||||||
fileModeAndDirMode = [
|
|
||||||
"file_mode=0644"
|
|
||||||
"dir_mode=0755"
|
|
||||||
];
|
|
||||||
userIdForUser0 = [
|
|
||||||
"uid=1000"
|
|
||||||
];
|
|
||||||
userIdForUser1 = [
|
|
||||||
"uid=1002"
|
|
||||||
];
|
|
||||||
dummy = [
|
|
||||||
];
|
|
||||||
ceresStorageDriveName = "NAS1";
|
|
||||||
ceresIP = "192.168.50.140";
|
|
||||||
deimosIP = "192.168.50.142";
|
|
||||||
marsIP = "192.168.50.218";
|
|
||||||
phoneIP = "192.168.50.243";
|
|
||||||
phobosIP = "192.168.50.180";
|
|
||||||
synologyIP = "192.168.50.210";
|
|
||||||
brotherIP = "192.168.50.195";
|
|
||||||
};
|
|
||||||
|
|
||||||
deviceswithFunctions = builtins.listToAttrs (
|
deviceswithFunctions = builtins.listToAttrs (
|
||||||
map
|
map
|
||||||
(name: {
|
(name: {
|
||||||
name = builtins.substring 0 (builtins.stringLength name - 4) name;
|
name = builtins.substring 0 (builtins.stringLength name - 4) name;
|
||||||
value = import (configPath + "/${name}") {
|
value = import (configPath + "/${name}") {
|
||||||
inherit
|
inherit
|
||||||
devicesFunctions
|
moduleFunctions
|
||||||
;
|
;
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
|
@ -75,7 +27,7 @@ let
|
||||||
name = builtins.substring 0 (builtins.stringLength name - 4) name;
|
name = builtins.substring 0 (builtins.stringLength name - 4) name;
|
||||||
value = import (printerPath + "/${name}") {
|
value = import (printerPath + "/${name}") {
|
||||||
inherit
|
inherit
|
||||||
devicesFunctions
|
moduleFunctions
|
||||||
;
|
;
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ instancesFunctions }:
|
{ moduleFunctions }:
|
||||||
let
|
let
|
||||||
inherit (instancesFunctions)
|
inherit (moduleFunctions.instancesFunctions)
|
||||||
sslPath
|
sslPath
|
||||||
sopsPath
|
sopsPath
|
||||||
;
|
;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ instancesFunctions }:
|
{ moduleFunctions }:
|
||||||
let
|
let
|
||||||
inherit (instancesFunctions)
|
inherit (moduleFunctions.instancesFunctions)
|
||||||
domain0
|
domain0
|
||||||
servicePath
|
servicePath
|
||||||
sslPath
|
sslPath
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ instancesFunctions }:
|
{ moduleFunctions }:
|
||||||
let
|
let
|
||||||
inherit (instancesFunctions)
|
inherit (moduleFunctions.instancesFunctions)
|
||||||
sopsPath
|
sopsPath
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ instancesFunctions }:
|
{ moduleFunctions }:
|
||||||
let
|
let
|
||||||
inherit (instancesFunctions)
|
inherit (moduleFunctions.instancesFunctions)
|
||||||
domain3
|
domain3
|
||||||
servicePath
|
servicePath
|
||||||
sslPath
|
sslPath
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ instancesFunctions }:
|
{ moduleFunctions }:
|
||||||
let
|
let
|
||||||
inherit (instancesFunctions)
|
inherit (moduleFunctions.instancesFunctions)
|
||||||
domain0
|
domain0
|
||||||
servicePath
|
servicePath
|
||||||
sslPath
|
sslPath
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ instancesFunctions }:
|
{ moduleFunctions }:
|
||||||
let
|
let
|
||||||
inherit (instancesFunctions)
|
inherit (moduleFunctions.instancesFunctions)
|
||||||
domain0
|
domain0
|
||||||
servicePath
|
servicePath
|
||||||
sslPath
|
sslPath
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ instancesFunctions }:
|
{ moduleFunctions }:
|
||||||
let
|
let
|
||||||
inherit (instancesFunctions)
|
inherit (moduleFunctions.instancesFunctions)
|
||||||
domain0
|
domain0
|
||||||
servicePath
|
servicePath
|
||||||
sslPath
|
sslPath
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ instancesFunctions }:
|
{ moduleFunctions }:
|
||||||
let
|
let
|
||||||
inherit (instancesFunctions)
|
inherit (moduleFunctions.instancesFunctions)
|
||||||
domain3
|
domain3
|
||||||
servicePath
|
servicePath
|
||||||
sslPath
|
sslPath
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ instancesFunctions }:
|
{ moduleFunctions }:
|
||||||
let
|
let
|
||||||
inherit (instancesFunctions)
|
inherit (moduleFunctions.instancesFunctions)
|
||||||
servicePath
|
servicePath
|
||||||
sopsPath
|
sopsPath
|
||||||
;
|
;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ instancesFunctions }:
|
{ moduleFunctions }:
|
||||||
let
|
let
|
||||||
inherit (instancesFunctions)
|
inherit (moduleFunctions.instancesFunctions)
|
||||||
domain0
|
domain0
|
||||||
servicePath
|
servicePath
|
||||||
sslPath
|
sslPath
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ instancesFunctions }:
|
{ moduleFunctions }:
|
||||||
let
|
let
|
||||||
inherit (instancesFunctions)
|
inherit (moduleFunctions.instancesFunctions)
|
||||||
domain0
|
domain0
|
||||||
servicePath
|
servicePath
|
||||||
sslPath
|
sslPath
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ instancesFunctions }:
|
{ moduleFunctions }:
|
||||||
let
|
let
|
||||||
inherit (instancesFunctions)
|
inherit (moduleFunctions.instancesFunctions)
|
||||||
sopsPath
|
sopsPath
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ instancesFunctions }:
|
{ moduleFunctions }:
|
||||||
let
|
let
|
||||||
inherit (instancesFunctions)
|
inherit (moduleFunctions.instancesFunctions)
|
||||||
domain0
|
domain0
|
||||||
servicePath
|
servicePath
|
||||||
sslPath
|
sslPath
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ instancesFunctions }:
|
{ moduleFunctions }:
|
||||||
let
|
let
|
||||||
inherit (instancesFunctions)
|
inherit (moduleFunctions.instancesFunctions)
|
||||||
domain1
|
domain1
|
||||||
servicePath
|
servicePath
|
||||||
sslPath
|
sslPath
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ instancesFunctions }:
|
{ moduleFunctions }:
|
||||||
let
|
let
|
||||||
inherit (instancesFunctions)
|
inherit (moduleFunctions.instancesFunctions)
|
||||||
domain3
|
domain3
|
||||||
servicePath
|
servicePath
|
||||||
sslPath
|
sslPath
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ instancesFunctions }:
|
{ moduleFunctions }:
|
||||||
let
|
let
|
||||||
inherit (instancesFunctions)
|
inherit (moduleFunctions.instancesFunctions)
|
||||||
domain0
|
domain0
|
||||||
servicePath
|
servicePath
|
||||||
sslPath
|
sslPath
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ instancesFunctions }:
|
{ moduleFunctions }:
|
||||||
let
|
let
|
||||||
inherit (instancesFunctions)
|
inherit (moduleFunctions.instancesFunctions)
|
||||||
domain3
|
domain3
|
||||||
servicePath
|
servicePath
|
||||||
sslPath
|
sslPath
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ instancesFunctions }:
|
{ moduleFunctions }:
|
||||||
let
|
let
|
||||||
inherit (instancesFunctions)
|
inherit (moduleFunctions.instancesFunctions)
|
||||||
servicePath
|
servicePath
|
||||||
sopsPath
|
sopsPath
|
||||||
;
|
;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ instancesFunctions }:
|
{ moduleFunctions }:
|
||||||
let
|
let
|
||||||
inherit (instancesFunctions)
|
inherit (moduleFunctions.instancesFunctions)
|
||||||
sopsPath
|
sopsPath
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ instancesFunctions }:
|
{ moduleFunctions }:
|
||||||
let
|
let
|
||||||
inherit (instancesFunctions)
|
inherit (moduleFunctions.instancesFunctions)
|
||||||
domain0
|
domain0
|
||||||
servicePath
|
servicePath
|
||||||
sslPath
|
sslPath
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ instancesFunctions }:
|
{ moduleFunctions }:
|
||||||
let
|
let
|
||||||
inherit (instancesFunctions)
|
inherit (moduleFunctions.instancesFunctions)
|
||||||
dummy
|
dummy
|
||||||
;
|
;
|
||||||
in
|
in
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ instancesFunctions }:
|
{ moduleFunctions }:
|
||||||
let
|
let
|
||||||
inherit (instancesFunctions)
|
inherit (moduleFunctions.instancesFunctions)
|
||||||
domain0
|
domain0
|
||||||
sslPath
|
sslPath
|
||||||
sopsPath
|
sopsPath
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ instancesFunctions }:
|
{ moduleFunctions }:
|
||||||
let
|
let
|
||||||
inherit (instancesFunctions)
|
inherit (moduleFunctions.instancesFunctions)
|
||||||
sopsPath
|
sopsPath
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ instancesFunctions }:
|
{ moduleFunctions }:
|
||||||
let
|
let
|
||||||
inherit (instancesFunctions)
|
inherit (moduleFunctions.instancesFunctions)
|
||||||
domain3
|
domain3
|
||||||
sslPath
|
sslPath
|
||||||
sopsPath
|
sopsPath
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ instancesFunctions }:
|
{ moduleFunctions }:
|
||||||
let
|
let
|
||||||
inherit (instancesFunctions)
|
inherit (moduleFunctions.instancesFunctions)
|
||||||
domain0
|
domain0
|
||||||
servicePath
|
servicePath
|
||||||
sslPath
|
sslPath
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ instancesFunctions }:
|
{ moduleFunctions }:
|
||||||
let
|
let
|
||||||
inherit (instancesFunctions)
|
inherit (moduleFunctions.instancesFunctions)
|
||||||
domain0
|
domain0
|
||||||
domain1
|
domain1
|
||||||
domain2
|
domain2
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ instancesFunctions }:
|
{ moduleFunctions }:
|
||||||
let
|
let
|
||||||
inherit (instancesFunctions)
|
inherit (moduleFunctions.instancesFunctions)
|
||||||
sopsPath
|
sopsPath
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
|
@ -1,25 +1,14 @@
|
||||||
|
{ moduleFunctions }:
|
||||||
let
|
let
|
||||||
configPath = ./config;
|
configPath = ./config;
|
||||||
|
|
||||||
instancesFunctions = {
|
|
||||||
domain0 = "cloudbert.fun";
|
|
||||||
domain1 = "the-nutrivore.social";
|
|
||||||
domain2 = "the-nutrivore.com";
|
|
||||||
domain3 = "uprootnutrition.com";
|
|
||||||
servicePath = "/mnt/media/NAS1";
|
|
||||||
sopsPath = "/var/lib/secrets";
|
|
||||||
sslPath = "/var/lib/acme";
|
|
||||||
varLib = "/var/lib";
|
|
||||||
dummy = "";
|
|
||||||
};
|
|
||||||
|
|
||||||
instances = builtins.listToAttrs (
|
instances = builtins.listToAttrs (
|
||||||
map
|
map
|
||||||
(name: {
|
(name: {
|
||||||
name = builtins.substring 0 (builtins.stringLength name - 4) name;
|
name = builtins.substring 0 (builtins.stringLength name - 4) name;
|
||||||
value = import (configPath + "/${name}") {
|
value = import (configPath + "/${name}") {
|
||||||
inherit
|
inherit
|
||||||
instancesFunctions
|
moduleFunctions
|
||||||
;
|
;
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
|
|
|
@ -1,23 +1,7 @@
|
||||||
|
{ moduleFunctions }:
|
||||||
let
|
let
|
||||||
currentTheme0 = catppuccin-macchiato;
|
inherit (moduleFunctions) themesFunctions;
|
||||||
|
currentTheme0 = themesFunctions.catppuccin-macchiato;
|
||||||
brogrammer = "brogrammer";
|
|
||||||
catppuccin-frappe = "catppuccin-frappe";
|
|
||||||
catppuccin-latte = "catppuccin-latte";
|
|
||||||
catppuccin-macchiato = "catppuccin-macchiato";
|
|
||||||
catppuccin-mocha = "catppuccin-mocha";
|
|
||||||
chalk = "chalk";
|
|
||||||
deep-oceanic-next = "deep-oceanic-next";
|
|
||||||
dracula = "dracula";
|
|
||||||
espresso = "espresso";
|
|
||||||
flat = "flat";
|
|
||||||
framer = "framer";
|
|
||||||
github = "github";
|
|
||||||
hardcore = "hardcore";
|
|
||||||
one-black = "one-black";
|
|
||||||
one-dark = "one-dark";
|
|
||||||
one-light = "one light";
|
|
||||||
sparky = "sparky";
|
|
||||||
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
@ -48,23 +32,23 @@ in
|
||||||
onePath = /one;
|
onePath = /one;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
${brogrammer} = import (palettePath + /brogrammer);
|
${themesFunctions.brogrammer} = import (palettePath + /brogrammer);
|
||||||
${catppuccin-frappe} = import (palettePath + catppuccinPath + /frappe);
|
${themesFunctions.catppuccin-frappe} = import (palettePath + catppuccinPath + /frappe);
|
||||||
${catppuccin-latte} = import (palettePath + catppuccinPath + /latte);
|
${themesFunctions.catppuccin-latte} = import (palettePath + catppuccinPath + /latte);
|
||||||
${catppuccin-macchiato} = import (palettePath + catppuccinPath + /macchiato);
|
${themesFunctions.catppuccin-macchiato} = import (palettePath + catppuccinPath + /macchiato);
|
||||||
${catppuccin-mocha} = import (palettePath + catppuccinPath + /mocha);
|
${themesFunctions.catppuccin-mocha} = import (palettePath + catppuccinPath + /mocha);
|
||||||
${chalk} = import (palettePath + /chalk);
|
${themesFunctions.chalk} = import (palettePath + /chalk);
|
||||||
${deep-oceanic-next} = import (palettePath + /deep-oceanic-next);
|
${themesFunctions.deep-oceanic-next} = import (palettePath + /deep-oceanic-next);
|
||||||
${dracula} = import (palettePath + /dracula);
|
${themesFunctions.dracula} = import (palettePath + /dracula);
|
||||||
${espresso} = import (palettePath + /espresso);
|
${themesFunctions.espresso} = import (palettePath + /espresso);
|
||||||
${flat} = import (palettePath + /flat);
|
${themesFunctions.flat} = import (palettePath + /flat);
|
||||||
${framer} = import (palettePath + /framer);
|
${themesFunctions.framer} = import (palettePath + /framer);
|
||||||
${github} = import (palettePath + /github);
|
${themesFunctions.github} = import (palettePath + /github);
|
||||||
${hardcore} = import (palettePath + /hardcore);
|
${themesFunctions.hardcore} = import (palettePath + /hardcore);
|
||||||
${one-black} = import (palettePath + onePath + /black);
|
${themesFunctions.one-black} = import (palettePath + onePath + /black);
|
||||||
${one-dark} = import (palettePath + onePath + /dark);
|
${themesFunctions.one-dark} = import (palettePath + onePath + /dark);
|
||||||
${one-light} = import (palettePath + onePath + /light);
|
${themesFunctions.one-light} = import (palettePath + onePath + /light);
|
||||||
${sparky} = import (palettePath + /sparky);
|
${themesFunctions.sparky} = import (palettePath + /sparky);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,4 @@
|
||||||
{ user0 }:
|
{ user0 }:
|
||||||
let
|
|
||||||
inherit
|
|
||||||
user0
|
|
||||||
;
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
name = "Nick";
|
name = "Nick";
|
||||||
aliases = {
|
aliases = {
|
||||||
|
|
|
@ -1,9 +1,4 @@
|
||||||
{ user1 }:
|
{ user1 }:
|
||||||
let
|
|
||||||
inherit
|
|
||||||
user1
|
|
||||||
;
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
name = "Streaming";
|
name = "Streaming";
|
||||||
aliases = {
|
aliases = {
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
|
{ moduleFunctions }:
|
||||||
let
|
let
|
||||||
|
inherit (moduleFunctions) usersFunctions;
|
||||||
configPath = ./config;
|
configPath = ./config;
|
||||||
|
user0 = usersFunctions.user0;
|
||||||
user0 = "nick";
|
user1 = usersFunctions.user1;
|
||||||
user1 = "streaming";
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
inherit
|
inherit
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue