Skip to content

Commit c658253

Browse files
committed
chore: run nixfmt formatter
1 parent 5db8d9d commit c658253

File tree

26 files changed

+414
-219
lines changed

26 files changed

+414
-219
lines changed

devShells/default.nix

Lines changed: 55 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -5,49 +5,67 @@ let
55
inherit (inputs)
66
nixpkgs
77
stable
8-
devenv;
8+
devenv
9+
;
910

1011
# System types to support.
11-
supportedSystems = [ "x86_64-linux" "x86_64-darwin" "aarch64-darwin" ];
12+
supportedSystems = [
13+
"x86_64-linux"
14+
"x86_64-darwin"
15+
"aarch64-darwin"
16+
];
1217

1318
# Helper function to generate an attrset '{ x86_64-linux = f "x86_64-linux"; ... }'.
1419
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
1520

1621
# Nixpkgs instantiated for supported system types.
17-
nixpkgsFor = nixpkgs: forAllSystems (system: import nixpkgs {
18-
inherit system;
19-
config.allowUnfree = true;
20-
});
22+
nixpkgsFor =
23+
nixpkgs:
24+
forAllSystems (
25+
system:
26+
import nixpkgs {
27+
inherit system;
28+
config.allowUnfree = true;
29+
}
30+
);
2131
in
22-
forAllSystems (system:
23-
let
24-
pkgs = (nixpkgsFor stable)."${system}";
25-
in
26-
{
27-
java = devenv.lib.mkShell {
28-
inherit inputs pkgs;
29-
modules = [
30-
({ pkgs, lib, ... }: {
31-
languages = {
32-
java.enable = true;
33-
java.jdk.package = pkgs.jdk17_headless;
34-
java.maven.enable = true;
35-
};
36-
})
37-
];
38-
};
32+
forAllSystems (
33+
system:
34+
let
35+
pkgs = (nixpkgsFor stable)."${system}";
36+
in
37+
{
38+
java = devenv.lib.mkShell {
39+
inherit inputs pkgs;
40+
modules = [
41+
(
42+
{ pkgs, lib, ... }:
43+
{
44+
languages = {
45+
java.enable = true;
46+
java.jdk.package = pkgs.jdk17_headless;
47+
java.maven.enable = true;
48+
};
49+
}
50+
)
51+
];
52+
};
3953

40-
web = devenv.lib.mkShell {
41-
inherit inputs pkgs;
42-
modules = [
43-
({ pkgs, lib, ... }: {
44-
packages = [ ];
45-
languages = {
46-
javascript.enable = true;
47-
javascript.package = pkgs.nodejs_22;
48-
javascript.yarn.enable = true;
49-
};
50-
})
51-
];
52-
};
53-
})
54+
web = devenv.lib.mkShell {
55+
inherit inputs pkgs;
56+
modules = [
57+
(
58+
{ pkgs, lib, ... }:
59+
{
60+
packages = [ ];
61+
languages = {
62+
javascript.enable = true;
63+
javascript.package = pkgs.nodejs_22;
64+
javascript.yarn.enable = true;
65+
};
66+
}
67+
)
68+
];
69+
};
70+
}
71+
)

flake.nix

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@
2222
};
2323
};
2424

25-
outputs = { self, ... }@inputs:
25+
outputs =
26+
{ self, ... }@inputs:
2627
let
2728
inherit (self) outputs;
2829
forAllSystems = inputs.nixpkgs.lib.genAttrs [
@@ -33,10 +34,13 @@
3334
];
3435
in
3536
{
36-
packages = forAllSystems
37-
(system:
38-
let pkgs = import inputs.nixpkgs { inherit system; };
39-
in import ./pkgs { inherit pkgs; });
37+
packages = forAllSystems (
38+
system:
39+
let
40+
pkgs = import inputs.nixpkgs { inherit system; };
41+
in
42+
import ./pkgs { inherit pkgs; }
43+
);
4044

4145
overlays = import ./overlays { inherit (inputs) nixpkgs small; };
4246
homeConfigurations = import ./home { inherit inputs self; };

home/default.nix

Lines changed: 32 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,25 @@
1313
};
1414

1515
modules = [
16-
({ pkgs, ... }: {
17-
home = {
18-
username = "victor";
19-
homeDirectory = "/Users/victor";
20-
sessionPath = [
21-
"$HOME/.local/bin"
22-
];
16+
(
17+
{ pkgs, ... }:
18+
{
19+
home = {
20+
username = "victor";
21+
homeDirectory = "/Users/victor";
22+
sessionPath = [
23+
"$HOME/.local/bin"
24+
];
2325

24-
packages = with pkgs; [ bun gh typos ];
25-
stateVersion = "24.11";
26-
};
27-
})
26+
packages = with pkgs; [
27+
bun
28+
gh
29+
typos
30+
];
31+
stateVersion = "24.11";
32+
};
33+
}
34+
)
2835

2936
./modules/cli.nix
3037
./modules/direnv.nix
@@ -52,18 +59,21 @@
5259
};
5360

5461
modules = [
55-
({ pkgs, ... }: {
56-
home = {
57-
username = "victor";
58-
homeDirectory = "/Users/victor";
59-
sessionPath = [
60-
"$HOME/.local/bin"
61-
];
62+
(
63+
{ pkgs, ... }:
64+
{
65+
home = {
66+
username = "victor";
67+
homeDirectory = "/Users/victor";
68+
sessionPath = [
69+
"$HOME/.local/bin"
70+
];
6271

63-
packages = [ ];
64-
stateVersion = "24.11";
65-
};
66-
})
72+
packages = [ ];
73+
stateVersion = "24.11";
74+
};
75+
}
76+
)
6777

6878
./modules/cli.nix
6979
./modules/direnv.nix

home/modules/bash.nix

Lines changed: 28 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -35,40 +35,39 @@
3535
mknote = ''echo -e "---\ntitle:\ndate: $(date -u -Iseconds)\n---" > $(cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 8 | head -n 1).md'';
3636
};
3737

