feat: format via 'ls **/*.nix | each { |it| nixfmt $it.name }'

This commit is contained in:
Ryan Yin
2025-07-30 12:17:24 +08:00
parent d10b30b06b
commit 13bb77108c
219 changed files with 2103 additions and 1728 deletions
+15 -10
View File
@@ -2,7 +2,8 @@
lib,
inputs,
...
} @ args: let
}@args:
let
inherit (inputs) haumea;
# Contains all the flake outputs of this system architecture.
@@ -15,16 +16,20 @@
# Merge all the machine's data into a single attribute set.
outputs = {
darwinConfigurations = lib.attrsets.mergeAttrsList (map (it: it.darwinConfigurations or {}) dataWithoutPaths);
darwinConfigurations = lib.attrsets.mergeAttrsList (
map (it: it.darwinConfigurations or { }) dataWithoutPaths
);
};
in
outputs
// {
inherit data; # for debugging purposes
outputs
// {
inherit data; # for debugging purposes
# NixOS's unit tests.
evalTests = haumea.lib.loadEvalTests {
src = ./tests;
inputs = args // {inherit outputs;};
# NixOS's unit tests.
evalTests = haumea.lib.loadEvalTests {
src = ./tests;
inputs = args // {
inherit outputs;
};
}
};
}
+4 -2
View File
@@ -9,7 +9,8 @@
system,
genSpecialArgs,
...
} @ args: let
}@args:
let
name = "fern";
modules = {
@@ -34,7 +35,8 @@
};
systemArgs = modules // args;
in {
in
{
# macOS's configuration
darwinConfigurations.${name} = mylib.macosSystem systemArgs;
}
+4 -2
View File
@@ -9,7 +9,8 @@
system,
genSpecialArgs,
...
} @ args: let
}@args:
let
name = "frieren";
modules = {
@@ -33,7 +34,8 @@
};
systemArgs = modules // args;
in {
in
{
# macOS's configuration
darwinConfigurations.${name} = mylib.macosSystem systemArgs;
}
@@ -1,11 +1,12 @@
{
myvars,
lib,
}: let
}:
let
username = myvars.username;
hosts = [
"fern"
"frieren"
];
in
lib.genAttrs hosts (_: "/Users/${username}")
lib.genAttrs hosts (_: "/Users/${username}")
@@ -2,15 +2,14 @@
myvars,
lib,
outputs,
}: let
}:
let
username = myvars.username;
hosts = [
"fern"
"frieren"
];
in
lib.genAttrs
hosts
(
name: outputs.darwinConfigurations.${name}.config.home-manager.users.${username}.home.homeDirectory
)
lib.genAttrs hosts (
name: outputs.darwinConfigurations.${name}.config.home-manager.users.${username}.home.homeDirectory
)
@@ -1,8 +1,9 @@
{
lib,
outputs,
}: let
}:
let
hostsNames = builtins.attrNames outputs.darwinConfigurations;
expected = lib.genAttrs hostsNames (name: name);
in
expected
expected
@@ -2,8 +2,6 @@
lib,
outputs,
}:
lib.genAttrs
(builtins.attrNames outputs.darwinConfigurations)
(
lib.genAttrs (builtins.attrNames outputs.darwinConfigurations) (
name: outputs.darwinConfigurations.${name}.config.networking.hostName
)