-
-
Notifications
You must be signed in to change notification settings - Fork 296
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
flake: add public nixvimConfigurations flake-module
Can be used by end-users to define `perSystem.nixvimConfigurations` using flake-parts.
- Loading branch information
1 parent
6487caa
commit 46cca53
Showing
5 changed files
with
50 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,15 @@ | ||
{ helpers, ... }: | ||
{ | ||
perSystem = | ||
{ | ||
config, | ||
makeNixvimWithModule, | ||
system, | ||
... | ||
}: | ||
{ | ||
legacyPackages = rec { | ||
inherit makeNixvimWithModule; | ||
makeNixvim = module: makeNixvimWithModule { inherit module; }; | ||
|
||
nixvimConfiguration = helpers.modules.evalNixvim { | ||
inherit system; | ||
}; | ||
nixvimConfiguration = config.nixvimConfigurations.default; | ||
}; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ helpers, ... }: | ||
{ | ||
flake.flakeModules = { | ||
nixvimConfigurations = ./public/nixvimConfigurations.nix; | ||
}; | ||
|
||
perSystem = | ||
{ system, ... }: | ||
{ | ||
nixvimConfigurations.default = helpers.modules.evalNixvim { | ||
inherit system; | ||
}; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
imports = [ | ||
./nixvimConfigurations.nix | ||
]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ lib, flake-parts-lib, ... }: | ||
let | ||
inherit (lib) types; | ||
configurationType = lib.mkOptionType { | ||
name = "configuration"; | ||
description = "configuration"; | ||
descriptionClass = "noun"; | ||
merge = lib.options.mergeOneOption; | ||
check = x: x._type or null == "configuration"; | ||
}; | ||
in | ||
flake-parts-lib.mkTransposedPerSystemModule { | ||
name = "nixvimConfigurations"; | ||
option = lib.mkOption { | ||
type = types.lazyAttrsOf configurationType; | ||
default = { }; | ||
description = '' | ||
An attribute set of Nixvim configurations. | ||
''; | ||
}; | ||
file = ./nixvimConfigurations.nix; | ||
} |