1
0
mirror of https://github.com/nix-community/home-manager synced 2024-06-22 06:28:32 +02:00
Commit Graph

279 Commits

Author SHA1 Message Date
Robert Helgesson
2af0d07678
home-manager: use hostname from Nixpkgs
Before the home-manager tool got hostname from the system, which was
not declarative or reproducible.
2022-12-05 23:45:07 +01:00
Robert Helgesson
71fa4cdf9c
home-manager: update stable version to 22.11 2022-12-02 11:49:58 +01:00
Pablo Bollansee
3ce1c4787a
Translate using Weblate (Dutch)
Currently translated at 100.0% (14 of 14 strings)

Translate using Weblate (Dutch)

Currently translated at 100.0% (32 of 32 strings)

Co-authored-by: Pablo Bollansee <pablo.bollansee@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/home-manager/cli/nl/
Translate-URL: https://hosted.weblate.org/projects/home-manager/modules/nl/
Translation: Home Manager/Home Manager CLI
Translation: Home Manager/Home Manager Modules
2022-11-21 16:35:25 +01:00
Eise Zimmerman
b0cf7245c4
Translate using Weblate (Dutch)
Currently translated at 40.6% (13 of 32 strings)

Co-authored-by: Eise Zimmerman <eiscomania@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/home-manager/cli/nl/
Translation: Home Manager/Home Manager CLI
2022-11-07 18:06:30 +01:00
Robert Helgesson
ebe6d2c747
home-manager: set state version when uninstalling
Otherwise the switch exits with an error.

Fixes #3320
2022-10-11 09:31:29 +02:00
cafkafk
b4bfe3b2d9
Translate using Weblate (Danish)
Currently translated at 100.0% (32 of 32 strings)

Add translation using Weblate (Danish)

Co-authored-by: cafkafk <christina@cafkafk.com>
Translate-URL: https://hosted.weblate.org/projects/home-manager/cli/da/
Translation: Home Manager/Home Manager CLI
2022-09-19 22:24:39 +02:00
Robert Helgesson
30dda628bc
home-manager: add ncurses to PATH
Fixes #3097
2022-07-18 15:18:05 +02:00
Frederik Engels
3b5330c80f
Translate using Weblate (Dutch)
Currently translated at 25.0% (8 of 32 strings)

Translate using Weblate (German)

Currently translated at 100.0% (32 of 32 strings)

Add translation using Weblate (Dutch)

Co-authored-by: Frederik Engels <frederik.engels92@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/home-manager/cli/de/
Translate-URL: https://hosted.weblate.org/projects/home-manager/cli/nl/
Translation: Home Manager/Home Manager CLI
2022-07-13 15:34:00 +02:00
OKA, NETSURFER AND OBSERVER, FRONTEND, DEVELOPER (DOTFILES,OSINT,OSS), KEYBASE: (3B0E8E0895DAC8B8)
c645cc9f82
Translate using Weblate (Japanese)
Currently translated at 100.0% (32 of 32 strings)

Co-authored-by: OKA, NETSURFER AND OBSERVER, FRONTEND, DEVELOPER (DOTFILES,OSINT,OSS), KEYBASE: (3B0E8E0895DAC8B8) <tetrapasta02@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/home-manager/cli/ja/
Translation: Home Manager/Home Manager CLI
2022-07-09 21:48:06 +02:00
Turmoil Nailsis
f2b216c320
Translate using Weblate (Japanese)
Currently translated at 100.0% (32 of 32 strings)

