aboutsummaryrefslogtreecommitdiff
path: root/flake.nix
blob: 730ef12682d2d4200e18acf3fdbde0b7870a3cf8 (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
{
  description = "Cynerd's personal flake";

  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable-small";
    personal-secret.url = "git+ssh://git@cynerd.cz/nixos-personal-secret";

    nixturris = {
      url = "github:cynerd/nixturris";
      inputs.nixpkgs.follows = "nixpkgs";
    };
    nixbigclown.url = "github:cynerd/nixbigclown";
    vpsadminos.url = "github:vpsfreecz/vpsadminos";

    shellrc.url = "git+https://git.cynerd.cz/shellrc";
    sterm.url = "github:wentasah/sterm";
    usbkey.url = "git+https://git.cynerd.cz/usbkey?ref=modules";
  };

  outputs = {
    self,
    nixpkgs,
    nix,
    nixos-hardware,
    flake-utils,
    shellrc,
    ...
  }:
    with flake-utils.lib;
      {
        lib = import ./lib nixpkgs.lib;
        overlays.default = final: prev:
          import ./pkgs {
            inherit self;
            nixpkgs = prev;
          };
        nixosModules = import ./nixos self;
        nixosConfigurations = import ./nixos/configurations.nix self;
      }
      // eachDefaultSystem (system: let
        pkgs = nixpkgs.legacyPackages."${system}";
      in {
        packages = filterPackages system (flattenTree (
          import ./pkgs {
            inherit self;
            nixpkgs = pkgs;
          }
        ));
        legacyPackages = pkgs.extend self.overlays.default;
        devShells =
          filterPackages system
          (import ./devShells {
            inherit nixpkgs;
            inherit shellrc;
            inherit system;
          });
        formatter = pkgs.alejandra;
      });
}