From af955c88f80954c46431f5e4fb02e094c0542b56 Mon Sep 17 00:00:00 2001 From: Daniel Olsen Date: Sun, 26 Feb 2023 19:23:00 +0100 Subject: [PATCH] jokum: move to systemd-nspawn container on bicep --- base.nix | 2 +- hosts/jokum/configuration.nix | 19 +++++++---------- hosts/jokum/hardware-configuration.nix | 29 -------------------------- 3 files changed, 9 insertions(+), 41 deletions(-) delete mode 100644 hosts/jokum/hardware-configuration.nix diff --git a/base.nix b/base.nix index 6ff5021..8bcf92e 100644 --- a/base.nix +++ b/base.nix @@ -13,7 +13,7 @@ networking.defaultGateway = values.hosts.gateway; services.resolved = { - enable = true; + enable = lib.mkDefault true; dnssec = "false"; # Supposdly this keeps breaking and the default is to allow downgrades anyways... }; diff --git a/hosts/jokum/configuration.nix b/hosts/jokum/configuration.nix index e91e476..6a6bd52 100644 --- a/hosts/jokum/configuration.nix +++ b/hosts/jokum/configuration.nix @@ -1,9 +1,6 @@ { config, pkgs, values, ... }: { imports = [ - # Include the results of the hardware scan. - ./hardware-configuration.nix - ../../base.nix ../../misc/metrics-exporters.nix ../../misc/rust-motd.nix @@ -17,16 +14,16 @@ sops.age.keyFile = "/var/lib/sops-nix/key.txt"; sops.age.generateKey = true; - - # Use the GRUB 2 boot loader. - boot.loader.grub.enable = true; - boot.loader.grub.version = 2; - boot.loader.grub.devices = [ "/dev/sda" ]; + boot.kernel.enable = false; + boot.isContainer = true; + boot.loader.initScript.enable = true; networking.hostName = "jokum"; # Define your hostname. - networking.interfaces.ens18.useDHCP = false; - networking.interfaces.ens18.ipv4 = { + services.resolved.enable = false; + + networking.interfaces.ens10f1.useDHCP = false; + networking.interfaces.ens10f1.ipv4 = { addresses = [ { address = values.hosts.jokum.ipv4; @@ -38,7 +35,7 @@ } ]; }; - networking.interfaces.ens18.ipv6 = { + networking.interfaces.ens10f1.ipv6 = { addresses = [ { address = values.hosts.jokum.ipv6; diff --git a/hosts/jokum/hardware-configuration.nix b/hosts/jokum/hardware-configuration.nix deleted file mode 100644 index a29cd06..0000000 --- a/hosts/jokum/hardware-configuration.nix +++ /dev/null @@ -1,29 +0,0 @@ -# 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/1a8bf91a-5948-40c2-a9fd-7a33e46fa441"; - fsType = "ext4"; - }; - - fileSystems."/data" = - { device = "/dev/disk/by-uuid/c812e204-b998-4ec5-9f26-29c5808ed6ba"; - fsType = "ext4"; - }; - - swapDevices = [ ]; - - hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; -}