Home

infra @main - refs - log -
-
https://git.jolheiser.com/infra.git
dragonwell flake
infra / flake.nix
- raw
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
{
  description = "jolheiser's nixos config";

  inputs = {
    nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
    jolheiser.url = "git+https://git.jolheiser.com/nixpkgs.git";
    flake-utils.url = "github:numtide/flake-utils"; # Only expressed here to use for followers
    agenix = {
      url = "github:ryantm/agenix";
      inputs = {
        nixpkgs.follows = "nixpkgs";
        darwin.follows = "";
        home-manager.follows = "";
      };
    };
    website = {
      url = "git+https://git.jolheiser.com/jolheiser.com.git";
      inputs = {
        nixpkgs.follows = "nixpkgs";
        flake-utils.follows = "flake-utils";
      };
    };
    resume = {
      url = "git+https://git.jolheiser.com/resume.git";
      inputs = {
        nixpkgs.follows = "nixpkgs";
        flake-utils.follows = "flake-utils";
      };
    };
    blog = {
      url = "git+https://git.jolheiser.com/blog.git";
      inputs = {
        nixpkgs.follows = "nixpkgs";
      };
    };
    bennet = {
      url = "git+https://git.jolheiser.com/bennet.git";
      inputs.nixpkgs.follows = "nixpkgs";
    };
    git-age = {
      url = "git+https://git.jolheiser.com/git-age.git";
      inputs = {
        nixpkgs.follows = "nixpkgs";
        flake-utils.follows = "flake-utils";
      };
    };
    cfg-playground = {
      url = "git+https://git.jolheiser.com/cfg-playground.git";
      inputs.nixpkgs.follows = "nixpkgs";
    };
    ugit = {
      url = "git+https://git.jolheiser.com/ugit.git";
      inputs.nixpkgs.follows = "nixpkgs";
    };
    git-pr = {
      url = "git+https://git.jolheiser.com/git-pr-nix.git";
      inputs.nixpkgs.follows = "nixpkgs";
    };
    # Other flakes
    golink = {
      url = "github:tailscale/golink";
      inputs = {
        nixpkgs.follows = "nixpkgs";
        flake-utils.follows = "flake-utils";
      };
    };
    tclip = {
      url = "github:tailscale-dev/tclip";
      inputs = {
        utils.follows = "flake-utils";
      };
    };
    foundry.url = "github:reckenrode/nix-foundryvtt";
    tailproxy = {
      url = "git+https://git.jolheiser.com/tailproxy.git";
      inputs.nixpkgs.follows = "nixpkgs";
    };
  };

  outputs =
    {
      nixpkgs,
      home-manager,
      nixos-hardware,
      agenix,
      ...
    }@inputs:
    let
      overlays = [
        (_: prev: {
          jolheiser = {
            website = inputs.website.packages.${prev.system}.default;
            resume = inputs.resume.packages.${prev.system}.default;
            git-age = inputs.git-age.packages.${prev.system}.default;
            blog = inputs.blog.packages.${prev.system}.default;
            bennet = inputs.bennet.packages.${prev.system}.default;
          };
          tclip = inputs.tclip.packages.${prev.system}.tclip;
          templ = inputs.templ.packages.${prev.system}.templ;
        })
        inputs.golink.overlay
      ];
      system = "x86_64-linux";
      pkgs = import inputs.nixpkgs { inherit system; };
    in
    {
      colmena = {
        meta = {
          nixpkgs = import nixpkgs { inherit overlays system; };
          specialArgs = {
            inherit inputs;
          };
        };
        dragonwell =
          { pkgs, ... }:
          {
            imports = [
              inputs.agenix.nixosModules.default
              inputs.golink.nixosModules.default
              inputs.ugit.nixosModules.default
              inputs.git-pr.nixosModules.default
              inputs.tailproxy.nixosModules.default
              inputs.foundry.nixosModules.foundryvtt
              inputs.cfg-playground.nixosModules.default
              ./modules/tclip
              ./modules/miniserve
              ./dragonwell
            ];
            services.tclip.package = inputs.tclip.packages.${pkgs.system}.tclipd;
          };
      };
      nixConfig = {
        extra-substitutors = [ "https://jolheiser.cachix.org" ];
        extra-trusted-public-keys = [
          "jolheiser.cachix.org-1:fiKkfTuHFqDK5ZOVxcqb4InUkKsrTvtMLISid7XvuVg="
        ];
      };
      devShells.${system}.default = pkgs.mkShell {
        nativeBuildInputs = [
          agenix.packages.${system}.agenix
          pkgs.colmena
        ];
      };
    };
}