diff --git a/flake.nix b/flake.nix index 0caf4d02..eb875647 100644 --- a/flake.nix +++ b/flake.nix @@ -138,17 +138,6 @@ ./hosts/PW05CH3L/configuration.nix ]; }; - - hetznix = nixpkgs.lib.nixosSystem { - inherit system; - - modules = [ - agenix.nixosModules.default - disko.nixosModules.disko - - ./hosts/hetznix/configuration.nix - ]; - }; }; nixosModules = import ./modules { lib = nixpkgs.lib; }; diff --git a/hosts/hetznix/configuration.nix b/hosts/hetznix/configuration.nix deleted file mode 100644 index bef69384..00000000 --- a/hosts/hetznix/configuration.nix +++ /dev/null @@ -1,47 +0,0 @@ -{ - inputs, - lib, - modulesPath, - pkgs, - ... -}: -{ - imports = with inputs.self.nixosModules; [ - (modulesPath + "/installer/scan/not-detected.nix") - (modulesPath + "/profiles/qemu-guest.nix") - - ./disks.nix - ./hardware-configuration.nix - ./networking.nix - ./secrets.nix - ./security - ./services - - ../../modules/users/opdavies.nix - ]; - - nix = { - extraOptions = '' - trusted-users = root opdavies - ''; - }; - - boot.loader.grub = { - efiSupport = true; - efiInstallAsRemovable = true; - }; - - environment.systemPackages = map lib.lowPrio [ - pkgs.curl - pkgs.gitMinimal - pkgs.tree - pkgs.vim - pkgs.wget - ]; - - users.users.root.openssh.authorizedKeys.keys = [ - "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDkkbYaCD9NUIQT0NnsmlyfepwjxBYeiJSBCotOpdPTyc5inFAd29DiVw98j4skfaHdzjcqWmMFmDQWM6tGkK7eg8n0WuaABmsjdEbzTtfjHwM0tRDCIh5AtoT4IvoLhwLjEI2jKM05BGCQ2m5lS//AYJK1DjiV4UH+IjXHz6oy/3eFzQwANjxWS+mbR565p21yuAu1DKEyaGeVzT1xDhgzlnZG7Cys/rFgUYpIvYDHMOFxG6hsDB8vqyHiTXniniti5tdvGGYHgRGQcynRTU12aerrqHTIOefrElXJdf3/PA8FIY/Pd3MmZocY/vvQe0EVHXWrNtnHOF3MFQ1tFyfubKO51Dcp9KmzHnyBvO4CtvGVr/upSVWfo0I/EqkIqvCvBbdSIPeH9V5hAcyWENGF4Wf0/Yqtc0dBhfXJmPVBsC2ghZp9oERK+h5Xs7DpzkT0vtkN+wjgA5weIuG8e2UVNO29LWASzlychVqb7BVa6kNn5CyGwauyIGsYvAFnUjkyJpK8qleNM3VO5x9aw26IhSKlnSE9PAdX8p7PpdoWfxWRekKTc4h6iAe7pFOENvuokAvCNsE5LolR4VrYKXjA0m3nupDNWYexAWfR3lSeSlKd9nD3OENS0biJKayZHs11iDUTxm5u5gm/U60b4z0zDXjh1H/DI/pSCG6jjaXDpw== opdavies@lemp11" - ]; - - system.stateVersion = "24.05"; -} diff --git a/hosts/hetznix/disks.nix b/hosts/hetznix/disks.nix deleted file mode 100644 index d380ab8e..00000000 --- a/hosts/hetznix/disks.nix +++ /dev/null @@ -1,57 +0,0 @@ -{ lib, ... }: - -{ - disko.devices = { - disk.disk1 = { - device = lib.mkDefault "/dev/sda"; - type = "disk"; - content = { - type = "gpt"; - partitions = { - boot = { - name = "boot"; - size = "1M"; - type = "EF02"; - }; - esp = { - name = "ESP"; - size = "500M"; - type = "EF00"; - content = { - type = "filesystem"; - format = "vfat"; - mountpoint = "/boot"; - }; - }; - root = { - name = "root"; - size = "100%"; - content = { - type = "lvm_pv"; - vg = "pool"; - }; - }; - }; - }; - }; - - lvm_vg = { - pool = { - type = "lvm_vg"; - lvs = { - root = { - size = "100%FREE"; - content = { - type = "filesystem"; - format = "ext4"; - mountpoint = "/"; - mountOptions = [ - "defaults" - ]; - }; - }; - }; - }; - }; - }; -} diff --git a/hosts/hetznix/hardware-configuration.nix b/hosts/hetznix/hardware-configuration.nix deleted file mode 100644 index 986b7adb..00000000 --- a/hosts/hetznix/hardware-configuration.nix +++ /dev/null @@ -1,37 +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 = [ - "ahci" - "xhci_pci" - "virtio_pci" - "virtio_scsi" - "sd_mod" - "sr_mod" - ]; - boot.initrd.kernelModules = [ "dm-snapshot" ]; - boot.kernelModules = [ ]; - boot.extraModulePackages = [ ]; - - # 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.enp1s0.useDHCP = lib.mkDefault true; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; -} diff --git a/hosts/hetznix/networking.nix b/hosts/hetznix/networking.nix deleted file mode 100644 index 56da7730..00000000 --- a/hosts/hetznix/networking.nix +++ /dev/null @@ -1,19 +0,0 @@ -{ - networking = { - firewall.allowedTCPPorts = [ - 80 - 443 - ]; - - interfaces.enp1s0 = { - useDHCP = true; - - ipv4.addresses = [ - { - address = "116.203.11.255"; - prefixLength = 32; - } - ]; - }; - }; -} diff --git a/hosts/hetznix/secrets.nix b/hosts/hetznix/secrets.nix deleted file mode 100644 index e2032222..00000000 --- a/hosts/hetznix/secrets.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ - age.secrets = { - cloudflare.file = ../../secrets/cloudflare.age; - }; -} diff --git a/hosts/hetznix/security/acme.nix b/hosts/hetznix/security/acme.nix deleted file mode 100644 index cd69ffc5..00000000 --- a/hosts/hetznix/security/acme.nix +++ /dev/null @@ -1,20 +0,0 @@ -{ config, ... }: - -{ - security.acme = { - acceptTerms = true; - - defaults = { - dnsProvider = "cloudflare"; - email = "oliver@oliverdavies.uk"; - environmentFile = config.age.secrets.cloudflare.path; - webroot = null; - }; - - certs."oliverdavies.uk" = { - domain = "oliverdavies.uk"; - - extraDomainNames = [ "*.oliverdavies.uk" ]; - }; - }; -} diff --git a/hosts/hetznix/security/default.nix b/hosts/hetznix/security/default.nix deleted file mode 100644 index e8ee8aa6..00000000 --- a/hosts/hetznix/security/default.nix +++ /dev/null @@ -1,3 +0,0 @@ -{ - imports = [ ./acme.nix ]; -} diff --git a/hosts/hetznix/services/default.nix b/hosts/hetznix/services/default.nix deleted file mode 100644 index 55974127..00000000 --- a/hosts/hetznix/services/default.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ - imports = [ - ./jitsi.nix - ./openssl.nix - ]; -} diff --git a/hosts/hetznix/services/jitsi.nix b/hosts/hetznix/services/jitsi.nix deleted file mode 100644 index 3481c8ac..00000000 --- a/hosts/hetznix/services/jitsi.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ - services = { - jitsi-meet = { - enable = false; - caddy.enable = true; - nginx.enable = false; - secureDomain.enable = true; - - hostName = "meet.oliverdavies.uk"; - - prosody = { - enable = true; - lockdown = true; - }; - - jicofo = { - enable = true; - }; - }; - }; - - nixpkgs.config.permittedInsecurePackages = [ - "jitsi-meet-1.0.8043" - ]; -} diff --git a/hosts/hetznix/services/openssl.nix b/hosts/hetznix/services/openssl.nix deleted file mode 100644 index 53e4fded..00000000 --- a/hosts/hetznix/services/openssl.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ - services.openssh = { - enable = true; - - settings = { - AllowUsers = [ "opdavies" ]; - PermitRootLogin = "no"; - }; - }; -}