From be341622fe63f01dc5471ce3199eb6ba6681aa31 Mon Sep 17 00:00:00 2001 From: Daniel Olsen Date: Sun, 17 Sep 2023 01:41:59 +0200 Subject: [PATCH] georg: init --- flake.nix | 9 ++++++ hosts/georg/configuration.nix | 36 +++++++++++++++++++++++ hosts/georg/hardware-configuration.nix | 40 ++++++++++++++++++++++++++ values.nix | 4 +++ 4 files changed, 89 insertions(+) create mode 100644 hosts/georg/configuration.nix create mode 100644 hosts/georg/hardware-configuration.nix diff --git a/flake.nix b/flake.nix index a86e7931..d0aa5c5c 100644 --- a/flake.nix +++ b/flake.nix @@ -77,6 +77,15 @@ ./hosts/brzeczyszczykiewicz/configuration.nix sops-nix.nixosModules.sops + inputs.grzegorz.nixosModules.grzegorz-kiosk + inputs.grzegorz-clients.nixosModules.grzegorz-webui + ]; + }; + georg = stableNixosConfig "georg" { + modules = [ + ./hosts/georg/configuration.nix + sops-nix.nixosModules.sops + inputs.grzegorz.nixosModules.grzegorz-kiosk inputs.grzegorz-clients.nixosModules.grzegorz-webui ]; diff --git a/hosts/georg/configuration.nix b/hosts/georg/configuration.nix new file mode 100644 index 00000000..9b417405 --- /dev/null +++ b/hosts/georg/configuration.nix @@ -0,0 +1,36 @@ +{ config, pkgs, values, ... }: +{ + imports = [ + # Include the results of the hardware scan. + ./hardware-configuration.nix + ../../base.nix + ../../misc/metrics-exporters.nix + + ../../modules/grzegorz.nix + ]; + + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + networking.hostName = "georg"; + + systemd.network.networks."30-eno1" = values.defaultNetworkConfig // { + matchConfig.Name = "eno1"; + address = with values.hosts.georg; [ (ipv4 + "/25") (ipv6 + "/64") ]; + }; + + # List packages installed in system profile + environment.systemPackages = with pkgs; [ + ]; + + # List services that you want to enable: + + # 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 = "23.05"; # Did you read the comment? + +} diff --git a/hosts/georg/hardware-configuration.nix b/hosts/georg/hardware-configuration.nix new file mode 100644 index 00000000..967d0ec5 --- /dev/null +++ b/hosts/georg/hardware-configuration.nix @@ -0,0 +1,40 @@ +# 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 + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/33825f0d-5a63-40fc-83db-bfa1ebb72ba0"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/145E-7362"; + fsType = "vfat"; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/7ed27e21-3247-44cd-8bcc-5d4a2efebf57"; } + ]; + + # 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.eno1.useDHCP = lib.mkDefault true; + # networking.interfaces.enp2s2.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/values.nix b/values.nix index 3d8dcc66..ffc7872c 100644 --- a/values.nix +++ b/values.nix @@ -45,6 +45,10 @@ in rec { ipv4 = pvv-ipv4 205; ipv6 = pvv-ipv6 "1:50"; # Wtf peder why }; + georg = { + ipv4 = pvv-ipv4 204; + ipv6 = pvv-ipv6 "1:4f"; # Wtf øystein og daniel why + }; }; defaultNetworkConfig = {