diff --git a/flake.nix b/flake.nix index 5b15737..09ceaf6 100644 --- a/flake.nix +++ b/flake.nix @@ -156,6 +156,8 @@ hermes = systems/hermes; theseus = systems/theseus; + hephaistos = systems/hephaistos; + arachne = systems/arachne; angelia = systems/angelia; heracles = systems/heracles; @@ -246,6 +248,8 @@ theseus = [ systems.theseus ]; theseus-small = theseus ++ [ common.misc.small ]; + hephaistos = [ systems.hephaistos ]; + heracles = [ systems.heracles ]; arachne = [ systems.arachne ]; angelia = [ systems.angelia ]; diff --git a/systems/hephaistos/default.nix b/systems/hephaistos/default.nix new file mode 100644 index 0000000..f626563 --- /dev/null +++ b/systems/hephaistos/default.nix @@ -0,0 +1,30 @@ +{ lib, flakes, localModules, ... }: + +{ + imports = let + inherit (localModules) common; + in [ + common.base + common.physical + common.server + + ./disks.nix + + common.misc.ftp + ]; + + nixpkgs.hostPlatform = lib.systems.examples.gnu64; + + system.etc.overlay.enable = false; + + networking = { + hostName = "hephaistos"; + hostId = "a9ff4923"; + }; + + misc.uuid = "cf51a7f4-c533-4d64-a7ce-034ea9ff4923"; + + time.timeZone = "Etc/UTC"; + + system.stateVersion = "24.11"; +} \ No newline at end of file diff --git a/systems/hephaistos/disks.nix b/systems/hephaistos/disks.nix new file mode 100644 index 0000000..dfb6c9f --- /dev/null +++ b/systems/hephaistos/disks.nix @@ -0,0 +1,47 @@ +{ localModules, ... }: + +let + uuids = { + boot = "11f5382d-869e-4457-bdb5-f9002e1c505d"; + swap = "548ae092-f991-448e-817f-adaa538c2db9"; + }; + + devs = builtins.mapAttrs + (_: uuid: "/dev/disk/by-partuuid/${uuid}") + uuids; +in { + imports = let + inherit (localModules) common; + in [ + common.impermanent + ]; + + intransience.datastores = { + system.path = "/safe/system"; + home.path = "/safe/system/home"; + home.enable = false; + cache.path = "/volatile/cache"; + }; + + fileSystems = let + dataset = subpath: { + fsType = "zfs"; + device = "rpool/${subpath}"; + neededForBoot = true; + }; + in { + # EFI System Partition + "/boot" = { device = devs.boot; }; + + # Nix store + "/nix" = dataset "volatile/nix"; + + # Persistent data + "/safe/system" = dataset "safe/system"; + "/volatile/cache" = dataset "volatile/cache"; + }; + + swapDevices = [ + { device = devs.swap; } + ]; +} \ No newline at end of file