summaryrefslogtreecommitdiff
path: root/flake.nix
blob: af1560b56ca39efc68129a1deed889e30e08717b (plain)
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
{
  description = "testing nix flakes for server deployment";

  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/release-21.11";
    nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
    uplcg = {
      url = "git+https://stuebinm.eu/git/uplcg?ref=main";
      flake = false;
    };
    # woitb = {
    #   url = "git+https://stuebinm.eu/git/woitb?ref=main";
    #   flake = false;
    # };
    # workadventure = {
    #   url = "git+https://stuebinm.eu/git/workadventure-nix";
    #   flake = false;
    # };
    tracktrain = {
      url = "git+https://stuebinm.eu/git/tracktrain?ref=main";
      flake = false;
    };
    blog = {
      url = "path:/home/stuebinm/Dokumente/blog";
      flake = false;
    };
  };

  outputs = { self, nixpkgs, ... }@inputs: {

    nixosConfigurations =
      let mkConfig = imports: config: nixpkgs.lib.nixosSystem {
            system = "x86_64-linux";
            modules = [ config ] ++ imports;

            specialArgs = { inherit inputs; };
          };
          mkServer = mkConfig [ ./common/headless.nix ];
          mkDesktop = mkConfig [ ./common/desktop.nix ];
      in {
        chaski = mkServer ./hosts/chaski/configuration.nix;
        flora = mkServer ./hosts/flora/configuration.nix;
        abbenay = mkDesktop ./hosts/abbenay/configuration.nix;
      };
  };
}