This repository has no description
2.9 kB
80 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
33 outputs = inputs@{ self, flake-parts, nixpkgs, clan-core, ... }:
34 let
35 clan = clan-core.lib.buildClan {
36 clanName = "superconfig";
37 directory = self;
38 specialArgs.self = self;
39 machines = nixpkgs.lib.mapAttrs (machineName: _: {
40
41 imports = [
42 ./machines/${machineName}/physical.nix
43 ({ config, pkgs, ... }: {
44 clanCore.machineName = machineName;
45 clanCore.secretStore = "password-store";
46 clanCore.secretsUploadDirectory = "/etc/secrets";
47 clanCore.secretsDirectory = pkgs.lib.mkForce config.clanCore.secretsUploadDirectory;
48 krebs.secret.directory = config.clanCore.secretsUploadDirectory;
49 nixpkgs.config.packageOverrides = import ./5pkgs pkgs; # TODO move into packages
50 nixpkgs.overlays = [
51 self.inputs.stockholm.overlays.default
52 (import (self.inputs.stockholm.inputs.nix-writers + "/pkgs")) # TODO get rid of that overlay
53 ];
54 })
55 ./2configs
56 ./3modules
57 self.inputs.stockholm.nixosModules.krebs
58 ];
59 }) (builtins.readDir ./machines);
60 };
61 in
62 flake-parts.lib.mkFlake { inherit inputs; } {
63 systems = [ "x86_64-linux" "aarch64-linux" "aarch64-darwin" "x86_64-darwin" ];
64 imports = [
65 ./tools/nvim.nix
66 ./tools/astronvim/flake-module.nix
67
68 ./tools/zsh.nix
69 ];
70 flake.nixosConfigurations = clan.nixosConfigurations;
71 flake.clanInternals = clan.clanInternals;
72 perSystem = { config, pkgs, system, ... }: {
73 devShells.default = pkgs.mkShell {
74 packages = [
75 clan-core.packages.${system}.clan-cli
76 ];
77 };
78 };
79 };
80}