Avoid repeated keys

This commit is contained in:
SebastianStork 2024-08-07 01:22:15 +02:00
parent 53d90bee5a
commit 94e52b022b
12 changed files with 143 additions and 114 deletions

View file

@ -3,18 +3,22 @@
options.myConfig.git.enable = lib.mkEnableOption "";
config = lib.mkIf config.myConfig.git.enable {
programs.git = {
enable = true;
userName = "SebastianStork";
userEmail = "sebastian.stork@pm.me";
extraConfig.init.defaultBranch = "main";
};
programs.lazygit.enable = true;
sops.secrets.github-ssh-key.path = "${config.home.homeDirectory}/.ssh/github";
programs.ssh = {
enable = true;
matchBlocks."github.com".identityFile = "~/.ssh/github";
programs = {
git = {
enable = true;
userName = "SebastianStork";
userEmail = "sebastian.stork@pm.me";
extraConfig.init.defaultBranch = "main";
};
lazygit.enable = true;
ssh = {
enable = true;
matchBlocks."github.com".identityFile = "~/.ssh/github";
};
};
};
}

View file

@ -8,48 +8,50 @@
options.myConfig.shell.zsh.enable = lib.mkEnableOption "";
config = lib.mkIf config.myConfig.shell.zsh.enable {
programs.zsh = {
enable = true;
dotDir = ".config/zsh";
programs = {
zsh = {
enable = true;
dotDir = ".config/zsh";
autocd = true;
autosuggestion.enable = true;
syntaxHighlighting.enable = true;
history = {
ignoreAllDups = true;
path = "${config.xdg.dataHome}/zsh/zsh_history";
autocd = true;
autosuggestion.enable = true;
syntaxHighlighting.enable = true;
history = {
ignoreAllDups = true;
path = "${config.xdg.dataHome}/zsh/zsh_history";
};
plugins = [
{
name = "fzf-tab";
src = pkgs.zsh-fzf-tab;
file = "share/fzf-tab/fzf-tab.plugin.zsh";
}
];
initExtra = ''
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-Z}'
zstyle ':completion:*' list-colors ''${(s.:.)LS_COLORS}
zstyle ':completion:*' menu no
zstyle ':fzf-tab:complete:cd:*' fzf-preview 'ls $realpath'
bindkey "^[[1;5D" backward-word
bindkey "^[[1;5C" forward-word
'';
};
plugins = [
{
name = "fzf-tab";
src = pkgs.zsh-fzf-tab;
file = "share/fzf-tab/fzf-tab.plugin.zsh";
}
];
fzf.enable = true;
initExtra = ''
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-Z}'
zstyle ':completion:*' list-colors ''${(s.:.)LS_COLORS}
zstyle ':completion:*' menu no
zstyle ':fzf-tab:complete:cd:*' fzf-preview 'ls $realpath'
zoxide = {
enable = true;
options = [ "--cmd cd" ];
};
bindkey "^[[1;5D" backward-word
bindkey "^[[1;5C" forward-word
'';
};
programs.fzf.enable = true;
programs.zoxide = {
enable = true;
options = [ "--cmd cd" ];
};
programs.direnv = {
enable = true;
nix-direnv.enable = true;
config.global.hide_env_diff = true;
direnv = {
enable = true;
nix-direnv.enable = true;
config.global.hide_env_diff = true;
};
};
};
}

View file

@ -3,11 +3,13 @@
options.myConfig.auto-gc.enable = lib.mkEnableOption "";
config = lib.mkIf config.myConfig.auto-gc.enable {
programs.nh.enable = true;
programs.nh.clean = {
programs.nh = {
enable = true;
dates = "daily";
extraArgs = "--keep 10 --keep-since 3d";
clean = {
enable = true;
dates = "daily";
extraArgs = "--keep 10 --keep-since 3d";
};
};
};
}

View file

@ -3,11 +3,14 @@
options.myConfig.bluetooth.enable = lib.mkEnableOption "";
config = lib.mkIf config.myConfig.bluetooth.enable {
hardware.bluetooth = {
enable = true;
powerOnBoot = true;
hardware = {
bluetooth = {
enable = true;
powerOnBoot = true;
};
logitech.wireless.enable = true;
};
services.blueman.enable = true;
hardware.logitech.wireless.enable = true;
};
}

View file

@ -3,15 +3,17 @@
options.myConfig.boot.loader.systemd-boot.enable = lib.mkEnableOption "";
config = lib.mkIf config.myConfig.boot.loader.systemd-boot.enable {
boot.tmp.cleanOnBoot = true;
boot.loader = {
systemd-boot = {
enable = true;
editor = false;
configurationLimit = 20;
boot = {
tmp.cleanOnBoot = true;
loader = {
systemd-boot = {
enable = true;
editor = false;
configurationLimit = 20;
};
efi.canTouchEfiVariables = true;
timeout = 0;
};
efi.canTouchEfiVariables = true;
timeout = 0;
};
systemd.watchdog.rebootTime = "10";
};

View file

@ -10,9 +10,11 @@
"rd.udev.log_level=3"
"udev.log_priority=3"
];
initrd = {
verbose = false;
systemd.enable = true;
};
consoleLogLevel = 3;
initrd.verbose = false;
initrd.systemd.enable = true;
plymouth.enable = true;
};
};

View file

@ -13,8 +13,10 @@ in
options.myConfig.comma.enable = lib.mkEnableOption "";
config = {
programs.command-not-found.enable = !cfg.enable;
programs.nix-index.enable = cfg.enable;
programs.nix-index-database.comma.enable = cfg.enable;
programs = {
command-not-found.enable = !cfg.enable;
nix-index.enable = cfg.enable;
nix-index-database.comma.enable = cfg.enable;
};
};
}

View file

@ -3,11 +3,13 @@
options.myConfig.printing.enable = lib.mkEnableOption "";
config = lib.mkIf config.myConfig.printing.enable {
services.printing.enable = true;
services.avahi = {
enable = true;
nssmdns4 = true;
openFirewall = true;
services = {
printing.enable = true;
avahi = {
enable = true;
nssmdns4 = true;
openFirewall = true;
};
};
};
}

View file

@ -8,9 +8,11 @@
services.pipewire = {
enable = true;
wireplumber.enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
alsa = {
enable = true;
support32Bit = true;
};
};
};
}