From fc36f347c8d1a09123db6c59bd1ecfcb0cdf5cc8 Mon Sep 17 00:00:00 2001 From: Lillian-Violet Date: Thu, 11 Jan 2024 22:37:59 +0100 Subject: [PATCH] Added mail configuration to flake, and made wheatley use the mainline kernel to see if that works later --- flake.lock | 125 +++++++++++++++++- flake.nix | 3 + nixos/hosts/wheatley/configuration.nix | 2 - .../mail-server/configuration.nix | 18 --- 4 files changed, 124 insertions(+), 24 deletions(-) diff --git a/flake.lock b/flake.lock index ddca4cd..9770d24 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,21 @@ { "nodes": { + "blobs": { + "flake": false, + "locked": { + "lastModified": 1604995301, + "narHash": "sha256-wcLzgLec6SGJA8fx1OEN1yV/Py5b+U5iyYpksUY/yLw=", + "owner": "simple-nixos-mailserver", + "repo": "blobs", + "rev": "2cccdf1ca48316f2cfd1c9a0017e8de5a7156265", + "type": "gitlab" + }, + "original": { + "owner": "simple-nixos-mailserver", + "repo": "blobs", + "type": "gitlab" + } + }, "extest": { "inputs": { "extest": "extest_2", @@ -35,6 +51,22 @@ "type": "github" } }, + "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1668681692, + "narHash": "sha256-Ht91NGdewz8IQLtWZ9LCeNXMSXHUss+9COoqu6JLmXU=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "009399224d5e398d03b22badca40a37ac85412a1", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, "home-manager": { "inputs": { "nixpkgs": [ @@ -42,11 +74,11 @@ ] }, "locked": { - "lastModified": 1704809957, - "narHash": "sha256-Z8sBeoeeY2O+BNqh5C+4Z1h1F1wQ2mij7yPZ2GY397M=", + "lastModified": 1704980804, + "narHash": "sha256-lPNNKdPqIYcjhhYIVwlajNt/HqVWbMOoSdNnwCvOP04=", "owner": "nix-community", "repo": "home-manager", - "rev": "e13aa9e287b3365473e5897e3667ea80a899cdfb", + "rev": "93e804e7f8a1eb88bde6117cd5046501e66aa4bd", "type": "github" }, "original": { @@ -113,6 +145,36 @@ "type": "github" } }, + "nixpkgs-22_11": { + "locked": { + "lastModified": 1669558522, + "narHash": "sha256-yqxn+wOiPqe6cxzOo4leeJOp1bXE/fjPEi/3F/bBHv8=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "ce5fe99df1f15a09a91a86be9738d68fadfbad82", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "ref": "nixos-22.11", + "type": "indirect" + } + }, + "nixpkgs-23_05": { + "locked": { + "lastModified": 1684782344, + "narHash": "sha256-SHN8hPYYSX0thDrMLMWPWYulK3YFgASOrCsIL3AJ78g=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "8966c43feba2c701ed624302b6a935f97bcbdf88", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "ref": "nixos-23.05", + "type": "indirect" + } + }, "nixpkgs-stable": { "locked": { "lastModified": 1704290814, @@ -178,6 +240,21 @@ } }, "nixpkgs_4": { + "locked": { + "lastModified": 1670751203, + "narHash": "sha256-XdoH1v3shKDGlrwjgrNX/EN8s3c+kQV7xY6cLCE8vcI=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "64e0bf055f9d25928c31fb12924e59ff8ce71e60", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "ref": "nixos-unstable", + "type": "indirect" + } + }, + "nixpkgs_5": { "locked": { "lastModified": 1704161960, "narHash": "sha256-QGua89Pmq+FBAro8NriTuoO/wNaUtugt29/qqA8zeeM=", @@ -200,12 +277,37 @@ "jovian": "jovian", "nixpkgs": "nixpkgs_3", "nixpkgs-unstable": "nixpkgs-unstable", + "simple-nixos-mailserver": "simple-nixos-mailserver", "sops-nix": "sops-nix" } }, + "simple-nixos-mailserver": { + "inputs": { + "blobs": "blobs", + "flake-compat": "flake-compat", + "nixpkgs": "nixpkgs_4", + "nixpkgs-22_11": "nixpkgs-22_11", + "nixpkgs-23_05": "nixpkgs-23_05", + "utils": "utils" + }, + "locked": { + "lastModified": 1703666786, + "narHash": "sha256-SLPNpM/rI8XPyVJAxMYAe+n6NiYSpuXvdwPILHP4yZI=", + "owner": "simple-nixos-mailserver", + "repo": "nixos-mailserver", + "rev": "b5023b36a1f6628865cb42b4353bd2ddde0ea9f4", + "type": "gitlab" + }, + "original": { + "owner": "simple-nixos-mailserver", + "ref": "master", + "repo": "nixos-mailserver", + "type": "gitlab" + } + }, "sops-nix": { "inputs": { - "nixpkgs": "nixpkgs_4", + "nixpkgs": "nixpkgs_5", "nixpkgs-stable": "nixpkgs-stable" }, "locked": { @@ -221,6 +323,21 @@ "repo": "sops-nix", "type": "github" } + }, + "utils": { + "locked": { + "lastModified": 1605370193, + "narHash": "sha256-YyMTf3URDL/otKdKgtoMChu4vfVL3vCMkRqpGifhUn0=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "5021eac20303a61fafe17224c087f5519baed54d", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 4885fc4..ec9e477 100644 --- a/flake.nix +++ b/flake.nix @@ -5,6 +5,7 @@ # Nixpkgs nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; sops-nix.url = "github:Mic92/sops-nix"; + simple-nixos-mailserver.url = "gitlab:simple-nixos-mailserver/nixos-mailserver/master"; # You can access packages and modules from different nixpkgs revs # at the same time. Here's an working example: nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; @@ -25,6 +26,7 @@ nixpkgs, home-manager, sops-nix, + simple-nixos-mailserver, ... } @ inputs: let inherit (self) outputs; @@ -63,6 +65,7 @@ # > Our main nixos configuration file < ./nixos/hosts/queen/configuration.nix sops-nix.nixosModules.sops + simple-nixos-mailserver.nixosModule ]; }; }; diff --git a/nixos/hosts/wheatley/configuration.nix b/nixos/hosts/wheatley/configuration.nix index b4ad703..8ab28ff 100644 --- a/nixos/hosts/wheatley/configuration.nix +++ b/nixos/hosts/wheatley/configuration.nix @@ -14,8 +14,6 @@ boot.loader.generic-extlinux-compatible.enable = true; boot.loader.grub.enable = false; - boot.kernelPackages = pkgs.linuxPackages_5_15; - boot.extraModulePackages = [ (pkgs.callPackage ./rtl8189es.nix { kernel = config.boot.kernelPackages.kernel; diff --git a/nixos/server/package-configs/mail-server/configuration.nix b/nixos/server/package-configs/mail-server/configuration.nix index ac9c3a0..144ac7d 100644 --- a/nixos/server/package-configs/mail-server/configuration.nix +++ b/nixos/server/package-configs/mail-server/configuration.nix @@ -6,27 +6,9 @@ pkgs, ... }: { - imports = [ - (builtins.fetchTarball { - # Pick a release version you are interested in and set its hash, e.g. - url = "https://gitlab.com/simple-nixos-mailserver/nixos-mailserver/-/archive/24128c3052090311688b09a400aa408ba61c6ee5/nixos-mailserver-A-COMMIT-ID.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/24128c3052090311688b09a400aa408ba61c6ee5/nixos-mailserver-A-COMMIT-ID.tar.gz" --unpack - sha256 = "1ngil2shzkf61qxiqw11awyl81cr7ks2kv3r3k243zz7v2xakm5c"; - }) - ]; - sops.secrets."mailpass".mode = "0440"; sops.secrets."mailpass".owner = config.users.users.virtualMail.name; - # users.users = { - # virtualMail = { - # isSystemUser = true; - # isNormalUser = false; - # group = "virtualMail"; - # }; - # }; - mailserver = { enable = true; enableImap = true;