mirror of
https://github.com/donovanglover/nix-config.git
synced 2024-11-24 09:13:09 +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,
|
||||
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";
|
||||
};
|
||||
|
@ -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;
|
||||
|
@ -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";
|
||||
|
@ -189,7 +189,7 @@ in
|
||||
};
|
||||
|
||||
extraSpecialArgs = {
|
||||
inherit nix-config phone;
|
||||
inherit nix-config;
|
||||
};
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user