jokum: move to systemd-nspawn container on bicep

This commit is contained in:
Daniel Lovbrotte Olsen 2023-02-26 19:23:00 +01:00
parent e293d64e66
commit af955c88f8
3 changed files with 9 additions and 41 deletions

View File

@ -13,7 +13,7 @@
networking.defaultGateway = values.hosts.gateway; networking.defaultGateway = values.hosts.gateway;
services.resolved = { services.resolved = {
enable = true; enable = lib.mkDefault true;
dnssec = "false"; # Supposdly this keeps breaking and the default is to allow downgrades anyways... dnssec = "false"; # Supposdly this keeps breaking and the default is to allow downgrades anyways...
}; };

View File

@ -1,9 +1,6 @@
{ config, pkgs, values, ... }: { config, pkgs, values, ... }:
{ {
imports = [ imports = [
# Include the results of the hardware scan.
./hardware-configuration.nix
../../base.nix ../../base.nix
../../misc/metrics-exporters.nix ../../misc/metrics-exporters.nix
../../misc/rust-motd.nix ../../misc/rust-motd.nix
@ -17,16 +14,16 @@
sops.age.keyFile = "/var/lib/sops-nix/key.txt"; sops.age.keyFile = "/var/lib/sops-nix/key.txt";
sops.age.generateKey = true; sops.age.generateKey = true;
boot.kernel.enable = false;
# Use the GRUB 2 boot loader. boot.isContainer = true;
boot.loader.grub.enable = true; boot.loader.initScript.enable = true;
boot.loader.grub.version = 2;
boot.loader.grub.devices = [ "/dev/sda" ];
networking.hostName = "jokum"; # Define your hostname. networking.hostName = "jokum"; # Define your hostname.
networking.interfaces.ens18.useDHCP = false; services.resolved.enable = false;
networking.interfaces.ens18.ipv4 = {
networking.interfaces.ens10f1.useDHCP = false;
networking.interfaces.ens10f1.ipv4 = {
addresses = [ addresses = [
{ {
address = values.hosts.jokum.ipv4; address = values.hosts.jokum.ipv4;
@ -38,7 +35,7 @@
} }
]; ];
}; };
networking.interfaces.ens18.ipv6 = { networking.interfaces.ens10f1.ipv6 = {
addresses = [ addresses = [
{ {
address = values.hosts.jokum.ipv6; address = values.hosts.jokum.ipv6;

View File

@ -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;
}