treewide: format using nixfmt
Signed-off-by: Bloxx12 <charlie@charlieroot.dev> Change-Id: I6a6a69641c36f9763e104087a559c148d0449f00
This commit is contained in:
parent
f4464732e3
commit
e641dfa114
113 changed files with 1545 additions and 1019 deletions
|
@ -3,7 +3,8 @@
|
|||
nixpkgs,
|
||||
self,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (builtins) filter map toString;
|
||||
inherit (nixpkgs) lib;
|
||||
inherit (lib.attrsets) recursiveUpdate;
|
||||
|
@ -14,20 +15,18 @@
|
|||
# NOTE: This was inspired by raf, and I find this
|
||||
# to be quite a sane way of managing all modules in my flake.
|
||||
|
||||
mkSystem = {
|
||||
system,
|
||||
hostname,
|
||||
...
|
||||
} @ args:
|
||||
mkSystem =
|
||||
{
|
||||
system,
|
||||
hostname,
|
||||
...
|
||||
}@args:
|
||||
nixosSystem {
|
||||
specialArgs =
|
||||
recursiveUpdate
|
||||
{
|
||||
inherit lib;
|
||||
inputs = sources;
|
||||
inherit self;
|
||||
}
|
||||
args.specialArgs or {};
|
||||
specialArgs = recursiveUpdate {
|
||||
inherit lib;
|
||||
inputs = sources;
|
||||
inherit self;
|
||||
} args.specialArgs or { };
|
||||
modules = concatLists [
|
||||
# This is used to pre-emptively set the hostPlatform for nixpkgs.
|
||||
# Also, we set the system hostname here.
|
||||
|
@ -42,20 +41,15 @@
|
|||
# common configuration, which all hosts share.
|
||||
(singleton ./common.nix)
|
||||
# Import all files called module.nix from my modules directory.
|
||||
(
|
||||
map toString (listFilesRecursive ../modules)
|
||||
|> filter (hasSuffix "module.nix")
|
||||
)
|
||||
(
|
||||
map toString (listFilesRecursive ../modules)
|
||||
|> filter (hasSuffix ".mod.nix")
|
||||
)
|
||||
(map toString (listFilesRecursive ../modules) |> filter (hasSuffix "module.nix"))
|
||||
(map toString (listFilesRecursive ../modules) |> filter (hasSuffix ".mod.nix"))
|
||||
]
|
||||
|> flatten
|
||||
)
|
||||
];
|
||||
};
|
||||
in {
|
||||
in
|
||||
{
|
||||
temperance = mkSystem {
|
||||
system = "x86_64-linux";
|
||||
hostname = "temperance";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue