From dfd827ee7498448545a6c592df7b5256d6b1360c Mon Sep 17 00:00:00 2001 From: Daniel Olsen Date: Tue, 23 May 2023 04:26:36 +0200 Subject: [PATCH] Clean up jokum removal --- README.MD | 2 +- flake.nix | 8 ++- hosts/bicep/services/jokum.nix | 51 ------------------- .../services/metrics/prometheus/node.nix | 1 - hosts/jokum/configuration.nix | 43 ---------------- values.nix | 6 +-- 6 files changed, 5 insertions(+), 106 deletions(-) delete mode 100644 hosts/bicep/services/jokum.nix delete mode 100644 hosts/jokum/configuration.nix diff --git a/README.MD b/README.MD index 96a81bf..1798731 100644 --- a/README.MD +++ b/README.MD @@ -6,7 +6,7 @@ Før du endrer på ting husk å ikke putte ting som skal være hemmelig uten å Etter å ha klonet prosjektet ned og gjort endringer kan du bygge med: -`nix build .#nixosConfigurations.jokum.config.system.build.toplevel` +`nix build .#nixosConfigurations..config.system.build.toplevel` Husk å hvertfall stage nye filer om du har laget dem! diff --git a/flake.nix b/flake.nix index 170e2f0..31eea7b 100644 --- a/flake.nix +++ b/flake.nix @@ -31,18 +31,16 @@ modules = [ ./hosts/${name}/configuration.nix sops-nix.nixosModules.sops - matrix-next.nixosModules.synapse ]; }); in { - bicep = nixosConfig "bicep" { }; + bicep = nixosConfig "bicep" { + modules = [ matrix-next.nixosModules.synapse ]; + }; bekkalokk = nixosConfig "bekkalokk" { }; greddost = nixosConfig "greddost" { }; ildkule = nixosConfig "ildkule" { }; - jokum = nixosConfig "jokum" { - modules = [ matrix-next.nixosModules.synapse ]; - }; }; devShells = forAllSystems (system: { diff --git a/hosts/bicep/services/jokum.nix b/hosts/bicep/services/jokum.nix deleted file mode 100644 index 802a5cf..0000000 --- a/hosts/bicep/services/jokum.nix +++ /dev/null @@ -1,51 +0,0 @@ -{config, lib, pkgs, inputs, values, ...}: - -{ - # lfmao - containers.jokum = { - autoStart = true; - # wtf - #path = inputs.self.nixosConfigurations.jokum.config.system.build.toplevel; - interfaces = [ "enp6s0f1" ]; - bindMounts = { - "/data" = { hostPath = "/data/jokum"; isReadOnly = false; }; - }; - config = {config, pkgs, ...}: let - inherit values inputs; - in { - imports = [ - inputs.sops-nix.nixosModules.sops - inputs.matrix-next.nixosModules.synapse - - ../../jokum/services/matrix - ../../jokum/services/nginx - ]; - - _module.args = { - inherit values inputs; - }; - - sops.defaultSopsFile = ../../../secrets/jokum/jokum.yaml; - sops.age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ]; - sops.age.keyFile = "/var/lib/sops-nix/key.txt"; - sops.age.generateKey = true; - - services.openssh = { - enable = true; - permitRootLogin = "yes"; - }; - - systemd.network.enable = true; - - networking.useHostResolvConf = false; - - systemd.network.networks."30-enp6s0f1" = values.defaultNetworkConfig // { - matchConfig.Name = "enp6s0f1"; - address = with values.hosts.jokum; [ (ipv4 + "/25") (ipv6 + "/64") ] - ++ (with values.services.turn; [ (ipv4 + "/25") (ipv6 + "/64") ]); - }; - - system.stateVersion = "21.05"; - }; - }; -} diff --git a/hosts/ildkule/services/metrics/prometheus/node.nix b/hosts/ildkule/services/metrics/prometheus/node.nix index b7d5cd0..be62f7b 100644 --- a/hosts/ildkule/services/metrics/prometheus/node.nix +++ b/hosts/ildkule/services/metrics/prometheus/node.nix @@ -12,7 +12,6 @@ in { "knakelibrak.pvv.ntnu.no:9100" "hildring.pvv.ntnu.no:9100" "bicep.pvv.ntnu.no:9100" - "jokum.pvv.ntnu.no:9100" "essendrop.pvv.ntnu.no:9100" "andresbu.pvv.ntnu.no:9100" "bekkalokk.pvv.ntnu.no:9100" diff --git a/hosts/jokum/configuration.nix b/hosts/jokum/configuration.nix deleted file mode 100644 index d744b52..0000000 --- a/hosts/jokum/configuration.nix +++ /dev/null @@ -1,43 +0,0 @@ -{ config, pkgs, values, ... }: -{ - imports = [ - ../../base.nix -# ../../misc/metrics-exporters.nix - ../../misc/rust-motd.nix - -# ./services/matrix -# ./services/nginx - ]; - -# sops.defaultSopsFile = ../../secrets/jokum/jokum.yaml; -# sops.age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ]; -# sops.age.keyFile = "/var/lib/sops-nix/key.txt"; -# sops.age.generateKey = true; - - boot.kernel.enable = false; - boot.isContainer = true; - boot.loader.initScript.enable = true; - networking.useHostResolvConf = false; - - networking.hostName = "jokum"; # Define your hostname. - - systemd.network.networks."30-enp6s0f1" = values.defaultNetworkConfig // { - matchConfig.Name = "ens10f1"; - address = with values.hosts.jokum; [ (ipv4 + "/25") (ipv6 + "/64") ] - ++ (with values.services.turn; [ (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 = "21.05"; # Did you read the comment? -} diff --git a/values.nix b/values.nix index 56fbe8e..ad4b414 100644 --- a/values.nix +++ b/values.nix @@ -10,7 +10,7 @@ in rec { postgres = { inherit (hosts.bicep) ipv4 ipv6; }; - # Also on jokum + # Also on bicep turn = { ipv4 = pvv-ipv4 213; ipv6 = pvv-ipv6 213; @@ -23,10 +23,6 @@ in rec { ipv4 = pvv-ipv4 168; ipv6 = pvv-ipv6 168; }; - jokum = { - ipv4 = pvv-ipv4 169; - ipv6 = pvv-ipv6 169; - }; ildkule = { ipv4 = pvv-ipv4 187; ipv6 = pvv-ipv6 "1:187";