refactor: complete overhaul
|
@ -24,6 +24,7 @@ in let
|
||||||
userSubmodule = lib.types.submodule {
|
userSubmodule = lib.types.submodule {
|
||||||
options = {
|
options = {
|
||||||
name = stringType;
|
name = stringType;
|
||||||
|
label = stringType;
|
||||||
sshKeys = listType;
|
sshKeys = listType;
|
||||||
group = stringType;
|
group = stringType;
|
||||||
aliases = genOptions stringType "name";
|
aliases = genOptions stringType "name";
|
||||||
|
@ -154,8 +155,8 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
people = import ./users.nix;
|
people = import ./users;
|
||||||
services = import ./instances.nix;
|
services = import ./instances;
|
||||||
machines = import ./devices.nix;
|
machines = import ./devices;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,147 +0,0 @@
|
||||||
let
|
|
||||||
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"];
|
|
||||||
fileModeAndDirMode = ["file_mode=0644" "dir_mode=0755"];
|
|
||||||
userIdForUser0 = ["uid=1000"];
|
|
||||||
userIdForUser1 = ["uid=1001"];
|
|
||||||
in {
|
|
||||||
devices = {
|
|
||||||
# Desktop
|
|
||||||
desktop = {
|
|
||||||
label = "Desktop";
|
|
||||||
name = "desktop";
|
|
||||||
sync = "";
|
|
||||||
ip = {
|
|
||||||
address0 = "192.168.50.196";
|
|
||||||
};
|
|
||||||
boot = {
|
|
||||||
options = ownerWriteOthersReadMask;
|
|
||||||
};
|
|
||||||
storage0 = {
|
|
||||||
mount = "/mnt/media/games";
|
|
||||||
device = "/dev/disk/by-label/Games";
|
|
||||||
options = readWritePermissions;
|
|
||||||
};
|
|
||||||
storage1 = {
|
|
||||||
mount = "/mnt/media/storage";
|
|
||||||
device = "/dev/disk/by-label/Storage";
|
|
||||||
options = readWritePermissions;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# Laptop
|
|
||||||
|
|
||||||
laptop = {
|
|
||||||
label = "Laptop";
|
|
||||||
name = "laptop";
|
|
||||||
sync = "";
|
|
||||||
ip = {
|
|
||||||
address0 = "192.168.50.142";
|
|
||||||
};
|
|
||||||
boot = {
|
|
||||||
options = ownerWriteOthersReadMask;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# Server
|
|
||||||
|
|
||||||
server = let
|
|
||||||
serverName = "server";
|
|
||||||
serverIP = "192.168.50.140";
|
|
||||||
serverStorageDriveName = "NAS1";
|
|
||||||
in {
|
|
||||||
label = "Server";
|
|
||||||
name = serverName;
|
|
||||||
ip = {
|
|
||||||
address0 = serverIP;
|
|
||||||
};
|
|
||||||
boot = {
|
|
||||||
options = ownerExclusiveReadWriteMask;
|
|
||||||
};
|
|
||||||
storage0 = {
|
|
||||||
mount = "/mnt/media/${serverStorageDriveName}";
|
|
||||||
device = "/dev/disk/by-label/${serverStorageDriveName}";
|
|
||||||
options = readWritePermissions;
|
|
||||||
};
|
|
||||||
samba0 = {
|
|
||||||
mount = "/mnt/media/${serverName}";
|
|
||||||
device = "//${serverIP}";
|
|
||||||
options = sambaPermissions ++ fileModeAndDirMode ++ userIdForUser0;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# Synology
|
|
||||||
|
|
||||||
nas = let
|
|
||||||
user0 = "nick";
|
|
||||||
user1 = "garnet";
|
|
||||||
user0Name = "Nick";
|
|
||||||
user1Name = "Garnet";
|
|
||||||
nasName = "synology";
|
|
||||||
nasIP = "192.168.50.209";
|
|
||||||
in {
|
|
||||||
label = "Synology";
|
|
||||||
sync = "MWRGX2V-F5XKE5E-REP6ECT-OOPFBMF-22NHSMW-YFBU6MB-PLFUN63-R3MW2QX";
|
|
||||||
name = nasName;
|
|
||||||
ip = {
|
|
||||||
address0 = nasIP;
|
|
||||||
};
|
|
||||||
# Nick Home Folder
|
|
||||||
folder0 = {
|
|
||||||
mount = "/mnt/media/${nasName}/${user0}";
|
|
||||||
device = "//${nasIP}/homes/${user0Name}";
|
|
||||||
options = sambaPermissions ++ userIdForUser0;
|
|
||||||
};
|
|
||||||
# Garnet Home Folder
|
|
||||||
folder1 = {
|
|
||||||
mount = "/mnt/media/${nasName}/${user1}";
|
|
||||||
device = "//${nasIP}/homes/${user1Name}";
|
|
||||||
options = sambaPermissions ++ userIdForUser1;
|
|
||||||
};
|
|
||||||
# Minecraft Worlds
|
|
||||||
folder2 = {
|
|
||||||
mount = "/home/${user1}/.local/share/PrismLauncher/instances/1.21/.minecraft/saves";
|
|
||||||
device = "//${nasIP}/homes/${user1Name}/Minecraft";
|
|
||||||
options = sambaPermissions ++ userIdForUser1;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# Pixel 9
|
|
||||||
|
|
||||||
phone = {
|
|
||||||
name = "pixel";
|
|
||||||
sync = "RMDKNJY-BTX6FYF-G6SR332-WS6HARI-PF74SC6-VPBSGRQ-MKVQZEQ-KSIB6QV";
|
|
||||||
ip = {
|
|
||||||
address0 = "192.168.50.243";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# Printer
|
|
||||||
|
|
||||||
printer0 = {
|
|
||||||
label = "Canon-TR7620a";
|
|
||||||
ip = {
|
|
||||||
address0 = "";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
printer1 = {
|
|
||||||
label = "Brother-HL-2170W";
|
|
||||||
ip = {
|
|
||||||
address0 = "192.168.50.195";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# Samsung S7 FE
|
|
||||||
|
|
||||||
tablet = {
|
|
||||||
name = "tablet";
|
|
||||||
sync = "I2ZSCZU-T4JMUJJ-XCUQ3MY-G5EUFZ5-KRG2DRY-XIBJZZM-FQW3UMY-CBCTUQU";
|
|
||||||
ip = {
|
|
||||||
address0 = "192.168.50.189";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
27
config/devices/config/desktop.nix
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
{devicesFunctions}: let
|
||||||
|
inherit
|
||||||
|
(devicesFunctions)
|
||||||
|
ownerWriteOthersReadMask
|
||||||
|
readWritePermissions
|
||||||
|
;
|
||||||
|
in {
|
||||||
|
label = "Desktop";
|
||||||
|
name = "desktop";
|
||||||
|
sync = "";
|
||||||
|
ip = {
|
||||||
|
address0 = "192.168.50.196";
|
||||||
|
};
|
||||||
|
boot = {
|
||||||
|
options = ownerWriteOthersReadMask;
|
||||||
|
};
|
||||||
|
storage0 = {
|
||||||
|
mount = "/mnt/media/games";
|
||||||
|
device = "/dev/disk/by-label/Games";
|
||||||
|
options = readWritePermissions;
|
||||||
|
};
|
||||||
|
storage1 = {
|
||||||
|
mount = "/mnt/media/storage";
|
||||||
|
device = "/dev/disk/by-label/Storage";
|
||||||
|
options = readWritePermissions;
|
||||||
|
};
|
||||||
|
}
|
16
config/devices/config/laptop.nix
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
{devicesFunctions}: let
|
||||||
|
inherit
|
||||||
|
(devicesFunctions)
|
||||||
|
ownerWriteOthersReadMask
|
||||||
|
;
|
||||||
|
in {
|
||||||
|
label = "Laptop";
|
||||||
|
name = "laptop";
|
||||||
|
sync = "";
|
||||||
|
ip = {
|
||||||
|
address0 = "192.168.50.142";
|
||||||
|
};
|
||||||
|
boot = {
|
||||||
|
options = ownerWriteOthersReadMask;
|
||||||
|
};
|
||||||
|
}
|
13
config/devices/config/phone.nix
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
{devicesFunctions}: let
|
||||||
|
inherit
|
||||||
|
(devicesFunctions)
|
||||||
|
dummy
|
||||||
|
;
|
||||||
|
in {
|
||||||
|
name = "pixel";
|
||||||
|
label = dummy;
|
||||||
|
sync = "RMDKNJY-BTX6FYF-G6SR332-WS6HARI-PF74SC6-VPBSGRQ-MKVQZEQ-KSIB6QV";
|
||||||
|
ip = {
|
||||||
|
address0 = "192.168.50.243";
|
||||||
|
};
|
||||||
|
}
|
12
config/devices/config/printers/printer0.nix
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
{devicesFunctions}: let
|
||||||
|
inherit
|
||||||
|
(devicesFunctions)
|
||||||
|
dummy
|
||||||
|
;
|
||||||
|
in {
|
||||||
|
name = dummy;
|
||||||
|
label = "Canon-TR7620a";
|
||||||
|
ip = {
|
||||||
|
address0 = "";
|
||||||
|
};
|
||||||
|
}
|
12
config/devices/config/printers/printer1.nix
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
{devicesFunctions}: let
|
||||||
|
inherit
|
||||||
|
(devicesFunctions)
|
||||||
|
dummy
|
||||||
|
;
|
||||||
|
in {
|
||||||
|
name = dummy;
|
||||||
|
label = "Brother-HL-2170W";
|
||||||
|
ip = {
|
||||||
|
address0 = "192.168.50.195";
|
||||||
|
};
|
||||||
|
}
|
32
config/devices/config/server.nix
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
{devicesFunctions}: let
|
||||||
|
inherit
|
||||||
|
(devicesFunctions)
|
||||||
|
fileModeAndDirMode
|
||||||
|
ownerExclusiveReadWriteMask
|
||||||
|
readWritePermissions
|
||||||
|
sambaPermissions
|
||||||
|
userIdForUser0
|
||||||
|
;
|
||||||
|
serverName = "server";
|
||||||
|
serverIP = "192.168.50.140";
|
||||||
|
serverStorageDriveName = "NAS1";
|
||||||
|
in {
|
||||||
|
label = "Server";
|
||||||
|
name = serverName;
|
||||||
|
ip = {
|
||||||
|
address0 = serverIP;
|
||||||
|
};
|
||||||
|
boot = {
|
||||||
|
options = ownerExclusiveReadWriteMask;
|
||||||
|
};
|
||||||
|
storage0 = {
|
||||||
|
mount = "/mnt/media/${serverStorageDriveName}";
|
||||||
|
device = "/dev/disk/by-label/${serverStorageDriveName}";
|
||||||
|
options = readWritePermissions;
|
||||||
|
};
|
||||||
|
samba0 = {
|
||||||
|
mount = "/mnt/media/${serverName}";
|
||||||
|
device = "//${serverIP}";
|
||||||
|
options = sambaPermissions ++ fileModeAndDirMode ++ userIdForUser0;
|
||||||
|
};
|
||||||
|
}
|
40
config/devices/config/synology.nix
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
{devicesFunctions}: let
|
||||||
|
inherit
|
||||||
|
(devicesFunctions)
|
||||||
|
sambaPermissions
|
||||||
|
userIdForUser0
|
||||||
|
userIdForUser1
|
||||||
|
;
|
||||||
|
|
||||||
|
user0 = "nick";
|
||||||
|
user1 = "garnet";
|
||||||
|
user0Name = "Nick";
|
||||||
|
user1Name = "Garnet";
|
||||||
|
synologyName = "synology";
|
||||||
|
synologyIP = "192.168.50.209";
|
||||||
|
in {
|
||||||
|
label = "Synology";
|
||||||
|
sync = "MWRGX2V-F5XKE5E-REP6ECT-OOPFBMF-22NHSMW-YFBU6MB-PLFUN63-R3MW2QX";
|
||||||
|
name = synologyName;
|
||||||
|
ip = {
|
||||||
|
address0 = synologyIP;
|
||||||
|
};
|
||||||
|
# Nick Home Folder
|
||||||
|
folder0 = {
|
||||||
|
mount = "/mnt/media/${synologyName}/${user0}";
|
||||||
|
device = "//${synologyIP}/homes/${user0Name}";
|
||||||
|
options = sambaPermissions ++ userIdForUser0;
|
||||||
|
};
|
||||||
|
# Garnet Home Folder
|
||||||
|
folder1 = {
|
||||||
|
mount = "/mnt/media/${synologyName}/${user1}";
|
||||||
|
device = "//${synologyIP}/homes/${user1Name}";
|
||||||
|
options = sambaPermissions ++ userIdForUser1;
|
||||||
|
};
|
||||||
|
# Minecraft Worlds
|
||||||
|
folder2 = {
|
||||||
|
mount = "/home/${user1}/.local/share/PrismLauncher/instances/1.21/.minecraft/saves";
|
||||||
|
device = "//${synologyIP}/homes/${user1Name}/Minecraft";
|
||||||
|
options = sambaPermissions ++ userIdForUser1;
|
||||||
|
};
|
||||||
|
}
|
13
config/devices/config/tablet.nix
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
{devicesFunctions}: let
|
||||||
|
inherit
|
||||||
|
(devicesFunctions)
|
||||||
|
dummy
|
||||||
|
;
|
||||||
|
in {
|
||||||
|
name = "tablet";
|
||||||
|
label = dummy;
|
||||||
|
sync = "I2ZSCZU-T4JMUJJ-XCUQ3MY-G5EUFZ5-KRG2DRY-XIBJZZM-FQW3UMY-CBCTUQU";
|
||||||
|
ip = {
|
||||||
|
address0 = "192.168.50.189";
|
||||||
|
};
|
||||||
|
}
|
35
config/devices/default.nix
Executable file
|
@ -0,0 +1,35 @@
|
||||||
|
let
|
||||||
|
configPath = ./config;
|
||||||
|
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"];
|
||||||
|
fileModeAndDirMode = ["file_mode=0644" "dir_mode=0755"];
|
||||||
|
userIdForUser0 = ["uid=1000"];
|
||||||
|
userIdForUser1 = ["uid=1001"];
|
||||||
|
dummy = [];
|
||||||
|
};
|
||||||
|
|
||||||
|
deviceswithFunctions = builtins.listToAttrs (map (name: {
|
||||||
|
name = builtins.substring 0 (builtins.stringLength name - 4) name; # Remove the last 4 characters (".nix")
|
||||||
|
value = import (configPath + "/${name}") {inherit devicesFunctions;};
|
||||||
|
})
|
||||||
|
(builtins.filter (name:
|
||||||
|
builtins.match ".*\\.nix$" name != null) (builtins.attrNames
|
||||||
|
(builtins.readDir configPath))));
|
||||||
|
|
||||||
|
devicesPrinters = builtins.listToAttrs (map (name: {
|
||||||
|
name = builtins.substring 0 (builtins.stringLength name - 4) name; # Remove the last 4 characters (".nix")
|
||||||
|
value = import (printerPath + "/${name}") {inherit devicesFunctions;};
|
||||||
|
})
|
||||||
|
(builtins.filter (name:
|
||||||
|
builtins.match ".*\\.nix$" name != null) (builtins.attrNames
|
||||||
|
(builtins.readDir printerPath))));
|
||||||
|
|
||||||
|
devices = deviceswithFunctions // devicesPrinters;
|
||||||
|
in {
|
||||||
|
devices = devices;
|
||||||
|
}
|
|
@ -1,431 +0,0 @@
|
||||||
let
|
|
||||||
jellyfinLabel = "Jellyfin";
|
|
||||||
jellyfinName = "jellyfin";
|
|
||||||
|
|
||||||
domain0 = "cloudbert.fun";
|
|
||||||
domain1 = "the-nutrivore.social";
|
|
||||||
domain2 = "the-nutrivore.com";
|
|
||||||
|
|
||||||
servicePath = "/mnt/media/NAS1";
|
|
||||||
|
|
||||||
sops = "/var/lib/secrets";
|
|
||||||
|
|
||||||
sslPath = "/var/lib/acme";
|
|
||||||
|
|
||||||
varLib = "/var/lib";
|
|
||||||
in {
|
|
||||||
instances = {
|
|
||||||
web = {
|
|
||||||
domains = {
|
|
||||||
url0 = domain0;
|
|
||||||
url1 = domain1;
|
|
||||||
url2 = domain2;
|
|
||||||
};
|
|
||||||
dns = {
|
|
||||||
provider0 = "namecheap";
|
|
||||||
};
|
|
||||||
localhost = {
|
|
||||||
address0 = "127.0.0.1"; # Local
|
|
||||||
address1 = "0.0.0.0"; # All
|
|
||||||
address2 = "192.168.50.1"; # Router
|
|
||||||
address3 = "192.168.50.0"; # Router
|
|
||||||
};
|
|
||||||
};
|
|
||||||
acme = let
|
|
||||||
acmeLabel = "Acme";
|
|
||||||
acmeName = "acme";
|
|
||||||
in {
|
|
||||||
label = acmeLabel;
|
|
||||||
name = acmeName;
|
|
||||||
paths = {
|
|
||||||
path0 = sslPath;
|
|
||||||
};
|
|
||||||
sops = {
|
|
||||||
path0 = "${sops}/${acmeName}";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
caddy = let
|
|
||||||
caddyLabel = "Caddy";
|
|
||||||
caddyName = "caddy";
|
|
||||||
in {
|
|
||||||
label = caddyLabel;
|
|
||||||
name = caddyName;
|
|
||||||
sops = {
|
|
||||||
path0 = "${sops}/${caddyName}";
|
|
||||||
};
|
|
||||||
ports = {
|
|
||||||
port0 = 80;
|
|
||||||
port1 = 443;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
castopod = let
|
|
||||||
castopodLabel = "Castopod";
|
|
||||||
castopodName = "castopod";
|
|
||||||
castopodSubdomain = "podcast";
|
|
||||||
in {
|
|
||||||
label = castopodLabel;
|
|
||||||
name = castopodName;
|
|
||||||
email = {
|
|
||||||
address0 = "noreply@${castopodSubdomain}.${domain1}";
|
|
||||||
};
|
|
||||||
sops = {
|
|
||||||
path0 = "${sops}/${castopodName}";
|
|
||||||
};
|
|
||||||
subdomain = castopodSubdomain;
|
|
||||||
paths = {
|
|
||||||
path0 = "${servicePath}/${castopodLabel}";
|
|
||||||
};
|
|
||||||
ports = {
|
|
||||||
port0 = 8000;
|
|
||||||
};
|
|
||||||
ssl = {
|
|
||||||
cert = "${sslPath}/${castopodSubdomain}.${domain1}/fullchain.pem";
|
|
||||||
key = "${sslPath}/${castopodSubdomain}.${domain1}/key.pem";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
forgejo = let
|
|
||||||
forgejoLabel = "Forgejo";
|
|
||||||
forgejoName = "forgejo";
|
|
||||||
forgejoSubdomain = "source";
|
|
||||||
in {
|
|
||||||
label = forgejoLabel;
|
|
||||||
name = forgejoName;
|
|
||||||
email = {
|
|
||||||
address0 = "noreply@${forgejoSubdomain}.${domain1}";
|
|
||||||
};
|
|
||||||
sops = {
|
|
||||||
path0 = "${sops}/${forgejoName}";
|
|
||||||
};
|
|
||||||
subdomain = forgejoSubdomain;
|
|
||||||
paths = {
|
|
||||||
path0 = "${servicePath}/${forgejoLabel}";
|
|
||||||
};
|
|
||||||
ports = {
|
|
||||||
port0 = 3033;
|
|
||||||
};
|
|
||||||
ssl = {
|
|
||||||
cert = "${sslPath}/${forgejoSubdomain}.${domain1}/fullchain.pem";
|
|
||||||
key = "${sslPath}/${forgejoSubdomain}.${domain1}/key.pem";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
jellyfin = {
|
|
||||||
label = jellyfinLabel;
|
|
||||||
name = jellyfinName;
|
|
||||||
sops = {
|
|
||||||
path0 = "${sops}/${jellyfinName}";
|
|
||||||
};
|
|
||||||
subdomain = jellyfinName;
|
|
||||||
paths = {
|
|
||||||
path0 = "${servicePath}/${jellyfinLabel}";
|
|
||||||
};
|
|
||||||
ports = {
|
|
||||||
port0 = 5055; # Jellyseer
|
|
||||||
port1 = 8096; # Jellyfin HTTP
|
|
||||||
port2 = 8920; # Jellyfin HTTPS
|
|
||||||
};
|
|
||||||
ssl = {
|
|
||||||
cert = "${sslPath}/${jellyfinName}.${domain0}/fullchain.pem";
|
|
||||||
key = "${sslPath}/${jellyfinName}.${domain0}/key.pem";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
matrix = let
|
|
||||||
matrixLabel = "Matrix";
|
|
||||||
matrixName = "matrix";
|
|
||||||
in {
|
|
||||||
label = matrixLabel;
|
|
||||||
name = matrixName;
|
|
||||||
sops = {
|
|
||||||
path0 = "${sops}/${matrixName}";
|
|
||||||
};
|
|
||||||
subdomain = matrixName;
|
|
||||||
paths = {
|
|
||||||
path0 = "${servicePath}/${matrixLabel}";
|
|
||||||
path1 = "";
|
|
||||||
path2 = "";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
mastodon = let
|
|
||||||
mastodonLabel = "Mastodon";
|
|
||||||
mastodonName = "mastodon";
|
|
||||||
in {
|
|
||||||
label = mastodonLabel;
|
|
||||||
name = mastodonName;
|
|
||||||
email = {
|
|
||||||
address0 = "thenutrivore@${domain1}";
|
|
||||||
};
|
|
||||||
sops = {
|
|
||||||
path0 = "${sops}/${mastodonName}";
|
|
||||||
};
|
|
||||||
paths = {
|
|
||||||
path0 = "${servicePath}/${mastodonLabel}";
|
|
||||||
path1 = "";
|
|
||||||
path2 = "";
|
|
||||||
};
|
|
||||||
ssl = {
|
|
||||||
cert = "${sslPath}/${domain1}/fullchain.pem";
|
|
||||||
key = "${sslPath}/${domain1}/key.pem";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
minecraft = let
|
|
||||||
minecraftLabel = "Minecraft";
|
|
||||||
minecraftName = "minecraft";
|
|
||||||
in {
|
|
||||||
label = minecraftLabel;
|
|
||||||
name = minecraftName;
|
|
||||||
sops = {
|
|
||||||
path0 = "${sops}/${minecraftName}";
|
|
||||||
};
|
|
||||||
subdomain = minecraftName;
|
|
||||||
paths = {
|
|
||||||
path0 = "${servicePath}/${minecraftLabel}";
|
|
||||||
};
|
|
||||||
ports = {
|
|
||||||
port0 = 43000; # Minecraft (Brix on Nix)
|
|
||||||
};
|
|
||||||
ssl = {
|
|
||||||
cert = "${sslPath}/${minecraftName}.${domain0}/fullchain.pem";
|
|
||||||
key = "${sslPath}/${minecraftName}.${domain0}/key.pem";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
nextcloud = let
|
|
||||||
nextcloudLabel = "Nextcloud";
|
|
||||||
nextcloudName = "nextcloud";
|
|
||||||
in {
|
|
||||||
label = nextcloudLabel;
|
|
||||||
name = nextcloudName;
|
|
||||||
sops = {
|
|
||||||
path0 = "${sops}/${nextcloudName}";
|
|
||||||
};
|
|
||||||
subdomain = nextcloudName;
|
|
||||||
paths = {
|
|
||||||
path0 = "${servicePath}/${nextcloudLabel}";
|
|
||||||
};
|
|
||||||
ports = {
|
|
||||||
port0 = 8354; # Nextcloud
|
|
||||||
};
|
|
||||||
ssl = {
|
|
||||||
cert = "${sslPath}/${nextcloudName}.${domain1}/fullchain.pem";
|
|
||||||
key = "${sslPath}/${nextcloudName}.${domain1}/key.pem";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
nginx = {
|
|
||||||
ports = {
|
|
||||||
port0 = 8080; # HTTP
|
|
||||||
port1 = 8443; # HTTPS
|
|
||||||
};
|
|
||||||
};
|
|
||||||
ollama = let
|
|
||||||
ollamaLabel = "Ollama";
|
|
||||||
ollamaName = "ollama";
|
|
||||||
in {
|
|
||||||
label = ollamaLabel;
|
|
||||||
name = ollamaName;
|
|
||||||
sops = {
|
|
||||||
path0 = "${sops}/${ollamaName}";
|
|
||||||
};
|
|
||||||
subdomain = ollamaName;
|
|
||||||
paths = {
|
|
||||||
path0 = "${servicePath}/${ollamaLabel}";
|
|
||||||
path1 = "/mnt/media/storage/${ollamaName}";
|
|
||||||
};
|
|
||||||
ports = {
|
|
||||||
port0 = 8088; # Open-WebUI (Ollama Front End)
|
|
||||||
port1 = 11434; # Ollama API
|
|
||||||
};
|
|
||||||
ssl = {
|
|
||||||
cert = "${sslPath}/${ollamaName}.${domain0}/fullchain.pem";
|
|
||||||
key = "${sslPath}/${ollamaName}.${domain0}/key.pem";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
owncast = let
|
|
||||||
owncastLabel = "Owncast";
|
|
||||||
owncastName = "owncast";
|
|
||||||
owncastSubdomain = "stream";
|
|
||||||
in {
|
|
||||||
label = owncastLabel;
|
|
||||||
name = owncastName;
|
|
||||||
sops = {
|
|
||||||
path0 = "${sops}/${owncastName}";
|
|
||||||
};
|
|
||||||
subdomain = owncastSubdomain;
|
|
||||||
paths = {
|
|
||||||
path0 = "${servicePath}/${owncastLabel}";
|
|
||||||
path1 = "/mnt/media/storage/${owncastName}";
|
|
||||||
};
|
|
||||||
ports = {
|
|
||||||
port0 = 9454;
|
|
||||||
port1 = 1935;
|
|
||||||
};
|
|
||||||
ssl = {
|
|
||||||
cert = "${sslPath}/${owncastSubdomain}.${domain1}/fullchain.pem";
|
|
||||||
key = "${sslPath}/${owncastSubdomain}.${domain1}/key.pem";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
peertube = let
|
|
||||||
peertubeLabel = "PeerTube";
|
|
||||||
peertubeName = "peertube";
|
|
||||||
peertubeSubdomain = "video";
|
|
||||||
in {
|
|
||||||
label = peertubeLabel;
|
|
||||||
name = peertubeName;
|
|
||||||
email = {
|
|
||||||
address0 = "noreply@${peertubeSubdomain}.${domain1}";
|
|
||||||
};
|
|
||||||
sops = {
|
|
||||||
path0 = "${sops}/${peertubeName}";
|
|
||||||
};
|
|
||||||
subdomain = peertubeSubdomain;
|
|
||||||
paths = {
|
|
||||||
path0 = "${servicePath}/${peertubeLabel}";
|
|
||||||
};
|
|
||||||
ports = {
|
|
||||||
port0 = 9000; # HTTP
|
|
||||||
port1 = 1935;
|
|
||||||
port2 = 1936;
|
|
||||||
port3 = 5432;
|
|
||||||
port4 = 52800;
|
|
||||||
};
|
|
||||||
ssl = {
|
|
||||||
cert = "${sslPath}/video.${domain1}/fullchain.pem";
|
|
||||||
key = "${sslPath}/video.${domain1}/key.pem";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
postgresql = let
|
|
||||||
postgresLabel = "PostgreSQL";
|
|
||||||
postgresName = "postgres";
|
|
||||||
in {
|
|
||||||
label = postgresLabel;
|
|
||||||
name = postgresName;
|
|
||||||
sops = {
|
|
||||||
path0 = "${sops}/${postgresName}";
|
|
||||||
};
|
|
||||||
paths = {
|
|
||||||
path0 = "${servicePath}/${postgresLabel}";
|
|
||||||
};
|
|
||||||
ports = {
|
|
||||||
port0 = 5432;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
samba = let
|
|
||||||
sambaLabel = "Samba";
|
|
||||||
sambaName = "samba";
|
|
||||||
in {
|
|
||||||
label = sambaLabel;
|
|
||||||
name = sambaName;
|
|
||||||
sops = {
|
|
||||||
path0 = "${sops}/${sambaName}";
|
|
||||||
};
|
|
||||||
paths = {
|
|
||||||
path0 = "${servicePath}/${jellyfinLabel}";
|
|
||||||
path1 = jellyfinName;
|
|
||||||
path2 = "";
|
|
||||||
};
|
|
||||||
ports = {
|
|
||||||
port0 = 445; # Samba
|
|
||||||
};
|
|
||||||
};
|
|
||||||
syncthing = let
|
|
||||||
syncthingLabel = "Syncthing";
|
|
||||||
syncthingName = "syncthing";
|
|
||||||
in {
|
|
||||||
label = syncthingLabel;
|
|
||||||
name = syncthingName;
|
|
||||||
sops = {
|
|
||||||
path0 = "${sops}/${syncthingName}";
|
|
||||||
};
|
|
||||||
subdomain = syncthingName;
|
|
||||||
ports = {
|
|
||||||
port0 = 8388; # Syncthing (WebUI)
|
|
||||||
port1 = 21027; # Syncthing (Discovery)
|
|
||||||
port2 = 22000; # Syncthing (Transfer)
|
|
||||||
};
|
|
||||||
ssl = {
|
|
||||||
cert = "${sslPath}/${syncthingName}.${domain0}/fullchain.pem";
|
|
||||||
key = "${sslPath}/${syncthingName}.${domain0}/key.pem";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
synology = let
|
|
||||||
synologyLabel = "Synology";
|
|
||||||
synologyName = "synology";
|
|
||||||
in {
|
|
||||||
label = synologyLabel;
|
|
||||||
name = synologyName;
|
|
||||||
sops = {
|
|
||||||
path0 = "${sops}/${synologyName}";
|
|
||||||
};
|
|
||||||
ports = {
|
|
||||||
port0 = 5001; # Synology HTTPS
|
|
||||||
};
|
|
||||||
};
|
|
||||||
vaultwarden = let
|
|
||||||
vaultwardenLabel = "Vaultwarden";
|
|
||||||
vaultwardenName = "vaultwarden";
|
|
||||||
in {
|
|
||||||
label = vaultwardenLabel;
|
|
||||||
name = vaultwardenName;
|
|
||||||
email = {
|
|
||||||
address0 = "noreply@${vaultwardenName}.${domain0}";
|
|
||||||
};
|
|
||||||
sops = {
|
|
||||||
path0 = "${sops}/${vaultwardenName}";
|
|
||||||
};
|
|
||||||
subdomain = vaultwardenName;
|
|
||||||
paths = {
|
|
||||||
path0 = "${servicePath}/${vaultwardenLabel}/BackupDir";
|
|
||||||
};
|
|
||||||
ports = {
|
|
||||||
port0 = 8085; # Vaultwarden WebUI
|
|
||||||
};
|
|
||||||
ssl = {
|
|
||||||
cert = "${sslPath}/${vaultwardenName}.${domain0}/fullchain.pem";
|
|
||||||
key = "${sslPath}/${vaultwardenName}.${domain0}/key.pem";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
wiki = let
|
|
||||||
wikiLabel = "Wiki-js";
|
|
||||||
wikiName = "wiki-js";
|
|
||||||
wikiSubdomain = "vault";
|
|
||||||
in {
|
|
||||||
label = wikiLabel;
|
|
||||||
name = wikiName;
|
|
||||||
sops = {
|
|
||||||
path0 = "${sops}/${wikiName}";
|
|
||||||
};
|
|
||||||
subdomain = wikiSubdomain;
|
|
||||||
paths = {
|
|
||||||
path0 = "${servicePath}/${wikiLabel}";
|
|
||||||
path1 = "${varLib}/DataDir";
|
|
||||||
};
|
|
||||||
ports = {
|
|
||||||
port0 = 3000;
|
|
||||||
port1 = 5432;
|
|
||||||
};
|
|
||||||
ssl = {
|
|
||||||
cert = "${sslPath}/${wikiSubdomain}.${domain1}/fullchain.pem";
|
|
||||||
key = "${sslPath}/${wikiSubdomain}.${domain1}/key.pem";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
writefreely = let
|
|
||||||
writefreelyLabel = "WriteFreely";
|
|
||||||
writefreelyName = "writefreely";
|
|
||||||
writefreelySubdomain = "blog";
|
|
||||||
in {
|
|
||||||
label = writefreelyLabel;
|
|
||||||
name = writefreelyName;
|
|
||||||
sops = {
|
|
||||||
path0 = "${sops}/${writefreelyName}";
|
|
||||||
};
|
|
||||||
subdomain = writefreelySubdomain;
|
|
||||||
paths = {
|
|
||||||
path0 = "${servicePath}/${writefreelyLabel}/BackupDir";
|
|
||||||
};
|
|
||||||
ports = {
|
|
||||||
port0 = 8093;
|
|
||||||
};
|
|
||||||
ssl = {
|
|
||||||
cert = "${sslPath}/${writefreelySubdomain}.${domain1}/fullchain.pem";
|
|
||||||
key = "${sslPath}/${writefreelySubdomain}.${domain1}/key.pem";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
15
config/instances/config/acme.nix
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
{instancesFunctions}: let
|
||||||
|
inherit (instancesFunctions) sslPath sopsPath;
|
||||||
|
|
||||||
|
acmeLabel = "Acme";
|
||||||
|
acmeName = "acme";
|
||||||
|
in {
|
||||||
|
label = acmeLabel;
|
||||||
|
name = acmeName;
|
||||||
|
paths = {
|
||||||
|
path0 = sslPath;
|
||||||
|
};
|
||||||
|
sops = {
|
||||||
|
path0 = "${sopsPath}/${acmeName}";
|
||||||
|
};
|
||||||
|
}
|
16
config/instances/config/caddy.nix
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
{instancesFunctions}: let
|
||||||
|
inherit (instancesFunctions) sopsPath;
|
||||||
|
|
||||||
|
caddyLabel = "Caddy";
|
||||||
|
caddyName = "caddy";
|
||||||
|
in {
|
||||||
|
label = caddyLabel;
|
||||||
|
name = caddyName;
|
||||||
|
sops = {
|
||||||
|
path0 = "${sopsPath}/${caddyName}";
|
||||||
|
};
|
||||||
|
ports = {
|
||||||
|
port0 = 80;
|
||||||
|
port1 = 443;
|
||||||
|
};
|
||||||
|
}
|
26
config/instances/config/castopod.nix
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
{instancesFunctions}: let
|
||||||
|
inherit (instancesFunctions) domain1 servicePath sslPath sopsPath;
|
||||||
|
castopodLabel = "Castopod";
|
||||||
|
castopodName = "castopod";
|
||||||
|
castopodSubdomain = "podcast";
|
||||||
|
in {
|
||||||
|
label = castopodLabel;
|
||||||
|
name = castopodName;
|
||||||
|
email = {
|
||||||
|
address0 = "noreply@${castopodSubdomain}.${domain1}";
|
||||||
|
};
|
||||||
|
sops = {
|
||||||
|
path0 = "${sopsPath}/${castopodName}";
|
||||||
|
};
|
||||||
|
subdomain = castopodSubdomain;
|
||||||
|
paths = {
|
||||||
|
path0 = "${servicePath}/${castopodLabel}";
|
||||||
|
};
|
||||||
|
ports = {
|
||||||
|
port0 = 8000;
|
||||||
|
};
|
||||||
|
ssl = {
|
||||||
|
cert = "${sslPath}/${castopodSubdomain}.${domain1}/fullchain.pem";
|
||||||
|
key = "${sslPath}/${castopodSubdomain}.${domain1}/key.pem";
|
||||||
|
};
|
||||||
|
}
|
27
config/instances/config/forgejo.nix
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
{instancesFunctions}: let
|
||||||
|
inherit (instancesFunctions) domain1 servicePath sslPath sopsPath;
|
||||||
|
|
||||||
|
forgejoLabel = "Forgejo";
|
||||||
|
forgejoName = "forgejo";
|
||||||
|
forgejoSubdomain = "source";
|
||||||
|
in {
|
||||||
|
label = forgejoLabel;
|
||||||
|
name = forgejoName;
|
||||||
|
email = {
|
||||||
|
address0 = "noreply@${forgejoSubdomain}.${domain1}";
|
||||||
|
};
|
||||||
|
sops = {
|
||||||
|
path0 = "${sopsPath}/${forgejoName}";
|
||||||
|
};
|
||||||
|
subdomain = forgejoSubdomain;
|
||||||
|
paths = {
|
||||||
|
path0 = "${servicePath}/${forgejoLabel}";
|
||||||
|
};
|
||||||
|
ports = {
|
||||||
|
port0 = 3033;
|
||||||
|
};
|
||||||
|
ssl = {
|
||||||
|
cert = "${sslPath}/${forgejoSubdomain}.${domain1}/fullchain.pem";
|
||||||
|
key = "${sslPath}/${forgejoSubdomain}.${domain1}/key.pem";
|
||||||
|
};
|
||||||
|
}
|
22
config/instances/config/jellyfin.nix
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
{instancesFunctions}: let
|
||||||
|
inherit (instancesFunctions) domain0 jellyfinLabel jellyfinName servicePath sslPath sopsPath;
|
||||||
|
in {
|
||||||
|
label = jellyfinLabel;
|
||||||
|
name = jellyfinName;
|
||||||
|
sops = {
|
||||||
|
path0 = "${sopsPath}/${jellyfinName}";
|
||||||
|
};
|
||||||
|
subdomain = jellyfinName;
|
||||||
|
paths = {
|
||||||
|
path0 = "${servicePath}/${jellyfinLabel}";
|
||||||
|
};
|
||||||
|
ports = {
|
||||||
|
port0 = 5055; # Jellyseer
|
||||||
|
port1 = 8096; # Jellyfin HTTP
|
||||||
|
port2 = 8920; # Jellyfin HTTPS
|
||||||
|
};
|
||||||
|
ssl = {
|
||||||
|
cert = "${sslPath}/${jellyfinName}.${domain0}/fullchain.pem";
|
||||||
|
key = "${sslPath}/${jellyfinName}.${domain0}/key.pem";
|
||||||
|
};
|
||||||
|
}
|
24
config/instances/config/mastodon.nix
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
{instancesFunctions}: let
|
||||||
|
inherit (instancesFunctions) domain1 servicePath sslPath sopsPath;
|
||||||
|
|
||||||
|
mastodonLabel = "Mastodon";
|
||||||
|
mastodonName = "mastodon";
|
||||||
|
in {
|
||||||
|
label = mastodonLabel;
|
||||||
|
name = mastodonName;
|
||||||
|
email = {
|
||||||
|
address0 = "thenutrivore@${domain1}";
|
||||||
|
};
|
||||||
|
sops = {
|
||||||
|
path0 = "${sopsPath}/${mastodonName}";
|
||||||
|
};
|
||||||
|
paths = {
|
||||||
|
path0 = "${servicePath}/${mastodonLabel}";
|
||||||
|
path1 = "";
|
||||||
|
path2 = "";
|
||||||
|
};
|
||||||
|
ssl = {
|
||||||
|
cert = "${sslPath}/${domain1}/fullchain.pem";
|
||||||
|
key = "${sslPath}/${domain1}/key.pem";
|
||||||
|
};
|
||||||
|
}
|
18
config/instances/config/matrix.nix
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
{instancesFunctions}: let
|
||||||
|
inherit (instancesFunctions) servicePath sopsPath;
|
||||||
|
|
||||||
|
matrixLabel = "Matrix";
|
||||||
|
matrixName = "matrix";
|
||||||
|
in {
|
||||||
|
label = matrixLabel;
|
||||||
|
name = matrixName;
|
||||||
|
sops = {
|
||||||
|
path0 = "${sopsPath}/${matrixName}";
|
||||||
|
};
|
||||||
|
subdomain = matrixName;
|
||||||
|
paths = {
|
||||||
|
path0 = "${servicePath}/${matrixLabel}";
|
||||||
|
path1 = "";
|
||||||
|
path2 = "";
|
||||||
|
};
|
||||||
|
}
|
23
config/instances/config/minecraft.nix
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
{instancesFunctions}: let
|
||||||
|
inherit (instancesFunctions) domain0 servicePath sslPath sopsPath;
|
||||||
|
|
||||||
|
minecraftLabel = "Minecraft";
|
||||||
|
minecraftName = "minecraft";
|
||||||
|
in {
|
||||||
|
label = minecraftLabel;
|
||||||
|
name = minecraftName;
|
||||||
|
sops = {
|
||||||
|
path0 = "${sopsPath}/${minecraftName}";
|
||||||
|
};
|
||||||
|
subdomain = minecraftName;
|
||||||
|
paths = {
|
||||||
|
path0 = "${servicePath}/${minecraftLabel}";
|
||||||
|
};
|
||||||
|
ports = {
|
||||||
|
port0 = 43000; # Minecraft (Brix on Nix)
|
||||||
|
};
|
||||||
|
ssl = {
|
||||||
|
cert = "${sslPath}/${minecraftName}.${domain0}/fullchain.pem";
|
||||||
|
key = "${sslPath}/${minecraftName}.${domain0}/key.pem";
|
||||||
|
};
|
||||||
|
}
|
23
config/instances/config/nextcloud.nix
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
{instancesFunctions}: let
|
||||||
|
inherit (instancesFunctions) domain1 servicePath sslPath sopsPath;
|
||||||
|
|
||||||
|
nextcloudLabel = "Nextcloud";
|
||||||
|
nextcloudName = "nextcloud";
|
||||||
|
in {
|
||||||
|
label = nextcloudLabel;
|
||||||
|
name = nextcloudName;
|
||||||
|
sops = {
|
||||||
|
path0 = "${sopsPath}/${nextcloudName}";
|
||||||
|
};
|
||||||
|
subdomain = nextcloudName;
|
||||||
|
paths = {
|
||||||
|
path0 = "${servicePath}/${nextcloudLabel}";
|
||||||
|
};
|
||||||
|
ports = {
|
||||||
|
port0 = 8354; # Nextcloud
|
||||||
|
};
|
||||||
|
ssl = {
|
||||||
|
cert = "${sslPath}/${nextcloudName}.${domain1}/fullchain.pem";
|
||||||
|
key = "${sslPath}/${nextcloudName}.${domain1}/key.pem";
|
||||||
|
};
|
||||||
|
}
|
16
config/instances/config/nginx.nix
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
{instancesFunctions}: let
|
||||||
|
inherit (instancesFunctions) sopsPath;
|
||||||
|
|
||||||
|
nginxLabel = "Ngnix";
|
||||||
|
nginxName = "nginx";
|
||||||
|
in {
|
||||||
|
name = nginxName;
|
||||||
|
label = nginxLabel;
|
||||||
|
sops = {
|
||||||
|
path0 = "${sopsPath}/${nginxName}";
|
||||||
|
};
|
||||||
|
ports = {
|
||||||
|
port0 = 8080; # HTTP
|
||||||
|
port1 = 8443; # HTTPS
|
||||||
|
};
|
||||||
|
}
|
25
config/instances/config/ollama.nix
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
{instancesFunctions}: let
|
||||||
|
inherit (instancesFunctions) domain0 servicePath sslPath sopsPath;
|
||||||
|
|
||||||
|
ollamaLabel = "Ollama";
|
||||||
|
ollamaName = "ollama";
|
||||||
|
in {
|
||||||
|
label = ollamaLabel;
|
||||||
|
name = ollamaName;
|
||||||
|
sops = {
|
||||||
|
path0 = "${sopsPath}/${ollamaName}";
|
||||||
|
};
|
||||||
|
subdomain = ollamaName;
|
||||||
|
paths = {
|
||||||
|
path0 = "${servicePath}/${ollamaLabel}";
|
||||||
|
path1 = "/mnt/media/storage/${ollamaName}";
|
||||||
|
};
|
||||||
|
ports = {
|
||||||
|
port0 = 8088; # Open-WebUI (Ollama Front End)
|
||||||
|
port1 = 11434; # Ollama API
|
||||||
|
};
|
||||||
|
ssl = {
|
||||||
|
cert = "${sslPath}/${ollamaName}.${domain0}/fullchain.pem";
|
||||||
|
key = "${sslPath}/${ollamaName}.${domain0}/key.pem";
|
||||||
|
};
|
||||||
|
}
|
26
config/instances/config/owncast.nix
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
{instancesFunctions}: let
|
||||||
|
inherit (instancesFunctions) domain1 servicePath sslPath sopsPath;
|
||||||
|
|
||||||
|
owncastLabel = "Owncast";
|
||||||
|
owncastName = "owncast";
|
||||||
|
owncastSubdomain = "stream";
|
||||||
|
in {
|
||||||
|
label = owncastLabel;
|
||||||
|
name = owncastName;
|
||||||
|
sops = {
|
||||||
|
path0 = "${sopsPath}/${owncastName}";
|
||||||
|
};
|
||||||
|
subdomain = owncastSubdomain;
|
||||||
|
paths = {
|
||||||
|
path0 = "${servicePath}/${owncastLabel}";
|
||||||
|
path1 = "/mnt/media/storage/${owncastName}";
|
||||||
|
};
|
||||||
|
ports = {
|
||||||
|
port0 = 9454;
|
||||||
|
port1 = 1935;
|
||||||
|
};
|
||||||
|
ssl = {
|
||||||
|
cert = "${sslPath}/${owncastSubdomain}.${domain1}/fullchain.pem";
|
||||||
|
key = "${sslPath}/${owncastSubdomain}.${domain1}/key.pem";
|
||||||
|
};
|
||||||
|
}
|
31
config/instances/config/peertube.nix
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
{instancesFunctions}: let
|
||||||
|
inherit (instancesFunctions) domain1 servicePath sslPath sopsPath;
|
||||||
|
|
||||||
|
peertubeLabel = "PeerTube";
|
||||||
|
peertubeName = "peertube";
|
||||||
|
peertubeSubdomain = "video";
|
||||||
|
in {
|
||||||
|
label = peertubeLabel;
|
||||||
|
name = peertubeName;
|
||||||
|
email = {
|
||||||
|
address0 = "noreply@${peertubeSubdomain}.${domain1}";
|
||||||
|
};
|
||||||
|
sops = {
|
||||||
|
path0 = "${sopsPath}/${peertubeName}";
|
||||||
|
};
|
||||||
|
subdomain = peertubeSubdomain;
|
||||||
|
paths = {
|
||||||
|
path0 = "${servicePath}/${peertubeLabel}";
|
||||||
|
};
|
||||||
|
ports = {
|
||||||
|
port0 = 9000; # HTTP
|
||||||
|
port1 = 1935;
|
||||||
|
port2 = 1936;
|
||||||
|
port3 = 5432;
|
||||||
|
port4 = 52800;
|
||||||
|
};
|
||||||
|
ssl = {
|
||||||
|
cert = "${sslPath}/video.${domain1}/fullchain.pem";
|
||||||
|
key = "${sslPath}/video.${domain1}/key.pem";
|
||||||
|
};
|
||||||
|
}
|
18
config/instances/config/postgresql.nix
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
{instancesFunctions}: let
|
||||||
|
inherit (instancesFunctions) servicePath sopsPath;
|
||||||
|
|
||||||
|
postgresLabel = "PostgreSQL";
|
||||||
|
postgresName = "postgres";
|
||||||
|
in {
|
||||||
|
label = postgresLabel;
|
||||||
|
name = postgresName;
|
||||||
|
sops = {
|
||||||
|
path0 = "${sopsPath}/${postgresName}";
|
||||||
|
};
|
||||||
|
paths = {
|
||||||
|
path0 = "${servicePath}/${postgresLabel}";
|
||||||
|
};
|
||||||
|
ports = {
|
||||||
|
port0 = 5432;
|
||||||
|
};
|
||||||
|
}
|
20
config/instances/config/samba.nix
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
{instancesFunctions}: let
|
||||||
|
inherit (instancesFunctions) jellyfinLabel jellyfinName servicePath sopsPath;
|
||||||
|
|
||||||
|
sambaLabel = "Samba";
|
||||||
|
sambaName = "samba";
|
||||||
|
in {
|
||||||
|
label = sambaLabel;
|
||||||
|
name = sambaName;
|
||||||
|
sops = {
|
||||||
|
path0 = "${sopsPath}/${sambaName}";
|
||||||
|
};
|
||||||
|
paths = {
|
||||||
|
path0 = "${servicePath}/${jellyfinLabel}";
|
||||||
|
path1 = jellyfinName;
|
||||||
|
path2 = "";
|
||||||
|
};
|
||||||
|
ports = {
|
||||||
|
port0 = 445; # Samba
|
||||||
|
};
|
||||||
|
}
|
22
config/instances/config/syncthing.nix
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
{instancesFunctions}: let
|
||||||
|
inherit (instancesFunctions) domain0 sslPath sopsPath;
|
||||||
|
|
||||||
|
syncthingLabel = "Syncthing";
|
||||||
|
syncthingName = "syncthing";
|
||||||
|
in {
|
||||||
|
label = syncthingLabel;
|
||||||
|
name = syncthingName;
|
||||||
|
sops = {
|
||||||
|
path0 = "${sopsPath}/${syncthingName}";
|
||||||
|
};
|
||||||
|
subdomain = syncthingName;
|
||||||
|
ports = {
|
||||||
|
port0 = 8388; # Syncthing (WebUI)
|
||||||
|
port1 = 21027; # Syncthing (Discovery)
|
||||||
|
port2 = 22000; # Syncthing (Transfer)
|
||||||
|
};
|
||||||
|
ssl = {
|
||||||
|
cert = "${sslPath}/${syncthingName}.${domain0}/fullchain.pem";
|
||||||
|
key = "${sslPath}/${syncthingName}.${domain0}/key.pem";
|
||||||
|
};
|
||||||
|
}
|
15
config/instances/config/synology.nix
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
{instancesFunctions}: let
|
||||||
|
inherit (instancesFunctions) sopsPath;
|
||||||
|
|
||||||
|
synologyLabel = "Synology";
|
||||||
|
synologyName = "synology";
|
||||||
|
in {
|
||||||
|
label = synologyLabel;
|
||||||
|
name = synologyName;
|
||||||
|
sops = {
|
||||||
|
path0 = "${sopsPath}/${synologyName}";
|
||||||
|
};
|
||||||
|
ports = {
|
||||||
|
port0 = 5001; # Synology HTTPS
|
||||||
|
};
|
||||||
|
}
|
26
config/instances/config/vaultwarden.nix
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
{instancesFunctions}: let
|
||||||
|
inherit (instancesFunctions) domain0 servicePath sslPath sopsPath;
|
||||||
|
|
||||||
|
vaultwardenLabel = "Vaultwarden";
|
||||||
|
vaultwardenName = "vaultwarden";
|
||||||
|
in {
|
||||||
|
label = vaultwardenLabel;
|
||||||
|
name = vaultwardenName;
|
||||||
|
email = {
|
||||||
|
address0 = "noreply@${vaultwardenName}.${domain0}";
|
||||||
|
};
|
||||||
|
sops = {
|
||||||
|
path0 = "${sopsPath}/${vaultwardenName}";
|
||||||
|
};
|
||||||
|
subdomain = vaultwardenName;
|
||||||
|
paths = {
|
||||||
|
path0 = "${servicePath}/${vaultwardenLabel}/BackupDir";
|
||||||
|
};
|
||||||
|
ports = {
|
||||||
|
port0 = 8085; # Vaultwarden WebUI
|
||||||
|
};
|
||||||
|
ssl = {
|
||||||
|
cert = "${sslPath}/${vaultwardenName}.${domain0}/fullchain.pem";
|
||||||
|
key = "${sslPath}/${vaultwardenName}.${domain0}/key.pem";
|
||||||
|
};
|
||||||
|
}
|
18
config/instances/config/web.nix
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
{instancesFunctions}: let
|
||||||
|
inherit (instancesFunctions) domain0 domain1 domain2;
|
||||||
|
in {
|
||||||
|
domains = {
|
||||||
|
url0 = domain0;
|
||||||
|
url1 = domain1;
|
||||||
|
url2 = domain2;
|
||||||
|
};
|
||||||
|
dns = {
|
||||||
|
provider0 = "namecheap";
|
||||||
|
};
|
||||||
|
localhost = {
|
||||||
|
address0 = "127.0.0.1"; # Local
|
||||||
|
address1 = "0.0.0.0"; # All
|
||||||
|
address2 = "192.168.50.1"; # Router
|
||||||
|
address3 = "192.168.50.0"; # Router
|
||||||
|
};
|
||||||
|
}
|
26
config/instances/config/wiki.nix
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
{instancesFunctions}: let
|
||||||
|
inherit (instancesFunctions) domain1 servicePath sslPath sopsPath varLib;
|
||||||
|
|
||||||
|
wikiLabel = "Wiki-js";
|
||||||
|
wikiName = "wiki-js";
|
||||||
|
wikiSubdomain = "vault";
|
||||||
|
in {
|
||||||
|
label = wikiLabel;
|
||||||
|
name = wikiName;
|
||||||
|
sops = {
|
||||||
|
path0 = "${sopsPath}/${wikiName}";
|
||||||
|
};
|
||||||
|
subdomain = wikiSubdomain;
|
||||||
|
paths = {
|
||||||
|
path0 = "${servicePath}/${wikiLabel}";
|
||||||
|
path1 = "${varLib}/DataDir";
|
||||||
|
};
|
||||||
|
ports = {
|
||||||
|
port0 = 3000;
|
||||||
|
port1 = 5432;
|
||||||
|
};
|
||||||
|
ssl = {
|
||||||
|
cert = "${sslPath}/${wikiSubdomain}.${domain1}/fullchain.pem";
|
||||||
|
key = "${sslPath}/${wikiSubdomain}.${domain1}/key.pem";
|
||||||
|
};
|
||||||
|
}
|
24
config/instances/config/writefreely.nix
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
{instancesFunctions}: let
|
||||||
|
inherit (instancesFunctions) domain1 servicePath sslPath sopsPath;
|
||||||
|
|
||||||
|
writefreelyLabel = "WriteFreely";
|
||||||
|
writefreelyName = "writefreely";
|
||||||
|
writefreelySubdomain = "blog";
|
||||||
|
in {
|
||||||
|
label = writefreelyLabel;
|
||||||
|
name = writefreelyName;
|
||||||
|
sops = {
|
||||||
|
path0 = "${sopsPath}/${writefreelyName}";
|
||||||
|
};
|
||||||
|
subdomain = writefreelySubdomain;
|
||||||
|
paths = {
|
||||||
|
path0 = "${servicePath}/${writefreelyLabel}/BackupDir";
|
||||||
|
};
|
||||||
|
ports = {
|
||||||
|
port0 = 8093;
|
||||||
|
};
|
||||||
|
ssl = {
|
||||||
|
cert = "${sslPath}/${writefreelySubdomain}.${domain1}/fullchain.pem";
|
||||||
|
key = "${sslPath}/${writefreelySubdomain}.${domain1}/key.pem";
|
||||||
|
};
|
||||||
|
}
|
25
config/instances/default.nix
Executable file
|
@ -0,0 +1,25 @@
|
||||||
|
let
|
||||||
|
configPath = ./config;
|
||||||
|
|
||||||
|
instancesFunctions = {
|
||||||
|
jellyfinLabel = "Jellyfin";
|
||||||
|
jellyfinName = "jellyfin";
|
||||||
|
domain0 = "cloudbert.fun";
|
||||||
|
domain1 = "the-nutrivore.social";
|
||||||
|
domain2 = "the-nutrivore.com";
|
||||||
|
servicePath = "/mnt/media/NAS1";
|
||||||
|
sopsPath = "/var/lib/secrets";
|
||||||
|
sslPath = "/var/lib/acme";
|
||||||
|
varLib = "/var/lib";
|
||||||
|
};
|
||||||
|
|
||||||
|
instances = builtins.listToAttrs (map (name: {
|
||||||
|
name = builtins.substring 0 (builtins.stringLength name - 4) name; # Remove the last 4 characters (".nix")
|
||||||
|
value = import (configPath + "/${name}") {inherit instancesFunctions;};
|
||||||
|
})
|
||||||
|
(builtins.filter (name:
|
||||||
|
builtins.match ".*\\.nix$" name != null) (builtins.attrNames
|
||||||
|
(builtins.readDir configPath))));
|
||||||
|
in {
|
||||||
|
instances = instances;
|
||||||
|
}
|
|
@ -1,36 +0,0 @@
|
||||||
let
|
|
||||||
user0 = "nick";
|
|
||||||
user1 = "garnet";
|
|
||||||
in {
|
|
||||||
inherit
|
|
||||||
user0
|
|
||||||
user1
|
|
||||||
;
|
|
||||||
users = {
|
|
||||||
"${user0}" = {
|
|
||||||
name = "Nick";
|
|
||||||
aliases = {
|
|
||||||
name0 = "BRBWaffles";
|
|
||||||
name1 = "brbwaffles";
|
|
||||||
name2 = "Nutrivore";
|
|
||||||
name3 = "nutrivore";
|
|
||||||
};
|
|
||||||
email = {
|
|
||||||
address0 = "nickjhiebert@proton.me";
|
|
||||||
address1 = "thenutrivore@proton.me";
|
|
||||||
};
|
|
||||||
paths = {
|
|
||||||
path0 = "/home/${user0}/Files/Projects"; # Git path
|
|
||||||
};
|
|
||||||
sshKeys = [
|
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBF9TmImDoYDpsW5VMFbOcuK3aH4TWRtx/xGxT3yUtEN nick@desktop"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
"${user1}" = {
|
|
||||||
name = "Garnet";
|
|
||||||
email = {
|
|
||||||
address0 = "ninaeffler@gmail.com";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
21
config/users/config/user0.nix
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
{user0}: let
|
||||||
|
inherit user0;
|
||||||
|
in {
|
||||||
|
name = "Nick";
|
||||||
|
aliases = {
|
||||||
|
name0 = "BRBWaffles";
|
||||||
|
name1 = "brbwaffles";
|
||||||
|
name2 = "Nutrivore";
|
||||||
|
name3 = "nutrivore";
|
||||||
|
};
|
||||||
|
email = {
|
||||||
|
address0 = "nickjhiebert@proton.me";
|
||||||
|
address1 = "thenutrivore@proton.me";
|
||||||
|
};
|
||||||
|
paths = {
|
||||||
|
path0 = "/home/${user0}/Files/Projects"; # Git path
|
||||||
|
};
|
||||||
|
sshKeys = [
|
||||||
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBF9TmImDoYDpsW5VMFbOcuK3aH4TWRtx/xGxT3yUtEN nick@desktop"
|
||||||
|
];
|
||||||
|
}
|
11
config/users/config/user1.nix
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
{user1}: let
|
||||||
|
inherit user1;
|
||||||
|
in {
|
||||||
|
name = "Garnet";
|
||||||
|
email = {
|
||||||
|
address0 = "ninaeffler@gmail.com";
|
||||||
|
};
|
||||||
|
paths = {
|
||||||
|
path0 = "/home/${user1}/Files/Projects"; # Git path
|
||||||
|
};
|
||||||
|
}
|
15
config/users/default.nix
Executable file
|
@ -0,0 +1,15 @@
|
||||||
|
let
|
||||||
|
configPath = ./config;
|
||||||
|
|
||||||
|
user0 = "nick";
|
||||||
|
user1 = "garnet";
|
||||||
|
in {
|
||||||
|
inherit
|
||||||
|
user0
|
||||||
|
user1
|
||||||
|
;
|
||||||
|
users = {
|
||||||
|
"${user0}" = import (configPath + "/user0.nix") {inherit user0;};
|
||||||
|
"${user1}" = import (configPath + "/user1.nix") {inherit user1;};
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,68 +1,38 @@
|
||||||
let
|
let
|
||||||
modulesPath = ./modules;
|
modulesPath = ./modules;
|
||||||
|
miscPath = modulesPath + "/misc";
|
||||||
|
|
||||||
|
moduleImport = path: nameTransform:
|
||||||
|
builtins.listToAttrs (
|
||||||
|
map
|
||||||
|
(name: {
|
||||||
|
name = nameTransform name;
|
||||||
|
value = import (path + "/${name}");
|
||||||
|
})
|
||||||
|
(
|
||||||
|
builtins.filter
|
||||||
|
(name: (builtins.readDir path).${name} == "regular" && builtins.match ".*\\.nix$" name != null)
|
||||||
|
(builtins.attrNames (builtins.readDir path))
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
modules =
|
modules =
|
||||||
builtins.foldl' (
|
moduleImport modulesPath (name: builtins.replaceStrings [".nix"] [""] name)
|
||||||
emptySet: importedModules:
|
// moduleImport miscPath (name: "misc-${builtins.replaceStrings [".nix"] [""] name}")
|
||||||
emptySet // importedModules
|
// (path:
|
||||||
) {} (map
|
builtins.listToAttrs (
|
||||||
(name: {
|
map
|
||||||
"${name}" = import (modulesPath + "/${name}");
|
(name: {
|
||||||
})
|
name = name;
|
||||||
[
|
value = import (path + "/${name}");
|
||||||
"bat"
|
})
|
||||||
"firefox"
|
(
|
||||||
"obs-studio"
|
builtins.filter
|
||||||
"steam"
|
(name: (builtins.readDir path).${name} == "directory" && name != "misc")
|
||||||
])
|
(builtins.attrNames (builtins.readDir path))
|
||||||
// builtins.foldl' (
|
)
|
||||||
emptySet: importedModules:
|
))
|
||||||
emptySet // importedModules
|
modulesPath;
|
||||||
) {} (map
|
|
||||||
(name: {
|
|
||||||
"${name}" = import (modulesPath + "/${name}.nix");
|
|
||||||
})
|
|
||||||
[
|
|
||||||
"bottom"
|
|
||||||
"brave"
|
|
||||||
"direnv"
|
|
||||||
"fastfetch"
|
|
||||||
"flameshot"
|
|
||||||
"freetube"
|
|
||||||
"git"
|
|
||||||
"helix"
|
|
||||||
"home-manager"
|
|
||||||
"lazygit"
|
|
||||||
"mpv"
|
|
||||||
"nextcloud"
|
|
||||||
"nushell"
|
|
||||||
"starship"
|
|
||||||
"vscode"
|
|
||||||
"wezterm"
|
|
||||||
"yazi"
|
|
||||||
"yt-dlp"
|
|
||||||
"zellij"
|
|
||||||
"zoxide"
|
|
||||||
])
|
|
||||||
// builtins.foldl' (
|
|
||||||
emptySet: importedModules:
|
|
||||||
emptySet // importedModules
|
|
||||||
) {} (map
|
|
||||||
(name: {
|
|
||||||
"misc-${name}" = import (modulesPath + "/misc/${name}.nix");
|
|
||||||
})
|
|
||||||
[
|
|
||||||
"android"
|
|
||||||
"commandLine"
|
|
||||||
"desktop"
|
|
||||||
"entertainment"
|
|
||||||
"internet"
|
|
||||||
"productionArt"
|
|
||||||
"productionAudio"
|
|
||||||
"productionVideo"
|
|
||||||
"productionWriting"
|
|
||||||
"tracking"
|
|
||||||
]);
|
|
||||||
in {
|
in {
|
||||||
flake.homeModules = {
|
flake.homeModules = {
|
||||||
desktop = {
|
desktop = {
|
||||||
|
|
0
home-manager/modules/firefox/config/bookmarks/finances.nix → home-manager/modules/firefox/config/bookmarks/config/finances.nix
Normal file → Executable file
|
@ -1,7 +1,7 @@
|
||||||
{flake, ...}: let
|
{flake, ...}: let
|
||||||
inherit (flake.config.people) user0;
|
inherit (flake.config.people) user0;
|
||||||
inherit (flake.config.people.users.${user0}) aliases;
|
inherit (flake.config.people.users.${user0}) aliases;
|
||||||
inherit (flake.config.machines.devices) nas server;
|
inherit (flake.config.machines.devices) synology server;
|
||||||
inherit (flake.config.services) instances;
|
inherit (flake.config.services) instances;
|
||||||
|
|
||||||
jellyfinTags = ["jelly" "video" "streaming" "movies" "shows" "music"];
|
jellyfinTags = ["jelly" "video" "streaming" "movies" "shows" "music"];
|
||||||
|
@ -92,7 +92,7 @@ in {
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
name = "${instances.syncthing.label} (${instances.synology.label})";
|
name = "${instances.syncthing.label} (${instances.synology.label})";
|
||||||
url = "http://${nas.ip.address0}:${toString instances.syncthing.ports.port0}";
|
url = "http://${synology.ip.address0}:${toString instances.syncthing.ports.port0}";
|
||||||
tags =
|
tags =
|
||||||
["synology"]
|
["synology"]
|
||||||
++ syncthingTags;
|
++ syncthingTags;
|
||||||
|
@ -108,7 +108,7 @@ in {
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
name = instances.synology.label;
|
name = instances.synology.label;
|
||||||
url = "https://${nas.ip.address0}:${toString instances.synology.ports.port0}";
|
url = "https://${synology.ip.address0}:${toString instances.synology.ports.port0}";
|
||||||
tags = [instances.synology.name "dsm" "cloud"];
|
tags = [instances.synology.name "dsm" "cloud"];
|
||||||
keyword = instances.synology.label;
|
keyword = instances.synology.label;
|
||||||
}
|
}
|
0
home-manager/modules/firefox/config/bookmarks/gaming.nix → home-manager/modules/firefox/config/bookmarks/config/gaming.nix
Normal file → Executable file
0
home-manager/modules/firefox/config/bookmarks/shopping.nix → home-manager/modules/firefox/config/bookmarks/config/shopping.nix
Normal file → Executable file
0
home-manager/modules/firefox/config/bookmarks/tools.nix → home-manager/modules/firefox/config/bookmarks/config/tools.nix
Normal file → Executable file
0
home-manager/modules/firefox/config/bookmarks/tracking.nix → home-manager/modules/firefox/config/bookmarks/config/tracking.nix
Normal file → Executable file
|
@ -1,28 +1,26 @@
|
||||||
{flake, ...}: let
|
{flake, ...}: let
|
||||||
aggregatedBookmarks =
|
configPath = ./config;
|
||||||
|
flakedPath = configPath + "/flake";
|
||||||
|
|
||||||
|
filterFiles = name: builtins.match ".*\\.nix$" name != null;
|
||||||
|
|
||||||
|
regularBookmarks = let
|
||||||
|
files = builtins.attrNames (builtins.readDir configPath);
|
||||||
|
in
|
||||||
builtins.foldl' (
|
builtins.foldl' (
|
||||||
emptyList: bookmarks:
|
emptyList: bookmarkFile:
|
||||||
emptyList ++ bookmarks.bookmarks
|
emptyList ++ (import (configPath + "/${bookmarkFile}")).bookmarks
|
||||||
) [] (map
|
) [] (builtins.filter filterFiles files);
|
||||||
(name: import ./${name}.nix)
|
|
||||||
[
|
flakedBookmarks = let
|
||||||
"academic"
|
files = builtins.attrNames (builtins.readDir flakedPath);
|
||||||
"development"
|
in
|
||||||
"gaming"
|
builtins.foldl' (
|
||||||
"finances"
|
emptyList: bookmarkFile:
|
||||||
"shopping"
|
emptyList ++ (import (flakedPath + "/${bookmarkFile}") {inherit flake;}).bookmarks
|
||||||
"socialMedia"
|
) [] (builtins.filter filterFiles files);
|
||||||
"tools"
|
|
||||||
"tracking"
|
aggregatedBookmarks = regularBookmarks ++ flakedBookmarks;
|
||||||
])
|
|
||||||
++ builtins.foldl' (
|
|
||||||
emptyList: bookmarks:
|
|
||||||
emptyList ++ bookmarks.bookmarks
|
|
||||||
) [] (map
|
|
||||||
(name: import ./${name}.nix {inherit flake;})
|
|
||||||
[
|
|
||||||
"selfHosted"
|
|
||||||
]);
|
|
||||||
in {
|
in {
|
||||||
bookmarks = aggregatedBookmarks;
|
bookmarks = aggregatedBookmarks;
|
||||||
}
|
}
|
||||||
|
|
0
home-manager/modules/firefox/config/extensions/default.nix
Normal file → Executable file
0
home-manager/modules/firefox/config/search/academic.nix → home-manager/modules/firefox/config/search/config/academic.nix
Normal file → Executable file
0
home-manager/modules/firefox/config/search/development.nix → home-manager/modules/firefox/config/search/config/development.nix
Normal file → Executable file
Before Width: | Height: | Size: 87 KiB After Width: | Height: | Size: 87 KiB |
Before Width: | Height: | Size: 71 KiB After Width: | Height: | Size: 71 KiB |
0
home-manager/modules/firefox/config/search/gaming.nix → home-manager/modules/firefox/config/search/config/gaming.nix
Normal file → Executable file
0
home-manager/modules/firefox/config/search/hidden.nix → home-manager/modules/firefox/config/search/config/hidden.nix
Normal file → Executable file
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 38 KiB |
Before Width: | Height: | Size: 539 KiB After Width: | Height: | Size: 539 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 7.2 KiB After Width: | Height: | Size: 7.2 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 5.3 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 266 KiB After Width: | Height: | Size: 266 KiB |
Before Width: | Height: | Size: 7.6 KiB After Width: | Height: | Size: 7.6 KiB |
Before Width: | Height: | Size: 195 KiB After Width: | Height: | Size: 195 KiB |
Before Width: | Height: | Size: 7.3 KiB After Width: | Height: | Size: 7.3 KiB |
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 4.8 KiB |
Before Width: | Height: | Size: 58 KiB After Width: | Height: | Size: 58 KiB |
Before Width: | Height: | Size: 7 KiB After Width: | Height: | Size: 7 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
0
home-manager/modules/firefox/config/search/icons/sb.png → home-manager/modules/firefox/config/search/config/icons/sb.png
Normal file → Executable file
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 59 KiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 5.1 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 357 KiB After Width: | Height: | Size: 357 KiB |
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 436 KiB After Width: | Height: | Size: 436 KiB |
0
home-manager/modules/firefox/config/search/icons/xh.png → home-manager/modules/firefox/config/search/config/icons/xh.png
Normal file → Executable file
Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 51 KiB |
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 44 KiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
0
home-manager/modules/firefox/config/search/shopping.nix → home-manager/modules/firefox/config/search/config/shopping.nix
Normal file → Executable file
0
home-manager/modules/firefox/config/search/socialMedia.nix → home-manager/modules/firefox/config/search/config/socialMedia.nix
Normal file → Executable file
0
home-manager/modules/firefox/config/search/spank.nix → home-manager/modules/firefox/config/search/config/spank.nix
Normal file → Executable file
0
home-manager/modules/firefox/config/search/tools.nix → home-manager/modules/firefox/config/search/config/tools.nix
Normal file → Executable file
0
home-manager/modules/firefox/config/search/tracking.nix → home-manager/modules/firefox/config/search/config/tracking.nix
Normal file → Executable file
0
home-manager/modules/firefox/config/search/web.nix → home-manager/modules/firefox/config/search/config/web.nix
Normal file → Executable file
|
@ -1,31 +1,46 @@
|
||||||
{flake, ...}: let
|
{flake, ...}: let
|
||||||
aggregatedSearchEngines =
|
configPath = ./config;
|
||||||
|
flakedPath = configPath + "/flake";
|
||||||
|
|
||||||
|
regularSearchEngines = let
|
||||||
|
files = builtins.attrNames (builtins.readDir configPath);
|
||||||
|
in
|
||||||
builtins.foldl' (
|
builtins.foldl' (
|
||||||
emptySet: searchEngine:
|
emptySet: searchEngine:
|
||||||
emptySet // (import ./${searchEngine}.nix)
|
emptySet // (import (configPath + "/${searchEngine}"))
|
||||||
) {} [
|
) {} (builtins.filter (name: builtins.match ".*\\.nix$" name != null) files);
|
||||||
"academic"
|
|
||||||
"development"
|
flakedSearchEngines = let
|
||||||
"gaming"
|
files = builtins.attrNames (builtins.readDir flakedPath);
|
||||||
"hidden"
|
in
|
||||||
"shopping"
|
builtins.foldl' (
|
||||||
"socialMedia"
|
|
||||||
"spank"
|
|
||||||
"tools"
|
|
||||||
"tracking"
|
|
||||||
"web"
|
|
||||||
]
|
|
||||||
// builtins.foldl' (
|
|
||||||
emptySet: searchEngine:
|
emptySet: searchEngine:
|
||||||
emptySet // (import ./${searchEngine}.nix {inherit flake;})
|
emptySet // (import (flakedPath + "/${searchEngine}") {inherit flake;})
|
||||||
) {} [
|
) {} (builtins.filter (name: builtins.match ".*\\.nix$" name != null) files);
|
||||||
"selfHosted"
|
|
||||||
];
|
aggregatedSearchEngines = regularSearchEngines // flakedSearchEngines;
|
||||||
in {
|
in {
|
||||||
search = {
|
search = {
|
||||||
force = true;
|
force = true;
|
||||||
default = "Kagi";
|
default = "Kagi";
|
||||||
engines = aggregatedSearchEngines;
|
engines = aggregatedSearchEngines;
|
||||||
order = import ./order.nix;
|
order = [
|
||||||
|
"AlternativeTo"
|
||||||
|
"Core Radio"
|
||||||
|
"Hackage"
|
||||||
|
"Hoogle"
|
||||||
|
"Jellyfin"
|
||||||
|
"Kagi"
|
||||||
|
"Nix Home Manager"
|
||||||
|
"Nix Options"
|
||||||
|
"Nix Packages"
|
||||||
|
"Nix Wiki"
|
||||||
|
"PeerTube"
|
||||||
|
"Sci-Hub"
|
||||||
|
"Torrent Leech"
|
||||||
|
"Urban Dictionary"
|
||||||
|
"Wikipedia"
|
||||||
|
"YouTube"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,36 +0,0 @@
|
||||||
[
|
|
||||||
# "1337x"
|
|
||||||
"AlternativeTo"
|
|
||||||
# "Amazon"
|
|
||||||
# "Brave"
|
|
||||||
"Core Radio"
|
|
||||||
# "DNS Checker"
|
|
||||||
# "Door Dash"
|
|
||||||
# "FYT Supplies"
|
|
||||||
"Hackage"
|
|
||||||
"Hoogle"
|
|
||||||
"Jellyfin"
|
|
||||||
"Kagi"
|
|
||||||
# "Kijiji"
|
|
||||||
# "Memory Express"
|
|
||||||
"Nix Home Manager"
|
|
||||||
"Nix Options"
|
|
||||||
"Nix Packages"
|
|
||||||
"Nix Wiki"
|
|
||||||
"PeerTube"
|
|
||||||
# "Proton DB"
|
|
||||||
# "Reddit"
|
|
||||||
# "Rhyme Zone"
|
|
||||||
"Sci-Hub"
|
|
||||||
# "Skip The Dishes"
|
|
||||||
# "Stanford Encyclopedia of Philosophy"
|
|
||||||
# "Steam DB"
|
|
||||||
# "The Pirate Bay"
|
|
||||||
"Torrent Leech"
|
|
||||||
"Urban Dictionary"
|
|
||||||
# "VSTorrent"
|
|
||||||
"Wikipedia"
|
|
||||||
# "X"
|
|
||||||
# "XVideos"
|
|
||||||
"YouTube"
|
|
||||||
]
|
|