Regenerated
This commit is contained in:
+420
-364
File diff suppressed because it is too large
Load Diff
@@ -1999,6 +1999,55 @@ in
|
|||||||
}
|
}
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
|
** =generated/modules/traveldroid/system/xdg-user-dirs.nix=
|
||||||
|
This sets the dbus implementation
|
||||||
|
#+BEGIN_SRC nix :tangle generated/modules/traveldroid/system/xdg-user-dirs.nix :noweb yes :mkdirp yes :eval never
|
||||||
|
{ lib, config, pkgs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.xdg.userDirs;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.xdg.userDirs = {
|
||||||
|
enable = lib.mkEnableOption "XDG User Directories";
|
||||||
|
|
||||||
|
directories = lib.mkOption {
|
||||||
|
type = lib.types.attrsOf lib.types.str;
|
||||||
|
default = {
|
||||||
|
DESKTOP = "Desktop";
|
||||||
|
DOWNLOAD = "Downloads";
|
||||||
|
TEMPLATES = "Templates";
|
||||||
|
PUBLICSHARE = "Public";
|
||||||
|
DOCUMENTS = "Documents";
|
||||||
|
MUSIC = "Music";
|
||||||
|
PICTURES = "Pictures";
|
||||||
|
VIDEOS = "Videos";
|
||||||
|
};
|
||||||
|
description = ''
|
||||||
|
XDG User Directories.
|
||||||
|
Specify the subdirectory names for each XDG user directory type.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
environment.sessionVariables = lib.genAttrs cfg.directories (
|
||||||
|
dirName: dirValue: "XDG_${toUpper dirName}_DIR" -> "${config.xdg.dataHome}/${dirValue}"
|
||||||
|
);
|
||||||
|
|
||||||
|
system.activationScripts.xdgUserDirs = ''
|
||||||
|
mkdir -p ${toString (
|
||||||
|
builtins.attrValues (
|
||||||
|
builtins.mapAttrs (dirName: dirValue: "${config.xdg.dataHome}/${dirValue}")
|
||||||
|
cfg.directories
|
||||||
|
)
|
||||||
|
)}
|
||||||
|
chown -R ${toString config.users.users.${config.defaultUser or "henrov"}.name}: "${config.xdg.dataHome}"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
|
||||||
* generated/users
|
* generated/users
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,45 @@
|
|||||||
|
# --- This file has been auto-generated. For permanent changes alter the appropriate block in the README.org. ---
|
||||||
|
{ lib, config, pkgs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.xdg.userDirs;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.xdg.userDirs = {
|
||||||
|
enable = lib.mkEnableOption "XDG User Directories";
|
||||||
|
|
||||||
|
directories = lib.mkOption {
|
||||||
|
type = lib.types.attrsOf lib.types.str;
|
||||||
|
default = {
|
||||||
|
DESKTOP = "Desktop";
|
||||||
|
DOWNLOAD = "Downloads";
|
||||||
|
TEMPLATES = "Templates";
|
||||||
|
PUBLICSHARE = "Public";
|
||||||
|
DOCUMENTS = "Documents";
|
||||||
|
MUSIC = "Music";
|
||||||
|
PICTURES = "Pictures";
|
||||||
|
VIDEOS = "Videos";
|
||||||
|
};
|
||||||
|
description = ''
|
||||||
|
XDG User Directories.
|
||||||
|
Specify the subdirectory names for each XDG user directory type.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
environment.sessionVariables = lib.genAttrs cfg.directories (
|
||||||
|
dirName: dirValue: "XDG_${toUpper dirName}_DIR" -> "${config.xdg.dataHome}/${dirValue}"
|
||||||
|
);
|
||||||
|
|
||||||
|
system.activationScripts.xdgUserDirs = ''
|
||||||
|
mkdir -p ${toString (
|
||||||
|
builtins.attrValues (
|
||||||
|
builtins.mapAttrs (dirName: dirValue: "${config.xdg.dataHome}/${dirValue}")
|
||||||
|
cfg.directories
|
||||||
|
)
|
||||||
|
)}
|
||||||
|
chown -R ${toString config.users.users.${config.defaultUser or "henrov"}.name}: "${config.xdg.dataHome}"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user