summary refs log blame commit diff stats
path: root/flake.nix
blob: 9504c0458986518abc521fd1733281463f85e7dd (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12




                                                           




                                                                          



             
                            
       


                                            
                                                             
                              


                                           
                                               
         
      



                                                                        
    
# vim: ts=2
{
  description = "Nixos server config";

  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-22.11-small";
    simple-nixos-mailserver = {
      url = "gitlab:simple-nixos-mailserver/nixos-mailserver/nixos-22.11";
      inputs = {
        nixpkgs.follows = "nixpkgs";
      };
    };
  };

  outputs = {
    self,
    nixpkgs,
    simple-nixos-mailserver,
    ...
  } @ attrs: let
    system = "x86_64-linux";
    pkgs = nixpkgs.legacyPackages.${system};
  in {
    nixosConfigurations."server1" = nixpkgs.lib.nixosSystem {
      system = "x86_64-linux";
      specialArgs = attrs;
      modules = [
        ./hosts/server1/configuration.nix
        simple-nixos-mailserver.nixosModule
        {
          mailserver = import ./system/mail {};
        }
      ];
    };
    devShells."${system}" = {
      default = pkgs.mkShell {
        packages = with pkgs; [nil alejandra statix shellcheck ltex-ls];
      };
    };
  };
}