mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-06-15 17:45:12 -05:00
feat: changed naming convention for devices
This commit is contained in:
parent
cc77a50fc1
commit
a0e5ffb3d4
57 changed files with 351 additions and 341 deletions
46
flake.nix
46
flake.nix
|
@ -74,14 +74,14 @@
|
||||||
{ config, ... }:
|
{ config, ... }:
|
||||||
{
|
{
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
desktop = inputs.self.lib.mkLinuxSystem [
|
jupiter = inputs.self.lib.mkLinuxSystem [
|
||||||
./systems/desktop
|
./systems/jupiter
|
||||||
./profiles/user0
|
./profiles/user0
|
||||||
./profiles/user1
|
./profiles/user1
|
||||||
config.nixosModules.desktop
|
config.nixosModules.jupiter
|
||||||
config.nixosModules.core
|
config.nixosModules.core
|
||||||
config.nixosModules.sops
|
config.nixosModules.mantle
|
||||||
config.nixosModules.system
|
config.nixosModules.crust
|
||||||
inputs.nixos-cosmic.nixosModules.default
|
inputs.nixos-cosmic.nixosModules.default
|
||||||
inputs.home-manager.nixosModules.home-manager
|
inputs.home-manager.nixosModules.home-manager
|
||||||
inputs.lix-module.nixosModules.default
|
inputs.lix-module.nixosModules.default
|
||||||
|
@ -89,45 +89,45 @@
|
||||||
inputs.sops-nix.nixosModules.sops
|
inputs.sops-nix.nixosModules.sops
|
||||||
inputs.nixvim.nixosModules.nixvim
|
inputs.nixvim.nixosModules.nixvim
|
||||||
];
|
];
|
||||||
fallaryn = inputs.self.lib.mkLinuxSystem [
|
saturn = inputs.self.lib.mkLinuxSystem [
|
||||||
./systems/fallaryn
|
./systems/saturn
|
||||||
./profiles/user2
|
./profiles/user2
|
||||||
config.nixosModules.fallaryn
|
config.nixosModules.saturn
|
||||||
config.nixosModules.core
|
config.nixosModules.core
|
||||||
config.nixosModules.sops
|
config.nixosModules.mantle
|
||||||
config.nixosModules.system
|
config.nixosModules.crust
|
||||||
inputs.home-manager.nixosModules.home-manager
|
inputs.home-manager.nixosModules.home-manager
|
||||||
inputs.lix-module.nixosModules.default
|
inputs.lix-module.nixosModules.default
|
||||||
inputs.sops-nix.nixosModules.sops
|
inputs.sops-nix.nixosModules.sops
|
||||||
];
|
];
|
||||||
laptop = inputs.self.lib.mkLinuxSystem [
|
ganymede = inputs.self.lib.mkLinuxSystem [
|
||||||
./systems/laptop
|
./systems/ganymede
|
||||||
./profiles/user0
|
./profiles/user0
|
||||||
./profiles/user1
|
./profiles/user1
|
||||||
config.nixosModules.laptop
|
config.nixosModules.ganymede
|
||||||
config.nixosModules.core
|
config.nixosModules.core
|
||||||
config.nixosModules.sops
|
config.nixosModules.mantle
|
||||||
config.nixosModules.system
|
config.nixosModules.crust
|
||||||
inputs.home-manager.nixosModules.home-manager
|
inputs.home-manager.nixosModules.home-manager
|
||||||
inputs.lix-module.nixosModules.default
|
inputs.lix-module.nixosModules.default
|
||||||
inputs.nur.modules.nixos.default
|
inputs.nur.modules.nixos.default
|
||||||
inputs.sops-nix.nixosModules.sops
|
inputs.sops-nix.nixosModules.sops
|
||||||
];
|
];
|
||||||
bartholomew = inputs.self.lib.mkLinuxSystem [
|
callisto = inputs.self.lib.mkLinuxSystem [
|
||||||
./systems/bartholomew
|
./systems/callisto
|
||||||
./profiles/user1
|
./profiles/user1
|
||||||
config.nixosModules.laptop
|
config.nixosModules.callisto
|
||||||
config.nixosModules.core
|
config.nixosModules.core
|
||||||
config.nixosModules.system
|
config.nixosModules.crust
|
||||||
inputs.home-manager.nixosModules.home-manager
|
inputs.home-manager.nixosModules.home-manager
|
||||||
inputs.lix-module.nixosModules.default
|
inputs.lix-module.nixosModules.default
|
||||||
];
|
];
|
||||||
server = inputs.self.lib.mkLinuxSystem [
|
ceres = inputs.self.lib.mkLinuxSystem [
|
||||||
./systems/server
|
./systems/ceres
|
||||||
./profiles/user0
|
./profiles/user0
|
||||||
config.nixosModules.server
|
config.nixosModules.ceres
|
||||||
config.nixosModules.core
|
config.nixosModules.core
|
||||||
config.nixosModules.sops
|
config.nixosModules.mantle
|
||||||
inputs.home-manager.nixosModules.home-manager
|
inputs.home-manager.nixosModules.home-manager
|
||||||
inputs.lix-module.nixosModules.default
|
inputs.lix-module.nixosModules.default
|
||||||
inputs.ngipkgs.nixosModules."services.peertube"
|
inputs.ngipkgs.nixosModules."services.peertube"
|
||||||
|
|
|
@ -5,8 +5,8 @@ let
|
||||||
;
|
;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
label = "Bartholomew";
|
label = "Callisto";
|
||||||
name = "bartholomew";
|
name = "callisto";
|
||||||
sync = {
|
sync = {
|
||||||
address0 = "";
|
address0 = "";
|
||||||
};
|
};
|
|
@ -7,30 +7,30 @@ let
|
||||||
sambaPermissions
|
sambaPermissions
|
||||||
userIdForUser0
|
userIdForUser0
|
||||||
;
|
;
|
||||||
serverName = "server";
|
ceresName = "ceres";
|
||||||
serverIP = "192.168.50.140";
|
ceresIP = "192.168.50.140";
|
||||||
serverStorageDriveName = "NAS1";
|
ceresStorageDriveName = "NAS1";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
label = "Server";
|
label = "Ceres";
|
||||||
name = serverName;
|
name = ceresName;
|
||||||
sync = {
|
sync = {
|
||||||
address0 = "";
|
address0 = "";
|
||||||
};
|
};
|
||||||
ip = {
|
ip = {
|
||||||
address0 = serverIP;
|
address0 = ceresIP;
|
||||||
};
|
};
|
||||||
boot = {
|
boot = {
|
||||||
options = ownerExclusiveReadWriteMask;
|
options = ownerExclusiveReadWriteMask;
|
||||||
};
|
};
|
||||||
storage0 = {
|
storage0 = {
|
||||||
mount = "/mnt/media/${serverStorageDriveName}";
|
mount = "/mnt/media/${ceresStorageDriveName}";
|
||||||
device = "/dev/disk/by-label/${serverStorageDriveName}";
|
device = "/dev/disk/by-label/${ceresStorageDriveName}";
|
||||||
options = readWritePermissions;
|
options = readWritePermissions;
|
||||||
};
|
};
|
||||||
samba0 = {
|
samba0 = {
|
||||||
mount = "/mnt/media/${serverName}";
|
mount = "/mnt/media/${ceresName}";
|
||||||
device = "//${serverIP}";
|
device = "//${ceresIP}";
|
||||||
options = sambaPermissions ++ fileModeAndDirMode ++ userIdForUser0;
|
options = sambaPermissions ++ fileModeAndDirMode ++ userIdForUser0;
|
||||||
};
|
};
|
||||||
}
|
}
|
|
@ -5,8 +5,8 @@ let
|
||||||
;
|
;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
label = "Laptop";
|
label = "Ganymede";
|
||||||
name = "laptop";
|
name = "ganymede";
|
||||||
sync = {
|
sync = {
|
||||||
address0 = "";
|
address0 = "";
|
||||||
};
|
};
|
|
@ -6,8 +6,8 @@ let
|
||||||
;
|
;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
label = "Desktop";
|
label = "Jupiter";
|
||||||
name = "desktop";
|
name = "jupiter";
|
||||||
sync = {
|
sync = {
|
||||||
address0 = "";
|
address0 = "";
|
||||||
};
|
};
|
|
@ -8,8 +8,8 @@ let
|
||||||
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
label = "Fallaryn";
|
label = "Saturn";
|
||||||
name = "fallaryn";
|
name = "saturn";
|
||||||
ip = {
|
ip = {
|
||||||
address0 = "192.168.58.104";
|
address0 = "192.168.58.104";
|
||||||
};
|
};
|
|
@ -7,16 +7,16 @@ in
|
||||||
flake.homeModules =
|
flake.homeModules =
|
||||||
let
|
let
|
||||||
inherit (config.machines.devices)
|
inherit (config.machines.devices)
|
||||||
bartholomew
|
callisto
|
||||||
desktop
|
jupiter
|
||||||
fallaryn
|
saturn
|
||||||
laptop
|
ganymede
|
||||||
server
|
ceres
|
||||||
;
|
;
|
||||||
inherit (config.people) user0 user1 user2;
|
inherit (config.people) user0 user1 user2;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
"${desktop.name}-${user0}" = {
|
"${jupiter.name}-${user0}" = {
|
||||||
imports = builtins.attrValues {
|
imports = builtins.attrValues {
|
||||||
inherit (modules)
|
inherit (modules)
|
||||||
cli
|
cli
|
||||||
|
@ -55,7 +55,7 @@ in
|
||||||
;
|
;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
"${desktop.name}-${user1}" = {
|
"${jupiter.name}-${user1}" = {
|
||||||
imports = builtins.attrValues {
|
imports = builtins.attrValues {
|
||||||
inherit (modules)
|
inherit (modules)
|
||||||
cli
|
cli
|
||||||
|
@ -76,7 +76,7 @@ in
|
||||||
;
|
;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
"${fallaryn.name}-${user2}" = {
|
"${saturn.name}-${user2}" = {
|
||||||
imports = builtins.attrValues {
|
imports = builtins.attrValues {
|
||||||
inherit (modules)
|
inherit (modules)
|
||||||
cli
|
cli
|
||||||
|
@ -106,7 +106,7 @@ in
|
||||||
;
|
;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
"${laptop.name}-${user0}" = {
|
"${ganymede.name}-${user0}" = {
|
||||||
imports = builtins.attrValues {
|
imports = builtins.attrValues {
|
||||||
inherit (modules)
|
inherit (modules)
|
||||||
cli
|
cli
|
||||||
|
@ -123,7 +123,7 @@ in
|
||||||
;
|
;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
"${laptop.name}-${user1}" = {
|
"${ganymede.name}-${user1}" = {
|
||||||
imports = builtins.attrValues {
|
imports = builtins.attrValues {
|
||||||
inherit (modules)
|
inherit (modules)
|
||||||
cli
|
cli
|
||||||
|
@ -144,7 +144,7 @@ in
|
||||||
;
|
;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
"${bartholomew.name}-${user1}" = {
|
"${callisto.name}-${user1}" = {
|
||||||
imports = builtins.attrValues {
|
imports = builtins.attrValues {
|
||||||
inherit (modules)
|
inherit (modules)
|
||||||
cli
|
cli
|
||||||
|
@ -168,7 +168,7 @@ in
|
||||||
;
|
;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
"${server.name}-${user0}" = {
|
"${ceres.name}-${user0}" = {
|
||||||
imports = builtins.attrValues {
|
imports = builtins.attrValues {
|
||||||
inherit (modules)
|
inherit (modules)
|
||||||
cli
|
cli
|
||||||
|
|
|
@ -8,7 +8,7 @@ let
|
||||||
;
|
;
|
||||||
inherit (flake.config.machines.devices)
|
inherit (flake.config.machines.devices)
|
||||||
synology
|
synology
|
||||||
server
|
ceres
|
||||||
;
|
;
|
||||||
inherit (flake.config.services)
|
inherit (flake.config.services)
|
||||||
instances
|
instances
|
||||||
|
@ -82,7 +82,7 @@ in
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
name = "${instances.jellyfin.label} (Local)";
|
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;
|
tags = jellyfinTags;
|
||||||
keyword = instances.jellyfin.label;
|
keyword = instances.jellyfin.label;
|
||||||
}
|
}
|
||||||
|
@ -141,7 +141,7 @@ in
|
||||||
}
|
}
|
||||||
# {
|
# {
|
||||||
# name = "${instances.owncast.label} (Admin)";
|
# 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;
|
# tags = owncastTags;
|
||||||
# keyword = instances.owncast.label;
|
# keyword = instances.owncast.label;
|
||||||
# }
|
# }
|
||||||
|
|
|
@ -8,7 +8,7 @@ let
|
||||||
;
|
;
|
||||||
inherit (flake.config.machines.devices)
|
inherit (flake.config.machines.devices)
|
||||||
synology
|
synology
|
||||||
server
|
ceres
|
||||||
;
|
;
|
||||||
inherit (flake.config.services)
|
inherit (flake.config.services)
|
||||||
instances
|
instances
|
||||||
|
@ -82,7 +82,7 @@ in
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
name = "${instances.jellyfin.label} (Local)";
|
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;
|
tags = jellyfinTags;
|
||||||
keyword = instances.jellyfin.label;
|
keyword = instances.jellyfin.label;
|
||||||
}
|
}
|
||||||
|
@ -141,7 +141,7 @@ in
|
||||||
}
|
}
|
||||||
# {
|
# {
|
||||||
# name = "${instances.owncast.label} (Admin)";
|
# 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;
|
# tags = owncastTags;
|
||||||
# keyword = instances.owncast.label;
|
# keyword = instances.owncast.label;
|
||||||
# }
|
# }
|
||||||
|
|
|
@ -9,10 +9,10 @@ let
|
||||||
devices
|
devices
|
||||||
;
|
;
|
||||||
hostname = config.networking.hostName;
|
hostname = config.networking.hostName;
|
||||||
desktop = devices.desktop.name;
|
jupiter = devices.jupiter.name;
|
||||||
server = devices.server.name;
|
ceres = devices.ceres.name;
|
||||||
fallaryn = devices.fallaryn.name;
|
saturn = devices.saturn.names;
|
||||||
bartholomew = devices.bartholomew.name;
|
callisto = devices.callisto.name;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
security = {
|
security = {
|
||||||
|
@ -24,13 +24,13 @@ in
|
||||||
noPass = true;
|
noPass = true;
|
||||||
users = [
|
users = [
|
||||||
(
|
(
|
||||||
if hostname == desktop then
|
if hostname == jupiter then
|
||||||
user0
|
user0
|
||||||
else if hostname == server then
|
else if hostname == ceres then
|
||||||
user0
|
user0
|
||||||
else if hostname == bartholomew then
|
else if hostname == callisto then
|
||||||
user1
|
user1
|
||||||
else if hostname == fallaryn then
|
else if hostname == saturn then
|
||||||
user2
|
user2
|
||||||
else
|
else
|
||||||
""
|
""
|
||||||
|
|
|
@ -16,24 +16,24 @@ let
|
||||||
devices
|
devices
|
||||||
;
|
;
|
||||||
hostname = config.networking.hostName;
|
hostname = config.networking.hostName;
|
||||||
desktop = devices.desktop.name;
|
jupiter = devices.jupiter.name;
|
||||||
server = devices.server.name;
|
ceres = devices.ceres.name;
|
||||||
fallaryn = devices.fallaryn.name;
|
saturn = devices.saturn.name;
|
||||||
bartholomew = devices.bartholomew.name;
|
callisto = devices.callisto.name;
|
||||||
|
|
||||||
userLogic =
|
userLogic =
|
||||||
if hostname == desktop then
|
if hostname == jupiter then
|
||||||
user0
|
user0
|
||||||
else if hostname == server then
|
else if hostname == ceres then
|
||||||
user0
|
user0
|
||||||
else if hostname == fallaryn then
|
else if hostname == saturn then
|
||||||
user2
|
user2
|
||||||
else
|
else
|
||||||
"";
|
"";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
users.users =
|
users.users =
|
||||||
if hostname == bartholomew then
|
if hostname == callisto then
|
||||||
{ }
|
{ }
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -4,7 +4,7 @@ let
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
flake.nixosModules = {
|
flake.nixosModules = {
|
||||||
desktop = {
|
jupiter = {
|
||||||
imports = builtins.attrValues {
|
imports = builtins.attrValues {
|
||||||
inherit (modules)
|
inherit (modules)
|
||||||
mullvad
|
mullvad
|
||||||
|
@ -17,7 +17,7 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
fallaryn = {
|
saturn = {
|
||||||
imports = builtins.attrValues {
|
imports = builtins.attrValues {
|
||||||
inherit (modules)
|
inherit (modules)
|
||||||
plasma
|
plasma
|
||||||
|
@ -27,7 +27,7 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
laptop = {
|
ganymede = {
|
||||||
imports = builtins.attrValues {
|
imports = builtins.attrValues {
|
||||||
inherit (modules)
|
inherit (modules)
|
||||||
gnome
|
gnome
|
||||||
|
@ -36,7 +36,7 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
server = {
|
ceres = {
|
||||||
imports = builtins.attrValues {
|
imports = builtins.attrValues {
|
||||||
inherit (modules)
|
inherit (modules)
|
||||||
acme
|
acme
|
||||||
|
@ -51,11 +51,13 @@ in
|
||||||
samba
|
samba
|
||||||
vaultwarden
|
vaultwarden
|
||||||
forgejo
|
forgejo
|
||||||
|
wayland
|
||||||
|
xserver
|
||||||
;
|
;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
sops = {
|
mantle = {
|
||||||
imports = builtins.attrValues {
|
imports = builtins.attrValues {
|
||||||
inherit (modules)
|
inherit (modules)
|
||||||
sops
|
sops
|
||||||
|
@ -63,7 +65,7 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
system = {
|
crust = {
|
||||||
imports = builtins.attrValues {
|
imports = builtins.attrValues {
|
||||||
inherit (modules)
|
inherit (modules)
|
||||||
hardware
|
hardware
|
||||||
|
@ -76,8 +78,6 @@ in
|
||||||
imports = builtins.attrValues {
|
imports = builtins.attrValues {
|
||||||
inherit (modules)
|
inherit (modules)
|
||||||
core
|
core
|
||||||
wayland
|
|
||||||
xserver
|
|
||||||
;
|
;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
inherit (flake.config.machines.devices)
|
inherit (flake.config.machines.devices)
|
||||||
server
|
ceres
|
||||||
;
|
;
|
||||||
inherit (flake.config.services.instances) smtp forgejo web;
|
inherit (flake.config.services.instances) smtp forgejo web;
|
||||||
service = forgejo;
|
service = forgejo;
|
||||||
|
@ -96,7 +96,7 @@ in
|
||||||
"bind"
|
"bind"
|
||||||
];
|
];
|
||||||
depends = [
|
depends = [
|
||||||
server.storage0.mount
|
ceres.storage0.mount
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
inherit (flake.config.machines.devices)
|
inherit (flake.config.machines.devices)
|
||||||
server
|
ceres
|
||||||
;
|
;
|
||||||
inherit (flake.config.services.instances)
|
inherit (flake.config.services.instances)
|
||||||
hledger
|
hledger
|
||||||
|
@ -54,7 +54,7 @@ in
|
||||||
"bind"
|
"bind"
|
||||||
];
|
];
|
||||||
depends = [
|
depends = [
|
||||||
server.storage0.mount
|
ceres.storage0.mount
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ let
|
||||||
user0
|
user0
|
||||||
;
|
;
|
||||||
inherit (flake.config.machines.devices)
|
inherit (flake.config.machines.devices)
|
||||||
server
|
ceres
|
||||||
;
|
;
|
||||||
inherit (flake.config.services.instances)
|
inherit (flake.config.services.instances)
|
||||||
jellyfin
|
jellyfin
|
||||||
|
@ -49,7 +49,7 @@ in
|
||||||
"bind"
|
"bind"
|
||||||
];
|
];
|
||||||
depends = [
|
depends = [
|
||||||
server.storage0.mount
|
ceres.storage0.mount
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
inherit (flake.config.machines.devices)
|
inherit (flake.config.machines.devices)
|
||||||
server
|
ceres
|
||||||
;
|
;
|
||||||
inherit (flake.config.services.instances) smtp mastodon web;
|
inherit (flake.config.services.instances) smtp mastodon web;
|
||||||
service = mastodon;
|
service = mastodon;
|
||||||
|
@ -192,7 +192,7 @@ in
|
||||||
"bind"
|
"bind"
|
||||||
];
|
];
|
||||||
depends = [
|
depends = [
|
||||||
server.storage0.mount
|
ceres.storage0.mount
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
inherit (flake.config.machines.devices)
|
inherit (flake.config.machines.devices)
|
||||||
server
|
ceres
|
||||||
;
|
;
|
||||||
inherit (flake.config.services.instances)
|
inherit (flake.config.services.instances)
|
||||||
minecraft
|
minecraft
|
||||||
|
@ -83,7 +83,7 @@ in
|
||||||
"bind"
|
"bind"
|
||||||
];
|
];
|
||||||
depends = [
|
depends = [
|
||||||
server.storage0.mount
|
ceres.storage0.mount
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ let
|
||||||
name
|
name
|
||||||
;
|
;
|
||||||
inherit (flake.config.machines.devices)
|
inherit (flake.config.machines.devices)
|
||||||
server
|
ceres
|
||||||
;
|
;
|
||||||
inherit (flake.config.services.instances)
|
inherit (flake.config.services.instances)
|
||||||
nextcloud
|
nextcloud
|
||||||
|
@ -113,7 +113,7 @@ in
|
||||||
"bind"
|
"bind"
|
||||||
];
|
];
|
||||||
depends = [
|
depends = [
|
||||||
server.storage0.mount
|
ceres.storage0.mount
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
inherit (flake.config.machines.devices)
|
inherit (flake.config.machines.devices)
|
||||||
desktop
|
jupiter
|
||||||
server
|
ceres
|
||||||
;
|
;
|
||||||
inherit (flake.config.services.instances)
|
inherit (flake.config.services.instances)
|
||||||
ollama
|
ollama
|
||||||
|
@ -19,7 +19,7 @@ let
|
||||||
host = "${service.subdomain}.${web.domains.url0}";
|
host = "${service.subdomain}.${web.domains.url0}";
|
||||||
|
|
||||||
caddyLogic =
|
caddyLogic =
|
||||||
if hostname == server.name then
|
if hostname == ceres.name then
|
||||||
{
|
{
|
||||||
caddy = {
|
caddy = {
|
||||||
virtualHosts = {
|
virtualHosts = {
|
||||||
|
@ -37,7 +37,7 @@ let
|
||||||
{ };
|
{ };
|
||||||
|
|
||||||
mountLogic =
|
mountLogic =
|
||||||
if hostname == server.name then
|
if hostname == ceres.name then
|
||||||
{
|
{
|
||||||
"/var/lib/${service.name}" = {
|
"/var/lib/${service.name}" = {
|
||||||
device = service.paths.path0;
|
device = service.paths.path0;
|
||||||
|
@ -46,7 +46,7 @@ let
|
||||||
"bind"
|
"bind"
|
||||||
];
|
];
|
||||||
depends = [
|
depends = [
|
||||||
server.storage0.mount
|
ceres.storage0.mount
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -63,7 +63,7 @@ in
|
||||||
user = service.name;
|
user = service.name;
|
||||||
}
|
}
|
||||||
// (
|
// (
|
||||||
if hostname == desktop.name then
|
if hostname == jupiter.name then
|
||||||
{
|
{
|
||||||
models = service.paths.path1;
|
models = service.paths.path1;
|
||||||
acceleration = "rocm";
|
acceleration = "rocm";
|
||||||
|
@ -98,7 +98,7 @@ in
|
||||||
|
|
||||||
systemd.tmpfiles.rules = [
|
systemd.tmpfiles.rules = [
|
||||||
(
|
(
|
||||||
if hostname == desktop.name then
|
if hostname == jupiter.name then
|
||||||
"Z ${service.paths.path1} 0777 ${service.name} ${service.name} -"
|
"Z ${service.paths.path1} 0777 ${service.name} ${service.name} -"
|
||||||
else
|
else
|
||||||
"Z ${service.paths.path0} 0755 ${service.name} ${service.name} -"
|
"Z ${service.paths.path0} 0755 ${service.name} ${service.name} -"
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
inherit (flake.config.machines.devices)
|
inherit (flake.config.machines.devices)
|
||||||
server
|
ceres
|
||||||
;
|
;
|
||||||
inherit (flake.config.services.instances)
|
inherit (flake.config.services.instances)
|
||||||
caddy
|
caddy
|
||||||
|
@ -123,7 +123,7 @@ in
|
||||||
"bind"
|
"bind"
|
||||||
];
|
];
|
||||||
depends = [
|
depends = [
|
||||||
server.storage0.mount
|
ceres.storage0.mount
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{ flake, ... }:
|
{ flake, ... }:
|
||||||
let
|
let
|
||||||
inherit (flake.config.machines.devices)
|
inherit (flake.config.machines.devices)
|
||||||
server
|
ceres
|
||||||
;
|
;
|
||||||
inherit (flake.config.services.instances)
|
inherit (flake.config.services.instances)
|
||||||
postgresql
|
postgresql
|
||||||
|
@ -40,7 +40,7 @@ in
|
||||||
"bind"
|
"bind"
|
||||||
];
|
];
|
||||||
depends = [
|
depends = [
|
||||||
server.storage0.mount
|
ceres.storage0.mount
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -8,17 +8,17 @@ let
|
||||||
devices
|
devices
|
||||||
;
|
;
|
||||||
hostname = config.networking.hostName;
|
hostname = config.networking.hostName;
|
||||||
desktop = devices.desktop.name;
|
jupiter = devices.jupiter.name;
|
||||||
server = devices.server.name;
|
ceres = devices.ceres.name;
|
||||||
fallaryn = devices.fallaryn.name;
|
saturn = devices.saturn.name;
|
||||||
bartholomew = devices.bartholomew.name;
|
callisto = devices.callisto.name;
|
||||||
|
|
||||||
userLogic =
|
userLogic =
|
||||||
if hostname == desktop then
|
if hostname == jupiter then
|
||||||
user0
|
user0
|
||||||
else if hostname == server then
|
else if hostname == ceres then
|
||||||
user0
|
user0
|
||||||
else if hostname == fallaryn then
|
else if hostname == saturn then
|
||||||
user2
|
user2
|
||||||
else
|
else
|
||||||
"";
|
"";
|
||||||
|
@ -32,7 +32,7 @@ in
|
||||||
generateKey = false;
|
generateKey = false;
|
||||||
};
|
};
|
||||||
secrets =
|
secrets =
|
||||||
if hostname == bartholomew then
|
if hostname == callisto then
|
||||||
{ }
|
{ }
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -5,7 +5,7 @@ vpnoff:
|
||||||
sudo protonvpn d
|
sudo protonvpn d
|
||||||
|
|
||||||
rebuild:
|
rebuild:
|
||||||
nixos-rebuild switch --use-remote-sudo --flake ~/Files/Projects/dotfiles#desktop --show-trace
|
nixos-rebuild switch --use-remote-sudo --flake ~/Files/Projects/dotfiles#jupiter --show-trace
|
||||||
|
|
||||||
elm:
|
elm:
|
||||||
cd ~/Files/Projects/website/frontend; elm-land server
|
cd ~/Files/Projects/website/frontend; elm-land server
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
inherit (flake.config.people) user1;
|
inherit (flake.config.people) user1;
|
||||||
inherit (flake.config.machines.devices) bartholomew;
|
inherit (flake.config.machines.devices) callisto;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
fileSystems = {
|
fileSystems = {
|
||||||
|
@ -16,7 +16,7 @@ in
|
||||||
"/boot" = {
|
"/boot" = {
|
||||||
device = "/dev/disk/by-uuid/1703-D452";
|
device = "/dev/disk/by-uuid/1703-D452";
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
options = bartholomew.boot.options;
|
options = callisto.boot.options;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -5,12 +5,12 @@
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
inherit (flake.config.machines.devices)
|
inherit (flake.config.machines.devices)
|
||||||
bartholomew
|
callisto
|
||||||
;
|
;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
networking = {
|
networking = {
|
||||||
hostName = bartholomew.name;
|
hostName = callisto.name;
|
||||||
networkmanager.enable = true;
|
networkmanager.enable = true;
|
||||||
nftables.enable = true;
|
nftables.enable = true;
|
||||||
useDHCP = lib.mkDefault true;
|
useDHCP = lib.mkDefault true;
|
|
@ -2,7 +2,8 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
config,
|
config,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
boot = {
|
boot = {
|
||||||
extraModulePackages = [
|
extraModulePackages = [
|
||||||
config.boot.kernelPackages.v4l2loopback.out
|
config.boot.kernelPackages.v4l2loopback.out
|
|
@ -2,30 +2,31 @@
|
||||||
flake,
|
flake,
|
||||||
config,
|
config,
|
||||||
...
|
...
|
||||||
}: let
|
}:
|
||||||
inherit
|
let
|
||||||
(flake.config.people)
|
inherit (flake.config.people)
|
||||||
user0
|
user0
|
||||||
;
|
;
|
||||||
inherit
|
inherit (flake.config.machines.devices)
|
||||||
(flake.config.machines.devices)
|
ceres
|
||||||
server
|
|
||||||
;
|
;
|
||||||
in {
|
in
|
||||||
fileSystems = let
|
{
|
||||||
storageDrives = [
|
fileSystems =
|
||||||
"storage0"
|
let
|
||||||
];
|
storageDrives = [
|
||||||
|
"storage0"
|
||||||
|
];
|
||||||
|
|
||||||
storageMounts = storage: {
|
storageMounts = storage: {
|
||||||
name = "${server.${storage}.mount}";
|
name = "${ceres.${storage}.mount}";
|
||||||
value = {
|
value = {
|
||||||
device = server.${storage}.device;
|
device = ceres.${storage}.device;
|
||||||
fsType = "ext4";
|
fsType = "ext4";
|
||||||
options = server.${storage}.options;
|
options = ceres.${storage}.options;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
in
|
||||||
in
|
|
||||||
{
|
{
|
||||||
"/" = {
|
"/" = {
|
||||||
device = "/dev/disk/by-uuid/de4e681b-0667-4bf8-8d6e-c50894aa41cd";
|
device = "/dev/disk/by-uuid/de4e681b-0667-4bf8-8d6e-c50894aa41cd";
|
||||||
|
@ -39,12 +40,12 @@ in {
|
||||||
// (builtins.listToAttrs (map storageMounts storageDrives));
|
// (builtins.listToAttrs (map storageMounts storageDrives));
|
||||||
|
|
||||||
swapDevices = [
|
swapDevices = [
|
||||||
{device = "/dev/disk/by-uuid/259fcc06-912c-4bd3-b781-8f77449e935a";}
|
{ device = "/dev/disk/by-uuid/259fcc06-912c-4bd3-b781-8f77449e935a"; }
|
||||||
];
|
];
|
||||||
|
|
||||||
systemd.tmpfiles.rules = [
|
systemd.tmpfiles.rules = [
|
||||||
"Z ${config.home-manager.users.${user0}.home.homeDirectory} 0755 ${user0} users -"
|
"Z ${config.home-manager.users.${user0}.home.homeDirectory} 0755 ${user0} users -"
|
||||||
"Z ${server.storage0.mount} 2775 root root -"
|
"Z ${ceres.storage0.mount} 2775 root root -"
|
||||||
];
|
];
|
||||||
|
|
||||||
services.udisks2.enable = true;
|
services.udisks2.enable = true;
|
|
@ -1,20 +1,18 @@
|
||||||
{pkgs, ...}: {
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
hardware = {
|
hardware = {
|
||||||
graphics = {
|
graphics = {
|
||||||
enable = true;
|
enable = true;
|
||||||
extraPackages = builtins.attrValues {
|
extraPackages = builtins.attrValues {
|
||||||
inherit
|
inherit (pkgs)
|
||||||
(pkgs)
|
|
||||||
amdvlk
|
amdvlk
|
||||||
;
|
;
|
||||||
inherit
|
inherit (pkgs.rocmPackages.clr)
|
||||||
(pkgs.rocmPackages.clr)
|
|
||||||
icd
|
icd
|
||||||
;
|
;
|
||||||
};
|
};
|
||||||
extraPackages32 = builtins.attrValues {
|
extraPackages32 = builtins.attrValues {
|
||||||
inherit
|
inherit (pkgs.driversi686Linux)
|
||||||
(pkgs.driversi686Linux)
|
|
||||||
amdvlk
|
amdvlk
|
||||||
;
|
;
|
||||||
};
|
};
|
|
@ -3,7 +3,8 @@
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
hardware = {
|
hardware = {
|
||||||
firmware = [
|
firmware = [
|
||||||
pkgs.rtl8761b-firmware
|
pkgs.rtl8761b-firmware
|
|
@ -4,11 +4,11 @@
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
inherit (flake.config.machines.devices) server;
|
inherit (flake.config.machines.devices) ceres;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
networking = {
|
networking = {
|
||||||
hostName = server.name;
|
hostName = ceres.name;
|
||||||
networkmanager.enable = true;
|
networkmanager.enable = true;
|
||||||
nftables.enable = true;
|
nftables.enable = true;
|
||||||
useDHCP = lib.mkDefault true;
|
useDHCP = lib.mkDefault true;
|
|
@ -1,9 +1,10 @@
|
||||||
{flake, ...}: let
|
{ flake, ... }:
|
||||||
inherit
|
let
|
||||||
(flake.config.people)
|
inherit (flake.config.people)
|
||||||
user0
|
user0
|
||||||
;
|
;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
sops = {
|
sops = {
|
||||||
secrets = {
|
secrets = {
|
||||||
"discord-token" = {
|
"discord-token" = {
|
17
systems/ceres/default.nix
Executable file
17
systems/ceres/default.nix
Executable file
|
@ -0,0 +1,17 @@
|
||||||
|
{ lib, ... }:
|
||||||
|
let
|
||||||
|
configPath = ./config;
|
||||||
|
|
||||||
|
ceresImports =
|
||||||
|
let
|
||||||
|
files = builtins.attrNames (builtins.readDir configPath);
|
||||||
|
in
|
||||||
|
map (name: configPath + "/${name}") (
|
||||||
|
builtins.filter (name: builtins.match ".*\\.nix$" name != null) files
|
||||||
|
);
|
||||||
|
in
|
||||||
|
{
|
||||||
|
imports = ceresImports;
|
||||||
|
nixpkgs.hostPlatform = lib.mkForce "x86_64-linux";
|
||||||
|
system.stateVersion = lib.mkForce "24.05";
|
||||||
|
}
|
|
@ -1,14 +0,0 @@
|
||||||
{lib, ...}: let
|
|
||||||
configPath = ./config;
|
|
||||||
|
|
||||||
desktopImports = let
|
|
||||||
files = builtins.attrNames (builtins.readDir configPath);
|
|
||||||
in
|
|
||||||
map
|
|
||||||
(name: configPath + "/${name}")
|
|
||||||
(builtins.filter (name: builtins.match ".*\\.nix$" name != null) files);
|
|
||||||
in {
|
|
||||||
imports = desktopImports;
|
|
||||||
nixpkgs.hostPlatform = lib.mkForce "x86_64-linux";
|
|
||||||
system.stateVersion = lib.mkForce "24.05";
|
|
||||||
}
|
|
|
@ -5,7 +5,7 @@
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
inherit (flake.config.people) user2;
|
inherit (flake.config.people) user2;
|
||||||
inherit (flake.config.machines.devices) fallaryn;
|
inherit (flake.config.machines.devices) saturn;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [ ];
|
imports = [ ];
|
||||||
|
@ -18,11 +18,11 @@ in
|
||||||
];
|
];
|
||||||
|
|
||||||
storageMounts = storage: {
|
storageMounts = storage: {
|
||||||
name = "${fallaryn.${storage}.mount}";
|
name = "${saturn.${storage}.mount}";
|
||||||
value = {
|
value = {
|
||||||
device = fallaryn.${storage}.device;
|
device = saturn.${storage}.device;
|
||||||
fsType = "ext4";
|
fsType = "ext4";
|
||||||
options = fallaryn.${storage}.options;
|
options = saturn.${storage}.options;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
|
@ -34,7 +34,7 @@ in
|
||||||
"/boot" = {
|
"/boot" = {
|
||||||
device = "/dev/disk/by-uuid/22BD-5A25";
|
device = "/dev/disk/by-uuid/22BD-5A25";
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
options = fallaryn.boot.options;
|
options = saturn.boot.options;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
// (builtins.listToAttrs (map storageMounts storageDrives));
|
// (builtins.listToAttrs (map storageMounts storageDrives));
|
||||||
|
@ -45,8 +45,8 @@ in
|
||||||
|
|
||||||
systemd.tmpfiles.rules = [
|
systemd.tmpfiles.rules = [
|
||||||
"Z ${config.home-manager.users.${user2}.home.homeDirectory} 0755 ${user2} users -"
|
"Z ${config.home-manager.users.${user2}.home.homeDirectory} 0755 ${user2} users -"
|
||||||
"Z ${fallaryn.storage0.mount} 0755 ${user2} users -"
|
"Z ${saturn.storage0.mount} 0755 ${user2} users -"
|
||||||
"Z ${fallaryn.storage1.mount} 0755 ${user2} users -"
|
"Z ${saturn.storage1.mount} 0755 ${user2} users -"
|
||||||
];
|
];
|
||||||
|
|
||||||
services.udisks2.enable = true;
|
services.udisks2.enable = true;
|
||||||
|
|
|
@ -4,11 +4,11 @@
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
inherit (flake.config.machines.devices) fallaryn;
|
inherit (flake.config.machines.devices) saturn;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
networking = {
|
networking = {
|
||||||
hostName = fallaryn.name;
|
hostName = saturn.name;
|
||||||
networkmanager.enable = true;
|
networkmanager.enable = true;
|
||||||
useDHCP = lib.mkDefault true;
|
useDHCP = lib.mkDefault true;
|
||||||
firewall = {
|
firewall = {
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
let
|
let
|
||||||
configPath = ./config;
|
configPath = ./config;
|
||||||
|
|
||||||
fallarynImports =
|
saturnImports =
|
||||||
let
|
let
|
||||||
files = builtins.attrNames (builtins.readDir configPath);
|
files = builtins.attrNames (builtins.readDir configPath);
|
||||||
in
|
in
|
||||||
|
@ -14,7 +14,7 @@ let
|
||||||
);
|
);
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = fallarynImports;
|
imports = saturnImports;
|
||||||
nixpkgs.hostPlatform = lib.mkForce "x86_64-linux";
|
nixpkgs.hostPlatform = lib.mkForce "x86_64-linux";
|
||||||
system.stateVersion = lib.mkForce "24.05";
|
system.stateVersion = lib.mkForce "24.05";
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,8 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
config,
|
config,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
boot = {
|
boot = {
|
||||||
extraModulePackages = [
|
extraModulePackages = [
|
||||||
config.boot.kernelPackages.v4l2loopback.out
|
config.boot.kernelPackages.v4l2loopback.out
|
82
systems/ganymede/config/filesystem.nix
Executable file
82
systems/ganymede/config/filesystem.nix
Executable file
|
@ -0,0 +1,82 @@
|
||||||
|
{
|
||||||
|
flake,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
inherit (flake.config.people)
|
||||||
|
user0
|
||||||
|
user1
|
||||||
|
;
|
||||||
|
inherit (flake.config.machines.devices)
|
||||||
|
ganymede
|
||||||
|
synology
|
||||||
|
ceres
|
||||||
|
;
|
||||||
|
inherit (flake.config.services.instances)
|
||||||
|
samba
|
||||||
|
;
|
||||||
|
|
||||||
|
synologySecrets = config.sops.secrets."network/synology".path;
|
||||||
|
ceresSecrets = config.sops.secrets."network/server".path;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
fileSystems =
|
||||||
|
let
|
||||||
|
synologyDrives = [
|
||||||
|
"folder0"
|
||||||
|
"folder1"
|
||||||
|
"folder2"
|
||||||
|
];
|
||||||
|
|
||||||
|
sambaDrives = [
|
||||||
|
"samba0"
|
||||||
|
];
|
||||||
|
|
||||||
|
synologyMounts = synologyDrive: {
|
||||||
|
name = "${synology.${synologyDrive}.mount}";
|
||||||
|
value = {
|
||||||
|
device = synology.${synologyDrive}.device;
|
||||||
|
fsType = "cifs";
|
||||||
|
options = synology.${synologyDrive}.options ++ [
|
||||||
|
"credentials=${synologySecrets}"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
sambaMounts = sambaDrive: {
|
||||||
|
name = "${ceres.${sambaDrive}.mount}/${samba.paths.path1}";
|
||||||
|
value = {
|
||||||
|
device = "${ceres.${sambaDrive}.device}/${samba.paths.path1}";
|
||||||
|
fsType = "cifs";
|
||||||
|
options = ceres.${sambaDrive}.options ++ [
|
||||||
|
"credentials=${ceresSecrets}"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
"/" = {
|
||||||
|
device = "/dev/disk/by-uuid/aae33e00-125e-4f1c-b9aa-9fc512335b7f";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
"/boot" = {
|
||||||
|
device = "/dev/disk/by-uuid/C506-9E18";
|
||||||
|
fsType = "vfat";
|
||||||
|
options = ganymede.boot.options;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
// (builtins.listToAttrs (map synologyMounts synologyDrives))
|
||||||
|
// (builtins.listToAttrs (map sambaMounts sambaDrives));
|
||||||
|
|
||||||
|
swapDevices = [
|
||||||
|
{ device = "/dev/disk/by-uuid/68d6072a-e21b-4d11-88fd-22c5b9932a50"; }
|
||||||
|
];
|
||||||
|
|
||||||
|
systemd.tmpfiles.rules = [
|
||||||
|
"Z ${config.home-manager.users.${user0}.home.homeDirectory} 0755 ${user0} users -"
|
||||||
|
"Z ${config.home-manager.users.${user1}.home.homeDirectory} 0755 ${user1} users -"
|
||||||
|
];
|
||||||
|
|
||||||
|
services.udisks2.enable = true;
|
||||||
|
}
|
|
@ -1,20 +1,18 @@
|
||||||
{pkgs, ...}: {
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
hardware = {
|
hardware = {
|
||||||
graphics = {
|
graphics = {
|
||||||
enable = true;
|
enable = true;
|
||||||
extraPackages = builtins.attrValues {
|
extraPackages = builtins.attrValues {
|
||||||
inherit
|
inherit (pkgs)
|
||||||
(pkgs)
|
|
||||||
amdvlk
|
amdvlk
|
||||||
;
|
;
|
||||||
inherit
|
inherit (pkgs.rocmPackages.clr)
|
||||||
(pkgs.rocmPackages.clr)
|
|
||||||
icd
|
icd
|
||||||
;
|
;
|
||||||
};
|
};
|
||||||
extraPackages32 = builtins.attrValues {
|
extraPackages32 = builtins.attrValues {
|
||||||
inherit
|
inherit (pkgs.driversi686Linux)
|
||||||
(pkgs.driversi686Linux)
|
|
||||||
amdvlk
|
amdvlk
|
||||||
;
|
;
|
||||||
};
|
};
|
|
@ -3,7 +3,8 @@
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
hardware = {
|
hardware = {
|
||||||
firmware = [
|
firmware = [
|
||||||
pkgs.rtl8761b-firmware
|
pkgs.rtl8761b-firmware
|
|
@ -2,14 +2,15 @@
|
||||||
lib,
|
lib,
|
||||||
flake,
|
flake,
|
||||||
...
|
...
|
||||||
}: let
|
}:
|
||||||
inherit
|
let
|
||||||
(flake.config.machines.devices)
|
inherit (flake.config.machines.devices)
|
||||||
laptop
|
ganymede
|
||||||
;
|
;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
networking = {
|
networking = {
|
||||||
hostName = laptop.name;
|
hostName = ganymede.name;
|
||||||
networkmanager.enable = true;
|
networkmanager.enable = true;
|
||||||
nftables.enable = true;
|
nftables.enable = true;
|
||||||
useDHCP = lib.mkDefault true;
|
useDHCP = lib.mkDefault true;
|
|
@ -1,9 +1,10 @@
|
||||||
{flake, ...}: let
|
{ flake, ... }:
|
||||||
inherit
|
let
|
||||||
(flake.config.people)
|
inherit (flake.config.people)
|
||||||
user1
|
user1
|
||||||
;
|
;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
sops = {
|
sops = {
|
||||||
secrets = {
|
secrets = {
|
||||||
"network/synology" = {
|
"network/synology" = {
|
17
systems/ganymede/default.nix
Executable file
17
systems/ganymede/default.nix
Executable file
|
@ -0,0 +1,17 @@
|
||||||
|
{ lib, ... }:
|
||||||
|
let
|
||||||
|
configPath = ./config;
|
||||||
|
|
||||||
|
ganymedeImports =
|
||||||
|
let
|
||||||
|
files = builtins.attrNames (builtins.readDir configPath);
|
||||||
|
in
|
||||||
|
map (name: configPath + "/${name}") (
|
||||||
|
builtins.filter (name: builtins.match ".*\\.nix$" name != null) files
|
||||||
|
);
|
||||||
|
in
|
||||||
|
{
|
||||||
|
imports = ganymedeImports;
|
||||||
|
nixpkgs.hostPlatform = lib.mkForce "x86_64-linux";
|
||||||
|
system.stateVersion = lib.mkForce "24.05";
|
||||||
|
}
|
|
@ -9,8 +9,8 @@ let
|
||||||
user1
|
user1
|
||||||
;
|
;
|
||||||
inherit (flake.config.machines.devices)
|
inherit (flake.config.machines.devices)
|
||||||
desktop
|
jupiter
|
||||||
server
|
ceres
|
||||||
synology
|
synology
|
||||||
;
|
;
|
||||||
inherit (flake.config.services.instances)
|
inherit (flake.config.services.instances)
|
||||||
|
@ -18,7 +18,7 @@ let
|
||||||
;
|
;
|
||||||
|
|
||||||
synologySecrets = config.sops.secrets."network/synology".path;
|
synologySecrets = config.sops.secrets."network/synology".path;
|
||||||
serverSecrets = config.sops.secrets."network/server".path;
|
ceresSecrets = config.sops.secrets."network/server".path;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
fileSystems =
|
fileSystems =
|
||||||
|
@ -50,21 +50,21 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
storageMounts = storageDrive: {
|
storageMounts = storageDrive: {
|
||||||
name = "${desktop.${storageDrive}.mount}";
|
name = "${jupiter.${storageDrive}.mount}";
|
||||||
value = {
|
value = {
|
||||||
device = desktop.${storageDrive}.device;
|
device = jupiter.${storageDrive}.device;
|
||||||
fsType = "ext4";
|
fsType = "ext4";
|
||||||
options = desktop.${storageDrive}.options;
|
options = jupiter.${storageDrive}.options;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
sambaMounts = sambaDrive: {
|
sambaMounts = sambaDrive: {
|
||||||
name = "${server.${sambaDrive}.mount}/${samba.paths.path1}";
|
name = "${ceres.${sambaDrive}.mount}/${samba.paths.path1}";
|
||||||
value = {
|
value = {
|
||||||
device = "${server.${sambaDrive}.device}/${samba.paths.path1}";
|
device = "${ceres.${sambaDrive}.device}/${samba.paths.path1}";
|
||||||
fsType = "cifs";
|
fsType = "cifs";
|
||||||
options = server.${sambaDrive}.options ++ [
|
options = ceres.${sambaDrive}.options ++ [
|
||||||
"credentials=${serverSecrets}"
|
"credentials=${ceresSecrets}"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -77,7 +77,7 @@ in
|
||||||
"/boot" = {
|
"/boot" = {
|
||||||
device = "/dev/disk/by-uuid/73E2-4DC1";
|
device = "/dev/disk/by-uuid/73E2-4DC1";
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
options = desktop.boot.options;
|
options = jupiter.boot.options;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
// (builtins.listToAttrs (map synologyMounts synologyDrives))
|
// (builtins.listToAttrs (map synologyMounts synologyDrives))
|
||||||
|
@ -91,8 +91,8 @@ in
|
||||||
systemd.tmpfiles.rules = [
|
systemd.tmpfiles.rules = [
|
||||||
"Z ${config.home-manager.users.${user0}.home.homeDirectory} 0755 ${user0} users -"
|
"Z ${config.home-manager.users.${user0}.home.homeDirectory} 0755 ${user0} users -"
|
||||||
"Z ${config.home-manager.users.${user1}.home.homeDirectory} 0755 ${user1} users -"
|
"Z ${config.home-manager.users.${user1}.home.homeDirectory} 0755 ${user1} users -"
|
||||||
"Z ${desktop.storage0.mount} 0755 ${user0} users -"
|
"Z ${jupiter.storage0.mount} 0755 ${user0} users -"
|
||||||
"Z ${desktop.storage1.mount} 0755 ${user0} users -"
|
"Z ${jupiter.storage1.mount} 0755 ${user0} users -"
|
||||||
];
|
];
|
||||||
|
|
||||||
services.udisks2.enable = true;
|
services.udisks2.enable = true;
|
|
@ -3,11 +3,11 @@
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
hardware = {
|
hardware = {
|
||||||
firmware = builtins.attrValues {
|
firmware = builtins.attrValues {
|
||||||
inherit
|
inherit (pkgs)
|
||||||
(pkgs)
|
|
||||||
rtl8761b-firmware
|
rtl8761b-firmware
|
||||||
;
|
;
|
||||||
};
|
};
|
|
@ -2,14 +2,15 @@
|
||||||
lib,
|
lib,
|
||||||
flake,
|
flake,
|
||||||
...
|
...
|
||||||
}: let
|
}:
|
||||||
inherit
|
let
|
||||||
(flake.config.machines.devices)
|
inherit (flake.config.machines.devices)
|
||||||
desktop
|
jupiter
|
||||||
;
|
;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
networking = {
|
networking = {
|
||||||
hostName = desktop.name;
|
hostName = jupiter.name;
|
||||||
networkmanager.enable = true;
|
networkmanager.enable = true;
|
||||||
nftables.enable = true;
|
nftables.enable = true;
|
||||||
useDHCP = lib.mkDefault true;
|
useDHCP = lib.mkDefault true;
|
|
@ -1,13 +1,13 @@
|
||||||
{flake, ...}: let
|
{ flake, ... }:
|
||||||
inherit
|
let
|
||||||
(flake.config.people)
|
inherit (flake.config.people)
|
||||||
user0
|
user0
|
||||||
;
|
;
|
||||||
inherit
|
inherit (flake.config.people.users.${user0})
|
||||||
(flake.config.people.users.${user0})
|
|
||||||
paths
|
paths
|
||||||
;
|
;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
sops = {
|
sops = {
|
||||||
secrets = {
|
secrets = {
|
||||||
"network/synology" = {
|
"network/synology" = {
|
17
systems/jupiter/default.nix
Executable file
17
systems/jupiter/default.nix
Executable file
|
@ -0,0 +1,17 @@
|
||||||
|
{ lib, ... }:
|
||||||
|
let
|
||||||
|
configPath = ./config;
|
||||||
|
|
||||||
|
jupiterImports =
|
||||||
|
let
|
||||||
|
files = builtins.attrNames (builtins.readDir configPath);
|
||||||
|
in
|
||||||
|
map (name: configPath + "/${name}") (
|
||||||
|
builtins.filter (name: builtins.match ".*\\.nix$" name != null) files
|
||||||
|
);
|
||||||
|
in
|
||||||
|
{
|
||||||
|
imports = jupiterImports;
|
||||||
|
nixpkgs.hostPlatform = lib.mkForce "x86_64-linux";
|
||||||
|
system.stateVersion = lib.mkForce "24.05";
|
||||||
|
}
|
|
@ -1,86 +0,0 @@
|
||||||
{
|
|
||||||
flake,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
inherit
|
|
||||||
(flake.config.people)
|
|
||||||
user0
|
|
||||||
user1
|
|
||||||
;
|
|
||||||
inherit
|
|
||||||
(flake.config.machines.devices)
|
|
||||||
laptop
|
|
||||||
synology
|
|
||||||
server
|
|
||||||
;
|
|
||||||
inherit
|
|
||||||
(flake.config.services.instances)
|
|
||||||
samba
|
|
||||||
;
|
|
||||||
|
|
||||||
synologySecrets = config.sops.secrets."network/synology".path;
|
|
||||||
serverSecrets = config.sops.secrets."network/server".path;
|
|
||||||
in {
|
|
||||||
fileSystems = let
|
|
||||||
synologyDrives = [
|
|
||||||
"folder0"
|
|
||||||
"folder1"
|
|
||||||
"folder2"
|
|
||||||
];
|
|
||||||
|
|
||||||
sambaDrives = [
|
|
||||||
"samba0"
|
|
||||||
];
|
|
||||||
|
|
||||||
synologyMounts = synologyDrive: {
|
|
||||||
name = "${synology.${synologyDrive}.mount}";
|
|
||||||
value = {
|
|
||||||
device = synology.${synologyDrive}.device;
|
|
||||||
fsType = "cifs";
|
|
||||||
options =
|
|
||||||
synology.${synologyDrive}.options
|
|
||||||
++ [
|
|
||||||
"credentials=${synologySecrets}"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
sambaMounts = sambaDrive: {
|
|
||||||
name = "${server.${sambaDrive}.mount}/${samba.paths.path1}";
|
|
||||||
value = {
|
|
||||||
device = "${server.${sambaDrive}.device}/${samba.paths.path1}";
|
|
||||||
fsType = "cifs";
|
|
||||||
options =
|
|
||||||
server.${sambaDrive}.options
|
|
||||||
++ [
|
|
||||||
"credentials=${serverSecrets}"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
in
|
|
||||||
{
|
|
||||||
"/" = {
|
|
||||||
device = "/dev/disk/by-uuid/aae33e00-125e-4f1c-b9aa-9fc512335b7f";
|
|
||||||
fsType = "ext4";
|
|
||||||
};
|
|
||||||
"/boot" = {
|
|
||||||
device = "/dev/disk/by-uuid/C506-9E18";
|
|
||||||
fsType = "vfat";
|
|
||||||
options = laptop.boot.options;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
// (builtins.listToAttrs (map synologyMounts synologyDrives))
|
|
||||||
// (builtins.listToAttrs (map sambaMounts sambaDrives));
|
|
||||||
|
|
||||||
swapDevices = [
|
|
||||||
{device = "/dev/disk/by-uuid/68d6072a-e21b-4d11-88fd-22c5b9932a50";}
|
|
||||||
];
|
|
||||||
|
|
||||||
systemd.tmpfiles.rules = [
|
|
||||||
"Z ${config.home-manager.users.${user0}.home.homeDirectory} 0755 ${user0} users -"
|
|
||||||
"Z ${config.home-manager.users.${user1}.home.homeDirectory} 0755 ${user1} users -"
|
|
||||||
];
|
|
||||||
|
|
||||||
services.udisks2.enable = true;
|
|
||||||
}
|
|
|
@ -1,14 +0,0 @@
|
||||||
{lib, ...}: let
|
|
||||||
configPath = ./config;
|
|
||||||
|
|
||||||
laptopImports = let
|
|
||||||
files = builtins.attrNames (builtins.readDir configPath);
|
|
||||||
in
|
|
||||||
map
|
|
||||||
(name: configPath + "/${name}")
|
|
||||||
(builtins.filter (name: builtins.match ".*\\.nix$" name != null) files);
|
|
||||||
in {
|
|
||||||
imports = laptopImports;
|
|
||||||
nixpkgs.hostPlatform = lib.mkForce "x86_64-linux";
|
|
||||||
system.stateVersion = lib.mkForce "24.05";
|
|
||||||
}
|
|
|
@ -1,14 +0,0 @@
|
||||||
{lib, ...}: let
|
|
||||||
configPath = ./config;
|
|
||||||
|
|
||||||
serverImports = let
|
|
||||||
files = builtins.attrNames (builtins.readDir configPath);
|
|
||||||
in
|
|
||||||
map
|
|
||||||
(name: configPath + "/${name}")
|
|
||||||
(builtins.filter (name: builtins.match ".*\\.nix$" name != null) files);
|
|
||||||
in {
|
|
||||||
imports = serverImports;
|
|
||||||
nixpkgs.hostPlatform = lib.mkForce "x86_64-linux";
|
|
||||||
system.stateVersion = lib.mkForce "24.05";
|
|
||||||
}
|
|
Loading…
Add table
Add a link
Reference in a new issue