refactor: use flake-parts, keep snowfall-lib for compatibility
This commit is contained in:
parent
398bf95da7
commit
2d62c17f13
1 changed files with 34 additions and 5 deletions
31
flake.nix
31
flake.nix
|
@ -2,11 +2,40 @@
|
||||||
# TODO: use flake-parts and remove snowfall-lib
|
# TODO: use flake-parts and remove snowfall-lib
|
||||||
outputs =
|
outputs =
|
||||||
inputs:
|
inputs:
|
||||||
inputs.snowfall-lib.mkFlake {
|
inputs.flake-parts.lib.mkFlake { inherit inputs; } (
|
||||||
|
top@{
|
||||||
|
config,
|
||||||
|
withSystem,
|
||||||
|
moduleWithSystem,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
# Optional: use external flake logic, e.g.
|
||||||
|
# inputs.foo.flakeModules.default
|
||||||
|
];
|
||||||
|
flake = inputs.snowfall-lib.mkFlake {
|
||||||
inherit inputs;
|
inherit inputs;
|
||||||
src = ./.;
|
src = ./.;
|
||||||
snowfall.namespace = "pantheon";
|
snowfall.namespace = "pantheon";
|
||||||
};
|
};
|
||||||
|
systems = [
|
||||||
|
# systems for which you want to build the `perSystem` attributes
|
||||||
|
"x86_64-linux"
|
||||||
|
# ...
|
||||||
|
];
|
||||||
|
perSystem =
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
{
|
||||||
|
# Recommended: move all package definitions here.
|
||||||
|
# e.g. (assuming you have a nixpkgs input)
|
||||||
|
# packages.foo = pkgs.callPackage ./foo/package.nix { };
|
||||||
|
# packages.bar = pkgs.callPackage ./bar/package.nix {
|
||||||
|
# foo = config.packages.foo;
|
||||||
|
# };
|
||||||
|
};
|
||||||
|
}
|
||||||
|
);
|
||||||
inputs = {
|
inputs = {
|
||||||
# We use nixos-unstable as everything is cached.
|
# We use nixos-unstable as everything is cached.
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue