diff options
author | Justin Bedő <cu@cua0.org> | 2019-02-17 21:49:37 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-17 21:49:37 +0000 |
commit | 05ab1a6e5a14ec53c6f811de0427c3e85092f594 (patch) | |
tree | d6a2b23e0d61ec159bcf4d2b5f7e30b22b546acb /nixos/modules/programs | |
parent | ecb265f106ab115dd3907d07c2d2fde026574f3e (diff) | |
parent | 5d42605b918f80a8cf4964ad42023791cae89e67 (diff) | |
download | nixlib-05ab1a6e5a14ec53c6f811de0427c3e85092f594.tar nixlib-05ab1a6e5a14ec53c6f811de0427c3e85092f594.tar.gz nixlib-05ab1a6e5a14ec53c6f811de0427c3e85092f594.tar.bz2 nixlib-05ab1a6e5a14ec53c6f811de0427c3e85092f594.tar.lz nixlib-05ab1a6e5a14ec53c6f811de0427c3e85092f594.tar.xz nixlib-05ab1a6e5a14ec53c6f811de0427c3e85092f594.tar.zst nixlib-05ab1a6e5a14ec53c6f811de0427c3e85092f594.zip |
Merge branch 'master' into singularity
Diffstat (limited to 'nixos/modules/programs')
-rw-r--r-- | nixos/modules/programs/iotop.nix | 17 | ||||
-rw-r--r-- | nixos/modules/programs/nano.nix | 5 | ||||
-rw-r--r-- | nixos/modules/programs/ssh.nix | 12 | ||||
-rw-r--r-- | nixos/modules/programs/sway-beta.nix | 3 | ||||
-rw-r--r-- | nixos/modules/programs/way-cooler.nix | 2 | ||||
-rw-r--r-- | nixos/modules/programs/zsh/zsh-syntax-highlighting.nix | 22 |
6 files changed, 51 insertions, 10 deletions
diff --git a/nixos/modules/programs/iotop.nix b/nixos/modules/programs/iotop.nix new file mode 100644 index 000000000000..5512dbc62f72 --- /dev/null +++ b/nixos/modules/programs/iotop.nix @@ -0,0 +1,17 @@ +{ config, pkgs, lib, ... }: + +with lib; + +let + cfg = config.programs.iotop; +in { + options = { + programs.iotop.enable = mkEnableOption "iotop + setcap wrapper"; + }; + config = mkIf cfg.enable { + security.wrappers.iotop = { + source = "${pkgs.iotop}/bin/iotop"; + capabilities = "cap_net_admin+p"; + }; + }; +} diff --git a/nixos/modules/programs/nano.nix b/nixos/modules/programs/nano.nix index 27b6d446c75d..6a4d46338e19 100644 --- a/nixos/modules/programs/nano.nix +++ b/nixos/modules/programs/nano.nix @@ -2,6 +2,7 @@ let cfg = config.programs.nano; + LF = "\n"; in { @@ -33,9 +34,9 @@ in ###### implementation - config = lib.mkIf (cfg.nanorc != "") { + config = lib.mkIf (cfg.nanorc != "" || cfg.syntaxHighlight) { environment.etc."nanorc".text = lib.concatStrings [ cfg.nanorc - (lib.optionalString cfg.syntaxHighlight ''include "${pkgs.nano}/share/nano/*.nanorc"'') ]; + (lib.optionalString cfg.syntaxHighlight ''${LF}include "${pkgs.nano}/share/nano/*.nanorc"'') ]; }; } diff --git a/nixos/modules/programs/ssh.nix b/nixos/modules/programs/ssh.nix index cc398174e6ce..4640c1d78d20 100644 --- a/nixos/modules/programs/ssh.nix +++ b/nixos/modules/programs/ssh.nix @@ -167,16 +167,16 @@ in The set of system-wide known SSH hosts. ''; example = literalExample '' - [ - { + { + myhost = { hostNames = [ "myhost" "myhost.mydomain.com" "10.10.1.4" ]; publicKeyFile = ./pubkeys/myhost_ssh_host_dsa_key.pub; - } - { + }; + myhost2 = { hostNames = [ "myhost2" ]; publicKeyFile = ./pubkeys/myhost2_ssh_host_dsa_key.pub; - } - ] + }; + } ''; }; diff --git a/nixos/modules/programs/sway-beta.nix b/nixos/modules/programs/sway-beta.nix index 7fc5979a38aa..3c235de0ce63 100644 --- a/nixos/modules/programs/sway-beta.nix +++ b/nixos/modules/programs/sway-beta.nix @@ -60,10 +60,11 @@ in { extraPackages = mkOption { type = with types; listOf package; default = with pkgs; [ + swaylock swayidle xwayland rxvt_unicode dmenu ]; defaultText = literalExample '' - with pkgs; [ xwayland rxvt_unicode dmenu ]; + with pkgs; [ swaylock swayidle xwayland rxvt_unicode dmenu ]; ''; example = literalExample '' with pkgs; [ diff --git a/nixos/modules/programs/way-cooler.nix b/nixos/modules/programs/way-cooler.nix index 633e959be9f3..f27bd42bd764 100644 --- a/nixos/modules/programs/way-cooler.nix +++ b/nixos/modules/programs/way-cooler.nix @@ -8,7 +8,7 @@ let wcWrapped = pkgs.writeShellScriptBin "way-cooler" '' ${cfg.extraSessionCommands} - exec ${pkgs.dbus.dbus-launch} --exit-with-session ${way-cooler}/bin/way-cooler + exec ${pkgs.dbus}/bin/dbus-run-session ${way-cooler}/bin/way-cooler ''; wcJoined = pkgs.symlinkJoin { name = "way-cooler-wrapped"; diff --git a/nixos/modules/programs/zsh/zsh-syntax-highlighting.nix b/nixos/modules/programs/zsh/zsh-syntax-highlighting.nix index e7cf17c2c00c..89087a229eb7 100644 --- a/nixos/modules/programs/zsh/zsh-syntax-highlighting.nix +++ b/nixos/modules/programs/zsh/zsh-syntax-highlighting.nix @@ -48,6 +48,23 @@ in https://github.com/zsh-users/zsh-syntax-highlighting/blob/master/docs/highlighters/pattern.md ''; }; + styles = mkOption { + default = {}; + type = types.attrsOf types.string; + + example = literalExample '' + { + "alias" = "fg=magenta,bold"; + } + ''; + + description = '' + Specifies custom styles to be highlighted by zsh-syntax-highlighting. + + Please refer to the docs for more information about the usage: + https://github.com/zsh-users/zsh-syntax-highlighting/blob/master/docs/highlighters/main.md + ''; + }; }; }; @@ -73,6 +90,11 @@ in pattern: design: "ZSH_HIGHLIGHT_PATTERNS+=('${pattern}' '${design}')" ) cfg.patterns) + ++ optionals (length(attrNames cfg.styles) > 0) + (mapAttrsToList ( + styles: design: + "ZSH_HIGHLIGHT_STYLES[${styles}]='${design}'" + ) cfg.styles) ); }; } |