diff --git a/flake.nix b/flake.nix index ed7eaa6..597ac32 100644 --- a/flake.nix +++ b/flake.nix @@ -117,6 +117,8 @@ #ildkule-unstable = unstableNixosConfig "ildkule" { }; shark = stableNixosConfig "shark" { }; + kommode = stableNixosConfig "kommode" { }; + ustetind = stableNixosConfig "ustetind" { modules = [ "${nixpkgs}/nixos/modules/virtualisation/lxc-container.nix" diff --git a/hosts/kommode/configuration.nix b/hosts/kommode/configuration.nix new file mode 100644 index 0000000..4009858 --- /dev/null +++ b/hosts/kommode/configuration.nix @@ -0,0 +1,31 @@ +{ pkgs, values, fp, ... }: +{ + imports = [ + # Include the results of the hardware scan. + ./hardware-configuration.nix + (fp /base) + (fp /misc/metrics-exporters.nix) + ]; + + # sops.defaultSopsFile = fp /secrets/kommode/kommode.yaml; + # sops.age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ]; + # sops.age.keyFile = "/var/lib/sops-nix/key.txt"; + # sops.age.generateKey = true; + + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + networking.hostName = "kommode"; # Define your hostname. + + systemd.network.networks."30-ens18" = values.defaultNetworkConfig // { + matchConfig.Name = "ens18"; + address = with values.hosts.kommode; [ (ipv4 + "/25") (ipv6 + "/64") ]; + }; + + services.btrfs.autoScrub.enable = true; + + environment.systemPackages = with pkgs; []; + + system.stateVersion = "24.11"; +} + diff --git a/hosts/kommode/hardware-configuration.nix b/hosts/kommode/hardware-configuration.nix new file mode 100644 index 0000000..bd0b638 --- /dev/null +++ b/hosts/kommode/hardware-configuration.nix @@ -0,0 +1,39 @@ +# 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/d421538f-a260-44ae-8e03-47cac369dcc1"; + fsType = "btrfs"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/86CD-4C23"; + fsType = "vfat"; + options = [ "fmask=0077" "dmask=0077" ]; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/4cfbb41e-801f-40dd-8c58-0a0c1a6025f6"; } + ]; + + # 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.<interface>.useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.ens18.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; +} diff --git a/values.nix b/values.nix index cd8e26d..1596c6a 100644 --- a/values.nix +++ b/values.nix @@ -60,6 +60,10 @@ in rec { ipv4 = pvv-ipv4 204; ipv6 = pvv-ipv6 "1:4f"; # Wtf øystein og daniel why }; + kommode = { + ipv4 = pvv-ipv4 223; + ipv6 = pvv-ipv6 223; + }; ustetind = { ipv4 = pvv-ipv4 234; ipv6 = pvv-ipv6 234;