38-
bashrcExtra =
39-
''
40-
# Source global definitions
41-
if [ -f /etc/bashrc ]; then
42-
. /etc/bashrc
43-
fi
44-
45-
# User specific environment
46-
if ! [[ "$PATH" =~ "$HOME/.local/bin:$HOME/bin:" ]]; then
47-
PATH="$HOME/.local/bin:$HOME/bin:$PATH"
38+
bashrcExtra = ''
39+
# Source global definitions
40+
if [ -f /etc/bashrc ]; then
41+
. /etc/bashrc
4842
fi
49-
export PATH
5043
51-
# User specific aliases and functions
52-
if [ -d ~/.bashrc.d ]; then
53-
for rc in ~/.bashrc.d/*; do
54-
if [ -f "$rc" ]; then
55-
. "$rc"
56-
fi
57-
done
58-
fi
59-
unset rc
60-
61-
# colored GCC warnings and errors
62-
export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
44+
# User specific environment
45+
if ! [[ "$PATH" =~ "$HOME/.local/bin:$HOME/bin:" ]]; then
46+
PATH="$HOME/.local/bin:$HOME/bin:$PATH"
47+
fi
48+
export PATH
6349
64-
if ! shopt -oq posix; then
65-
if [ -f /usr/share/bash-completion/bash_completion ]; then
66-
. /usr/share/bash-completion/bash_completion
67-
elif [ -f /etc/bash_completion ]; then
68-
. /etc/bash_completion
50+
# User specific aliases and functions
51+
if [ -d ~/.bashrc.d ]; then
52+
for rc in ~/.bashrc.d/*; do
53+
if [ -f "$rc" ]; then
54+
. "$rc"
6955
fi
56+
done
57+
fi
58+
unset rc
59+
60+
# colored GCC warnings and errors
61+
export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
62+
63+
if ! shopt -oq posix; then
64+
if [ -f /usr/share/bash-completion/bash_completion ]; then
65+
. /usr/share/bash-completion/bash_completion
66+
elif [ -f /etc/bash_completion ]; then
67+
. /etc/bash_completion
7068
fi
71-
'';
69+
fi
70+
'';
7271

7372
profileExtra = ''
7473
# Get the aliases and functions

home/modules/default.nix

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
{ config, pkgs, inputs, ... }:
1+
{
2+
config,
3+
pkgs,
4+
inputs,
5+
...
6+
}:
27

38
let
49
inherit (inputs) nixpkgs;

home/modules/emacs/default.nix

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -14,30 +14,31 @@ in
1414
programs.emacs = {
1515
enable = true;
1616
package = customEmacs;
17-
extraPackages = epkgs: with epkgs; [
18-
consult
19-
corfu
20-
corfu-terminal
21-
direnv
22-
eglot
23-
forge
24-
magit
25-
magit-todos
26-
marginalia
27-
nix-mode
28-
orderless
29-
sml-mode
30-
switch-window
31-
treemacs
32-
treemacs-projectile
33-
vertico
17+
extraPackages =
18+
epkgs: with epkgs; [
19+
consult
20+
corfu
21+
corfu-terminal
22+
direnv
23+
eglot
24+
forge
25+
magit
26+
magit-todos
27+
marginalia
28+
nix-mode
29+
orderless
30+
sml-mode
31+
switch-window
32+
treemacs
33+
treemacs-projectile
34+
vertico
3435

35-
# org
36-
org-contrib
36+
# org
37+
org-contrib
3738

38-
# treesitter
39-
treesit-grammars.with-all-grammars
40-
];
39+
# treesitter
40+
treesit-grammars.with-all-grammars
41+
];
4142
};
4243

4344
# this is needed because `programs.emacs.extraConfig` is appended to

home/modules/email.nix

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@ in
1313
msmtp.enable = true;
1414
notmuch = {
1515
enable = true;
16-
new.tags = [ "unread" "inbox" ];
16+
new.tags = [
17+
"unread"
18+
"inbox"
19+
];
1720
hooks = {
1821
preNew = "mbsync --all";
1922
postNew = ''

home/modules/firefox.nix

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
{ config, inputs, pkgs, ... }:
1+
{
2+
config,
3+
inputs,
4+
pkgs,
5+
...
6+
}:
27

38
{
49
programs.firefox = {

home/modules/nix.nix

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,17 @@
33
{
44
nix.registry = {
55
nixpkgs = {
6-
from = { type = "indirect"; id = "nixpkgs"; };
6+
from = {
7+
type = "indirect";
8+
id = "nixpkgs";
9+
};
710
flake = inputs.nixpkgs;
811
};
912
self = {
10-
from = { type = "indirect"; id = "self"; };
13+
from = {
14+
type = "indirect";
15+
id = "self";
16+
};
1117
flake = self;
1218
};
1319
};

home/modules/vscodium.nix

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@ in
1717

1818
"editor.formatOnSave" = false;
1919
"editor.linkedEditing" = true;
20-
"editor.rulers" = [ 80 120 ];
20+
"editor.rulers" = [
21+
80
22+
120
23+
];
2124

2225
# excluded files
2326
"files.exclude" = {

0 commit comments

Comments
 (0)