more refactor

This commit is contained in:
Ivan Kirilov Dimitrov 2024-08-02 07:01:43 +02:00
parent a1d0ca2d65
commit e3da8e7072
No known key found for this signature in database
GPG Key ID: 0BDAD4B211C49294

View File

@ -34,7 +34,7 @@ toplevel@{ moduleWithSystem, ... }: {
); );
ivand = moduleWithSystem ( ivand = moduleWithSystem (
top@{ ... }: top@{ ... }:
perSystem@{ pkgs, config, ... }: { perSystem@{ pkgs, ... }: {
home = { home = {
username = "ivand"; username = "ivand";
homeDirectory = "/home/ivand"; homeDirectory = "/home/ivand";
@ -43,29 +43,28 @@ toplevel@{ moduleWithSystem, ... }: {
packages = with pkgs; [ transmission_4 speedtest-cli nvim ]; packages = with pkgs; [ transmission_4 speedtest-cli nvim ];
}; };
programs = { programs = {
password-store = { enable = true; package = pkgs.pass.withExtensions (e: with e; [ pass-otp pass-file ]); settings = { PASSWORD_STORE_DIR = "${config.home.homeDirectory}/.password-store"; }; }; git = with pkgs.lib; {
git = { userName = mkForce "Ivan Kirilov Dimitrov";
enable = true; userEmail = mkForce "ivan@idimitrov.dev";
delta.enable = true; signing = mkForce { signByDefault = true; key = "ivan@idimitrov.dev"; };
userName = pkgs.lib.mkDefault "Ivan Kirilov Dimitrov";
userEmail = pkgs.lib.mkDefault "ivan@idimitrov.dev";
signing = { signByDefault = true; key = "ivan@idimitrov.dev"; };
extraConfig = { color.ui = "auto"; pull.rebase = true; push.autoSetupRemote = true; };
aliases = { a = "add ."; c = "commit"; d = "diff --cached"; p = "push"; pa = "!git remote | xargs -L1 git push --all"; };
}; };
ssh = { ssh = {
enable = true;
matchBlocks = { vpsfree = { hostname = "37.205.13.29"; user = "ivand"; }; vpsfree-root = { hostname = "37.205.13.29"; user = "root"; }; }; matchBlocks = { vpsfree = { hostname = "37.205.13.29"; user = "ivand"; }; vpsfree-root = { hostname = "37.205.13.29"; user = "root"; }; };
}; };
gpg.enable = true;
}; };
services = { gpg-agent = { enable = true; enableBashIntegration = true; enableZshIntegration = true; enableNushellIntegration = true; pinentryPackage = pkgs.pinentry-qt; }; };
} }
); );
util = moduleWithSystem ( util = moduleWithSystem (
top@{ ... }: top@{ ... }:
perSystem@{ ... }: { perSystem@{ pkgs, config, ... }: {
programs = { programs = {
password-store = { enable = true; package = pkgs.pass.withExtensions (e: with e; [ pass-otp pass-file ]); settings = { PASSWORD_STORE_DIR = "${config.home.homeDirectory}/.password-store"; }; };
git = {
enable = true;
delta.enable = true;
extraConfig = { color.ui = "auto"; pull.rebase = true; push.autoSetupRemote = true; };
aliases = { a = "add ."; c = "commit"; d = "diff --cached"; p = "push"; pa = "!git remote | xargs -L1 git push --all"; };
};
tealdeer = { tealdeer = {
enable = true; enable = true;
settings = { display = { compact = true; }; updates = { auto_update = true; }; }; settings = { display = { compact = true; }; updates = { auto_update = true; }; };
@ -82,7 +81,10 @@ toplevel@{ moduleWithSystem, ... }: {
}; };
}; };
bat.enable = true; bat.enable = true;
ssh.enable = true;
gpg.enable = true;
}; };
services = { gpg-agent = { enable = true; enableBashIntegration = true; enableZshIntegration = true; enableNushellIntegration = true; pinentryPackage = pkgs.pinentry-qt; }; };
} }
); );
shell = moduleWithSystem ( shell = moduleWithSystem (