Skip to content
Snippets Groups Projects
Commit b6c582fd authored by Daniel Firth's avatar Daniel Firth
Browse files

Clean up flake and add modifiers file

parent 4afe14d6
1 merge request!191Cleanup
Pipeline #6738 passed with stages
in 3 minutes and 2 seconds
......@@ -14,15 +14,8 @@
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
};
outputs =
inputs@
{ self
, flake-parts
, horizon-advance
, nixpkgs
, ...
}:
flake-parts.lib.mkFlake { inherit inputs; } {
outputs = inputs:
inputs.flake-parts.lib.mkFlake { inherit inputs; } {
systems = [
"aarch64-darwin"
"aarch64-linux"
......@@ -32,22 +25,18 @@
imports = [
inputs.horizon-hoogle.flakeModule
];
perSystem = { config, system, ... }:
let
pkgs = nixpkgs.legacyPackages.${system};
in
perSystem = { pkgs, config, system, ... }:
with pkgs.lib;
let
haskellLib = pkgs.haskell.lib;
modifiers = import ./modifiers.nix { inherit pkgs; };
overrides = composeManyExtensions [
(import ./overlay.nix { inherit pkgs; f = _: prev: name: v: if hasAttr name prev then warn "${name} exists in parent set" v else v;})
(import ./overlay.nix { inherit pkgs; f = modifiers; })
(import ./configuration/common.nix { inherit pkgs haskellLib; })
(import (./configuration + "/${system}.nix") { inherit pkgs haskellLib; })
];
legacyPackages = horizon-advance.legacyPackages.${system}.extend overrides;
legacyPackages = inputs.horizon-advance.legacyPackages.${system}.extend overrides;
packages = filterAttrs (_: isDerivation) legacyPackages;
......
{ pkgs, ... }:
with pkgs.lib;
_: prev: name: v: if hasAttr name prev then warn "${name} exists in parent set" v else v
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment