diff --git a/home/librewolf.nix b/home/librewolf.nix index c5047253..53541bd2 100644 --- a/home/librewolf.nix +++ b/home/librewolf.nix @@ -2,13 +2,15 @@ pkgs, lib, nix-config, - phone, + nixosConfig, ... }: let inherit (lib) mkIf singleton; inherit (nix-config.packages.${pkgs.system}) friendlyfox; + + isPhone = nixosConfig.programs.calls.enable; in { programs.librewolf = { @@ -101,7 +103,7 @@ in }; }; - home.file = mkIf phone { + home.file = mkIf isPhone { ".librewolf/default/chrome/userChrome.css".source = "${friendlyfox}/userChrome.css"; ".librewolf/default/chrome/userContent.css".source = "${friendlyfox}/userContent.css"; }; diff --git a/home/xdg-desktop-entries.nix b/home/xdg-desktop-entries.nix index aceee497..46439996 100644 --- a/home/xdg-desktop-entries.nix +++ b/home/xdg-desktop-entries.nix @@ -1,15 +1,17 @@ -{ lib, phone, ... }: +{ lib, nixosConfig, ... }: let inherit (lib) mkIf; + isPhone = nixosConfig.programs.calls.enable; + no = { name = ""; settings.Hidden = "true"; }; in { - xdg.desktopEntries = mkIf phone { + xdg.desktopEntries = mkIf isPhone { anki = no; htop = no; fish = no; diff --git a/home/xdg-user-dirs.nix b/home/xdg-user-dirs.nix index af59d875..d0b0927e 100644 --- a/home/xdg-user-dirs.nix +++ b/home/xdg-user-dirs.nix @@ -1,7 +1,9 @@ -{ config, phone, ... }: +{ config, nixosConfig, ... }: let inherit (config.home) homeDirectory; + + isPhone = nixosConfig.programs.calls.enable; in { xdg = { @@ -12,12 +14,12 @@ in templates = null; publicShare = null; - desktop = "${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}/ビデオ"; + desktop = homeDirectory; + download = if isPhone then homeDirectory else "${homeDirectory}/ダウンロード"; + documents = if isPhone then homeDirectory else "${homeDirectory}/ドキュメント"; + music = if isPhone then homeDirectory else "${homeDirectory}/音楽"; + pictures = if isPhone then homeDirectory else "${homeDirectory}/画像"; + videos = if isPhone then homeDirectory else "${homeDirectory}/ビデオ"; }; configFile."user-dirs.locale".text = "ja_JP"; diff --git a/modules/system.nix b/modules/system.nix index 6ddb6347..89ffd2c6 100644 --- a/modules/system.nix +++ b/modules/system.nix @@ -189,7 +189,7 @@ in }; extraSpecialArgs = { - inherit nix-config phone; + inherit nix-config; }; };