From 907b96588f0158db92cc8a55831ee7cd0de8552c Mon Sep 17 00:00:00 2001 From: Ember 'n0emis' Keske Date: Sun, 10 Jul 2022 18:49:41 +0200 Subject: [PATCH] add host nerd --- flake.nix | 4 +++ hosts/nerd/configuration.nix | 36 ++++++++++++++++++++++++++ hosts/nerd/hardware-configuration.nix | 37 +++++++++++++++++++++++++++ 3 files changed, 77 insertions(+) create mode 100644 hosts/nerd/configuration.nix create mode 100644 hosts/nerd/hardware-configuration.nix diff --git a/flake.nix b/flake.nix index 2f32f0e..009ebc8 100644 --- a/flake.nix +++ b/flake.nix @@ -26,6 +26,10 @@ deployment.allowLocalDeployment = true; }; + nerd = { ... }: { + deployment.targetHost = "nerd.bula22.de"; + }; + pre-router = { config, pkgs, ... }: { deployment.targetHost = "lightbuffet.entr0py.cloud"; deployment.keys = { diff --git a/hosts/nerd/configuration.nix b/hosts/nerd/configuration.nix new file mode 100644 index 0000000..8206ad9 --- /dev/null +++ b/hosts/nerd/configuration.nix @@ -0,0 +1,36 @@ +{ config, pkgs, ... }: + +{ + imports = + [ # Include the results of the hardware scan. + ./hardware-configuration.nix + ]; + + # Use the systemd-boot EFI boot loader. + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + networking.hostName = "nerd"; + + networking.useNetworkd = true; + systemd.network = { + networks."10-ens18" = { + matchConfig = { + Name = "ens18"; + }; + address = [ "10.42.10.24/24" "fd00:10:42:10::240/64" "2a01:4f8:1c0c:8221::240/64" ]; + gateway = [ "10.42.10.1" "2a01:4f8:1c0c:8221::1" ]; + }; + }; + + environment.systemPackages = with pkgs; [ colmena ]; + + # This value determines the NixOS release from which the default + # settings for stateful data, like file locations and database versions + # on your system were taken. It‘s perfectly fine and recommended to leave + # this value at the release version of the first install of this system. + # Before changing this value read the documentation for this option + # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). + system.stateVersion = "22.05"; # Did you read the comment? + +} diff --git a/hosts/nerd/hardware-configuration.nix b/hosts/nerd/hardware-configuration.nix new file mode 100644 index 0000000..4850f8e --- /dev/null +++ b/hosts/nerd/hardware-configuration.nix @@ -0,0 +1,37 @@ +# 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 = [ "ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/9f0eee43-eae6-4f5a-b2b3-6cbdd4798d94"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/E5B4-9740"; + fsType = "vfat"; + }; + + swapDevices = [ ]; + + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking + # (the default) this is the recommended approach. When using systemd-networkd it's + # still possible to use this option, but it's recommended to use it in conjunction + # with explicit per-interface declarations with `networking.interfaces..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.ens18.useDHCP = lib.mkDefault true; + + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} +