summaryrefslogtreecommitdiff
path: root/flake.nix
blob: fddbce2c38961199e312e930088d85e5c2e0318e (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
65
66
67
68
69
{
  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";
    nix-doom-emacs-unstraightened.url = "github:marienz/nix-doom-emacs-unstraightened";
    nix-doom-emacs-unstraightened.inputs.nixpkgs.follows = "";
    home-manager = {
      url = "github:nix-community/home-manager";
      inputs.nixpkgs.follows = "nixpkgs";
    };
    mango = {
      url = "github:mangowm/mango";
      inputs.nixpkgs.follows = "nixpkgs";
    };
    sops-nix = {
      url = "github:Mic92/sops-nix";
      inputs.nixpkgs.follows = "nixpkgs";
    };
    zen-browser = {
      url = "github:youwen5/zen-browser-flake";
      inputs.nixpkgs.follows = "nixpkgs";
    };
    mydwm = {
      url = "git+https://codeberg.org/brustybee/mydwm";
      # url = "git+file:/home/bee/mydwm";
      inputs.nixpkgs.follows = "nixpkgs";
    };
    dms = {
      url = "github:AvengeMedia/DankMaterialShell";
      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 = "bee";
            hostname = "nixios";
            system = "x86_64-linux";
            systemState = "25.11";
          })
        ];
    };
}