Co-authored-by: Turmoil Nailsis <indianrunner@duck.com>
Translate-URL: https://hosted.weblate.org/projects/home-manager/cli/ja/
Translation: Home Manager/Home Manager CLI
2022-07-09 21:48:06 +02:00
Naïm Camille Favier
1de492f6f8
format: update and remove exceptions (#3029)
Switches to nixfmt 0.5.0 and removes exceptions for files without open
PRs.
2022-06-16 14:13:06 +02:00
Nikolay Korotkiy
504d6de6a0
Add translation using Weblate (Finnish)
Co-authored-by: Nikolay Korotkiy <sikmir@gmail.com>
2022-06-15 23:44:58 +02:00
Leix b
a9b027b826
Translate using Weblate (Catalan)
Currently translated at 100.0% (32 of 32 strings)

Translate using Weblate (Catalan)

Currently translated at 12.5% (4 of 32 strings)

Co-authored-by: Leix b <abone9999@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/home-manager/cli/ca/
Translation: Home Manager/Home Manager CLI
2022-06-15 23:44:58 +02:00
Weblate
68edbc7f28
Add translation using Weblate (Finnish)
Add translation using Weblate (Catalan)

Co-authored-by: Weblate <noreply@weblate.org>
2022-06-15 23:44:57 +02:00
Naïm Camille Favier
64ab7d6e8d
Prepare inclusion in nixos-search (#2971)
* Add flake.lock and clean up flake.nix

Add a lockfile to work around https://github.com/NixOS/nix/issues/6541
(and because it's a good idea anyway).

Also use flake-utils, and restrict ourselves to the five platforms
supported by nixpkgs. Otherwise, the IFD for nmd fails on weird
platforms. This fixes `nix flake check`.

Remove the redundant `apps` output, see https://github.com/nix-community/home-manager/pull/2442#issuecomment-1133670487

* nixos,nix-darwin: factor out into a common module

* nixos,nix-darwin: make `home-managers.users` shallowly visible

Make sure the option is included in the NixOS/nix-darwin manual (but the
HM submodule options aren't).

Also add a static description to the HM submodule type so that we don't need to
evaluate the submodules just to build the option manual. This makes
nixos-search able to index the home-manager flake.

Also clean up some TODOs.

* flake: add nmd and nmt

This avoids having to use `pkgs.fetchFromGitLab` in an IFD, which causes
issues when indexing packages with nixos-search because `pkgs` is
instantiated with every platform.
2022-06-07 20:45:06 +02:00
Frankie McEyes
09f3e67950
Translate using Weblate (Italian)
Currently translated at 85.7% (12 of 14 strings)

Translate using Weblate (Italian)

Currently translated at 100.0% (32 of 32 strings)

Co-authored-by: Frankie McEyes <mceyes@protonmail.com>
Translate-URL: https://hosted.weblate.org/projects/home-manager/cli/it/
Translate-URL: https://hosted.weblate.org/projects/home-manager/modules/it/
Translation: Home Manager/Home Manager CLI
Translation: Home Manager/Home Manager Modules
2022-04-24 23:38:56 +02:00
Artin Mobasher
845aaaf4db
Translate using Weblate (Persian)
Currently translated at 12.5% (4 of 32 strings)

Add translation using Weblate (Persian)

Co-authored-by: Artin Mobasher <mobasherartin.icm@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/home-manager/cli/fa/
Translation: Home Manager/Home Manager CLI
2022-04-24 23:38:56 +02:00
Alex Miranda
8a046f36eb
Translate using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (14 of 14 strings)

Translate using Weblate (Portuguese (Brazil))

Currently translated at 100.0% (32 of 32 strings)

Co-authored-by: Alex Miranda <alexmirandamoraes@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/home-manager/cli/pt_BR/
Translate-URL: https://hosted.weblate.org/projects/home-manager/modules/pt_BR/
Translation: Home Manager/Home Manager CLI
Translation: Home Manager/Home Manager Modules
2022-04-07 19:36:38 +02:00
Oğuz Ersen
f5a44afa19
Translate using Weblate (Turkish)
Currently translated at 100.0% (14 of 14 strings)

Translate using Weblate (Turkish)

Currently translated at 100.0% (32 of 32 strings)

Co-authored-by: Oğuz Ersen <oguz@ersen.moe>
Translate-URL: https://hosted.weblate.org/projects/home-manager/cli/tr/
Translate-URL: https://hosted.weblate.org/projects/home-manager/modules/tr/
Translation: Home Manager/Home Manager CLI
Translation: Home Manager/Home Manager Modules
2022-03-27 09:44:00 +02:00
Hosted Weblate
c607ae8671
Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Update translation files

Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Translate-URL: https://hosted.weblate.org/projects/home-manager/cli/
Translate-URL: https://hosted.weblate.org/projects/home-manager/modules/
Translation: Home Manager/Home Manager CLI
Translation: Home Manager/Home Manager Modules
2022-03-27 09:44:00 +02:00
Robert Helgesson
888eac32bd
home-manager: fix command option
Fixes #2844
2022-03-27 09:43:19 +02:00
Moises Nessim
2f58d0a3de
nix: add support for nix profile
PR #2833

Co-authored-by: David Arnold <dar@xoe.solutions>
Co-authored-by: Florian Franzen <Florian.Franzen@gmail.com>
2022-03-26 15:11:28 +01:00
Manu [tennox]
6c730bc054
Translate using Weblate (German)
Currently translated at 100.0% (14 of 14 strings)

Translate using Weblate (German)

Currently translated at 100.0% (32 of 32 strings)

Co-authored-by: Manu [tennox] <tennox@posteo.de>
Translate-URL: https://hosted.weblate.org/projects/home-manager/cli/de/
Translate-URL: https://hosted.weblate.org/projects/home-manager/modules/de/
Translation: Home Manager/Home Manager CLI
Translation: Home Manager/Home Manager Modules
2022-03-23 19:56:54 +01:00
Marco Turchetto
1950eb878b
Add translation using Weblate (Italian)
Co-authored-by: Marco Turchetto <marco.turchetto.mt@gmail.com>
2022-02-24 22:43:43 +01:00
Shamrock Lee
50204cea94
completion.*: add flake-related arguments 2022-02-15 22:47:41 +01:00
Shamrock Lee
23a9f9127c
home-manager: add more pass-through options
Specifically, pass through --[extra-]experimental-features to Nix.
2022-02-15 22:45:59 +01:00
Mustafa Çalışkan
ae95406f86
Translate using Weblate (Turkish)
Currently translated at 96.8% (31 of 32 strings)

Translation: Home Manager/Home Manager CLI
Translate-URL: https://hosted.weblate.org/projects/home-manager/cli/tr/
2022-02-12 16:54:29 +01:00
Mustafa Çalışkan
be7f132a12
Add translation using Weblate (Turkish) 2022-02-11 15:18:01 +01:00
Heman Gandhi
68cf4bef2e
Translate using Weblate (Japanese)
Currently translated at 100.0% (32 of 32 strings)

Translation: Home Manager/Home Manager CLI
Translate-URL: https://hosted.weblate.org/projects/home-manager/cli/ja/
2022-02-11 00:05:01 +01:00
Narazaki Shuji
ec5c5ae9a8
Translate using Weblate (Japanese)
Currently translated at 78.5% (11 of 14 strings)

Translate using Weblate (Japanese)

Currently translated at 100.0% (32 of 32 strings)

Translate using Weblate (Japanese)

Currently translated at 35.7% (5 of 14 strings)

Translate using Weblate (Japanese)

Currently translated at 84.3% (27 of 32 strings)

Translate using Weblate (Japanese)

Currently translated at 25.0% (8 of 32 strings)

Co-authored-by: Narazaki Shuji <shujinarazaki@protonmail.com>
Translate-URL: https://hosted.weblate.org/projects/home-manager/cli/ja/
Translate-URL: https://hosted.weblate.org/projects/home-manager/modules/ja/
Translation: Home Manager/Home Manager CLI
Translation: Home Manager/Home Manager Modules
2022-02-11 00:05:01 +01:00
Heman Gandhi
a2363ceb1d
Translate using Weblate (Japanese)
Currently translated at 25.0% (8 of 32 strings)

Translate using Weblate (Japanese)

Currently translated at 6.2% (2 of 32 strings)

Add translation using Weblate (Japanese)

Co-authored-by: Heman Gandhi <hemangandhi@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/home-manager/cli/ja/
Translation: Home Manager/Home Manager CLI
2022-02-11 00:05:01 +01:00
박수원
774d6e35a5
Translate using Weblate (Korean)
Currently translated at 100.0% (32 of 32 strings)

Add translation using Weblate (Korean)

Co-authored-by: 박수원 <bboxone@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/home-manager/cli/ko/
Translation: Home Manager/Home Manager CLI
2022-01-30 22:50:26 +01:00
Rodrigo Nascimento
5e4f439e0c
Add translation using Weblate (Portuguese (Brazil))
Co-authored-by: Rodrigo Nascimento <rodrigocesarnascimento@gmail.com>
2022-01-18 00:44:25 +01:00
mainrs
4d4c1f343b
Translate using Weblate (German)
Currently translated at 96.8% (31 of 32 strings)

Translate using Weblate (German)

Currently translated at 15.6% (5 of 32 strings)

Add translation using Weblate (German)

Co-authored-by: mainrs <github619064@zerotask.net>
Translate-URL: https://hosted.weblate.org/projects/home-manager/cli/de/
Translation: Home Manager/Home Manager CLI
2022-01-18 00:44:25 +01:00
Robert Helgesson
d07df8d9a8
Translate using Weblate (Spanish)
Currently translated at 100.0% (32 of 32 strings)

Co-authored-by: Robert Helgesson <robert@rycee.net>
Translate-URL: https://hosted.weblate.org/projects/home-manager/cli/es/
Translation: Home Manager/Home Manager CLI
2022-01-11 22:45:33 +01:00
Mauricio Scheffer
8a431023c0
Translate using Weblate (Spanish)
Currently translated at 100.0% (14 of 14 strings)

Translate using Weblate (Spanish)

Currently translated at 100.0% (32 of 32 strings)

Translate using Weblate (Spanish)

Currently translated at 57.1% (8 of 14 strings)

Co-authored-by: Mauricio Scheffer <mauricioscheffer@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/home-manager/cli/es/
Translate-URL: https://hosted.weblate.org/projects/home-manager/modules/es/
Translation: Home Manager/Home Manager CLI
Translation: Home Manager/Home Manager Modules
2022-01-11 22:45:33 +01:00
Hosted Weblate
95823b5639
Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Update translation files

Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Translate-URL: https://hosted.weblate.org/projects/home-manager/cli/
Translate-URL: https://hosted.weblate.org/projects/home-manager/modules/
Translation: Home Manager/Home Manager CLI
Translation: Home Manager/Home Manager Modules
2022-01-06 09:29:33 +01:00
Mario Rodas
cf0fc744c2
Translate using Weblate (Spanish)
Currently translated at 15.6% (5 of 32 strings)

Add translation using Weblate (Spanish)

Co-authored-by: Mario Rodas <rodasmario2@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/home-manager/cli/es/
Translation: Home Manager/Home Manager CLI
2022-01-06 09:29:33 +01:00
Robert Helgesson
8e7a10602d
treewide: make a few more strings translatable 2022-01-02 11:56:52 +01:00
Robert Helgesson
adaea605db
home-manager: document the --version command option
Fixes #2604
2022-01-02 08:33:32 +01:00
Tomasz Czyż
cc3b979893
Translate using Weblate (Polish)
Currently translated at 100.0% (6 of 6 strings)

Translate using Weblate (Polish)

Currently translated at 100.0% (32 of 32 strings)

Add translation using Weblate (Polish)

Co-authored-by: Tomasz Czyż <tomasz.czyz@eskapizm.pl>
Translate-URL: https://hosted.weblate.org/projects/home-manager/cli/pl/
Translate-URL: https://hosted.weblate.org/projects/home-manager/modules/pl/
Translation: Home Manager/Home Manager CLI
Translation: Home Manager/Home Manager Modules
2021-12-29 10:40:19 +01:00
WhiredPlanck
a5dcd2ac0a
Translate using Weblate (Chinese (Traditional))
Currently translated at 100.0% (6 of 6 strings)

Translate using Weblate (Chinese (Traditional))

Currently translated at 100.0% (32 of 32 strings)

Translate using Weblate (Chinese (Simplified))

Currently translated at 100.0% (6 of 6 strings)

Translate using Weblate (Chinese (Simplified))

Currently translated at 100.0% (6 of 6 strings)

Co-authored-by: WhiredPlanck <fungdaat31@outlook.com>
Translate-URL: https://hosted.weblate.org/projects/home-manager/cli/zh_Hant/
Translate-URL: https://hosted.weblate.org/projects/home-manager/modules/zh_Hans/
Translate-URL: https://hosted.weblate.org/projects/home-manager/modules/zh_Hant/
Translation: Home Manager/Home Manager CLI
Translation: Home Manager/Home Manager Modules
2021-12-29 10:40:19 +01:00
WhiredPlanck
bc859aeed7
Add translation using Weblate (Chinese (Traditional))
Translate using Weblate (Chinese (Simplified))

Currently translated at 100.0% (32 of 32 strings)

Add translation using Weblate (Chinese (Simplified))

Co-authored-by: WhiredPlanck <fungdaat31@outlook.com>
Translate-URL: https://hosted.weblate.org/projects/home-manager/cli/zh_Hans/
Translation: Home Manager/Home Manager CLI
2021-12-29 10:40:19 +01:00
Mikhail Chekan
0fd86c66fe
Translate using Weblate (Russian)
Currently translated at 100.0% (32 of 32 strings)

Add translation using Weblate (Russian)

Co-authored-by: Mikhail Chekan <chekoopa@mail.ru>
Translate-URL: https://hosted.weblate.org/projects/home-manager/cli/ru/
Translation: Home Manager/Home Manager CLI
2021-12-23 23:00:35 +01:00
TheBlackBeans
679e07e32e
Translate using Weblate (French)
Currently translated at 100.0% (32 of 32 strings)

Co-authored-by: TheBlackBeans <adrien.mathieu.net@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/home-manager/cli/fr/
Translation: Home Manager/Home Manager CLI
2021-12-19 17:51:26 +01:00
Robert Helgesson
8b44e81978
Translate using Weblate (Swedish)
Currently translated at 100.0% (32 of 32 strings)

Co-authored-by: Robert Helgesson <robert@rycee.net>
Translate-URL: https://hosted.weblate.org/projects/home-manager/cli/sv/
Translation: Home Manager/Home Manager CLI
2021-12-17 21:50:25 +01:00
Hosted Weblate
25e5a900de
Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: Home Manager/Home Manager CLI
Translate-URL: https://hosted.weblate.org/projects/home-manager/cli/
2021-12-16 20:45:31 +01:00
J. Lavoie
fd7c5e9346
Translate using Weblate (French)
Currently translated at 100.0% (27 of 27 strings)

Translation: Home Manager/Home Manager CLI
Translate-URL: https://hosted.weblate.org/projects/home-manager/cli/fr/
2021-12-16 09:56:08 +01:00
Robert Helgesson
1acbc5ad8b
Translate using Weblate (Swedish)
Currently translated at 100.0% (27 of 27 strings)

Translation: Home Manager/Home Manager CLI
Translate-URL: https://hosted.weblate.org/projects/home-manager/cli/sv/
2021-12-16 09:56:08 +01:00
Guilloux Nicolas
f97e921c94
Translate using Weblate (French)
Currently translated at 66.6% (18 of 27 strings)

Translation: Home Manager/Home Manager CLI
Translate-URL: https://hosted.weblate.org/projects/home-manager/cli/fr/
2021-12-16 09:56:08 +01:00
Robert Helgesson
3d9eb1cecd
home-manager: support i18n of install script 2021-12-14 18:53:54 +01:00
Guilloux Nicolas
9b70b22948
Add translation using Weblate (French) 2021-12-14 07:56:23 +01:00
Allan Nordhøy
ea5591d225
Translate using Weblate (Norwegian Bokmål)
Currently translated at 100.0% (27 of 27 strings)

Translation: Home Manager/Home Manager CLI
Translate-URL: https://hosted.weblate.org/projects/home-manager/cli/nb_NO/
2021-12-13 22:29:53 +01:00
Robert Helgesson
2ff170d91c
Translate using Weblate (Swedish)
Currently translated at 100.0% (27 of 27 strings)

Translation: Home Manager/Home Manager CLI
Translate-URL: https://hosted.weblate.org/projects/home-manager/cli/sv/
2021-12-13 22:29:39 +01:00
Allan Nordhøy
1fad70e995
Add translation using Weblate (Norwegian Bokmål) 2021-12-13 22:29:34 +01:00
Robert Helgesson
9bcad20013
home-manager: add basic i18n support
The support for translated strings is, for now, limited to strings
generated in Bash code.
2021-12-13 21:47:28 +01:00
polykernel
9de77227d7
home-manager: fix home-manager build error (#2514)
Two misplaced quotations were introduced in `doBuild` by https://github.com/nix-community/home-manager/pull/2501, which
caused the parameter expansion of DRY_RUN to include an extraneous tab. Since the flake uri is passed
later into the command, Nix assumes the whitespace sequence as the flake uri and returns that it is not
a valid flake reference.

This PR removes the misplaced quotations in `doBuild` and also places the flake uri as the first argument for
calls to `doBuildFlake` for consistency with `doBuildAttr`. Placing the uri first in the command line also guards
against possible security issues if arbitrary uris are expanded prior to the user given uri.
2021-11-28 20:48:21 -05:00
Robert Helgesson
579f2e8beb
Switch to 22.05 as current development release 2021-11-25 22:29:49 +01:00
polykernel
609370699f
home-manager: do not build news when using flake (#2501)
Currently, the `buildNews` and `doBuildAttrs` are always called
unconditionally even if a flake configuration is specified. This cause
it to always fail prior to the actual build performed by `doBuildAttrs`
because `setConfigFIle` can not find the home-manager configuration file.
As a result, an error message specifying no configuration file is shown.

Furthermore, if a user has remnant legacy configuration, the `doSwitch` and
`doBuild` functions will effectively build the activationPackage twice, with
the legacy configuration overriding the flake configuration.

A conditional check for FLAKE_CONFIG_URI was added to mitigate this by building
the legacy configuration when no flake configuration is present. There is one
exception which is when a flake configuration exists in the default location, where
the user can not build the legacy configuration as along as the file is present.
However, the tradeoff is acceptable as it matches current behavior when FLAKe_CONFIG_URI
is set for instantiation, and an user is unlikely to simulataneously switch
between the two mechanisms.

An abstract function for building flakes `doBuildFlake` was created to match
`doBuildAttrs` for  manageing options and build flags.

The --no-write-lock-file flag was removed from the --debug case as it is already
matched previously at the --recreate-lock-file case.
2021-11-24 19:09:53 -05:00
Sandro Jäckel
398c0b36a3
home-manager: properly forward exit codes 2021-11-19 23:47:57 +01:00
Sandro
3f12ce5f7d
home-manager: forward --no-write-lock-file (#2471) 2021-11-14 23:00:26 -05:00
Robert Helgesson
426830a174
home-manager: minor reorder of generated home.nix
It's a bit nicer to put the home options at the top, I think.
2021-11-14 00:13:53 +01:00
Robert Helgesson
be1ad30503
Remove remaining allowSubstitutes = false
See, e.g., https://github.com/NixOS/nix/issues/4442 for wider
discussions.
2021-11-12 23:24:08 +01:00
oxalica
70c5b268e1
xdg: add option 'xdg.stateHome' (#2439)
It corresponds to the newly introduced `XDG_STATE_HOME`.
2021-11-04 17:42:44 +01:00
Thiago Kenji Okada
e377556818
home-manager: remove top-level with pkgs.lib 2021-10-31 08:50:55 +01:00
Sandro
71902bc913
home-manager: fix command line option for nix build 2021-10-30 23:30:46 +02:00
c4605
1a6df903e3
home-manager: add command line argument --impure 2021-08-19 00:07:49 +02:00
Timur Demin
d11afee973
home-manager: allow remote builders for nix-build (#2268)
This allows running home-manager with --builders option passed through
to nix-build, which will then pass build execution to remote builders on
other machines.

This may be useful with relatively complex home-manager configurations
where building on a local machine is not feasible.
2021-08-17 16:53:44 -04:00
Sandro Jäckel
5f6364fc28
home-manager: add --no-out-link command line option
When this option is used then `home-manager build` will not produce a
`result` link in the current working directory.
2021-07-29 16:04:41 +02:00
Kid
0423a7b40c
fish: fix home-manager completion path 2021-07-25 00:32:20 +08:00
axion
82b06103ae
home-manager: add fish completion 2021-07-18 23:13:06 +02:00
Jörg Thalheim
9ed7a73ae2 home-manager: fix nixos-option fallback 2021-07-10 11:38:33 +02:00
Jörg Thalheim
ae636c09f4 Revert "Revert "home-manager: use nixos-option from pkgs""
This reverts commit 2c9fe368c1.
2021-07-10 11:21:04 +02:00
Jörg Thalheim
2c9fe368c1 Revert "home-manager: use nixos-option from pkgs"
This reverts commit d7d7bbbf20.
2021-07-10 11:17:32 +02:00
Robert Helgesson
d7d7bbbf20
home-manager: use nixos-option from pkgs
Fixes #2170
2021-07-10 09:34:55 +02:00
Nicolas Berbiche
5a19e0ea9c
home-manager: fix nixos-option evaluation (#2115) 2021-06-16 16:39:02 -04:00
Dusk Banks
63af2d3e4c
home-manager: add home-manager option
This adds functionality much like that provided by `nixos-option`.
2021-06-15 23:46:45 +02:00
bb010g
5eb199e937
home-manager: pass on --debug option (#2049)
* man-home-manager: remove trailing whitespace

* home-manager: pass on `--debug` option
2021-06-05 16:11:06 -06:00
Robert Helgesson
19d95258ac
docs: set current version to 21.11 2021-06-05 20:05:04 +02:00
Robert Helgesson
7fcfd9b565
home-manager: format home-manager/default.nix 2021-04-07 21:09:27 +02:00
ant-arctica
3a16ebdf72
home-manager: Add --flake option to home-manager (#1856)
Implements a --flake options for build and switch, along with the usual
flake related optons (for lock-files etc).

Configurations in the flake are automatically discovered in the
following order:
1. `outputs.homeConfigurations."$flake-uri"` (the `--flake parameter`)
2. `outputs.homeConfigurations."$USERNAME@$HOSTNAME"`
3. `outputs.homeConfigurations."$USERNAME"`

Make home-manager use default configuration from
~/.config/nixpkgs/flake.nix, if it exists and nothing else is
specified.

Co-authored-by: Nicolas Berbiche <nicolas@normie.dev>
2021-04-07 13:17:39 -04:00
Sandro
90223cf3eb
home-manager: allow overriding pkgs with --arg(str) (#1889) 2021-03-31 19:40:37 +02:00
Teo Ljungberg
69e2693342
home-manager: respect NO_COLOR environment variable
This makes Home Manager respect the NO_COLOR environment variable to
disable coloring from output generated by Home Manager.

This initiative can be found more on https://no-color.org/
2021-03-03 23:28:06 +01:00
Robert Helgesson
46a750f94f
home-manager: use 21.05 as next version
Fixes #1662
2021-02-05 22:09:00 +01:00
Anund
68dfc86173
home-manager: add zsh completion
Fixes #1075
2021-01-03 10:13:46 +01:00
Robert Helgesson
fd79015c0f
home-manager: pass -j to nix-build
Fixes #1596
2020-11-13 23:56:57 +01:00
Robert Helgesson
ef72617c4a
home-manager: add --version option 2020-11-03 23:12:24 +01:00
Robert Helgesson
072a6ea333
docs: change stable from 20.03 to 20.09 2020-11-02 23:13:20 +01:00
zimbatm
014d8deb60
tree-wide: update url to the repo 2020-10-22 22:41:56 +02:00
Samuel Ainsworth
7e5fee4268
home-manager: handle $EDITOR containing spaces
The quoted `$EDITOR` causes errors when using values containing
arguments, eg. "code --wait". This is in contrast to the majority of
tools (git, etc.) that do support this usage.

Fixes #1496
2020-10-08 23:17:28 +02:00
Robert Helgesson
2c6a023744
home-manager: remove home-manager-path on uninstall
Fixes #1443
2020-08-14 23:19:48 +02:00
Dmitry Kalinkin
dc227b579d
home-manager: respect NIX_STATE_DIR
This allows to install home-manager on a system without root access.

PR #1196
2020-06-14 20:41:55 +02:00
Robert Helgesson
b95ad63201
Deprecate use of builtins.getEnv
This removes the use of the non-deterministic function
`builtins.getEnv` for state version ≥ 20.09.

PR #1269
2020-05-26 00:28:59 +02:00
Matthew Bauer
4d49cee194
home-manager: allow unspecified confAttr
PR #1255
2020-05-21 14:04:13 +02:00
Robert Helgesson
42e4eef749
Update documentation for release 20.03 2020-04-23 00:29:11 +02:00
Robert Helgesson
687395ebda
home-manager: remove unsupported -2 option
This option used to make the `home-manager` command use the `nix` tool
from Nix 2. Unfortunately the `nix` tool is a bit experimental and it
is best to await its stabilization before supporting it in Home
Manager.
2020-04-18 11:37:06 +02:00
Robert Helgesson
e5325c2274
home-manager: fix shellcheck warning 2020-04-18 11:37:05 +02:00
Timo Kaufmann
5969551a5c
home-manager: add instantiate subcommand
It can be useful to simply instantiate a Home Manager configuration
without actually building it, for example for the purpose of
pre-building it with some custom command.

PR #1099
2020-03-25 21:16:43 +01:00
Chris Hodapp
9ab59dd6ac
home-manager: handle args with spaces to doBuildAttr
Presently, if you pass an argument with spaces in it to `doBuildAttr`,
it will be split it into multiple arguments to `nix build` or
`nix-build`. This situation arises, for example, on systems with
spaces in `XDG_DATA_HOME`.

Specifically, the `home-manager` script errors out in trying to
address the `read-news` state file. With this change, argument
separation should be preserved properly in `doBuildAttr`.

PR #1044
2020-02-24 23:51:36 +01:00
Robert Helgesson
e1153f4d2e
home-manager: make sure all files are uninstalled
This forces the `home.file` option to be completely empty when
switching to the uninstall configuration. This is necessary to guard
against files are added by default in Home Manager, such as
`$XDG_CACHE_HOME/.keep`.
2020-02-15 19:26:23 +01:00
Robert Helgesson
45abf3d38a
Apply nixfmt on many files 2020-02-02 01:07:28 +01:00
oxalica
7c30831e8f
home-manager: fix pass-through option passing
This resolves, e.g., the errors occurring when passing empty arguments
like `--option builders ''`.

Closes #967
2020-01-01 12:27:29 +01:00
Robert Helgesson
54f367b119
install: add state version to initial configuration
This sets the state version in recent installs to the latest released
version. It is beneficial for people to be aware of this option and it
is also good to help new users get a more recent setup.
2019-12-31 09:27:37 +01:00
Robert Helgesson
7c2532d9f9
home-manager: add --(no-)substitute options
Fixes #312
2019-12-01 10:43:39 +01:00
Robert Helgesson
8ab1d22a82
home-manager: support --option argument
Fixes #784
2019-08-30 00:52:09 +02:00
Robert Helgesson
8fe4e0879c
home-manager: support a few extra pass-through options
These options will be passed through to the `nix-build` tool.
2019-08-26 23:06:36 +02:00
Robert Helgesson
6bec9547c6
home-manager: exit directly after printing help 2019-08-26 23:06:36 +02:00
Robert Helgesson
fcdab6a62d
install: restrict to nix-shell
This commit adds a "build" command to the install derivation that
tells the user that `nix-shell` should be used.

A derivation attribute `shellHookOnly = true` is also added with the
intent to indicate that the shell hook is the entire point of the
derivation.
2019-08-15 23:23:43 +02:00
Robert Helgesson
42732990cd
home-manager: rewrite argument parsing
This rewrite allows "long options" but unfortunately does not allow
merged options such as `-vn`.

Also improve the home-manager manual page, with this it should include
all sub-commands and arguments.

Finally, include the home-manager manual page in the generated HTML
documentation.
2019-06-09 22:19:03 +02:00
Judson
f82246171b
files: backup file collisions
When a configuration file would be written to an existing file, rather
than failing switch (and having the user have to move or delete those
files), move the files automatically to a new path.

Closes #585
2019-06-09 14:26:12 +02:00
Sam Boosalis
2211770d8b
home-manager: add Bash completion 2019-06-01 14:00:38 +02:00
Robert Helgesson
3bb7c75db3
home-manager: add uninstall command 2019-04-28 18:40:41 +02:00
Robert Helgesson
67aee78fdf
home-manager: remove unnecessary error message
An error message about the erroneous option is already printed by
`getopts` so there is no need to print it again.
2019-04-10 01:31:22 +02:00
arcnmx
2c07829be2
home-manager: use callPackage where appropriate 2019-04-06 18:48:29 +02:00
Robert Helgesson
70d4cf2cd9
Remove some use of mkDerivation
Instead use `runCommand`, which by default uses `stdenvNoCC` resulting
in a reduced dependency footprint.

Fixes #612
2019-03-18 23:09:54 +01:00
zimbatm
571e17410a
home-manager: add edit command
With this change, running

    home-manager edit

opens `$HOME_MANAGER_CONFIG` in `$EDITOR`.

This is mainly for convenience. Users should not have to remember the
exact location of the Home Manager configuration.
2018-12-04 23:17:19 +01:00
Robert Helgesson
a37b5c9c61
Change installation instructions to use nix-channel
This avoids the uncontrollable nature of fetching the tarball as part
of the evaluation. Instead the user can decide when to update and also
perform rollbacks, if necessary.
2018-12-04 00:59:52 +01:00
Wael M. Nasreddine
30f3baabaf
home-manager: import modules using relative path 2018-12-04 00:39:34 +01:00
Alex Brandt
3b9b897af3
home-manager: add generation expiration command
This adds a new command to the home-manager shell script that allows
generations to be removed that are older than an given absolute or
relative date.

This allows users to manage the expiration of their home-manager
generations separately from their system or user profiles via
nix-collect-garbage. It is most important if the user desires to have
a convenient way to have different expiration times for Home Manager
generations than other system or user profiles.
2018-10-18 23:12:29 +02:00
Robert Helgesson
859c132ee2
home-manager: enable build output during switch
Fixes #352
2018-08-28 00:17:57 +02:00
Robert Helgesson
99c900946d
Avoid substitution for some derivations
In particular, don't bother attempting to do substitution of the home
files and home generation derivations since these rarely, if ever,
could be substituted.

Fixes #330
2018-07-31 21:16:36 +02:00
Robert Helgesson
39213a1847
home-manager: fix work directory when building generation 2018-07-31 21:05:05 +02:00
Robert Helgesson
4f67e8d0c3
home-manager: fix GC issue
It was previously possible to create the news information and lose it
in a Nix GC before being able to view it. This also causes a switch to
error out. This change makes the news information a root in the
garbage collector.

Note, this change also removes the need for `nix eval` so the
`doBuildAttr` function is simplified accordingly.

Fixes #327
2018-07-31 13:42:56 +02:00
Robert Helgesson
f4a1a5e94c
home-manager: resolve default configuration file path
Home Manager needs an absolute and resolved path to its configuration
file. The default configuration path is absolute but not necessarily
resolved. For example, some users may have `~/.config` be a symbolic
link to somewhere else. We therefore run the default configuration
path through the `realpath` tool to resolve it.

Fixes #304
2018-07-12 00:30:54 +02:00
Robert Helgesson
dadfaed829
home-manager: add support for the nix tool
This adds an experimantal, undocumented, and unsupported flag `-2` for
the `home-manager` command that enables the use of the new `nix`
command instead of `nix-build`.
2018-07-08 23:24:35 +02:00
Robert Helgesson
06e7d087f2
home-manager: colorize only when connected to terminal
Before, the output of `home-manager generations` would be colorized
even when used in a pipeline.
2018-03-03 22:00:02 +01:00
Robert Helgesson
81fb420457
home-manager: switch NIX_PATH order
This new order allows overriding the home-manager path from the
command line using `home-manager -I home-manager=/a/b/c`.
2018-01-28 18:37:01 +01:00
Robert Helgesson
5fe8d574ca
home-manager: add shellcheck directives 2018-01-27 09:49:35 +01:00
Robert Helgesson
a9dc7fa7cc
home-manager: improve the generation timestamp format 2018-01-27 09:47:30 +01:00
Mario Rodas
21fefbc8f6
home-manager: check whether a command is passed
"set -u" treats unset variables as an error, and $1 is unbound when no
command is passed.
2018-01-22 19:18:10 +01:00
Robert Helgesson
06d4f39e7b
home-manager: use shellHook to install
This changes the installation command from

    nix-shell $HM_PATH -A install --run 'home-manager switch'

to

    nix-shell $HM_PATH -A install

The added shell hook will print some useful information and run
`home-manager switch`.
2017-11-29 23:48:58 +01:00
Robert Helgesson
04ea044917
home-manager: look for '--help' on command line
This is a special case to work around the lack of long options in
`getopts`.
2017-11-12 14:11:59 +01:00
Robert Helgesson
66219f23bb
home-manager: add 'remove-generations' command
This command allows the user to immediately remove specific
generations from the profiles directory.
2017-11-12 14:07:41 +01:00
Robert Helgesson
187a12e90a
home-manager: minor cleanup output from generations 2017-11-12 13:37:59 +01:00
Cornelius Mika
b8ddb11796
use buildCommand for single phase builds 2017-11-06 14:24:04 +01:00
Robert Helgesson
14083a0857
home-manager: refuse build if CWD is read-only
This produces a clearer error message than produced by Nix.

Fixes #116.
2017-11-05 19:33:08 +01:00
Robert Helgesson
fa4f9197ee
home-manager: avoid import to improve error messages
When using `import` to inject the configuration into the module system
we lose the location in error messages, i.e., it just says
``<unknown-file>'`.
2017-11-02 11:19:12 +01:00
Robert Helgesson
efb5256d28
home-manager: use XDG configuration directory 2017-10-29 01:59:34 +02:00
Silvan Mosberger
35775b3bc5 fix typo 2017-10-24 13:12:18 +02:00
Robert Helgesson
bf3a8c6383
home-manager: point <home-manager> to project root
Before this path would point to the modules path. Using the project
root instead makes it possible to set `<home-manager>` to point to a
downloadable archive of Home Manager. This should make it
significantly easier to install and keep Home Manager up to date.

To match this change we also deprecate the Home Manager option

    programs.home-manager.modulesPath

and instead ask users to use

    programs.home-manager.path
2017-10-24 01:14:22 +02:00
Ruben Maher
5605e46acb
home-manager: fix typo 2017-10-22 10:59:09 +02:00
Robert Helgesson
2ff8c12bf9
home-manager: change platforms to unix 2017-10-18 00:45:29 +02:00
Robert Helgesson
bc40ab378c
home-manager: add license field 2017-10-16 18:40:34 +02:00
Robert Helgesson
cda222d2ec
home-manager: present news even if assertion failed 2017-09-09 17:14:07 +02:00
Robert Helgesson
ad1eee7aa5
home-manager: minor news build cleanups
- Rename the build function.

- Specify the built attribute in the build function.

- Make the news build silent.
2017-09-06 23:44:58 +02:00
Robert Helgesson
9c1b3735b4
home-manager: add news sub-command
This command allows the user to examine the news items generated by
the news module. See #52.

Many thanks to @nonsequitur and @uvNikita for suggestions and
improvements.
2017-09-05 11:37:07 +02:00
Robert Helgesson
39fc16954b
home-manager: make sure switch generation is GC root
Using `--no-out-link` is convenient but it does not set up a GC root,
so an unfortunately timed GC could remove the generation before
activation completes. Many thanks to @nonsequitur for noting this
problem.
2017-09-04 22:19:56 +02:00
Robert Helgesson
6611c16099
home-manager: print errors to stderr 2017-09-01 10:24:01 +02:00
Nikita Uvarov
5eff7f38df
home-manager: remove escaping
The Nix code that was extracted to its own file erroneously included
escaping of "${".
2017-08-28 17:56:56 +02:00
Robert Helgesson
e9ca4305a6
home-manager: move Nix code to own file 2017-08-28 11:37:34 +02:00