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


                                      
                                                           





                                                    




                                                
                               
                                                                          


                                    



             
             
                            
                 
       


                                            
                                                             
                              

                                           
                                              
        
      
                              







                               
        
    
           
 
{
  description = "Nixos server config";

  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05-small";

    systems.url = "github:nix-systems/x86_64-linux";
    flake-utils = {
      url = "github:numtide/flake-utils";
      inputs.systems.follows = "systems";
    };

    # modules
    impermanence = {
      url = "github:nix-community/impermanence";
      inputs = {
      };
    };
    simple-nixos-mailserver = {
      url = "gitlab:simple-nixos-mailserver/nixos-mailserver/nixos-23.05";
      inputs = {
        nixpkgs.follows = "nixpkgs";
      };
    };
  };

  outputs = {
    self,
    nixpkgs,
    # modules
    simple-nixos-mailserver,
    impermanence,
    ...
  } @ 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
        impermanence.nixosModules.impermanence
      ];
    };
    devShells."${system}" = {
      default = pkgs.mkShell {
        packages = with pkgs; [
          nil
          alejandra
          statix
          shellcheck
          ltex-ls
          cocogitto
          git-crypt
        ];
      };
    };
  };
}
# vim: ts=2