tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
nixos: init programs.xonsh
Rok Garbas
9 years ago
760da3e3
15b27093
+63
2 changed files
expand all
collapse all
unified
split
nixos
modules
module-list.nix
programs
xonsh.nix
+1
nixos/modules/module-list.nix
···
84
84
./programs/venus.nix
85
85
./programs/wvdial.nix
86
86
./programs/xfs_quota.nix
87
87
+
./programs/xonsh.nix
87
88
./programs/zsh/zsh.nix
88
89
./rename.nix
89
90
./security/acme.nix
+62
nixos/modules/programs/xonsh.nix
···
1
1
+
# This module defines global configuration for the xonsh.
2
2
+
3
3
+
{ config, lib, pkgs, ... }:
4
4
+
5
5
+
with lib;
6
6
+
7
7
+
let
8
8
+
9
9
+
cfge = config.environment;
10
10
+
11
11
+
cfg = config.programs.xonsh;
12
12
+
13
13
+
in
14
14
+
15
15
+
{
16
16
+
17
17
+
options = {
18
18
+
19
19
+
programs.xonsh = {
20
20
+
21
21
+
enable = mkOption {
22
22
+
default = false;
23
23
+
description = ''
24
24
+
Whether to configure xnosh as an interactive shell.
25
25
+
'';
26
26
+
type = types.bool;
27
27
+
};
28
28
+
29
29
+
package = mkOption {
30
30
+
type = types.package;
31
31
+
example = literalExample "pkgs.xonsh.override { configFile = \"/path/to/xonshrc\"; }";
32
32
+
description = ''
33
33
+
xonsh package to use.
34
34
+
'';
35
35
+
};
36
36
+
37
37
+
config = mkOption {
38
38
+
default = "";
39
39
+
description = "Control file to customize your shell behavior.";
40
40
+
type = types.lines;
41
41
+
};
42
42
+
43
43
+
};
44
44
+
45
45
+
};
46
46
+
47
47
+
config = mkIf cfg.enable {
48
48
+
49
49
+
environment.etc."xonshrc".text = cfg.config;
50
50
+
51
51
+
environment.systemPackages = [ pkgs.xonsh ];
52
52
+
53
53
+
environment.shells =
54
54
+
[ "/run/current-system/sw/bin/xonsh"
55
55
+
"/var/run/current-system/sw/bin/xonsh"
56
56
+
"${pkgs.xonsh}/bin/xonsh"
57
57
+
];
58
58
+
59
59
+
};
60
60
+
61
61
+
}
62
62
+