nix/user/common/default.nix

76 lines
2.1 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-06-22 23:34:03 +03:00
btop = import ./top/btop args;
editor = import ./editorconfig args;
foot = import ./foot args;
2024-06-23 00:40:52 +03:00
fuzzel = import ./fuzzel args;
2024-06-22 23:34:03 +03:00
gtk3 = import ./gtk/3 args;
htop = import ./top/htop args;
keyd = import ./keyd args;
mako = import ./mako args;
yazi = import ./yazi 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-06-23 00:40:52 +03:00
".config/btop/btop.conf".text = btop.text;
".config/foot/foot.ini".source = foot.file;
".config/fuzzel/fuzzel.ini".source = fuzzel.file;
".config/gtk-3.0/bookmarks".text = gtk3.bookmarks;
".config/htop/htoprc".text = htop.text;
".config/keyd/app.conf".text = keyd.text;
".config/mako/config".source = mako.file;
".config/yazi/init.lua".source = yazi.init;
".config/yazi/keymap.toml".source = yazi.keymap;
".config/yazi/yazi.toml".source = yazi.yazi;
".editorconfig".source = editor.file;
".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
};
};
}