mirror of
https://github.com/Gerg-L/nixos.git
synced 2025-12-10 00:43:56 -05:00
nixfmt slightly insane formatting
This commit is contained in:
parent
4196aac49c
commit
90c4599b1b
1 changed files with 13 additions and 32 deletions
|
|
@ -10,28 +10,24 @@ in
|
||||||
# Only good use case for rec
|
# Only good use case for rec
|
||||||
rec {
|
rec {
|
||||||
|
|
||||||
constructInputs' =
|
needsSystem =
|
||||||
system: inputs:
|
output:
|
||||||
lib.pipe inputs [
|
builtins.elem output [
|
||||||
(lib.filterAttrs (_: lib.isType "flake"))
|
|
||||||
(lib.mapAttrs (
|
|
||||||
_:
|
|
||||||
lib.mapAttrs (
|
|
||||||
name: value:
|
|
||||||
if
|
|
||||||
builtins.elem name [
|
|
||||||
"defaultPackage"
|
"defaultPackage"
|
||||||
"devShell"
|
"devShell"
|
||||||
"devShells"
|
"devShells"
|
||||||
"formatter"
|
"formatter"
|
||||||
"legacyPackages"
|
"legacyPackages"
|
||||||
"packages"
|
"packages"
|
||||||
]
|
];
|
||||||
then
|
|
||||||
value.${system}
|
constructInputs' =
|
||||||
else
|
system: inputs:
|
||||||
value
|
lib.pipe inputs [
|
||||||
)
|
(lib.filterAttrs (_: lib.isType "flake"))
|
||||||
|
(lib.mapAttrs (
|
||||||
|
_:
|
||||||
|
lib.mapAttrs (name: value: if needsSystem name then value.${system} else value)
|
||||||
))
|
))
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
@ -71,22 +67,7 @@ rec {
|
||||||
import unstable { inherit system config; };
|
import unstable { inherit system config; };
|
||||||
in
|
in
|
||||||
lib.mapAttrs
|
lib.mapAttrs
|
||||||
(
|
(name: value: if needsSystem name then { ${system} = value pkgs; } else value)
|
||||||
name: value:
|
|
||||||
if
|
|
||||||
builtins.elem name [
|
|
||||||
"defaultPackage"
|
|
||||||
"devShell"
|
|
||||||
"devShells"
|
|
||||||
"formatter"
|
|
||||||
"legacyPackages"
|
|
||||||
"packages"
|
|
||||||
]
|
|
||||||
then
|
|
||||||
{ ${system} = value pkgs; }
|
|
||||||
else
|
|
||||||
value
|
|
||||||
)
|
|
||||||
outputs
|
outputs
|
||||||
)
|
)
|
||||||
[ "x86_64-linux" ]
|
[ "x86_64-linux" ]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue