From 01bcc9ecaddec64740e6b21c9008aeaf09fe6756 Mon Sep 17 00:00:00 2001 From: Rouven Seifert Date: Tue, 12 Mar 2024 12:03:29 +0100 Subject: [PATCH] refactor: streamline core modules into dedicated folder --- flake.nix | 20 +++++--------------- modules/{ => core}/bacula.nix | 0 modules/{ => core}/base.nix | 16 ++++++++-------- modules/core/default.nix | 14 ++++++++++++++ modules/{ => core}/fail2ban.nix | 0 modules/{ => core}/initrd-ssh.nix | 0 modules/{ => core}/mysql.nix | 0 modules/{ => core}/nginx.nix | 0 modules/{ => core}/postgres.nix | 0 modules/{ => core}/sssd.nix | 0 modules/{ => core}/zsh.nix | 0 modules/sops.nix | 5 ----- 12 files changed, 27 insertions(+), 28 deletions(-) rename modules/{ => core}/bacula.nix (100%) rename modules/{ => core}/base.nix (93%) create mode 100644 modules/core/default.nix rename modules/{ => core}/fail2ban.nix (100%) rename modules/{ => core}/initrd-ssh.nix (100%) rename modules/{ => core}/mysql.nix (100%) rename modules/{ => core}/nginx.nix (100%) rename modules/{ => core}/postgres.nix (100%) rename modules/{ => core}/sssd.nix (100%) rename modules/{ => core}/zsh.nix (100%) delete mode 100644 modules/sops.nix diff --git a/flake.nix b/flake.nix index b000074..24c42bd 100755 --- a/flake.nix +++ b/flake.nix @@ -71,37 +71,27 @@ course-management.nixosModules.default vscode-server.nixosModules.default ./hosts/quitte/configuration.nix - ./modules/bacula.nix ./modules/options.nix - ./modules/base.nix - ./modules/sops.nix + ./modules/core ./modules/ldap - ./modules/sssd.nix ./modules/mail ./modules/web - ./modules/mysql.nix ./modules/nix-serve.nix - ./modules/nginx.nix ./modules/hedgedoc.nix ./modules/padlist.nix - ./modules/postgres.nix ./modules/wiki - ./modules/ftp.nix #./modules/stream.nix ./modules/nextcloud.nix ./modules/matrix.nix ./modules/mautrix-telegram.nix ./modules/vaultwarden.nix - ./modules/zsh.nix ./modules/course-management.nix ./modules/courses-phil.nix ./modules/gitea.nix - ./modules/fail2ban.nix ./modules/kanboard.nix ./modules/zammad.nix - ./modules/initrd-ssh.nix ./modules/decisions.nix ./modules/struktur-bot.nix { @@ -119,10 +109,10 @@ vscode-server.nixosModules.default print-interface.nixosModules.default ./hosts/tomate/configuration.nix - ./modules/base.nix - ./modules/zsh.nix - ./modules/fail2ban.nix - ./modules/sssd.nix + ./modules/core/base.nix + ./modules/core/zsh.nix + ./modules/core/fail2ban.nix + ./modules/core/sssd.nix { sops.defaultSopsFile = ./secrets/tomate.yaml; } diff --git a/modules/bacula.nix b/modules/core/bacula.nix similarity index 100% rename from modules/bacula.nix rename to modules/core/bacula.nix diff --git a/modules/base.nix b/modules/core/base.nix similarity index 93% rename from modules/base.nix rename to modules/core/base.nix index a514e81..f74cd9e 100755 --- a/modules/base.nix +++ b/modules/core/base.nix @@ -54,14 +54,14 @@ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINJgYI2rXmw4uPXAMmOgqgJEwYfwj/IBExTCzs9Dgo+R w0lff" ]; keyFiles = [ - ../keys/ssh/marcus-sapphire - ../keys/ssh/schrader - ../keys/ssh/jannusch - ../keys/ssh/jannusch-arch - ../keys/ssh/tassilo - ../keys/ssh/jonasga - ../keys/ssh/rouven - ../keys/ssh/joachim + ../../keys/ssh/marcus-sapphire + ../../keys/ssh/schrader + ../../keys/ssh/jannusch + ../../keys/ssh/jannusch-arch + ../../keys/ssh/tassilo + ../../keys/ssh/jonasga + ../../keys/ssh/rouven + ../../keys/ssh/joachim ]; }; diff --git a/modules/core/default.nix b/modules/core/default.nix new file mode 100644 index 0000000..c4badf4 --- /dev/null +++ b/modules/core/default.nix @@ -0,0 +1,14 @@ +{ ... }: +{ + imports = [ + ./base.nix + ./bacula.nix + ./fail2ban.nix + ./initrd-ssh.nix + ./mysql.nix + ./nginx.nix + ./postgres.nix + ./sssd.nix + ./zsh.nix + ]; +} diff --git a/modules/fail2ban.nix b/modules/core/fail2ban.nix similarity index 100% rename from modules/fail2ban.nix rename to modules/core/fail2ban.nix diff --git a/modules/initrd-ssh.nix b/modules/core/initrd-ssh.nix similarity index 100% rename from modules/initrd-ssh.nix rename to modules/core/initrd-ssh.nix diff --git a/modules/mysql.nix b/modules/core/mysql.nix similarity index 100% rename from modules/mysql.nix rename to modules/core/mysql.nix diff --git a/modules/nginx.nix b/modules/core/nginx.nix similarity index 100% rename from modules/nginx.nix rename to modules/core/nginx.nix diff --git a/modules/postgres.nix b/modules/core/postgres.nix similarity index 100% rename from modules/postgres.nix rename to modules/core/postgres.nix diff --git a/modules/sssd.nix b/modules/core/sssd.nix similarity index 100% rename from modules/sssd.nix rename to modules/core/sssd.nix diff --git a/modules/zsh.nix b/modules/core/zsh.nix similarity index 100% rename from modules/zsh.nix rename to modules/core/zsh.nix diff --git a/modules/sops.nix b/modules/sops.nix deleted file mode 100644 index d34979f..0000000 --- a/modules/sops.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ ... }: -{ - sops.age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ]; - sops.age.generateKey = false; -}