mirror of
https://github.com/donovanglover/nix-config.git
synced 2025-06-20 09:47:57 +02:00
phone: Move xdg config to home-manager modules
This commit is contained in:
parent
5df2225472
commit
0b720603ba
32
home/xdg-desktop-entries.nix
Normal file
32
home/xdg-desktop-entries.nix
Normal 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;
|
||||||
|
};
|
||||||
|
}
|
@ -1,4 +1,4 @@
|
|||||||
{ config, ... }:
|
{ config, phone, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (config.home) homeDirectory;
|
inherit (config.home) homeDirectory;
|
||||||
@ -13,11 +13,11 @@ in
|
|||||||
publicShare = null;
|
publicShare = null;
|
||||||
|
|
||||||
desktop = "${homeDirectory}";
|
desktop = "${homeDirectory}";
|
||||||
download = "${homeDirectory}/ダウンロード";
|
download = if phone then "${homeDirectory}" else "${homeDirectory}/ダウンロード";
|
||||||
documents = "${homeDirectory}/ドキュメント";
|
documents = if phone then "${homeDirectory}" else "${homeDirectory}/ドキュメント";
|
||||||
music = "${homeDirectory}/音楽";
|
music = if phone then "${homeDirectory}" else "${homeDirectory}/音楽";
|
||||||
pictures = "${homeDirectory}/画像";
|
pictures = if phone then "${homeDirectory}" else "${homeDirectory}/画像";
|
||||||
videos = "${homeDirectory}/ビデオ";
|
videos = if phone then "${homeDirectory}" else "${homeDirectory}/ビデオ";
|
||||||
};
|
};
|
||||||
|
|
||||||
configFile."user-dirs.locale".text = "ja_JP";
|
configFile."user-dirs.locale".text = "ja_JP";
|
||||||
|
@ -10,13 +10,6 @@ let
|
|||||||
inherit (lib) mkIf mkForce;
|
inherit (lib) mkIf mkForce;
|
||||||
inherit (config.modules.system) username;
|
inherit (config.modules.system) username;
|
||||||
inherit (builtins) attrValues;
|
inherit (builtins) attrValues;
|
||||||
|
|
||||||
no = {
|
|
||||||
name = "";
|
|
||||||
settings = {
|
|
||||||
Hidden = "true";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = attrValues self.nixosModules;
|
imports = attrValues self.nixosModules;
|
||||||
@ -48,37 +41,6 @@ in
|
|||||||
|
|
||||||
config = {
|
config = {
|
||||||
programs.man.generateCaches = mkForce false;
|
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}";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user