diff options
Diffstat (limited to 'flake.nix')
| -rw-r--r-- | flake.nix | 140 |
1 files changed, 2 insertions, 138 deletions
@@ -40,10 +40,6 @@ inputs.nixpkgs.follows = "nixpkgsUnstable"; inputs.pre-commit-hooks.follows = "pre-commit-hooks"; }; - haumea = { - url = "github:nix-community/haumea"; - inputs.nixpkgs.follows = "nixpkgs"; - }; hercules-ci-agent = { url = "github:hercules-ci/hercules-ci-agent"; inputs.nixpkgs.follows = "nixpkgsUnstable"; @@ -97,138 +93,6 @@ }; }; - outputs = inputs @ { - self, - flake-parts, - getchoo, - haumea, - hercules-ci-effects, - nixpkgs, - nixinate, - openwrt-imagebuilder, - pre-commit-hooks, - ragenix, - ... - }: let - inherit (getchooLib.configs) mapHMUsers mapHosts; - - getchooLib = with inputs; let - args = { - users = with haumea.lib; - load { - src = ./users; - loader = loaders.path; - }; - }; - in - getchoo.lib (inputs // args); - in - flake-parts.lib.mkFlake {inherit inputs;} { - imports = [ - hercules-ci-effects.flakeModule - ]; - - flake = { - nixosConfigurations = mapHosts ./hosts; - - nixosModules.getchoo = import ./modules; - }; - - hercules-ci = { - flake-update = { - enable = true; - when = { - hour = [0]; - minute = 0; - }; - }; - }; - - herculesCI = let - inherit (import (hercules-ci-effects + "/vendor/hercules-ci-agent/default-herculesCI-for-flake.nix")) flakeToOutputs; - in rec { - ciSystems = [ - "x86_64-linux" - "aarch64-linux" - ]; - - onPush = { - default = { - outputs = with builtins; - with nixpkgs.lib; let - # use defaults, but only evaluate hosts - defaults = - removeAttrs - (flakeToOutputs self { - ciSystems = genAttrs ciSystems (_: {}); - }) - ["nixosConfigurations" "packages"]; - - evaluate = mapAttrs (_: v: - seq - v.config.system.build.toplevel - v._module.args.pkgs.emptyFile) - self.nixosConfigurations; - in - mkForce (defaults // evaluate); - }; - }; - }; - - systems = [ - "x86_64-linux" - "aarch64-linux" - "x86_64-darwin" - "aarch64-darwin" - ]; - - perSystem = { - pkgs, - system, - ... - }: { - apps = (nixinate.nixinate.${system} self).nixinate; - checks = { - pre-commit-check = inputs.pre-commit-hooks.lib.${system}.run { - src = ./.; - hooks = { - actionlint.enable = true; - alejandra.enable = true; - deadnix.enable = true; - statix.enable = true; - stylua.enable = true; - }; - }; - }; - - devShells = let - inherit (pkgs) mkShell; - in { - default = mkShell { - inherit (self.checks.${system}.pre-commit-check) shellHook; - packages = with inputs; - with pkgs; [ - actionlint - ragenix.packages.${system}.ragenix - alejandra - deadnix - fzf - git-crypt - just - statix - stylua - ]; - }; - }; - - formatter = pkgs.alejandra; - - legacyPackages.homeConfigurations = mapHMUsers system ./users; - - packages = with inputs; - with pkgs; { - turret = callPackage ./hosts/_turret {inherit openwrt-imagebuilder;}; - }; - }; - }; + outputs = inputs @ {flake-parts, ...}: + flake-parts.lib.mkFlake {inherit inputs;} {imports = [./flake];}; } |
