mirror of
https://github.com/nix-community/home-manager.git
synced 2025-12-02 23:21:02 +01:00
treewide: format with latest stable formatter
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
This commit is contained in:
parent
56ee5d0670
commit
b4752b0eda
56 changed files with 816 additions and 832 deletions
|
|
@ -254,34 +254,33 @@ in
|
|||
|
||||
home.packages = lib.mkIf (cfg.package != null) [ cfg.package ];
|
||||
|
||||
home.file =
|
||||
{
|
||||
"${configDir}/accounts.conf" = mkIf genAccountsConf {
|
||||
text = joinCfg [
|
||||
header
|
||||
(mkINI cfg.extraAccounts)
|
||||
(mkINI primaryAccountAccounts)
|
||||
(mkINI accountsExtraAccounts)
|
||||
];
|
||||
};
|
||||
home.file = {
|
||||
"${configDir}/accounts.conf" = mkIf genAccountsConf {
|
||||
text = joinCfg [
|
||||
header
|
||||
(mkINI cfg.extraAccounts)
|
||||
(mkINI primaryAccountAccounts)
|
||||
(mkINI accountsExtraAccounts)
|
||||
];
|
||||
};
|
||||
|
||||
"${configDir}/aerc.conf" = mkIf genAercConf {
|
||||
text = joinCfg [
|
||||
header
|
||||
(mkINI cfg.extraConfig)
|
||||
(joinContextual accountsExtraConfig)
|
||||
];
|
||||
};
|
||||
"${configDir}/aerc.conf" = mkIf genAercConf {
|
||||
text = joinCfg [
|
||||
header
|
||||
(mkINI cfg.extraConfig)
|
||||
(joinContextual accountsExtraConfig)
|
||||
];
|
||||
};
|
||||
|
||||
"${configDir}/binds.conf" = mkIf genBindsConf {
|
||||
text = joinCfg [
|
||||
header
|
||||
(mkINI cfg.extraBinds)
|
||||
(joinContextual accountsExtraBinds)
|
||||
];
|
||||
};
|
||||
}
|
||||
// (mkStyleset cfg.stylesets)
|
||||
// (mkTemplates cfg.templates);
|
||||
"${configDir}/binds.conf" = mkIf genBindsConf {
|
||||
text = joinCfg [
|
||||
header
|
||||
(mkINI cfg.extraBinds)
|
||||
(joinContextual accountsExtraBinds)
|
||||
];
|
||||
};
|
||||
}
|
||||
// (mkStyleset cfg.stylesets)
|
||||
// (mkTemplates cfg.templates);
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -281,11 +281,10 @@ in
|
|||
xdg.configFile."alot/config".text = configFile;
|
||||
|
||||
xdg.configFile."alot/hooks.py" = lib.mkIf (cfg.hooks != "") {
|
||||
text =
|
||||
''
|
||||
# Generated by Home Manager.
|
||||
''
|
||||
+ cfg.hooks;
|
||||
text = ''
|
||||
# Generated by Home Manager.
|
||||
''
|
||||
+ cfg.hooks;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -53,8 +53,7 @@ in
|
|||
(pkgs.eclipses.eclipseWithPlugins {
|
||||
eclipse = cfg.package;
|
||||
jvmArgs =
|
||||
cfg.jvmArgs
|
||||
++ lib.optional cfg.enableLombok "-javaagent:${pkgs.lombok}/share/java/lombok.jar";
|
||||
cfg.jvmArgs ++ lib.optional cfg.enableLombok "-javaagent:${pkgs.lombok}/share/java/lombok.jar";
|
||||
plugins = cfg.plugins;
|
||||
})
|
||||
];
|
||||
|
|
|
|||
|
|
@ -63,13 +63,12 @@ let
|
|||
}
|
||||
)
|
||||
// {
|
||||
General =
|
||||
{
|
||||
StartWithLastProfile = 1;
|
||||
}
|
||||
// lib.optionalAttrs (cfg.profileVersion != null) {
|
||||
Version = cfg.profileVersion;
|
||||
};
|
||||
General = {
|
||||
StartWithLastProfile = 1;
|
||||
}
|
||||
// lib.optionalAttrs (cfg.profileVersion != null) {
|
||||
Version = cfg.profileVersion;
|
||||
};
|
||||
};
|
||||
|
||||
profilesIni = lib.generators.toINI { } profiles;
|
||||
|
|
@ -168,11 +167,10 @@ let
|
|||
in
|
||||
{
|
||||
assertion = duplicates == { };
|
||||
message =
|
||||
''
|
||||
Must not have a ${appName} ${entityKind} with an existing ID but
|
||||
''
|
||||
+ concatStringsSep "\n" (mapAttrsToList mkMsg duplicates);
|
||||
message = ''
|
||||
Must not have a ${appName} ${entityKind} with an existing ID but
|
||||
''
|
||||
+ concatStringsSep "\n" (mapAttrsToList mkMsg duplicates);
|
||||
}
|
||||
);
|
||||
|
||||
|
|
@ -784,54 +782,53 @@ in
|
|||
};
|
||||
|
||||
config = {
|
||||
assertions =
|
||||
assertions = [
|
||||
(mkNoDuplicateAssertion config.containers "container")
|
||||
{
|
||||
assertion = !(extensionSettingsNeedForce config.extensions.settings) || config.extensions.force;
|
||||
message = ''
|
||||
Using '${lib.showOption profilePath}.extensions.settings' will override all
|
||||
previous extensions settings. Enable
|
||||
'${lib.showOption profilePath}.extensions.force' to acknowledge this.
|
||||
'';
|
||||
}
|
||||
]
|
||||
++ (builtins.concatMap (
|
||||
{ name, value }:
|
||||
let
|
||||
packages = builtins.filter (pkg: pkg.addonId == name) config.extensions.packages;
|
||||
package = builtins.head packages;
|
||||
unauthorized = lib.subtractLists value.permissions package.meta.mozPermissions;
|
||||
in
|
||||
[
|
||||
(mkNoDuplicateAssertion config.containers "container")
|
||||
{
|
||||
assertion = !(extensionSettingsNeedForce config.extensions.settings) || config.extensions.force;
|
||||
assertion = value.permissions == null || length packages == 1;
|
||||
message = ''
|
||||
Using '${lib.showOption profilePath}.extensions.settings' will override all
|
||||
previous extensions settings. Enable
|
||||
'${lib.showOption profilePath}.extensions.force' to acknowledge this.
|
||||
Must have exactly one extension with addonId '${name}'
|
||||
in '${lib.showOption profilePath}.extensions.packages' but found ${toString (length packages)}.
|
||||
'';
|
||||
}
|
||||
|
||||
{
|
||||
assertion = value.permissions == null || length packages != 1 || unauthorized == [ ];
|
||||
message = ''
|
||||
Extension ${name} requests permissions that weren't
|
||||
authorized: ${builtins.toJSON unauthorized}.
|
||||
Consider adding the missing permissions to
|
||||
'${
|
||||
lib.showAttrPath (
|
||||
profilePath
|
||||
++ [
|
||||
"extensions"
|
||||
name
|
||||
]
|
||||
)
|
||||
}.permissions'.
|
||||
'';
|
||||
}
|
||||
]
|
||||
++ (builtins.concatMap (
|
||||
{ name, value }:
|
||||
let
|
||||
packages = builtins.filter (pkg: pkg.addonId == name) config.extensions.packages;
|
||||
package = builtins.head packages;
|
||||
unauthorized = lib.subtractLists value.permissions package.meta.mozPermissions;
|
||||
in
|
||||
[
|
||||
{
|
||||
assertion = value.permissions == null || length packages == 1;
|
||||
message = ''
|
||||
Must have exactly one extension with addonId '${name}'
|
||||
in '${lib.showOption profilePath}.extensions.packages' but found ${toString (length packages)}.
|
||||
'';
|
||||
}
|
||||
|
||||
{
|
||||
assertion = value.permissions == null || length packages != 1 || unauthorized == [ ];
|
||||
message = ''
|
||||
Extension ${name} requests permissions that weren't
|
||||
authorized: ${builtins.toJSON unauthorized}.
|
||||
Consider adding the missing permissions to
|
||||
'${
|
||||
lib.showAttrPath (
|
||||
profilePath
|
||||
++ [
|
||||
"extensions"
|
||||
name
|
||||
]
|
||||
)
|
||||
}.permissions'.
|
||||
'';
|
||||
}
|
||||
]
|
||||
) (lib.attrsToList config.extensions.settings))
|
||||
++ config.bookmarks.assertions;
|
||||
) (lib.attrsToList config.extensions.settings))
|
||||
++ config.bookmarks.assertions;
|
||||
};
|
||||
}
|
||||
)
|
||||
|
|
@ -902,7 +899,8 @@ in
|
|||
}
|
||||
|
||||
(mkNoDuplicateAssertion cfg.profiles "profile")
|
||||
] ++ (lib.concatMap (profile: profile.assertions) (attrValues cfg.profiles));
|
||||
]
|
||||
++ (lib.concatMap (profile: profile.assertions) (attrValues cfg.profiles));
|
||||
|
||||
warnings =
|
||||
optional (cfg.enableGnomeExtensions or false) ''
|
||||
|
|
|
|||
|
|
@ -566,11 +566,12 @@ in
|
|||
package:
|
||||
pkgs.runCommand "${getName package}-fish-completions"
|
||||
{
|
||||
srcs =
|
||||
[ package ]
|
||||
++ lib.filter (p: p != null) (
|
||||
builtins.map (outName: package.${outName} or null) config.home.extraOutputsToInstall
|
||||
);
|
||||
srcs = [
|
||||
package
|
||||
]
|
||||
++ lib.filter (p: p != null) (
|
||||
builtins.map (outName: package.${outName} or null) config.home.extraOutputsToInstall
|
||||
);
|
||||
nativeBuildInputs = [ pkgs.python3 ];
|
||||
buildInputs = [ cfg.package ];
|
||||
preferLocalBuild = true;
|
||||
|
|
|
|||
|
|
@ -203,8 +203,7 @@ in
|
|||
FZF_CTRL_T_OPTS = cfg.fileWidgetOptions;
|
||||
FZF_DEFAULT_COMMAND = cfg.defaultCommand;
|
||||
FZF_DEFAULT_OPTS =
|
||||
cfg.defaultOptions
|
||||
++ lib.optionals (cfg.colors != { }) [ "--color ${renderedColors cfg.colors}" ];
|
||||
cfg.defaultOptions ++ lib.optionals (cfg.colors != { }) [ "--color ${renderedColors cfg.colors}" ];
|
||||
FZF_TMUX = if cfg.tmux.enableShellIntegration then "1" else null;
|
||||
FZF_TMUX_OPTS = cfg.tmux.shellIntegrationOptions;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -120,7 +120,8 @@ in
|
|||
"bezier"
|
||||
"monitor"
|
||||
"size"
|
||||
] ++ lib.optionals cfg.sourceFirst [ "source" ];
|
||||
]
|
||||
++ lib.optionals cfg.sourceFirst [ "source" ];
|
||||
example = [
|
||||
"$"
|
||||
"bezier"
|
||||
|
|
|
|||
|
|
@ -28,11 +28,10 @@ in
|
|||
# Errors out if the symlink already exists
|
||||
"${ide}/bin/${ide.meta.mainProgram}-remote-dev-server registerBackendLocationForGateway || true";
|
||||
lines = map mkLine cfg.ides;
|
||||
linesStr =
|
||||
''
|
||||
rm $HOME/.cache/JetBrains/RemoteDev/userProvidedDist/_nix_store* || true
|
||||
''
|
||||
+ lib.concatStringsSep "\n" lines;
|
||||
linesStr = ''
|
||||
rm $HOME/.cache/JetBrains/RemoteDev/userProvidedDist/_nix_store* || true
|
||||
''
|
||||
+ lib.concatStringsSep "\n" lines;
|
||||
in
|
||||
lib.hm.dag.entryAfter [ "writeBoundary" ] linesStr;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -301,24 +301,23 @@ in
|
|||
(mkOrder 570 (toKittyEnv cfg.environment))
|
||||
];
|
||||
|
||||
xdg.configFile."kitty/kitty.conf" =
|
||||
{
|
||||
text = ''
|
||||
# Generated by Home Manager.
|
||||
# See https://sw.kovidgoyal.net/kitty/conf.html
|
||||
${cfg.extraConfig}
|
||||
'';
|
||||
}
|
||||
// lib.optionalAttrs pkgs.stdenv.hostPlatform.isLinux {
|
||||
onChange = ''
|
||||
${pkgs.procps}/bin/pkill -USR1 -u $USER kitty || true
|
||||
'';
|
||||
}
|
||||
// lib.optionalAttrs pkgs.stdenv.hostPlatform.isDarwin {
|
||||
onChange = ''
|
||||
/usr/bin/pkill -USR1 -u $USER kitty || true
|
||||
'';
|
||||
};
|
||||
xdg.configFile."kitty/kitty.conf" = {
|
||||
text = ''
|
||||
# Generated by Home Manager.
|
||||
# See https://sw.kovidgoyal.net/kitty/conf.html
|
||||
${cfg.extraConfig}
|
||||
'';
|
||||
}
|
||||
// lib.optionalAttrs pkgs.stdenv.hostPlatform.isLinux {
|
||||
onChange = ''
|
||||
${pkgs.procps}/bin/pkill -USR1 -u $USER kitty || true
|
||||
'';
|
||||
}
|
||||
// lib.optionalAttrs pkgs.stdenv.hostPlatform.isDarwin {
|
||||
onChange = ''
|
||||
/usr/bin/pkill -USR1 -u $USER kitty || true
|
||||
'';
|
||||
};
|
||||
|
||||
home.activation.checkKittyTheme = mkIf (cfg.themeFile != null) (
|
||||
let
|
||||
|
|
|
|||
|
|
@ -106,13 +106,12 @@ in
|
|||
MANGOHUD_DLSYM = 1;
|
||||
};
|
||||
|
||||
xdg.configFile =
|
||||
{
|
||||
"MangoHud/MangoHud.conf" = mkIf (cfg.settings != { }) { text = renderSettings cfg.settings; };
|
||||
}
|
||||
// lib.mapAttrs' (
|
||||
n: v: lib.nameValuePair "MangoHud/${n}.conf" { text = renderSettings v; }
|
||||
) cfg.settingsPerApplication;
|
||||
xdg.configFile = {
|
||||
"MangoHud/MangoHud.conf" = mkIf (cfg.settings != { }) { text = renderSettings cfg.settings; };
|
||||
}
|
||||
// lib.mapAttrs' (
|
||||
n: v: lib.nameValuePair "MangoHud/${n}.conf" { text = renderSettings v; }
|
||||
) cfg.settingsPerApplication;
|
||||
};
|
||||
|
||||
meta.maintainers = with lib.maintainers; [ zeratax ];
|
||||
|
|
|
|||
|
|
@ -22,33 +22,30 @@ let
|
|||
# See: https://github.com/nix-community/home-manager/issues/6663
|
||||
# and https://github.com/bnprks/mcfly-fzf/issues/10
|
||||
|
||||
bashIntegration =
|
||||
''
|
||||
eval "$(${getExe cfg.package} init bash)"
|
||||
''
|
||||
+ optionalString cfg.fzf.enable ''
|
||||
if [[ $- =~ i ]]; then
|
||||
eval "$(${getExe cfg.mcflyFzfPackage} init bash)"
|
||||
fi
|
||||
'';
|
||||
bashIntegration = ''
|
||||
eval "$(${getExe cfg.package} init bash)"
|
||||
''
|
||||
+ optionalString cfg.fzf.enable ''
|
||||
if [[ $- =~ i ]]; then
|
||||
eval "$(${getExe cfg.mcflyFzfPackage} init bash)"
|
||||
fi
|
||||
'';
|
||||
|
||||
fishIntegration =
|
||||
''
|
||||
${getExe cfg.package} init fish | source
|
||||
''
|
||||
+ optionalString cfg.fzf.enable ''
|
||||
${getExe cfg.mcflyFzfPackage} init fish | source
|
||||
'';
|
||||
fishIntegration = ''
|
||||
${getExe cfg.package} init fish | source
|
||||
''
|
||||
+ optionalString cfg.fzf.enable ''
|
||||
${getExe cfg.mcflyFzfPackage} init fish | source
|
||||
'';
|
||||
|
||||
zshIntegration =
|
||||
''
|
||||
eval "$(${getExe cfg.package} init zsh)"
|
||||
''
|
||||
+ optionalString cfg.fzf.enable ''
|
||||
if [[ -o interactive ]]; then
|
||||
eval "$(${getExe cfg.mcflyFzfPackage} init zsh)"
|
||||
fi
|
||||
'';
|
||||
zshIntegration = ''
|
||||
eval "$(${getExe cfg.package} init zsh)"
|
||||
''
|
||||
+ optionalString cfg.fzf.enable ''
|
||||
if [[ -o interactive ]]; then
|
||||
eval "$(${getExe cfg.mcflyFzfPackage} init zsh)"
|
||||
fi
|
||||
'';
|
||||
|
||||
in
|
||||
{
|
||||
|
|
|
|||
|
|
@ -84,17 +84,16 @@ in
|
|||
(mkIf (cfg.ignores != [ ] || cfg.ignoresRegexp != [ ]) {
|
||||
programs.mercurial.iniContent.ui.ignore = "${config.xdg.configHome}/hg/hgignore_global";
|
||||
|
||||
xdg.configFile."hg/hgignore_global".text =
|
||||
''
|
||||
syntax: glob
|
||||
''
|
||||
+ lib.concatStringsSep "\n" cfg.ignores
|
||||
+ "\n"
|
||||
+ ''
|
||||
syntax: regexp
|
||||
''
|
||||
+ lib.concatStringsSep "\n" cfg.ignoresRegexp
|
||||
+ "\n";
|
||||
xdg.configFile."hg/hgignore_global".text = ''
|
||||
syntax: glob
|
||||
''
|
||||
+ lib.concatStringsSep "\n" cfg.ignores
|
||||
+ "\n"
|
||||
+ ''
|
||||
syntax: regexp
|
||||
''
|
||||
+ lib.concatStringsSep "\n" cfg.ignoresRegexp
|
||||
+ "\n";
|
||||
})
|
||||
|
||||
(mkIf (cfg.aliases != { }) {
|
||||
|
|
|
|||
|
|
@ -99,6 +99,7 @@ in
|
|||
".ne/.keys" = mkIf (cfg.keybindings != "") { text = cfg.keybindings; };
|
||||
".ne/.extensions" = mkIf (cfg.virtualExtensions != "") { text = cfg.virtualExtensions; };
|
||||
".ne/.menus" = mkIf (cfg.menus != "") { text = cfg.menus; };
|
||||
} // autoPrefFiles;
|
||||
}
|
||||
// autoPrefFiles;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -109,7 +109,8 @@ in
|
|||
"${lib.getExe cfg.package}"
|
||||
"clean"
|
||||
"user"
|
||||
] ++ lib.optional (cfg.clean.extraArgs != "") cfg.clean.extraArgs;
|
||||
]
|
||||
++ lib.optional (cfg.clean.extraArgs != "") cfg.clean.extraArgs;
|
||||
|
||||
StartCalendarInterval = lib.hm.darwin.mkCalendarInterval cfg.clean.dates;
|
||||
|
||||
|
|
|
|||
|
|
@ -532,13 +532,12 @@ in
|
|||
vaults = builtins.listToAttrs (
|
||||
builtins.map (vault: {
|
||||
name = builtins.hashString "md5" vault.target;
|
||||
value =
|
||||
{
|
||||
path = "${config.home.homeDirectory}/${vault.target}";
|
||||
}
|
||||
// (lib.attrsets.optionalAttrs ((builtins.length vaults) == 1) {
|
||||
open = true;
|
||||
});
|
||||
value = {
|
||||
path = "${config.home.homeDirectory}/${vault.target}";
|
||||
}
|
||||
// (lib.attrsets.optionalAttrs ((builtins.length vaults) == 1) {
|
||||
open = true;
|
||||
});
|
||||
}) vaults
|
||||
);
|
||||
updateDisabled = true;
|
||||
|
|
|
|||
|
|
@ -65,29 +65,28 @@ let
|
|||
};
|
||||
in
|
||||
toIni {
|
||||
"Account ${name}" =
|
||||
{
|
||||
localrepository = "${name}-local";
|
||||
remoterepository = "${name}-remote";
|
||||
}
|
||||
// postSyncHook
|
||||
// offlineimap.extraConfig.account;
|
||||
"Account ${name}" = {
|
||||
localrepository = "${name}-local";
|
||||
remoterepository = "${name}-remote";
|
||||
}
|
||||
// postSyncHook
|
||||
// offlineimap.extraConfig.account;
|
||||
|
||||
"Repository ${name}-local" = {
|
||||
type = localType;
|
||||
localfolders = account.maildir.absPath;
|
||||
} // offlineimap.extraConfig.local;
|
||||
}
|
||||
// offlineimap.extraConfig.local;
|
||||
|
||||
"Repository ${name}-remote" =
|
||||
{
|
||||
type = remoteType;
|
||||
remoteuser = account.userName;
|
||||
}
|
||||
// remoteHost
|
||||
// remotePort
|
||||
// remotePassEval
|
||||
// ssl
|
||||
// offlineimap.extraConfig.remote;
|
||||
"Repository ${name}-remote" = {
|
||||
type = remoteType;
|
||||
remoteuser = account.userName;
|
||||
}
|
||||
// remoteHost
|
||||
// remotePort
|
||||
// remotePassEval
|
||||
// ssl
|
||||
// offlineimap.extraConfig.remote;
|
||||
};
|
||||
|
||||
extraConfigType = with lib.types; attrsOf (either (either str int) bool);
|
||||
|
|
@ -189,30 +188,31 @@ in
|
|||
''
|
||||
}/bin/get_settings.pyc";
|
||||
|
||||
xdg.configFile."offlineimap/config".text =
|
||||
''
|
||||
# Generated by Home Manager.
|
||||
# See https://github.com/OfflineIMAP/offlineimap/blob/master/offlineimap.conf
|
||||
# for an exhaustive list of options.
|
||||
''
|
||||
+ toIni (
|
||||
{
|
||||
general = {
|
||||
accounts = lib.concatMapStringsSep "," (a: a.name) accounts;
|
||||
pythonfile = "${config.xdg.configHome}/offlineimap/get_settings.py";
|
||||
metadata = "${config.xdg.dataHome}/offlineimap";
|
||||
} // cfg.extraConfig.general;
|
||||
xdg.configFile."offlineimap/config".text = ''
|
||||
# Generated by Home Manager.
|
||||
# See https://github.com/OfflineIMAP/offlineimap/blob/master/offlineimap.conf
|
||||
# for an exhaustive list of options.
|
||||
''
|
||||
+ toIni (
|
||||
{
|
||||
general = {
|
||||
accounts = lib.concatMapStringsSep "," (a: a.name) accounts;
|
||||
pythonfile = "${config.xdg.configHome}/offlineimap/get_settings.py";
|
||||
metadata = "${config.xdg.dataHome}/offlineimap";
|
||||
}
|
||||
// lib.optionalAttrs (cfg.extraConfig.mbnames != { }) {
|
||||
mbnames = {
|
||||
enabled = true;
|
||||
} // cfg.extraConfig.mbnames;
|
||||
// cfg.extraConfig.general;
|
||||
}
|
||||
// lib.optionalAttrs (cfg.extraConfig.mbnames != { }) {
|
||||
mbnames = {
|
||||
enabled = true;
|
||||
}
|
||||
// lib.optionalAttrs (cfg.extraConfig.default != { }) {
|
||||
DEFAULT = cfg.extraConfig.default;
|
||||
}
|
||||
)
|
||||
+ "\n"
|
||||
+ lib.concatStringsSep "\n" (map accountStr accounts);
|
||||
// cfg.extraConfig.mbnames;
|
||||
}
|
||||
// lib.optionalAttrs (cfg.extraConfig.default != { }) {
|
||||
DEFAULT = cfg.extraConfig.default;
|
||||
}
|
||||
)
|
||||
+ "\n"
|
||||
+ lib.concatStringsSep "\n" (map accountStr accounts);
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -176,10 +176,11 @@ in
|
|||
let
|
||||
resolvedExtraLuaPackages = cfg.extraLuaPackages pkgs.lua54Packages;
|
||||
|
||||
pathPackages =
|
||||
[ cfg.package ]
|
||||
++ cfg.extraPackages
|
||||
++ lib.optional (cfg.configType == "lua" && cfg.luaPackage != null) cfg.luaPackage;
|
||||
pathPackages = [
|
||||
cfg.package
|
||||
]
|
||||
++ cfg.extraPackages
|
||||
++ lib.optional (cfg.configType == "lua" && cfg.luaPackage != null) cfg.luaPackage;
|
||||
|
||||
luaPaths = lib.filter (x: x != "") [
|
||||
(lib.optionalString (cfg.configType == "lua" && resolvedExtraLuaPackages != [ ]) (
|
||||
|
|
|
|||
|
|
@ -135,20 +135,19 @@ in
|
|||
{ home.packages = lib.mkIf (cfg.package != null) [ cfg.package ]; }
|
||||
|
||||
(lib.mkIf pkgs.stdenv.hostPlatform.isLinux {
|
||||
xdg.configFile =
|
||||
{
|
||||
"streamlink/config" = lib.mkIf (cfg.settings != { }) {
|
||||
text = renderSettings cfg.settings;
|
||||
};
|
||||
}
|
||||
// (lib.mapAttrs' (
|
||||
name: value:
|
||||
lib.nameValuePair "streamlink/config.${name}" (
|
||||
lib.mkIf (value.settings != { }) {
|
||||
text = renderSettings value.settings;
|
||||
}
|
||||
)
|
||||
) cfg.plugins);
|
||||
xdg.configFile = {
|
||||
"streamlink/config" = lib.mkIf (cfg.settings != { }) {
|
||||
text = renderSettings cfg.settings;
|
||||
};
|
||||
}
|
||||
// (lib.mapAttrs' (
|
||||
name: value:
|
||||
lib.nameValuePair "streamlink/config.${name}" (
|
||||
lib.mkIf (value.settings != { }) {
|
||||
text = renderSettings value.settings;
|
||||
}
|
||||
)
|
||||
) cfg.plugins);
|
||||
|
||||
xdg.dataFile = lib.mapAttrs' (
|
||||
name: value:
|
||||
|
|
@ -168,35 +167,34 @@ in
|
|||
})
|
||||
|
||||
(lib.mkIf pkgs.stdenv.hostPlatform.isDarwin {
|
||||
home.file =
|
||||
{
|
||||
"Library/Application Support/streamlink/config" = lib.mkIf (cfg.settings != { }) {
|
||||
text = renderSettings cfg.settings;
|
||||
};
|
||||
}
|
||||
// (lib.mapAttrs' (
|
||||
name: value:
|
||||
lib.nameValuePair "Library/Application Support/streamlink/config.${name}" (
|
||||
lib.mkIf (value.settings != { }) {
|
||||
text = renderSettings value.settings;
|
||||
}
|
||||
home.file = {
|
||||
"Library/Application Support/streamlink/config" = lib.mkIf (cfg.settings != { }) {
|
||||
text = renderSettings cfg.settings;
|
||||
};
|
||||
}
|
||||
// (lib.mapAttrs' (
|
||||
name: value:
|
||||
lib.nameValuePair "Library/Application Support/streamlink/config.${name}" (
|
||||
lib.mkIf (value.settings != { }) {
|
||||
text = renderSettings value.settings;
|
||||
}
|
||||
)
|
||||
) cfg.plugins)
|
||||
// (lib.mapAttrs' (
|
||||
name: value:
|
||||
lib.nameValuePair "Library/Application Support/streamlink/plugins/${name}.py" (
|
||||
lib.mkIf (value.src != null) (
|
||||
if (builtins.isPath value.src) then
|
||||
{
|
||||
source = value.src;
|
||||
}
|
||||
else
|
||||
{
|
||||
text = value.src;
|
||||
}
|
||||
)
|
||||
) cfg.plugins)
|
||||
// (lib.mapAttrs' (
|
||||
name: value:
|
||||
lib.nameValuePair "Library/Application Support/streamlink/plugins/${name}.py" (
|
||||
lib.mkIf (value.src != null) (
|
||||
if (builtins.isPath value.src) then
|
||||
{
|
||||
source = value.src;
|
||||
}
|
||||
else
|
||||
{
|
||||
text = value.src;
|
||||
}
|
||||
)
|
||||
)
|
||||
) cfg.plugins);
|
||||
)
|
||||
) cfg.plugins);
|
||||
})
|
||||
]
|
||||
);
|
||||
|
|
|
|||
|
|
@ -54,13 +54,12 @@ let
|
|||
profilesIni =
|
||||
lib.foldl lib.recursiveUpdate
|
||||
{
|
||||
General =
|
||||
{
|
||||
StartWithLastProfile = 1;
|
||||
}
|
||||
// lib.optionalAttrs (cfg.profileVersion != null) {
|
||||
Version = cfg.profileVersion;
|
||||
};
|
||||
General = {
|
||||
StartWithLastProfile = 1;
|
||||
}
|
||||
// lib.optionalAttrs (cfg.profileVersion != null) {
|
||||
Version = cfg.profileVersion;
|
||||
};
|
||||
}
|
||||
(
|
||||
lib.flip map profilesWithId (profile: {
|
||||
|
|
@ -882,11 +881,13 @@ in
|
|||
|
||||
home.packages = [
|
||||
cfg.package
|
||||
] ++ lib.optional (lib.any (p: p.withExternalGnupg) (attrValues cfg.profiles)) pkgs.gpgme;
|
||||
]
|
||||
++ lib.optional (lib.any (p: p.withExternalGnupg) (attrValues cfg.profiles)) pkgs.gpgme;
|
||||
|
||||
mozilla.thunderbirdNativeMessagingHosts = [
|
||||
cfg.package # package configured native messaging hosts (entire mail app actually)
|
||||
] ++ cfg.nativeMessagingHosts; # user configured native messaging hosts
|
||||
]
|
||||
++ cfg.nativeMessagingHosts; # user configured native messaging hosts
|
||||
|
||||
home.file = lib.mkMerge (
|
||||
[
|
||||
|
|
|
|||
|
|
@ -357,10 +357,11 @@ in
|
|||
config = lib.mkIf cfg.enable (
|
||||
lib.mkMerge [
|
||||
{
|
||||
home.packages =
|
||||
[ cfg.package ]
|
||||
++ lib.optional cfg.tmuxinator.enable pkgs.tmuxinator
|
||||
++ lib.optional cfg.tmuxp.enable pkgs.tmuxp;
|
||||
home.packages = [
|
||||
cfg.package
|
||||
]
|
||||
++ lib.optional cfg.tmuxinator.enable pkgs.tmuxinator
|
||||
++ lib.optional cfg.tmuxp.enable pkgs.tmuxp;
|
||||
}
|
||||
|
||||
{ xdg.configFile."tmux/tmux.conf".text = lib.mkBefore tmuxConf; }
|
||||
|
|
|
|||
|
|
@ -142,27 +142,26 @@ in
|
|||
config = lib.mkIf cfg.enable {
|
||||
home.packages = [ cfg.package ];
|
||||
|
||||
xresources.properties =
|
||||
{
|
||||
"URxvt.scrollBar" = cfg.scroll.bar.enable;
|
||||
"URxvt.scrollstyle" = cfg.scroll.bar.style;
|
||||
"URxvt.scrollBar_align" = cfg.scroll.bar.align;
|
||||
"URxvt.scrollBar_right" = cfg.scroll.bar.position == "right";
|
||||
"URxvt.scrollBar_floating" = cfg.scroll.bar.floating;
|
||||
"URxvt.saveLines" = cfg.scroll.lines;
|
||||
"URxvt.scrollWithBuffer" = cfg.scroll.keepPosition;
|
||||
"URxvt.scrollTtyKeypress" = cfg.scroll.scrollOnKeystroke;
|
||||
"URxvt.scrollTtyOutput" = cfg.scroll.scrollOnOutput;
|
||||
"URxvt.transparent" = cfg.transparent;
|
||||
"URxvt.shading" = cfg.shading;
|
||||
"URxvt.iso14755" = cfg.iso14755;
|
||||
}
|
||||
// lib.flip lib.mapAttrs' cfg.keybindings (
|
||||
kb: action: lib.nameValuePair "URxvt.keysym.${kb}" action
|
||||
)
|
||||
// lib.optionalAttrs (cfg.fonts != [ ]) {
|
||||
"URxvt.font" = lib.concatStringsSep "," cfg.fonts;
|
||||
}
|
||||
// lib.flip lib.mapAttrs' cfg.extraConfig (k: v: lib.nameValuePair "URxvt.${k}" v);
|
||||
xresources.properties = {
|
||||
"URxvt.scrollBar" = cfg.scroll.bar.enable;
|
||||
"URxvt.scrollstyle" = cfg.scroll.bar.style;
|
||||
"URxvt.scrollBar_align" = cfg.scroll.bar.align;
|
||||
"URxvt.scrollBar_right" = cfg.scroll.bar.position == "right";
|
||||
"URxvt.scrollBar_floating" = cfg.scroll.bar.floating;
|
||||
"URxvt.saveLines" = cfg.scroll.lines;
|
||||
"URxvt.scrollWithBuffer" = cfg.scroll.keepPosition;
|
||||
"URxvt.scrollTtyKeypress" = cfg.scroll.scrollOnKeystroke;
|
||||
"URxvt.scrollTtyOutput" = cfg.scroll.scrollOnOutput;
|
||||
"URxvt.transparent" = cfg.transparent;
|
||||
"URxvt.shading" = cfg.shading;
|
||||
"URxvt.iso14755" = cfg.iso14755;
|
||||
}
|
||||
// lib.flip lib.mapAttrs' cfg.keybindings (
|
||||
kb: action: lib.nameValuePair "URxvt.keysym.${kb}" action
|
||||
)
|
||||
// lib.optionalAttrs (cfg.fonts != [ ]) {
|
||||
"URxvt.font" = lib.concatStringsSep "," cfg.fonts;
|
||||
}
|
||||
// lib.flip lib.mapAttrs' cfg.extraConfig (k: v: lib.nameValuePair "URxvt.${k}" v);
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -259,20 +259,20 @@ let
|
|||
allProfilesExceptDefault = removeAttrs cfg.profiles [ "default" ];
|
||||
in
|
||||
{
|
||||
imports =
|
||||
[
|
||||
./haskell.nix
|
||||
(lib.mkChangedOptionModule
|
||||
[
|
||||
"programs"
|
||||
"vscode"
|
||||
"immutableExtensionsDir"
|
||||
]
|
||||
[ "programs" "vscode" "mutableExtensionsDir" ]
|
||||
(config: !config.programs.vscode.immutableExtensionsDir)
|
||||
)
|
||||
]
|
||||
++ map
|
||||
imports = [
|
||||
./haskell.nix
|
||||
(lib.mkChangedOptionModule
|
||||
[
|
||||
"programs"
|
||||
"vscode"
|
||||
"immutableExtensionsDir"
|
||||
]
|
||||
[ "programs" "vscode" "mutableExtensionsDir" ]
|
||||
(config: !config.programs.vscode.immutableExtensionsDir)
|
||||
)
|
||||
]
|
||||
++
|
||||
map
|
||||
(
|
||||
v:
|
||||
lib.mkRenamedOptionModule
|
||||
|
|
|
|||
|
|
@ -62,6 +62,7 @@ in
|
|||
|
||||
programs.vscode.profiles.default.extensions = [
|
||||
pkgs.vscode-extensions.justusadam.language-haskell
|
||||
] ++ lib.optional cfg.hie.enable pkgs.vscode-extensions.alanz.vscode-hie-server;
|
||||
]
|
||||
++ lib.optional cfg.hie.enable pkgs.vscode-extensions.alanz.vscode-hie-server;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -227,34 +227,33 @@ in
|
|||
nushell.extraConfig = mkIf cfg.enableNushellIntegration nushellIntegration;
|
||||
};
|
||||
|
||||
xdg.configFile =
|
||||
{
|
||||
"yazi/keymap.toml" = mkIf (cfg.keymap != { }) {
|
||||
source = tomlFormat.generate "yazi-keymap" cfg.keymap;
|
||||
};
|
||||
"yazi/yazi.toml" = mkIf (cfg.settings != { }) {
|
||||
source = tomlFormat.generate "yazi-settings" cfg.settings;
|
||||
};
|
||||
"yazi/theme.toml" = mkIf (cfg.theme != { }) {
|
||||
source = tomlFormat.generate "yazi-theme" cfg.theme;
|
||||
};
|
||||
"yazi/init.lua" = mkIf (cfg.initLua != null) (
|
||||
if builtins.isPath cfg.initLua then
|
||||
{
|
||||
source = cfg.initLua;
|
||||
}
|
||||
else
|
||||
{
|
||||
text = cfg.initLua;
|
||||
}
|
||||
);
|
||||
}
|
||||
// (lib.mapAttrs' (
|
||||
name: value: lib.nameValuePair "yazi/flavors/${name}.yazi" { source = value; }
|
||||
) cfg.flavors)
|
||||
// (lib.mapAttrs' (
|
||||
name: value: lib.nameValuePair "yazi/plugins/${name}.yazi" { source = value; }
|
||||
) cfg.plugins);
|
||||
xdg.configFile = {
|
||||
"yazi/keymap.toml" = mkIf (cfg.keymap != { }) {
|
||||
source = tomlFormat.generate "yazi-keymap" cfg.keymap;
|
||||
};
|
||||
"yazi/yazi.toml" = mkIf (cfg.settings != { }) {
|
||||
source = tomlFormat.generate "yazi-settings" cfg.settings;
|
||||
};
|
||||
"yazi/theme.toml" = mkIf (cfg.theme != { }) {
|
||||
source = tomlFormat.generate "yazi-theme" cfg.theme;
|
||||
};
|
||||
"yazi/init.lua" = mkIf (cfg.initLua != null) (
|
||||
if builtins.isPath cfg.initLua then
|
||||
{
|
||||
source = cfg.initLua;
|
||||
}
|
||||
else
|
||||
{
|
||||
text = cfg.initLua;
|
||||
}
|
||||
);
|
||||
}
|
||||
// (lib.mapAttrs' (
|
||||
name: value: lib.nameValuePair "yazi/flavors/${name}.yazi" { source = value; }
|
||||
) cfg.flavors)
|
||||
// (lib.mapAttrs' (
|
||||
name: value: lib.nameValuePair "yazi/plugins/${name}.yazi" { source = value; }
|
||||
) cfg.plugins);
|
||||
|
||||
warnings = lib.filter (s: s != "") (
|
||||
lib.concatLists [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue