From 7a08a607e498f1bdfebd4b26e05138b89c535b67 Mon Sep 17 00:00:00 2001 From: zuckerberg <5-zuckerberg@users.noreply.git.neet.dev> Date: Mon, 7 Mar 2022 23:53:14 -0500 Subject: [PATCH] cleanup config imports --- common/auto-update.nix | 2 +- common/boot/default.nix | 10 ++++++++++ common/{common.nix => default.nix} | 21 +++++---------------- common/pc/{de.nix => default.nix} | 0 common/server/default.nix | 17 +++++++++++++++++ flake.nix | 2 +- 6 files changed, 34 insertions(+), 18 deletions(-) create mode 100644 common/boot/default.nix rename common/{common.nix => default.nix} (68%) rename common/pc/{de.nix => default.nix} (100%) create mode 100644 common/server/default.nix diff --git a/common/auto-update.nix b/common/auto-update.nix index bd84a44..4ef00bc 100644 --- a/common/auto-update.nix +++ b/common/auto-update.nix @@ -1,6 +1,6 @@ { config, lib, ... }: -# Modify auto-update so that it pulls a flake and much +# Modify auto-update so that it pulls a flake let cfg = config.system.autoUpgrade; diff --git a/common/boot/default.nix b/common/boot/default.nix new file mode 100644 index 0000000..e651288 --- /dev/null +++ b/common/boot/default.nix @@ -0,0 +1,10 @@ +{ lib, config, pkgs, ... }: + +{ + imports = [ + ./firmware.nix + ./efi.nix + ./bios.nix + ./luks.nix + ]; +} \ No newline at end of file diff --git a/common/common.nix b/common/default.nix similarity index 68% rename from common/common.nix rename to common/default.nix index be891ed..55ff6aa 100644 --- a/common/common.nix +++ b/common/default.nix @@ -6,22 +6,9 @@ ./pia.nix ./zerotier.nix ./auto-update.nix - ./boot/firmware.nix - ./boot/efi.nix - ./boot/bios.nix - ./boot/luks.nix - ./server/nginx.nix - ./server/thelounge.nix - ./server/mumble.nix - ./server/icecast.nix - ./server/nginx-stream.nix - ./server/matrix.nix - ./server/zerobin.nix - ./server/gitea.nix - ./server/privatebin/privatebin.nix - ./server/drastikbot.nix - ./server/radio.nix - ./pc/de.nix + ./boot + ./server + ./pc ]; system.stateVersion = "20.09"; @@ -48,4 +35,6 @@ hashedPassword = "$6$TuDO46rILr$gkPUuLKZe3psexhs8WFZMpzgEBGksE.c3Tjh1f8sD0KMC4oV89K2pqAABfl.Lpxu2jVdr5bgvR5cWnZRnji/r/"; }; nix.trustedUsers = [ "root" "googlebot" ]; + + nix.gc.automatic = true; } diff --git a/common/pc/de.nix b/common/pc/default.nix similarity index 100% rename from common/pc/de.nix rename to common/pc/default.nix diff --git a/common/server/default.nix b/common/server/default.nix new file mode 100644 index 0000000..c8b72d7 --- /dev/null +++ b/common/server/default.nix @@ -0,0 +1,17 @@ +{ config, pkgs, ... }: + +{ + imports = [ + ./nginx.nix + ./thelounge.nix + ./mumble.nix + ./icecast.nix + ./nginx-stream.nix + ./matrix.nix + ./zerobin.nix + ./gitea.nix + ./privatebin/privatebin.nix + ./drastikbot.nix + ./radio.nix + ]; +} \ No newline at end of file diff --git a/flake.nix b/flake.nix index 1f7d7aa..ecfb005 100644 --- a/flake.nix +++ b/flake.nix @@ -30,7 +30,7 @@ inherit system; modules = [ path - ./common/common.nix + ./common inputs.simple-nixos-mailserver.nixosModule inputs.agenix.nixosModules.age ({ lib, ... }: {