From ba1d04f83a07c7511d37a583047c9813ceb2340e Mon Sep 17 00:00:00 2001 From: Lillian-Violet Date: Thu, 28 Dec 2023 12:47:58 +0100 Subject: [PATCH] Big refactor, need to test still --- flake.nix | 8 ++++---- .../configuration.nix} | 2 +- home-manager/{ => hosts/EDI}/EDI-Lillian.nix | 2 +- .../{ => hosts/GLaDOS}/GLaDOS-Lillian.nix | 2 +- .../{ => hosts/queen}/queen-Lillian.nix | 2 +- .../{ => hosts/shodan}/shodan-Lillian.nix | 0 .../zsh.nix | 0 .../configuration.nix | 0 nixos/{ => hosts}/EDI/configuration.nix | 0 .../{ => hosts}/EDI/hardware-configuration.nix | 0 .../hosts/EDI/secrets/sops.yaml | 0 nixos/{ => hosts}/GLaDOS/configuration.nix | 0 .../GLaDOS/hardware-configuration.nix | 0 nixos/{ => hosts}/queen/configuration.nix | 17 +++++++++-------- .../queen/hardware-configuration.nix | 0 .../hosts/queen/secrets/sops.yaml | 0 nixos/{ => hosts}/shodan/configuration.nix | 0 .../shodan/hardware-configuration.nix | 0 .../akkoma/configuration.nix} | 0 .../gitea/configuration.nix} | 0 .../gotosocial/configuration.nix} | 0 .../mail-server/configuration.nix} | 0 .../nextcloud/configuration.nix} | 0 .../postgres/configuration.nix} | 0 .../postgres/upgrade.nix} | 0 .../roundcube/configuration.nix} | 0 26 files changed, 17 insertions(+), 16 deletions(-) rename home-manager/{desktop-shared.nix => desktop/configuration.nix} (99%) rename home-manager/{ => hosts/EDI}/EDI-Lillian.nix (95%) rename home-manager/{ => hosts/GLaDOS}/GLaDOS-Lillian.nix (95%) rename home-manager/{ => hosts/queen}/queen-Lillian.nix (98%) rename home-manager/{ => hosts/shodan}/shodan-Lillian.nix (100%) rename home-manager/{program-configs => package-configs}/zsh.nix (100%) rename nixos/{shared-desktop => desktop}/configuration.nix (100%) rename nixos/{ => hosts}/EDI/configuration.nix (100%) rename nixos/{ => hosts}/EDI/hardware-configuration.nix (100%) rename secrets/EDI-Lillian.yaml => nixos/hosts/EDI/secrets/sops.yaml (100%) rename nixos/{ => hosts}/GLaDOS/configuration.nix (100%) rename nixos/{ => hosts}/GLaDOS/hardware-configuration.nix (100%) rename nixos/{ => hosts}/queen/configuration.nix (91%) rename nixos/{ => hosts}/queen/hardware-configuration.nix (100%) rename secrets/queen-Lillian.yaml => nixos/hosts/queen/secrets/sops.yaml (100%) rename nixos/{ => hosts}/shodan/configuration.nix (100%) rename nixos/{ => hosts}/shodan/hardware-configuration.nix (100%) rename nixos/{queen/akkoma.nix => package-configs/akkoma/configuration.nix} (100%) rename nixos/{queen/gittea.nix => package-configs/gitea/configuration.nix} (100%) rename nixos/{queen/gotosocial.nix => package-configs/gotosocial/configuration.nix} (100%) rename nixos/{queen/mail-server.nix => package-configs/mail-server/configuration.nix} (100%) rename nixos/{queen/nextcloud.nix => package-configs/nextcloud/configuration.nix} (100%) rename nixos/{queen/postgres.nix => package-configs/postgres/configuration.nix} (100%) rename nixos/{upgrade/postgresql.nix => package-configs/postgres/upgrade.nix} (100%) rename nixos/{queen/webmail.nix => package-configs/roundcube/configuration.nix} (100%) diff --git a/flake.nix b/flake.nix index 124844a..45f7a4f 100644 --- a/flake.nix +++ b/flake.nix @@ -65,7 +65,7 @@ specialArgs = {inherit inputs outputs;}; modules = [ # > Our main nixos configuration file < - ./nixos/EDI/configuration.nix + ./nixos/hosts/EDI/configuration.nix sops-nix.nixosModules.sops ]; }; @@ -76,7 +76,7 @@ specialArgs = {inherit inputs outputs;}; modules = [ # > Our main nixos configuration file < - ./nixos/GLaDOS/configuration.nix + ./nixos/hosts/GLaDOS/configuration.nix sops-nix.nixosModules.sops ]; }; @@ -87,7 +87,7 @@ specialArgs = {inherit inputs outputs;}; modules = [ # > Our main nixos configuration file < - ./nixos/queen/configuration.nix + ./nixos/hosts/queen/configuration.nix sops-nix.nixosModules.sops ]; }; @@ -98,7 +98,7 @@ specialArgs = {inherit inputs outputs;}; modules = [ # > Our main nixos configuration file < - ./nixos/shodan/configuration.nix + ./nixos/hosts/shodan/configuration.nix sops-nix.nixosModules.sops ]; }; diff --git a/home-manager/desktop-shared.nix b/home-manager/desktop/configuration.nix similarity index 99% rename from home-manager/desktop-shared.nix rename to home-manager/desktop/configuration.nix index 86a6be5..f34a413 100644 --- a/home-manager/desktop-shared.nix +++ b/home-manager/desktop/configuration.nix @@ -16,7 +16,7 @@ # You can also split up your configuration and import pieces of it here: # ./nvim.nix - ./program-configs/zsh.nix + ./package-configs/zsh.nix ]; nixpkgs = { # You can add overlays here diff --git a/home-manager/EDI-Lillian.nix b/home-manager/hosts/EDI/EDI-Lillian.nix similarity index 95% rename from home-manager/EDI-Lillian.nix rename to home-manager/hosts/EDI/EDI-Lillian.nix index fb6fcb7..b59fd8c 100644 --- a/home-manager/EDI-Lillian.nix +++ b/home-manager/hosts/EDI/EDI-Lillian.nix @@ -18,7 +18,7 @@ # You can also split up your configuration and import pieces of it here: # ./nvim.nix - ./desktop-shared.nix + ../../desktop/configuration.nix ]; # https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion diff --git a/home-manager/GLaDOS-Lillian.nix b/home-manager/hosts/GLaDOS/GLaDOS-Lillian.nix similarity index 95% rename from home-manager/GLaDOS-Lillian.nix rename to home-manager/hosts/GLaDOS/GLaDOS-Lillian.nix index 7d0d024..e6b32ab 100644 --- a/home-manager/GLaDOS-Lillian.nix +++ b/home-manager/hosts/GLaDOS/GLaDOS-Lillian.nix @@ -18,7 +18,7 @@ # You can also split up your configuration and import pieces of it here: # ./nvim.nix - ./desktop-shared.nix + ../../desktop/configuration.nix ]; home.packages = with pkgs; [ diff --git a/home-manager/queen-Lillian.nix b/home-manager/hosts/queen/queen-Lillian.nix similarity index 98% rename from home-manager/queen-Lillian.nix rename to home-manager/hosts/queen/queen-Lillian.nix index 3eed06c..2f6c55f 100644 --- a/home-manager/queen-Lillian.nix +++ b/home-manager/hosts/queen/queen-Lillian.nix @@ -18,7 +18,7 @@ # You can also split up your configuration and import pieces of it here: # ./nvim.nix - ./program-configs/zsh.nix + ./package-configs/zsh.nix ]; nixpkgs = { diff --git a/home-manager/shodan-Lillian.nix b/home-manager/hosts/shodan/shodan-Lillian.nix similarity index 100% rename from home-manager/shodan-Lillian.nix rename to home-manager/hosts/shodan/shodan-Lillian.nix diff --git a/home-manager/program-configs/zsh.nix b/home-manager/package-configs/zsh.nix similarity index 100% rename from home-manager/program-configs/zsh.nix rename to home-manager/package-configs/zsh.nix diff --git a/nixos/shared-desktop/configuration.nix b/nixos/desktop/configuration.nix similarity index 100% rename from nixos/shared-desktop/configuration.nix rename to nixos/desktop/configuration.nix diff --git a/nixos/EDI/configuration.nix b/nixos/hosts/EDI/configuration.nix similarity index 100% rename from nixos/EDI/configuration.nix rename to nixos/hosts/EDI/configuration.nix diff --git a/nixos/EDI/hardware-configuration.nix b/nixos/hosts/EDI/hardware-configuration.nix similarity index 100% rename from nixos/EDI/hardware-configuration.nix rename to nixos/hosts/EDI/hardware-configuration.nix diff --git a/secrets/EDI-Lillian.yaml b/nixos/hosts/EDI/secrets/sops.yaml similarity index 100% rename from secrets/EDI-Lillian.yaml rename to nixos/hosts/EDI/secrets/sops.yaml diff --git a/nixos/GLaDOS/configuration.nix b/nixos/hosts/GLaDOS/configuration.nix similarity index 100% rename from nixos/GLaDOS/configuration.nix rename to nixos/hosts/GLaDOS/configuration.nix diff --git a/nixos/GLaDOS/hardware-configuration.nix b/nixos/hosts/GLaDOS/hardware-configuration.nix similarity index 100% rename from nixos/GLaDOS/hardware-configuration.nix rename to nixos/hosts/GLaDOS/hardware-configuration.nix diff --git a/nixos/queen/configuration.nix b/nixos/hosts/queen/configuration.nix similarity index 91% rename from nixos/queen/configuration.nix rename to nixos/hosts/queen/configuration.nix index 717609e..d1474d7 100644 --- a/nixos/queen/configuration.nix +++ b/nixos/hosts/queen/configuration.nix @@ -16,13 +16,14 @@ # You can also split up your configuration and import pieces of it here: # ./nvim.nix ./hardware-configuration.nix - ./postgres.nix - ./nextcloud.nix - ./mail-server.nix - ./webmail.nix - ./gotosocial.nix - ../upgrade/postgresql.nix - ./akkoma.nix + ../../package-configs/akkoma/configuration.nix + ../../package-configs/gitea/configuration.nix + ../../package-configs/gotosocial/configuration.nix + ../../package-configs/mail-server/configuration.nix + ../../package-configs/nextcloud/configuration.nix + ../../package-configs/postgres/configuration.nix + ../../package-configs/postgres/upgrade.nix + ../../package-configs/roundcube/configuration.nix ]; boot.tmp.cleanOnBoot = true; @@ -56,7 +57,7 @@ }; #Set up sops config, and configure where the keyfile is, then set the mode for the unencrypted keys - sops.defaultSopsFile = ../../secrets/queen-Lillian.yaml; + sops.defaultSopsFile = ./secrets/sops.yaml; sops.age.keyFile = ./keys.txt; nix = { diff --git a/nixos/queen/hardware-configuration.nix b/nixos/hosts/queen/hardware-configuration.nix similarity index 100% rename from nixos/queen/hardware-configuration.nix rename to nixos/hosts/queen/hardware-configuration.nix diff --git a/secrets/queen-Lillian.yaml b/nixos/hosts/queen/secrets/sops.yaml similarity index 100% rename from secrets/queen-Lillian.yaml rename to nixos/hosts/queen/secrets/sops.yaml diff --git a/nixos/shodan/configuration.nix b/nixos/hosts/shodan/configuration.nix similarity index 100% rename from nixos/shodan/configuration.nix rename to nixos/hosts/shodan/configuration.nix diff --git a/nixos/shodan/hardware-configuration.nix b/nixos/hosts/shodan/hardware-configuration.nix similarity index 100% rename from nixos/shodan/hardware-configuration.nix rename to nixos/hosts/shodan/hardware-configuration.nix diff --git a/nixos/queen/akkoma.nix b/nixos/package-configs/akkoma/configuration.nix similarity index 100% rename from nixos/queen/akkoma.nix rename to nixos/package-configs/akkoma/configuration.nix diff --git a/nixos/queen/gittea.nix b/nixos/package-configs/gitea/configuration.nix similarity index 100% rename from nixos/queen/gittea.nix rename to nixos/package-configs/gitea/configuration.nix diff --git a/nixos/queen/gotosocial.nix b/nixos/package-configs/gotosocial/configuration.nix similarity index 100% rename from nixos/queen/gotosocial.nix rename to nixos/package-configs/gotosocial/configuration.nix diff --git a/nixos/queen/mail-server.nix b/nixos/package-configs/mail-server/configuration.nix similarity index 100% rename from nixos/queen/mail-server.nix rename to nixos/package-configs/mail-server/configuration.nix diff --git a/nixos/queen/nextcloud.nix b/nixos/package-configs/nextcloud/configuration.nix similarity index 100% rename from nixos/queen/nextcloud.nix rename to nixos/package-configs/nextcloud/configuration.nix diff --git a/nixos/queen/postgres.nix b/nixos/package-configs/postgres/configuration.nix similarity index 100% rename from nixos/queen/postgres.nix rename to nixos/package-configs/postgres/configuration.nix diff --git a/nixos/upgrade/postgresql.nix b/nixos/package-configs/postgres/upgrade.nix similarity index 100% rename from nixos/upgrade/postgresql.nix rename to nixos/package-configs/postgres/upgrade.nix diff --git a/nixos/queen/webmail.nix b/nixos/package-configs/roundcube/configuration.nix similarity index 100% rename from nixos/queen/webmail.nix rename to nixos/package-configs/roundcube/configuration.nix