diff options
Diffstat (limited to 'nixos/modules')
-rw-r--r-- | nixos/modules/hardware/bladeRF.nix | 28 | ||||
-rw-r--r-- | nixos/modules/module-list.nix | 1 | ||||
-rw-r--r-- | nixos/modules/programs/bash/bash.nix | 7 | ||||
-rw-r--r-- | nixos/modules/programs/zsh/oh-my-zsh.xml | 8 |
4 files changed, 39 insertions, 5 deletions
diff --git a/nixos/modules/hardware/bladeRF.nix b/nixos/modules/hardware/bladeRF.nix new file mode 100644 index 0000000000000..9254434771431 --- /dev/null +++ b/nixos/modules/hardware/bladeRF.nix @@ -0,0 +1,28 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let + cfg = config.hardware.bladeRF; + +in + +{ + options.hardware.bladeRF = { + enable = mkOption { + type = types.bool; + default = false; + description = '' + Enables udev rules for BladeRF devices. By default grants access + to users in the "bladerf" group. You may want to install the + libbladeRF package. + ''; + }; + + }; + + config = mkIf cfg.enable { + services.udev.packages = [ pkgs.libbladeRF ]; + users.groups.bladerf = {}; + }; +} \ No newline at end of file diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 01eb766fb4dd0..8fda7ee0b0a9b 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -36,6 +36,7 @@ ./config/vpnc.nix ./config/zram.nix ./hardware/all-firmware.nix + ./hardware/bladeRF.nix ./hardware/brightnessctl.nix ./hardware/ckb-next.nix ./hardware/cpu/amd-microcode.nix diff --git a/nixos/modules/programs/bash/bash.nix b/nixos/modules/programs/bash/bash.nix index 2b01c9d26c41e..d22f9dfa3199b 100644 --- a/nixos/modules/programs/bash/bash.nix +++ b/nixos/modules/programs/bash/bash.nix @@ -98,7 +98,12 @@ in if [ "$TERM" != "dumb" -o -n "$INSIDE_EMACS" ]; then PROMPT_COLOR="1;31m" let $UID && PROMPT_COLOR="1;32m" - PS1="\n\[\033[$PROMPT_COLOR\][\[\e]0;\u@\h: \w\a\]\u@\h:\w]\$\[\033[0m\] " + if [ -n "$INSIDE_EMACS" ]; then + # Emacs term mode doesn't support xterm title escape sequence (\e]0;) + PS1="\n\[\033[$PROMPT_COLOR\][\u@\h:\w]\\$\[\033[0m\] " + else + PS1="\n\[\033[$PROMPT_COLOR\][\[\e]0;\u@\h: \w\a\]\u@\h:\w]\$\[\033[0m\] " + fi if test "$TERM" = "xterm"; then PS1="\[\033]2;\h:\u:\w\007\]$PS1" fi diff --git a/nixos/modules/programs/zsh/oh-my-zsh.xml b/nixos/modules/programs/zsh/oh-my-zsh.xml index 5cf690c1a5606..b26980daf067d 100644 --- a/nixos/modules/programs/zsh/oh-my-zsh.xml +++ b/nixos/modules/programs/zsh/oh-my-zsh.xml @@ -19,7 +19,7 @@ configuration format of <literal>oh-my-zsh</literal>. <programlisting> { - programs.ohMyZsh = { + programs.zsh.ohMyZsh = { enable = true; plugins = [ "git" "python" "man" ]; theme = "agnoster"; @@ -51,7 +51,7 @@ The module can do this as well: <programlisting> { - programs.ohMyZsh.custom = "~/path/to/custom/scripts"; + programs.zsh.ohMyZsh.custom = "~/path/to/custom/scripts"; } </programlisting> </para> @@ -73,7 +73,7 @@ <programlisting> { pkgs, ... }: { - programs.ohMyZsh.customPkgs = with pkgs; [ + programs.zsh.ohMyZsh.customPkgs = with pkgs; [ pkgs.nix-zsh-completions # and even more... ]; @@ -87,7 +87,7 @@ <para> <emphasis>Please keep in mind that this is not compatible with - <literal>programs.ohMyZsh.custom</literal> as it requires an immutable store + <literal>programs.zsh.ohMyZsh.custom</literal> as it requires an immutable store path while <literal>custom</literal> shall remain mutable! An evaluation failure will be thrown if both <literal>custom</literal> and <literal>customPkgs</literal> are set.</emphasis> |