Skip to content

Commit 2cbf846

Browse files
committed
fmt: Change to alejandra
1 parent c65dcb2 commit 2cbf846

178 files changed

Lines changed: 841 additions & 1380 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/default.nix

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
{
2-
perSystem =
3-
{ self', pkgs, ... }:
4-
{
5-
packages.mydocs = pkgs.callPackage ./docs.nix { self = self'; };
6-
};
2+
perSystem = {
3+
self',
4+
pkgs,
5+
...
6+
}: {
7+
packages.mydocs = pkgs.callPackage ./docs.nix {self = self';};
8+
};
79
}

docs/docs.nix

Lines changed: 29 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,42 @@
11
/*
2-
{ pkgs
3-
, ...
4-
}:
2+
{ pkgs
3+
, ...
4+
}:
55
6-
let
7-
inherit (pkgs) stdenv mkdocs python310Packages;
8-
options-doc = pkgs.callPackage ./options-doc.nix {};
9-
in stdenv.mkDerivation {
10-
src = ./.;
11-
name = "docs";
6+
let
7+
inherit (pkgs) stdenv mkdocs python310Packages;
8+
options-doc = pkgs.callPackage ./options-doc.nix {};
9+
in stdenv.mkDerivation {
10+
src = ./.;
11+
name = "docs";
1212
13-
buildInput = [ options-doc ];
13+
buildInput = [ options-doc ];
1414
15-
nativeBuildInputs = [
16-
mkdocs
17-
python310Packages.mkdocs-material
18-
python310Packages.pygments
19-
];
15+
nativeBuildInputs = [
16+
mkdocs
17+
python310Packages.mkdocs-material
18+
python310Packages.pygments
19+
];
2020
21-
buildPhase = ''
22-
ln -s ${options-doc} "./docs/nixos-options.md"
23-
mkdocs build
24-
'';
21+
buildPhase = ''
22+
ln -s ${options-doc} "./docs/nixos-options.md"
23+
mkdocs build
24+
'';
2525
26-
installPhase = ''
27-
mv site $out
28-
'';
29-
}
26+
installPhase = ''
27+
mv site $out
28+
'';
29+
}
3030
*/
31-
3231
{
3332
writeShellScriptBin,
3433
pkgs,
3534
self,
3635
...
37-
}:
38-
39-
let
40-
options-doc = pkgs.callPackage ./options-doc.nix { inherit self; };
36+
}: let
37+
options-doc = pkgs.callPackage ./options-doc.nix {inherit self;};
4138
in
42-
writeShellScriptBin "gen-options-doc" ''
43-
echo "Generating NixOS module options documentation"
44-
cat ${options-doc} > OPTIONS.md
45-
''
39+
writeShellScriptBin "gen-options-doc" ''
40+
echo "Generating NixOS module options documentation"
41+
cat ${options-doc} > OPTIONS.md
42+
''

docs/options-doc.nix

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,9 @@
44
pkgs,
55
runCommand,
66
nixosOptionsDoc,
7-
}:
8-
9-
let
7+
}: let
108
eval = lib.evalModules {
11-
specialArgs = { inherit self pkgs; };
9+
specialArgs = {inherit self pkgs;};
1210

1311
modules = [
1412
(lib.nixosSystem {
@@ -24,6 +22,6 @@ let
2422
inherit (eval) options;
2523
};
2624
in
27-
runCommand "options-doc.md" { } ''
28-
cat ${optionsDoc.optionsCommonMark} >> $out
29-
''
25+
runCommand "options-doc.md" {} ''
26+
cat ${optionsDoc.optionsCommonMark} >> $out
27+
''

flake.nix

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -150,16 +150,18 @@
150150
};
151151
};
152152

153-
outputs =
154-
{ self, flake-parts, ... }@inputs:
155-
let
156-
# Description of hosts
157-
hosts = import ./hosts.nix;
158-
159-
# Import helper funcfions
160-
libx = import ./lib { inherit self inputs; };
161-
in
162-
flake-parts.lib.mkFlake { inherit inputs; } {
153+
outputs = {
154+
self,
155+
flake-parts,
156+
...
157+
} @ inputs: let
158+
# Description of hosts
159+
hosts = import ./hosts.nix;
160+
161+
# Import helper funcfions
162+
libx = import ./lib {inherit self inputs;};
163+
in
164+
flake-parts.lib.mkFlake {inherit inputs;} {
163165
systems = libx.forAllSystems;
164166

165167
imports = [
@@ -175,7 +177,7 @@
175177
darwinConfigurations = libx.genDarwin hosts.darwin;
176178

177179
# Templates
178-
templates = import "${self}/templates" { inherit self; };
180+
templates = import "${self}/templates" {inherit self;};
179181
};
180182
};
181183
}

home/default.nix

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,36 +15,32 @@
1515
wmEnable ? false,
1616
allDirs,
1717
...
18-
}:
19-
20-
let
18+
}: let
2119
inherit (pkgs.stdenv) isDarwin;
2220
inherit (pkgs.stdenv) isLinux;
2321
inherit (lib) optional;
2422

2523
stateVersion = hmStateVersion;
2624
isRoot = username == "root";
2725
homeDirectory =
28-
if isDarwin then
29-
"/Users/${username}"
30-
else if isRoot then
31-
"/root"
32-
else
33-
"/home/${username}";
26+
if isDarwin
27+
then "/Users/${username}"
28+
else if isRoot
29+
then "/root"
30+
else "/home/${username}";
3431
userConfigurationPath = "${self}/home/users/${username}";
3532
userConfigurationPathExist = builtins.pathExists userConfigurationPath;
3633
userModulesPath = "${self}/home/users/${username}/modules";
3734
userModulesPathExist = builtins.pathExists userModulesPath;
3835
sshModulePath = "${self}/home/modules/ssh";
3936
sshModuleExistPath = builtins.pathExists sshModulePath;
40-
in
41-
{
37+
in {
4238
home-manager = {
4339
useGlobalPkgs = true;
4440
useUserPackages = true;
4541
backupFileExtension =
4642
"backup-"
47-
+ pkgs.lib.readFile "${pkgs.runCommand "timestamp" { } "echo -n `date '+%Y%m%d%H%M%S'` > $out"}";
43+
+ pkgs.lib.readFile "${pkgs.runCommand "timestamp" {} "echo -n `date '+%Y%m%d%H%M%S'` > $out"}";
4844

4945
extraSpecialArgs = {
5046
inherit

home/modules/alacritty/default.nix

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,11 @@
22
lib,
33
config,
44
...
5-
}:
6-
7-
let
5+
}: let
86
inherit (lib) mkEnableOption mkIf;
97

108
cfg = config.module.alacritty;
11-
in
12-
{
9+
in {
1310
options = {
1411
module.alacritty.enable = mkEnableOption "Enables Alacritty";
1512
};

home/modules/btop/default.nix

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,11 @@
22
lib,
33
config,
44
...
5-
}:
6-
7-
let
5+
}: let
86
inherit (lib) mkEnableOption mkIf;
97

108
cfg = config.module.btop;
11-
in
12-
{
9+
in {
1310
options = {
1411
module.btop.enable = mkEnableOption "Enables btop";
1512
};

home/modules/chrome/default.nix

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,11 @@
33
lib,
44
config,
55
...
6-
}:
7-
8-
let
6+
}: let
97
inherit (lib) mkEnableOption mkIf;
108

119
cfg = config.module.chromium;
12-
in
13-
{
10+
in {
1411
options = {
1512
module.chromium.enable = mkEnableOption "Enables Chromium";
1613
};

0 commit comments

Comments
 (0)