From 8f69b14f66d049b25b417d03f1e8e9532d7b1b44 Mon Sep 17 00:00:00 2001 From: Max Date: Thu, 3 Feb 2022 20:21:17 +0100 Subject: [PATCH] hosts/prophet: init --- hosts/default.nix | 1 + hosts/prophet/default.nix | 26 ++++++++++++++++ hosts/prophet/hardware-configuration.nix | 25 +++++++++++++++ hosts/prophet/system.nix | 39 ++++++++++++++++++++++++ 4 files changed, 91 insertions(+) create mode 100644 hosts/prophet/default.nix create mode 100644 hosts/prophet/hardware-configuration.nix create mode 100644 hosts/prophet/system.nix diff --git a/hosts/default.nix b/hosts/default.nix index 67bc32d..6b27a0e 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -4,6 +4,7 @@ in with tools.dns; { # NixOS machines VEGAS = import ./VEGAS tools; + prophet = import ./prophet tools; # Non-NixOS machine metadata AnimusAlpha = let hostNames = [ "alpha.animus.com" "animus.com" ]; in { diff --git a/hosts/prophet/default.nix b/hosts/prophet/default.nix new file mode 100644 index 0000000..fb65bbf --- /dev/null +++ b/hosts/prophet/default.nix @@ -0,0 +1,26 @@ +tools: { + ssh.id = with tools.dns; { + publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJZ4FyGi69MksEn+UJZ87vw1APqiZmPNlEYIr0CbEoGv"; + hostNames = subResolve "prophet" "node"; + }; + + interfaces = { + primary = { + addr = "10.0.0.92"; + addrPublic = "152.67.76.138"; + link = "enp0s3"; + }; + }; + +# hypr = { +# id = ""; +# addr = "10.100.3.9"; +# }; + + enterprise = { + subdomain = "node"; + }; + + arch = "aarch64"; + nixos = import ./system.nix; +} diff --git a/hosts/prophet/hardware-configuration.nix b/hosts/prophet/hardware-configuration.nix new file mode 100644 index 0000000..3b47d1f --- /dev/null +++ b/hosts/prophet/hardware-configuration.nix @@ -0,0 +1,25 @@ +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ config, lib, pkgs, modulesPath, ... }: + +{ + imports = + [ (modulesPath + "/profiles/qemu-guest.nix") + ]; + + boot.initrd.availableKernelModules = [ "virtio_pci" "usbhid" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/68a66c53-17c1-402f-b0e0-5f9c3c1628a4"; + fsType = "xfs"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/A368-4D28"; + fsType = "vfat"; + }; +} diff --git a/hosts/prophet/system.nix b/hosts/prophet/system.nix new file mode 100644 index 0000000..b08bea9 --- /dev/null +++ b/hosts/prophet/system.nix @@ -0,0 +1,39 @@ +{ aspect, inputs, config, pkgs, ... }: + +{ + imports = + [ + # Hardware + ./hardware-configuration.nix + + inputs.agenix.nixosModules.age + + ] + ++ aspect.sets.server; + + # Use the systemd-boot EFI boot loader. + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + networking.hostName = "prophet"; + + time.timeZone = "Europe/Zurich"; + + networking.useDHCP = false; + networking.interfaces.enp0s3.useDHCP = true; + + i18n.defaultLocale = "en_US.UTF-8"; + + users.users.opc = { + isNormalUser = true; + extraGroups = [ "wheel" ]; + }; + + security.sudo.wheelNeedsPassword = false; + + services.openssh.enable = true; + + system.stateVersion = "21.11"; + +} +