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
|
||||
rec {
|
||||
|
||||
needsSystem =
|
||||
output:
|
||||
builtins.elem output [
|
||||
"defaultPackage"
|
||||
"devShell"
|
||||
"devShells"
|
||||
"formatter"
|
||||
"legacyPackages"
|
||||
"packages"
|
||||
];
|
||||
|
||||
constructInputs' =
|
||||
system: inputs:
|
||||
lib.pipe inputs [
|
||||
(lib.filterAttrs (_: lib.isType "flake"))
|
||||
(lib.mapAttrs (
|
||||
_:
|
||||
lib.mapAttrs (
|
||||
name: value:
|
||||
if
|
||||
builtins.elem name [
|
||||
"defaultPackage"
|
||||
"devShell"
|
||||
"devShells"
|
||||
"formatter"
|
||||
"legacyPackages"
|
||||
"packages"
|
||||
]
|
||||
then
|
||||
value.${system}
|
||||
else
|
||||
value
|
||||
)
|
||||
lib.mapAttrs (name: value: if needsSystem name then value.${system} else value)
|
||||
))
|
||||
];
|
||||
|
||||
|
|
@ -71,22 +67,7 @@ rec {
|
|||
import unstable { inherit system config; };
|
||||
in
|
||||
lib.mapAttrs
|
||||
(
|
||||
name: value:
|
||||
if
|
||||
builtins.elem name [
|
||||
"defaultPackage"
|
||||
"devShell"
|
||||
"devShells"
|
||||
"formatter"
|
||||
"legacyPackages"
|
||||
"packages"
|
||||
]
|
||||
then
|
||||
{ ${system} = value pkgs; }
|
||||
else
|
||||
value
|
||||
)
|
||||
(name: value: if needsSystem name then { ${system} = value pkgs; } else value)
|
||||
outputs
|
||||
)
|
||||
[ "x86_64-linux" ]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue