+29
-15
flake.nix
+29
-15
flake.nix
···
80
80
sdImageFromSystem = system: system.config.system.build.sdImage;
81
81
82
82
mkSystem' = system: hostname:
83
-
withSystem system ({
84
-
inputs',
85
-
self',
86
-
...
87
-
}:
88
-
lib.nixosSystem {
89
-
specialArgs = {inherit inputs inputs' self self';};
90
-
modules = [
91
-
{networking.hostName = hostname;}
92
-
./modules/core.nix
93
-
./modules/nixos
94
-
./hosts/${hostname}
95
-
];
96
-
});
83
+
withSystem system (
84
+
{
85
+
inputs',
86
+
self',
87
+
...
88
+
}:
89
+
lib.nixosSystem {
90
+
specialArgs = {
91
+
inherit
92
+
inputs
93
+
inputs'
94
+
self
95
+
self'
96
+
;
97
+
};
98
+
modules = [
99
+
{networking.hostName = hostname;}
100
+
./modules/core.nix
101
+
./modules/nixos
102
+
./hosts/${hostname}
103
+
];
104
+
}
105
+
);
97
106
98
107
mkSystem = system: hostname: {${hostname} = self.lib.mkSystem' system hostname;};
99
108
mkSystems = system: hosts: lib.mergeAttrsList (map (self.lib.mkSystem system) hosts);
100
109
};
101
110
102
111
nixosConfigurations = inputs.nixpkgs.lib.concatMapAttrs self.lib.mkSystems {
103
-
"x86_64-linux" = ["ozen" "kiwi" "reg" "belaf"];
112
+
"x86_64-linux" = [
113
+
"ozen"
114
+
"kiwi"
115
+
"reg"
116
+
"belaf"
117
+
];
104
118
"aarch64-linux" = ["wakuna"];
105
119
};
106
120
+7
-6
hosts/kiwi/default.nix
+7
-6
hosts/kiwi/default.nix
···
1
1
{
2
2
inputs,
3
3
pkgs,
4
+
config,
4
5
...
5
6
}: {
6
7
imports = [
···
18
19
desktop.enable = true;
19
20
system.stateVersion = "25.11";
20
21
21
-
home-manager.users.kar.imports = [
22
+
home-manager.users.${config.my.username}.imports = [
22
23
./home-upf.nix
23
24
./desktop.nix
24
25
];
···
34
35
};
35
36
};
36
37
37
-
hardware = {
38
-
keyboard.qmk.enable = true;
39
-
};
38
+
hardware.keyboard.qmk.enable = true;
40
39
41
40
networking.networkmanager.enable = true;
42
41
43
42
services = {
44
-
tailscale.enable = true;
45
-
tailscale.useRoutingFeatures = "client";
43
+
tailscale = {
44
+
enable = true;
45
+
useRoutingFeatures = "client";
46
+
};
46
47
touchegg.enable = true;
47
48
blueman.enable = true;
48
49
auto-cpufreq.enable = true;
+6
-1
hosts/kiwi/desktop.nix
+6
-1
hosts/kiwi/desktop.nix
···
27
27
sentry = {
28
28
type = "local";
29
29
enabled = true;
30
-
command = ["${pkgs.bun}/bin/bun" "x" "mcp-remote@latest" "https://mcp.sentry.dev/mcp"];
30
+
command = [
31
+
"${pkgs.bun}/bin/bun"
32
+
"x"
33
+
"mcp-remote@latest"
34
+
"https://mcp.sentry.dev/mcp"
35
+
];
31
36
};
32
37
};
33
38
};
+6
-1
hosts/reg/pds-backup.nix
+6
-1
hosts/reg/pds-backup.nix
···
84
84
85
85
systemd.services.pds-backup = {
86
86
description = "Backup PDS data to S3";
87
-
path = [pkgs.awscli2 pkgs.coreutils pkgs.gnutar pkgs.gzip];
87
+
path = [
88
+
pkgs.awscli2
89
+
pkgs.coreutils
90
+
pkgs.gnutar
91
+
pkgs.gzip
92
+
];
88
93
serviceConfig = {
89
94
ExecStart = "${backupScript}";
90
95
Environment = [
+4
-1
hosts/reg/pds.nix
+4
-1
hosts/reg/pds.nix
+8
-1
modules/home/default.nix
+8
-1
modules/home/default.nix
···
21
21
else {};
22
22
23
23
home-manager = {
24
-
extraSpecialArgs = {inherit inputs inputs' self self';};
24
+
extraSpecialArgs = {
25
+
inherit
26
+
inputs
27
+
inputs'
28
+
self
29
+
self'
30
+
;
31
+
};
25
32
backupFileExtension = "bak";
26
33
users.${config.my.username} = {
27
34
home.username = config.my.username;
+16
-4
modules/home/dev/helix.nix
+16
-4
modules/home/dev/helix.nix
···
9
9
url = "https://patch-diff.githubusercontent.com/raw/helix-editor/helix/pull/14519.patch";
10
10
hash = "sha256-e4xaKcOhAKKYbJXhYHbjdFk6CwLubmCp+m7y//MmQFw=";
11
11
};
12
-
helix = inputs'.helix.packages.default.overrideAttrs (_: {patches = jj-patch;});
12
+
helix = inputs'.helix.packages.default.overrideAttrs (_: {
13
+
patches = jj-patch;
14
+
});
13
15
global-tools = with pkgs; [
14
16
alejandra
15
17
biome
···
34
36
vscode-langservers-extracted
35
37
yaml-language-server
36
38
typos-lsp
39
+
nil
37
40
]
38
41
++ global-tools;
39
42
···
63
66
p = ":sh echo %{buffer_name} | ${pkgs.wl-clipboard}/bin/wl-copy";
64
67
};
65
68
goMenu = {
66
-
"8" = ["move_prev_word_start" "move_next_word_end"];
69
+
"8" = [
70
+
"move_prev_word_start"
71
+
"move_next_word_end"
72
+
];
67
73
"c" = caseMenu;
68
74
};
69
75
caseMenu = {
···
167
173
};
168
174
nu-lsp = {
169
175
command = "nu";
170
-
args = ["--lsp" "--no-config-file"];
176
+
args = [
177
+
"--lsp"
178
+
"--no-config-file"
179
+
];
171
180
};
172
181
typos = {
173
182
command = "typos-lsp";
···
280
289
[
281
290
{
282
291
name = "nix";
283
-
language-servers = ["nixd"];
292
+
language-servers = [
293
+
"nixd"
294
+
"nil"
295
+
];
284
296
formatter = {
285
297
command = "alejandra";
286
298
};
+9
-2
modules/home/dev/opencode.nix
+9
-2
modules/home/dev/opencode.nix
···
2
2
programs.opencode = let
3
3
opencodePkg = pkgs.symlinkJoin {
4
4
name = "opencode-wrapped";
5
-
paths = [pkgs.opencode pkgs.nixd pkgs.alejandra];
5
+
paths = [
6
+
pkgs.opencode
7
+
pkgs.nixd
8
+
pkgs.alejandra
9
+
];
6
10
buildInputs = [pkgs.makeWrapper];
7
11
postBuild = ''
8
12
wrapProgram $out/bin/opencode \
···
47
51
gopls = {
48
52
type = "local";
49
53
enabled = true;
50
-
command = ["gopls" "mcp"];
54
+
command = [
55
+
"gopls"
56
+
"mcp"
57
+
];
51
58
};
52
59
};
53
60
};
+1
-5
modules/home/dev/utils.nix
+1
-5
modules/home/dev/utils.nix
+21
-2
modules/nixos/shell.nix
+21
-2
modules/nixos/shell.nix
···
8
8
users.defaultUserShell = pkgs.nushell;
9
9
environment.shells = [pkgs.nushell];
10
10
11
-
environment.sessionVariables.EDITOR = lib.attrByPath ["home-manager" "users" config.my.username "home" "sessionVariables" "EDITOR"] "nano" config;
12
-
programs.nano.enable = !(lib.attrByPath ["home-manager" "users" config.my.username "programs" "helix" "enable"] false config);
11
+
environment.sessionVariables.EDITOR =
12
+
lib.attrByPath [
13
+
"home-manager"
14
+
"users"
15
+
config.my.username
16
+
"home"
17
+
"sessionVariables"
18
+
"EDITOR"
19
+
] "nano"
20
+
config;
21
+
programs.nano.enable =
22
+
!(lib.attrByPath [
23
+
"home-manager"
24
+
"users"
25
+
config.my.username
26
+
"programs"
27
+
"helix"
28
+
"enable"
29
+
]
30
+
false
31
+
config);
13
32
};
14
33
}
+8
-3
pkgs/topiary-nu.nix
+8
-3
pkgs/topiary-nu.nix
···
12
12
treeSitterNu = stdenv.mkDerivation {
13
13
name = "tree-sitter-nu";
14
14
src = tree-sitter-nu;
15
-
buildInputs = [tree-sitter nodejs];
15
+
buildInputs = [
16
+
tree-sitter
17
+
nodejs
18
+
];
16
19
buildPhase = ''
17
20
tree-sitter generate
18
21
gcc -o parser.so -Isrc src/parser.c src/scanner.c -shared -fPIC -O2
···
46
49
'';
47
50
};
48
51
in
49
-
runCommand "topiary-nu" {
52
+
runCommand "topiary-nu"
53
+
{
50
54
buildInputs = [makeWrapper];
51
55
meta = {
52
56
mainProgram = "topiary-nu";
53
57
};
54
-
} ''
58
+
}
59
+
''
55
60
mkdir -p $out/bin
56
61
makeWrapper ${lib.getExe topiary} $out/bin/topiary-nu \
57
62
--set TOPIARY_LANGUAGE_DIR "${configDir}/languages" \