Compare commits

..

No commits in common. "a5996792ce5443d5d4176f18ba7cea565437cf0b" and "da95942281b69dc757bd05b2a60b1f69df251b30" have entirely different histories.

58 changed files with 349 additions and 371 deletions

View file

@ -74,14 +74,14 @@
{ config, ... }: { config, ... }:
{ {
nixosConfigurations = { nixosConfigurations = {
jupiter = inputs.self.lib.mkLinuxSystem [ desktop = inputs.self.lib.mkLinuxSystem [
./systems/jupiter ./systems/desktop
./profiles/user0 ./profiles/user0
./profiles/user1 ./profiles/user1
config.nixosModules.jupiter config.nixosModules.desktop
config.nixosModules.core config.nixosModules.core
config.nixosModules.mantle config.nixosModules.sops
config.nixosModules.crust config.nixosModules.system
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,46 @@
inputs.sops-nix.nixosModules.sops inputs.sops-nix.nixosModules.sops
inputs.nixvim.nixosModules.nixvim inputs.nixvim.nixosModules.nixvim
]; ];
saturn = inputs.self.lib.mkLinuxSystem [ fallaryn = inputs.self.lib.mkLinuxSystem [
./systems/saturn ./systems/fallaryn
./profiles/user2 ./profiles/user2
config.nixosModules.saturn config.nixosModules.fallaryn
config.nixosModules.core config.nixosModules.core
config.nixosModules.mantle config.nixosModules.sops
config.nixosModules.crust config.nixosModules.system
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
]; ];
ganymede = inputs.self.lib.mkLinuxSystem [ laptop = inputs.self.lib.mkLinuxSystem [
./systems/ganymede ./systems/laptop
./profiles/user0 ./profiles/user0
./profiles/user1 ./profiles/user1
config.nixosModules.ganymede config.nixosModules.laptop
config.nixosModules.core config.nixosModules.core
config.nixosModules.mantle config.nixosModules.sops
config.nixosModules.crust config.nixosModules.system
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
]; ];
callisto = inputs.self.lib.mkLinuxSystem [ bartholomew = inputs.self.lib.mkLinuxSystem [
./systems/callisto ./systems/bartholomew
./profiles/user1 ./profiles/user1
config.nixosModules.callisto config.nixosModules.laptop
config.nixosModules.core config.nixosModules.core
config.nixosModules.crust config.nixosModules.system
inputs.home-manager.nixosModules.home-manager inputs.home-manager.nixosModules.home-manager
inputs.lix-module.nixosModules.default inputs.lix-module.nixosModules.default
]; ];
ceres = inputs.self.lib.mkLinuxSystem [ server = inputs.self.lib.mkLinuxSystem [
./systems/ceres ./systems/server
./profiles/user0 ./profiles/user0
config.nixosModules.ceres config.nixosModules.server
config.nixosModules.core config.nixosModules.core
config.nixosModules.mantle config.nixosModules.sops
config.nixosModules.system
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"

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,11 +0,0 @@
{
pkgs,
...
}:
{
home.packages = builtins.attrValues {
inherit (pkgs)
ngrrram
;
};
}

View file

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

View file

@ -8,7 +8,7 @@ let
; ;
inherit (flake.config.machines.devices) inherit (flake.config.machines.devices)
synology synology
ceres server
; ;
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://${ceres.ip.address0}:${toString instances.jellyfin.ports.port1}"; url = "http://${server.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://${ceres.ip.address0}:${toString instances.owncast.ports.port0}/admin"; # url = "http://${server.ip.address0}:${toString instances.owncast.ports.port0}/admin";
# tags = owncastTags; # tags = owncastTags;
# keyword = instances.owncast.label; # keyword = instances.owncast.label;
# } # }

View file

@ -8,7 +8,7 @@ let
; ;
inherit (flake.config.machines.devices) inherit (flake.config.machines.devices)
synology synology
ceres server
; ;
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://${ceres.ip.address0}:${toString instances.jellyfin.ports.port1}"; url = "http://${server.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://${ceres.ip.address0}:${toString instances.owncast.ports.port0}/admin"; # url = "http://${server.ip.address0}:${toString instances.owncast.ports.port0}/admin";
# tags = owncastTags; # tags = owncastTags;
# keyword = instances.owncast.label; # keyword = instances.owncast.label;
# } # }

View file

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

View file

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

View file

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

View file

@ -5,7 +5,7 @@
}: }:
let let
inherit (flake.config.machines.devices) inherit (flake.config.machines.devices)
ceres server
; ;
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 = [
ceres.storage0.mount server.storage0.mount
]; ];
}; };

View file

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

View file

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

View file

@ -7,7 +7,7 @@
}: }:
let let
inherit (flake.config.machines.devices) inherit (flake.config.machines.devices)
ceres server
; ;
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 = [
ceres.storage0.mount server.storage0.mount
]; ];
}; };

