summaryrefslogtreecommitdiff
path: root/flake.nix
blob: b6b457946c96ebf7e6ed349109f96757934c2b5a (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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
{
  description = "testing nix flakes for server deployment";

  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/backport-154729-to-release-21.11";
    nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
    uplcg = {
      url = "git+https://stuebinm.eu/git/uplcg?ref=main";
      flake = false;
    };
    tracktrain = {
      url = "git+https://stuebinm.eu/git/tracktrain?ref=main";
      flake = false;
    };
    blog = {
      url = "path:/home/stuebinm/Dokumente/blog";
      flake = false;
    };
    home-manager = {
      url = "github:nix-community/home-manager/release-21.11";
      inputs.nixpkgs.follows = "nixpkgs";
    };
    playground.url = "git+https://stuebinm.eu/git/playground";
    playground.flake = false;
    naersk.url = "github:nix-community/naersk";
    sfz.url = "github:weihanglo/sfz";
    sfz.flake = false;
    feeds.url = "path:/home/stuebinm/newsboat-feeds-private.nix";
    feeds.flake = false;
  };

  outputs = { self, nixpkgs, ... }@inputs:
    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 {

      nixosConfigurations = {
        chaski = mkServer ./chaski/configuration.nix;
        flora = mkServer ./flora/configuration.nix;
        abbenay = mkDesktop ./abbenay/configuration.nix;
        cyberbox = mkDesktop ./cyberbox/configuration.nix;
      };

      homeConfigurations.stuebinm =
        inputs.home-manager.lib.homeManagerConfiguration rec {
          system = "x86_64-linux";
          homeDirectory = "/home/stuebinm";
          username = "stuebinm";
          configuration.imports = [ ./home/home.nix ];
          stateVersion = "21.03";
          extraSpecialArgs = { inherit inputs system; };
        };

      home = self.homeConfigurations.stuebinm.activationPackage;
    };
}