nix/user/common/default.nix

51 lines
1.5 KiB
Nix
Raw Normal View History

2024-04-14 08:32:29 +03:00
{ const, username, homeDir, util, style, pkgs, setting, key, secret, ... } @args: let
2024-04-14 22:54:20 +03:00
foot = import ./foot args;
mako = import ./mako args;
editorconfig = import ./editorconfig args;
btop = import ./top/btop args;
htop = import ./top/htop args;
2024-04-03 02:05:36 +03:00
in {
home-manager.backupFileExtension = "old";
home-manager.users.${username} = {
programs.home-manager.enable = true;
home.username = username;
home.homeDirectory = homeDir;
home.stateVersion = const.stateVersion;
home.file = {
2024-04-06 03:03:58 +03:00
".config/btop/btop.conf".text = btop.config;
".config/htop/htoprc".text = htop.config;
".config/mako/config".text = mako.config;
".config/foot/foot.ini".text = foot.config;
".editorconfig".text = editorconfig.config;
".parallel/will-cite".text = "";
2024-04-14 22:54:20 +03:00
"media/template".source = ./template;
};
# Directories.
xdg.userDirs = {
enable = true;
createDirectories = true;
desktop = "${homeDir}/";
documents = "${homeDir}/document/";
download = "${homeDir}/download/";
music = "${homeDir}/media/music/";
pictures = "${homeDir}/media/picture/";
publicShare = "${homeDir}/media/share/";
templates = "${homeDir}/media/template/";
videos = "${homeDir}/media/video/";
extraConfig = {
XDG_TMP_DIR = "${homeDir}/tmp/";
};
};
2024-04-14 08:32:29 +03:00
# GPG.
programs.gpg = {
enable = true;
publicKeys = secret.crypto.publicKeys;
};
};
}