From 40d7ccf048e071318e9c05fcb866bda8ad095578 Mon Sep 17 00:00:00 2001 From: Eli Ribble Date: Wed, 22 Oct 2025 18:02:33 +0000 Subject: [PATCH] Move corp server to using the nocix role pattern This was introduced for the sync server, but we desire all to receive it. --- flake.nix | 8 ++-- host/corp/configuration.nix | 47 ------------------- .../amd-legacy-octacore/configuration.nix | 24 ++++++++++ host/nocix/amd-legacy-octacore/default.nix | 6 +++ .../amd-legacy-octacore}/disk-config.nix | 0 .../hardware-configuration.nix | 0 .../amd-legacy-octacore/network.nix} | 2 +- .../amd-legacy-sexcore/configuration.nix | 2 +- 8 files changed, 37 insertions(+), 52 deletions(-) delete mode 100644 host/corp/configuration.nix create mode 100644 host/nocix/amd-legacy-octacore/configuration.nix create mode 100644 host/nocix/amd-legacy-octacore/default.nix rename host/{corp => nocix/amd-legacy-octacore}/disk-config.nix (100%) rename host/{corp => nocix/amd-legacy-octacore}/hardware-configuration.nix (100%) rename host/{corp/networking.nix => nocix/amd-legacy-octacore/network.nix} (93%) diff --git a/flake.nix b/flake.nix index fe3536e..7def682 100644 --- a/flake.nix +++ b/flake.nix @@ -42,9 +42,11 @@ system = "x86_64-linux"; in { nixosConfigurations = { - corp = import ./system.nix { - configuration = ./host/corp/configuration.nix; - roles = [ ./roles/corp.nix ]; + "nocix-amd-legacy-octacore" = import ./system.nix { + configuration = ./host/nocix/amd-legacy-octacore; + roles = [ + ./roles/corp.nix + ]; inherit configFiles disko home-manager inputs nixpkgs nixvim sops-nix system timecard-bot; }; "nocix-amd-legacy-sexcore" = import ./system.nix { diff --git a/host/corp/configuration.nix b/host/corp/configuration.nix deleted file mode 100644 index 2f352e4..0000000 --- a/host/corp/configuration.nix +++ /dev/null @@ -1,47 +0,0 @@ -{ config, lib, pkgs, ... }: { - imports = [ - ./hardware-configuration.nix - ./networking.nix # generated at runtime by nixos-infect - ]; - - environment.systemPackages = with pkgs; [ - age - fish - git - htop - neovim - podman - postgresql - redis - slirp4netns - tmux - wget - ]; - services.openssh.enable = true; - services.postgresql.enable = true; - zramSwap.enable = true; - - # Copy the NixOS configuration file and link it from the resulting system - # (/run/current-system/configuration.nix). This is useful in case you - # accidentally delete configuration.nix. - # system.copySystemConfiguration = true; - - # This option defines the first version of NixOS you have installed on this particular machine, - # and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions. - # - # Most users should NEVER change this value after the initial install, for any reason, - # even if you've upgraded your system to a new NixOS release. - # - # This value does NOT affect the Nixpkgs version your packages and OS are pulled from, - # so changing it will NOT upgrade your system - see https://nixos.org/manual/nixos/stable/#sec-upgrading for how - # to actually do that. - # - # This value being lower than the current NixOS release does NOT mean your system is - # out of date, out of support, or vulnerable. - # - # Do NOT change this value unless you have manually inspected all the changes it would make to your configuration, - # and migrated your data accordingly. - # - # For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion . - #system.stateVersion = "23.11"; -} diff --git a/host/nocix/amd-legacy-octacore/configuration.nix b/host/nocix/amd-legacy-octacore/configuration.nix new file mode 100644 index 0000000..137fcb1 --- /dev/null +++ b/host/nocix/amd-legacy-octacore/configuration.nix @@ -0,0 +1,24 @@ +{ lib, modulesPath, pkgs, ... } @ args: { + imports = [ + ./network.nix + ]; + + environment.systemPackages = with pkgs; [ + age + fish + git + htop + neovim + podman + postgresql + redis + slirp4netns + tmux + wget + ]; + services.openssh.enable = true; + services.postgresql.enable = true; + zramSwap.enable = true; + + system.stateVersion = "25.05"; +} diff --git a/host/nocix/amd-legacy-octacore/default.nix b/host/nocix/amd-legacy-octacore/default.nix new file mode 100644 index 0000000..246ffea --- /dev/null +++ b/host/nocix/amd-legacy-octacore/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./configuration.nix + ./hardware-configuration.nix + ]; +} diff --git a/host/corp/disk-config.nix b/host/nocix/amd-legacy-octacore/disk-config.nix similarity index 100% rename from host/corp/disk-config.nix rename to host/nocix/amd-legacy-octacore/disk-config.nix diff --git a/host/corp/hardware-configuration.nix b/host/nocix/amd-legacy-octacore/hardware-configuration.nix similarity index 100% rename from host/corp/hardware-configuration.nix rename to host/nocix/amd-legacy-octacore/hardware-configuration.nix diff --git a/host/corp/networking.nix b/host/nocix/amd-legacy-octacore/network.nix similarity index 93% rename from host/corp/networking.nix rename to host/nocix/amd-legacy-octacore/network.nix index f0fdfce..0046a1a 100644 --- a/host/corp/networking.nix +++ b/host/nocix/amd-legacy-octacore/network.nix @@ -11,7 +11,7 @@ dhcpcd.enable = false; domain = "gleipnir.technology"; firewall.enable = false; - hostName = "corp"; + hostName = "nocix-amd-legacy-octacore"; interfaces.enp2s0 = { ipv4.addresses = [{ address = "107.150.59.202"; diff --git a/host/nocix/amd-legacy-sexcore/configuration.nix b/host/nocix/amd-legacy-sexcore/configuration.nix index 9df223f..a5f1e05 100644 --- a/host/nocix/amd-legacy-sexcore/configuration.nix +++ b/host/nocix/amd-legacy-sexcore/configuration.nix @@ -1,6 +1,6 @@ { - modulesPath, lib, + modulesPath, pkgs, ... } @ args: