From 2339fba37290774336fa517a417330e3ff788ba5 Mon Sep 17 00:00:00 2001 From: polwex Date: Sun, 27 Jul 2025 03:34:16 +0700 Subject: spanch --- hosts/cloud/span/configuration.nix | 4 ++-- hosts/cloud/span/default.nix | 1 + hosts/cloud/span/flake.lock | 27 ---------------------- hosts/cloud/span/flake.nix | 16 ------------- hosts/cloud/span/mail.nix | 16 +------------ hosts/cloud/span/nginx.nix | 2 ++ hosts/cloud/span/packages.nix | 47 -------------------------------------- 7 files changed, 6 insertions(+), 107 deletions(-) delete mode 100644 hosts/cloud/span/flake.lock delete mode 100644 hosts/cloud/span/flake.nix delete mode 100644 hosts/cloud/span/packages.nix (limited to 'hosts/cloud/span') diff --git a/hosts/cloud/span/configuration.nix b/hosts/cloud/span/configuration.nix index 1157308..cdf39d7 100644 --- a/hosts/cloud/span/configuration.nix +++ b/hosts/cloud/span/configuration.nix @@ -10,8 +10,8 @@ # Include the results of the hardware scan. ./hardware-configuration.nix ./users.nix - ./mail.nix - ./packages.nix + # ./mail.nix + ../packages.nix ./nginx.nix ]; diff --git a/hosts/cloud/span/default.nix b/hosts/cloud/span/default.nix index 3669483..6bce414 100644 --- a/hosts/cloud/span/default.nix +++ b/hosts/cloud/span/default.nix @@ -1,4 +1,5 @@ inputs: [ inputs.disko.nixosModules.disko + inputs.nixos-mailserver.nixosModule ./configuration.nix ] diff --git a/hosts/cloud/span/flake.lock b/hosts/cloud/span/flake.lock deleted file mode 100644 index 6bc7bd0..0000000 --- a/hosts/cloud/span/flake.lock +++ /dev/null @@ -1,27 +0,0 @@ -{ - "nodes": { - "nixpkgs": { - "locked": { - "lastModified": 1704008649, - "narHash": "sha256-rGPSWjXTXTurQN9beuHdyJhB8O761w1Zc5BqSSmHvoM=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "d44d59d2b5bd694cd9d996fd8c51d03e3e9ba7f7", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "root": { - "inputs": { - "nixpkgs": "nixpkgs" - } - } - }, - "root": "root", - "version": 7 -} diff --git a/hosts/cloud/span/flake.nix b/hosts/cloud/span/flake.nix deleted file mode 100644 index b801212..0000000 --- a/hosts/cloud/span/flake.nix +++ /dev/null @@ -1,16 +0,0 @@ -{ - inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; - - outputs = { nixpkgs, ... }: - { - nixosConfigurations.spanmail = nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; - modules = [ - ./configuration.nix - ./users.nix - ./packages.nix - ./mail.nix - ]; - }; - }; -} diff --git a/hosts/cloud/span/mail.nix b/hosts/cloud/span/mail.nix index 9cc44a7..69be6a9 100644 --- a/hosts/cloud/span/mail.nix +++ b/hosts/cloud/span/mail.nix @@ -3,17 +3,6 @@ pkgs, ... }: { - imports = [ - (builtins.fetchTarball { - url = "https://gitlab.com/simple-nixos-mailserver/nixos-mailserver/-/archive/nixos-23.11/nixos-mailserver-nixos-23.11.tar.gz"; - # To get the sha256 of the nixos-mailserver tarball, we can use the nix-prefetch-url command: - # release="nixos-23.05"; nix-prefetch-url "https://gitlab.com/simple-nixos-mailserver/nixos-mailserver/-/archive/${release}/nixos-mailserver-${release}.tar.gz" --unpack - - sha256 = "122vm4n3gkvlkqmlskiq749bhwfd0r71v6vcmg1bbyg4998brvx8"; - }) - ]; - - services.dovecot2.sieve.extensions = ["fileinto"]; mailserver = { enable = true; fqdn = "mail.spandrell.ch"; @@ -32,7 +21,7 @@ hashedPasswordFile = "/home/span/mail.key"; }; "lol@spandrell.ch" = { - hashedPasswordFile = "/home/span/mail2.key"; + hashedPasswordFile = "/home/span/mail.key"; }; "sub@spandrell.ch" = { hashedPasswordFile = "/home/span/mail.key"; @@ -52,8 +41,6 @@ # down nginx and opens port 80. certificateScheme = "acme-nginx"; }; - security.acme.acceptTerms = true; - security.acme.defaults.email = "security@spandrell.ch"; services.roundcube = { enable = true; # this is the url of the vhost, not necessarily the same as the fqdn of @@ -67,5 +54,4 @@ $config['smtp_pass'] = "%p"; ''; }; - services.nginx.enable = true; } diff --git a/hosts/cloud/span/nginx.nix b/hosts/cloud/span/nginx.nix index 4da4b68..9bfa8ea 100644 --- a/hosts/cloud/span/nginx.nix +++ b/hosts/cloud/span/nginx.nix @@ -3,6 +3,8 @@ pkgs, ... }: { + security.acme.acceptTerms = true; + security.acme.defaults.email = "admin@spandrell.ch"; services.nginx = { enable = true; appendHttpConfig = '' diff --git a/hosts/cloud/span/packages.nix b/hosts/cloud/span/packages.nix deleted file mode 100644 index 6574071..0000000 --- a/hosts/cloud/span/packages.nix +++ /dev/null @@ -1,47 +0,0 @@ -{ config, pkgs, ... }: - -{ - nixpkgs.config = { - allowUnfree = true; - }; - - environment.systemPackages = with pkgs; [ - vim - helix - fish - # unix utilities - tmux - bat # cat replacement written in Rust - colordiff - direnv # Per-directory environment variables - lsd - fd # find replacement written in Rust - fzf # Fuzzy finder - git - htop # Resource monitoring - jq # JSON parsing for the CLI - lsof - ripgrep # grep replacement written in Rust - sd # Fancy sed replacement - silver-searcher - strace # debug stack trace - tealdeer # tldr for various shell tools - testdisk - tokei # Handy tool to see lines of code by language - watchexec # Fileystem watcher/executor useful for speedy development - xsv # CSV file parsing utility - just # Intriguing new make replacement - mdcat # Markdown converter/reader for the CLI - tree - unzip - zip - - # networking - curl - wget - - minio - ncdu - ]; -} - -- cgit v1.2.3 From cd6e43bc73c43643b06d42e3e025986f1e4edea1 Mon Sep 17 00:00:00 2001 From: polwex Date: Sun, 27 Jul 2025 04:38:40 +0700 Subject: spanch --- hosts/cloud/span/configuration.nix | 3 ++- hosts/cloud/span/mail.nix | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'hosts/cloud/span') diff --git a/hosts/cloud/span/configuration.nix b/hosts/cloud/span/configuration.nix index cdf39d7..d887d37 100644 --- a/hosts/cloud/span/configuration.nix +++ b/hosts/cloud/span/configuration.nix @@ -8,9 +8,10 @@ }: { imports = [ # Include the results of the hardware scan. + ../../base.nix ./hardware-configuration.nix ./users.nix - # ./mail.nix + ./mail.nix ../packages.nix ./nginx.nix ]; diff --git a/hosts/cloud/span/mail.nix b/hosts/cloud/span/mail.nix index 69be6a9..beee817 100644 --- a/hosts/cloud/span/mail.nix +++ b/hosts/cloud/span/mail.nix @@ -4,6 +4,7 @@ ... }: { mailserver = { + stateVersion = 3; enable = true; fqdn = "mail.spandrell.ch"; domains = ["spandrell.ch"]; -- cgit v1.2.3