Skip to content

Commit 7873c09

Browse files
committed
chore: linting stuff
1 parent 37676af commit 7873c09

File tree

96 files changed

+986
-658
lines changed

Some content is hidden

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

96 files changed

+986
-658
lines changed

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ Everything is split up in separate flake-parts. Why? I have no clue.
1010
```
1111
.
1212
├── apps # Any apps I've used. I think this is empty.
13-
├── checks # Checks for formatting and future stuff if I need it.
1413
├── lib # Usually functions I share between flakes or modules are put here.
1514
├── modules # Modules are split up in their respective directories. Depending on the host, the correct ones will be imported.
1615
│   ├── darwin # Darwin modules; only OSX hosts will import these.

apps/module.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{}
1+
{ }

checks/fmt.nix

Lines changed: 0 additions & 20 deletions
This file was deleted.

checks/module.nix

Lines changed: 0 additions & 29 deletions
This file was deleted.

flake.nix

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,9 @@
7070
};
7171
};
7272

73-
outputs = {flake-parts, ...} @ inputs:
74-
flake-parts.lib.mkFlake {inherit inputs;} {
73+
outputs =
74+
{ flake-parts, ... }@inputs:
75+
flake-parts.lib.mkFlake { inherit inputs; } {
7576
systems = [
7677
"aarch64-darwin"
7778
"aarch64-linux"
@@ -81,7 +82,6 @@
8182

8283
imports = [
8384
./apps/module.nix
84-
./checks/module.nix
8585
./lib/module.nix
8686
./modules/module.nix
8787
./overlays/module.nix
@@ -90,12 +90,14 @@
9090
./templates/module.nix
9191
];
9292

93-
perSystem = {
94-
pkgs,
95-
inputs',
96-
...
97-
}: {
98-
formatter = pkgs.alejandra;
99-
};
93+
perSystem =
94+
{
95+
pkgs,
96+
inputs',
97+
...
98+
}:
99+
{
100+
formatter = pkgs.nixfmt-tree;
101+
};
100102
};
101103
}

lib/module.nix

Lines changed: 33 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,15 @@
44
inputs,
55
withSystem,
66
...
7-
}: let
7+
}:
8+
let
89
inherit (self) outputs;
910
inherit (lib.strings) hasSuffix;
10-
in {
11+
in
12+
{
1113
flake.lib = rec {
12-
mkPkgs = system:
14+
mkPkgs =
15+
system:
1316
import inputs.nixpkgs {
1417
inherit system;
1518
overlays = [
@@ -19,31 +22,40 @@ in {
1922
config.allowUnfree = true;
2023
};
2124

22-
mkSystem = host: system: type: modules:
23-
withSystem system ({
24-
pkgs,
25-
inputs',
26-
self',
27-
...
28-
}:
25+
mkSystem =
26+
host: system: type: modules:
27+
withSystem system (
28+
{
29+
pkgs,
30+
inputs',
31+
self',
32+
...
33+
}:
2934
type {
3035
inherit system modules;
3136
pkgs = mkPkgs system;
32-
specialArgs = {inherit inputs inputs' outputs self host;};
33-
});
37+
specialArgs = {
38+
inherit
39+
inputs
40+
inputs'
41+
outputs
42+
self
43+
host
44+
;
45+
};
46+
}
47+
);
3448

35-
mkStrappedSystem = host: system: type: modules: let
36-
inherit (builtins) attrValues;
49+
mkStrappedSystem =
50+
host: system: type: modules:
51+
let
52+
inherit (builtins) attrValues;
3753

38-
isLinux = hasSuffix "linux" system;
39-
in
54+
isLinux = hasSuffix "linux" system;
55+
in
4056
mkSystem host system type (
4157
modules
42-
++ (
43-
if isLinux
44-
then attrValues outputs.nixosModules
45-
else attrValues outputs.darwinModules
46-
)
58+
++ (if isLinux then attrValues outputs.nixosModules else attrValues outputs.darwinModules)
4759
++ attrValues outputs.sharedModules
4860
);
4961
};

modules/darwin/default.nix

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
{lib, ...}: let
1+
{ lib, ... }:
2+
let
23
inherit (builtins) readDir mapAttrs;
34
inherit (lib.attrsets) filterAttrs;
45

56
modules = filterAttrs (module: type: type == "directory") (readDir ./.);
67
in
7-
mapAttrs (k: _: import ./${k}) modules
8+
mapAttrs (k: _: import ./${k}) modules

modules/darwin/home-manager/default.nix

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,15 @@
77
self',
88
system,
99
...
10-
}: let
10+
}:
11+
let
1112
inherit (inputs.home-manager.darwinModules) home-manager;
1213
inherit (lib) mkIf mkOption types;
1314

1415
cfg = config.sysc.home-manager;
15-
in {
16-
imports = [home-manager];
16+
in
17+
{
18+
imports = [ home-manager ];
1719

1820
options.sysc.home-manager = {
1921
enable = mkOption {
@@ -29,7 +31,13 @@ in {
2931

3032
users.bddvlpr = import ./users/bddvlpr.nix;
3133
extraSpecialArgs = {
32-
inherit inputs inputs' outputs self' system;
34+
inherit
35+
inputs
36+
inputs'
37+
outputs
38+
self'
39+
system
40+
;
3341
};
3442
};
3543
};

modules/darwin/home-manager/users/bddvlpr.nix

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
outputs,
33
lib,
44
...
5-
}: {
5+
}:
6+
{
67
imports = with outputs.homeManagerModules; [
78
comma
89
dev
@@ -22,7 +23,7 @@
2223
];
2324

2425
# Shim to disable persistence
25-
home.persistence = lib.mkForce {};
26+
home.persistence = lib.mkForce { };
2627

2728
home.stateVersion = "24.05";
2829
}

modules/home/aagl/default.nix

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
osConfig,
44
...
55
}:
6-
with lib; {
6+
with lib;
7+
{
78
config = mkIf osConfig.sysc.aagl.enable {
89
home.persistence."/persist/home/bddvlpr".directories = [
910
".local/share/honkers-railway-launcher"

0 commit comments

Comments
 (0)