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
all hjem-rum prs are merged
Ladas552
3 weeks ago
e3e551f0
121ddc56
+3
-64
4 changed files
expand all
collapse all
unified
split
flake.lock
modules
hjemModules
imv.nix
homeBrew
default.nix
imv.nix
+3
-3
flake.lock
···
96
96
"treefmt-nix": []
97
97
},
98
98
"locked": {
99
99
-
"lastModified": 1771390253,
100
100
-
"narHash": "sha256-+ifX3E4EgGn+0225QMuWO5t3Mh/3Rg+6x+85Fpy7tsM=",
99
99
+
"lastModified": 1771501078,
100
100
+
"narHash": "sha256-Z2bux6QPs4lBzdiw5NdgPqk+BPF1H4lEu3C68ID7bYg=",
101
101
"owner": "snugnug",
102
102
"repo": "hjem-rum",
103
103
-
"rev": "3810ca9b852704bc8856ca0149c426dba2d4f6d9",
103
103
+
"rev": "57175e2f6ab7caf212dd985ef810ec1cd9abf755",
104
104
"type": "github"
105
105
},
106
106
"original": {
-1
modules/hjemModules/imv.nix
···
1
1
{
2
2
flake.modules.hjem.imv = {
3
3
-
# imv rum module from https://github.com/snugnug/hjem-rum/pull/160
4
3
rum.programs.imv = {
5
4
enable = true;
6
5
settings = {
-1
modules/homeBrew/default.nix
···
6
6
mpdris2-brew
7
7
syncthing-brew
8
8
userDirs-brew
9
9
-
imv-brew
10
9
];
11
10
}
-59
modules/homeBrew/imv.nix
···
1
1
-
{
2
2
-
flake.modules.hjem.imv-brew =
3
3
-
{
4
4
-
lib,
5
5
-
pkgs,
6
6
-
config,
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
-
ini = pkgs.formats.ini { };
14
14
-
15
15
-
cfg = config.rum.programs.imv;
16
16
-
17
17
-
optionsFile = ini.generate "imv-options.ini" {
18
18
-
options = cfg.settings.options or { };
19
19
-
};
20
20
-
aliasesFile = ini.generate "imv-aliases.ini" {
21
21
-
aliases = cfg.settings.aliases or { };
22
22
-
};
23
23
-
bindsFile = ini.generate "imv-binds.ini" {
24
24
-
binds = cfg.settings.binds or { };
25
25
-
};
26
26
-
in
27
27
-
{
28
28
-
options.rum.programs.imv = {
29
29
-
enable = mkEnableOption "imv";
30
30
-
31
31
-
package = mkPackageOption pkgs "imv" { nullable = true; };
32
32
-
33
33
-
settings = mkOption {
34
34
-
type = ini.type;
35
35
-
default = { };
36
36
-
example = {
37
37
-
options.background = "ffffff";
38
38
-
aliases.x = "close";
39
39
-
};
40
40
-
description = ''
41
41
-
Settings are written as an INI file to {file}`$XDG_CONFIG_HOME/imv/config`.
42
42
-
The lists are separated between options, aliases, and binds.
43
43
-
Please reference {manpage}`IMV(5)` to configure it accordingly.
44
44
-
'';
45
45
-
};
46
46
-
};
47
47
-
48
48
-
config = mkIf cfg.enable {
49
49
-
packages = mkIf (cfg.package != null) [ cfg.package ];
50
50
-
xdg.config.files."imv/config" = mkIf (cfg.settings != { }) {
51
51
-
source = pkgs.concatText "imv-config.ini" [
52
52
-
optionsFile
53
53
-
aliasesFile
54
54
-
bindsFile
55
55
-
];
56
56
-
};
57
57
-
};
58
58
-
};
59
59
-
}