feat: changed naming convention for devices

This commit is contained in:
Nick 2025-02-17 18:52:02 -06:00
parent cc77a50fc1
commit a0e5ffb3d4
57 changed files with 351 additions and 341 deletions

View file

@ -5,8 +5,8 @@ let
;
in
{
label = "Bartholomew";
name = "bartholomew";
label = "Callisto";
name = "callisto";
sync = {
address0 = "";
};

View file

@ -7,30 +7,30 @@ let
sambaPermissions
userIdForUser0
;
serverName = "server";
serverIP = "192.168.50.140";
serverStorageDriveName = "NAS1";
ceresName = "ceres";
ceresIP = "192.168.50.140";
ceresStorageDriveName = "NAS1";
in
{
label = "Server";
name = serverName;
label = "Ceres";
name = ceresName;
sync = {
address0 = "";
};
ip = {
address0 = serverIP;
address0 = ceresIP;
};
boot = {
options = ownerExclusiveReadWriteMask;
};
storage0 = {
mount = "/mnt/media/${serverStorageDriveName}";
device = "/dev/disk/by-label/${serverStorageDriveName}";
mount = "/mnt/media/${ceresStorageDriveName}";
device = "/dev/disk/by-label/${ceresStorageDriveName}";
options = readWritePermissions;
};
samba0 = {
mount = "/mnt/media/${serverName}";
device = "//${serverIP}";
mount = "/mnt/media/${ceresName}";
device = "//${ceresIP}";
options = sambaPermissions ++ fileModeAndDirMode ++ userIdForUser0;
};
}

View file

@ -5,8 +5,8 @@ let
;
in
{
label = "Laptop";
name = "laptop";
label = "Ganymede";
name = "ganymede";
sync = {
address0 = "";
};

View file

@ -6,8 +6,8 @@ let
;
in
{
label = "Desktop";
name = "desktop";
label = "Jupiter";
name = "jupiter";
sync = {
address0 = "";
};

View file

@ -8,8 +8,8 @@ let
in
{
label = "Fallaryn";
name = "fallaryn";
label = "Saturn";
name = "saturn";
ip = {
address0 = "192.168.58.104";
};

View file

@ -7,16 +7,16 @@ in
flake.homeModules =
let
inherit (config.machines.devices)
bartholomew
desktop
fallaryn
laptop
server
callisto
jupiter
saturn
ganymede
ceres
;
inherit (config.people) user0 user1 user2;
in
{
"${desktop.name}-${user0}" = {
"${jupiter.name}-${user0}" = {
imports = builtins.attrValues {
inherit (modules)
cli
@ -55,7 +55,7 @@ in
;
};
};
"${desktop.name}-${user1}" = {
"${jupiter.name}-${user1}" = {
imports = builtins.attrValues {
inherit (modules)
cli
@ -76,7 +76,7 @@ in
;
};
};
"${fallaryn.name}-${user2}" = {
"${saturn.name}-${user2}" = {
imports = builtins.attrValues {
inherit (modules)
cli
@ -106,7 +106,7 @@ in
;
};
};
"${laptop.name}-${user0}" = {
"${ganymede.name}-${user0}" = {
imports = builtins.attrValues {
inherit (modules)
cli
@ -123,7 +123,7 @@ in
;
};
};
"${laptop.name}-${user1}" = {
"${ganymede.name}-${user1}" = {
imports = builtins.attrValues {
inherit (modules)
cli
@ -144,7 +144,7 @@ in
;
};
};
"${bartholomew.name}-${user1}" = {
"${callisto.name}-${user1}" = {
imports = builtins.attrValues {
inherit (modules)
cli
@ -168,7 +168,7 @@ in
;
};
};
"${server.name}-${user0}" = {
"${ceres.name}-${user0}" = {
imports = builtins.attrValues {
inherit (modules)
cli

View file

@ -8,7 +8,7 @@ let
;
inherit (flake.config.machines.devices)
synology
server
ceres
;
inherit (flake.config.services)
instances
@ -82,7 +82,7 @@ in
}
{
name = "${instances.jellyfin.label} (Local)";
url = "http://${server.ip.address0}:${toString instances.jellyfin.ports.port1}";
url = "http://${ceres.ip.address0}:${toString instances.jellyfin.ports.port1}";
tags = jellyfinTags;
keyword = instances.jellyfin.label;
}
@ -141,7 +141,7 @@ in
}
# {
# name = "${instances.owncast.label} (Admin)";
# url = "http://${server.ip.address0}:${toString instances.owncast.ports.port0}/admin";
# url = "http://${ceres.ip.address0}:${toString instances.owncast.ports.port0}/admin";
# tags = owncastTags;
# keyword = instances.owncast.label;
# }

View file

@ -8,7 +8,7 @@ let
;
inherit (flake.config.machines.devices)
synology
server
ceres
;
inherit (flake.config.services)
instances
@ -82,7 +82,7 @@ in
}
{
name = "${instances.jellyfin.label} (Local)";
url = "http://${server.ip.address0}:${toString instances.jellyfin.ports.port1}";
url = "http://${ceres.ip.address0}:${toString instances.jellyfin.ports.port1}";
tags = jellyfinTags;
keyword = instances.jellyfin.label;
}
@ -141,7 +141,7 @@ in
}
# {
# name = "${instances.owncast.label} (Admin)";
# url = "http://${server.ip.address0}:${toString instances.owncast.ports.port0}/admin";
# url = "http://${ceres.ip.address0}:${toString instances.owncast.ports.port0}/admin";
# tags = owncastTags;
# keyword = instances.owncast.label;
# }

View file

@ -9,10 +9,10 @@ let
devices
;
hostname = config.networking.hostName;
desktop = devices.desktop.name;
server = devices.server.name;
fallaryn = devices.fallaryn.name;
bartholomew = devices.bartholomew.name;
jupiter = devices.jupiter.name;
ceres = devices.ceres.name;
saturn = devices.saturn.names;
callisto = devices.callisto.name;
in
{
security = {
@ -24,13 +24,13 @@ in
noPass = true;
users = [
(
if hostname == desktop then
if hostname == jupiter then
user0
else if hostname == server then
else if hostname == ceres then
user0
else if hostname == bartholomew then
else if hostname == callisto then
user1
else if hostname == fallaryn then
else if hostname == saturn then
user2
else
""

View file

@ -16,24 +16,24 @@ let
devices
;
hostname = config.networking.hostName;
desktop = devices.desktop.name;
server = devices.server.name;
fallaryn = devices.fallaryn.name;
bartholomew = devices.bartholomew.name;
jupiter = devices.jupiter.name;
ceres = devices.ceres.name;
saturn = devices.saturn.name;
callisto = devices.callisto.name;
userLogic =
if hostname == desktop then
if hostname == jupiter then
user0
else if hostname == server then
else if hostname == ceres then
user0
else if hostname == fallaryn then
else if hostname == saturn then
user2
else
"";
in
{
users.users =
if hostname == bartholomew then
if hostname == callisto then
{ }
else
{

View file

@ -4,7 +4,7 @@ let
in
{
flake.nixosModules = {
desktop = {
jupiter = {
imports = builtins.attrValues {
inherit (modules)
mullvad
@ -17,7 +17,7 @@ in
};
};
fallaryn = {
saturn = {
imports = builtins.attrValues {
inherit (modules)
plasma
@ -27,7 +27,7 @@ in
};
};
laptop = {
ganymede = {
imports = builtins.attrValues {
inherit (modules)
gnome
@ -36,7 +36,7 @@ in
};
};
server = {
ceres = {
imports = builtins.attrValues {
inherit (modules)
acme
@ -51,11 +51,13 @@ in
samba
vaultwarden
forgejo
wayland
xserver
;
};
};
sops = {
mantle = {
imports = builtins.attrValues {
inherit (modules)
sops
@ -63,7 +65,7 @@ in
};
};
system = {
crust = {
imports = builtins.attrValues {
inherit (modules)
hardware
@ -76,8 +78,6 @@ in
imports = builtins.attrValues {
inherit (modules)
core
wayland
xserver
;
};
};

View file

@ -5,7 +5,7 @@
}:
let
inherit (flake.config.machines.devices)
server
ceres
;
inherit (flake.config.services.instances) smtp forgejo web;
service = forgejo;
@ -96,7 +96,7 @@ in
"bind"
];
depends = [
server.storage0.mount
ceres.storage0.mount
];
};

View file

@ -5,7 +5,7 @@
}:
let
inherit (flake.config.machines.devices)
server
ceres
;
inherit (flake.config.services.instances)
hledger
@ -54,7 +54,7 @@ in
"bind"
];
depends = [
server.storage0.mount
ceres.storage0.mount
];
};

View file

@ -4,7 +4,7 @@ let
user0
;
inherit (flake.config.machines.devices)
server
ceres
;
inherit (flake.config.services.instances)
jellyfin
@ -49,7 +49,7 @@ in
"bind"
];
depends = [
server.storage0.mount
ceres.storage0.mount
];
};
in

View file

@ -7,7 +7,7 @@
}:
let
inherit (flake.config.machines.devices)
server
ceres
;
inherit (flake.config.services.instances) smtp mastodon web;
service = mastodon;
@ -192,7 +192,7 @@ in
"bind"
];
depends = [
server.storage0.mount
ceres.storage0.mount
];
};

View file

@ -5,7 +5,7 @@
}:
let
inherit (flake.config.machines.devices)
server
ceres
;
inherit (flake.config.services.instances)
minecraft
@ -83,7 +83,7 @@ in
"bind"
];
depends = [
server.storage0.mount
ceres.storage0.mount
];
};

View file

@ -12,7 +12,7 @@ let
name
;
inherit (flake.config.machines.devices)
server
ceres
;
inherit (flake.config.services.instances)
nextcloud
@ -113,7 +113,7 @@ in
"bind"
];
depends = [
server.storage0.mount
ceres.storage0.mount
];
};

View file

@ -6,8 +6,8 @@
}:
let
inherit (flake.config.machines.devices)
desktop
server
jupiter
ceres
;
inherit (flake.config.services.instances)
ollama
@ -19,7 +19,7 @@ let
host = "${service.subdomain}.${web.domains.url0}";
caddyLogic =
if hostname == server.name then
if hostname == ceres.name then
{
caddy = {
virtualHosts = {
@ -37,7 +37,7 @@ let
{ };
mountLogic =
if hostname == server.name then
if hostname == ceres.name then
{
"/var/lib/${service.name}" = {
device = service.paths.path0;
@ -46,7 +46,7 @@ let
"bind"
];
depends = [
server.storage0.mount
ceres.storage0.mount
];
};
}
@ -63,7 +63,7 @@ in
user = service.name;
}
// (
if hostname == desktop.name then
if hostname == jupiter.name then
{
models = service.paths.path1;
acceleration = "rocm";
@ -98,7 +98,7 @@ in
systemd.tmpfiles.rules = [
(
if hostname == desktop.name then
if hostname == jupiter.name then
"Z ${service.paths.path1} 0777 ${service.name} ${service.name} -"
else
"Z ${service.paths.path0} 0755 ${service.name} ${service.name} -"

View file

@ -6,7 +6,7 @@
}:
let
inherit (flake.config.machines.devices)
server
ceres
;
inherit (flake.config.services.instances)
caddy
@ -123,7 +123,7 @@ in
"bind"
];
depends = [
server.storage0.mount
ceres.storage0.mount
];
};

View file

@ -1,7 +1,7 @@
{ flake, ... }:
let
inherit (flake.config.machines.devices)
server
ceres
;
inherit (flake.config.services.instances)
postgresql
@ -40,7 +40,7 @@ in
"bind"
];
depends = [
server.storage0.mount
ceres.storage0.mount
];
};

View file

@ -8,17 +8,17 @@ let
devices
;
hostname = config.networking.hostName;
desktop = devices.desktop.name;
server = devices.server.name;
fallaryn = devices.fallaryn.name;
bartholomew = devices.bartholomew.name;
jupiter = devices.jupiter.name;
ceres = devices.ceres.name;
saturn = devices.saturn.name;
callisto = devices.callisto.name;
userLogic =
if hostname == desktop then
if hostname == jupiter then
user0
else if hostname == server then
else if hostname == ceres then
user0
else if hostname == fallaryn then
else if hostname == saturn then
user2
else
"";
@ -32,7 +32,7 @@ in
generateKey = false;
};
secrets =
if hostname == bartholomew then
if hostname == callisto then
{ }
else
{