nix/user/common/default.nix

70 lines
1.8 KiB
Nix
Raw Normal View History

# This is a common user configuration.
2024-04-24 04:58:58 +03:00
{ const
, homeDir
, key
, pkgs
, secret
, setting
, style
, username
, util
, ... } @args: let
# Configuration modules.
2024-04-14 22:54:20 +03:00
btop = import ./top/btop args;
2024-04-24 04:58:58 +03:00
editorconfig = import ./editorconfig args;
foot = import ./foot args;
2024-04-16 23:19:40 +03:00
gtk3 = import ./gtk/3 args;
2024-04-24 04:58:58 +03:00
htop = import ./top/htop args;
keyd = import ./keyd args;
mako = import ./mako args;
2024-04-03 02:05:36 +03:00
in {
2024-04-14 23:48:14 +03:00
home-manager = {
# If file exists, rename it with a new extension.
2024-04-14 23:48:14 +03:00
backupFileExtension = "old";
2024-04-14 23:48:14 +03:00
users.${username} = {
home = {
username = username;
homeDirectory = homeDir;
stateVersion = const.stateVersion;
file = {
2024-04-16 23:19:40 +03:00
".config/btop/btop.conf".text = btop.config;
".config/foot/foot.ini".text = foot.config;
".config/gtk-3.0/bookmarks".text = gtk3.bookmarks;
".config/htop/htoprc".text = htop.config;
2024-04-24 04:58:58 +03:00
".config/keyd/app.conf".text = keyd.config;
2024-04-16 23:19:40 +03:00
".config/mako/config".text = mako.config;
".editorconfig".text = editorconfig.config;
".parallel/will-cite".text = "";
"media/template".source = ./template;
2024-04-14 23:48:14 +03:00
};
};
2024-04-14 23:48:14 +03:00
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
2024-04-14 23:48:14 +03:00
programs = {
home-manager.enable = true;
gpg = {
enable = true;
publicKeys = secret.crypto.publicKeys;
};
};
2024-04-14 08:32:29 +03:00
};
};
}