summaryrefslogtreecommitdiff
path: root/flake.nix
blob: fbf9bf9649901c064497f7b4c323b0154d14f15f (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
{
  nixConfig = {
    extra-substituters = [ "https://nix-community.cachix.org" ];
    extra-trusted-public-keys = [
      "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
    ];
  };

  inputs = {
    flake-parts.url = "github:hercules-ci/flake-parts";
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
    home-manager = {
      url = "github:nix-community/home-manager";
      inputs.nixpkgs.follows = "nixpkgs";
    };
    sops-nix = {
      url = "github:Mic92/sops-nix";
      inputs.nixpkgs.follows = "nixpkgs";
    };
    beevim = {
      url = "git+https://codeberg.org/beeb5k/beeVim";
      # url = "git+file:/home/beeb5k/.config/beeVim";
      inputs.nixpkgs.follows = "nixpkgs";
    };
    zen-browser = {
      url = "github:youwen5/zen-browser-flake";
      inputs.nixpkgs.follows = "nixpkgs";
    };
  };

  outputs =
    inputs@{ flake-parts, ... }:
    flake-parts.lib.mkFlake { inherit inputs; } {
      systems = inputs.nixpkgs.lib.platforms.all;
      imports = [
        (inputs.nixpkgs.lib.modules.importApply ./common inputs)
      ];

      flake =
        let
          inherit (inputs) nixpkgs home-manager;

          builders = import ./lib/mkFlakeOutputs.nix { inherit nixpkgs home-manager inputs; };
          inherit (builders) mkSystemWithHM mkSystemWithHMasModule mkSystem;

          merge = builtins.foldl' nixpkgs.lib.recursiveUpdate { };
        in
        merge [
          (mkSystemWithHM {
            user = "beeb5k";
            hostname = "niuwux";
            system = "x86_64-linux";
            systemState = "26.05";
          })
        ];
    };
}