Skip to content

Commit 769b803

Browse files
committed
♻️ Modularized the xorg.xkill package
1 parent d8f2156 commit 769b803

File tree

3 files changed

+25
-6
lines changed

3 files changed

+25
-6
lines changed

docs/docs/tasks.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ Here are a non-exhaustive list of tasks.
1111
- [x] Customize Spotify with [Spicetify](https://github.com/Gerg-L/spicetify-nix)
1212
- [x] Add declarative Flatpak supports with [declarative-flatpak](https://github.com/GermanBread/declarative-flatpak)
1313
- [ ] Better email accounts management
14-
- [ ] Solve TODO in the file `modules/home/roles/desktop/default.nix`
14+
- [x] Solve TODO in the file `modules/home/roles/desktop/default.nix`
1515

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
lib,
3+
config,
4+
namespace,
5+
pkgs,
6+
...
7+
}:
8+
let
9+
inherit (lib) mkIf;
10+
inherit (lib.${namespace}) mkBoolOpt;
11+
12+
cfg = config.${namespace}.cli.programs.xkill;
13+
in
14+
{
15+
options.${namespace}.cli.programs.xkill = {
16+
enable = mkBoolOpt false "Whether or not to enable xkill.";
17+
};
18+
19+
config = mkIf cfg.enable { home.packages = with pkgs; [ xorg.xkill ]; };
20+
}

modules/home/roles/desktop/default.nix

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
{
2-
pkgs,
32
config,
43
lib,
54
namespace,
@@ -25,9 +24,6 @@ in
2524
};
2625
};
2726

28-
# TODO: Make modules for this packages
29-
home.packages = with pkgs; [ xorg.xkill ];
30-
3127
${namespace} = {
3228
roles = {
3329
common = enabled;
@@ -44,7 +40,10 @@ in
4440
};
4541

4642
cli = {
47-
programs.fast-anime = enabled;
43+
programs = {
44+
fast-anime = enabled;
45+
xkill = enabled;
46+
};
4847
terminals = {
4948
syncterm = enabled;
5049
wezterm = enabled;

0 commit comments

Comments
 (0)