phone: Move xdg config to home-manager modules

This commit is contained in:
Donovan Glover 2024-09-08 21:23:49 -04:00
parent 5df2225472
commit 0b720603ba
No known key found for this signature in database
GPG Key ID: EA7408A77AE1BE65
3 changed files with 38 additions and 44 deletions

View File

@ -0,0 +1,32 @@
{ lib, phone, ... }:
let
inherit (lib) mkIf;
no = {
name = "";
settings.Hidden = "true";
};
in
{
xdg.desktopEntries = mkIf phone {
anki = no;
htop = no;
fish = no;
nvim = no;
yazi = no;
qt5ct = no;
qt6ct = no;
gcdemu = no;
nixos-manual = no;
image-analyzer = no;
kvantummanager = no;
chromium-browser = no;
"org.gnome.Extensions" = no;
"org.pwmt.zathura" = no;
"org.gnome.eog" = no;
"org.gnome.Settings" = no;
"org.sigxcpu.Livi" = no;
};
}

View File

@ -1,4 +1,4 @@
{ config, ... }:
{ config, phone, ... }:
let
inherit (config.home) homeDirectory;
@ -13,11 +13,11 @@ in
publicShare = null;
desktop = "${homeDirectory}";
download = "${homeDirectory}/";
documents = "${homeDirectory}/";
music = "${homeDirectory}/";
pictures = "${homeDirectory}/";
videos = "${homeDirectory}/";
download = if phone then "${homeDirectory}" else "${homeDirectory}/";
documents = if phone then "${homeDirectory}" else "${homeDirectory}/";
music = if phone then "${homeDirectory}" else "${homeDirectory}/";
pictures = if phone then "${homeDirectory}" else "${homeDirectory}/";
videos = if phone then "${homeDirectory}" else "${homeDirectory}/";
};
configFile."user-dirs.locale".text = "ja_JP";

View File

@ -10,13 +10,6 @@ let
inherit (lib) mkIf mkForce;
inherit (config.modules.system) username;
inherit (builtins) attrValues;
no = {
name = "";
settings = {
Hidden = "true";
};
};
in
{
imports = attrValues self.nixosModules;
@ -48,37 +41,6 @@ in
config = {
programs.man.generateCaches = mkForce false;
xdg = {
desktopEntries = {
anki = no;
htop = no;
fish = no;
nvim = no;
yazi = no;
qt5ct = no;
qt6ct = no;
gcdemu = no;
nixos-manual = no;
image-analyzer = no;
kvantummanager = no;
chromium-browser = no;
"org.gnome.Extensions" = no;
"org.pwmt.zathura" = no;
"org.gnome.eog" = no;
"org.gnome.Settings" = no;
"org.sigxcpu.Livi" = no;
};
userDirs = {
download = mkForce "/home/${username}";
documents = mkForce "/home/${username}";
music = mkForce "/home/${username}";
pictures = mkForce "/home/${username}";
videos = mkForce "/home/${username}";
};
};
};
};