View file

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

View file

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

View file

@ -6,8 +6,8 @@
}: }:
let let
inherit (flake.config.machines.devices) inherit (flake.config.machines.devices)
jupiter desktop
ceres server
; ;
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 == ceres.name then if hostname == server.name then
{ {
caddy = { caddy = {
virtualHosts = { virtualHosts = {
@ -37,7 +37,7 @@ let
{ }; { };
mountLogic = mountLogic =
if hostname == ceres.name then if hostname == server.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 = [
ceres.storage0.mount server.storage0.mount
]; ];
}; };
} }
@ -63,22 +63,21 @@ in
user = service.name; user = service.name;
} }
// ( // (
if hostname == jupiter.name then if hostname == desktop.name then
{ {
models = service.paths.path1; acceleration = "rocm";
# acceleration = "rocm"; package = pkgs.ollama.override {
# package = pkgs.ollama.override { config = {
# config = { rocmSupport = true;
# rocmSupport = true; cudaSupport = false;
# cudaSupport = false; };
# }; };
# };
} }
else else
{ {
port = service.ports.port1; port = service.ports.port1;
acceleration = false; acceleration = false;
models = service.paths.path0; models = service.paths.path1;
} }
); );
open-webui = { open-webui = {
@ -98,7 +97,7 @@ in
systemd.tmpfiles.rules = [ systemd.tmpfiles.rules = [
( (
if hostname == jupiter.name then if hostname == desktop.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} -"

View file

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

View file

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

View file

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

View file

@ -5,7 +5,7 @@ vpnoff:
sudo protonvpn d sudo protonvpn d
rebuild: rebuild:
nixos-rebuild switch --use-remote-sudo --flake ~/Files/Projects/dotfiles#jupiter --show-trace nixos-rebuild switch --use-remote-sudo --flake ~/Files/Projects/dotfiles#desktop --show-trace
elm: elm:
cd ~/Files/Projects/website/frontend; elm-land server cd ~/Files/Projects/website/frontend; elm-land server

View file

@ -5,7 +5,7 @@
}: }:
let let
inherit (flake.config.people) user1; inherit (flake.config.people) user1;
inherit (flake.config.machines.devices) callisto; inherit (flake.config.machines.devices) bartholomew;
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 = callisto.boot.options; options = bartholomew.boot.options;
}; };
}; };

View file

