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