mirror of
https://github.com/librephoenix/nixos-config
synced 2025-10-18 17:44:06 +05:30
Major config overhaul: use custom modules, setup for multi-host config, and less boilerplate
This commit is contained in:
parent
1fa8b17b07
commit
0453901d17
303 changed files with 3560 additions and 5566 deletions
39
modules/user/xdg/default.nix
Normal file
39
modules/user/xdg/default.nix
Normal file
|
@ -0,0 +1,39 @@
|
|||
{config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
cfg = config.userSettings.xdg;
|
||||
in {
|
||||
options = {
|
||||
userSettings.xdg = {
|
||||
enable = lib.mkEnableOption "Enable xdg user dirs with my xdg directory structure";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
# TODO fix mime associations, most of them are totally broken :(
|
||||
xdg.enable = true;
|
||||
xdg.userDirs = {
|
||||
enable = true;
|
||||
createDirectories = true;
|
||||
music = "${config.home.homeDirectory}/Media/Music";
|
||||
videos = "${config.home.homeDirectory}/Media/Videos";
|
||||
pictures = "${config.home.homeDirectory}/Media/Pictures";
|
||||
templates = "${config.home.homeDirectory}/Templates";
|
||||
download = "${config.home.homeDirectory}/Downloads";
|
||||
documents = "${config.home.homeDirectory}/Documents";
|
||||
desktop = null;
|
||||
publicShare = null;
|
||||
extraConfig = {
|
||||
XDG_DOTFILES_DIR = "${config.home.homeDirectory}/.dotfiles";
|
||||
XDG_ARCHIVE_DIR = "${config.home.homeDirectory}/Archive";
|
||||
XDG_PROJECTS_DIR = "${config.home.homeDirectory}/Projects";
|
||||
XDG_CLOUD_DIR = "${config.home.homeDirectory}/Drive";
|
||||
XDG_BOOK_DIR = "${config.home.homeDirectory}/Media/Books";
|
||||
XDG_VM_DIR = "${config.home.homeDirectory}/Machines";
|
||||
XDG_NOTES_DIR = "${config.home.homeDirectory}/Notes";
|
||||
};
|
||||
};
|
||||
xdg.mime.enable = true;
|
||||
xdg.mimeApps.enable = true;
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue