tangled
alpha
login
or
join now
ladas552.me
/
Flake-ocean
0
fork
atom
My NixOS config Part 3: Flake-Parts Crusaders
nix.ladas552.me
hjem
nix
nixos
impermanence
flake-parts
nvfetcher
niri
noctalia
0
fork
atom
overview
issues
pulls
pipelines
try to expose sites with caddy
Ladas552
3 weeks ago
06b2e592
0034aa6b
+21
-68
4 changed files
expand all
collapse all
unified
split
modules
homeBrew
chawan.nix
default.nix
hosts
NixWool
nixwool.nix
userModules
chawan.nix
-50
modules/homeBrew/chawan.nix
···
1
1
-
{
2
2
-
flake.modules.hjem.chawan-brew =
3
3
-
{
4
4
-
config,
5
5
-
lib,
6
6
-
pkgs,
7
7
-
...
8
8
-
}:
9
9
-
let
10
10
-
inherit (lib.modules) mkIf;
11
11
-
inherit (lib.options) mkOption mkEnableOption mkPackageOption;
12
12
-
13
13
-
toml = pkgs.formats.toml { };
14
14
-
15
15
-
cfg = config.rum.programs.chawan;
16
16
-
in
17
17
-
{
18
18
-
options.rum.programs.chawan = {
19
19
-
enable = mkEnableOption "chawan";
20
20
-
21
21
-
package = mkPackageOption pkgs "chawan" { nullable = true; };
22
22
-
23
23
-
settings = mkOption {
24
24
-
type = toml.type;
25
25
-
default = { };
26
26
-
example = {
27
27
-
buffer = {
28
28
-
images = true;
29
29
-
autofocus = true;
30
30
-
};
31
31
-
page."C-k" = "() => pager.load('ddg:')";
32
32
-
};
33
33
-
description = ''
34
34
-
Configuration written to {file}`$XDG_CONFIG_HOME/chawan/config.toml`.
35
35
-
Please reference [chawan's documentation] for config options.
36
36
-
37
37
-
[chawan's documentation]: https://git.sr.ht/~bptato/chawan/tree/master/doc/config.md
38
38
-
'';
39
39
-
};
40
40
-
};
41
41
-
42
42
-
config = mkIf cfg.enable {
43
43
-
packages = mkIf (cfg.package != null) [ cfg.package ];
44
44
-
xdg.config.files."chawan/config.toml" = mkIf (cfg.settings != { }) {
45
45
-
source = toml.generate "chawan-config.toml" cfg.settings;
46
46
-
};
47
47
-
};
48
48
-
};
49
49
-
50
50
-
}
-1
modules/homeBrew/default.nix
···
7
7
syncthing-brew
8
8
userDirs-brew
9
9
imv-brew
10
10
-
chawan-brew
11
10
];
12
11
}
+21
-16
modules/hosts/NixWool/nixwool.nix
···
41
41
globalConfig = ''
42
42
email me@ladas552.me
43
43
'';
44
44
-
# virtualHosts = {
45
45
-
# "blog.ladas552.me" = {
46
46
-
# extraConfig = ''
47
47
-
# handle {
48
48
-
# reverse_proxy http://127.0.0.1:1313
49
49
-
# }
50
50
-
# '';
51
51
-
# };
52
52
-
# "nix.ladas552.me" = {
53
53
-
# extraConfig = ''
54
54
-
# handle {
55
55
-
# reverse_proxy http://127.0.0.1:3131
56
56
-
# }
57
57
-
# '';
58
58
-
# };
59
59
-
# };
44
44
+
virtualHosts = {
45
45
+
"blog.ladas552.me" = {
46
46
+
extraConfig = ''
47
47
+
handle {
48
48
+
reverse_proxy http://127.0.0.1:1313
49
49
+
}
50
50
+
root * /home/ladas552/sites/blog/public
51
51
+
encode gzip
52
52
+
'';
53
53
+
};
54
54
+
"nix.ladas552.me" = {
55
55
+
extraConfig = ''
56
56
+
handle {
57
57
+
reverse_proxy http://127.0.0.1:3131
58
58
+
}
59
59
+
root * /home/ladas552/sites/nix/public
60
60
+
encode gzip
61
61
+
'';
62
62
+
};
63
63
+
};
60
64
};
61
65
62
66
# ZFS needs it
···
84
88
];
85
89
86
90
custom.imp.home.directories = [
91
91
+
"sites"
87
92
];
88
93
};
89
94
homeManager.NixWool = {
-1
modules/userModules/chawan.nix
···
45
45
in
46
46
{
47
47
hjem.chawan = {
48
48
-
# from https://github.com/snugnug/hjem-rum/pull/162
49
48
inherit custom;
50
49
rum.programs.chawan = config-chawan;
51
50
};