tangled
alpha
login
or
join now
wiro.world
/
dotfiles
2
fork
atom
yep, more dotfiles
2
fork
atom
overview
issues
1
pulls
1
pipelines
screen: add fragment and module
wiro.world
2 months ago
d8cc4206
9de3afa2
verified
This commit was signed with the committer's
known signature
.
wiro.world
SSH Key Fingerprint:
SHA256:SmMcWpNAnL+VAgItSawvXgdPVn7f1rsyAuB/5VNclKY=
+76
-7
6 changed files
expand all
collapse all
unified
split
home-manager
fragments
default.nix
firefox.nix
screen.nix
modules
home-manager
default.nix
screen.nix
wakatime.nix
+1
home-manager/fragments/default.nix
···
21
21
./kitty.nix
22
22
./launcher.nix
23
23
./rust.nix
24
24
+
./screen.nix
24
25
./shell.nix
25
26
./stylix.nix
26
27
./swaybar.nix
+4
-4
home-manager/fragments/firefox.nix
···
68
68
cfg = config.local.fragment.firefox;
69
69
in
70
70
{
71
71
-
options.local.fragment.firefox.enable = lib.mkEnableOption ''
72
72
-
Firefox related
73
73
-
'';
74
74
-
75
71
imports = [
76
72
zen-browser.homeModules.beta
77
73
];
74
74
+
75
75
+
options.local.fragment.firefox.enable = lib.mkEnableOption ''
76
76
+
Firefox related
77
77
+
'';
78
78
79
79
config = lib.mkIf cfg.enable {
80
80
home.sessionVariables.BROWSER = lib.getExe config.programs.zen-browser.package;
+29
home-manager/fragments/screen.nix
···
1
1
+
{ self
2
2
+
, config
3
3
+
, lib
4
4
+
, ...
5
5
+
}:
6
6
+
7
7
+
let
8
8
+
inherit (self) homeManagerModules;
9
9
+
cfg = config.local.fragment.screen;
10
10
+
in
11
11
+
{
12
12
+
imports = [ homeManagerModules.screen ];
13
13
+
14
14
+
options.local.fragment.screen.enable = lib.mkEnableOption ''
15
15
+
Screen related
16
16
+
'';
17
17
+
18
18
+
config = lib.mkIf cfg.enable {
19
19
+
programs.screen = {
20
20
+
enable = true;
21
21
+
22
22
+
screenrc = ''
23
23
+
startup_message off
24
24
+
25
25
+
defscrollback 10000
26
26
+
'';
27
27
+
};
28
28
+
};
29
29
+
}
+1
modules/home-manager/default.nix
···
1
1
{
2
2
+
screen = ./screen.nix;
2
3
wakatime = ./wakatime.nix;
3
4
xcompose = ./xcompose.nix;
4
5
}
+40
modules/home-manager/screen.nix
···
1
1
+
{ config
2
2
+
, lib
3
3
+
, pkgs
4
4
+
, ...
5
5
+
}:
6
6
+
7
7
+
let
8
8
+
cfg = config.programs.screen;
9
9
+
in
10
10
+
11
11
+
{
12
12
+
options = {
13
13
+
programs.screen = {
14
14
+
enable = lib.mkEnableOption "screen, a basic terminal multiplexer";
15
15
+
16
16
+
package = lib.mkPackageOption pkgs "screen" { };
17
17
+
18
18
+
screenrc = lib.mkOption {
19
19
+
type = lib.types.lines;
20
20
+
default = "";
21
21
+
example = ''
22
22
+
defscrollback 10000
23
23
+
startup_message off
24
24
+
'';
25
25
+
description = "The contents of {file}`/etc/screenrc` file";
26
26
+
};
27
27
+
};
28
28
+
};
29
29
+
30
30
+
config = lib.mkIf cfg.enable {
31
31
+
xdg.configFile."screen/screenrc".text = cfg.screenrc;
32
32
+
33
33
+
home.sessionVariables = {
34
34
+
SCREENRC = "${config.xdg.configHome}/screen/screenrc";
35
35
+
SCREENDIR = "${config.xdg.configHome}/screen";
36
36
+
};
37
37
+
38
38
+
home.packages = [ cfg.package ];
39
39
+
};
40
40
+
}
+1
-3
modules/home-manager/wakatime.nix
···
63
63
lib.mkIf cfg.enable {
64
64
home.sessionVariables.WAKATIME_HOME = "${config.xdg.configHome}/wakatime";
65
65
66
66
-
xdg.configFile = {
67
67
-
"wakatime/.wakatime.cfg".source = ini-format.generate "wakatime-config" final-config;
68
68
-
};
66
66
+
xdg.configFile."wakatime/.wakatime.cfg".source = ini-format.generate "wakatime-config" final-config;
69
67
};
70
68
}
71
69