mirror of
https://github.com/donovanglover/nix-config.git
synced 2024-11-22 00:03:55 +01:00
meta(home-manager): Determine isPhone from nixosConfig
Simplifies things a bit since we no longer depend on a phone variable, thus making the individual files easier to copy/paste.
This commit is contained in:
parent
9e59527e9a
commit
4b5d240ebd
@ -2,13 +2,15 @@
|
|||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
nix-config,
|
nix-config,
|
||||||
phone,
|
nixosConfig,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (lib) mkIf singleton;
|
inherit (lib) mkIf singleton;
|
||||||
inherit (nix-config.packages.${pkgs.system}) friendlyfox;
|
inherit (nix-config.packages.${pkgs.system}) friendlyfox;
|
||||||
|
|
||||||
|
isPhone = nixosConfig.programs.calls.enable;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
programs.librewolf = {
|
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/userChrome.css".source = "${friendlyfox}/userChrome.css";
|
||||||
".librewolf/default/chrome/userContent.css".source = "${friendlyfox}/userContent.css";
|
".librewolf/default/chrome/userContent.css".source = "${friendlyfox}/userContent.css";
|
||||||
};
|
};
|
||||||
|
@ -1,15 +1,17 @@
|
|||||||
{ lib, phone, ... }:
|
{ lib, nixosConfig, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (lib) mkIf;
|
inherit (lib) mkIf;
|
||||||
|
|
||||||
|
isPhone = nixosConfig.programs.calls.enable;
|
||||||
|
|
||||||
no = {
|
no = {
|
||||||
name = "";
|
name = "";
|
||||||
settings.Hidden = "true";
|
settings.Hidden = "true";
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
xdg.desktopEntries = mkIf phone {
|
xdg.desktopEntries = mkIf isPhone {
|
||||||
anki = no;
|
anki = no;
|
||||||
htop = no;
|
htop = no;
|
||||||
fish = no;
|
fish = no;
|
||||||
|
@ -1,7 +1,9 @@
|
|||||||
{ config, phone, ... }:
|
{ config, nixosConfig, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (config.home) homeDirectory;
|
inherit (config.home) homeDirectory;
|
||||||
|
|
||||||
|
isPhone = nixosConfig.programs.calls.enable;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
xdg = {
|
xdg = {
|
||||||
@ -12,12 +14,12 @@ in
|
|||||||
templates = null;
|
templates = null;
|
||||||
publicShare = null;
|
publicShare = null;
|
||||||
|
|
||||||
desktop = "${homeDirectory}";
|
desktop = homeDirectory;
|
||||||
download = if phone then "${homeDirectory}" else "${homeDirectory}/ダウンロード";
|
download = if isPhone then homeDirectory else "${homeDirectory}/ダウンロード";
|
||||||
documents = if phone then "${homeDirectory}" else "${homeDirectory}/ドキュメント";
|
documents = if isPhone then homeDirectory else "${homeDirectory}/ドキュメント";
|
||||||
music = if phone then "${homeDirectory}" else "${homeDirectory}/音楽";
|
music = if isPhone then homeDirectory else "${homeDirectory}/音楽";
|
||||||
pictures = if phone then "${homeDirectory}" else "${homeDirectory}/画像";
|
pictures = if isPhone then homeDirectory else "${homeDirectory}/画像";
|
||||||
videos = if phone then "${homeDirectory}" else "${homeDirectory}/ビデオ";
|
videos = if isPhone then homeDirectory else "${homeDirectory}/ビデオ";
|
||||||
};
|
};
|
||||||
|
|
||||||
configFile."user-dirs.locale".text = "ja_JP";
|
configFile."user-dirs.locale".text = "ja_JP";
|
||||||
|
@ -189,7 +189,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
extraSpecialArgs = {
|
extraSpecialArgs = {
|
||||||
inherit nix-config phone;
|
inherit nix-config;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user