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