@ -5,12 +5,12 @@
}: }:
let let
inherit (flake.config.machines.devices) inherit (flake.config.machines.devices)
callisto bartholomew
; ;
in in
{ {
networking = { networking = {
hostName = callisto.name; hostName = bartholomew.name;
networkmanager.enable = true; networkmanager.enable = true;
nftables.enable = true; nftables.enable = true;
useDHCP = lib.mkDefault true; useDHCP = lib.mkDefault true;

View file

@ -1,17 +0,0 @@
{ 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";
}

View file

@ -9,8 +9,8 @@ let
user1 user1
; ;
inherit (flake.config.machines.devices) inherit (flake.config.machines.devices)
jupiter desktop
ceres server
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;
ceresSecrets = config.sops.secrets."network/server".path; serverSecrets = config.sops.secrets."network/server".path;
in in
{ {
fileSystems = fileSystems =
@ -50,21 +50,21 @@ in
}; };
storageMounts = storageDrive: { storageMounts = storageDrive: {
name = "${jupiter.${storageDrive}.mount}"; name = "${desktop.${storageDrive}.mount}";
value = { value = {
device = jupiter.${storageDrive}.device; device = desktop.${storageDrive}.device;
fsType = "ext4"; fsType = "ext4";
options = jupiter.${storageDrive}.options; options = desktop.${storageDrive}.options;
}; };
}; };
sambaMounts = sambaDrive: { sambaMounts = sambaDrive: {
name = "${ceres.${sambaDrive}.mount}/${samba.paths.path1}"; name = "${server.${sambaDrive}.mount}/${samba.paths.path1}";
value = { value = {
device = "${ceres.${sambaDrive}.device}/${samba.paths.path1}"; device = "${server.${sambaDrive}.device}/${samba.paths.path1}";
fsType = "cifs"; fsType = "cifs";
options = ceres.${sambaDrive}.options ++ [ options = server.${sambaDrive}.options ++ [
"credentials=${ceresSecrets}" "credentials=${serverSecrets}"
]; ];
}; };
}; };
@ -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 = jupiter.boot.options; options = desktop.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 ${jupiter.storage0.mount} 0755 ${user0} users -" "Z ${desktop.storage0.mount} 0755 ${user0} users -"
"Z ${jupiter.storage1.mount} 0755 ${user0} users -" "Z ${desktop.storage1.mount} 0755 ${user0} users -"
]; ];
services.udisks2.enable = true; services.udisks2.enable = true;

View file

@ -3,11 +3,11 @@
lib, lib,
pkgs, pkgs,
... ...
}: }: {
{
hardware = { hardware = {
firmware = builtins.attrValues { firmware = builtins.attrValues {
inherit (pkgs) inherit
(pkgs)
rtl8761b-firmware rtl8761b-firmware
; ;
}; };

View file

@ -2,15 +2,14 @@
lib, lib,
flake, flake,
... ...
}: }: let
let inherit
inherit (flake.config.machines.devices) (flake.config.machines.devices)
jupiter desktop
; ;
in in {
{
networking = { networking = {
hostName = jupiter.name; hostName = desktop.name;
networkmanager.enable = true; networkmanager.enable = true;
nftables.enable = true; nftables.enable = true;
useDHCP = lib.mkDefault true; useDHCP = lib.mkDefault true;

View file

@ -1,13 +1,13 @@
{ flake, ... }: {flake, ...}: let
let inherit
inherit (flake.config.people) (flake.config.people)
user0 user0
; ;
inherit (flake.config.people.users.${user0}) inherit
(flake.config.people.users.${user0})
paths paths
; ;
in in {
{
sops = { sops = {
secrets = { secrets = {
"network/synology" = { "network/synology" = {

14
systems/desktop/default.nix Executable file
View file

@ -0,0 +1,14 @@
{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";
}

View file

@ -5,7 +5,7 @@
}: }:
let let
inherit (flake.config.people) user2; inherit (flake.config.people) user2;
inherit (flake.config.machines.devices) saturn; inherit (flake.config.machines.devices) fallaryn;
in in
{ {
imports = [ ]; imports = [ ];
@ -18,11 +18,11 @@ in
]; ];
storageMounts = storage: { storageMounts = storage: {
name = "${saturn.${storage}.mount}"; name = "${fallaryn.${storage}.mount}";
value = { value = {
device = saturn.${storage}.device; device = fallaryn.${storage}.device;
fsType = "ext4"; fsType = "ext4";
options = saturn.${storage}.options; options = fallaryn.${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 = saturn.boot.options; options = fallaryn.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 ${saturn.storage0.mount} 0755 ${user2} users -" "Z ${fallaryn.storage0.mount} 0755 ${user2} users -"
"Z ${saturn.storage1.mount} 0755 ${user2} users -" "Z ${fallaryn.storage1.mount} 0755 ${user2} users -"
]; ];
services.udisks2.enable = true; services.udisks2.enable = true;

View file

@ -4,11 +4,11 @@
... ...
}: }:
let let
inherit (flake.config.machines.devices) saturn; inherit (flake.config.machines.devices) fallaryn;
in in
{ {
networking = { networking = {
hostName = saturn.name; hostName = fallaryn.name;
networkmanager.enable = true; networkmanager.enable = true;
useDHCP = lib.mkDefault true; useDHCP = lib.mkDefault true;
firewall = { firewall = {

View file

@ -5,7 +5,7 @@
let let
configPath = ./config; configPath = ./config;
saturnImports = fallarynImports =
let let
files = builtins.attrNames (builtins.readDir configPath); files = builtins.attrNames (builtins.readDir configPath);
in in
@ -14,7 +14,7 @@ let
); );
in in
{ {
imports = saturnImports; imports = fallarynImports;
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";
} }

View file

@ -1,82 +0,0 @@
{
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;
}

View file

@ -1,17 +0,0 @@
{ 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";
}

View file

@ -1,17 +0,0 @@
{ 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";
}

View file

@ -2,8 +2,7 @@
pkgs, pkgs,
config, config,
... ...
}: }: {
{
boot = { boot = {
extraModulePackages = [ extraModulePackages = [
config.boot.kernelPackages.v4l2loopback.out config.boot.kernelPackages.v4l2loopback.out

View file

@ -0,0 +1,86 @@
{
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;
}

View file

@ -1,18 +1,20 @@
{ pkgs, ... }: {pkgs, ...}: {
{
hardware = { hardware = {
graphics = { graphics = {
enable = true; enable = true;
extraPackages = builtins.attrValues { extraPackages = builtins.attrValues {
inherit (pkgs) inherit
(pkgs)
amdvlk amdvlk
; ;
inherit (pkgs.rocmPackages.clr) inherit
(pkgs.rocmPackages.clr)
icd icd
; ;
}; };
extraPackages32 = builtins.attrValues { extraPackages32 = builtins.attrValues {
inherit (pkgs.driversi686Linux) inherit
(pkgs.driversi686Linux)
amdvlk amdvlk
; ;
}; };

View file

@ -3,8 +3,7 @@
lib, lib,
pkgs, pkgs,
... ...
}: }: {
{
hardware = { hardware = {
firmware = [ firmware = [
pkgs.rtl8761b-firmware pkgs.rtl8761b-firmware

View file

@ -2,15 +2,14 @@
lib, lib,
flake, flake,
... ...
}: }: let
let inherit
inherit (flake.config.machines.devices) (flake.config.machines.devices)
ganymede laptop
; ;
in in {
{
networking = { networking = {
hostName = ganymede.name; hostName = laptop.name;
networkmanager.enable = true; networkmanager.enable = true;
nftables.enable = true; nftables.enable = true;
useDHCP = lib.mkDefault true; useDHCP = lib.mkDefault true;

View file

@ -1,10 +1,9 @@
{ flake, ... }: {flake, ...}: let
let inherit
inherit (flake.config.people) (flake.config.people)
user1 user1
; ;
in in {
{
sops = { sops = {
secrets = { secrets = {
"network/synology" = { "network/synology" = {

14
systems/laptop/default.nix Executable file
View file

@ -0,0 +1,14 @@
{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";
}

View file

@ -2,8 +2,7 @@
pkgs, pkgs,
config, config,
... ...
}: }: {
{
boot = { boot = {
extraModulePackages = [ extraModulePackages = [
config.boot.kernelPackages.v4l2loopback.out config.boot.kernelPackages.v4l2loopback.out

View file

@ -2,31 +2,30 @@
flake, flake,
config, config,
... ...
}: }: let
let inherit
inherit (flake.config.people) (flake.config.people)
user0 user0
; ;
inherit (flake.config.machines.devices) inherit
ceres (flake.config.machines.devices)
server
; ;
in in {
{ fileSystems = let
fileSystems = storageDrives = [
let "storage0"
storageDrives = [ ];
"storage0"
];
storageMounts = storage: { storageMounts = storage: {
name = "${ceres.${storage}.mount}"; name = "${server.${storage}.mount}";
value = { value = {
device = ceres.${storage}.device; device = server.${storage}.device;
fsType = "ext4"; fsType = "ext4";
options = ceres.${storage}.options; options = server.${storage}.options;
};
}; };
in };
in
{ {
"/" = { "/" = {
device = "/dev/disk/by-uuid/de4e681b-0667-4bf8-8d6e-c50894aa41cd"; device = "/dev/disk/by-uuid/de4e681b-0667-4bf8-8d6e-c50894aa41cd";
@ -40,12 +39,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 ${ceres.storage0.mount} 2775 root root -" "Z ${server.storage0.mount} 2775 root root -"
]; ];
services.udisks2.enable = true; services.udisks2.enable = true;

View file

@ -1,18 +1,20 @@
{ pkgs, ... }: {pkgs, ...}: {
{
hardware = { hardware = {
graphics = { graphics = {
enable = true; enable = true;
extraPackages = builtins.attrValues { extraPackages = builtins.attrValues {
inherit (pkgs) inherit
(pkgs)
amdvlk amdvlk
; ;
inherit (pkgs.rocmPackages.clr) inherit
(pkgs.rocmPackages.clr)
icd icd
; ;
}; };
extraPackages32 = builtins.attrValues { extraPackages32 = builtins.attrValues {
inherit (pkgs.driversi686Linux) inherit
(pkgs.driversi686Linux)
amdvlk amdvlk
; ;
}; };

View file

@ -3,8 +3,7 @@
lib, lib,
pkgs, pkgs,
... ...
}: }: {
{
hardware = { hardware = {
firmware = [ firmware = [
pkgs.rtl8761b-firmware pkgs.rtl8761b-firmware

View file

@ -4,11 +4,11 @@
... ...
}: }:
let let
inherit (flake.config.machines.devices) ceres; inherit (flake.config.machines.devices) server;
in in
{ {
networking = { networking = {
hostName = ceres.name; hostName = server.name;
networkmanager.enable = true; networkmanager.enable = true;
nftables.enable = true; nftables.enable = true;
useDHCP = lib.mkDefault true; useDHCP = lib.mkDefault true;

View file

@ -1,10 +1,9 @@
{ flake, ... }: {flake, ...}: let
let inherit
inherit (flake.config.people) (flake.config.people)
user0 user0
; ;
in in {
{
sops = { sops = {
secrets = { secrets = {
"discord-token" = { "discord-token" = {

14
systems/server/default.nix Executable file
View file

@ -0,0 +1,14 @@
{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";
}