From f15114b2d5b37aab83c74da7011297af1c2042ea Mon Sep 17 00:00:00 2001 From: stupidcomputer Date: Thu, 26 Dec 2024 15:50:24 -0600 Subject: [PATCH] [temp] move mailserver to own configuration --- boxes/netbox/default.nix | 1 + boxes/netbox/mail.nix | 27 +++++++++++++++++++++++++++ flake.nix | 29 +++-------------------------- 3 files changed, 31 insertions(+), 26 deletions(-) create mode 100644 boxes/netbox/mail.nix diff --git a/boxes/netbox/default.nix b/boxes/netbox/default.nix index 8c55069..0afe317 100644 --- a/boxes/netbox/default.nix +++ b/boxes/netbox/default.nix @@ -16,6 +16,7 @@ ./franklincce.nix ./wireguard.nix ./nextcloud.nix + ./mail.nix ]; nix = { diff --git a/boxes/netbox/mail.nix b/boxes/netbox/mail.nix new file mode 100644 index 0000000..e4b8807 --- /dev/null +++ b/boxes/netbox/mail.nix @@ -0,0 +1,27 @@ +{ inputs }: +{ + imports = [ + inputs.simple-nixos-mailserver.nixosModule + ]; + + mailserver = { + enable = true; + fqdn = "mail.beepboop.systems"; + domains = [ "beepboop.systems" ]; + loginAccounts = { + "ryan@beepboop.systems" = { + # nix-shell -p mkpasswd --run 'mkpasswd -sm bcrypt' > /hashed/password/file/location + hashedPasswordFile = "/etc/ryan-beepboop-systemsuser-pass"; + + aliases = [ + "info@beepboop.systems" + "postmaster@beepboop.systems" + ]; + }; + "machines@beepboop.systems" = { + hashedPasswordFile = "/etc/ryan-beepboop-systemsuser-pass"; + }; + }; + certificateScheme = "acme-nginx"; + }; +} diff --git a/flake.nix b/flake.nix index 907ec21..cef1c89 100644 --- a/flake.nix +++ b/flake.nix @@ -18,44 +18,21 @@ nixosConfigurations = { netbox = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; - specialArgs = { inherit inputs; } // { machines = import ./machines.nix; }; + specialArgs = { inherit inputs; } // { machines = import ./lib/machines.nix; }; modules = [ ./boxes/netbox - simple-nixos-mailserver.nixosModule - { - mailserver = { - enable = true; - fqdn = "mail.beepboop.systems"; - domains = [ "beepboop.systems" ]; - loginAccounts = { - "ryan@beepboop.systems" = { - # nix-shell -p mkpasswd --run 'mkpasswd -sm bcrypt' > /hashed/password/file/location - hashedPasswordFile = "/etc/ryan-beepboop-systemsuser-pass"; - - aliases = [ - "info@beepboop.systems" - "postmaster@beepboop.systems" - ]; - }; - "machines@beepboop.systems" = { - hashedPasswordFile = "/etc/ryan-beepboop-systemsuser-pass"; - }; - }; - certificateScheme = "acme-nginx"; - }; - } ]; }; copernicus = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; - specialArgs = { inherit inputs; } // { machines = import ./machines.nix; }; + specialArgs = { inherit inputs; } // { machines = import ./lib/machines.nix; }; modules = [ ./boxes/copernicus ]; }; aristotle = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; - specialArgs = { inherit inputs; } // { machines = import ./machines.nix; }; + specialArgs = { inherit inputs; } // { machines = import ./lib/machines.nix; }; modules = [ ./lappy/configuration.nix ];