diff --git a/flake.nix b/flake.nix index 2c2c9e9..55a8561 100644 --- a/flake.nix +++ b/flake.nix @@ -129,6 +129,14 @@ osmium = [ ./machines/osmium ]; + thorite = [ + disko.nixosModules.disko + ./machines/thorite + ]; + biotite = [ + disko.nixosModules.disko + ./machines/biotite + ]; }; sharedColmenaModules = [ deploymentModule @@ -279,6 +287,19 @@ }; nixpkgs.system = "x86_64-linux"; }; + thorite = + { ... }: + { + imports = nodeNixosModules.thorite ++ sharedColmenaModules; + deployment = { + buildOnTarget = false; + }; + }; + biotite = + { ... }: + { + imports = nodeNixosModules.biotite ++ sharedColmenaModules; + }; }; nixosConfigurations = { @@ -289,6 +310,7 @@ osmium = mkNixos { hostname = "osmium"; }; + } // self.colmenaHive.nodes; } diff --git a/machines/biotite/default.nix b/machines/biotite/default.nix new file mode 100644 index 0000000..1b73ee4 --- /dev/null +++ b/machines/biotite/default.nix @@ -0,0 +1,31 @@ +{ + config, + lib, + pkgs, + ... +}: + +{ + imports = [ ./hardware-configurations.nix ]; + + networking.hostName = "biotite"; + networking.useNetworkd = true; + systemd.network.enable = true; + systemd.network.networks."10-wan" = { + matchConfig.MACAddress = "00:16:3e:0a:ec:45"; + networkConfig.DHCP = "ipv4"; + dhcpV4Config = { + UseDNS = true; + }; + }; + + commonSettings = { + auth.enable = true; + autoupgrade.enable = true; + }; + + users.users.root.hashedPassword = "$y$j9T$NToEZWJBONjSgRnMd9Ur9/$o6n7a9b8eUILQz4d37oiHCCVnDJ8hZTZt.c.37zFfU."; + + system.stateVersion = "24.11"; + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; +} diff --git a/machines/biotite/hardware-configurations.nix b/machines/biotite/hardware-configurations.nix new file mode 100644 index 0000000..91763c8 --- /dev/null +++ b/machines/biotite/hardware-configurations.nix @@ -0,0 +1,22 @@ +{ config, modulesPath, ... }: +{ + imports = [ + (modulesPath + "/profiles/qemu-guest.nix") + ]; + + disko.devices = { + disk = { + main = { + type = "disk"; + device = "/dev/vda"; + content = { + type = "gpt"; + partitions = { + boot = config.diskPartitions.grubMbr; + root = config.diskPartitions.btrfs; + }; + }; + }; + }; + }; +} diff --git a/machines/thorite/default.nix b/machines/thorite/default.nix new file mode 100644 index 0000000..ef69751 --- /dev/null +++ b/machines/thorite/default.nix @@ -0,0 +1,29 @@ +{ ... }: +{ + imports = [ + ./hardware-configurations.nix + ]; + + networking.hostName = "thorite"; + networking.useNetworkd = true; + systemd.network.enable = true; + systemd.network.networks."10-wan" = { + matchConfig.MACAddress = "00:51:d3:21:f3:28"; + networkConfig = { + DHCP = "no"; + Gateway = "23.165.200.1"; + }; + address = [ "23.165.200.99/24" ]; + }; + + nixpkgs.system = "x86_64-linux"; + + system.stateVersion = "24.11"; + + commonSettings = { + auth.enable = true; + autoupgrade.enable = true; + }; + + users.users.root.hashedPassword = "$y$j9T$NToEZWJBONjSgRnMd9Ur9/$o6n7a9b8eUILQz4d37oiHCCVnDJ8hZTZt.c.37zFfU."; +} diff --git a/machines/thorite/hardware-configurations.nix b/machines/thorite/hardware-configurations.nix new file mode 100644 index 0000000..82f9ac6 --- /dev/null +++ b/machines/thorite/hardware-configurations.nix @@ -0,0 +1,40 @@ +{ config, modulesPath, ... }: +{ + imports = [ + (modulesPath + "/profiles/qemu-guest.nix") + ]; + disko.devices = { + disk = { + main = { + type = "disk"; + device = "/dev/sda"; + content = { + type = "gpt"; + partitions = { + boot = config.diskPartitions.grubMbr; + root = config.diskPartitions.btrfs; + }; + }; + }; + }; + }; + disko.devices.disk.main.imageSize = "10G"; + + boot.initrd.availableKernelModules = [ + "uhci_hcd" + "virtio_scsi" + "sd_mod" + "sr_mod" + "ahci" + "ata_piix" + "virtio_pci" + "xen_blkfront" + "vmw_pvscsi" + ]; + + boot.loader.grub = { + enable = true; + }; + + boot.kernelModules = [ "kvm-intel" ]; +}