summaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix56
1 files changed, 56 insertions, 0 deletions
diff --git a/flake.nix b/flake.nix
new file mode 100644
index 0000000..dbcaeb0
--- /dev/null
+++ b/flake.nix
@@ -0,0 +1,56 @@
+{
+ description = "toufy's server config";
+
+ inputs = {
+ nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
+ sops-nix = {
+ url = "github:Mic92/sops-nix";
+ inputs.nixpkgs.follows = "nixpkgs";
+ };
+ simple-nixos-mailserver.url = "gitlab:simple-nixos-mailserver/nixos-mailserver/nixos-25.11";
+ disko = {
+ url = "github:nix-community/disko";
+ inputs.nixpkgs.follows = "nixpkgs";
+ };
+ };
+
+ outputs = inputs @ {
+ self,
+ nixpkgs,
+ sops-nix,
+ simple-nixos-mailserver,
+ disko,
+ ...
+ }: {
+ nixosConfigurations = let
+ commonModules = [
+ ./common
+ ./secrets.nix
+ disko.nixosModules.disko
+ sops-nix.nixosModules.sops
+ ];
+ system = "x86_64-linux";
+ specialArgs = {inherit inputs;};
+ in {
+ adonis = nixpkgs.lib.nixosSystem {
+ inherit system;
+ inherit specialArgs;
+ modules =
+ [
+ ./adonis
+ ]
+ ++ commonModules;
+ };
+ aphrodite = nixpkgs.lib.nixosSystem {
+ inherit system;
+ inherit specialArgs;
+ modules =
+ [
+ ./aphrodite
+ simple-nixos-mailserver.nixosModule
+ ]
+ ++ commonModules;
+ };
+ };
+ };
+}