This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

superconfig / flake.nix
5.2 kB 153 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 stockholm.inputs.buildbot-nix.follows = ""; 26 27 disko.url = "github:nix-community/disko"; 28 # disko.url = "path:/home/lass/src/disko/"; 29 disko.inputs.nixpkgs.follows = "nixpkgs"; 30 31 nixos-hardware.url = "github:nixos/nixos-hardware"; 32 33 data-mesher.url = "https://git.clan.lol/clan/data-mesher/archive/main.tar.gz"; 34 # data-mesher.url = "path:/home/lass/src/data-mesher/"; 35 data-mesher.inputs.nixpkgs.follows = "nixpkgs"; 36 37 nether.url = "github:krebs/nether"; 38 # nether.url = "git+file:/home/lass/src/nether"; 39 nether.inputs.nixpkgs.follows = "nixpkgs"; 40 nether.inputs.clan-core.follows = "clan-core"; 41 nether.inputs.data-mesher.follows = "data-mesher"; 42 43 spora.url = "github:krebs/spora"; 44 # spora.url = "git+file:/home/lass/src/spora"; 45 spora.inputs.nixpkgs.follows = "nixpkgs"; 46 47 nix-darwin.url = "github:LnL7/nix-darwin"; 48 nix-darwin.inputs.nixpkgs.follows = "nixpkgs"; 49 50 nixos-facter.url = "github:numtide/nixos-facter-modules"; 51 52 treefmt-nix.url = "github:numtide/treefmt-nix"; 53 treefmt-nix.inputs.nixpkgs.follows = "nixpkgs"; 54 55 le_menu.url = "github:lassulus/le_menu"; 56 # le_menu.url = "git+file:/home/lass/src/le_menu"; 57 le_menu.inputs.nixpkgs.follows = "nixpkgs"; 58 }; 59 60 outputs = 61 inputs@{ 62 self, 63 flake-parts, 64 nixpkgs, 65 clan-core, 66 ... 67 }: 68 let 69 clan = clan-core.lib.buildClan { 70 directory = self; 71 specialArgs.self = self; 72 machines = nixpkgs.lib.mapAttrs (machineName: _: { 73 74 imports = [ 75 ./machines/${machineName}/physical.nix 76 ( 77 { config, ... }: 78 { 79 clan.core.machineName = machineName; 80 clan.core.facts.secretStore = "password-store"; 81 clan.core.facts.secretUploadDirectory = nixpkgs.lib.mkDefault "/etc/secrets"; 82 clan.networking.targetHost = "root@${machineName}"; 83 krebs.secret.directory = config.clanCore.facts.secretUploadDirectory; 84 nixpkgs.overlays = [ 85 self.inputs.stockholm.overlays.default 86 (import (self.inputs.stockholm.inputs.nix-writers + "/pkgs")) # TODO get rid of that overlay 87 ]; 88 } 89 ) 90 ./2configs 91 ./3modules 92 self.inputs.stockholm.nixosModules.krebs 93 ]; 94 }) (builtins.readDir ./machines); 95 }; 96 in 97 flake-parts.lib.mkFlake { inherit inputs; } { 98 systems = [ 99 "x86_64-linux" 100 "aarch64-linux" 101 "aarch64-darwin" 102 "x86_64-darwin" 103 ]; 104 imports = [ 105 ./tools/nvim.nix 106 ./tools/astronvim/flake-module.nix 107 ./tools/zsh.nix 108 ./tools/get-spora-hosts.nix 109 ./formatter.nix 110 ]; 111 flake.nixosConfigurations = clan.nixosConfigurations; 112 flake.clanInternals = clan.clanInternals; 113 perSystem = 114 { 115 lib, 116 pkgs, 117 system, 118 config, 119 ... 120 }: 121 { 122 packages = 123 (lib.mapAttrs (name: _v_: pkgs.callPackage ./5pkgs/${name} { }) (builtins.readDir ./5pkgs)) 124 // { 125 default = inputs.le_menu.lib.buildMenu { 126 inherit pkgs; 127 menuConfig = { 128 vim.run = "nix run ${self}#nvim"; 129 shell.run = "nix run ${self}#shell"; 130 machines.submenu = lib.mapAttrs (name: _machine: { 131 submenu.ssh.submenu = { 132 retiolum.run = "ssh -t ${name}.r"; 133 spora.run = "ssh ${name}.s"; 134 nether.run = "ssh ${name}.n"; 135 tor.run = "torify ssh $(pass show machines/${name}/tor-hostname)"; 136 }; 137 }) self.nixosConfigurations; 138 debug.run = "env"; 139 }; 140 }; 141 }; 142 devShells.default = pkgs.mkShell { 143 packages = [ 144 clan-core.packages.${system}.clan-cli 145 config.treefmt.build.wrapper 146 ]; 147 }; 148 }; 149 flake.darwinConfigurations.barnacle = inputs.nix-darwin.lib.darwinSystem { 150 modules = [ ./darwin/barnacle/config.nix ]; 151 }; 152 }; 153}