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

@ -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
{