wip(home): refactor home modules *WILL NOT BUILD*

This commit is contained in:
ooks-io 2024-06-04 21:19:35 +12:00
parent 2033810429
commit 6a591ecbf7
115 changed files with 1028 additions and 791 deletions

View file

@ -0,0 +1,28 @@
{ lib, config, osConfig, ... }:
let
inherit (lib) mkDefault;
admin = osConfig.ooknet.host.admin;
in
{
programs.home-manager.enable = true;
systemd.user.startServices = "sd-switch";
home = {
username = admin.name;
homeDirectory = "/home/${config.home.username}";
stateVersion = mkDefault "22.05";
sessionPath = [ "${config.home.homeDirectory}/.local/bin" ];
sessionVariables = {
TZ = "Pacific/Auckland";
};
};
# to save space
manual = {
html.enable = false;
json.enable = false;
manpages.enable = false;
};
}

View file

@ -0,0 +1,36 @@
{ lib, config, pkgs, ... }:
let
browser = ["${config.home.sessionVariables.BROWSER}.desktop"];
zathura = ["org.pwmt.zethura.desktop.desktop"];
associations = {
"text/html" = browser;
"x-scheme-handler/http" = browser;
"x-scheme-handler/https" = browser;
"x-scheme-handler/ftp" = browser;
"x-scheme-handler/about" = browser;
"x-scheme-handler/unknown" = browser;
"application/x-extension-htm" = browser;
"application/x-extension-html" = browser;
"application/x-extension-shtml" = browser;
"application/xhtml+xml" = browser;
"application/x-extension-xhtml" = browser;
"application/x-extension-xht" = browser;
"audio/*" = ["mpv.desktop"];
"video/*" = ["mpv.dekstop"];
"image/*" = ["imv.desktop"];
"application/json" = browser;
"application/pdf" = zathura;
"x-scheme-handler/discord" = ["vesktop.desktop"];
};
in
{
home.packages = [ pkgs.xdg-utils ];
xdg.mimeApps = {
enable = true;
associations.added = associations;
defaultApplications = associations;
};
}

View file

@ -0,0 +1,22 @@
{ config, ... }:
{
xdg = {
enable = true;
configHome = "${config.home.homeDirectory}/.config";
cacheHome = "${config.home.homeDirectory}/.cache";
dataHome = "${config.home.homeDirectory}/.local/share";
stateHome = "${config.home.homeDirectory}/.local/state";
userDirs = {
enable = true;
createDirectories = true;
desktop = "${config.home.homeDirectory}/Desktop";
code = "${config.home.homeDirectory}/Code";
documents = "${config.home.homeDirectory}/Documents";
music = "${config.home.homeDirectory}/Media/Music";
videos = "${config.home.homeDirectory}/Media/Videos";
pictures = "${config.home.homeDirectory}/Media/Pictures";
};
};
}