This repository has no description
3.0 kB
84 lines
1{
2 description = "lassulus superconfig";
3
4 inputs = {
5 # nixpkgs.url = "github:lassulus/nixpkgs/jitsi-upgrade";
6 nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
7 # nixpkgs.url = "git+file:/home/lass/src/nixpkgs";
8
9 # nixvim.url = "github:nix-community/nixvim";
10 # nixvim.inputs.nixpkgs.follows = "nixpkgs";
11
12 astro-nvim.url = "github:AstroNvim/AstroNvim";
13 astro-nvim.flake = false;
14
15 clan-core.url = "git+https://git.clan.lol/clan/clan-core";
16 # clan-core.url = "git+file:/home/lass/src/clan/clan-core";
17 clan-core.inputs.nixpkgs.follows = "nixpkgs";
18 clan-core.inputs.flake-parts.follows = "flake-parts";
19 clan-core.inputs.disko.follows = "disko";
20
21 # stockholm.url = "git+https://cgit.lassul.us/stockholm";
22 # stockholm.url = "path:/home/lass/sync/stockholm";
23 stockholm.url = "github:krebs/stockholm";
24 stockholm.inputs.nixpkgs.follows = "nixpkgs";
25
26 disko.url = "github:nix-community/disko";
27 # disko.url = "git+file:/home/lass/src/disko/";
28 disko.inputs.nixpkgs.follows = "nixpkgs";
29
30 nixos-hardware.url = "github:nixos/nixos-hardware";
31
32 nether.url = "github:lassulus/nether";
33 nether.inputs.nixpkgs.follows = "nixpkgs";
34 nether.inputs.clan-core.follows = "clan-core";
35 };
36
37 outputs = inputs@{ self, flake-parts, nixpkgs, clan-core, ... }:
38 let
39 clan = clan-core.lib.buildClan {
40 clanName = "superconfig";
41 directory = self;
42 specialArgs.self = self;
43 machines = nixpkgs.lib.mapAttrs (machineName: _: {
44
45 imports = [
46 ./machines/${machineName}/physical.nix
47 ({ config, pkgs, ... }: {
48 clanCore.machineName = machineName;
49 clanCore.secretStore = "password-store";
50 clanCore.secretsUploadDirectory = "/etc/secrets";
51 clanCore.secretsDirectory = pkgs.lib.mkForce config.clanCore.secretsUploadDirectory;
52 krebs.secret.directory = config.clanCore.secretsUploadDirectory;
53 nixpkgs.overlays = [
54 self.inputs.stockholm.overlays.default
55 (import (self.inputs.stockholm.inputs.nix-writers + "/pkgs")) # TODO get rid of that overlay
56 ];
57 })
58 ./2configs
59 ./3modules
60 self.inputs.stockholm.nixosModules.krebs
61 ];
62 }) (builtins.readDir ./machines);
63 };
64 in
65 flake-parts.lib.mkFlake { inherit inputs; } {
66 systems = [ "x86_64-linux" "aarch64-linux" "aarch64-darwin" "x86_64-darwin" ];
67 imports = [
68 ./tools/nvim.nix
69 ./tools/astronvim/flake-module.nix
70
71 ./tools/zsh.nix
72 ];
73 flake.nixosConfigurations = clan.nixosConfigurations;
74 flake.clanInternals = clan.clanInternals;
75 perSystem = { config, lib, pkgs, system, ... }: {
76 packages = lib.mapAttrs (name: v_: pkgs.callPackage ./5pkgs/${name} {}) (builtins.readDir ./5pkgs);
77 devShells.default = pkgs.mkShell {
78 packages = [
79 clan-core.packages.${system}.clan-cli
80 ];
81 };
82 };
83 };
84}