feat: rework to modular

This commit is contained in:
eric
2026-04-10 17:25:08 +02:00
parent 28dad81816
commit 99658b27dc
39 changed files with 738 additions and 211 deletions

11
modules/services/gpg.nix Normal file
View File

@@ -0,0 +1,11 @@
{ pkgs, ... }:
{
programs.gpg.enable = true;
services.gpg-agent = {
enable = true;
enableBashIntegration = true;
enableZshIntegration = true;
pinentry.package = pkgs.pinentry-curses;
};
}

22
modules/services/ssh.nix Normal file
View File

@@ -0,0 +1,22 @@
{ lib, ... }:
{
programs.ssh = {
enable = true;
enableDefaultConfig = false;
matchBlocks."*" = {
addKeysToAgent = lib.mkDefault "yes";
compression = lib.mkDefault false;
controlMaster = lib.mkDefault "no";
controlPath = lib.mkDefault "~/.ssh/master-%r@%n:%p";
controlPersist = lib.mkDefault "no";
forwardAgent = lib.mkDefault true;
hashKnownHosts = lib.mkDefault false;
serverAliveCountMax = lib.mkDefault 3;
serverAliveInterval = lib.mkDefault 0;
userKnownHostsFile = lib.mkDefault "~/.ssh/known_hosts";
};
};
services.ssh-agent.enable = true;
}

View File

@@ -0,0 +1,9 @@
{ lib, pkgs, ... }:
let
tailscale = lib.attrByPath [ "tailscale" ] null pkgs;
in
{
home.packages = builtins.filter (pkg: pkg != null) [
tailscale
];
}