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";
|
channelName = "nixpkgs";
|
||||||
modules = [
|
modules = [
|
||||||
inputs.home-manager.nixosModules.home-manager
|
inputs.home-manager.nixosModules.home-manager
|
||||||
|
inputs.sops-nix.nixosModules.sops
|
||||||
inputs.dwarffs.nixosModules.dwarffs
|
inputs.dwarffs.nixosModules.dwarffs
|
||||||
] ++ (map (name: ./modules + "/${name}") (moduleNames ./modules));
|
] ++ (map (name: ./modules + "/${name}") (moduleNames ./modules));
|
||||||
specialArgs = {
|
specialArgs = {
|
||||||
|
|||||||
@ -21,6 +21,11 @@
|
|||||||
dpi = 180;
|
dpi = 180;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# enable sops
|
||||||
|
sops = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
# user setup
|
# user setup
|
||||||
users = {
|
users = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|||||||
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 =
|
config =
|
||||||
let
|
let
|
||||||
inherit (elss.withConfig config) mapAllUsers;
|
inherit (elss.withConfig config) mapAllUsers;
|
||||||
|
cfg = config.elss.zsh;
|
||||||
in
|
in
|
||||||
mkIf config.elss.zsh.enable {
|
mkIf cfg.enable {
|
||||||
environment = {
|
environment = {
|
||||||
shells = [ pkgs.zsh ];
|
shells = [ pkgs.zsh ];
|
||||||
pathsToLink = [ "/share/zsh/" ];
|
pathsToLink = [ "/share/zsh/" ];
|
||||||
@ -32,6 +33,28 @@ with lib; {
|
|||||||
#styles = { cursor = "standout,underline"; };
|
#styles = { cursor = "standout,underline"; };
|
||||||
};
|
};
|
||||||
setOptions = [ "auto_pushd" "correct" "nocaseglob" "rcexpandparam" "numericglobsort" "nobeep" "appendhistory" ];
|
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