This repository has no description
4.2 kB
129 lines
1{
2 description = "lassulus superconfig";
3
4 inputs = {
5 nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
6 # nixpkgs.url = "path:/home/lass/tmp/nixpkgs-disk-debug";
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 = "github:krebs/stockholm";
22 # stockholm.url = "git+https://cgit.lassul.us/stockholm";
23 # stockholm.url = "path:/home/lass/sync/stockholm";
24 stockholm.inputs.nixpkgs.follows = "nixpkgs";
25
26 disko.url = "github:nix-community/disko";
27 # disko.url = "path:/home/lass/src/disko/";
28 disko.inputs.nixpkgs.follows = "nixpkgs";
29
30 nixos-hardware.url = "github:nixos/nixos-hardware";
31
32 data-mesher.url = "https://git.clan.lol/clan/data-mesher/archive/main.tar.gz";
33 # data-mesher.url = "path:/home/lass/src/data-mesher/";
34 data-mesher.inputs.nixpkgs.follows = "nixpkgs";
35
36 nether.url = "github:krebs/nether";
37 # nether.url = "git+file:/home/lass/src/nether";
38 nether.inputs.nixpkgs.follows = "nixpkgs";
39 nether.inputs.clan-core.follows = "clan-core";
40 nether.inputs.data-mesher.follows = "data-mesher";
41
42 spora.url = "github:krebs/spora";
43 # spora.url = "git+file:/home/lass/src/spora";
44 spora.inputs.nixpkgs.follows = "nixpkgs";
45
46 nix-darwin.url = "github:LnL7/nix-darwin";
47 nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
48
49 nixos-facter.url = "github:numtide/nixos-facter-modules";
50
51 treefmt-nix.url = "github:numtide/treefmt-nix";
52 treefmt-nix.inputs.nixpkgs.follows = "nixpkgs";
53 };
54
55 outputs =
56 inputs@{
57 self,
58 flake-parts,
59 nixpkgs,
60 clan-core,
61 ...
62 }:
63 let
64 clan = clan-core.lib.buildClan {
65 directory = self;
66 specialArgs.self = self;
67 machines = nixpkgs.lib.mapAttrs (machineName: _: {
68
69 imports = [
70 ./machines/${machineName}/physical.nix
71 (
72 { config, ... }:
73 {
74 clan.core.machineName = machineName;
75 clan.core.facts.secretStore = "password-store";
76 clan.core.facts.secretUploadDirectory = nixpkgs.lib.mkDefault "/etc/secrets";
77 clan.networking.targetHost = "root@${machineName}";
78 krebs.secret.directory = config.clanCore.facts.secretUploadDirectory;
79 nixpkgs.overlays = [
80 self.inputs.stockholm.overlays.default
81 (import (self.inputs.stockholm.inputs.nix-writers + "/pkgs")) # TODO get rid of that overlay
82 ];
83 }
84 )
85 ./2configs
86 ./3modules
87 self.inputs.stockholm.nixosModules.krebs
88 ];
89 }) (builtins.readDir ./machines);
90 };
91 in
92 flake-parts.lib.mkFlake { inherit inputs; } {
93 systems = [
94 "x86_64-linux"
95 "aarch64-linux"
96 "aarch64-darwin"
97 "x86_64-darwin"
98 ];
99 imports = [
100 ./tools/nvim.nix
101 ./tools/astronvim/flake-module.nix
102 ./tools/zsh.nix
103 ./tools/get-spora-hosts.nix
104 ./formatter.nix
105 ];
106 flake.nixosConfigurations = clan.nixosConfigurations;
107 flake.clanInternals = clan.clanInternals;
108 perSystem =
109 {
110 lib,
111 pkgs,
112 system,
113 ...
114 }:
115 {
116 packages = lib.mapAttrs (name: _v_: pkgs.callPackage ./5pkgs/${name} { }) (
117 builtins.readDir ./5pkgs
118 );
119 devShells.default = pkgs.mkShell {
120 packages = [
121 clan-core.packages.${system}.clan-cli
122 ];
123 };
124 };
125 flake.darwinConfigurations.barnacle = inputs.nix-darwin.lib.darwinSystem {
126 modules = [ ./darwin/barnacle/config.nix ];
127 };
128 };
129}