mirror of
https://github.com/ellmau/nixos.git
synced 2025-12-19 09:29:36 +01:00
Add zsh completion options, Add base config for sops
This commit is contained in:
parent
689f327894
commit
9881e6d35e
@ -85,6 +85,7 @@
|
||||
channelName = "nixpkgs";
|
||||
modules = [
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
inputs.sops-nix.nixosModules.sops
|
||||
inputs.dwarffs.nixosModules.dwarffs
|
||||
] ++ (map (name: ./modules + "/${name}") (moduleNames ./modules));
|
||||
specialArgs = {
|
||||
|
||||
@ -20,6 +20,11 @@
|
||||
enable = true;
|
||||
dpi = 180;
|
||||
};
|
||||
|
||||
# enable sops
|
||||
sops = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
# user setup
|
||||
users = {
|
||||
|
||||
12
modules/secrets/default.nix
Normal file
12
modules/secrets/default.nix
Normal file
@ -0,0 +1,12 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
with lib; {
|
||||
options.elss.sops.enable = mkEnableOption "Use sops config";
|
||||
|
||||
config =
|
||||
let
|
||||
cfg = config.elss.sops;
|
||||
in
|
||||
mkIf cfg.enable {
|
||||
sops.defaultSopsFile = ./secrets.yaml;
|
||||
};
|
||||
}
|
||||
@ -4,8 +4,9 @@ with lib; {
|
||||
config =
|
||||
let
|
||||
inherit (elss.withConfig config) mapAllUsers;
|
||||
cfg = config.elss.zsh;
|
||||
in
|
||||
mkIf config.elss.zsh.enable {
|
||||
mkIf cfg.enable {
|
||||
environment = {
|
||||
shells = [ pkgs.zsh ];
|
||||
pathsToLink = [ "/share/zsh/" ];
|
||||
@ -32,6 +33,28 @@ with lib; {
|
||||
#styles = { cursor = "standout,underline"; };
|
||||
};
|
||||
setOptions = [ "auto_pushd" "correct" "nocaseglob" "rcexpandparam" "numericglobsort" "nobeep" "appendhistory" ];
|
||||
|
||||
shellInit = ''
|
||||
if [[ $TERM == "dumb" ]]; then
|
||||
INSIDE_EMACS=1
|
||||
fi;
|
||||
'';
|
||||
|
||||
interactiveShellInit = ''
|
||||
source ${pkgs.zsh-nix-shell}/share/zsh-nix-shell/nix-shell.plugin.zsh
|
||||
|
||||
zstyle -e ':completion:*:approximate:*' max-errors 'reply=( $(( ($#PREFIX + $#SUFFIX) / 3 )) )'
|
||||
zstyle ':completion:*:descriptions' format "- %d -"
|
||||
zstyle ':completion:*:corrections' format "- %d - (errors %e})"
|
||||
zstyle ':completion:*:default' list-prompt '%S%M matches%s'
|
||||
zstyle ':completion:*:manuals' separate-sections true
|
||||
zstyle ':completion:*:manuals.(^1*)' insert-sections true
|
||||
zstyle ':completion:*' menu select
|
||||
zstyle ':completion:*' verbose yes
|
||||
zstyle ':completion:*' squeeze-slashes true
|
||||
zstyle ':completion:*:*:kill:*' menu yes select
|
||||
zstyle ':completion:*:kill:*' force-list always
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@ -1,4 +0,0 @@
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
sops.defaultSopsFile = ./secrets.yaml;
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user