Compare commits
122 Commits
5521fe73d5
...
93dffde13b
Author | SHA1 | Date |
---|---|---|
Katharina Fey | 93dffde13b | 2 years ago |
Robert Helgesson | 778af87a98 | 2 years ago |
afreakk | 223a73c2ba | 2 years ago |
Frankie McEyes | 09f3e67950 | 2 years ago |
Weblate | 5997c43458 | 2 years ago |
Artin Mobasher | 845aaaf4db | 2 years ago |
Nathan Typanski | 6f025b3825 | 2 years ago |
Robert Helgesson | 65a32578d9 | 2 years ago |
Sandro | 93a69d0738 | 2 years ago |
polykernel | 8ec13d33b1 | 2 years ago |
Robert Helgesson | 8d38ca8868 | 2 years ago |
Roberto Di Remigio | 742c6cb3e9 | 2 years ago |
ilkecan | c2726860a2 | 2 years ago |
Luc Chabassier | 5ac84ebeef | 2 years ago |
Nicolas Berbiche | f47001cec9 | 2 years ago |
Curtis Jiang | bb860e3e11 | 2 years ago |
Jia Xiaodong | c82b8ac5ad | 2 years ago |
Sam Willcocks | 620ed197f3 | 2 years ago |
Michael Hoang | 8ab155c61f | 2 years ago |
Sumner Evans | 2e473a7b09 | 2 years ago |
Infinidoge | 0586d2d42a | 2 years ago |
Daniel Thwaites | a640dddc9a | 2 years ago |
Thiago Kenji Okada | 7add9ce2e5 | 2 years ago |
Kat Inskip | d49d68f419 | 2 years ago |
dependabot[bot] | 92f58b6728 | 2 years ago |
Tanish2002 | 7da4e6680f | 2 years ago |
florpe | e39a9d0103 | 2 years ago |
Sumner Evans | f911ebbec9 | 2 years ago |
Robert Helgesson | 55779b20cd | 2 years ago |
Robert Helgesson | 47b3719f51 | 2 years ago |
Alex Miranda | 8a046f36eb | 2 years ago |
Daniel Nagy | 3071ea205d | 2 years ago |
x10an14 | e361373b5f | 2 years ago |
Robert Helgesson | 3604a20b67 | 2 years ago |
André Silva | 66ffa7a0a6 | 2 years ago |
Ilan Joselevich | 07b941f0c4 | 2 years ago |
Naïm Favier | 399a3dfeaf | 2 years ago |
Radosław Szamszur | a985e711e8 | 2 years ago |
ilkecan | 3549f5d0f5 | 2 years ago |
Roch D'Amour | 0382c5f75e | 2 years ago |
Otavio Salvador | cfab869fce | 2 years ago |
pogobanane | 38156bd4ed | 2 years ago |
toonn | e1fab012e8 | 2 years ago |
toonn | cf62e96bf7 | 2 years ago |
Mario Rodas | 9580f6c42a | 2 years ago |
Naïm Favier | 8db712a6a2 | 2 years ago |
Oğuz Ersen | f5a44afa19 | 2 years ago |
Robert Helgesson | 80583677e7 | 2 years ago |
Hosted Weblate | c607ae8671 | 2 years ago |
Robert Helgesson | 888eac32bd | 2 years ago |
Yevhen Shymotiuk | d123fca83c | 2 years ago |
lucasew | 0520e387dc | 2 years ago |
Sandro | b23bb05890 | 2 years ago |
Moises Nessim | 2f58d0a3de | 2 years ago |
Robert Helgesson | 171702dd88 | 2 years ago |
Farseen | 8afee75d0d | 2 years ago |
Robert Helgesson | ac94041153 | 2 years ago |
Robert Helgesson | b030278dc6 | 2 years ago |
Robert Helgesson | 9970d23218 | 2 years ago |
Robert Helgesson | 70c4696619 | 2 years ago |
Naïm Favier | e2ebc3a3af | 2 years ago |
Naïm Favier | 0cf9dadf5b | 2 years ago |
Manu [tennox] | 6c730bc054 | 2 years ago |
stephaneyfx | 48a1584d8b | 2 years ago |
Basti | 80b4360678 | 2 years ago |
Nazarii Bardiuk | bbc5e0c1e1 | 2 years ago |
Basti | 64823066c2 | 2 years ago |
polykernel | 835797f3a4 | 2 years ago |
polykernel | 46dc2e5d9f | 2 years ago |
Naïm Favier | 57476b5d28 | 2 years ago |
Sumner Evans | 0fad959df8 | 2 years ago |
Leon Vack | e96fc6d8f9 | 2 years ago |
mihnea-s | 7cf15b19a9 | 2 years ago |
Naïm Favier | e2a85ac43f | 2 years ago |
polykernel | 32e433d07d | 2 years ago |
Sumner Evans | 590da80ceb | 2 years ago |
Naïm Favier | a4b0a3faa4 | 2 years ago |
polykernel | e01facc340 | 2 years ago |
Kylie McClain | 970b57fd3c | 2 years ago |
Robert Helgesson | 8eb7c009f0 | 2 years ago |
NomisIV | 472e67d1bb | 2 years ago |
iosmanthus | 8bdfa41b4e | 2 years ago |
Karl Hallsby | da92196a95 | 2 years ago |
ReplayCoding | 5d4327cff4 | 2 years ago |
Robert Helgesson | da1f6fab90 | 2 years ago |
dependabot[bot] | e6e19ea5a8 | 2 years ago |
Loïc Reynier | afe96e7433 | 2 years ago |
Doğu Us | abd221c4b3 | 2 years ago |
Anon Ymous | 4e6856397e | 2 years ago |
maximsmol | 87beebc7a2 | 2 years ago |
Yt | d119cea376 | 2 years ago |
Robert Helgesson | 541874f55d | 2 years ago |
Sebastian Sellmeier | e58a7cb13d | 2 years ago |
sudosubin | ea85f4b1fd | 2 years ago |
Robert Helgesson | 2499b91692 | 2 years ago |
kmaasrud | 1d90b6065a | 2 years ago |
midchildan | ccd00e3c93 | 2 years ago |
midchildan | c7a13f76a7 | 2 years ago |
Frank Moda | 662350bee2 | 2 years ago |
Markus Wamser | 650cfe60f3 | 2 years ago |
Mifom | 8f7d925503 | 2 years ago |
Mikhail Chekan | 1faefcded3 | 2 years ago |
Weblate | 2248ea1831 | 2 years ago |
Marco Turchetto | 1950eb878b | 2 years ago |
Selene Hines | 0b1745b4ef | 2 years ago |
Josh Holland | 838d40d61a | 2 years ago |
NomisIV | 69536af27e | 2 years ago |
Thiago Kenji Okada | b3af91d293 | 2 years ago |
Mario Rodas | 0232fe1b75 | 2 years ago |
lucasew | 4f4165a8b9 | 2 years ago |
Daniel Siepmann | 5b208b42b2 | 2 years ago |
Riley Inman | c859a5265a | 2 years ago |
Caleb Chase | 30082a623a | 2 years ago |
Robert Helgesson | 5375afb2fb | 2 years ago |
mainrs | 498c188e62 | 2 years ago |
Jian Lin | 2116fe6b50 | 2 years ago |
mainrs | 810e5f3613 | 2 years ago |
teu5us | 2a7e247202 | 2 years ago |
Artem Shinkarov | a3c18a60d5 | 2 years ago |
Shamrock Lee | 50204cea94 | 2 years ago |
Shamrock Lee | 23a9f9127c | 2 years ago |
Shamrock Lee | 03b7495183 | 2 years ago |
@ -0,0 +1,169 @@ |
||||
# SOME DESCRIPTIVE TITLE. |
||||
# Copyright (C) YEAR Home Manager contributors |
||||
# This file is distributed under the same license as the Home Manager package. |
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. |
||||
# |
||||
msgid "" |
||||
msgstr "" |
||||
"Project-Id-Version: Home Manager\n" |
||||
"Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n" |
||||
"POT-Creation-Date: 2022-03-26 15:08+0100\n" |
||||
"PO-Revision-Date: 2022-04-09 18:11+0000\n" |
||||
"Last-Translator: Artin Mobasher <mobasherartin.icm@gmail.com>\n" |
||||
"Language-Team: Persian <https://hosted.weblate.org/projects/home-manager/cli/" |
||||
"fa/>\n" |
||||
"Language: fa\n" |
||||
"MIME-Version: 1.0\n" |
||||
"Content-Type: text/plain; charset=UTF-8\n" |
||||
"Content-Transfer-Encoding: 8bit\n" |
||||
"Plural-Forms: nplurals=2; plural=n > 1;\n" |
||||
"X-Generator: Weblate 4.12-dev\n" |
||||
|
||||
#: home-manager/home-manager:60 |
||||
msgid "No configuration file found at %s" |
||||
msgstr "هیچ فایل تنظیماتی در %s پیدا نشد" |
||||
|
||||
#: home-manager/home-manager:79 |
||||
msgid "No configuration file found. Please create one at %s" |
||||
msgstr "هیچ فایل تنظیماتی پیدا نشد. لطفا یک فایل در %s بسازید" |
||||
|
||||
#: home-manager/home-manager:122 |
||||
msgid "Can't inspect options of a flake configuration" |
||||
msgstr "" |
||||
|
||||
#: home-manager/home-manager:162 |
||||
msgid "Can't instantiate a flake configuration" |
||||
msgstr "" |
||||
|
||||
#: home-manager/home-manager:237 |
||||
msgid "" |
||||
"There is %d unread and relevant news item.\n" |
||||
"Read it by running the command \"%s news\"." |
||||
msgid_plural "" |
||||
"There are %d unread and relevant news items.\n" |
||||
"Read them by running the command \"%s news\"." |
||||
msgstr[0] "" |
||||
msgstr[1] "" |
||||
|
||||
#: home-manager/home-manager:251 |
||||
msgid "Unknown \"news.display\" setting \"%s\"." |
||||
msgstr "" |
||||
|
||||
#: home-manager/home-manager:258 |
||||
#, sh-format |
||||
msgid "Please set the $EDITOR environment variable" |
||||
msgstr "" |
||||
|
||||
#: home-manager/home-manager:273 |
||||
msgid "Cannot run build in read-only directory" |
||||
msgstr "" |
||||
|
||||
#: home-manager/home-manager:355 |
||||
msgid "No generation with ID %s" |
||||
msgstr "" |
||||
|
||||
#: home-manager/home-manager:357 |
||||
msgid "Cannot remove the current generation %s" |
||||
msgstr "" |
||||
|
||||
#: home-manager/home-manager:359 |
||||
msgid "Removing generation %s" |
||||
msgstr "" |
||||
|
||||
#: home-manager/home-manager:385 |
||||
msgid "No generations to expire" |
||||
msgstr "" |
||||
|
||||
#: home-manager/home-manager:396 |
||||
msgid "No home-manager packages seem to be installed." |
||||
msgstr "" |
||||
|
||||
#: home-manager/home-manager:453 |
||||
msgid "Unknown argument %s" |
||||
msgstr "" |
||||
|
||||
#: home-manager/home-manager:469 |
||||
msgid "This will remove Home Manager from your system." |
||||
msgstr "" |
||||
|
||||
#: home-manager/home-manager:472 |
||||
msgid "This is a dry run, nothing will actually be uninstalled." |
||||
msgstr "" |
||||
|
||||
#: home-manager/home-manager:476 |
||||
msgid "Really uninstall Home Manager?" |
||||
msgstr "" |
||||
|
||||
#: home-manager/home-manager:481 |
||||
msgid "Switching to empty Home Manager configuration..." |
||||
msgstr "" |
||||
|
||||
#: home-manager/home-manager:493 |
||||
#, fuzzy |
||||
msgid "Yay!" |
||||
msgstr "آره!" |
||||
|
||||
#: home-manager/home-manager:500 |
||||
msgid "Remove all Home Manager generations?" |
||||
msgstr "" |
||||
|
||||
#: home-manager/home-manager:507 |
||||
msgid "All generations are now eligible for garbage collection." |
||||
msgstr "" |
||||
|
||||
#: home-manager/home-manager:510 |
||||
msgid "Leaving generations but they may still be garbage collected." |
||||
msgstr "" |
||||
|
||||
#: home-manager/home-manager:514 |
||||
msgid "Home Manager is uninstalled but your home.nix is left untouched." |
||||
msgstr "" |
||||
|
||||
#: home-manager/home-manager:673 |
||||
msgid "%s: unknown option '%s'" |
||||
msgstr "" |
||||
|
||||
#: home-manager/home-manager:674 |
||||
msgid "Run '%s --help' for usage help" |
||||
msgstr "" |
||||
|
||||
#: home-manager/home-manager:708 |
||||
msgid "expire-generations expects one argument, got %d." |
||||
msgstr "" |
||||
|
||||
#: home-manager/home-manager:730 |
||||
msgid "Unknown command: %s" |
||||
msgstr "دستور ناشناخته: %s" |
||||
|
||||
#: home-manager/install.nix:22 |
||||
msgid "Creating initial Home Manager configuration..." |
||||
msgstr "ایجاد تنظیمات اولیه Home-Manager..." |
||||
|
||||
#: home-manager/install.nix:66 |
||||
msgid "Creating initial Home Manager generation..." |
||||
msgstr "" |
||||
|
||||
#. translators: The "%s" specifier will be replaced by a file path. |
||||
#: home-manager/install.nix:71 |
||||
msgid "" |
||||
"All done! The home-manager tool should now be installed and you can edit\n" |
||||
"\n" |
||||
" %s\n" |
||||
"\n" |
||||
"to configure Home Manager. Run 'man home-configuration.nix' to\n" |
||||
"see all available options." |
||||
msgstr "" |
||||
|
||||
#. translators: The "%s" specifier will be replaced by a URL. |
||||
#: home-manager/install.nix:76 |
||||
msgid "" |
||||
"Uh oh, the installation failed! Please create an issue at\n" |
||||
"\n" |
||||
" %s\n" |
||||
"\n" |
||||
"if the error seems to be the fault of Home Manager." |
||||
msgstr "" |
||||
|
||||
#: home-manager/install.nix:83 |
||||
msgid "This derivation is not buildable, please run it using nix-shell." |
||||
msgstr "" |
@ -0,0 +1,185 @@ |
||||
# SOME DESCRIPTIVE TITLE. |
||||
# Copyright (C) YEAR Home Manager contributors |
||||
# This file is distributed under the same license as the Home Manager package. |
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. |
||||
# |
||||
msgid "" |
||||
msgstr "" |
||||
"Project-Id-Version: Home Manager\n" |
||||
"Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n" |
||||
"POT-Creation-Date: 2022-03-26 15:08+0100\n" |
||||
"PO-Revision-Date: 2022-04-20 18:18+0000\n" |
||||
"Last-Translator: Frankie McEyes <mceyes@protonmail.com>\n" |
||||
"Language-Team: Italian <https://hosted.weblate.org/projects/home-manager/cli/" |
||||
"it/>\n" |
||||
"Language: it\n" |
||||
"MIME-Version: 1.0\n" |
||||
"Content-Type: text/plain; charset=UTF-8\n" |
||||
"Content-Transfer-Encoding: 8bit\n" |
||||
"Plural-Forms: nplurals=2; plural=n != 1;\n" |
||||
"X-Generator: Weblate 4.12-dev\n" |
||||
|
||||
#: home-manager/home-manager:60 |
||||
msgid "No configuration file found at %s" |
||||
msgstr "Nessun file di configurazione trovato in %s" |
||||
|
||||
#: home-manager/home-manager:79 |
||||
msgid "No configuration file found. Please create one at %s" |
||||
msgstr "Nessun file di configurazione trovato. Per favore crearne uno in %s" |
||||
|
||||
#: home-manager/home-manager:122 |
||||
msgid "Can't inspect options of a flake configuration" |
||||
msgstr "Impossibile ispezionare le opzioni di configurazione flake" |
||||
|
||||
#: home-manager/home-manager:162 |
||||
msgid "Can't instantiate a flake configuration" |
||||
msgstr "Impossibile istanziare una configurazione flake" |
||||
|
||||
#: home-manager/home-manager:237 |
||||
msgid "" |
||||
"There is %d unread and relevant news item.\n" |
||||
"Read it by running the command \"%s news\"." |
||||
msgid_plural "" |
||||
"There are %d unread and relevant news items.\n" |
||||
"Read them by running the command \"%s news\"." |
||||
msgstr[0] "" |
||||
"C'è %d novità di elementi non letta.\n" |
||||
"Leggila con il comando \"%s news\"." |
||||
msgstr[1] "" |
||||
"Ci sono %d novità di elementi non letti\n" |
||||
"Leggile con il comando \"%s news\"." |
||||
|
||||
#: home-manager/home-manager:251 |
||||
msgid "Unknown \"news.display\" setting \"%s\"." |
||||
msgstr "Opzione \"news.display\" sconosciuta \"%s\"." |
||||
|
||||
#: home-manager/home-manager:258 |
||||
#, sh-format |
||||
msgid "Please set the $EDITOR environment variable" |
||||
msgstr "Per favore impostare la variabile d'ambient $EDITOR" |
||||
|
||||
#: home-manager/home-manager:273 |
||||
msgid "Cannot run build in read-only directory" |
||||
msgstr "Impossibile eseguire la build in una cartella in sola lettura" |
||||
|
||||
#: home-manager/home-manager:355 |
||||
msgid "No generation with ID %s" |
||||
msgstr "Nessuna generazione con ID %s" |
||||
|
||||
#: home-manager/home-manager:357 |
||||
msgid "Cannot remove the current generation %s" |
||||
msgstr "Impossibile rimuovere la generazione corrente %s" |
||||
|
||||
#: home-manager/home-manager:359 |
||||
msgid "Removing generation %s" |
||||
msgstr "Rimuovo la generazione %s" |
||||
|
||||
#: home-manager/home-manager:385 |
||||
msgid "No generations to expire" |
||||
msgstr "Nessuna generazione in scadenza" |
||||
|
||||
#: home-manager/home-manager:396 |
||||
msgid "No home-manager packages seem to be installed." |
||||
msgstr "Nessun pacchetto home-manager sembra essere installato." |
||||
|
||||
#: home-manager/home-manager:453 |
||||
msgid "Unknown argument %s" |
||||
msgstr "Argomento sconosciuto: %s" |
||||
|
||||
#: home-manager/home-manager:469 |
||||
msgid "This will remove Home Manager from your system." |
||||
msgstr "Questo rimuoverà Home Manger dal tuo sistema." |
||||
|
||||
#: home-manager/home-manager:472 |
||||
msgid "This is a dry run, nothing will actually be uninstalled." |
||||
msgstr "Questo è un avvio a secco, nulla verrà realmente disinstallato." |
||||
|
||||
#: home-manager/home-manager:476 |
||||
msgid "Really uninstall Home Manager?" |
||||
msgstr "Vuoi davvero disinstallare Home Manager?" |
||||
|
||||
#: home-manager/home-manager:481 |
||||
msgid "Switching to empty Home Manager configuration..." |
||||
msgstr "Cambio ad una configurazione Home Manager vuota..." |
||||
|
||||
#: home-manager/home-manager:493 |
||||
msgid "Yay!" |
||||
msgstr "Urrà!" |
||||
|
||||
#: home-manager/home-manager:500 |
||||
msgid "Remove all Home Manager generations?" |
||||
msgstr "Rimuovere tutte le generazioni Home Manager?" |
||||
|
||||
#: home-manager/home-manager:507 |
||||
msgid "All generations are now eligible for garbage collection." |
||||
msgstr "Tutte le generazioni sono ora pronte per essere cestinate." |
||||
|
||||
#: home-manager/home-manager:510 |
||||
msgid "Leaving generations but they may still be garbage collected." |
||||
msgstr "Abbandono le generazioni, ma possono essere ancora cestinate." |
||||
|
||||
#: home-manager/home-manager:514 |
||||
msgid "Home Manager is uninstalled but your home.nix is left untouched." |
||||
msgstr "Home Manager è disinstallato ma la tua home.Nix non è stata toccata." |
||||
|
||||
#: home-manager/home-manager:673 |
||||
msgid "%s: unknown option '%s'" |
||||
msgstr "%s: opzione sconosciuta '%s'" |
||||
|
||||
#: home-manager/home-manager:674 |
||||
msgid "Run '%s --help' for usage help" |
||||
msgstr "Esegui '%s --help' per ottenere aiuto" |
||||
|
||||
#: home-manager/home-manager:708 |
||||
msgid "expire-generations expects one argument, got %d." |
||||
msgstr "expire-generations si aspetta un solo argomento, invece di %d." |
||||
|
||||
#: home-manager/home-manager:730 |
||||
msgid "Unknown command: %s" |
||||
msgstr "Comando sconosciuto: %s" |
||||
|
||||
#: home-manager/install.nix:22 |
||||
msgid "Creating initial Home Manager configuration..." |
||||
msgstr "Creando la configurazione iniziale di Home Manager..." |
||||
|
||||
#: home-manager/install.nix:66 |
||||
msgid "Creating initial Home Manager generation..." |
||||
msgstr "Creando la generazione iniziale di Home Manager..." |
||||
|
||||
#. translators: The "%s" specifier will be replaced by a file path. |
||||
#: home-manager/install.nix:71 |
||||
msgid "" |
||||
"All done! The home-manager tool should now be installed and you can edit\n" |
||||
"\n" |
||||
" %s\n" |
||||
"\n" |
||||
"to configure Home Manager. Run 'man home-configuration.nix' to\n" |
||||
"see all available options." |
||||
msgstr "" |
||||
"Tutto fatto! Home-manager dovrebbe essere installato e puoi modificare\n" |
||||
"\n" |
||||
"%s\n" |
||||
"\n" |
||||
"per configurare Home Manager. Esegui 'man home-configurazion.nix' per\n" |
||||
"consultare tutte le opzioni disponibili." |
||||
|
||||
#. translators: The "%s" specifier will be replaced by a URL. |
||||
#: home-manager/install.nix:76 |
||||
msgid "" |
||||
"Uh oh, the installation failed! Please create an issue at\n" |
||||
"\n" |
||||
" %s\n" |
||||
"\n" |
||||
"if the error seems to be the fault of Home Manager." |
||||
msgstr "" |
||||
"Oh no, l'installazione non è andata a buon fine! Per favore aprire un ticket " |
||||
"issue a\n" |
||||
"\n" |
||||
"%s\n" |
||||
"\n" |
||||
"se l'errore sembra essere causato da Home Manager." |
||||
|
||||
#: home-manager/install.nix:83 |
||||
msgid "This derivation is not buildable, please run it using nix-shell." |
||||
msgstr "" |
||||
"Questa derivazione non è compilabile, prova ad eseguila usando nix-shell." |
@ -0,0 +1,213 @@ |
||||
{ config, lib, pkgs, ... }: |
||||
|
||||
with lib; |
||||
|
||||
let |
||||
inherit (pkgs.stdenv.hostPlatform) isDarwin; |
||||
inherit (lib.generators) toPlist; |
||||
|
||||
cfg = config.launchd; |
||||
labelPrefix = "org.nix-community.home."; |
||||
dstDir = "${config.home.homeDirectory}/Library/LaunchAgents"; |
||||
|
||||
launchdConfig = { config, name, ... }: { |
||||
options = { |
||||
enable = mkEnableOption name; |
||||
config = mkOption { |
||||
type = types.submodule (import ./launchd.nix); |
||||
default = { }; |
||||
example = literalExpression '' |
||||
{ |
||||
ProgramArguments = [ "/usr/bin/say" "Good afternoon" ]; |
||||
StartCalendarInterval = { |
||||
Hour = 12; |
||||
Minute = 0; |
||||
}; |
||||
} |
||||
''; |
||||
description = '' |
||||
Define a launchd job. See <citerefentry> |
||||
<refentrytitle>launchd.plist</refentrytitle><manvolnum>5</manvolnum> |
||||
</citerefentry> for details. |
||||
''; |
||||
}; |
||||
}; |
||||
|
||||
config = { config.Label = mkDefault "${labelPrefix}${name}"; }; |
||||
}; |
||||
|
||||
toAgent = config: pkgs.writeText "${config.Label}.plist" (toPlist { } config); |
||||
|
||||
agentPlists = |
||||
mapAttrs' (n: v: nameValuePair "${v.config.Label}.plist" (toAgent v.config)) |
||||
(filterAttrs (n: v: v.enable) cfg.agents); |
||||
|
||||
agentsDrv = pkgs.runCommand "home-manager-agents" { } '' |
||||
mkdir -p "$out" |
||||
|
||||
declare -A plists |
||||
plists=(${ |
||||
concatStringsSep " " |
||||
(mapAttrsToList (name: value: "['${name}']='${value}'") agentPlists) |
||||
}) |
||||
|
||||
for dest in "''${!plists[@]}"; do |
||||
src="''${plists[$dest]}" |
||||
ln -s "$src" "$out/$dest" |
||||
done |
||||
''; |
||||
in { |
||||
meta.maintainers = with maintainers; [ midchildan ]; |
||||
|
||||
options.launchd = { |
||||
enable = mkOption { |
||||
type = types.bool; |
||||
default = isDarwin; |
||||
defaultText = literalExpression "pkgs.stdenv.hostPlatform.isDarwin"; |
||||
description = '' |
||||
Whether to enable Home Manager to define per-user daemons by making use |
||||
of launchd's LaunchAgents. |
||||
''; |
||||
}; |
||||
|
||||
agents = mkOption { |
||||
type = with types; attrsOf (submodule launchdConfig); |
||||
default = { }; |
||||
description = "Define LaunchAgents."; |
||||
}; |
||||
}; |
||||
|
||||
config = mkMerge [ |
||||
{ |
||||
assertions = [{ |
||||
assertion = (cfg.enable && agentPlists != { }) -> isDarwin; |
||||
message = let names = lib.concatStringsSep ", " (attrNames agentPlists); |
||||
in "Must use Darwin for modules that require Launchd: " + names; |
||||
}]; |
||||
} |
||||
|
||||
(mkIf isDarwin { |
||||
home.extraBuilderCommands = '' |
||||
ln -s "${agentsDrv}" $out/LaunchAgents |
||||
''; |
||||
|
||||
home.activation.checkLaunchAgents = |
||||
hm.dag.entryBefore [ "writeBoundary" ] '' |
||||
checkLaunchAgents() { |
||||
local oldDir newDir dstDir err |
||||
oldDir="" |
||||
err=0 |
||||
if [[ -n "''${oldGenPath:-}" ]]; then |
||||
oldDir="$(readlink -m "$oldGenPath/LaunchAgents")" || err=$? |
||||
if (( err )); then |
||||
oldDir="" |
||||
fi |
||||
fi |
||||
newDir=${escapeShellArg agentsDrv} |
||||
dstDir=${escapeShellArg dstDir} |
||||
|
||||
local oldSrcPath newSrcPath dstPath agentFile agentName |
||||
|
||||
find -L "$newDir" -maxdepth 1 -name '*.plist' -type f -print0 \ |
||||
| while IFS= read -rd "" newSrcPath; do |
||||
agentFile="''${newSrcPath##*/}" |
||||
agentName="''${agentFile%.plist}" |
||||
dstPath="$dstDir/$agentFile" |
||||
oldSrcPath="$oldDir/$agentFile" |
||||
|
||||
if [[ ! -e "$dstPath" ]]; then |
||||
continue |
||||
fi |
||||
|
||||
if ! cmp --quiet "$oldSrcPath" "$dstPath"; then |
||||
errorEcho "Existing file '$dstPath' is in the way of '$newSrcPath'" |
||||
exit 1 |
||||
fi |
||||
done |
||||
} |
||||
|
||||
checkLaunchAgents |
||||
''; |
||||
|
||||
# NOTE: Launch Agent configurations can't be symlinked from the Nix store |
||||
# because it needs to be owned by the user running it. |
||||
home.activation.setupLaunchAgents = |
||||
hm.dag.entryAfter [ "writeBoundary" ] '' |
||||
setupLaunchAgents() { |
||||
local oldDir newDir dstDir domain err |
||||
oldDir="" |
||||
err=0 |
||||
if [[ -n "''${oldGenPath:-}" ]]; then |
||||
oldDir="$(readlink -m "$oldGenPath/LaunchAgents")" || err=$? |
||||
if (( err )); then |
||||
oldDir="" |
||||
fi |
||||
fi |
||||
newDir="$(readlink -m "$newGenPath/LaunchAgents")" |
||||
dstDir=${escapeShellArg dstDir} |
||||
domain="gui/$UID" |
||||
err=0 |
||||
|
||||
local srcPath dstPath agentFile agentName i bootout_retries |
||||
bootout_retries=10 |
||||
|
||||
find -L "$newDir" -maxdepth 1 -name '*.plist' -type f -print0 \ |
||||
| while IFS= read -rd "" srcPath; do |
||||
agentFile="''${srcPath##*/}" |
||||
agentName="''${agentFile%.plist}" |
||||
dstPath="$dstDir/$agentFile" |
||||
|
||||
if cmp --quiet "$srcPath" "$dstPath"; then |
||||
continue |
||||
fi |
||||
if [[ -f "$dstPath" ]]; then |
||||
for (( i = 0; i < bootout_retries; i++ )); do |
||||
$DRY_RUN_CMD launchctl bootout "$domain/$agentName" || err=$? |
||||
if [[ -v DRY_RUN ]]; then |
||||
break |
||||
fi |
||||
if (( err != 9216 )) && |
||||
! launchctl print "$domain/$agentName" &> /dev/null; then |
||||
break |
||||
fi |
||||
sleep 1 |
||||
done |
||||
if (( i == bootout_retries )); then |
||||
warnEcho "Failed to stop '$domain/$agentName'" |
||||
return 1 |
||||
fi |
||||
fi |
||||
$DRY_RUN_CMD install -Dm444 -T "$srcPath" "$dstPath" |
||||
$DRY_RUN_CMD launchctl bootstrap "$domain" "$dstPath" |
||||
done |
||||
|
||||
if [[ ! -e "$oldDir" ]]; then |
||||
return |
||||
fi |
||||
|
||||
find -L "$oldDir" -maxdepth 1 -name '*.plist' -type f -print0 \ |
||||
| while IFS= read -rd "" srcPath; do |
||||
agentFile="''${srcPath##*/}" |
||||
agentName="''${agentFile%.plist}" |
||||
dstPath="$dstDir/$agentFile" |
||||
if [[ -e "$newDir/$agentFile" ]]; then |
||||
continue |
||||
fi |
||||
|
||||
$DRY_RUN_CMD launchctl bootout "$domain/$agentName" || : |
||||
if [[ ! -e "$dstPath" ]]; then |
||||
continue |
||||
fi |
||||
if ! cmp --quiet "$srcPath" "$dstPath"; then |
||||
warnEcho "Skipping deletion of '$dstPath', since its contents have diverged" |
||||
continue |
||||
fi |
||||
$DRY_RUN_CMD rm -f $VERBOSE_ARG "$dstPath" |
||||
done |
||||
} |
||||
|
||||
setupLaunchAgents |
||||
''; |
||||
}) |
||||
]; |
||||
} |
@ -0,0 +1,869 @@ |
||||
# launchd option type from nix-darwin |
||||
# |
||||
# Original Source: |
||||
# https://github.com/LnL7/nix-darwin/blob/a34dea2/modules/launchd/launchd.nix |
||||
|
||||
# Copyright 2017 Daiderd Jordan |
||||
# |
||||
# Permission is hereby granted, free of charge, to any person obtaining |
||||
# a copy of this software and associated documentation files (the "Software"), |
||||
# to deal in the Software without restriction, including without limitation |
||||
# the rights to use, copy, modify, merge, publish, distribute, sublicense, |
||||
# and/or sell copies of the Software, and to permit persons to whom the |
||||
# Software is furnished to do so, subject to the following conditions: |
||||
# |
||||
# The above copyright notice and this permission notice shall be included |
||||
# in all copies or substantial portions of the Software. |
||||
# |
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
||||
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES |
||||
# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. |
||||
# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, |
||||
# DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, |
||||
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE |
||||
# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
||||
|
||||
{ config, lib, ... }: |
||||
|
||||
with lib; |
||||
|
||||
{ |
||||
options = { |
||||
Label = mkOption { |
||||
type = types.str; |
||||
description = "This required key uniquely identifies the job to launchd."; |
||||
}; |
||||
|
||||
Disabled = mkOption { |
||||
type = types.nullOr types.bool; |
||||
default = null; |
||||
description = '' |
||||
This optional key is used as a hint to <literal>launchctl(1)</literal> that it should not submit this job to launchd when |
||||
loading a job or jobs. The value of this key does NOT reflect the current state of the job on the run-ning running |
||||
ning system. If you wish to know whether a job is loaded in launchd, reading this key from a configura-tion configuration |
||||
tion file yourself is not a sufficient test. You should query launchd for the presence of the job using |
||||
the <literal>launchctl(1)</literal> list subcommand or use the ServiceManagement framework's |
||||
<literal>SMJobCopyDictionary()</literal> method. |
||||
|
||||
Note that as of Mac OS X v10.6, this key's value in a configuration file conveys a default value, which |
||||
is changed with the [-w] option of the <literal>launchctl(1)</literal> load and unload subcommands. These subcommands no |
||||
longer modify the configuration file, so the value displayed in the configuration file is not necessar-ily necessarily |
||||
ily the value that <literal>launchctl(1)</literal> will apply. See <literal>launchctl(1)</literal> for more information. |
||||
|
||||
Please also be mindful that you should only use this key if the provided on-demand and KeepAlive crite-ria criteria |
||||
ria are insufficient to describe the conditions under which your job needs to run. The cost to have a |
||||
job loaded in launchd is negligible, so there is no harm in loading a job which only runs once or very |
||||
rarely. |
||||
''; |
||||
}; |
||||
|
||||
UserName = mkOption { |
||||
type = types.nullOr types.str; |
||||
default = null; |
||||
description = '' |
||||
This optional key specifies the user to run the job as. This key is only applicable when launchd is |
||||
running as root. |
||||
''; |
||||
}; |
||||
|
||||
GroupName = mkOption { |
||||
type = types.nullOr types.str; |
||||
default = null; |
||||
description = '' |
||||
This optional key specifies the group to run the job as. This key is only applicable when launchd is |
||||
running as root. If UserName is set and GroupName is not, the the group will be set to the default |
||||
group of the user. |
||||
''; |
||||
}; |
||||
|
||||
inetdCompatibility = mkOption { |
||||
default = null; |
||||
example = { Wait = true; }; |
||||
description = '' |
||||
The presence of this key specifies that the daemon expects to be run as if it were launched from inetd. |
||||
''; |
||||
type = types.nullOr (types.submodule { |
||||
options = { |
||||
Wait = mkOption { |
||||
type = types.nullOr (types.either types.bool types.str); |
||||
default = null; |
||||
description = '' |
||||
This flag corresponds to the "wait" or "nowait" option of inetd. If true, then the listening |
||||
socket is passed via the standard in/out/error file descriptors. If false, then <literal>accept(2)</literal> is |
||||
called on behalf of the job, and the result is passed via the standard in/out/error descriptors. |
||||
''; |
||||
}; |
||||
}; |
||||
}); |
||||
}; |
||||
|
||||
LimitLoadToHosts = mkOption { |
||||
type = types.nullOr (types.listOf types.str); |
||||
default = null; |
||||
description = '' |
||||
This configuration file only applies to the hosts listed with this key. Note: One should set kern.host-name kern.hostname |
||||
name in <literal>sysctl.conf(5)</literal> for this feature to work reliably. |
||||
''; |
||||
}; |
||||
|
||||
LimitLoadFromHosts = mkOption { |
||||
type = types.nullOr (types.listOf types.str); |
||||
default = null; |
||||
description = '' |
||||
This configuration file only applies to hosts NOT listed with this key. Note: One should set kern.host-name kern.hostname |
||||
name in <literal>sysctl.conf(5)</literal> for this feature to work reliably. |
||||
''; |
||||
}; |
||||
|
||||
LimitLoadToSessionType = mkOption { |
||||
type = types.nullOr types.str; |
||||
default = null; |
||||
description = '' |
||||
This configuration file only applies to sessions of the type specified. This key is used in concert |
||||
with the -S flag to <command>launchctl</command>. |
||||
''; |
||||
}; |
||||
|
||||
Program = mkOption { |
||||
type = types.nullOr types.path; |
||||
default = null; |
||||
description = '' |
||||
This key maps to the first argument of <literal>execvp(3)</literal>. If this key is missing, then the first element of |
||||
the array of strings provided to the ProgramArguments will be used instead. This key is required in |
||||
the absence of the ProgramArguments key. |
||||
''; |
||||
}; |
||||
|
||||
ProgramArguments = mkOption { |
||||
type = types.nullOr (types.listOf types.str); |
||||
default = null; |
||||
description = '' |
||||
This key maps to the second argument of <literal>execvp(3)</literal>. This key is required in the absence of the Program |
||||
key. Please note: many people are confused by this key. Please read <literal>execvp(3)</literal> very carefully! |
||||
''; |
||||
}; |
||||
|
||||
EnableGlobbing = mkOption { |
||||
type = types.nullOr types.bool; |
||||
default = null; |
||||
description = '' |
||||
This flag causes launchd to use the <literal>glob(3)</literal> mechanism to update the program arguments before invoca-tion. invocation. |
||||
tion. |
||||
''; |
||||
}; |
||||
|
||||
EnableTransactions = mkOption { |
||||
type = types.nullOr types.bool; |
||||
default = null; |
||||
description = '' |
||||
This flag instructs launchd that the job promises to use <literal>vproc_transaction_begin(3)</literal> and |
||||
<literal>vproc_transaction_end(3)</literal> to track outstanding transactions that need to be reconciled before the |
||||
process can safely terminate. If no outstanding transactions are in progress, then launchd is free to |
||||
send the SIGKILL signal. |
||||
''; |
||||
}; |
||||
|
||||
OnDemand = mkOption { |
||||
type = types.nullOr types.bool; |
||||
default = null; |
||||
description = '' |
||||
This key was used in Mac OS X 10.4 to control whether a job was kept alive or not. The default was |
||||
true. This key has been deprecated and replaced in Mac OS X 10.5 and later with the more powerful |
||||
KeepAlive option. |
||||
''; |
||||
}; |
||||
|
||||
KeepAlive = mkOption { |
||||
type = types.nullOr (types.either types.bool (types.submodule { |
||||
options = { |
||||
|
||||
SuccessfulExit = mkOption { |
||||
type = types.nullOr types.bool; |
||||
default = null; |
||||
description = '' |
||||
If true, the job will be restarted as long as the program exits and with an exit status of zero. |
||||
If false, the job will be restarted in the inverse condition. This key implies that "RunAtLoad" |
||||
is set to true, since the job needs to run at least once before we can get an exit status. |
||||
''; |
||||
}; |
||||
|
||||
NetworkState = mkOption { |
||||
type = types.nullOr types.bool; |
||||
default = null; |
||||
description = '' |
||||
If true, the job will be kept alive as long as the network is up, where up is defined as at least |
||||
one non-loopback interface being up and having IPv4 or IPv6 addresses assigned to them. If |
||||
false, the job will be kept alive in the inverse condition. |
||||
''; |
||||
}; |
||||
|
||||
PathState = mkOption { |
||||
type = types.nullOr (types.attrsOf types.bool); |
||||
default = null; |
||||
description = '' |
||||
Each key in this dictionary is a file-system path. If the value of the key is true, then the job |
||||
will be kept alive as long as the path exists. If false, the job will be kept alive in the |
||||
inverse condition. The intent of this feature is that two or more jobs may create semaphores in |
||||
the file-system namespace. |
||||
''; |
||||
}; |
||||
|
||||
OtherJobEnabled = mkOption { |
||||
type = types.nullOr (types.attrsOf types.bool); |
||||
default = null; |
||||
description = '' |
||||
Each key in this dictionary is the label of another job. If the value of the key is true, then |
||||
this job is kept alive as long as that other job is enabled. Otherwise, if the value is false, |
||||
then this job is kept alive as long as the other job is disabled. This feature should not be |
||||
considered a substitute for the use of IPC. |
||||
''; |
||||
}; |
||||
|
||||
# NOTE: this was missing in the original source at the time of writing |
||||
Crashed = mkOption { |
||||
type = types.nullOr types.bool; |
||||
default = null; |
||||
description = '' |
||||
If true, the the job will be restarted as long as it exited due to a signal which is typically |
||||
associated with a crash (SIGILL, SIGSEGV, etc.). If false, the job will be restarted in the inverse |
||||
condition. |
||||
''; |
||||
}; |
||||
|
||||
}; |
||||
})); |
||||
default = null; |
||||
description = '' |
||||
This optional key is used to control whether your job is to be kept continuously running or to let |
||||
demand and conditions control the invocation. The default is false and therefore only demand will start |
||||
the job. The value may be set to true to unconditionally keep the job alive. Alternatively, a dictio-nary dictionary |
||||
nary of conditions may be specified to selectively control whether launchd keeps a job alive or not. If |
||||
multiple keys are provided, launchd ORs them, thus providing maximum flexibility to the job to refine |
||||
the logic and stall if necessary. If launchd finds no reason to restart the job, it falls back on |
||||
demand based invocation. Jobs that exit quickly and frequently when configured to be kept alive will |
||||
be throttled to converve system resources. |
||||
''; |
||||
}; |
||||
|
||||
RunAtLoad = mkOption { |
||||
type = types.nullOr types.bool; |
||||
default = null; |
||||
description = '' |
||||
This optional key is used to control whether your job is launched once at the time the job is loaded. |
||||
The default is false. |
||||
''; |
||||
}; |
||||
|
||||
RootDirectory = mkOption { |
||||
type = types.nullOr types.str; |
||||
default = null; |
||||
description = '' |
||||
This optional key is used to specify a directory to <literal>chroot(2)</literal> to before running the job. |
||||
''; |
||||
}; |
||||
|
||||
WorkingDirectory = mkOption { |
||||
type = types.nullOr types.str; |
||||
default = null; |
||||
description = '' |
||||
This optional key is used to specify a directory to <literal>chdir(2)</literal> to before running the job. |
||||
''; |
||||
}; |
||||
|
||||
EnvironmentVariables = mkOption { |
||||
type = types.nullOr (types.attrsOf types.str); |
||||
default = null; |
||||
description = '' |
||||
This optional key is used to specify additional environment variables to be set before running the |
||||
job. |
||||
''; |
||||
}; |
||||
|
||||
Umask = mkOption { |
||||
type = types.nullOr types.int; |
||||
default = null; |
||||
description = '' |
||||
This optional key specifies what value should be passed to <literal>umask(2)</literal> before running the job. Known bug: |
||||
Property lists don't support octal, so please convert the value to decimal. |
||||
''; |
||||
}; |
||||
|
||||
TimeOut = mkOption { |
||||
type = types.nullOr types.int; |
||||
default = null; |
||||
description = '' |
||||
The recommended idle time out (in seconds) to pass to the job. If no value is specified, a default time |
||||
out will be supplied by launchd for use by the job at check in time. |
||||
''; |
||||
}; |
||||
|
||||
ExitTimeOut = mkOption { |
||||
type = types.nullOr types.int; |
||||
default = null; |
||||
description = '' |
||||
The amount of time launchd waits before sending a SIGKILL signal. The default value is 20 seconds. The |
||||
value zero is interpreted as infinity. |
||||
''; |
||||
}; |
||||
|
||||
ThrottleInterval = mkOption { |
||||
type = types.nullOr types.int; |
||||
default = null; |
||||
description = '' |
||||
This key lets one override the default throttling policy imposed on jobs by launchd. The value is in |
||||
seconds, and by default, jobs will not be spawned more than once every 10 seconds. The principle |
||||
behind this is that jobs should linger around just in case they are needed again in the near future. |
||||
This not only reduces the latency of responses, but it encourages developers to amortize the cost of |
||||
program invocation. |
||||
''; |
||||
}; |
||||
|
||||
InitGroups = mkOption { |
||||
type = types.nullOr types.bool; |
||||
default = null; |
||||
description = '' |
||||
This optional key specifies whether <literal>initgroups(3)</literal> should be called before running the job. The default |
||||
is true in 10.5 and false in 10.4. This key will be ignored if the UserName key is not set. |
||||
''; |
||||
}; |
||||
|
||||
WatchPaths = mkOption { |
||||
type = types.nullOr (types.listOf types.path); |
||||
default = null; |
||||
description = '' |
||||
This optional key causes the job to be started if any one of the listed paths are modified. |
||||
''; |
||||
}; |
||||
|
||||
QueueDirectories = mkOption { |
||||
type = types.nullOr (types.listOf types.str); |
||||
default = null; |
||||
description = '' |
||||
Much like the WatchPaths option, this key will watch the paths for modifications. The difference being |
||||
that the job will only be started if the path is a directory and the directory is not empty. |
||||
''; |
||||
}; |
||||
|
||||
StartOnMount = mkOption { |
||||
type = types.nullOr types.bool; |
||||
default = null; |
||||
description = '' |
||||
This optional key causes the job to be started every time a filesystem is mounted. |
||||
''; |
||||
}; |
||||
|
||||
StartInterval = mkOption { |
||||
type = types.nullOr types.int; |
||||
default = null; |
||||
description = '' |
||||
This optional key causes the job to be started every N seconds. If the system is asleep, the job will |
||||
be started the next time the computer wakes up. If multiple intervals transpire before the computer is |
||||
woken, those events will be coalesced into one event upon wake from sleep. |
||||
''; |
||||
}; |
||||
|
||||
StartCalendarInterval = mkOption { |
||||
default = null; |
||||
example = { Hour = 2; Minute = 30; }; |
||||
description = '' |
||||
This optional key causes the job to be started every calendar interval as specified. Missing arguments |
||||
are considered to be wildcard. The semantics are much like <literal>crontab(5)</literal>. Unlike cron which skips job |
||||
invocations when the computer is asleep, launchd will start the job the next time the computer wakes |
||||
up. If multiple intervals transpire before the computer is woken, those events will be coalesced into |
||||
one event upon wake from sleep. |
||||
''; |
||||
type = types.nullOr (types.listOf (types.submodule { |
||||
options = { |
||||
Minute = mkOption { |
||||
type = types.nullOr types.int; |
||||
default = null; |
||||
description = '' |
||||
The minute on which this job will be run. |
||||
''; |
||||
}; |
||||
|
||||
Hour = mkOption { |
||||
type = types.nullOr types.int; |
||||
default = null; |
||||
description = '' |
||||
The hour on which this job will be run. |
||||
''; |
||||
}; |
||||
|
||||
Day = mkOption { |
||||
type = types.nullOr types.int; |
||||
default = null; |
||||
description = '' |
||||
The day on which this job will be run. |
||||
''; |
||||
}; |
||||
|
||||
Weekday = mkOption { |
||||
type = types.nullOr types.int; |
||||
default = null; |
||||
description = '' |
||||
The weekday on which this job will be run (0 and 7 are Sunday). |
||||
''; |
||||
}; |
||||
|
||||
Month = mkOption { |
||||
type = types.nullOr types.int; |
||||
default = null; |
||||
description = '' |
||||
The month on which this job will be run. |
||||
''; |
||||
}; |
||||
}; |
||||
})); |
||||
}; |
||||
|
||||
StandardInPath = mkOption { |
||||
type = types.nullOr types.path; |
||||
default = null; |
||||
description = '' |
||||
This optional key specifies what file should be used for data being supplied to stdin when using |
||||
<literal>stdio(3)</literal>. |
||||
''; |
||||
}; |
||||
|
||||
StandardOutPath = mkOption { |
||||
type = types.nullOr types.path; |
||||
default = null; |
||||
description = '' |
||||
This optional key specifies what file should be used for data being sent to stdout when using <literal>stdio(3)</literal>. |
||||
''; |
||||
}; |
||||
|
||||
StandardErrorPath = mkOption { |
||||
type = types.nullOr types.path; |
||||
default = null; |
||||
description = '' |
||||
This optional key specifies what file should be used for data being sent to stderr when using <literal>stdio(3)</literal>. |
||||
''; |
||||
}; |
||||
|
||||
Debug = mkOption { |
||||
type = types.nullOr types.bool; |
||||
default = null; |
||||
description = '' |
||||
This optional key specifies that launchd should adjust its log mask temporarily to LOG_DEBUG while |
||||
dealing with this job. |
||||
''; |
||||
}; |
||||
|
||||
WaitForDebugger = mkOption { |
||||
type = types.nullOr types.bool; |
||||
default = null; |
||||
description = '' |
||||
This optional key specifies that launchd should instruct the kernel to have the job wait for a debugger |
||||
to attach before any code in the job is executed. |
||||
''; |
||||
}; |
||||
|
||||
SoftResourceLimits = mkOption { |
||||
default = null; |
||||
description = '' |
||||
Resource limits to be imposed on the job. These adjust variables set with <literal>setrlimit(2)</literal>. The following |
||||
keys apply: |
||||
''; |
||||
type = types.nullOr (types.submodule { |
||||
options = { |
||||
Core = mkOption { |
||||
type = types.nullOr types.int; |
||||
default = null; |
||||
description = '' |
||||
The largest size (in bytes) core file that may be created. |
||||
''; |
||||
}; |
||||
|
||||
CPU = mkOption { |
||||
type = types.nullOr types.int; |
||||
default = null; |
||||
description = '' |
||||
The maximum amount of cpu time (in seconds) to be used by each process. |
||||
''; |
||||
}; |
||||
|
||||
Data = mkOption { |
||||
type = types.nullOr types.int; |
||||
default = null; |
||||
description = '' |
||||
The maximum size (in bytes) of the data segment for a process; this defines how far a program may |
||||
extend its break with the <literal>sbrk(2)</literal> system call. |
||||
''; |
||||
}; |
||||
|
||||
FileSize = mkOption { |
||||
type = types.nullOr types.int; |
||||
default = null; |
||||
description = '' |
||||
The largest size (in bytes) file that may be created. |
||||
''; |
||||
}; |
||||
|
||||
MemoryLock = mkOption { |
||||
type = types.nullOr types.int; |
||||
default = null; |
||||
description = '' |
||||
The maximum size (in bytes) which a process may lock into memory using the mlock(2) function. |
||||
''; |
||||
}; |
||||
|
||||
NumberOfFiles = mkOption { |
||||
type = types.nullOr types.int; |
||||
default = null; |
||||
description = '' |
||||
The maximum number of open files for this process. Setting this value in a system wide daemon |
||||
will set the <literal>sysctl(3)</literal> kern.maxfiles (SoftResourceLimits) or kern.maxfilesperproc (HardResource-Limits) (HardResourceLimits) |
||||
Limits) value in addition to the <literal>setrlimit(2)</literal> values. |
||||
''; |
||||
}; |
||||
|
||||
NumberOfProcesses = mkOption { |
||||
type = types.nullOr types.int; |
||||
default = null; |
||||
description = '' |
||||
The maximum number of simultaneous processes for this user id. Setting this value in a system |
||||
wide daemon will set the <literal>sysctl(3)</literal> kern.maxproc (SoftResourceLimits) or kern.maxprocperuid |
||||
(HardResourceLimits) value in addition to the <literal>setrlimit(2)</literal> values. |
||||
''; |
||||
}; |
||||
|
||||
ResidentSetSize = mkOption { |
||||
type = types.nullOr types.int; |
||||
default = null; |
||||
description = '' |
||||
The maximum size (in bytes) to which a process's resident set size may grow. This imposes a |
||||
limit on the amount of physical memory to be given to a process; if memory is tight, the system |
||||
will prefer to take memory from processes that are exceeding their declared resident set size. |
||||
''; |
||||
}; |
||||
|
||||
Stack = mkOption { |
||||
type = types.nullOr types.int; |
||||
default = null; |
||||
description = '' |
||||
The maximum size (in bytes) of the stack segment for a process; this defines how far a program's |
||||
stack segment may be extended. Stack extension is performed automatically by the system. |
||||
''; |
||||
}; |
||||
}; |
||||
}); |
||||
}; |
||||
|
||||
HardResourceLimits = mkOption { |
||||
default = null; |
||||
example = { NumberOfFiles = 4096; }; |
||||
description = '' |
||||
Resource limits to be imposed on the job. These adjust variables set with <literal>setrlimit(2)</literal>. The following |
||||
keys apply: |
||||
''; |
||||
type = types.nullOr (types.submodule { |
||||
options = { |
||||
Core = mkOption { |
||||
type = types.nullOr types.int; |
||||
default = null; |
||||
description = '' |
||||
The largest size (in bytes) core file that may be created. |
||||
''; |
||||
}; |
||||
|
||||
CPU = mkOption { |
||||
type = types.nullOr types.int; |
||||
default = null; |
||||
description = '' |
||||
The maximum amount of cpu time (in seconds) to be used by each process. |
||||
''; |
||||
}; |
||||
|
||||
Data = mkOption { |
||||
type = types.nullOr types.int; |
||||
default = null; |
||||
description = '' |
||||
The maximum size (in bytes) of the data segment for a process; this defines how far a program may |
||||
extend its break with the <literal>sbrk(2)</literal> system call. |
||||
''; |
||||
}; |
||||
|
||||
FileSize = mkOption { |
||||
type = types.nullOr types.int; |
||||
default = null; |
||||
description = '' |
||||
The largest size (in bytes) file that may be created. |
||||
''; |
||||
}; |
||||
|
||||
MemoryLock = mkOption { |
||||
type = types.nullOr types.int; |
||||
default = null; |
||||
description = '' |
||||
The maximum size (in bytes) which a process may lock into memory using the <literal>mlock(2)</literal> function. |
||||
''; |
||||
}; |
||||
|
||||
NumberOfFiles = mkOption { |
||||
type = types.nullOr types.int; |
||||
default = null; |
||||
description = '' |
||||
The maximum number of open files for this process. Setting this value in a system wide daemon |
||||
will set the <literal>sysctl(3)</literal> kern.maxfiles (SoftResourceLimits) or kern.maxfilesperproc (HardResource-Limits) (HardResourceLimits) |
||||
Limits) value in addition to the <literal>setrlimit(2)</literal> values. |
||||
''; |
||||
}; |
||||
|
||||
NumberOfProcesses = mkOption { |
||||
type = types.nullOr types.int; |
||||
default = null; |
||||
description = '' |
||||
The maximum number of simultaneous processes for this user id. Setting this value in a system |
||||
wide daemon will set the <literal>sysctl(3)</literal> kern.maxproc (SoftResourceLimits) or kern.maxprocperuid |
||||
(HardResourceLimits) value in addition to the <literal>setrlimit(2)</literal> values. |
||||
''; |
||||
}; |
||||
|
||||
ResidentSetSize = mkOption { |
||||
type = types.nullOr types.int; |
||||
default = null; |
||||
description = '' |
||||
The maximum size (in bytes) to which a process's resident set size may grow. This imposes a |
||||
limit on the amount of physical memory to be given to a process; if memory is tight, the system |
||||
will prefer to take memory from processes that are exceeding their declared resident set size. |
||||
''; |
||||
}; |
||||
|
||||
Stack = mkOption { |
||||
type = types.nullOr types.int; |
||||
default = null; |
||||
description = '' |
||||
The maximum size (in bytes) of the stack segment for a process; this defines how far a program's |
||||
stack segment may be extended. Stack extension is performed automatically by the system. |
||||
''; |
||||
}; |
||||
}; |
||||
}); |
||||
}; |
||||
|
||||
Nice = mkOption { |
||||
type = types.nullOr types.int; |
||||
default = null; |
||||
description = '' |
||||
This optional key specifies what nice(3) value should be applied to the daemon. |
||||
''; |
||||
}; |
||||
|
||||
ProcessType = mkOption { |
||||
type = types.nullOr (types.enum [ "Background" "Standard" "Adaptive" "Interactive" ]); |
||||
default = null; |
||||
example = "Background"; |
||||
description = '' |
||||
This optional key describes, at a high level, the intended purpose of the job. The system will apply |
||||
resource limits based on what kind of job it is. If left unspecified, the system will apply light |
||||
resource limits to the job, throttling its CPU usage and I/O bandwidth. The following are valid values: |
||||
|
||||
Background |
||||
Background jobs are generally processes that do work that was not directly requested by the user. |
||||
The resource limits applied to Background jobs are intended to prevent them from disrupting the |
||||
user experience. |
||||
|
||||
Standard |
||||
Standard jobs are equivalent to no ProcessType being set. |
||||
|
||||
Adaptive |
||||
Adaptive jobs move between the Background and Interactive classifications based on activity over |
||||
XPC connections. See <literal>xpc_transaction_begin(3)</literal> for details. |
||||
|
||||
Interactive |
||||
Interactive jobs run with the same resource limitations as apps, that is to say, none. Interac-tive Interactive |
||||
tive jobs are critical to maintaining a responsive user experience, and this key should only be |
||||
used if an app's ability to be responsive depends on it, and cannot be made Adaptive. |
||||
''; |
||||
}; |
||||
|
||||
AbandonProcessGroup = mkOption { |
||||
type = types.nullOr types.bool; |
||||
default = null; |
||||
description = '' |
||||
When a job dies, launchd kills any remaining processes with the same process group ID as the job. Set-ting Setting |
||||
ting this key to true disables that behavior. |
||||
''; |
||||
}; |
||||
|
||||
LowPriorityIO = mkOption { |
||||
type = types.nullOr types.bool; |
||||
default = null; |
||||
description = '' |
||||
This optional key specifies whether the kernel should consider this daemon to be low priority when |
||||
doing file system I/O. |
||||
''; |
||||
}; |
||||
|
||||
LaunchOnlyOnce = mkOption { |
||||
type = types.nullOr types.bool; |
||||
default = null; |
||||
description = '' |
||||
This optional key specifies whether the job can only be run once and only once. In other words, if the |
||||
job cannot be safely respawned without a full machine reboot, then set this key to be true. |
||||
''; |
||||
}; |
||||
|
||||
MachServices = mkOption { |
||||
default = null; |
||||
example = { ResetAtClose = true; }; |
||||
description = '' |
||||
This optional key is used to specify Mach services to be registered with the Mach bootstrap sub-system. |
||||
Each key in this dictionary should be the name of service to be advertised. The value of the key must |
||||
be a boolean and set to true. Alternatively, a dictionary can be used instead of a simple true value. |
||||
|
||||
Finally, for the job itself, the values will be replaced with Mach ports at the time of check-in with |
||||
launchd. |
||||
''; |
||||
type = types.nullOr (types.submodule { |
||||
options = { |
||||
ResetAtClose = mkOption { |
||||
type = types.nullOr types.bool; |
||||
default = null; |
||||
description = '' |
||||
If this boolean is false, the port is recycled, thus leaving clients to remain oblivious to the |
||||
demand nature of job. If the value is set to true, clients receive port death notifications when |
||||
the job lets go of the receive right. The port will be recreated atomically with respect to boot-strap_look_up() bootstrap_look_up() |
||||
strap_look_up() calls, so that clients can trust that after receiving a port death notification, |
||||
the new port will have already been recreated. Setting the value to true should be done with |
||||
care. Not all clients may be able to handle this behavior. The default value is false. |
||||
''; |
||||
}; |
||||
|
||||
HideUntilCheckIn = mkOption { |
||||
type = types.nullOr types.bool; |
||||
default = null; |
||||
description = '' |
||||
Reserve the name in the namespace, but cause bootstrap_look_up() to fail until the job has |
||||
checked in with launchd. |
||||
''; |
||||
}; |
||||
}; |
||||
}); |
||||
}; |
||||
|
||||
Sockets = mkOption { |
||||
default = null; |
||||
description = '' |
||||
This optional key is used to specify launch on demand sockets that can be used to let launchd know when |
||||
to run the job. The job must check-in to get a copy of the file descriptors using APIs outlined in |
||||
launch(3). The keys of the top level Sockets dictionary can be anything. They are meant for the appli-cation application |
||||
cation developer to use to differentiate which descriptors correspond to which application level proto-cols protocols |
||||
cols (e.g. http vs. ftp vs. DNS...). At check-in time, the value of each Sockets dictionary key will |
||||
be an array of descriptors. Daemon/Agent writers should consider all descriptors of a given key to be |
||||
to be effectively equivalent, even though each file descriptor likely represents a different networking |
||||
protocol which conforms to the criteria specified in the job configuration file. |
||||
|
||||
The parameters below are used as inputs to call <literal>getaddrinfo(3)</literal>. |
||||
''; |
||||
type = types.nullOr (types.attrsOf (types.submodule { |
||||
options = { |
||||
SockType = mkOption { |
||||
type = types.nullOr (types.enum [ "stream" "dgram" "seqpacket" ]); |
||||
default = null; |
||||
description = '' |
||||
This optional key tells launchctl what type of socket to create. The default is "stream" and |
||||
other valid values for this key are "dgram" and "seqpacket" respectively. |
||||
''; |
||||
}; |
||||
|
||||
SockPassive = mkOption { |
||||
type = types.nullOr types.bool; |
||||
default = null; |
||||
description = '' |
||||
This optional key specifies whether <literal>listen(2)</literal> or <literal>connect(2)</literal> should be called on the created file |
||||
descriptor. The default is true ("to listen"). |
||||
''; |
||||
}; |
||||
|
||||
SockNodeName = mkOption { |
||||
type = types.nullOr types.str; |
||||
default = null; |
||||
description = '' |
||||
This optional key specifies the node to <literal>connect(2)</literal> or <literal>bind(2)</literal> to. |
||||
''; |
||||
}; |
||||
|
||||
SockServiceName = mkOption { |
||||
type = types.nullOr types.str; |
||||
default = null; |
||||
description = '' |
||||
This optional key specifies the service on the node to <literal>connect(2)</literal> or <literal>bind(2)</literal> to. |
||||
''; |
||||
}; |
||||
|
||||
SockFamily = mkOption { |
||||
type = types.nullOr (types.enum [ "IPv4" "IPv6" ]); |
||||
default = null; |
||||
description = '' |
||||
This optional key can be used to specifically request that "IPv4" or "IPv6" socket(s) be created. |
||||
''; |
||||
}; |
||||
|
||||
SockProtocol = mkOption { |
||||
type = types.nullOr (types.enum [ "TCP" ]); |
||||
default = null; |
||||
description = '' |
||||
This optional key specifies the protocol to be passed to <literal>socket(2)</literal>. The only value understood by |
||||
this key at the moment is "TCP". |
||||
''; |
||||
}; |
||||
|
||||
SockPathName = mkOption { |
||||
type = types.nullOr types.path; |
||||
default = null; |
||||
description = '' |
||||
This optional key implies SockFamily is set to "Unix". It specifies the path to <literal>connect(2)</literal> or |
||||
<literal>bind(2)</literal> to. |
||||
''; |
||||
}; |
||||
|
||||
SecureSocketWithKey = mkOption { |
||||
type = types.nullOr types.str; |
||||
default = null; |
||||
description = '' |
||||
This optional key is a variant of SockPathName. Instead of binding to a known path, a securely |
||||
generated socket is created and the path is assigned to the environment variable that is inher-ited inherited |
||||
ited by all jobs spawned by launchd. |
||||
''; |
||||
}; |
||||
|
||||
SockPathMode = mkOption { |
||||
type = types.nullOr types.int; |
||||
default = null; |
||||
description = '' |
||||
This optional key specifies the mode of the socket. Known bug: Property lists don't support |
||||
octal, so please convert the value to decimal. |
||||
''; |
||||
}; |
||||
|
||||
Bonjour = mkOption { |
||||
type = types.nullOr (types.either types.bool (types.listOf types.str)); |
||||
default = null; |
||||
description = '' |
||||
This optional key can be used to request that the service be registered with the |
||||
<literal>mDNSResponder(8)</literal>. If the value is boolean, the service name is inferred from the SockService-Name. SockServiceName. |
||||
Name. |
||||
''; |
||||
}; |
||||
|
||||
MulticastGroup = mkOption { |
||||
type = types.nullOr types.str; |
||||
default = null; |
||||
description = '' |
||||
This optional key can be used to request that the datagram socket join a multicast group. If the |
||||
value is a hostname, then <literal>getaddrinfo(3)</literal> will be used to join the correct multicast address for a |
||||
given socket family. If an explicit IPv4 or IPv6 address is given, it is required that the Sock-Family SockFamily |
||||
Family family also be set, otherwise the results are undefined. |
||||
''; |
||||
}; |
||||
}; |
||||
})); |
||||
}; |
||||
}; |
||||
|
||||
config = { |
||||
}; |
||||
} |
@ -0,0 +1,5 @@ |
||||
{ lib }: { |
||||
# Converts a boolean to a yes/no string. This is used in lots of |
||||
# configuration formats. |
||||
yesNo = value: if value then "yes" else "no"; |
||||
} |
@ -0,0 +1,97 @@ |
||||
# SOME DESCRIPTIVE TITLE. |
||||
# Copyright (C) YEAR Home Manager contributors |
||||
# This file is distributed under the same license as the Home Manager Modules package. |
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. |
||||
# |
||||
msgid "" |
||||
msgstr "" |
||||
"Project-Id-Version: Home Manager Modules\n" |
||||
"Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n" |
||||
"POT-Creation-Date: 2022-03-26 15:08+0100\n" |
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
||||
"Last-Translator: Automatically generated\n" |
||||
"Language-Team: none\n" |
||||
"Language: fa\n" |
||||
"MIME-Version: 1.0\n" |
||||
"Content-Type: text/plain; charset=UTF-8\n" |
||||
"Content-Transfer-Encoding: 8bit\n" |
||||
|
||||
#: modules/files.nix:233 |
||||
msgid "Creating home file links in %s" |
||||
msgstr "" |
||||
|
||||
#: modules/files.nix:246 |
||||
msgid "Cleaning up orphan links from %s" |
||||
msgstr "" |
||||
|
||||
#: modules/files.nix:262 |
||||
msgid "Creating profile generation %s" |
||||
msgstr "" |
||||
|
||||
#: modules/files.nix:276 |
||||
msgid "No change so reusing latest profile generation %s" |
||||
msgstr "" |
||||
|
||||
#: modules/home-environment.nix:607 |
||||
msgid "" |
||||
"Oops, Nix failed to install your new Home Manager profile!\n" |
||||
"\n" |
||||
"Perhaps there is a conflict with a package that was installed using\n" |
||||
"\"%s\"? Try running\n" |
||||
"\n" |
||||
" %s\n" |
||||
"\n" |
||||
"and if there is a conflicting package you can remove it with\n" |
||||
"\n" |
||||
" %s\n" |
||||
"\n" |
||||
"Then try activating your Home Manager configuration again." |
||||
msgstr "" |
||||
|
||||
#: modules/home-environment.nix:639 |
||||
msgid "Activating %s" |
||||
msgstr "" |
||||
|
||||
#: modules/lib-bash/activation-init.sh:31 |
||||
msgid "Sanity checking oldGenNum and oldGenPath" |
||||
msgstr "" |
||||
|
||||
#: modules/lib-bash/activation-init.sh:34 |
||||
msgid "" |
||||
"The previous generation number and path are in conflict! These\n" |
||||
"must be either both empty or both set but are now set to\n" |
||||
"\n" |
||||
" '%s' and '%s'\n" |
||||
"\n" |
||||
"If you don't mind losing previous profile generations then\n" |
||||
"the easiest solution is probably to run\n" |
||||
"\n" |
||||
" rm %s/home-manager*\n" |
||||
" rm %s/current-home\n" |
||||
"\n" |
||||
"and trying home-manager switch again. Good luck!" |
||||
msgstr "" |
||||
|
||||
#: modules/lib-bash/activation-init.sh:51 |
||||
msgid "Starting Home Manager activation" |
||||
msgstr "" |
||||
|
||||
#: modules/lib-bash/activation-init.sh:55 |
||||
msgid "Sanity checking Nix" |
||||
msgstr "" |
||||
|
||||
#: modules/lib-bash/activation-init.sh:61 |
||||
msgid "This is a dry run" |
||||
msgstr "" |
||||
|
||||
#: modules/lib-bash/activation-init.sh:64 |
||||
msgid "This is a live run" |
||||
msgstr "" |
||||
|
||||
#: modules/lib-bash/activation-init.sh:69 |
||||
msgid "Using Nix version: %s" |
||||
msgstr "" |
||||
|
||||
#: modules/lib-bash/activation-init.sh:72 |
||||
msgid "Activation variables:" |
||||
msgstr "" |
@ -0,0 +1,112 @@ |
||||
# SOME DESCRIPTIVE TITLE. |
||||
# Copyright (C) YEAR Home Manager contributors |
||||
# This file is distributed under the same license as the Home Manager Modules package. |
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. |
||||
# |
||||
msgid "" |
||||
msgstr "" |
||||
"Project-Id-Version: Home Manager Modules\n" |
||||
"Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n" |
||||
"POT-Creation-Date: 2022-03-26 15:08+0100\n" |
||||
"PO-Revision-Date: 2022-04-20 18:18+0000\n" |
||||
"Last-Translator: Frankie McEyes <mceyes@protonmail.com>\n" |
||||
"Language-Team: Italian <https://hosted.weblate.org/projects/home-manager/" |
||||
"modules/it/>\n" |
||||
"Language: it\n" |
||||
"MIME-Version: 1.0\n" |
||||
"Content-Type: text/plain; charset=UTF-8\n" |
||||
"Content-Transfer-Encoding: 8bit\n" |
||||
"Plural-Forms: nplurals=2; plural=n != 1;\n" |
||||
"X-Generator: Weblate 4.12-dev\n" |
||||
|
||||
#: modules/files.nix:233 |
||||
msgid "Creating home file links in %s" |
||||
msgstr "Creo i collegamenti della home in %s" |
||||
|
||||
#: modules/files.nix:246 |
||||
msgid "Cleaning up orphan links from %s" |
||||
msgstr "Pulisco i collegamenti rimasti orfani da %s" |
||||
|
||||
#: modules/files.nix:262 |
||||
msgid "Creating profile generation %s" |
||||
msgstr "Creando profilo di generazione %s" |
||||
|
||||
#: modules/files.nix:276 |
||||
msgid "No change so reusing latest profile generation %s" |
||||
msgstr "Nessuna modifica, verrà riutilizzata l'ultimo generazione di profilo %s" |
||||
|
||||
#: modules/home-environment.nix:607 |
||||
msgid "" |
||||
"Oops, Nix failed to install your new Home Manager profile!\n" |
||||
"\n" |
||||
"Perhaps there is a conflict with a package that was installed using\n" |
||||
"\"%s\"? Try running\n" |
||||
"\n" |
||||
" %s\n" |
||||
"\n" |
||||
"and if there is a conflicting package you can remove it with\n" |
||||
"\n" |
||||
" %s\n" |
||||
"\n" |
||||
"Then try activating your Home Manager configuration again." |
||||
msgstr "" |
||||
|
||||
#: modules/home-environment.nix:639 |
||||
msgid "Activating %s" |
||||
msgstr "Attivando %s" |
||||
|
||||
#: modules/lib-bash/activation-init.sh:31 |
||||
msgid "Sanity checking oldGenNum and oldGenPath" |
||||
msgstr "" |
||||
|
||||
#: modules/lib-bash/activation-init.sh:34 |
||||
msgid "" |
||||
"The previous generation number and path are in conflict! These\n" |
||||
"must be either both empty or both set but are now set to\n" |
||||
"\n" |
||||
" '%s' and '%s'\n" |
||||
"\n" |
||||
"If you don't mind losing previous profile generations then\n" |
||||
"the easiest solution is probably to run\n" |
||||
"\n" |
||||
" rm %s/home-manager*\n" |
||||
" rm %s/current-home\n" |
||||
"\n" |
||||
"and trying home-manager switch again. Good luck!" |
||||
msgstr "" |
||||
"I precedenti numero di generazione e il percorso sono in conflitto!\n" |
||||
"Devono essere entrambi vuoti o entrambi popolati ma ora sono impostati su\n" |
||||
"\n" |
||||
"'%s' e '%s'\n" |
||||
"\n" |
||||
"Se non ti dispiace perdere le generazioni di profili precedenti,\n" |
||||
"allora la soluzione più semplice è probabilmente eseguire i comandi\n" |
||||
"\n" |
||||
"rm %s/home-manager*\n" |
||||
"rm %s/current-home\n" |
||||
"\n" |
||||
"e provare a cambiare home-manager di nuovo. Buona fortuna!" |
||||
|
||||
#: modules/lib-bash/activation-init.sh:51 |
||||
msgid "Starting Home Manager activation" |
||||
msgstr "Iniziando attivazione Home Manager" |
||||
|
||||
#: modules/lib-bash/activation-init.sh:55 |
||||
msgid "Sanity checking Nix" |
||||
msgstr "Controllando Nix" |
||||
|
||||
#: modules/lib-bash/activation-init.sh:61 |
||||
msgid "This is a dry run" |
||||
msgstr "Questo è un avvio secco" |
||||
|
||||
#: modules/lib-bash/activation-init.sh:64 |
||||
msgid "This is a live run" |
||||
msgstr "Questa è una esecuzione live" |
||||
|
||||
#: modules/lib-bash/activation-init.sh:69 |
||||
msgid "Using Nix version: %s" |
||||
msgstr "Versione di Nix in uso: %s" |
||||
|
||||
#: modules/lib-bash/activation-init.sh:72 |
||||
msgid "Activation variables:" |
||||
msgstr "Variabili di attivazione:" |
@ -0,0 +1,39 @@ |
||||
{ config, lib, pkgs, ... }: |
||||
|
||||
with lib; |
||||
|
||||
let |
||||
|
||||
cfg = config.programs.eww; |
||||
|
||||
in { |
||||
meta.maintainers = [ hm.maintainers.mainrs ]; |
||||
|
||||
options.programs.eww = { |
||||
enable = mkEnableOption "eww"; |
||||
|
||||
package = mkOption { |
||||
type = types.package; |
||||
default = pkgs.eww; |
||||
defaultText = literalExpression "pkgs.eww"; |
||||
example = literalExpression "pkgs.eww"; |
||||
description = '' |
||||
The eww package to install. |
||||
''; |
||||
}; |
||||
|
||||
configDir = mkOption { |
||||
type = types.path; |
||||
example = literalExpression "./eww-config-dir"; |
||||
description = '' |
||||
The directory that gets symlinked to |
||||
<filename>$XDG_CONFIG_HOME/eww</filename>. |
||||
''; |
||||
}; |
||||
}; |
||||
|
||||
config = mkIf cfg.enable { |
||||
home.packages = [ cfg.package ]; |
||||
xdg.configFile."eww".source = cfg.configDir; |
||||
}; |
||||
} |
@ -0,0 +1,82 @@ |
||||
{ config, lib, pkgs, ... }: |
||||
|
||||
with lib; |
||||
|
||||
let |
||||
|
||||
cfg = config.programs.gitui; |
||||
|
||||
in { |
||||
meta.maintainers = [ hm.maintainers.mifom ]; |
||||
|
||||
options.programs.gitui = { |
||||
enable = |
||||
mkEnableOption "gitui, blazing fast terminal-ui for git written in rust"; |
||||
|
||||
package = mkOption { |
||||
type = types.package; |
||||
default = pkgs.gitui; |
||||
defaultText = "pkgs.gitui"; |
||||
description = "The package to use."; |
||||
}; |
||||
|
||||
keyConfig = mkOption { |
||||
type = types.either types.path types.lines; |
||||
default = ""; |
||||
example = '' |
||||
exit: Some(( code: Char('c'), modifiers: ( bits: 2,),)), |
||||
quit: Some(( code: Char('q'), modifiers: ( bits: 0,),)), |
||||
exit_popup: Some(( code: Esc, modifiers: ( bits: 0,),)), |
||||
''; |
||||
description = '' |
||||
Key config in Ron file format. This is written to |
||||
<filename>$XDG_CONFIG_HOME/gitui/key_config.ron</filename>. |
||||
''; |
||||
}; |
||||
|
||||
theme = mkOption { |
||||
type = types.either types.path types.lines; |
||||
default = '' |
||||
( |
||||
selected_tab: Reset, |
||||
command_fg: White, |
||||
selection_bg: Blue, |
||||
cmdbar_extra_lines_bg: Blue, |
||||
disabled_fg: DarkGray, |
||||
diff_line_add: Green, |
||||
diff_line_delete: Red, |
||||
diff_file_added: LightGreen, |
||||
diff_file_removed: LightRed, |
||||
diff_file_moved: LightMagenta, |
||||
diff_file_modified: Yellow, |
||||
commit_hash: Magenta, |
||||
commit_time: LightCyan, |
||||
commit_author: Green, |
||||
danger_fg: Red, |
||||
push_gauge_bg: Blue, |
||||
push_gauge_fg: Reset, |
||||
) |
||||
''; |
||||
description = '' |
||||
Theme in Ron file format. This is written to |
||||
<filename>$XDG_CONFIG_HOME/gitui/theme.ron</filename>. |
||||
''; |
||||
}; |
||||
}; |
||||
|
||||
config = mkIf cfg.enable { |
||||
home.packages = [ cfg.package ]; |
||||
|
||||
xdg.configFile."gitui/theme.ron".source = |
||||
if builtins.isPath cfg.theme || lib.isStorePath cfg.theme then |
||||
cfg.theme |
||||
else |
||||
pkgs.writeText "gitui-theme.ron" cfg.theme; |
||||
|
||||
xdg.configFile."gitui/key_bindings.ron".source = |
||||
if builtins.isPath cfg.keyConfig || lib.isStorePath cfg.keyConfig then |
||||
cfg.keyConfig |
||||
else |
||||
pkgs.writeText "gitui-key-config.ron" cfg.keyConfig; |
||||
}; |
||||
} |
@ -0,0 +1,52 @@ |
||||
{ config, lib, pkgs, ... }: |
||||
|
||||
with lib; |
||||
|
||||
let |
||||
|
||||
cfg = config.programs.just; |
||||
|
||||
in { |
||||
meta.maintainers = [ hm.maintainers.maximsmol ]; |
||||
|
||||
options.programs.just = { |
||||
enable = mkEnableOption |
||||
"just, a handy way to save and run project-specific commands"; |
||||
|
||||
package = mkOption { |
||||
type = types.package; |
||||
default = pkgs.just; |
||||
defaultText = literalExpression "pkgs.just"; |
||||
description = "Package providing the <command>just</command> tool."; |
||||
}; |
||||
|
||||
enableBashIntegration = mkEnableOption "Bash integration" // { |
||||
default = true; |
||||
}; |
||||
|
||||
enableZshIntegration = mkEnableOption "Zsh integration" // { |
||||
default = true; |
||||
}; |
||||
|
||||
enableFishIntegration = mkEnableOption "Fish integration" // { |
||||
default = true; |
||||
}; |
||||
}; |
||||
|
||||
config = mkIf cfg.enable { |
||||
home.packages = [ cfg.package ]; |
||||
|
||||
programs.bash.initExtra = mkIf cfg.enableBashIntegration '' |
||||
source ${cfg.package}/share/bash-completion/completions/just.bash |
||||
''; |
||||
|
||||
programs.zsh.initExtra = mkIf cfg.enableZshIntegration '' |
||||
source ${cfg.package}/share/zsh/site-functions/_just |
||||
''; |
||||
|
||||
programs.fish.shellInit = mkIf cfg.enableFishIntegration '' |
||||
source ${cfg.package}/share/fish/vendor_completions.d/just.fish |
||||
''; |
||||
|
||||
}; |
||||
} |
@ -0,0 +1,60 @@ |
||||
{ config, lib, pkgs, ... }: |
||||
|
||||
with lib; |
||||
|
||||
let |
||||
|
||||
cfg = config.programs.pubs; |
||||
|
||||
in { |
||||
meta.maintainers = [ hm.maintainers.loicreynier ]; |
||||
|
||||
options.programs.pubs = { |
||||
enable = mkEnableOption "pubs"; |
||||
|
||||
package = mkOption { |
||||
type = types.package; |
||||
default = pkgs.pubs; |
||||
defaultText = literalExpression "pkgs.pubs"; |
||||
description = "The package to use for the pubs script."; |
||||
}; |
||||
|
||||
extraConfig = mkOption { |
||||
type = types.lines; |
||||
default = ""; |
||||
example = literalExpression '' |
||||
''' |
||||
[main] |
||||
pubsdir = ''${config.home.homeDirectory}/.pubs |
||||
docsdir = ''${config.home.homeDirectory}/.pubs/doc |
||||
doc_add = link |
||||
open_cmd = xdg-open |
||||
|
||||
[plugins] |
||||
active = git,alias |
||||
|
||||
[[alias]] |
||||
|
||||
[[[la]]] |
||||
command = list -a |
||||
description = lists papers in lexicographic order |
||||
|
||||
[[git]] |
||||
quiet = True |
||||
manual = False |
||||
force_color = False |
||||
'''''; |
||||
description = '' |
||||
Configuration using syntax written to |
||||
<filename>$HOME/.pubsrc</filename>. |
||||
''; |
||||
}; |
||||
}; |
||||
|
||||
config = mkIf cfg.enable { |
||||
home.packages = [ cfg.package ]; |
||||
|
||||
home.file.".pubsrc" = |
||||
mkIf (cfg.extraConfig != "") { text = cfg.extraConfig; }; |
||||
}; |
||||
} |
@ -0,0 +1,31 @@ |
||||
{ config, lib, pkgs, ... }: |
||||
|
||||
with lib; |
||||
|
||||
let |
||||
|
||||
cfg = config.programs.pylint; |
||||
listToValue = concatMapStringsSep ", " (generators.mkValueStringDefault { }); |
||||
iniFormat = pkgs.formats.ini { inherit listToValue; }; |
||||
in { |
||||
meta.maintainers = [ hm.maintainers.florpe ]; |
||||
options.programs.pylint = { |
||||
enable = mkEnableOption "the pylint Python linter"; |
||||
package = mkOption { |
||||
type = types.package; |
||||
default = pkgs.python3Packages.pylint; |
||||
defaultText = literalExpression "pkgs.python3Packages.pylint"; |
||||
description = "The pylint package to use."; |
||||
}; |
||||
settings = mkOption { |
||||
type = iniFormat.type; |
||||
default = { }; |
||||
defaultText = literalExpression "{}"; |
||||
description = "The pylint configuration."; |
||||
}; |
||||
}; |
||||
config = mkIf cfg.enable { |
||||
home.packages = [ cfg.package ]; |
||||
home.file.".pylintrc".source = iniFormat.generate "pylintrc" cfg.settings; |
||||
}; |
||||
} |
@ -0,0 +1,70 @@ |
||||
{ config, lib, pkgs, ... }: |
||||
with lib; |
||||
let |
||||
cfg = config.programs.sioyek; |
||||
|
||||
renderAttrs = attrs: |
||||
concatStringsSep "\n" |
||||
(mapAttrsToList (name: value: "${name} ${value}") attrs); |
||||
in { |
||||
options = { |
||||
programs.sioyek = { |
||||
enable = mkEnableOption |
||||
"Sioyek is a PDF viewer designed for reading research papers and technical books."; |
||||
|
||||
package = mkOption { |
||||
default = pkgs.sioyek; |
||||
defaultText = literalExpression "pkgs.sioyek"; |
||||
type = types.package; |
||||
description = "Package providing the sioyek binary"; |
||||
}; |
||||
|
||||
bindings = mkOption { |
||||
description = '' |
||||
Input configuration written to |
||||
<filename>$XDG_CONFIG_HOME/sioyek/keys_user.config</filename>. |
||||
See <link xlink:href="https://github.com/ahrm/sioyek/blob/main/pdf_viewer/keys.config"/>. |
||||
''; |
||||
type = types.attrsOf types.str; |
||||
default = { }; |
||||
example = literalExpression '' |
||||
{ |
||||
"move_up" = "k"; |
||||
"move_down" = "j"; |
||||
"move_left" = "h"; |
||||
"move_right" = "l"; |
||||
} |
||||
''; |
||||
}; |
||||
|
||||
config = mkOption { |
||||
description = '' |
||||
Input configuration written to |
||||
<filename>$XDG_CONFIG_HOME/sioyek/prefs_user.config</filename>. |
||||
See <link xlink:href="https://github.com/ahrm/sioyek/blob/main/pdf_viewer/prefs.config"/>. |
||||
''; |
||||
type = types.attrsOf types.str; |
||||
default = { }; |
||||
example = literalExpression '' |
||||
{ |
||||
"background_color" = "1.0 1.0 1.0"; |
||||
"text_highlight_color" = "1.0 0.0 0.0"; |
||||
} |
||||
''; |
||||
}; |
||||
|
||||
}; |
||||
}; |
||||
|
||||
config = mkIf cfg.enable (mkMerge [ |
||||
{ home.packages = [ cfg.package ]; } |
||||
(mkIf (cfg.config != { }) { |
||||
xdg.configFile."sioyek/prefs_user.config".text = renderAttrs cfg.config; |
||||
}) |
||||
(mkIf (cfg.bindings != { }) { |
||||
xdg.configFile."sioyek/keys_user.config".text = renderAttrs cfg.bindings; |
||||
}) |
||||
]); |
||||
|
||||
meta.maintainers = [ hm.maintainers.podocarp ]; |
||||
} |
@ -0,0 +1,65 @@ |
||||
{ config, lib, pkgs, ... }: |
||||
|
||||
with lib; |
||||
let |
||||
cfg = config.programs.tiny; |
||||
format = pkgs.formats.yaml { }; |
||||
configDir = if pkgs.stdenv.isDarwin then |
||||
"Library/Application Support/tiny" |
||||
else |
||||
"${config.xdg.configHome}/tiny"; |
||||
in { |
||||
meta.maintainers = [ hm.maintainers.kmaasrud ]; |
||||
|
||||
options = { |
||||
programs.tiny = { |
||||
enable = mkEnableOption "tiny, a TUI IRC client written in Rust"; |
||||
|
||||
package = mkOption { |
||||
type = types.package; |
||||
default = pkgs.tiny; |
||||
defaultText = literalExpression "pkgs.tiny"; |
||||
description = "The <command>tiny</command> package to install."; |
||||
}; |
||||
|
||||
settings = mkOption { |
||||
type = format.type; |
||||
default = { }; |
||||
defaultText = literalExpression "{ }"; |
||||
example = literalExpression '' |
||||
{ |
||||
servers = [ |
||||
{ |
||||
addr = "irc.libera.chat"; |
||||
port = 6697; |
||||
tls = true; |
||||
realname = "John Doe"; |
||||
nicks = [ "tinyuser" ]; |
||||
} |
||||
]; |
||||
defaults = { |
||||
nicks = [ "tinyuser" ]; |
||||
realname = "John Doe"; |
||||
join = []; |
||||
tls = true; |
||||
}; |
||||
}; |
||||
''; |
||||
description = '' |
||||
Configuration written to |
||||
<filename>$XDG_CONFIG_HOME/tiny/config.yml</filename>. See |
||||
<link xlink:href="https://github.com/osa1/tiny/blob/master/crates/tiny/config.yml"/> |
||||
for the default configuration. |
||||
''; |
||||
}; |
||||
}; |
||||
}; |
||||
|
||||
config = mkIf cfg.enable { |
||||
home.packages = [ cfg.package ]; |
||||
|
||||
home.file."${configDir}/config.yml" = mkIf (cfg.settings != { }) { |
||||
source = format.generate "tiny-config" cfg.settings; |
||||
}; |
||||
}; |
||||
} |
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue