Compare commits

..

1 Commits

Author SHA1 Message Date
Robert Helgesson
de0070c4cf files: add preliminary support for full paths
This represents the first step in migrating `home.file` to support
arbitrary absolute paths. This is to allow Home Manager to manage
files anywhere, provided the user has sufficient privileges.

For example, with this change the configuration

    home.file."test/one".text = "foo";
    home.file."/test/two".text = "foo";

will result in the files "$HOME/test/one" and "/test/two",
respectively. Note, a relative file name will still be relative
`$HOME`.

To allow a reasonable transition between the old and new path handling
we introduce the notion of "generation directory layout version". The
version is simply a file `version` within the generation directory
containing a number indicating the version number.

The version 0 (also implied if the version file is missing) indicates
the legacy layout where managed file paths always are relative
`$HOME`.

Version 1 indicates the new layout where managed file paths are
relative `/`.
2021-07-27 23:42:51 +02:00
1136 changed files with 10422 additions and 41728 deletions

346
.github/CODEOWNERS vendored Normal file
View File

@@ -0,0 +1,346 @@
* @rycee
/flake.nix @bqv @kisik21
/modules/home-environment.nix @rycee
/modules/i18n/input-method @Kranzes
/tests/modules/i18n/input-method @Kranzes
/modules/misc/dconf.nix @gnidorah @rycee
/modules/misc/fontconfig.nix @rycee
/tests/modules/misc/fontconfig @rycee
/modules/misc/gtk.nix @rycee
/modules/config/i18n.nix @midchildan
/tests/modules/config/i18n @midchildan
/modules/misc/news.nix @rycee
/modules/misc/numlock.nix @evanjs
/tests/modules/misc/numlock @evanjs
/modules/misc/pam.nix @rycee
/tests/modules/misc/pam @rycee
/modules/misc/qt.nix @rycee
/modules/misc/submodule-support.nix @rycee
/modules/misc/tmpfiles.nix @dawidsowa
/modules/misc/vte.nix @rycee
/modules/misc/xdg-mime-apps.nix @pacien
/modules/misc/xdg-user-dirs.nix @pacien
/modules/misc/xdg-system-dirs.nix @tadfisher
/tests/modules/misc/xdg/system-dirs.nix @tadfisher
/modules/misc/xdg-desktop-entries.nix @cwyc
/tests/modules/misc/xdg/desktop-entries.nix @cwyc
/tests/modules/misc/xdg/desktop-full-expected.desktop @cwyc
/tests/modules/misc/xdg/desktop-min-expected.desktop @cwyc
/modules/programs/aria2.nix @JustinLovinger
/modules/programs/autojump.nix @evanjs
/tests/modules/programs/autojump @evanjs
/modules/programs/autorandr.nix @uvNikita
/modules/programs/bash.nix @rycee
/modules/programs/bat.nix @marsam
/modules/programs/beets.nix @rycee
/modules/programs/broot.nix @aheaume
/modules/programs/dircolors.nix @JustinLovinger
/modules/programs/direnv.nix @rycee
/modules/programs/eclipse.nix @rycee
/modules/programs/emacs.nix @rycee
/modules/programs/exa.nix @kalhauge
/modules/programs/firefox.nix @rycee
/modules/programs/foot.nix @plabadens
/tests/modules/programs/foot @plabadens
/modules/programs/gh.nix @Gerschtli
/tests/modules/programs/gh @Gerschtli
/modules/programs/git.nix @rycee
/modules/programs/gnome-terminal.nix @kamadorueda @rycee
/modules/programs/go.nix @rvolosatovs
/modules/programs/himalaya.nix @ambroisie
/tests/modules/programs/himalaya @ambroisie
/modules/programs/home-manager.nix @rycee
/modules/programs/htop.nix @bjpbakker
/modules/programs/i3status.nix @JustinLovinger
/modules/programs/i3status-rust.nix @workflow
/modules/programs/keychain.nix @marsam
/modules/programs/lazygit.nix @kalhauge
/modules/programs/lesspipe.nix @rycee
/modules/programs/lf.nix @owm111
/tests/modules/programs/lf @owm111
/modules/programs/lieer.nix @tadfisher
/modules/programs/lsd.nix @marsam
/modules/programs/matplotlib.nix @rprospero
/modules/programs/mangohud.nix @ZerataX
/tests/modules/programs/mangohud @ZerataX
/modules/programs/mbsync.nix @KarlJoad
/tests/modules/programs/mbsync @KarlJoad
/modules/programs/mcfly.nix @marsam
/modules/programs/mpv.nix @tadeokondrak @thiagokokada
/tests/modules/programs/mpv @thiagokokada
/modules/programs/mu.nix @KarlJoad
/modules/programs/ncmpcpp.nix @olmokramer
/tests/modules/programs/ncmpcpp @olmokramer
/tests/modules/programs/ncmpcpp-linux @olmokramer
/modules/programs/ncspot.nix @marsam
/modules/programs/ne.nix @cwyc
/tests/modules/programs/ne @cwyc
/modules/programs/newsboat.nix @sumnerevans
/tests/modules/programs/newsboat @sumnerevans
/modules/programs/nix-index.nix @ambroisie
/tests/modules/programs/nix-index @ambroisie
/modules/programs/noti.nix @marsam
/modules/programs/nushell.nix @Philipp-M
/tests/modules/programs/nushell @Philipp-M
/modules/programs/obs-studio.nix @adisbladis
/modules/programs/octant.nix @06kellyjac
/modules/programs/opam.nix @marsam
/modules/programs/openssh.nix @rycee
/modules/programs/password-store.nix @pacien
/modules/programs/pazi.nix @marsam
/modules/programs/pidgin.nix @rycee
/modules/programs/piston-cli.nix @ethancedwards8
/modules/programs/powerline-go.nix @DamienCassou
/modules/programs/rbw.nix @ambroisie
/tests/modules/programs/rbw @ambroisie
/modules/programs/rofi.nix @thiagokokada
/tests/modules/programs/rofi @thiagokokada
/modules/programs/rofi-pass.nix @seylerius
/tests/modules/programs/rofi-pass @seylerius
/modules/programs/rtorrent.nix @marsam
/modules/programs/sbt.nix @kubukoz
/tests/modules/programs/sbt @kubukoz
/modules/programs/scmpuff.nix @cpcloud
/tests/modules/programs/scmpuff @cpcloud
/modules/programs/senpai.nix @malte-v
/modules/programs/sm64ex.nix @ivarwithoutbones
/tests/modules/programs/sm64ex @ivarwithoutbones
/modules/programs/ssh.nix @rycee
/modules/programs/starship.nix @marsam
/modules/programs/terminator.nix @chisui
/modules/programs/texlive.nix @rycee
/modules/programs/topgrade.nix @msfjarvis
/tests/modules/programs/topgrade @msfjarvis
/modules/programs/waybar.nix @berbiche
/tests/modules/programs/waybar @berbiche
/modules/programs/xmobar.nix @t4ccer
/tests/modules/programs/xmobar @t4ccer
/modules/programs/z-lua.nix @marsam
/modules/programs/zathura.nix @rprospero
/modules/programs/zoxide.nix @marsam
/modules/programs/zsh/prezto.nix @NickHu
/modules/services/barrier.nix @Kritnich
/tests/modules/services/barrier @Kritnich
/modules/services/caffeine.nix @uvNikita
/modules/services/cbatticon.nix @pmiddend
/modules/services/clipmenu.nix @DamienCassou
/modules/services/devilspie2.nix @dawidsowa
/tests/modules/services/devilspie2 @dawidsowa
/modules/services/dropbox.nix @eyJhb
/tests/modules/services/dropbox @eyJhb
/modules/services/dunst.nix @rycee
/modules/services/emacs.nix @tadfisher
/modules/services/etesync-dav.nix @Valodim
/modules/services/flameshot.nix @moredhel
/modules/services/fluidsynth.nix @Valodim
/modules/services/gnome-keyring.nix @rycee
/modules/services/gpg-agent.nix @rycee
/modules/services/grobi.nix @mbrgm
/modules/services/hound.nix @adisbladis
/modules/services/imapnotify.nix @nickhu
/modules/services/kanshi.nix @nurelin
/tests/modules/services/kanshi @nurelin
/modules/services/kdeconnect.nix @adisbladis
/modules/services/keepassx.nix @rycee
/modules/services/lieer.nix @tadfisher
/modules/services/lorri.nix @Gerschtli
/modules/services/mako.nix @onny
/modules/services/mbsync.nix @pjones
/modules/services/mpdris2.nix @pjones
/modules/services/mpris-proxy.nix @ThibautMarty
/modules/services/muchsync.nix @pacien
/modules/services/network-manager-applet.nix @rycee
/modules/services/pantalaimon.nix @jojosch
/tests/modules/services/pantalaimon @jojosch
/modules/services/parcellite.nix @gleber
/modules/services/pass-secret-service.nix @cab404
/modules/services/password-store-sync.nix @pacien
/modules/services/pasystray.nix @pltanton
/modules/services/pbgopy.nix @ivarwithoutbones
/tests/modules/services/pbgopy @ivarwithoutbones
/modules/services/plan9port.nix @ehmry
/modules/services/playerctld.nix @fendse
/tests/modules/playerctld @fendse
/modules/services/poweralertd.nix @ThibautMarty
/modules/services/pulseeffects.nix @jonringer
/modules/services/random-background.nix @rycee
/modules/services/redshift-gammastep @rycee @petabyteboy @thiagokokada
/tests/modules/redshift-gammastep @thiagokokada
/modules/services/status-notifier-watcher.nix @pltanton
/modules/services/syncthing.nix @rycee
/modules/services/taffybar.nix @rycee
/modules/services/tahoe-lafs.nix @rycee
/modules/services/taskwarrior-sync.nix @minijackson @pacien
/modules/services/trayer.nix @AndreasMager
/tests/modules/services/trayer @AndreasMager
/modules/services/udiskie.nix @rycee
/modules/services/unison.nix @pacien
/modules/services/window-managers/bspwm @ncfavier
/tests/modules/services/window-managers/bspwm @ncfavier
/modules/services/window-managers/i3-sway/i3.nix @sumnerevans
/tests/modules/services/window-managers/i3 @sumnerevans
/modules/services/window-managers/i3-sway/lib @sumnerevans
/modules/services/window-managers/i3-sway/sway.nix @alexarice @sumnerevans
/tests/modules/services/window-managers/sway @sumnerevans
/modules/services/wlsunset.nix @matrss
/tests/modules/services/wlsunset @matrss
/modules/services/xcape.nix @nickhu
/modules/services/xembed-sni-proxy.nix @rycee
/modules/services/xidlehook.nix @dschrempf
/modules/services/xscreensaver.nix @rycee
/modules/services/xsuspender.nix @offlinehacker
/modules/systemd.nix @rycee
/modules/xcursor.nix @league
/modules/xresources.nix @rycee
/modules/xsession.nix @rycee
/modules/services/volnoti.nix @IvanMalison

View File

@@ -8,15 +8,6 @@ labels: [bug, triage]
assignees: [rycee, berbiche, sumnerevans]
body:
- type: checkboxes
attributes:
label: Are you following the right branch?
description: |
You should follow the branch of Home Manager that corresponds to your
version of Nixpkgs; see [the README](https://github.com/nix-community/home-manager#releases) for details.
options:
- label: My Nixpkgs and Home Manager versions are in sync
required: true
- type: checkboxes
attributes:
label: Is there an existing issue for this?

View File

@@ -15,7 +15,7 @@ pull-request.
Also make sure to read the guidelines found at
https://github.com/nix-community/home-manager/blob/master/docs/contributing.adoc#sec-guidelines
https://github.com/nix-community/home-manager/blob/master/doc/contributing.adoc#sec-guidelines
-->
@@ -23,7 +23,7 @@ Also make sure to read the guidelines found at
- [ ] Code formatted with `./format`.
- [ ] Code tested through `nix-shell --pure tests -A run.all` or `nix develop --ignore-environment .#all` using Flakes.
- [ ] Code tested through `nix-shell --pure tests -A run.all`.
- [ ] Test cases updated/added. See [example](https://github.com/nix-community/home-manager/commit/f3fbb50b68df20da47f9b0def5607857fcc0d021#diff-b61a6d542f9036550ba9c401c80f00ef).
@@ -35,8 +35,10 @@ Also make sure to read the guidelines found at
{long description}
```
See [CONTRIBUTING](https://github.com/nix-community/home-manager/blob/master/docs/contributing.adoc#sec-commit-style) for more information and [recent commit messages](https://github.com/nix-community/home-manager/commits/master) for examples.
See [CONTRIBUTING](https://github.com/nix-community/home-manager/blob/master/doc/contributing.adoc#sec-commit-style) for more information and [recent commit messages](https://github.com/nix-community/home-manager/commits/master) for examples.
- If this PR adds a new module
- [ ] Added myself as module maintainer. See [example](https://github.com/nix-community/home-manager/blob/068ff76a10e95820f886ac46957edcff4e44621d/modules/programs/lesspipe.nix#L6).
- [ ] Added myself and the module files to `.github/CODEOWNERS`.

View File

@@ -10,7 +10,7 @@ updates:
- package-ecosystem: "github-actions"
directory: "/"
target-branch: "release-23.05"
target-branch: "release-20.09"
schedule:
interval: "weekly"
commit-message:

29
.github/labeler.yml vendored
View File

@@ -1,29 +0,0 @@
"mail":
- modules/programs/aerc*.nix
- modules/programs/alot*.nix
- tests/modules/programs/aerc/*
- tests/modules/programs/alot/*
- modules/programs/mujmap.nix
- tests/modules/programs/mujmap/*
- modules/programs/notmuch.nix
- modules/programs/neomutt*
- tests/modules/programs/neomutt/*
- modules/programs/getmail*
- modules/*/mbsync*
- tests/modules/programs/mbsync/*
- modules/programs/himalaya.nix
- tests/modules/programs/himalaya/*
- modules/programs/thunderbird.nix
- tests/modules/programs/thunderbird/*
- modules/services/imapnotify.nix
"neovim":
- modules/programs/neovim.nix
- tests/modules/programs/neovim/**/*
"shell":
- modules/lib/zsh.nix
- modules/programs/zsh*
- modules/programs/bash*
- tests/modules/programs/zsh/**/*

18
.github/stale.yml vendored
View File

@@ -1,14 +1,14 @@
# Configuration for probot-stale - https://github.com/probot/stale
daysUntilStale: 90
daysUntilClose: false
daysUntilClose: 7
staleLabel: "status: stale"
closeComment: false
issues:
markComment: |
<p>
Thank you for your contribution!
I marked this issue as stale due to inactivity.
Please be considerate of people watching this issue and receiving notifications before commenting 'I have this issue too'.
We welcome additional information that will help resolve this issue.
If this remains inactive for another 7 days, I will close this issue.
<b>Please read the relevant sections below before commenting.</b>
</p>
@@ -36,8 +36,11 @@ issues:
<details>
<summary><b>Memorandum on closing issues</b></summary>
<p>
Don't be afraid to manually close an issue, even if it holds valuable information.
Closed issues stay in the system for people to search, read, cross-reference, or even reopen nothing is lost!
If you have nothing of substance to add, please refrain from commenting and allow the bot close the issue.
Also, don't be afraid to manually close an issue, even if it holds valuable information.
</p>
<p>
Closed issues stay in the system for people to search, read, cross-reference, or even reopen--nothing is lost!
Closing obsolete issues is an important way to help maintainers focus their time and effort.
</p>
</details>
@@ -46,6 +49,7 @@ pulls:
<p>
Thank you for your contribution!
I marked this pull request as stale due to inactivity.
If this remains inactive for another 7 days, I will close this PR.
<b>Please read the relevant sections below before commenting.</b>
</p>
@@ -53,7 +57,7 @@ pulls:
<summary><b>If you are the original author of the PR</b></summary>
<p>
* GitHub sometimes doesn't notify people who commented / reviewed a PR previously when you (force) push commits. *If you have addressed the reviews* you can [officially ask for a review](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/requesting-a-pull-request-review) from those who commented to you or anyone else.
* GitHub sometimes doesn't notify people who commented / reviewed a PR previously, when you (force) push commits. *If you have addressed the reviews* you can [officially ask for a review](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/requesting-a-pull-request-review) from those who commented to you or anyone else.
* If it is unfinished but you plan to finish it, please mark it as a draft.
* If you don't expect to work on it any time soon, please consider closing it with a short comment encouraging someone else to pick up your work.
* To get things rolling again, rebase the PR against the target branch and address valid comments.
@@ -62,7 +66,7 @@ pulls:
</details>
<details>
<summary><b>If you are <i>not</i> the original author of the PR</b></summary>
<summary><b>If you are <i>not</i> the original author of the issue</b></summary>
<p>
* If you want to pick up the work on this PR, please create a new PR and indicate that it supercedes and closes this PR.

View File

@@ -10,14 +10,14 @@ jobs:
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v20
- uses: actions/checkout@v2
- uses: cachix/install-nix-action@v13
with:
nix_path: nixpkgs=channel:nixos-unstable
- uses: cachix/cachix-action@v12
- uses: cachix/cachix-action@v10
with:
name: nix-community
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
- run: |
nix-build -A docs.html
cp -r result/share/doc/home-manager public

View File

@@ -1,24 +0,0 @@
name: "Label PR"
on:
- pull_request_target
# WARNING:
# When extending this action, be aware that $GITHUB_TOKEN allows some write
# access to the GitHub API. This means that it should not evaluate user input in
# a way that allows code injection.
permissions:
contents: read
pull-requests: write
jobs:
labels:
runs-on: ubuntu-latest
if: github.repository_owner == 'nix-community'
steps:
- uses: actions/labeler@v4
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
sync-labels: true

View File

@@ -6,25 +6,18 @@ on:
jobs:
tests:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v20
- uses: actions/checkout@v2
- uses: cachix/install-nix-action@v13
with:
nix_path: nixpkgs=channel:nixos-unstable
- uses: cachix/cachix-action@v12
- uses: cachix/cachix-action@v10
with:
name: nix-community
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- run: |
if grep -R --exclude stdlib-extended.nix literalExample modules ; then
echo "Error: literalExample should be replaced by literalExpression" > /dev/stderr
exit 1
fi
- run: nix-build -A docs.jsonModuleMaintainers
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
- run: ./format -c
- run: nix-shell . -A install
- run: nix-shell --arg enableBig false --pure tests -A run.all
- run: nix-shell --pure tests -A run.all

View File

@@ -1,20 +0,0 @@
name: Update flake inputs
on:
schedule:
# Update every Sunday and Wednesday
- cron: "51 3 * * 0,3"
workflow_dispatch:
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install Nix
uses: cachix/install-nix-action@v20
- name: Update flake.lock
uses: DeterminateSystems/update-flake-lock@v19
with:
token: ${{ secrets.GH_TOKEN_FOR_UPDATES }}
pr-labels: dependencies

1
.gitignore vendored
View File

@@ -1 +1,2 @@
/flake.lock
/result*

View File

@@ -4,14 +4,25 @@ variables:
NIX_PATH: "nixpkgs=channel:nixos-unstable"
stages:
- test
- deploy
Run tests:
stage: test
script:
- nix-shell --pure tests -A run.files-text
rules:
- if: $CI_COMMIT_BRANCH == "master"
when: always
pages:
stage: deploy
script:
- nix-build -A docs.html
- mkdir -p ~/.config/nixpkgs
- echo '{ manual.html.enable = true; }' > ~/.config/nixpkgs/home.nix
- nix-shell . -A install
- mkdir public
- cp -r ./result/share/doc/home-manager/* public/
- cp -r ~/.nix-profile/share/doc/home-manager/* public/
artifacts:
paths:
- public

View File

@@ -1 +1 @@
23.11
21.11

1
CONTRIBUTING.adoc Symbolic link
View File

@@ -0,0 +1 @@
doc/contributing.adoc

1
FAQ.adoc Symbolic link
View File

@@ -0,0 +1 @@
doc/faq.adoc

View File

@@ -1,6 +1,6 @@
MIT License
Copyright (c) 2017-2023 Home Manager contributors
Copyright (c) 2017-2020 Home Manager contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@@ -1,20 +0,0 @@
.PHONY: all all-tests test test-install format
NIXPKGS_REV := nixpkgs-unstable
NIX_PATH := nixpkgs=https://github.com/NixOS/nixpkgs/archive/${NIXPKGS_REV}.tar.gz
all: all-tests test-install
all-tests:
$(MAKE) test TEST=all
test:
ifndef TEST
$(error Use 'make test TEST=<test_name>' to run desired test)
endif
nix-shell --pure tests -I ${NIX_PATH} -A run.${TEST}
test-install:
HOME=$(shell mktemp -d) NIX_PATH=${NIX_PATH} nix-shell . -A install
format:
./format

395
README.md
View File

@@ -6,31 +6,10 @@ using the [Nix][] package manager together with the Nix libraries
found in [Nixpkgs][]. It allows declarative configuration of user
specific (non global) packages and dotfiles.
Usage
-----
Before attempting to use Home Manager please read the warning below.
For a systematic overview of Home Manager and its available options,
please see
- the [Home Manager manual][manual],
- the [Home Manager configuration options][configuration options], and
- the 3rd party [Home Manager option search](https://mipmip.github.io/home-manager-option-search/).
If you would like to contribute to Home Manager
then please have a look at the [contributing][] chapter of the manual.
Releases
--------
Home Manager is developed against `nixpkgs-unstable` branch, which
often causes it to contain tweaks for changes/packages not yet
released in stable NixOS. To avoid breaking users' configurations,
Home Manager is released in branches corresponding to NixOS releases
(e.g. `release-23.05`). These branches get fixes, but usually not new
modules. If you need a module to be backported, then feel free to open
an issue.
For a more systematic overview of Home Manager and its available
options, please see the [Home Manager manual][manual].
Words of warning
----------------
@@ -53,14 +32,14 @@ will write to your dconf store and cannot tell whether a configuration
that it is about to be overwritten was from a previous Home Manager
generation or from manual configuration.
Home Manager targets [NixOS][] unstable and NixOS version 23.05 (the
Home Manager targets [NixOS][] unstable and NixOS version 21.05 (the
current stable version), it may or may not work on other Linux
distributions and NixOS versions.
Also, the `home-manager` tool does not explicitly support rollbacks at
the moment so if your home directory gets messed up you'll have to fix
it yourself. See the [rollbacks][] section for instructions on how to
manually perform a rollback.
it yourself. See the [rollbacks](#rollbacks) section for instructions
on how to manually perform a rollback.
Now when your expectations have been built up and you are eager to try
all this out you can go ahead and read the rest of this text.
@@ -68,68 +47,340 @@ all this out you can go ahead and read the rest of this text.
Contact
-------
You can chat with us on IRC in the channel [#home-manager][] on [OFTC][].
There is also a [Matrix room](https://matrix.to/#/#hm:rycee.net),
which is bridged to the IRC channel.
You can chat with us on IRC in the channel [#home-manager][] on
[OFTC][].
Installation
------------
Home Manager can be used in three primary ways:
Currently the easiest way to install Home Manager is as follows:
1. Using the standalone `home-manager` tool. For platforms other than
NixOS and Darwin, this is the only available choice. It is also
recommended for people on NixOS or Darwin that want to manage their
home directory independently of the system as a whole. See
[Standalone installation][manual standalone install] in the manual
for instructions on how to perform this installation.
1. Make sure you have a working Nix installation. Specifically, make
sure that your user is able to build and install Nix packages. For
example, you should be able to successfully run a command like
`nix-instantiate '<nixpkgs>' -A hello` without having to switch to
the root user. For a multi-user install of Nix this means that
your user must be covered by the
[`allowed-users`][nixAllowedUsers] Nix option. On NixOS you can
control this option using the
[`nix.allowedUsers`][nixosAllowedUsers] system option.
2. As a module within a NixOS system configuration. This allows the
user profiles to be built together with the system when running
`nixos-rebuild`. See [NixOS module installation][manual nixos
install] in the manual for a description of this setup.
Note that Nix 2.4 (`nixUnstable`) is not yet supported.
3. As a module within a [nix-darwin][] system configuration. This
allows the user profiles to be built together with the system when
running `darwin-rebuild`. See [nix-darwin module
installation][manual nix-darwin install] in the manual for a
description of this setup.
2. Add the appropriate Home Manager channel. If you are following
Nixpkgs master or an unstable channel you can run
Home Manager provides both the channel-based setup and the flake-based one.
See [Nix Flakes][manual nix flakes] for a description of the flake-based setup.
```console
$ nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager
$ nix-channel --update
```
Translations
------------
and if you follow a Nixpkgs version 21.05 channel you can run
Home Manager has basic support for internationalization through
[gettext](https://www.gnu.org/software/gettext/). The translations are
hosted by [Weblate](https://weblate.org/). If you would like to
contribute to the translation effort then start by going to the
[Home Manager Weblate project](https://hosted.weblate.org/engage/home-manager/).
```console
$ nix-channel --add https://github.com/nix-community/home-manager/archive/release-21.05.tar.gz home-manager
$ nix-channel --update
```
<a href="https://hosted.weblate.org/engage/home-manager/">
<img src="https://hosted.weblate.org/widgets/home-manager/-/multi-auto.svg" alt="Translation status" />
</a>
On NixOS you may need to log out and back in for the channel to
become available. On non-NixOS you may have to add
License
-------
```shell
export NIX_PATH=$HOME/.nix-defexpr/channels${NIX_PATH:+:}$NIX_PATH
```
This project is licensed under the terms of the [MIT license](LICENSE).
to your shell (see [nix#2033](https://github.com/NixOS/nix/issues/2033)).
[Nix]: https://nixos.org/explore.html
3. Install Home Manager and create the first Home Manager generation:
```console
$ nix-shell '<home-manager>' -A install
```
Once finished, Home Manager should be active and available in your
user environment.
3. If you do not plan on having Home Manager manage your shell
configuration then you must source the
```
$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh
```
file in your shell configuration. Unfortunately, in this specific
case we currently only support POSIX.2-like shells such as
[Bash][] or [Z shell][].
For example, if you use Bash then add
```bash
. "$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh"
```
or this when managing home configuration together with system
configuration
```bash
. "/etc/profiles/per-user/$USER/etc/profile.d/hm-session-vars.sh"
```
to your `~/.profile` file.
If instead of using channels you want to run Home Manager from a Git
checkout of the repository then you can use the
`programs.home-manager.path` option to specify the absolute path to
the repository.
Usage
-----
Home Manager is typically managed through the `home-manager` tool.
This tool can, for example, apply configurations to your home
directory, list user packages installed by the tool, and list the
configuration generations.
As an example, let us expand the initial configuration file from the
installation above to install the htop and fortune packages, install
Emacs with a few extra packages enabled, install Firefox with
smooth scrolling disabled, and enable the user gpg-agent service.
To satisfy the above setup we should elaborate the
`~/.config/nixpkgs/home.nix` file as follows:
```nix
{ pkgs, ... }:
{
home.packages = [
pkgs.htop
pkgs.fortune
];
programs.emacs = {
enable = true;
extraPackages = epkgs: [
epkgs.nix-mode
epkgs.magit
];
};
programs.firefox = {
enable = true;
profiles = {
myprofile = {
settings = {
"general.smoothScroll" = false;
};
};
};
};
services.gpg-agent = {
enable = true;
defaultCacheTtl = 1800;
enableSshSupport = true;
};
programs.home-manager = {
enable = true;
path = "…";
};
}
```
To activate this configuration you can then run
```console
$ home-manager switch
```
or if you are not feeling so lucky,
```console
$ home-manager build
```
which will create a `result` link to a directory containing an
activation script and the generated home directory files.
Documentation of available configuration options, including
descriptions and usage examples, is available in the [Home Manager
manual][configuration options] or offline by running
```console
$ man home-configuration.nix
```
Rollbacks
---------
While the `home-manager` tool does not explicitly support rollbacks at
the moment it is relatively easy to perform one manually. The steps to
do so are
1. Run `home-manager generations` to determine which generation you
wish to rollback to:
```console
$ home-manager generations
2018-01-04 11:56 : id 765 -> /nix/store/kahm1rxk77mnvd2l8pfvd4jkkffk5ijk-home-manager-generation
2018-01-03 10:29 : id 764 -> /nix/store/2wsmsliqr5yynqkdyjzb1y57pr5q2lsj-home-manager-generation
2018-01-01 12:21 : id 763 -> /nix/store/mv960kl9chn2lal5q8lnqdp1ygxngcd1-home-manager-generation
2017-12-29 21:03 : id 762 -> /nix/store/6c0k1r03fxckql4vgqcn9ccb616ynb94-home-manager-generation
2017-12-25 18:51 : id 761 -> /nix/store/czc5y6vi1rvnkfv83cs3rn84jarcgsgh-home-manager-generation
```
2. Copy the Nix store path of the generation you chose, e.g.,
/nix/store/mv960kl9chn2lal5q8lnqdp1ygxngcd1-home-manager-generation
for generation 763.
3. Run the `activate` script inside the copied store path:
```console
$ /nix/store/mv960kl9chn2lal5q8lnqdp1ygxngcd1-home-manager-generation/activate
Starting home manager activation
```
Keeping your ~ safe from harm
-----------------------------
To configure programs and services Home Manager must write various
things to your home directory. To prevent overwriting any existing
files when switching to a new generation, Home Manager will attempt to
detect collisions between existing files and generated files. If any
such collision is detected the activation will terminate before
changing anything on your computer.
For example, suppose you have a wonderful, painstakingly created
`~/.config/git/config` and add
```nix
{
# …
programs.git = {
enable = true;
userName = "Jane Doe";
userEmail = "jane.doe@example.org";
};
# …
}
```
to your configuration. Attempting to switch to the generation will
then result in
```console
$ home-manager switch
Activating checkLinkTargets
Existing file '/home/jdoe/.config/git/config' is in the way
Please move the above files and try again
```
Graphical services
------------------
Home Manager includes a number of services intended to run in a
graphical session, for example `xscreensaver` and `dunst`.
Unfortunately, such services will not be started automatically unless
you let Home Manager start your X session. That is, you have something
like
```nix
{
# …
services.xserver.enable = true;
# …
}
```
in your system configuration and
```nix
{
# …
xsession.enable = true;
xsession.windowManager.command = "…";
# …
}
```
in your Home Manager configuration.
Nix Flakes
----------
Home Manager includes a `flake.nix` file for compatibility with [Nix Flakes][]
for those that wish to use it as a module. A bare-minimum `flake.nix` would be
as follows:
```nix
{
description = "NixOS configuration";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager.url = "github:nix-community/home-manager";
};
outputs = { home-manager, nixpkgs, ... }: {
nixosConfigurations = {
hostname = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./configuration.nix
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.jdoe = import ./home.nix;
}
];
};
};
};
}
```
Note, the Home Manager library is exported by the flake under
`lib.hm`.
When using flakes, switch to new configurations as you do for the
whole system (e. g. `nixos-rebuild switch --flake <path>`) instead of
using the `home-manager` command line tool.
Releases
--------
Home Manager is developed against `nixpkgs-unstable` branch, which
often causes it to contain tweaks for changes/packages not yet
released in stable NixOS. To avoid breaking users' configurations,
Home Manager is released in branches corresponding to NixOS releases
(e.g. `release-21.05`). These branches get fixes, but usually not new
modules. If you need a module to be backported, then feel free to open
an issue.
[Bash]: https://www.gnu.org/software/bash/
[Nix]: https://nixos.org/nix/
[NixOS]: https://nixos.org/
[Nixpkgs]: https://github.com/NixOS/nixpkgs
[manual]: https://nix-community.github.io/home-manager/index.html
[contributing]: https://nix-community.github.io/home-manager/#ch-contributing
[manual usage]: https://nix-community.github.io/home-manager/#ch-usage
[Nixpkgs]: https://nixos.org/nixpkgs/
[nixAllowedUsers]: https://nixos.org/nix/manual/#conf-allowed-users
[nixosAllowedUsers]: https://nixos.org/nixos/manual/options.html#opt-nix.allowedUsers
[Z shell]: http://zsh.sourceforge.net/
[manual]: https://nix-community.github.io/home-manager/
[configuration options]: https://nix-community.github.io/home-manager/options.html
[#home-manager]: https://webchat.oftc.net/?channels=home-manager
[OFTC]: https://oftc.net/
[Nix Pills]: https://nixos.org/guides/nix-pills/
[samueldr]: https://github.com/samueldr/
[Nix Pills]: https://nixos.org/nixos/nix-pills/
[Nix Flakes]: https://nixos.wiki/wiki/Flakes
[nix-darwin]: https://github.com/LnL7/nix-darwin
[manual standalone install]: https://nix-community.github.io/home-manager/index.html#sec-install-standalone
[manual nixos install]: https://nix-community.github.io/home-manager/index.html#sec-install-nixos-module
[manual nix-darwin install]: https://nix-community.github.io/home-manager/index.html#sec-install-nix-darwin-module
[manual nix flakes]: https://nix-community.github.io/home-manager/index.html#ch-nix-flakes
[rollbacks]: https://nix-community.github.io/home-manager/index.html#sec-usage-rollbacks

View File

@@ -1,11 +1,10 @@
{ pkgs ? import <nixpkgs> { } }:
rec {
docs = with import ./docs { inherit pkgs; }; {
docs = with import ./doc { inherit pkgs; }; {
html = manual.html;
manPages = manPages;
json = options.json;
jsonModuleMaintainers = jsonModuleMaintainers; # Unstable, mainly for CI.
};
home-manager = pkgs.callPackage ./home-manager { path = toString ./.; };

View File

@@ -28,11 +28,6 @@ Assuming your clone is at `$HOME/devel/home-manager` then you can make the `home
[source,console]
$ home-manager -I home-manager=$HOME/devel/home-manager
+
or, if using <<sec-flakes-standalone,flakes>>:
+
[source,console]
$ home-manager --override-input home-manager ~/devel/home-manager
+
or
2. changing the default path by ensuring your configuration includes
@@ -50,8 +45,8 @@ The first option is good if you only temporarily want to use your clone.
[[sec-guidelines]]
=== Guidelines
:irc-home-manager: https://webchat.oftc.net/?channels=home-manager
:valuable-options: https://github.com/NixOS/rfcs/blob/master/rfcs/0042-config-option.md#valuable-options
:rfc-42: https://github.com/NixOS/rfcs/blob/master/rfcs/0042-config-option.md
:valuable-options: https://github.com/Infinisil/rfcs/blob/config-option/rfcs/0042-config-option.md#valuable-options
:rfc-42: https://github.com/Infinisil/rfcs/blob/config-option/rfcs/0042-config-option.md
:assertions: https://nixos.org/manual/nixos/stable/index.html#sec-assertions
If your contribution satisfy the following rules then there is a good chance it will be merged without too much trouble. The rules are enforced by the Home Manager maintainers and to a lesser extent the Home Manager CI system.
@@ -110,15 +105,17 @@ When you have made changes to a module, it is a good idea to check that the man
[source,console]
$ nix-build -A docs.manPages
$ man ./result/share/man/man5/home-configuration.nix.5.gz
$ man ./result/share/man/man5/home-configuration.nix.5
==== Add yourself as a module maintainer
Every new module _must_ include a named maintainer using the `meta.maintainers` attribute. If you are a user of a module that currently lacks a maintainer then please consider adopting it.
If you are present in the nixpkgs maintainer list then you can use that entry. If you are not then you can add yourself to `modules/lib/maintainers.nix` in the Home Manager project.
If you are present in the NixOS maintainer list then you can use that entry. If you are not then you can add yourself to `modules/lib/maintainers.nix` in the Home Manager project.
Maintainers are encouraged to join the IRC or Matrix channel and participate when they have opportunity.
Also add yourself to `.github/CODEOWNERS` as owner of the associated module files, including the test files. You will then be automatically added as a reviewer on any new pull request that touches your files.
Maintainers are encouraged to join the IRC channel and participate when they have opportunity.
[[sec-guidelines-code-style]]
==== Format your code
@@ -158,7 +155,7 @@ A potential gotcha with respect to licensing are option descriptions. Often it i
The commits in your pull request should be reasonably self-contained, that is, each commit should make sense in isolation. In particular, you will be asked to amend any commit that introduces syntax errors or similar problems even if they are fixed in a later commit.
The commit messages should follow the {seven-rules}[seven rules], except for "Capitalize the subject line". We also ask you to include the affected code component or module in the first line. That is, a commit message should follow the template
The commit messages should follow the {seven-rules}[seven rules]. We also ask you to include the affected code component or module in the first line. That is, a commit message should follow the template
----
{component}: {description}
@@ -259,8 +256,3 @@ and run an individual test, for example `alacritty-empty-settings`, through
[source,console]
$ nix-shell --pure tests -A run.alacritty-empty-settings
However, those invocations will impurely source the systems nixpkgs, and may cause failures. To run against the nixpkgs from the flake.lock, use instead e.g.
[source,console]
$ nix develop --ignore-environment .#all

View File

@@ -5,10 +5,12 @@
let
nmdSrc = fetchTarball {
url =
"https://git.sr.ht/~rycee/nmd/archive/abb15317ebd17e5a0a7dd105e2ce52f2700185a8.tar.gz";
sha256 = "0zzrbjxf15hada279irif7s3sb8vs95jn4y4f8694as0j739gd1m";
nmdSrc = pkgs.fetchFromGitLab {
name = "nmd";
owner = "rycee";
repo = "nmd";
rev = "2398aa79ab12aa7aba14bc3b08a6efd38ebabdc5";
sha256 = "0yxb48afvccn8vvpkykzcr4q1rgv8jsijqncia7a5ffzshcrwrnh";
};
nmd = import nmdSrc { inherit lib pkgs; };
@@ -24,8 +26,6 @@ let
}];
};
dontCheckDefinitions = { _module.check = false; };
buildModulesDocs = args:
nmd.buildModulesDocs ({
moduleRootPaths = [ ./.. ];
@@ -43,7 +43,21 @@ let
};
nixosModuleDocs = buildModulesDocs {
modules = [ ../nixos scrubbedPkgsModule dontCheckDefinitions ];
modules = let
nixosModule = module: pkgs.path + "/nixos/modules" + module;
mockedNixos = with lib; {
options = {
environment.pathsToLink = mkSinkUndeclaredOptions { };
systemd.services = mkSinkUndeclaredOptions { };
users.users = mkSinkUndeclaredOptions { };
};
};
in [
../nixos/default.nix
mockedNixos
(nixosModule "/misc/assertions.nix")
scrubbedPkgsModule
];
docBook = {
id = "nixos-options";
optionIdPrefix = "nixos-opt";
@@ -51,7 +65,22 @@ let
};
nixDarwinModuleDocs = buildModulesDocs {
modules = [ ../nix-darwin scrubbedPkgsModule dontCheckDefinitions ];
modules = let
nixosModule = module: pkgs.path + "/nixos/modules" + module;
mockedNixDarwin = with lib; {
options = {
environment.pathsToLink = mkSinkUndeclaredOptions { };
system.activationScripts.postActivation.text =
mkSinkUndeclaredOptions { };
users.users = mkSinkUndeclaredOptions { };
};
};
in [
../nix-darwin/default.nix
mockedNixDarwin
(nixosModule "/misc/assertions.nix")
scrubbedPkgsModule
];
docBook = {
id = "nix-darwin-options";
optionIdPrefix = "nix-darwin-opt";
@@ -60,7 +89,6 @@ let
docs = nmd.buildDocBookDocs {
pathName = "home-manager";
projectName = "Home Manager";
modulesDocs = [ hmModulesDocs nixDarwinModuleDocs nixosModuleDocs ];
documentsDirectory = ./.;
documentType = "book";
@@ -89,14 +117,4 @@ in {
manPages = docs.manPages;
manual = { inherit (docs) html htmlOpenTool; };
# Unstable, mainly for CI.
jsonModuleMaintainers = pkgs.writeText "hm-module-maintainers.json" (let
result = lib.evalModules {
modules = import ../modules/modules.nix {
inherit lib pkgs;
check = false;
} ++ [ scrubbedPkgsModule ];
};
in builtins.toJSON result.config.meta.maintainers);
}

View File

@@ -43,23 +43,15 @@ The solution is typically to uninstall the package from the environment using `n
You could also opt to unistall _all_ of the packages from your profile with `nix-env --uninstall '*'`.
=== Why are the session variables not set?
:foreign-env: https://github.com/oh-my-fish/plugin-foreign-env
Home Manager is only able to set session variables automatically if it manages your Bash, Z shell, or fish shell configuration. To enable such management you use <<opt-programs.bash.enable>>, <<opt-programs.zsh.enable>>, or <<opt-programs.fish.enable>>.
If you don't want to let Home Manager manage your shell then you will have to manually source the `~/.nix-profile/etc/profile.d/hm-session-vars.sh` file in an appropriate way. In Bash and Z shell this can be done by adding
Home Manager is only able to set session variables automatically if it manages your Bash or Z shell configuration. If you don't want to let Home Manager manage your shell then you will have to manually source the `~/.nix-profile/etc/profile.d/hm-session-vars.sh` file in an appropriate way. In Bash and Z shell this can be done by adding
[source,bash]
----
. "$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh"
----
to your `.profile` and `.zshrc` files, respectively. The `hm-session-vars.sh` file should work in most Bourne-like shells. For fish shell, it is possible to source it using {foreign-env}[the foreign-env plugin]
[source,bash]
----
fenv source "$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh" > /dev/null
----
to your `.profile` and `.zshrc` files, respectively. The `hm-session-vars.sh` file should work in most Bourne-like shells.
=== How to set up a configuration for multiple users/machines?
:post-your-homenix: https://www.reddit.com/r/NixOS/comments/9bb9h9/post_your_homemanager_homenix_file/
@@ -72,10 +64,7 @@ For example, if you have two machines, called "kronos" and "rhea" on which you w
- `rhea-jane.nix`, and
- `common.nix`
in your repository.
On the kronos and rhea machines you can then make
`~jane/.config/home-manager/home.nix`
be a symbolic link to the corresponding file in your configuration repository.
in your repository. On the kronos and rhea machines you can then make `~jane/.config/nixpkgs/home.nix` be a symbolic link to the corresponding file in your configuration repository.
The `kronos-jane.nix` and `rhea-jane.nix` files follow the format
@@ -94,26 +83,18 @@ while the `common.nix` file contains configuration shared across the two logins.
You can get some inspiration from the {post-your-homenix}[Post your home-manager home.nix file!] Reddit thread.
=== Why do I get an error message about `ca.desrt.dconf` or `dconf.service`?
=== Why do I get an error message about `ca.desrt.dconf`?
You are most likely trying to configure something that uses dconf
but the DBus session is not aware of the dconf service.
The full error you might get is
You are most likely trying to configure the GTK or Gnome Terminal but the DBus session is not aware of the dconf service. The full error you might get is
----
error: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name ca.desrt.dconf was not provided by any .service files
----
or
----
error: GDBus.Error:org.freedesktop.systemd1.NoSuchUnit: Unit dconf.service not found.
----
The solution on NixOS is to add
[source,nix]
programs.dconf.enable = true;
services.dbus.packages = with pkgs; [ gnome.dconf ];
to your system configuration.
@@ -146,8 +127,8 @@ You can add the `nixpkgs-unstable` channel by running
[source,console]
----
$ nix-channel --add https://nixos.org/channels/nixpkgs-unstable nixpkgs-unstable
$ nix-channel --update
# nix-channel --add https://nixos.org/channels/nixpkgs-unstable nixpkgs-unstable
# nix-channel --update
----
Note, the package will not be affected by any package overrides, overlays, etc.

View File

@@ -2,14 +2,13 @@
== Installing Home Manager
:nix-darwin: https://github.com/LnL7/nix-darwin/
:nixos-wiki-flakes: https://nixos.wiki/wiki/Flakes
Home Manager can be used in three primary ways:
1. Using the standalone `home-manager` tool. For platforms other than
NixOS and Darwin, this is the only available choice. It is also
recommended for people on NixOS or Darwin that want to manage their
home directory independently of the system as a whole. See
home directory independent of the system as a whole. See
<<sec-install-standalone>> for instructions on how to perform this
installation.
@@ -23,22 +22,11 @@ This allows the user profiles to be built together with the system
when running `darwin-rebuild`. See <<sec-install-nix-darwin-module>>
for a description of this setup.
[NOTE]
In this chapter we describe how to install Home Manager in the
standard way using channels. If you prefer to use
{nixos-wiki-flakes}[Nix Flakes] then please see the instructions in
<<ch-nix-flakes>>.
[[sec-install-standalone]]
=== Standalone installation
:nix-allowed-users: https://nixos.org/nix/manual/#conf-allowed-users
:nixos-allowed-users: https://nixos.org/nixos/manual/options.html#opt-nix.allowedUsers
:bash: https://www.gnu.org/software/bash/
:zsh: http://zsh.sourceforge.net/
:fish: https://fishshell.com
:plugin-foreign-env: https://github.com/oh-my-fish/plugin-foreign-env
:babelfish: https://github.com/bouk/babelfish
1. Make sure you have a working Nix installation. Specifically, make
sure that your user is able to build and install Nix packages. For
@@ -49,8 +37,9 @@ must be covered by the {nix-allowed-users}[`allowed-users`] Nix
option. On NixOS you can control this option using the
{nixos-allowed-users}[`nix.allowedUsers`] system option.
2. Add the appropriate Home Manager channel. If you are following
Nixpkgs master or an unstable channel you can run
2. Add the Home Manager channel that you wish to follow. If you are
following Nixpkgs master or an unstable channel then this is done by
running
+
[source,console]
----
@@ -58,13 +47,22 @@ $ nix-channel --add https://github.com/nix-community/home-manager/archive/master
$ nix-channel --update
----
+
and if you follow a Nixpkgs version 23.05 channel you can run
and if you follow a Nixpkgs version 21.05 channel, you can run
+
[source,console]
----
$ nix-channel --add https://github.com/nix-community/home-manager/archive/release-23.05.tar.gz home-manager
$ nix-channel --add https://github.com/nix-community/home-manager/archive/release-21.05.tar.gz home-manager
$ nix-channel --update
----
+
On NixOS you may need to log out and back in for the channel to become
available. On non-NixOS you may have to add
+
[source,bash]
export NIX_PATH=$HOME/.nix-defexpr/channels${NIX_PATH:+:}$NIX_PATH
+
to your shell (see
https://github.com/NixOS/nix/issues/2033[nix#2033]).
3. Run the Home Manager installation command and create the first Home
Manager generation:
@@ -88,9 +86,9 @@ file in your shell configuration. Alternatively source
+
when managing home configuration together with system configuration.
+
This file can be sourced directly by POSIX.2-like shells such as
{bash}[Bash] or {zsh}[Z shell]. {fish}[Fish] users can use utilities
such as {plugin-foreign-env}[foreign-env] or {babelfish}[babelfish].
Unfortunately, we currently only support POSIX.2-like shells such as
https://www.gnu.org/software/bash/[Bash] or
http://zsh.sourceforge.net/[Z shell].
+
For example, if you use Bash then add
+
@@ -106,9 +104,6 @@ checkout of the repository then you can use the
<<opt-programs.home-manager.path>> option to specify the absolute path
to the repository.
Once installed you can see <<ch-usage>> for a more detailed
description of Home Manager and how to use it.
[[sec-install-nixos-module]]
=== NixOS module
@@ -121,21 +116,21 @@ deployed through NixOps.
To make the NixOS module available for use you must `import` it into
your system configuration. This is most conveniently done by adding a
Home Manager channel to the root user. For example, if you are
following Nixpkgs master or an unstable channel, you can run
Home Manager channel. For example, if you are following Nixpkgs master
or an unstable channel, you can run
[source,console]
----
$ sudo nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager
$ sudo nix-channel --update
# nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager
# nix-channel --update
----
and if you follow a Nixpkgs version 23.05 channel, you can run
and if you follow a Nixpkgs version 21.05 channel, you can run
[source,console]
----
$ sudo nix-channel --add https://github.com/nix-community/home-manager/archive/release-23.05.tar.gz home-manager
$ sudo nix-channel --update
# nix-channel --add https://github.com/nix-community/home-manager/archive/release-21.05.tar.gz home-manager
# nix-channel --update
----
It is then possible to add
@@ -158,39 +153,9 @@ home-manager.users.eve = { pkgs, ... }: {
};
----
and after a `sudo nixos-rebuild switch` the user eve's environment should
and after a `nixos-rebuild switch` the user eve's environment should
include a basic Bash configuration and the packages atool and httpie.
[NOTE]
====
If `nixos-rebuild switch` does not result in the environment you expect,
you can take a look at the output of the Home Manager activation script output using
[source,console]
$ systemctl status "home-manager-$USER.service"
====
If you do not plan on having Home Manager manage your shell
configuration then you must add either
[source,bash]
----
. "$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh"
----
or
[source,bash]
----
. "/etc/profiles/per-user/$USER/etc/profile.d/hm-session-vars.sh"
----
to your shell configuration, depending on whether
<<nixos-opt-home-manager.useUserPackages>> is enabled. This file can
be sourced directly by POSIX.2-like shells such as {bash}[Bash] or
{zsh}[Z shell]. {fish}[Fish] users can use utilities such as
{plugin-foreign-env}[foreign-env] or {babelfish}[babelfish].
[NOTE]
====
By default packages will be installed to `$HOME/.nix-profile` but they
@@ -219,9 +184,6 @@ the dependency on `NIX_PATH`, which is otherwise used for importing
Nixpkgs.
====
Once installed you can see <<ch-usage>> for a more detailed
description of Home Manager and how to use it.
[[sec-install-nix-darwin-module]]
=== nix-darwin module
@@ -237,16 +199,16 @@ or an unstable channel, you can run
[source,console]
----
$ nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager
$ nix-channel --update
# nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager
# nix-channel --update
----
and if you follow a Nixpkgs version 23.05 channel, you can run
and if you follow a Nixpkgs version 21.05 channel, you can run
[source,console]
----
$ nix-channel --add https://github.com/nix-community/home-manager/archive/release-23.05.tar.gz home-manager
$ nix-channel --update
# nix-channel --add https://github.com/nix-community/home-manager/archive/release-21.05.tar.gz home-manager
# nix-channel --update
----
It is then possible to add
@@ -262,10 +224,6 @@ For example, a nix-darwin configuration may include the lines
[source,nix]
----
users.users.eve = {
name = "eve";
home = "/Users/eve";
}
home-manager.users.eve = { pkgs, ... }: {
home.packages = [ pkgs.atool pkgs.httpie ];
programs.bash.enable = true;
@@ -276,31 +234,10 @@ and after a `darwin-rebuild switch` the user eve's environment
should include a basic Bash configuration and the packages atool and
httpie.
If you do not plan on having Home Manager manage your shell
configuration then you must add either
[source,bash]
----
. "$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh"
----
or
[source,bash]
----
. "/etc/profiles/per-user/$USER/etc/profile.d/hm-session-vars.sh"
----
to your shell configuration, depending on whether
<<nix-darwin-opt-home-manager.useUserPackages>> is enabled. This file
can be sourced directly by POSIX.2-like shells such as {bash}[Bash] or
{zsh}[Z shell]. {fish}[Fish] users can use utilities such as
{plugin-foreign-env}[foreign-env] or {babelfish}[babelfish].
[NOTE]
====
By default user packages will not be ignored in favor of
`environment.systemPackages`, but they will be installed to
`environment.systemPackages`, but they will be intalled to
`/etc/profiles/per-user/$USERNAME` if
[source,nix]
@@ -324,6 +261,3 @@ This saves an extra Nixpkgs evaluation, adds consistency, and removes
the dependency on `NIX_PATH`, which is otherwise used for importing
Nixpkgs.
====
Once installed you can see <<ch-usage>> for a more detailed
description of Home Manager and how to use it.

View File

@@ -13,12 +13,12 @@
</refnamediv>
<refsection>
<title>Description</title>
<simpara>
The file <filename>~/.config/home-manager/home.nix</filename> contains the
<para>
The file <filename>~/.config/nixpkgs/home.nix</filename> contains the
declarative specification of your Home Manager configuration. The command
<command>home-manager</command> takes this file and realises the user
environment configuration specified therein.
</simpara>
</para>
</refsection>
<refsection>
<title>Options</title>

View File

@@ -17,10 +17,6 @@
build
</arg>
<arg choice="plain">
init <arg>--switch</arg> <arg><replaceable>dir</replaceable></arg>
</arg>
<arg choice="plain">
instantiate
</arg>
@@ -106,10 +102,6 @@
</group>
</arg>
<arg>
--version
</arg>
<arg>
<group choice="req">
<arg choice="plain">
@@ -147,10 +139,6 @@
--debug
</arg>
<arg>
--impure
</arg>
<arg>
--keep-failed
</arg>
@@ -159,18 +147,6 @@
--keep-going
</arg>
<arg>
<group choice="req">
<arg choice="plain">
-L
</arg>
<arg choice="plain">
--print-build-logs
</arg>
</group>
</arg>
<arg>
--show-trace
</arg>
@@ -179,14 +155,6 @@
--(no-)substitute
</arg>
<arg>
--no-out-link
</arg>
<arg>
--refresh
</arg>
<arg>
<group choice="req">
<arg choice="plain">
@@ -204,9 +172,7 @@
<title>Description</title>
<para>
This command updates the user environment so that it corresponds to the
configuration specified in
<filename>$XDG_CONFIG_HOME/home-manager/home.nix</filename> or
<filename>$XDG_CONFIG_HOME/home-manager/flake.nix</filename>.
configuration specified in <filename>~/.config/nixpkgs/home.nix</filename> or <filename>~/.config/nixpkgs/flake.nix</filename>.
</para>
<para>
All operations using this tool expects a sub-command that indicates the
@@ -222,35 +188,6 @@
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>init</option> [<option>--switch</option>] [<replaceable>dir</replaceable>]
</term>
<listitem>
<simpara>
Generates an initial <filename>home.nix</filename> file for the
current user. If Nix flakes are enabled, then this command also
generates a <filename>flake.nix</filename> file.
</simpara>
<simpara>
If a path <replaceable>dir</replaceable> is given then the
configuration will be generated in that directory. Otherwise, the
configuration will be generated in
<filename>~/.config/home-manager</filename>. The output directory will
be created if it does not exist.
</simpara>
<simpara>
If the <option>--switch</option> option is given, then the generated
configuration is activated.
</simpara>
<simpara>
Note, this command will not overwrite any existing files. It is
therefore safe to initialize a configuration, edit it, and then re-run
the <option>init</option> command with <option>--switch</option>
enabled to activate the configuration.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>instantiate</option>
@@ -381,8 +318,8 @@
</listitem>
<listitem>
<para>
remove all Home Manager generations and make them available
for immediate garbage collection.
optionally remove all Home Manager generations and make them
available for immediate garbage collection.
</para>
</listitem>
</itemizedlist>
@@ -469,7 +406,7 @@
<listitem>
<para>
Indicates the path to the Home Manager configuration file. If not given,
<filename>$XDG_CONFIG_HOME/home-manager/home.nix</filename> is used.
<filename>~/.config/nixpkgs/home.nix</filename> is used.
</para>
</listitem>
</varlistentry>
@@ -486,16 +423,6 @@
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--version</option>
</term>
<listitem>
<para>
Prints the version number of the <command>home-manager</command> tool.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>-n</option>
@@ -561,18 +488,6 @@
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--impure</option>
</term>
<listitem>
<para>
Passed on to <citerefentry>
<refentrytitle>nix-build</refentrytitle>
<manvolnum>1</manvolnum> </citerefentry>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--keep-failed</option>
@@ -597,22 +512,6 @@
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>-L</option>
</term>
<term>
<option>--print-build-logs</option>
</term>
<listitem>
<para>
Passed on to <citerefentry>
<refentrytitle>nix build</refentrytitle>
</citerefentry>
when building from a flake.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--show-trace</option>
@@ -637,31 +536,6 @@
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--no-out-link</option>
</term>
<listitem>
<para>
Passed on to <citerefentry>
<refentrytitle>nix-build</refentrytitle>
<manvolnum>1</manvolnum> </citerefentry>
when running <command>home-manager build</command>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--refresh</option>
</term>
<listitem>
<para>
Passed on to <citerefentry>
<refentrytitle>nix-build</refentrytitle>
<manvolnum>1</manvolnum> </citerefentry>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>-v</option>
@@ -682,7 +556,7 @@
<variablelist>
<varlistentry>
<term>
<filename>$XDG_DATA_HOME/home-manager/news-read-ids</filename>
<filename>~/.local/share/home-manager/news-read-ids</filename>
</term>
<listitem>
<para>

View File

@@ -4,7 +4,7 @@
<title>Home Manager Reference Pages</title>
<info>
<author><personname>Home Manager contributors</personname></author>
<copyright><year>20172022</year><holder>Home Manager contributors</holder>
<copyright><year>20172020</year><holder>Home Manager contributors</holder>
</copyright>
</info>
<xi:include href="man-configuration.xml" />

View File

@@ -9,33 +9,28 @@
<preface>
<title>Preface</title>
<para>
This manual will eventually describe how to install, use, and extend Home
This manual will eventually describes how to install, use, and extend Home
Manager.
</para>
<para>
If you encounter problems then please reach out on the IRC channel
<link xlink:href="https://webchat.oftc.net/?channels=home-manager">#home-manager</link>
hosted by <link xlink:href="https://oftc.net/">OFTC</link>.
There is also a <link xlink:href="https://matrix.to/#/%23hm:rycee.net">Matrix room</link>,
which is bridged to the IRC channel.
If your problem is caused by a bug in Home Manager then it should
be reported on the
<link xlink:href="https://github.com/nix-community/home-manager/issues">Home Manager issue tracker</link>.
</para>
<note>
<para>
Commands prefixed with <literal>$ sudo</literal> have to be run as root, either
Commands prefixed with <literal>#</literal> have to be run as root, either
requiring to login as root user or temporarily switching to it using
<literal>sudo</literal> for example.
</para>
</note>
</preface>
<xi:include href="installation.xml" />
<xi:include href="usage.xml" />
<xi:include href="nix-flakes.xml" />
<xi:include href="writing-modules.xml" />
<xi:include href="contributing.xml" />
<xi:include href="3rd-party.xml" />
<xi:include href="faq.xml" />
<appendix xml:id="ch-options">
<title>Configuration Options</title>

View File

@@ -6,14 +6,6 @@ This section lists the release notes for stable versions of Home Manager and the
:leveloffset: 1
include::rl-2311.adoc[]
include::rl-2305.adoc[]
include::rl-2211.adoc[]
include::rl-2205.adoc[]
include::rl-2111.adoc[]
include::rl-2105.adoc[]

View File

@@ -8,7 +8,7 @@ The 21.05 release branch became the stable branch in May, 2021.
This release has the following notable changes:
* The `opt-programs.broot.verbs` option is now a list rather than an
* The <<opt-programs.broot.verbs>> option is now a list rather than an
attribute set. To migrate, move the keys of the attrset into the list
items' `invocation` keys. For example,
+

View File

@@ -1,7 +1,8 @@
[[sec-release-21.11]]
== Release 21.11
The 21.11 release branch became the stable branch in November, 2021.
This is the current unstable branch and the information in this
section is therefore not final.
[[sec-release-21.11-highlights]]
=== Highlights
@@ -32,14 +33,6 @@ Ultimately, the benefits of loading all modules won and the behavior
has now changed. For associated discussion see
https://github.com/nix-community/home-manager/issues/1906[issue #1906].
* Rofi version 1.7.0 removed many options that were used by the module and replaced them with custom themes, which are more flexible and powerful.
+
You can replicate your old configuration by moving those options to <<opt-programs.rofi.theme>>. Keep in mind that the syntax is different so you may need to do some changes.
* Taskwarrior version 2.6.0 respects XDG Specification for the config file now.
Option <<opt-programs.taskwarrior.config>> and friends now generate the config file at
`$XDG_CONFIG_HOME/task/taskrc` instead of `~/.taskrc`.
[[sec-release-21.11-state-version-changes]]
=== State Version Changes
@@ -47,27 +40,4 @@ The state version in this release includes the changes below. These
changes are only active if the `home.stateVersion` option is set to
"21.11" or later.
* The <<opt-home.keyboard>> option now defaults to `null`, meaning that Home Manager won't do any keyboard layout management. For example, `setxkbmap` won't be run in X sessions.
* The <<opt-programs.pet.settings>> option no longer place its value inside a `General` attribute.
For example,
+
[source,nix]
programs.pet.settings.editor = "nvim";
+
becomes
+
[source,nix]
programs.pet.settings.General.editor = "nvim";
* The <<opt-programs.waybar.settings>> option now allows defining modules directly under <<opt-programs.waybar.settings>>.
For example,
+
[source,nix]
programs.waybar.settings.modules."custom/my-module" = { };
+
becomes
+
[source,nix]
programs.waybar.settings."custom/my-module" = { };
* Nothing has happened.

187
doc/writing-modules.adoc Normal file
View File

@@ -0,0 +1,187 @@
[[ch-writing-modules]]
== Writing Home Manager Modules
:writing-nixos-modules: https://nixos.org/nixos/manual/index.html#sec-writing-modules
The module system in Home Manager is based entirely on the NixOS module system so we will here only highlight aspects that are specific for Home Manager. For information about the module system as such please refer to the {writing-nixos-modules}[Writing NixOS Modules] chapter of the NixOS manual.
[[sec-option-types]]
=== Option Types
:wikipedia-dag: https://en.wikipedia.org/w/index.php?title=Directed_acyclic_graph&oldid=939656095
:gvariant-description: https://developer.gnome.org/glib/stable/glib-GVariant.html#glib-GVariant.description
Overall the basic option types are the same in Home Manager as NixOS. A few Home Manager options, however, make use of custom types that are worth describing in more detail. These are the option types `dagOf` and `gvariant` that are used, for example, by <<opt-programs.ssh.matchBlocks>> and <<opt-dconf.settings>>.
`hm.types.dagOf`::
Options of this type have attribute sets as values where each member is a node in a {wikipedia-dag}[directed acyclic graph] (DAG). This allows the attribute set entries to express dependency relations among themselves. This can, for example, be used to control the order of match blocks in a OpenSSH client configuration or the order of activation script blocks in <<opt-home.activation>>.
+
A number of functions are provided to create DAG nodes. The functions are shown below with examples using an option `foo.bar` of type `hm.types.dagOf types.int`.
+
`hm.dag.entryAnywhere (value: T)`:::
Indicates that `value` can be placed anywhere within the DAG. This is also the default for plain attribute set entries, that is
+
[source,nix]
----
foo.bar = {
a = hm.dag.entryAnywhere 0;
}
----
+
and
+
[source,nix]
----
foo.bar = {
a = 0;
}
----
+
are equivalent.
+
`hm.dag.entryAfter (afters: list string) (value: T)`:::
Indicates that `value` must be placed _after_ each of the attribute names in the given list. For example
+
[source,nix]
----
foo.bar = {
a = 0;
b = hm.dag.entryAfter [ "a" ] 1;
}
----
+
would place `b` after `a` in the graph.
+
`hm.dag.entryBefore (befores: list string) (value: T)`:::
Indicates that `value` must be placed _before_ each of the attribute names in the given list. For example
+
[source,nix]
----
foo.bar = {
b = hm.dag.entryBefore [ "a" ] 1;
a = 0;
}
----
+
would place `b` before `a` in the graph.
+
`hm.dag.entryBetween (befores: list string) (afters: list string) (value: T)`:::
Indicates that `value` must be placed _before_ the attribute names in the first list and _after_ the attribute names in the second list. For example
+
[source,nix]
----
foo.bar = {
a = 0;
c = hm.dag.entryBetween [ "b" ] [ "a" ] 2;
b = 1;
}
----
+
would place `c` before `b` and after `a` in the graph.
`hm.types.gvariant`::
This type is useful for options representing {gvariant-description}[GVariant] values. The type accepts all primitive GVariant types as well as arrays and tuples. Dictionaries are not currently supported.
+
To create a GVariant value you can use a number of provided functions. Examples assume an option `foo.bar` of type `hm.types.gvariant`.
+
`hm.gvariant.mkBoolean (v: bool)`:::
Takes a Nix value `v` to a GVariant `boolean` value. Note, Nix booleans are automatically coerced using this function. That is,
+
[source,nix]
----
foo.bar = hm.gvariant.mkBoolean true;
----
+
is equivalent to
+
[source,nix]
----
foo.bar = true;
----
`hm.gvariant.mkString (v: string)`:::
Takes a Nix value `v` to a GVariant `string` value. Note, Nix strings are automatically coerced using this function. That is,
+
[source,nix]
----
foo.bar = hm.gvariant.mkString "a string";
----
+
is equivalent to
+
[source,nix]
----
foo.bar = "a string";
----
`hm.gvariant.mkObjectpath (v: string)`:::
Takes a Nix value `v` to a GVariant `objectpath` value.
`hm.gvariant.mkUchar (v: string)`:::
Takes a Nix value `v` to a GVariant `uchar` value.
`hm.gvariant.mkInt16 (v: int)`:::
Takes a Nix value `v` to a GVariant `int16` value.
`hm.gvariant.mkUint16 (v: int)`:::
Takes a Nix value `v` to a GVariant `uint16` value.
`hm.gvariant.mkInt32 (v: int)`:::
Takes a Nix value `v` to a GVariant `int32` value. Note, Nix integers are automatically coerced using this function. That is,
+
[source,nix]
----
foo.bar = hm.gvariant.mkInt32 7;
----
+
is equivalent to
+
[source,nix]
----
foo.bar = 7;
----
`hm.gvariant.mkUint32 (v: int)`:::
Takes a Nix value `v` to a GVariant `uint32` value.
`hm.gvariant.mkInt64 (v: int)`:::
Takes a Nix value `v` to a GVariant `int64` value.
`hm.gvariant.mkUint64 (v: int)`:::
Takes a Nix value `v` to a GVariant `uint64` value.
`hm.gvariant.mkDouble (v: double)`:::
Takes a Nix value `v` to a GVariant `double` value. Note, Nix floats are automatically coerced using this function. That is,
+
[source,nix]
----
foo.bar = hm.gvariant.mkDouble 3.14;
----
+
is equivalent to
+
[source,nix]
----
foo.bar = 3.14;
----
+
`hm.gvariant.mkArray type elements`:::
Builds a GVariant array containing the given list of elements, where each element is a GVariant value of the given type. The `type` value can be constructed using
+
--
- `hm.gvariant.type.string`
- `hm.gvariant.type.boolean`
- `hm.gvariant.type.uchar`
- `hm.gvariant.type.int16`
- `hm.gvariant.type.uint16`
- `hm.gvariant.type.int32`
- `hm.gvariant.type.uint32`
- `hm.gvariant.type.int64`
- `hm.gvariant.type.uint64`
- `hm.gvariant.type.double`
- `hm.gvariant.type.arrayOf type`
- `hm.gvariant.type.maybeOf type`
- `hm.gvariant.type.tupleOf types`
--
+
where `type` and `types` are themselves a type and list of types, respectively.
+
`hm.gvariant.mkEmptyArray type`:::
An alias of `hm.gvariant.mkArray type []`.
+
`hm.gvariant.mkNothing type`:::
Builds a GVariant maybe value whose (non-existent) element is of the given type. The `type` value is constructed as described for the `mkArray` function above.
+
`hm.gvariant.mkJust element`:::
Builds a GVariant maybe value containing the given GVariant element.
+
`hm.gvariant.mkTuple elements`:::
Builds a GVariant tuple containing the given list of elements, where each element is a GVariant value.

View File

@@ -1,22 +0,0 @@
[[ch-3rd-party]]
== Third-Party Tools and Extensions
Here is a collection of tools and extensions that relate to Home
Manager. Note, these are maintained outside the regular Home Manager
flow so quality and support may vary wildly. If you encounter problems
then please raise them in the corresponding project, not as issues in
the Home Manager tracker.
If you have made something interesting related to Home Manager then
you are encouraged to create a PR that expands this chapter.
[[sec-3rd-party-module-collections]]
=== Module Collections
- https://github.com/schuelermine/xhmm[xhmm — extra Home Manager modules]
+
A collection of modules maintained by Anselm Schüler.
- https://github.com/danth/stylix/[Stylix — System-wide colorscheming and typography]
+
Configure your applications to get coherent color scheme and font.

View File

@@ -1,228 +0,0 @@
[[ch-nix-flakes]]
== Nix Flakes
:nixos-wiki-flakes: https://nixos.wiki/wiki/Flakes
Home Manager is compatible with {nixos-wiki-flakes}[Nix Flakes]. But
please be aware that the support it is still experimental and may
change in backwards incompatible ways.
Just like in the standard installation you can use the Home Manager
flake in three ways:
1. Using the standalone `home-manager` tool. For platforms other than
NixOS and Darwin, this is the only available choice. It is also
recommended for people on NixOS or Darwin that want to manage their
home directory independently of the system as a whole. See
<<sec-flakes-standalone>> for instructions on how to perform this
installation.
2. As a module within a NixOS system configuration. This allows the
user profiles to be built together with the system when running
`nixos-rebuild`. See <<sec-flakes-nixos-module>> for a description of
this setup.
3. As a module within a {nix-darwin}[nix-darwin] system configuration.
This allows the user profiles to be built together with the system
when running `darwin-rebuild`. See <<sec-flakes-nix-darwin-module>>
for a description of this setup.
[[sec-flakes-prerequisites]]
=== Prerequisites
* Install Nix 2.4 or later, or have it in `nix-shell`.
* Enable experimental features `nix-command` and `flakes`.
+
** When using NixOS, add the following to your `configuration.nix` and rebuild your system.
+
[source,nix]
nix = {
package = pkgs.nixFlakes;
extraOptions = ''
experimental-features = nix-command flakes
'';
};
+
** If you are not using NixOS, add the following to `nix.conf` (located at `~/.config/nix/` or `/etc/nix/nix.conf`).
+
[source,bash]
experimental-features = nix-command flakes
+
You may need to restart the Nix daemon with, for example, `sudo systemctl restart nix-daemon.service`.
+
** Alternatively, you can enable flakes on a per-command basis with the following additional flags to `nix` and `home-manager`:
+
[source,console]
----
$ nix --extra-experimental-features "nix-command flakes" <sub-commands>
$ home-manager --extra-experimental-features "nix-command flakes" <sub-commands>
----
* Prepare your Home Manager configuration (`home.nix`).
+
Unlike the channel-based setup,
`home.nix` will be evaluated when the flake is built,
so it must be present before bootstrap of Home Manager from the flake.
See <<sec-usage-configuration>> for introduction about
writing a Home Manager configuration.
[[sec-flakes-standalone]]
=== Standalone setup
To prepare an initial Home Manager configuration for your logged in user,
you can run the Home Manager `init` command directly from its flake.
For example, if you are using the unstable version of Nixpkgs or NixOS,
then to generate and activate a basic configuration run the command
[source,console]
$ nix run home-manager/master -- init --switch
For Nixpkgs or NixOS version 23.05 run
[source,console]
$ nix run home-manager/release-23.05 -- init --switch
This will generate a `flake.nix` and a `home.nix` file in
`~/.config/home-manager`, creating the directory if it does not exist.
If you omit the `--switch` option then the activation will not happen.
This is useful if you want to inspect and edit the configuration before activating it.
[source,console]
----
$ nix run home-manager/$branch -- init
$ # Edit files in ~/.config/home-manager
$ nix run home-manager/$branch -- init --switch
----
Where `$branch` is one of `master` or `release-23.05`.
After the initial activation has completed successfully then building
and activating your flake-based configuration is as simple as
[source,console]
$ home-manager switch
It is possible to override the default configuration directory, if you want.
For example,
[source,console]
----
$ nix run home-manager/$branch -- init --switch ~/hmconf
$ # And after the initial activation.
$ home-manager switch --flake ~/hmconf
----
[NOTE]
====
The flake inputs are not automatically updated by Home Manager.
You need to use the standard `nix flake update` command for that.
If you only want to update a single flake input,
then the command `nix flake lock --update-input <input>` can be used.
You can also pass flake-related options
such as `--recreate-lock-file` or `--update-input <input>`
to `home-manager` when building or switching,
and these options will be forwarded to `nix build`.
See the {nixos-wiki-flakes}[NixOS Wiki page] for details.
====
[[sec-flakes-nixos-module]]
=== NixOS module
To use Home Manager as a NixOS module,
a bare-minimum `flake.nix` would be as follows:
[source,nix]
----
{
description = "NixOS configuration";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = inputs@{ nixpkgs, home-manager, ... }: {
nixosConfigurations = {
hostname = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./configuration.nix
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.jdoe = import ./home.nix;
# Optionally, use home-manager.extraSpecialArgs to pass
# arguments to home.nix
}
];
};
};
};
}
----
The Home Manager configuration is then part of the NixOS configuration
and is automatically rebuilt with the system when using the appropriate command
for the system, such as `nixos-rebuild switch --flake <flake-uri>`.
You can use the above `flake.nix` as a template in `/etc/nixos` by
[source,console]
$ nix flake new /etc/nixos -t github:nix-community/home-manager#nixos
[[sec-flakes-nix-darwin-module]]
=== nix-darwin module
The flake-based setup of the Home Manager nix-darwin module
is similar to that of NixOS. The `flake.nix` would be:
[source,nix]
----
{
description = "Darwin configuration";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
darwin.url = "github:lnl7/nix-darwin";
darwin.inputs.nixpkgs.follows = "nixpkgs";
home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = inputs@{ nixpkgs, home-manager, darwin, ... }: {
darwinConfigurations = {
hostname = darwin.lib.darwinSystem {
system = "x86_64-darwin";
modules = [
./configuration.nix
home-manager.darwinModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.jdoe = import ./home.nix;
# Optionally, use home-manager.extraSpecialArgs to pass
# arguments to home.nix
}
];
};
};
};
}
----
and it is also rebuilt with the nix-darwin generations.
The rebuild command here may be `darwin-rebuild switch --flake <flake-uri>`.
You can use the above `flake.nix` as a template in `~/.config/darwin` by
[source,console]
$ nix flake new ~/.config/darwin -t github:nix-community/home-manager#nix-darwin

View File

@@ -1,44 +0,0 @@
[[sec-release-22.05]]
== Release 22.05
The 22.05 release branch became the stable branch in May, 2022.
[[sec-release-22.05-highlights]]
=== Highlights
:hm-weblate: https://hosted.weblate.org/projects/home-manager/
This release has the following notable changes:
* The `programs.waybar.settings.modules` option was removed.
Waybar modules should now be declared directly under `programs.waybar.settings`.
* Home Manager now partially support translation of texts into different languages.
Note, the support is quite limited at the moment.
Specifically, it only applies to parts of the system written in the Bash language,
such as the `home-manager` command line tool and the activation script.
+
If you would like to contribute to the translation effort
then you can do so through the {hm-weblate}[Home Manager Weblate project].
* A new module, `launchd.agents` was added.
Use this to enable services based on macOS LaunchAgents.
[[sec-release-22.05-state-version-changes]]
=== State Version Changes
The state version in this release includes the changes below.
These changes are only active if the `home.stateVersion` option is set to "22.05" or later.
* The <<opt-programs.waybar.settings>> option now allows defining modules directly under <<opt-programs.waybar.settings>>.
Defining modules under `programs.waybar.settings.modules` will now be an error.
For example,
+
[source,nix]
programs.waybar.settings.modules."custom/my-module" = { };
+
becomes
+
[source,nix]
programs.waybar.settings."custom/my-module" = { };

View File

@@ -1,113 +0,0 @@
[[sec-release-22.11]]
== Release 22.11
The 22.11 release branch became the stable branch in November, 2022.
[[sec-release-22.11-highlights]]
=== Highlights
This release has the following notable changes:
* The <<opt-home.stateVersion>> option no longer has a default value.
It used to default to ``18.09'', which was the Home Manager version
that introduced the option. If your configuration does not explicitly
set this option then you need to add
+
[source,nix]
home.stateVersion = "18.09";
+
to your configuration.
* The Flake function `homeManagerConfiguration` has been simplified.
Specifically, the arguments
+
--
- `configuration`,
- `username`,
- `homeDirectory`,
- `stateVersion`,
- `extraModules`, and
- `system`
--
+
have been removed. Instead use the new `modules` argument, which
accepts a list of NixOS modules.
+
Further, the `pkgs` argument is now mandatory and should be set to
`nixpkgs.legacyPackages.${system}` where `nixpkgs` is the Nixpkgs
input of your choice.
+
For example, if your Flake currently contains
+
[source,nix]
----
homeManagerConfiguration {
configuration = import ./home.nix;
system = "x86_64-linux";
username = "jdoe";
homeDirectory = "/home/jdoe";
stateVersion = "22.05";
extraModules = [ ./some-extra-module.nix ];
}
----
+
then you can change it to
+
[source,nix]
----
homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.${system};
modules = [
./home.nix
./some-extra-module.nix
{
home = {
username = "jdoe";
homeDirectory = "/home/jdoe";
stateVersion = "22.05";
};
}
];
}
----
+
Of course, you can move the assignment of <<opt-home.username>>,
<<opt-home.homeDirectory>>, and <<opt-home.stateVersion>> to some
other file or simply place them in your `home.nix`.
* The `services.picom` module has been refactored to use structural
settings.
+
As a result `services.picom.extraOptions` has been removed in favor of
<<opt-services.picom.settings>>. Also, `services.picom.blur*` were
removed since upstream changed the blur settings to be more flexible.
You can migrate the blur settings to use
<<opt-services.picom.settings>> instead.
* The `services.compton` module has been removed. It was deprecated in
release 20.03. Use `services.picom` instead.
[[sec-release-22.11-state-version-changes]]
=== State Version Changes
The state version in this release includes the changes below.
These changes are only active if the `home.stateVersion` option is set to "22.11" or later.
* The <<opt-services.mpd.musicDirectory>> option now defaults to the
value of <<opt-xdg.userDirs.music>> if <<opt-xdg.userDirs.enable>> is
enabled. Otherwise it is undefined and must be specified in the user
configuration.
* The activation script now resets `PATH` before running. Before, the
user's `PATH` environment variable would be used in the script and
this made it possible for commands in the activation script to run
arbitrary commands accessible to the user. We now restrict the
activation script to commands that are explicitly specified.
+
There is no official way to restore the old behavior. We attempt to
make the activation script as reproducible as possible and honoring
the user's `PATH` reduces reproducibility.
+
If you need to run a command in an activation script block then refer
to the command by its absolute command path, such as
`${pkgs.hello}/bin/hello`.

View File

@@ -1,57 +0,0 @@
[[sec-release-23.05]]
== Release 23.05
The 23.05 release branch became the stable branch in May, 2023.
[[sec-release-23.05-highlights]]
=== Highlights
This release has the following notable changes:
* Firefox add-ons are now managed per-profile.
That is, if you are currently having
+
[source,nix]
programs.firefox.extensions = [ foo bar ];
+
in your configuration then you must change it to
+
[source,nix]
programs.firefox.profiles.myprofile.extensions = [ foo bar ];
* The default configuration location has been changed from
`~/.config/nixpkgs/home.nix` to `~/.config/home-manager/home.nix`.
+
Similarly, if you are using a Nix flake based setup
then the default flake file location has changed from
`~/.config/nixpkgs/flake.nix` to `~/.config/home-manager/flake.nix`.
+
The old location will continue to work but using it will trigger a warning message.
We changed the default configuration location to avoid confusion about
which files belong to Home Manager and which belong to Nixpkgs.
* The `home-manager` tool now offers an `init` command.
This command can be used to generate an initial Home Manager configuration,
and optionally also activate it.
The recommended installation method for a standalone Home Manager setup
with Nix flakes uses this new command.
The standard installation method remains the same but uses the new command internally.
See <<sec-flakes-standalone>> for more.
[[sec-release-23.05-state-version-changes]]
=== State Version Changes
The state version in this release includes the changes below.
These changes are only active if the `home.stateVersion` option is set to "23.05" or later.
* The options
+
--
- <<opt-xsession.windowManager.i3.config.window.titlebar>>
- <<opt-xsession.windowManager.i3.config.floating.titlebar>>
- <<opt-wayland.windowManager.sway.config.window.titlebar>>
- <<opt-wayland.windowManager.sway.config.floating.titlebar>>
--
+
now default to `true` which is consistent with the default values for
those options used by `i3` and `sway`.

View File

@@ -1,25 +0,0 @@
[[sec-release-23.11]]
== Release 23.11
This is the current unstable branch and the information in this section is therefore not final.
[[sec-release-23.11-highlights]]
=== Highlights
This release has the following notable changes:
* When using <<opt-programs.fish.enable>>, the setup code
for <<opt-home.sessionVariables>> is now translated
with https://github.com/bouk/babelfish[babelfish].
This should result in significantly faster shell startup times
but could theoretically break
if you have very complex bash expressions in a session variable.
Please report any issues you experience.
[[sec-release-23.11-state-version-changes]]
=== State Version Changes
The state version in this release includes the changes below.
These changes are only active if the `home.stateVersion` option is set to "23.11" or later.
* Nothing, yet.

View File

@@ -1,252 +0,0 @@
[[ch-usage]]
== Using Home Manager
Your use of Home Manager is centered around the configuration file,
which is typically found at `~/.config/home-manager/home.nix` in the standard installation
or `~/.config/home-manager/flake.nix` in a Nix flake based installation.
[NOTE]
The default configuration used to be placed in `~/.config/nixpkgs`¸
so you may see references to that elsewhere.
The old directory still works but Home Manager will print a warning message when used.
This configuration file can be _built_ and _activated_.
Building a configuration produces a directory in the Nix store that contains all files and programs that should be available in your home directory and Nix user profile, respectively. The build step also checks that the configuration is valid and it will fail with an error if you, for example, assign a value to an option that does not exist or assign a value of the wrong type. Some modules also have custom assertions that perform more detailed, module specific, checks.
Concretely, if your configuration contains
[source,nix]
programs.emacs.enable = "yes";
then building it, for example using `home-manager build`, will result in an error message saying something like
[source,console]
----
$ home-manager build
error: A definition for option `programs.emacs.enable' is not of type `boolean'. Definition values:
- In `/home/jdoe/.config/home-manager/home.nix': "yes"
(use '--show-trace' to show detailed location information)
----
The message indicates that you must provide a Boolean value for this option, that is, either `true` or `false`. The documentation of each option will state the expected type, for <<opt-programs.emacs.enable>> you will see ``Type: boolean''. You there also find information about the default value and a description of the option. You can find the complete option documentation in <<ch-options>> or directly in the terminal by running
[source,console]
man home-configuration.nix
Once a configuration is successfully built, it can be activated. The activation performs the steps necessary to make the files, programs, and services available in your user environment. The `home-manager switch` command performs a combined build and activation.
[[sec-usage-configuration]]
=== Configuration Example
A fresh install of Home Manager will generate a minimal `~/.config/home-manager/home.nix` file containing something like
[source,nix]
----
{ config, pkgs, ... }:
{
# Home Manager needs a bit of information about you and the
# paths it should manage.
home.username = "jdoe";
home.homeDirectory = "/home/jdoe";
# This value determines the Home Manager release that your
# configuration is compatible with. This helps avoid breakage
# when a new Home Manager release introduces backwards
# incompatible changes.
#
# You can update Home Manager without changing this value. See
# the Home Manager release notes for a list of state version
# changes in each release.
home.stateVersion = "23.05";
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;
}
----
You can use this as a base for your further configurations.
[NOTE]
If you are not very familiar with the Nix language and NixOS modules then it is encouraged to start with small and simple changes. As you learn you can gradually grow the configuration with confidence.
As an example, let us expand the initial configuration file to also install the htop and fortune packages, install Emacs with a few extra packages available, and enable the user gpg-agent service.
To satisfy the above setup we should elaborate the `home.nix` file as follows:
[source,nix]
----
{ config, pkgs, ... }:
{
# Home Manager needs a bit of information about you and the
# paths it should manage.
home.username = "jdoe";
home.homeDirectory = "/home/jdoe";
# Packages that should be installed to the user profile.
home.packages = [ <1>
pkgs.htop
pkgs.fortune
];
# This value determines the Home Manager release that your
# configuration is compatible with. This helps avoid breakage
# when a new Home Manager release introduces backwards
# incompatible changes.
#
# You can update Home Manager without changing this value. See
# the Home Manager release notes for a list of state version
# changes in each release.
home.stateVersion = "23.05";
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;
programs.emacs = { <2>
enable = true;
extraPackages = epkgs: [
epkgs.nix-mode
epkgs.magit
];
};
services.gpg-agent = { <3>
enable = true;
defaultCacheTtl = 1800;
enableSshSupport = true;
};
}
----
<1> Nixpkgs packages can be installed to the user profile using <<opt-home.packages>>.
<2> The option names of a program module typically start with `programs.<package name>`.
<3> Similarly, for a service module, the names start with `services.<package name>`. Note in some cases a package has both programs _and_ service options Emacs is such an example.
To activate this configuration you can run
[source,console]
home-manager switch
or if you are not feeling so lucky,
[source,console]
home-manager build
which will create a `result` link to a directory containing an
activation script and the generated home directory files.
[[sec-usage-rollbacks]]
=== Rollbacks
While the `home-manager` tool does not explicitly support rollbacks at the moment it is relatively easy to perform one manually. The steps to do so are
1. Run `home-manager generations` to determine which generation you wish to rollback to:
+
[source,console]
----
$ home-manager generations
2018-01-04 11:56 : id 765 -> /nix/store/kahm1rxk77mnvd2l8pfvd4jkkffk5ijk-home-manager-generation
2018-01-03 10:29 : id 764 -> /nix/store/2wsmsliqr5yynqkdyjzb1y57pr5q2lsj-home-manager-generation
2018-01-01 12:21 : id 763 -> /nix/store/mv960kl9chn2lal5q8lnqdp1ygxngcd1-home-manager-generation
2017-12-29 21:03 : id 762 -> /nix/store/6c0k1r03fxckql4vgqcn9ccb616ynb94-home-manager-generation
2017-12-25 18:51 : id 761 -> /nix/store/czc5y6vi1rvnkfv83cs3rn84jarcgsgh-home-manager-generation
----
2. Copy the Nix store path of the generation you chose, e.g.,
+
----
/nix/store/mv960kl9chn2lal5q8lnqdp1ygxngcd1-home-manager-generation
----
+
for generation 763.
3. Run the `activate` script inside the copied store path:
+
[source,console]
----
$ /nix/store/mv960kl9chn2lal5q8lnqdp1ygxngcd1-home-manager-generation/activate
Starting home manager activation
----
[[sec-usage-dotfiles]]
=== Keeping your ~ safe from harm
To configure programs and services Home Manager must write various things to your home directory. To prevent overwriting any existing files when switching to a new generation, Home Manager will attempt to detect collisions between existing files and generated files. If any such collision is detected the activation will terminate before changing anything on your computer.
For example, suppose you have a wonderful, painstakingly created `~/.config/git/config` and add
[source,nix]
----
{
# …
programs.git = {
enable = true;
userName = "Jane Doe";
userEmail = "jane.doe@example.org";
};
# …
}
----
to your configuration. Attempting to switch to the generation will then result in
[source,console]
----
$ home-manager switch
Activating checkLinkTargets
Existing file '/home/jdoe/.config/git/config' is in the way
Please move the above files and try again
----
[[sec-usage-graphical]]
=== Graphical services
Home Manager includes a number of services intended to run in a graphical session, for example `xscreensaver` and `dunst`. Unfortunately, such services will not be started automatically unless you let Home Manager start your X session. That is, you have something like
[source,nix]
----
{
# …
services.xserver.enable = true;
# …
}
----
in your system configuration and
[source,nix]
----
{
# …
xsession.enable = true;
xsession.windowManager.command = "…";
# …
}
----
in your Home Manager configuration.
[[sec-updating]]
=== Updating
If you have installed Home Manager using the Nix channel method
then updating Home Manager is done by first updating the channel.
You can then switch to the updated Home Manager environment.
[source,console]
----
$ nix-channel --update
unpacking channels...
$ home-manager switch
----

View File

@@ -1,283 +0,0 @@
[[ch-writing-modules]]
== Writing Home Manager Modules
:writing-nixos-modules: https://nixos.org/nixos/manual/index.html#sec-writing-modules
The module system in Home Manager is based entirely on the NixOS module system so we will here only highlight aspects that are specific for Home Manager. For information about the module system as such please refer to the {writing-nixos-modules}[Writing NixOS Modules] chapter of the NixOS manual.
[[sec-option-types]]
=== Option Types
:wikipedia-dag: https://en.wikipedia.org/w/index.php?title=Directed_acyclic_graph&oldid=939656095
:gvariant-description: https://docs.gtk.org/glib/struct.Variant.html#description
Overall the basic option types are the same in Home Manager as NixOS. A few Home Manager options, however, make use of custom types that are worth describing in more detail. These are the option types `dagOf` and `gvariant` that are used, for example, by <<opt-programs.ssh.matchBlocks>> and <<opt-dconf.settings>>.
[[sec-option-types-dag]]`hm.types.dagOf`::
Options of this type have attribute sets as values where each member is a node in a {wikipedia-dag}[directed acyclic graph] (DAG). This allows the attribute set entries to express dependency relations among themselves. This can, for example, be used to control the order of match blocks in a OpenSSH client configuration or the order of activation script blocks in <<opt-home.activation>>.
+
A number of functions are provided to create DAG nodes. The functions are shown below with examples using an option `foo.bar` of type `hm.types.dagOf types.int`.
+
--
[[sec-option-types-dag-entryAnywhere]]`hm.dag.entryAnywhere (value: T) : DagEntry<T>`:::
Indicates that `value` can be placed anywhere within the DAG. This is also the default for plain attribute set entries, that is
+
[source,nix]
----
foo.bar = {
a = hm.dag.entryAnywhere 0;
}
----
+
and
+
[source,nix]
----
foo.bar = {
a = 0;
}
----
+
are equivalent.
+
[[sec-option-types-dag-entryAfter]]`hm.dag.entryAfter (afters: list string) (value: T) : DagEntry<T>` :::
Indicates that `value` must be placed _after_ each of the attribute names in the given list. For example
+
[source,nix]
----
foo.bar = {
a = 0;
b = hm.dag.entryAfter [ "a" ] 1;
}
----
+
would place `b` after `a` in the graph.
+
[[sec-option-types-dag-entryBefore]]`hm.dag.entryBefore (befores: list string) (value: T) : DagEntry<T>` :::
Indicates that `value` must be placed _before_ each of the attribute names in the given list. For example
+
[source,nix]
----
foo.bar = {
b = hm.dag.entryBefore [ "a" ] 1;
a = 0;
}
----
+
would place `b` before `a` in the graph.
+
[[sec-option-types-dag-entryBetween]]`hm.dag.entryBetween (befores: list string) (afters: list string) (value: T) : DagEntry<T>` :::
Indicates that `value` must be placed _before_ the attribute names in the first list and _after_ the attribute names in the second list. For example
+
[source,nix]
----
foo.bar = {
a = 0;
c = hm.dag.entryBetween [ "b" ] [ "a" ] 2;
b = 1;
}
----
+
would place `c` before `b` and after `a` in the graph.
--
+
There are also a set of functions that generate a DAG from a list.
These are convenient when you just want to have a linear list of DAG entries,
without having to manually enter the relationship between each entry.
Each of these functions take a `tag` as argument and the DAG entries will be named `${tag}-${index}`.
[[sec-option-types-dag-entriesAnywhere]]`hm.dag.entriesAnywhere (tag: string) (values: [T]) : Dag<T>`:::
Creates a DAG with the given values with each entry labeled using the given tag. For example
+
[source,nix]
foo.bar = hm.dag.entriesAnywhere "a" [ 0 1 ];
+
is equivalent to
+
[source,nix]
----
foo.bar = {
a-0 = 0;
a-1 = hm.dag.entryAfter [ "a-0" ] 1;
}
----
+
[[sec-option-types-dag-entriesAfter]]`hm.dag.entriesAfter (tag: string) (afters: list string) (values: [T]) : Dag<T>`:::
Creates a DAG with the given values with each entry labeled using the given tag.
The list of values are placed are placed _after_ each of the attribute names in `afters`.
For example
+
[source,nix]
foo.bar =
{ b = 0; }
// hm.dag.entriesAfter "a" [ "b" ] [ 1 2 ];
+
is equivalent to
+
[source,nix]
----
foo.bar = {
b = 0;
a-0 = hm.dag.entryAfter [ "b" ] 1;
a-1 = hm.dag.entryAfter [ "a-0" ] 2;
}
----
+
[[sec-option-types-dag-entriesBefore]]`hm.dag.entriesBefore (tag: string) (befores: list string) (values: [T]) : Dag<T>`:::
Creates a DAG with the given values with each entry labeled using the given tag.
The list of values are placed _before_ each of the attribute names in `befores`.
For example
+
[source,nix]
foo.bar =
{ b = 0; }
// hm.dag.entriesBefore "a" [ "b" ] [ 1 2 ];
+
is equivalent to
+
[source,nix]
----
foo.bar = {
b = 0;
a-0 = 1;
a-1 = hm.dag.entryBetween [ "b" ] [ "a-0" ] 2;
}
----
+
[[sec-option-types-dag-entriesBetween]]`hm.dag.entriesBetween (tag: string) (befores: list string) (afters: list string) (values: [T]) : Dag<T>`:::
Creates a DAG with the given values with each entry labeled using the given tag.
The list of values are placed _before_ each of the attribute names in `befores`
and _after_ each of the attribute names in `afters`.
For example
+
[source,nix]
foo.bar =
{ b = 0; c = 3; }
// hm.dag.entriesBetween "a" [ "b" ] [ "c" ] [ 1 2 ];
+
is equivalent to
+
[source,nix]
----
foo.bar = {
b = 0;
c = 3;
a-0 = hm.dag.entryAfter [ "c" ] 1;
a-1 = hm.dag.entryBetween [ "b" ] [ "a-0" ] 2;
}
----
[[sec-option-types-gvariant]]`hm.types.gvariant`::
This type is useful for options representing {gvariant-description}[GVariant] values. The type accepts all primitive GVariant types as well as arrays, tuples, ``maybe'' types, and dictionaries.
+
Some Nix values are automatically coerced to matching GVariant value but the GVariant model is richer so you may need to use one of the provided constructor functions. Examples assume an option `foo.bar` of type `hm.types.gvariant`.
+
[[sec-option-types-gvariant-mkBoolean]]`hm.gvariant.mkBoolean (v: bool)`:::
Takes a Nix value `v` to a GVariant `boolean` value (GVariant format string `b`). Note, Nix booleans are automatically coerced using this function. That is,
+
[source,nix]
----
foo.bar = hm.gvariant.mkBoolean true;
----
+
is equivalent to
+
[source,nix]
----
foo.bar = true;
----
[[sec-option-types-gvariant-mkString]]`hm.gvariant.mkString (v: string)`:::
Takes a Nix value `v` to a GVariant `string` value (GVariant format string `s`). Note, Nix strings are automatically coerced using this function. That is,
+
[source,nix]
----
foo.bar = hm.gvariant.mkString "a string";
----
+
is equivalent to
+
[source,nix]
----
foo.bar = "a string";
----
[[sec-option-types-gvariant-mkObjectpath]]`hm.gvariant.mkObjectpath (v: string)`:::
Takes a Nix value `v` to a GVariant `objectpath` value (GVariant format string `o`).
[[sec-option-types-gvariant-mkUchar]]`hm.gvariant.mkUchar (v: string)`:::
Takes a Nix value `v` to a GVariant `uchar` value (GVariant format string `y`).
[[sec-option-types-gvariant-mkInt16]]`hm.gvariant.mkInt16 (v: int)`:::
Takes a Nix value `v` to a GVariant `int16` value (GVariant format string `n`).
[[sec-option-types-gvariant-mkUint16]]`hm.gvariant.mkUint16 (v: int)`:::
Takes a Nix value `v` to a GVariant `uint16` value (GVariant format string `q`).
[[sec-option-types-gvariant-mkInt32]]`hm.gvariant.mkInt32 (v: int)`:::
Takes a Nix value `v` to a GVariant `int32` value (GVariant format string `i`). Note, Nix integers are automatically coerced using this function. That is,
+
[source,nix]
----
foo.bar = hm.gvariant.mkInt32 7;
----
+
is equivalent to
+
[source,nix]
----
foo.bar = 7;
----
[[sec-option-types-gvariant-mkUint32]]`hm.gvariant.mkUint32 (v: int)`:::
Takes a Nix value `v` to a GVariant `uint32` value (GVariant format string `u`).
[[sec-option-types-gvariant-mkInt64]]`hm.gvariant.mkInt64 (v: int)`:::
Takes a Nix value `v` to a GVariant `int64` value (GVariant format string `x`).
[[sec-option-types-gvariant-mkUint64]]`hm.gvariant.mkUint64 (v: int)`:::
Takes a Nix value `v` to a GVariant `uint64` value (GVariant format string `t`).
[[sec-option-types-gvariant-mkDouble]]`hm.gvariant.mkDouble (v: double)`:::
Takes a Nix value `v` to a GVariant `double` value (GVariant format string `d`). Note, Nix floats are automatically coerced using this function. That is,
+
[source,nix]
----
foo.bar = hm.gvariant.mkDouble 3.14;
----
+
is equivalent to
+
[source,nix]
----
foo.bar = 3.14;
----
+
[[sec-option-types-gvariant-mkArray]]`hm.gvariant.mkArray type elements`:::
Builds a GVariant array containing the given list of elements, where each element is a GVariant value of the given type (GVariant format string `a${type}`). The `type` value can be constructed using
+
--
- `hm.gvariant.type.string` (GVariant format string `s`)
- `hm.gvariant.type.boolean` (GVariant format string `b`)
- `hm.gvariant.type.uchar` (GVariant format string `y`)
- `hm.gvariant.type.int16` (GVariant format string `n`)
- `hm.gvariant.type.uint16` (GVariant format string `q`)
- `hm.gvariant.type.int32` (GVariant format string `i`)
- `hm.gvariant.type.uint32` (GVariant format string `u`)
- `hm.gvariant.type.int64` (GVariant format string `x`)
- `hm.gvariant.type.uint64` (GVariant format string `t`)
- `hm.gvariant.type.double` (GVariant format string `d`)
- `hm.gvariant.type.variant` (GVariant format string `v`)
- `hm.gvariant.type.arrayOf type` (GVariant format string `a${type}`)
- `hm.gvariant.type.maybeOf type` (GVariant format string `m${type}`)
- `hm.gvariant.type.tupleOf types` (GVariant format string `(${lib.concatStrings types})`)
- `hm.gvariant.type.dictionaryEntryOf [keyType valueType]` (GVariant format string `{${keyType}${valueType}}`)
--
+
where `type` and `types` are themselves a type and list of types, respectively.
+
[[sec-option-types-gvariant-mkEmptyArray]]`hm.gvariant.mkEmptyArray type`:::
An alias of <<sec-option-types-gvariant-mkArray,`hm.gvariant.mkArray type []`>>.
+
[[sec-option-types-gvariant-mkNothing]]`hm.gvariant.mkNothing type`:::
Builds a GVariant maybe value (GVariant format string `m${type}`) whose (non-existent) element is of the given type. The `type` value is constructed as described for the <<sec-option-types-gvariant-mkArray,`mkArray`>> function above.
+
[[sec-option-types-gvariant-mkJust]]`hm.gvariant.mkJust element`:::
Builds a GVariant maybe value (GVariant format string `m${element.type}`) containing the given GVariant element.
+
[[sec-option-types-gvariant-mkTuple]]`hm.gvariant.mkTuple elements`:::
Builds a GVariant tuple containing the given list of elements, where each element is a GVariant value.
+
[[sec-option-types-gvariant-mkVariant]]`hm.gvariant.mkVariant element`:::
Builds a GVariant variant (GVariant format string `v`) which contains the value of a GVariant element.
+
[[sec-option-types-gvariant-mkDictionaryEntry]]`hm.gvariant.mkDictionaryEntry [key value]`:::
Builds a GVariant dictionary entry containing the given list of elements (GVariant format string `{${key.type}${value.type}}`), where each element is a GVariant value.

27
flake.lock generated
View File

@@ -1,27 +0,0 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1685655444,
"narHash": "sha256-6EujQNAeaUkWvpEZZcVF8qSfQrNVWFNNGbUJxv/A5a8=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "e635192892f5abbc2289eaac3a73cdb249abaefd",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

128
flake.nix
View File

@@ -1,112 +1,46 @@
{
description = "Home Manager for Nix";
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
outputs = { self, nixpkgs }:
let
# List of systems supported by home-manager binary
supportedSystems = nixpkgs.lib.platforms.unix;
outputs = { self, nixpkgs, ... }:
{
nixosModules = rec {
home-manager = import ./nixos;
default = home-manager;
};
# deprecated in Nix 2.8
nixosModule = self.nixosModules.default;
# Function to generate a set based on supported systems
forAllSystems = f:
nixpkgs.lib.genAttrs supportedSystems (system: f system);
darwinModules = rec {
home-manager = import ./nix-darwin;
default = home-manager;
};
# unofficial; deprecated in Nix 2.8
darwinModule = self.darwinModules.default;
nixpkgsFor = forAllSystems (system: import nixpkgs { inherit system; });
in rec {
nixosModules.home-manager = import ./nixos;
nixosModule = self.nixosModules.home-manager;
templates = {
standalone = {
path = ./templates/standalone;
description = "Standalone setup";
};
nixos = {
path = ./templates/nixos;
description = "Home Manager as a NixOS module,";
};
nix-darwin = {
path = ./templates/nix-darwin;
description = "Home Manager as a nix-darwin module,";
};
};
darwinModules.home-manager = import ./nix-darwin;
darwinModule = self.darwinModules.home-manager;
defaultTemplate = self.templates.standalone;
packages = forAllSystems (system: {
home-manager = nixpkgsFor.${system}.callPackage ./home-manager { };
});
defaultPackage =
forAllSystems (system: self.packages.${system}.home-manager);
lib = {
hm = (import ./modules/lib/stdlib-extended.nix nixpkgs.lib).hm;
homeManagerConfiguration = { modules ? [ ], pkgs, lib ? pkgs.lib
, extraSpecialArgs ? { }, check ? true
# Deprecated:
, configuration ? null, extraModules ? null, stateVersion ? null
, username ? null, homeDirectory ? null, system ? null }@args:
let
msgForRemovedArg = ''
The 'homeManagerConfiguration' arguments
hm = import ./modules/lib { lib = nixpkgs.lib; };
homeManagerConfiguration = { configuration, system, homeDirectory
, username, extraModules ? [ ], extraSpecialArgs ? { }
, pkgs ? builtins.getAttr system nixpkgs.outputs.legacyPackages
, check ? true, stateVersion ? "20.09" }@args:
assert nixpkgs.lib.versionAtLeast stateVersion "20.09";
- 'configuration',
- 'username',
- 'homeDirectory'
- 'stateVersion',
- 'extraModules', and
- 'system'
have been removed. Instead use the arguments 'pkgs' and
'modules'. See the 22.11 release notes for more: https://nix-community.github.io/home-manager/release-notes.html#sec-release-22.11-highlights
'';
throwForRemovedArgs = v:
let
used = builtins.filter (n: (args.${n} or null) != null) [
"configuration"
"username"
"homeDirectory"
"stateVersion"
"extraModules"
"system"
];
msg = msgForRemovedArg + ''
Deprecated args passed: ''
+ builtins.concatStringsSep " " used;
in lib.throwIf (used != [ ]) msg v;
in throwForRemovedArgs (import ./modules {
inherit pkgs lib check extraSpecialArgs;
import ./modules {
inherit pkgs check extraSpecialArgs;
configuration = { ... }: {
imports = modules
++ [{ programs.home-manager.path = toString ./.; }];
imports = [ configuration ] ++ extraModules;
home = { inherit homeDirectory stateVersion username; };
nixpkgs = { inherit (pkgs) config overlays; };
};
});
};
};
} // (let
forAllSystems = nixpkgs.lib.genAttrs nixpkgs.lib.systems.flakeExposed;
in {
devShells = forAllSystems (system:
let
pkgs = nixpkgs.legacyPackages.${system};
tests = import ./tests { inherit pkgs; };
in tests.run);
packages = forAllSystems (system:
let
pkgs = nixpkgs.legacyPackages.${system};
docs = import ./docs { inherit pkgs; };
hmPkg = pkgs.callPackage ./home-manager { path = toString ./.; };
in {
default = hmPkg;
home-manager = hmPkg;
docs-html = docs.manual.html;
docs-json = docs.options.json;
docs-manpages = docs.manPages;
});
defaultPackage = forAllSystems (system: self.packages.${system}.default);
});
};
}

19
format
View File

@@ -1,5 +1,5 @@
#! /usr/bin/env nix-shell
#! nix-shell -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/6616de389ed55fba6eeba60377fc04732d5a207c.tar.gz -i bash -p findutils nixfmt
#! nix-shell -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/05f0934825c2a0750d4888c4735f9420c906b388.tar.gz -i bash -p findutils nixfmt
CHECK_ARG=
@@ -12,16 +12,29 @@ case $1 in
;;
esac
# The excludes are for files touched by open pull requests and we want
# to avoid merge conflicts.
# The first block of excludes are files where nixfmt does a poor job,
# IMHO. The second block of excludes are files touched by open pull
# requests and we want to avoid merge conflicts.
find . -name '*.nix' \
! -path ./modules/programs/irssi.nix \
\
! -path ./home-manager/home-manager.nix \
! -path ./modules/default.nix \
! -path ./modules/files.nix \
! -path ./modules/home-environment.nix \
! -path ./modules/lib/default.nix \
! -path ./modules/lib/file-type.nix \
! -path ./modules/manual.nix \
! -path ./modules/misc/news.nix \
! -path ./modules/programs/bash.nix \
! -path ./modules/programs/gpg.nix \
! -path ./modules/programs/ssh.nix \
! -path ./modules/programs/tmux.nix \
! -path ./modules/programs/zsh.nix \
! -path ./modules/services/gpg-agent.nix \
! -path ./modules/services/mpd.nix \
! -path ./nix-darwin/default.nix \
! -path ./tests/default.nix \
! -path ./tests/modules/home-environment/session-variables.nix \
! -path ./tests/modules/programs/gpg/override-defaults.nix \
-exec nixfmt $CHECK_ARG {} +

View File

@@ -276,34 +276,22 @@ _home-manager_xdg-get-cache-home () {
##################################################
_hm_subcommands=( "help" "edit" "option" "build" "init" "instantiate" "switch" "generations" "remove-generations" "expire-generations" "packages" "news" "uninstall" )
declare -ra _hm_subcommands
# Finds the active sub-command, if any.
_home-manager_subcommand() {
local subcommand='' i=
for ((i = 1; i < ${#COMP_WORDS[@]}; i++)); do
local word="${COMP_WORDS[i]}"
if [[ " ${_hm_subcommands[*]} " == *" ${word} "* ]]; then
subcommand="$word"
break
fi
done
echo "$subcommand"
}
# shellcheck disable=SC2207
_home-manager_completions ()
{
#--------------------------#
local Subcommands
Subcommands=( "help" "edit" "option" "build" "instantiate" "switch" "generations" "remove-generations" "expire-generations" "packages" "news" "uninstall" )
# ^ « home-manager »'s subcommands.
#--------------------------#
local Options
Options=( "-f" "--file" "-b" "-A" "-I" "-h" "--help" "-n" "--dry-run" "-v" \
"--verbose" "--cores" "--debug" "--impure" "--keep-failed" \
"--keep-going" "-j" "--max-jobs" "--no-substitute" "--no-out-link" \
"-L" "--print-build-logs" \
"--show-trace" "--substitute" "--builders" "--version" \
"--update-input" "--override-input" "--experimental-features" \
"--extra-experimental-features" "--refresh")
Options=( "-f" "--file" "-b" "-A" "-I" "-h" "--help" "-n" "--dry-run" "-v" "--verbose" \
"--cores" "--debug" "--keep-failed" "--keep-going" "-j" "--max-jobs" "--no-substitute" "--show-trace" "--substitute")
# ^ « home-manager »'s options.
@@ -329,53 +317,39 @@ _home-manager_completions ()
# PreviousWord="-f"
# CurrentWord="./"
local CurrentCommand
CurrentCommand="$(_home-manager_subcommand)"
#--------------------------#
COMPREPLY=()
case "$CurrentCommand" in
"init")
case "$PreviousWord" in
"-f"|"--file")
COMPREPLY+=( $( compgen -A file -- "$CurrentWord") )
;;
"-I")
COMPREPLY+=( $( compgen -W "--switch" -- "$CurrentWord" ) )
COMPREPLY+=( $( compgen -A directory -- "$CurrentWord") )
;;
"-A")
# shellcheck disable=SC2119
COMPREPLY+=( $( compgen -W "$(_home-manager_list-nix-attributes)" -- "$CurrentWord") )
;;
"remove-generations")
COMPREPLY+=( $( compgen -W "$(_home-manager_list-generation-identifiers)" -- "$CurrentWord" ) )
;;
*)
case "$PreviousWord" in
"-f"|"--file")
COMPREPLY+=( $( compgen -A file -- "$CurrentWord") )
;;
"-I")
COMPREPLY+=( $( compgen -A directory -- "$CurrentWord") )
;;
"-A")
# shellcheck disable=SC2119
COMPREPLY+=( $( compgen -W "$(_home-manager_list-nix-attributes)" -- "$CurrentWord") )
;;
*)
if [[ ! $CurrentCommand ]]; then
COMPREPLY+=( $( compgen -W "${_hm_subcommands[*]}" -- "$CurrentWord" ) )
fi
COMPREPLY+=( $( compgen -W "${Options[*]}" -- "$CurrentWord" ) )
;;
esac
COMPREPLY+=( $( compgen -W "${Subcommands[*]}" -- "$CurrentWord" ) )
COMPREPLY+=( $( compgen -W "${Options[*]}" -- "$CurrentWord" ) )
;;
esac
#--------------------------#

View File

@@ -43,30 +43,20 @@ complete -c home-manager -n "__fish_use_subcommand" -x -a "expire-generations" -
complete -c home-manager -F -s f -l "file" -d "The home configuration file"
complete -c home-manager -x -s A -d "Select an expression in the configuration file"
complete -c home-manager -F -s I -d "Add a path to the Nix expression search path"
complete -c home-manager -F -l "flake" -d "Use Home Manager configuration at specified flake-uri"
complete -c home-manager -F -l "flake" -d "Use home-manager configuration at specified flake-uri"
complete -c home-manager -F -s b -d "Move existing files to new path rather than fail"
complete -c home-manager -f -s v -l "verbose" -d "Verbose output"
complete -c home-manager -f -s n -l "dry-run" -d "Do a dry run, only prints what actions would be taken"
complete -c home-manager -f -s h -l "help" -d "Print this help"
complete -c home-manager -f -s h -l "version" -d "Print the Home Manager version"
complete -c home-manager -x -l "arg" -d "Override inputs passed to home-manager.nix"
complete -c home-manager -x -l "argstr" -d "Like --arg but the value is a string"
complete -c home-manager -x -l "cores" -d "Threads per job (e.g. -j argument to make)"
complete -c home-manager -x -l "debug"
complete -c home-manager -x -l "impure"
complete -c home-manager -f -l "keep-failed" -d "Keep temporary directory used by failed builds"
complete -c home-manager -f -l "keep-going" -d "Keep going in case of failed builds"
complete -c home-manager -x -s j -l "max-jobs" -d "Max number of build jobs in parallel"
complete -c home-manager -x -l "option" -d "Set Nix configuration option"
complete -c home-manager -x -l "builders" -d "Remote builders"
complete -c home-manager -f -s L -l "print-build-logs" -d "Print full build logs on standard error"
complete -c home-manager -f -l "show-trace" -d "Print stack trace of evaluation errors"
complete -c home-manager -f -l "substitute"
complete -c home-manager -f -l "no-substitute"
complete -c home-manager -f -l "no-out-link"
complete -c home-manager -f -l "update-input"
complete -c home-manager -f -l "override-input"
complete -c home-manager -f -l "experimental-features"
complete -c home-manager -f -l "extra-experimental-features"
complete -c home-manager -f -l "refresh" -d "Consider all previously downloaded files out-of-date"

View File

@@ -8,23 +8,15 @@ _arguments \
'-b[backup files]:EXT:()' \
'--cores[cores]:NUM:()' \
'--debug[debug]' \
'--impure[impure]' \
'--keep-failed[keep failed]' \
'--keep-going[keep going]' \
'--version[version]' \
'(-h --help)'{--help,-h}'[help]' \
'(-v --verbose)'{--verbose,-v}'[verbose]' \
'(-n --dry-run)'{--dry-run,-n}'[dry run]' \
'(-f --file)'{--file,-f}'[configuration file]:FILE:_files' \
'(-j --max-jobs)'{--max-jobs,-j}'[max jobs]:NUM:()' \
'--option[option]:NAME VALUE:()' \
'--builders[builders]:SPEC:()' \
'(-L --print-build-logs)'{--print-build-logs,-L}'[print build logs]' \
'--show-trace[show trace]' \
'--override-input[override flake input]:NAME VALUE:()' \
'--update-input[update flake input]:NAME:()' \
'--experimental-features[set experimental Nix features]:VALUE:()' \
'--extra-experimental-features:[append to experimental Nix features]:VALUE:()' \
'1: :->cmds' \
'*:: :->args' && ret=0
@@ -35,7 +27,6 @@ case "$state" in
'edit[edit]' \
'option[inspect option]' \
'build[build]' \
'init[init]' \
'switch[switch]' \
'generations[list generations]' \
'remove-generations[remove generations]' \
@@ -54,26 +45,13 @@ case "$state" in
_arguments \
'--cores[cores]:NUM:()' \
'--debug[debug]' \
'--impure[impure]' \
'--keep-failed[keep failed]' \
'--keep-going[keep going]' \
'--max-jobs[max jobs]:NUM:()' \
'--no-out-link[no out link]' \
'--no-substitute[no substitute]' \
'--option[option]:NAME VALUE:()' \
'--show-trace[show trace]' \
'--substitute[substitute]' \
'--builders[builders]:SPEC:()' \
'--refresh[refresh]' \
'--override-input[override flake input]:NAME VALUE:()' \
'--update-input[update flake input]:NAME:()' \
'--experimental-features[set experimental Nix features]:VALUE:()' \
'--extra-experimental-features:[append to experimental Nix features]:VALUE:()'
;;
init)
_arguments \
'--switch[switch]' \
':PATH:_files -/'
'--substitute[substitute]'
;;
esac
esac

View File

@@ -1,5 +1,4 @@
{ runCommand, lib, bash, callPackage, coreutils, findutils, gettext, gnused
, less, ncurses, unixtools
{ runCommand, lib, bash, callPackage, coreutils, findutils, gnused, less
# used for pkgs.path for nixos-option
, pkgs
@@ -17,9 +16,8 @@ let
in runCommand "home-manager" {
preferLocalBuild = true;
nativeBuildInputs = [ gettext ];
allowSubstitutes = false;
meta = with lib; {
mainProgram = "home-manager";
description = "A user environment configurator";
maintainers = [ maintainers.rycee ];
platforms = platforms.unix;
@@ -30,21 +28,12 @@ in runCommand "home-manager" {
substituteInPlace $out/bin/home-manager \
--subst-var-by bash "${bash}" \
--subst-var-by DEP_PATH "${
lib.makeBinPath [
coreutils
findutils
gettext
gnused
less
ncurses
nixos-option
unixtools.hostname
]
}" \
--subst-var-by HOME_MANAGER_LIB '${../lib/bash/home-manager.sh}' \
--subst-var-by HOME_MANAGER_PATH '${pathStr}' \
--subst-var-by OUT "$out"
--subst-var-by coreutils "${coreutils}" \
--subst-var-by findutils "${findutils}" \
--subst-var-by gnused "${gnused}" \
--subst-var-by less "${less}" \
--subst-var-by nixos-option "${nixos-option}" \
--subst-var-by HOME_MANAGER_PATH '${pathStr}'
install -D -m755 ${./completion.bash} \
$out/share/bash-completion/completions/home-manager
@@ -52,14 +41,4 @@ in runCommand "home-manager" {
$out/share/zsh/site-functions/_home-manager
install -D -m755 ${./completion.fish} \
$out/share/fish/vendor_completions.d/home-manager.fish
install -D -m755 ${../lib/bash/home-manager.sh} \
"$out/share/bash/home-manager.sh"
for path in ${./po}/*.po; do
lang="''${path##*/}"
lang="''${lang%%.*}"
mkdir -p "$out/share/locale/$lang/LC_MESSAGES"
msgfmt -o "$out/share/locale/$lang/LC_MESSAGES/home-manager.mo" "$path"
done
''

View File

@@ -1,31 +1,13 @@
#!@bash@/bin/bash
# Prepare to use tools from Nixpkgs.
PATH=@DEP_PATH@${PATH:+:}$PATH
PATH=@coreutils@/bin:@findutils@/bin:@gnused@/bin:@less@/bin:@nixos-option@/bin${PATH:+:}$PATH
set -euo pipefail
export TEXTDOMAIN=home-manager
export TEXTDOMAINDIR=@OUT@/share/locale
# shellcheck disable=1091
source @HOME_MANAGER_LIB@
function removeByName() {
nix profile list \
| { grep "$1" || test $? = 1; } \
| cut -d ' ' -f 4 \
| xargs -t $DRY_RUN_CMD nix profile remove $VERBOSE_ARG
}
function setNixProfileCommands() {
if [[ -e $HOME/.nix-profile/manifest.json ]] ; then
LIST_OUTPATH_CMD="nix profile list"
REMOVE_CMD="removeByName"
else
LIST_OUTPATH_CMD="nix-env -q --out-path"
REMOVE_CMD="nix-env --uninstall"
fi
function errorEcho() {
# shellcheck disable=2048,2086
echo $* >&2
}
function setVerboseAndDryRun() {
@@ -50,57 +32,34 @@ function setWorkDir() {
fi
}
# Checks whether the 'flakes' and 'nix-command' Nix options are enabled.
function hasFlakeSupport() {
type -p nix > /dev/null \
&& nix show-config 2> /dev/null \
| grep experimental-features \
| grep flakes \
| grep -q nix-command
}
# Attempts to set the HOME_MANAGER_CONFIG global variable.
#
# If no configuration file can be found then this function will print
# an error message and exit with an error code.
function setConfigFile() {
if [[ -v HOME_MANAGER_CONFIG ]] ; then
if [[ -e "$HOME_MANAGER_CONFIG" ]] ; then
HOME_MANAGER_CONFIG="$(realpath "$HOME_MANAGER_CONFIG")"
else
_i 'No configuration file found at %s' \
"$HOME_MANAGER_CONFIG" >&2
if [[ ! -e "$HOME_MANAGER_CONFIG" ]] ; then
errorEcho "No configuration file found at $HOME_MANAGER_CONFIG"
exit 1
fi
elif [[ ! -v HOME_MANAGER_CONFIG ]]; then
local configHome="${XDG_CONFIG_HOME:-$HOME/.config}"
local hmConfigHome="$configHome/home-manager"
local nixpkgsConfigHome="$configHome/nixpkgs"
local defaultConfFile="$hmConfigHome/home.nix"
local configFile
if [[ -e "$defaultConfFile" ]]; then
configFile="$defaultConfFile"
elif [[ -e "$nixpkgsConfigHome/home.nix" ]]; then
configFile="$nixpkgsConfigHome/home.nix"
# translators: The first '%s' specifier will be replaced by either
# 'home.nix' or 'flake.nix'.
_iWarn $'Keeping your Home Manager %s in %s is deprecated,\nplease move it to %s' \
'home.nix' "$nixpkgsConfigHome" "$hmConfigHome" >&2
elif [[ -e "$HOME/.nixpkgs/home.nix" ]]; then
configFile="$HOME/.nixpkgs/home.nix"
_iWarn $'Keeping your Home Manager %s in %s is deprecated,\nplease move it to %s' \
'home.nix' "$HOME/.nixpkgs" "$hmConfigHome" >&2
fi
if [[ -v configFile ]]; then
HOME_MANAGER_CONFIG="$(realpath "$configFile")"
else
_i 'No configuration file found. Please create one at %s' \
"$defaultConfFile" >&2
exit 1
fi
HOME_MANAGER_CONFIG="$(realpath "$HOME_MANAGER_CONFIG")"
return
fi
local defaultConfFile="${XDG_CONFIG_HOME:-$HOME/.config}/nixpkgs/home.nix"
local confFile
for confFile in "$defaultConfFile" \
"$HOME/.nixpkgs/home.nix" ; do
if [[ -e "$confFile" ]] ; then
HOME_MANAGER_CONFIG="$(realpath "$confFile")"
return
fi
done
errorEcho "No configuration file found." \
"Please create one at $defaultConfFile"
exit 1
}
function setHomeManagerNixPath() {
@@ -109,55 +68,16 @@ function setHomeManagerNixPath() {
"${XDG_CONFIG_HOME:-$HOME/.config}/nixpkgs/home-manager" \
"$HOME/.nixpkgs/home-manager" ; do
if [[ -e "$path" || "$path" =~ ^https?:// ]] ; then
EXTRA_NIX_PATH+=("home-manager=$path")
export NIX_PATH="home-manager=$path${NIX_PATH:+:}$NIX_PATH"
return
fi
done
}
# Sets some useful Home Manager related paths as global read-only variables.
function setHomeManagerPathVariables() {
declare -r globalNixStateDir="${NIX_STATE_DIR:-/nix/var/nix}"
declare -r globalProfilesDir="$globalNixStateDir/profiles/per-user/$USER"
declare -r globalGcrootsDir="$globalNixStateDir/gcroots/per-user/$USER"
declare -r stateHome="${XDG_STATE_HOME:-$HOME/.local/state}"
declare -r userNixStateDir="$stateHome/nix"
declare -gr HM_DATA_HOME="${XDG_DATA_HOME:-$HOME/.local/share}/home-manager"
declare -gr HM_STATE_DIR="$stateHome/home-manager"
declare -gr HM_GCROOT_LEGACY_PATH="$globalGcrootsDir/current-home"
if [[ -d $userNixStateDir/profiles ]]; then
declare -gr HM_PROFILE_DIR="$userNixStateDir/profiles"
elif [[ -d $globalProfilesDir ]]; then
declare -gr HM_PROFILE_DIR="$globalProfilesDir"
else
_iError 'Could not find suitable profile directory, tried %s and %s' \
"$HM_STATE_DIR/profiles" "$globalProfilesDir" >&2
exit 1
fi
}
function setFlakeAttribute() {
if [[ -z $FLAKE_ARG && ! -v HOME_MANAGER_CONFIG ]]; then
local configHome="${XDG_CONFIG_HOME:-$HOME/.config}"
local hmConfigHome="$configHome/home-manager"
local nixpkgsConfigHome="$configHome/nixpkgs"
local configFlake
if [[ -e "$hmConfigHome/flake.nix" ]]; then
configFlake="$hmConfigHome/flake.nix"
elif [[ -e "$nixpkgsConfigHome/flake.nix" ]]; then
configFlake="$nixpkgsConfigHome/flake.nix"
_iWarn $'Keeping your Home Manager %s in %s is deprecated,\nplease move it to %s' \
'flake.nix' "$nixpkgsConfigHome" "$hmConfigHome" >&2
fi
if [[ -v configFlake ]]; then
FLAKE_ARG="$(dirname "$(readlink -f "$configFlake")")"
fi
local configFlake="${XDG_CONFIG_HOME:-$HOME/.config}/nixpkgs/flake.nix"
if [[ -z $FLAKE_ARG && ! -v HOME_MANAGER_CONFIG && -e "$configFlake" ]]; then
FLAKE_ARG="$(dirname "$(readlink -f "$configFlake")")"
fi
if [[ -n "$FLAKE_ARG" ]]; then
@@ -165,20 +85,13 @@ function setFlakeAttribute() {
case $FLAKE_ARG in
*#*)
local name="${FLAKE_ARG#*#}"
;;
;;
*)
local name="$USER"
# Check both long and short hostnames; long first to preserve
# pre-existing behaviour in case both happen to be defined.
for n in "$USER@$(hostname)" "$USER@$(hostname -s)"; do
if [[ "$(nix eval "$flake#homeConfigurations" --apply "x: x ? \"$n\"")" == "true" ]]; then
name="$n"
if [[ -v VERBOSE ]]; then
echo "Using flake homeConfiguration for $name"
fi
fi
done
;;
local name="$USER@$(hostname)"
if [ "$(nix eval "$flake#homeConfigurations" --apply "x: x ? \"$name\"")" = "false" ]; then
name="$USER"
fi
;;
esac
export FLAKE_CONFIG_URI="$flake#homeConfigurations.\"$name\""
fi
@@ -187,11 +100,11 @@ function setFlakeAttribute() {
function doInspectOption() {
setFlakeAttribute
if [[ -v FLAKE_CONFIG_URI ]]; then
# translators: Here "flake" is a noun that refers to the Nix Flakes feature.
_iError "Can't inspect options of a flake configuration"
errorEcho "Can't inspect options of a flake configuration"
exit 1
fi
setConfigFile
setHomeManagerNixPath
local extraArgs=("$@")
@@ -224,231 +137,14 @@ function doInspectOption() {
"${PASSTHROUGH_OPTS[@]}"
}
function doInit() {
# The directory where we should place the initial configuration.
local confDir
# Whether we should immediate activate the configuration.
local switch
# Whether we should create a flake file.
local withFlake
if hasFlakeSupport; then
withFlake=1
fi
while (( $# > 0 )); do
local opt="$1"
shift
case $opt in
--no-flake)
unset withFlake
;;
--switch)
switch=1
;;
-*)
_iError "%s: unknown option '%s'" "$0" "$opt" >&2
exit 1
;;
*)
if [[ -v confDir ]]; then
_i "Run '%s --help' for usage help" "$0" >&2
exit 1
else
confDir="$opt"
fi
;;
esac
done
if [[ ! -v confDir ]]; then
confDir="${XDG_CONFIG_HOME:-$HOME/.config}/home-manager"
fi
if [[ ! -e $confDir ]]; then
mkdir -p "$confDir"
fi
if [[ ! -d $confDir ]]; then
_iError "%s: unknown option '%s'" "$0" "$opt" >&2
exit 1
fi
local confFile="$confDir/home.nix"
local flakeFile="$confDir/flake.nix"
if [[ -e $confFile ]]; then
_i 'The file %s already exists, leaving it unchanged...' "$confFile"
else
_i 'Creating %s...' "$confFile"
local nl=$'\n'
local xdgVars=""
if [[ -v XDG_CACHE_HOME && $XDG_CACHE_HOME != "$HOME/.cache" ]]; then
xdgVars="$xdgVars xdg.cacheHome = \"$XDG_CACHE_HOME\";$nl"
fi
if [[ -v XDG_CONFIG_HOME && $XDG_CONFIG_HOME != "$HOME/.config" ]]; then
xdgVars="$xdgVars xdg.configHome = \"$XDG_CONFIG_HOME\";$nl"
fi
if [[ -v XDG_DATA_HOME && $XDG_DATA_HOME != "$HOME/.local/share" ]]; then
xdgVars="$xdgVars xdg.dataHome = \"$XDG_DATA_HOME\";$nl"
fi
if [[ -v XDG_STATE_HOME && $XDG_STATE_HOME != "$HOME/.local/state" ]]; then
xdgVars="$xdgVars xdg.stateHome = \"$XDG_STATE_HOME\";$nl"
fi
mkdir -p "$confDir"
cat > "$confFile" <<EOF
{ config, pkgs, ... }:
{
# Home Manager needs a bit of information about you and the paths it should
# manage.
home.username = "$USER";
home.homeDirectory = "$HOME";
$xdgVars
# This value determines the Home Manager release that your configuration is
# compatible with. This helps avoid breakage when a new Home Manager release
# introduces backwards incompatible changes.
#
# You should not change this value, even if you update Home Manager. If you do
# want to update the value, then make sure to first check the Home Manager
# release notes.
home.stateVersion = "23.05"; # Please read the comment before changing.
# The home.packages option allows you to install Nix packages into your
# environment.
home.packages = [
# # Adds the 'hello' command to your environment. It prints a friendly
# # "Hello, world!" when run.
# pkgs.hello
# # It is sometimes useful to fine-tune packages, for example, by applying
# # overrides. You can do that directly here, just don't forget the
# # parentheses. Maybe you want to install Nerd Fonts with a limited number of
# # fonts?
# (pkgs.nerdfonts.override { fonts = [ "FantasqueSansMono" ]; })
# # You can also create simple shell scripts directly inside your
# # configuration. For example, this adds a command 'my-hello' to your
# # environment:
# (pkgs.writeShellScriptBin "my-hello" ''
# echo "Hello, \${config.home.username}!"
# '')
];
# Home Manager is pretty good at managing dotfiles. The primary way to manage
# plain files is through 'home.file'.
home.file = {
# # Building this configuration will create a copy of 'dotfiles/screenrc' in
# # the Nix store. Activating the configuration will then make '~/.screenrc' a
# # symlink to the Nix store copy.
# ".screenrc".source = dotfiles/screenrc;
# # You can also set the file content immediately.
# ".gradle/gradle.properties".text = ''
# org.gradle.console=verbose
# org.gradle.daemon.idletimeout=3600000
# '';
};
# You can also manage environment variables but you will have to manually
# source
#
# ~/.nix-profile/etc/profile.d/hm-session-vars.sh
#
# or
#
# /etc/profiles/per-user/$USER/etc/profile.d/hm-session-vars.sh
#
# if you don't want to manage your shell through Home Manager.
home.sessionVariables = {
# EDITOR = "emacs";
};
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;
}
EOF
fi
if [[ ! -v withFlake ]]; then
HOME_MANAGER_CONFIG="$confFile"
else
FLAKE_ARG="$confDir"
if [[ -e $flakeFile ]]; then
_i 'The file %s already exists, leaving it unchanged...' "$flakeFile"
else
_i 'Creating %s...' "$flakeFile"
local nixSystem
nixSystem=$(nix eval --expr builtins.currentSystem --raw --impure)
mkdir -p "$confDir"
cat > "$flakeFile" <<EOF
{
description = "Home Manager configuration of $USER";
inputs = {
# Specify the source of Home Manager and Nixpkgs.
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { nixpkgs, home-manager, ... }:
let
system = "$nixSystem";
pkgs = nixpkgs.legacyPackages.\${system};
in {
homeConfigurations."$USER" = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
# Specify your home configuration modules here, for example,
# the path to your home.nix.
modules = [ ./home.nix ];
# Optionally use extraSpecialArgs
# to pass through arguments to home.nix
};
};
}
EOF
fi
fi
if [[ -v switch ]]; then
echo
_i "Creating initial Home Manager generation..."
echo
if doSwitch; then
# translators: The "%s" specifier will be replaced by a file path.
_i $'All done! The home-manager tool should now be installed and you can edit\n\n %s\n\nto configure Home Manager. Run \'man home-configuration.nix\' to\nsee all available options.' \
"$confFile"
exit 0
else
# translators: The "%s" specifier will be replaced by a URL.
_i $'Uh oh, the installation failed! Please create an issue at\n\n %s\n\nif the error seems to be the fault of Home Manager.' \
"https://github.com/nix-community/home-manager/issues"
exit 1
fi
fi
}
function doInstantiate() {
setFlakeAttribute
if [[ -v FLAKE_CONFIG_URI ]]; then
# translators: Here "flake" is a noun that refers to the Nix Flakes feature.
_i "Can't instantiate a flake configuration" >&2
errorEcho "Can't instantiate a flake configuration"
exit 1
fi
setConfigFile
setHomeManagerNixPath
local extraArgs=()
@@ -470,6 +166,7 @@ function doInstantiate() {
function doBuildAttr() {
setConfigFile
setHomeManagerNixPath
local extraArgs=("$@")
@@ -489,18 +186,6 @@ function doBuildAttr() {
--argstr confAttr "$HOME_MANAGER_CONFIG_ATTRIBUTE"
}
function doBuildFlake() {
local extraArgs=("$@")
if [[ -v VERBOSE ]]; then
extraArgs=("${extraArgs[@]}" "--verbose")
fi
nix build \
"${extraArgs[@]}" \
"${PASSTHROUGH_OPTS[@]}"
}
# Presents news to the user. Takes as argument the path to a "news
# info" file as generated by `buildNews`.
function presentNews() {
@@ -515,31 +200,34 @@ function presentNews() {
elif [[ "$newsDisplay" == "silent" ]]; then
return
elif [[ "$newsDisplay" == "notify" ]]; then
local cmd msg
cmd="$(basename "$0")"
msg="$(_ip \
$'There is %d unread and relevant news item.\nRead it by running the command "%s news".' \
$'There are %d unread and relevant news items.\nRead them by running the command "%s news".' \
"$newsNumUnread" "$newsNumUnread" "$cmd")"
local msg
if [[ $newsNumUnread -eq 1 ]]; then
msg="There is an unread and relevant news item.\n"
msg+="Read it by running the command '$(basename "$0") news'."
else
msg="There are $newsNumUnread unread and relevant news items.\n"
msg+="Read them by running the command '$(basename "$0") news'."
fi
# Not actually an error but here stdout is reserved for
# nix-build output.
echo $'\n'"$msg"$'\n' >&2
errorEcho
errorEcho -e "$msg"
errorEcho
if [[ -v DISPLAY ]] && type -P notify-send > /dev/null; then
notify-send "Home Manager" "$msg" > /dev/null 2>&1 || true
notify-send "Home Manager" "$msg"
fi
elif [[ "$newsDisplay" == "show" ]]; then
doShowNews --unread
else
_i 'Unknown "news.display" setting "%s".' "$newsDisplay" >&2
errorEcho "Unknown 'news.display' setting '$newsDisplay'."
fi
}
function doEdit() {
if [[ ! -v EDITOR || -z $EDITOR ]]; then
# shellcheck disable=2016
_i 'Please set the $EDITOR environment variable' >&2
errorEcho "Please set the \$EDITOR environment variable"
return 1
fi
@@ -554,37 +242,54 @@ function doEdit() {
function doBuild() {
if [[ ! -w . ]]; then
_i 'Cannot run build in read-only directory' >&2
errorEcho "Cannot run build in read-only directory";
return 1
fi
setWorkDir
setFlakeAttribute
if [[ -v FLAKE_CONFIG_URI ]]; then
doBuildFlake \
local exitCode=0
nix build \
"${PASSTHROUGH_OPTS[@]}" \
${DRY_RUN+--dry-run} \
"$FLAKE_CONFIG_URI.activationPackage" \
${DRY_RUN+--dry-run} \
${NO_OUT_LINK+--no-link} \
${PRINT_BUILD_LOGS+--print-build-logs} \
|| return
else
doBuildAttr \
${NO_OUT_LINK+--no-out-link} \
--attr activationPackage \
|| return
local newsInfo
newsInfo=$(buildNews)
presentNews "$newsInfo"
|| exitCode=1
return $exitCode
fi
setWorkDir
local newsInfo
newsInfo=$(buildNews)
local exitCode
doBuildAttr --attr activationPackage \
&& exitCode=0 || exitCode=1
presentNews "$newsInfo"
return $exitCode
}
function doSwitch() {
setFlakeAttribute
if [[ -v FLAKE_CONFIG_URI ]]; then
local exitCode=0
nix run \
"${PASSTHROUGH_OPTS[@]}" \
"$FLAKE_CONFIG_URI.activationPackage" \
|| exitCode=1
return $exitCode
fi
setWorkDir
local newsInfo
newsInfo=$(buildNews)
local generation
local exitCode=0
# Build the generation and run the activate script. Note, we
# specify an output link so that it is treated as a GC root. This
@@ -592,24 +297,14 @@ function doSwitch() {
# before activation completes.
generation="$WORK_DIR/generation"
setFlakeAttribute
if [[ -v FLAKE_CONFIG_URI ]]; then
doBuildFlake \
"$FLAKE_CONFIG_URI.activationPackage" \
--out-link "$generation" \
${PRINT_BUILD_LOGS+--print-build-logs} \
&& "$generation/activate" || return
else
doBuildAttr \
--out-link "$generation" \
--attr activationPackage \
&& "$generation/activate" || return
doBuildAttr \
--out-link "$generation" \
--attr activationPackage \
&& "$generation/activate" || exitCode=1
local newsInfo
newsInfo=$(buildNews)
presentNews "$newsInfo"
presentNews "$newsInfo"
fi
return $exitCode
}
function doListGens() {
@@ -619,7 +314,7 @@ function doListGens() {
color="always"
fi
pushd "$HM_PROFILE_DIR" > /dev/null
pushd "$NIX_STATE_DIR/profiles/per-user/$USER" > /dev/null
# shellcheck disable=2012
ls --color=$color -gG --time-style=long-iso --sort time home-manager-*-link \
| cut -d' ' -f 4- \
@@ -632,17 +327,17 @@ function doListGens() {
function doRmGenerations() {
setVerboseAndDryRun
pushd "$HM_PROFILE_DIR" > /dev/null
pushd "$NIX_STATE_DIR/profiles/per-user/$USER" > /dev/null
for generationId in "$@"; do
local linkName="home-manager-$generationId-link"
if [[ ! -e $linkName ]]; then
_i 'No generation with ID %s' "$generationId" >&2
errorEcho "No generation with ID $generationId"
elif [[ $linkName == $(readlink home-manager) ]]; then
_i 'Cannot remove the current generation %s' "$generationId" >&2
errorEcho "Cannot remove the current generation $generationId"
else
_i 'Removing generation %s' "$generationId"
echo Removing generation $generationId
$DRY_RUN_CMD rm $VERBOSE_ARG $linkName
fi
done
@@ -650,10 +345,17 @@ function doRmGenerations() {
popd > /dev/null
}
function doRmAllGenerations() {
$DRY_RUN_CMD rm $VERBOSE_ARG \
"$NIX_STATE_DIR/profiles/per-user/$USER/home-manager"*
}
function doExpireGenerations() {
local profileDir="$NIX_STATE_DIR/profiles/per-user/$USER"
local generations
generations="$( \
find "$HM_PROFILE_DIR" -name 'home-manager-*-link' -not -newermt "$1" \
find "$profileDir" -name 'home-manager-*-link' -not -newermt "$1" \
| sed 's/^.*-\([0-9]*\)-link$/\1/' \
)"
@@ -661,18 +363,17 @@ function doExpireGenerations() {
# shellcheck disable=2086
doRmGenerations $generations
elif [[ -v VERBOSE ]]; then
_i "No generations to expire"
echo "No generations to expire"
fi
}
function doListPackages() {
setNixProfileCommands
local outPath
outPath="$($LIST_OUTPATH_CMD | grep -o '/.*home-manager-path$')"
outPath="$(nix-env -q --out-path | grep -o '/.*home-manager-path$')"
if [[ -n "$outPath" ]] ; then
nix-store -q --references "$outPath" | sed 's/[^-]*-//'
else
_i 'No home-manager packages seem to be installed.' >&2
errorEcho "No home-manager packages seem to be installed."
fi
}
@@ -696,24 +397,17 @@ function newsReadIdsFile() {
# put the output in the work directory to avoid the risk of an
# unfortunately timed GC removing it.
function buildNews() {
setFlakeAttribute
if [[ -v FLAKE_CONFIG_URI ]]; then
# translators: Here "flake" is a noun that refers to the Nix Flakes feature.
_iError "Sorry, this command is not yet supported in flake setup" >&2
exit 1
fi
local output
output="$WORK_DIR/news-info.sh"
doBuildAttr \
--out-link "$output" \
--no-build-output \
--quiet \
--arg check false \
--argstr newsReadIdsFile "$(newsReadIdsFile)" \
--attr newsInfo \
> /dev/null
--out-link "$output" \
--no-build-output \
--quiet \
--arg check false \
--argstr newsReadIdsFile "$(newsReadIdsFile)" \
--attr newsInfo \
> /dev/null
echo "$output"
}
@@ -736,7 +430,7 @@ function doShowNews() {
${PAGER:-less} "$newsFileUnread"
;;
*)
_i 'Unknown argument %s' "$1"
errorEcho "Unknown argument $1"
return 1
esac
@@ -750,54 +444,53 @@ function doShowNews() {
function doUninstall() {
setVerboseAndDryRun
setNixProfileCommands
_i 'This will remove Home Manager from your system.'
echo "This will remove Home Manager from your system."
if [[ -v DRY_RUN ]]; then
_i 'This is a dry run, nothing will actually be uninstalled.'
echo "This is a dry run, nothing will actually be uninstalled."
fi
local confirmation
read -r -n 1 -p "$(_i 'Really uninstall Home Manager?') [y/n] " confirmation
read -r -n 1 -p "Really uninstall Home Manager? [y/n] " confirmation
echo
# shellcheck disable=2086
case $confirmation in
y|Y)
_i "Switching to empty Home Manager configuration..."
echo "Switching to empty Home Manager configuration..."
HOME_MANAGER_CONFIG="$(mktemp --tmpdir home-manager.XXXXXXXXXX)"
echo "{ lib, ... }: {" > "$HOME_MANAGER_CONFIG"
echo " home.file = lib.mkForce {};" >> "$HOME_MANAGER_CONFIG"
echo " home.stateVersion = \"18.09\";" >> "$HOME_MANAGER_CONFIG"
echo "}" >> "$HOME_MANAGER_CONFIG"
echo "{ lib, ... }: { home.file = lib.mkForce {}; }" > "$HOME_MANAGER_CONFIG"
doSwitch
$DRY_RUN_CMD $REMOVE_CMD home-manager-path || true
$DRY_RUN_CMD nix-env -e home-manager-path || true
rm "$HOME_MANAGER_CONFIG"
if [[ -e $HM_DATA_HOME ]]; then
$DRY_RUN_CMD rm $VERBOSE_ARG -r "$HM_DATA_HOME"
fi
if [[ -e $HM_STATE_DIR ]]; then
$DRY_RUN_CMD rm $VERBOSE_ARG -r "$HM_STATE_DIR"
fi
if [[ -e $HM_PROFILE_DIR ]]; then
$DRY_RUN_CMD rm $VERBOSE_ARG "$HM_PROFILE_DIR/home-manager"*
fi
if [[ -e $HM_GCROOT_LEGACY_PATH ]]; then
$DRY_RUN_CMD rm $VERBOSE_ARG "$HM_GCROOT_LEGACY_PATH"
fi
$DRY_RUN_CMD rm $VERBOSE_ARG -r \
"${XDG_DATA_HOME:-$HOME/.local/share}/home-manager"
$DRY_RUN_CMD rm $VERBOSE_ARG \
"$NIX_STATE_DIR/gcroots/per-user/$USER/current-home"
;;
*)
_i "Yay!"
echo "Yay!"
exit 0
;;
esac
_i "Home Manager is uninstalled but your home.nix is left untouched."
local deleteProfiles
read -r -n 1 \
-p 'Remove all Home Manager generations? [y/n] ' \
deleteProfiles
echo
case $deleteProfiles in
y|Y)
doRmAllGenerations
echo "All generations are now eligible for garbage collection."
;;
*)
echo "Leaving generations but they may still be garbage collected."
;;
esac
echo "Home Manager is uninstalled but your home.nix is left untouched."
}
function doHelp() {
@@ -810,31 +503,23 @@ function doHelp() {
echo " -A ATTRIBUTE Optional attribute that selects a configuration"
echo " expression in the configuration file."
echo " -I PATH Add a path to the Nix expression search path."
echo " --flake flake-uri Use Home Manager configuration at flake-uri"
echo " Default is '~/.config/home-manager'."
echo " --flake flake-uri Use home-manager configuration at flake-uri"
echo " -b EXT Move existing files to new path rather than fail."
echo " -v Verbose output"
echo " -n Do a dry run, only prints what actions would be taken"
echo " -h Print this help"
echo " --version Print the Home Manager version"
echo
echo "Options passed on to nix-build(1)"
echo
echo " --arg(str) NAME VALUE Override inputs passed to home-manager.nix"
echo " --cores NUM"
echo " --debug"
echo " --impure"
echo " --keep-failed"
echo " --keep-going"
echo " -j, --max-jobs NUM"
echo " --option NAME VALUE"
echo " -L, --print-build-logs"
echo " --show-trace"
echo " --(no-)substitute"
echo " --no-out-link Do not create a symlink to the output path"
echo " --no-write-lock-file"
echo " --builders VALUE"
echo " --refresh Consider all previously downloaded files out-of-date"
echo
echo "Commands"
echo
@@ -847,13 +532,6 @@ function doHelp() {
echo
echo " build Build configuration into result directory"
echo
echo " init [--switch] [DIR]"
echo " Initializes a configuration in the given directory. If the directory"
echo " does not exist, then it will be created. The default directory is"
echo " '~/.config/home-manager'."
echo
echo " --switch Immediately activate the generated configuration."
echo
echo " instantiate Instantiate the configuration and print the resulting derivation"
echo
echo " switch Build and activate configuration"
@@ -876,6 +554,8 @@ function doHelp() {
echo " uninstall Remove Home Manager"
}
readonly NIX_STATE_DIR="${NIX_STATE_DIR:-/nix/var/nix}"
EXTRA_NIX_PATH=()
HOME_MANAGER_CONFIG_ATTRIBUTE=""
PASSTHROUGH_OPTS=()
@@ -883,14 +563,11 @@ COMMAND=""
COMMAND_ARGS=()
FLAKE_ARG=""
setHomeManagerNixPath
setHomeManagerPathVariables
while [[ $# -gt 0 ]]; do
opt="$1"
shift
case $opt in
build|init|instantiate|option|edit|expire-generations|generations|help|news|packages|remove-generations|switch|uninstall)
build|instantiate|option|edit|expire-generations|generations|help|news|packages|remove-generations|switch|uninstall)
COMMAND="$opt"
;;
-A)
@@ -913,7 +590,7 @@ while [[ $# -gt 0 ]]; do
FLAKE_ARG="$1"
shift
;;
--recreate-lock-file|--no-update-lock-file|--no-write-lock-file|--no-registries|--commit-lock-file|--refresh)
--recreate-lock-file|--no-update-lock-file|--no-write-lock-file|--no-registries|--commit-lock-file)
PASSTHROUGH_OPTS+=("$opt")
;;
--update-input)
@@ -924,20 +601,6 @@ while [[ $# -gt 0 ]]; do
PASSTHROUGH_OPTS+=("$opt" "$1" "$2")
shift 2
;;
--experimental-features)
PASSTHROUGH_OPTS+=("$opt" "$1")
shift
;;
--extra-experimental-features)
PASSTHROUGH_OPTS+=("$opt" "$1")
shift
;;
--no-out-link)
NO_OUT_LINK=1
;;
-L|--print-build-logs)
PRINT_BUILD_LOGS=1
;;
-h|--help)
doHelp
exit 0
@@ -949,29 +612,29 @@ while [[ $# -gt 0 ]]; do
PASSTHROUGH_OPTS+=("$opt" "$1" "$2")
shift 2
;;
-j|--max-jobs|--cores|--builders)
-j|--max-jobs|--cores)
PASSTHROUGH_OPTS+=("$opt" "$1")
shift
;;
--debug|--keep-failed|--keep-going|--show-trace\
|--substitute|--no-substitute|--impure)
|--substitute|--no-substitute)
PASSTHROUGH_OPTS+=("$opt")
;;
-v|--verbose)
export VERBOSE=1
;;
--version)
echo 23.11-pre
echo 21.11
exit 0
;;
*)
case $COMMAND in
init|expire-generations|remove-generations|option)
expire-generations|remove-generations|option)
COMMAND_ARGS+=("$opt")
;;
*)
_iError "%s: unknown option '%s'" "$0" "$opt" >&2
_i "Run '%s --help' for usage help" "$0" >&2
errorEcho "$0: unknown option '$opt'"
errorEcho "Run '$0 --help' for usage help"
exit 1
;;
esac
@@ -991,9 +654,6 @@ case $COMMAND in
build)
doBuild
;;
init)
doInit "${COMMAND_ARGS[@]}"
;;
instantiate)
doInstantiate
;;
@@ -1008,7 +668,7 @@ case $COMMAND in
;;
expire-generations)
if [[ ${#COMMAND_ARGS[@]} != 1 ]]; then
_i 'expire-generations expects one argument, got %d.' "${#COMMAND_ARGS[@]}" >&2
errorEcho "expire-generations expects one argument, got ${#COMMAND_ARGS[@]}."
exit 1
else
doExpireGenerations "${COMMAND_ARGS[@]}"
@@ -1030,10 +690,8 @@ case $COMMAND in
doHelp
;;
*)
_iError 'Unknown command: %s' "$COMMAND" >&2
errorEcho "Unknown command: $COMMAND"
doHelp >&2
exit 1
;;
esac
# vim: ft=bash

View File

@@ -1,64 +1,77 @@
{ pkgs ? import <nixpkgs> { }, confPath, confAttr ? null, check ? true
, newsReadIdsFile ? null }:
{ pkgs ? import <nixpkgs> {}
, confPath
, confAttr ? null
, check ? true
, newsReadIdsFile ? null
}:
with pkgs.lib;
let
inherit (pkgs.lib)
concatMapStringsSep fileContents filter length optionalString removeSuffix
replaceStrings splitString;
env = import ../modules {
configuration = if confAttr == "" || confAttr == null then
confPath
else
(import confPath).${confAttr};
configuration =
if confAttr == "" || confAttr == null
then confPath
else (import confPath).${confAttr};
pkgs = pkgs;
check = check;
};
newsReadIds = if newsReadIdsFile == null then
{ }
else
let ids = splitString "\n" (fileContents newsReadIdsFile);
in builtins.listToAttrs (map (id: {
name = id;
value = null;
}) ids);
newsReadIds =
if newsReadIdsFile == null
then {}
else
let
ids = splitString "\n" (fileContents newsReadIdsFile);
in
builtins.listToAttrs (map (id: { name = id; value = null; }) ids);
newsIsRead = entry: builtins.hasAttr entry.id newsReadIds;
newsFiltered = let pred = entry: entry.condition && !newsIsRead entry;
in filter pred env.newsEntries;
newsFiltered =
let
pred = entry: entry.condition && ! newsIsRead entry;
in
filter pred env.newsEntries;
newsNumUnread = length newsFiltered;
newsFileUnread = pkgs.writeText "news-unread.txt" (concatMapStringsSep "\n\n"
(entry:
newsFileUnread = pkgs.writeText "news-unread.txt" (
concatMapStringsSep "\n\n" (entry:
let
time =
replaceStrings [ "T" ] [ " " ] (removeSuffix "+00:00" entry.time);
in ''
* ${time}
time = replaceStrings ["T"] [" "] (removeSuffix "+00:00" entry.time);
in
''
* ${time}
${replaceStrings [ "\n" ] [ "\n " ] entry.message}
'') newsFiltered);
${replaceStrings ["\n"] ["\n "] entry.message}
''
) newsFiltered
);
newsFileAll = pkgs.writeText "news-all.txt" (concatMapStringsSep "\n\n"
(entry:
newsFileAll = pkgs.writeText "news-all.txt" (
concatMapStringsSep "\n\n" (entry:
let
flag = if newsIsRead entry then "read" else "unread";
time =
replaceStrings [ "T" ] [ " " ] (removeSuffix "+00:00" entry.time);
in ''
* ${time} [${flag}]
time = replaceStrings ["T"] [" "] (removeSuffix "+00:00" entry.time);
in
''
* ${time} [${flag}]
${replaceStrings [ "\n" ] [ "\n " ] entry.message}
'') env.newsEntries);
${replaceStrings ["\n"] ["\n "] entry.message}
''
) env.newsEntries
);
# File where each line corresponds to an unread news entry
# identifier. If non-empty then the file ends in "\n".
newsUnreadIdsFile = pkgs.writeText "news-unread-ids"
(let text = concatMapStringsSep "\n" (entry: entry.id) newsFiltered;
in text + optionalString (text != "") "\n");
newsUnreadIdsFile = pkgs.writeText "news-unread-ids" (
let
text = concatMapStringsSep "\n" (entry: entry.id) newsFiltered;
in
text + optionalString (text != "") "\n"
);
newsInfo = pkgs.writeText "news-info.sh" ''
local newsNumUnread=${toString newsNumUnread}
@@ -68,7 +81,8 @@ let
local newsUnreadIdsFile="${newsUnreadIdsFile}"
'';
in {
inherit (env) activationPackage;
inherit newsInfo;
}
in
{
inherit (env) activationPackage;
inherit newsInfo;
}

View File

@@ -1,20 +1,84 @@
{ home-manager, runCommand }:
let
hmBashLibInit = ''
export TEXTDOMAIN=home-manager
export TEXTDOMAINDIR=${home-manager}/share/locale
source ${home-manager}/share/bash/home-manager.sh
'';
in runCommand "home-manager-install" {
runCommand "home-manager-install" {
propagatedBuildInputs = [ home-manager ];
preferLocalBuild = true;
allowSubstitutes = false;
shellHookOnly = true;
shellHook = "exec ${home-manager}/bin/home-manager init --switch --no-flake";
shellHook = ''
confFile="''${XDG_CONFIG_HOME:-$HOME/.config}/nixpkgs/home.nix"
if [[ ! -e $confFile ]]; then
echo
echo "Creating initial Home Manager configuration..."
nl=$'\n'
xdgVars=""
if [[ -v XDG_CACHE_HOME && $XDG_CACHE_HOME != "$HOME/.cache" ]]; then
xdgVars="$xdgVars xdg.cacheHome = \"$XDG_CACHE_HOME\";$nl"
fi
if [[ -v XDG_CONFIG_HOME && $XDG_CONFIG_HOME != "$HOME/.config" ]]; then
xdgVars="$xdgVars xdg.configHome = \"$XDG_CONFIG_HOME\";$nl"
fi
if [[ -v XDG_DATA_HOME && $XDG_DATA_HOME != "$HOME/.local/share" ]]; then
xdgVars="$xdgVars xdg.dataHome = \"$XDG_DATA_HOME\";$nl"
fi
mkdir -p "$(dirname "$confFile")"
cat > $confFile <<EOF
{ config, pkgs, ... }:
{
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;
# Home Manager needs a bit of information about you and the
# paths it should manage.
home.username = "$USER";
home.homeDirectory = "$HOME";
$xdgVars
# This value determines the Home Manager release that your
# configuration is compatible with. This helps avoid breakage
# when a new Home Manager release introduces backwards
# incompatible changes.
#
# You can update Home Manager without changing this value. See
# the Home Manager release notes for a list of state version
# changes in each release.
home.stateVersion = "21.11";
}
EOF
fi
echo
echo "Creating initial Home Manager generation..."
echo
if home-manager switch; then
cat <<EOF
All done! The home-manager tool should now be installed and you
can edit
$confFile
to configure Home Manager. Run 'man home-configuration.nix' to
see all available options.
EOF
exit 0
else
cat <<EOF
Uh oh, the installation failed! Please create an issue at
https://github.com/nix-community/home-manager/issues
if the error seems to be the fault of Home Manager.
EOF
exit 1
fi
'';
} ''
${hmBashLibInit}
_iError 'This derivation is not buildable, please run it using nix-shell.'
echo This derivation is not buildable, instead run it using nix-shell.
exit 1
''

View File

@@ -1,219 +0,0 @@
# 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: 2023-05-27 09:08+0200\n"
"PO-Revision-Date: 2023-04-23 12:49+0000\n"
"Last-Translator: Leix b <abone9999@gmail.com>\n"
"Language-Team: Catalan <https://hosted.weblate.org/projects/home-manager/cli/"
"ca/>\n"
"Language: ca\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.18-dev\n"
#: home-manager/home-manager:71
msgid "No configuration file found at %s"
msgstr "No s'ha trobat cap fitxer de configuració a %s"
#. translators: The first '%s' specifier will be replaced by either
#. 'home.nix' or 'flake.nix'.
#: home-manager/home-manager:88 home-manager/home-manager:92
#: home-manager/home-manager:154
msgid ""
"Keeping your Home Manager %s in %s is deprecated,\n"
"please move it to %s"
msgstr ""
"Mantenir el teu Home Manager %s a %s està obsolet,\n"
"si us plau mou-lo a %s"
#: home-manager/home-manager:99
msgid "No configuration file found. Please create one at %s"
msgstr "No s'ha trobat cap fitxer de configuració. Si us plau, creeu un a %s"
#: home-manager/home-manager:136
msgid "Could not find suitable profile directory, tried %s and %s"
msgstr ""
"No s'ha pogut trobar un directori de perfils adequat, s'ha provat %s i %s"
#. translators: Here "flake" is a noun that refers to the Nix Flakes feature.
#: home-manager/home-manager:191
msgid "Can't inspect options of a flake configuration"
msgstr "No s'han pogut inspeccionar les opcions de configuració de flake"
#: home-manager/home-manager:253 home-manager/home-manager:276
#: home-manager/home-manager:973
msgid "%s: unknown option '%s'"
msgstr "%: opció desconeguda '%s'"
#: home-manager/home-manager:258 home-manager/home-manager:974
msgid "Run '%s --help' for usage help"
msgstr "Executa '%s --help' per veure l'ajuda d'ús"
#: home-manager/home-manager:284 home-manager/home-manager:383
msgid "The file %s already exists, leaving it unchanged..."
msgstr "El fitxer %s ja existeix, deixant sense modificar..."
#: home-manager/home-manager:286 home-manager/home-manager:385
msgid "Creating %s..."
msgstr "Creant %s..."
#: home-manager/home-manager:427
msgid "Creating initial Home Manager generation..."
msgstr "Creant generació inicial de Home Manager..."
#. translators: The "%s" specifier will be replaced by a file path.
#: home-manager/home-manager:432
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 ""
"Tot fet! L'eina home-manager hauria de estar instal·lada i pots editar\n"
"\n"
" %s\n"
"\n"
"per a configurar Home Manager. Executa 'man home-configuration.nix' per\n"
"a veure totes les opcions disponibles."
#. translators: The "%s" specifier will be replaced by a URL.
#: home-manager/home-manager:437
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 ""
"Uh oh, la instal·lació ha fallat! Si us plau, notifica-ho a\n"
"\n"
" %s\n"
"\n"
"si l'error sembla culpa de Home Manager."
#. translators: Here "flake" is a noun that refers to the Nix Flakes feature.
#: home-manager/home-manager:448
msgid "Can't instantiate a flake configuration"
msgstr "No es pot instanciar una configuració flake"
#: home-manager/home-manager:521
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] ""
"Hi ha %d notícia rellevant no llegida.\n"
"Llegeix-la executant la comanda \"%s news\"."
msgstr[1] ""
"Hi han %d notícies rellevants no llegides.\n"
"Llegeix-les executant la comanda \"%s news\"."
#: home-manager/home-manager:535
msgid "Unknown \"news.display\" setting \"%s\"."
msgstr "Configuració \"news.display\" no reconeguda \"%s\"."
#: home-manager/home-manager:542
#, sh-format
msgid "Please set the $EDITOR environment variable"
msgstr "Si us plau, defineix la variable d'entorn $EDITOR"
#: home-manager/home-manager:557
msgid "Cannot run build in read-only directory"
msgstr "Impossible executar la compilació en un directori només lectura"
#: home-manager/home-manager:641
msgid "No generation with ID %s"
msgstr "No existeix la generació amb ID %s"
#: home-manager/home-manager:643
msgid "Cannot remove the current generation %s"
msgstr "Impossible eliminar la generació actual %s"
#: home-manager/home-manager:645
msgid "Removing generation %s"
msgstr "Eliminant la generació %s"
#: home-manager/home-manager:664
msgid "No generations to expire"
msgstr "No s'han trobat generacions a expirar"
#: home-manager/home-manager:675
msgid "No home-manager packages seem to be installed."
msgstr "Cap paquet home-manager sembla estar instal·lat."
#. translators: Here "flake" is a noun that refers to the Nix Flakes feature.
#: home-manager/home-manager:702
msgid "Sorry, this command is not yet supported in flake setup"
msgstr ""
"Ho sentim, aquesta comanda encara no està suportada en la configuració de "
"flake"
#: home-manager/home-manager:739
msgid "Unknown argument %s"
msgstr "Argument desconegut %s"
#: home-manager/home-manager:755
msgid "This will remove Home Manager from your system."
msgstr "Home Manager serà esborrat del sistema."
#: home-manager/home-manager:758
msgid "This is a dry run, nothing will actually be uninstalled."
msgstr "Això és un simulacre, res serà realment desinstal·lat."
#: home-manager/home-manager:762
msgid "Really uninstall Home Manager?"
msgstr "Estàs segur que vols desinstal·lar Home Manager?"
#: home-manager/home-manager:768
msgid "Switching to empty Home Manager configuration..."
msgstr "Canviant a configuració buida de Home Manager..."
#: home-manager/home-manager:795
msgid "Yay!"
msgstr "Visca!"
#: home-manager/home-manager:800
msgid "Home Manager is uninstalled but your home.nix is left untouched."
msgstr ""
"Home Manager ha estat desinstal·lat però el vostre home.nix es manté intacte."
#: home-manager/home-manager:1011
msgid "expire-generations expects one argument, got %d."
msgstr "expire-generations espera un argument, obtinguts %d."
#: home-manager/home-manager:1033
msgid "Unknown command: %s"
msgstr "Comanda desconeguda: %s"
#: home-manager/install.nix:18
msgid "This derivation is not buildable, please run it using nix-shell."
msgstr ""
"Aquesta derivació no es pot construir, si us plau executa-la utilitzant nix-"
"shell."
#~ msgid "Creating initial Home Manager configuration..."
#~ msgstr "Creant configuració inicial de Home Manager..."
#~ msgid "Remove all Home Manager generations?"
#~ msgstr "Eliminar totes les generacions de Home Manager?"
#~ msgid "All generations are now eligible for garbage collection."
#~ msgstr ""
#~ "Totes les generacions són ara candidates per a la recol·lecció de brossa."
#~ msgid "Leaving generations but they may still be garbage collected."
#~ msgstr ""
#~ "Deixant generacions, però aquestes encara poden ser esborrades pel "
#~ "recol·lector de brossa."

View File

@@ -1,213 +0,0 @@
# 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: 2023-05-27 09:08+0200\n"
"PO-Revision-Date: 2022-09-19 18:22+0000\n"
"Last-Translator: cafkafk <christina@cafkafk.com>\n"
"Language-Team: Danish <https://hosted.weblate.org/projects/home-manager/cli/"
"da/>\n"
"Language: da\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.14.1\n"
#: home-manager/home-manager:71
msgid "No configuration file found at %s"
msgstr "Ingen konfigurationsfiler fundet ved %s"
#. translators: The first '%s' specifier will be replaced by either
#. 'home.nix' or 'flake.nix'.
#: home-manager/home-manager:88 home-manager/home-manager:92
#: home-manager/home-manager:154
msgid ""
"Keeping your Home Manager %s in %s is deprecated,\n"
"please move it to %s"
msgstr ""
#: home-manager/home-manager:99
msgid "No configuration file found. Please create one at %s"
msgstr "Ingen konfigurationsfiler fundet. Venligst lav en ved %s"
#: home-manager/home-manager:136
msgid "Could not find suitable profile directory, tried %s and %s"
msgstr ""
#. translators: Here "flake" is a noun that refers to the Nix Flakes feature.
#: home-manager/home-manager:191
msgid "Can't inspect options of a flake configuration"
msgstr "Kan ikke inspicere indstillinger af en flake konfiguration"
#: home-manager/home-manager:253 home-manager/home-manager:276
#: home-manager/home-manager:973
msgid "%s: unknown option '%s'"
msgstr "%s: ukendt indstilling '%s'"
#: home-manager/home-manager:258 home-manager/home-manager:974
msgid "Run '%s --help' for usage help"
msgstr "Kør '%s --help' for brugsvejledning"
#: home-manager/home-manager:284 home-manager/home-manager:383
msgid "The file %s already exists, leaving it unchanged..."
msgstr ""
#: home-manager/home-manager:286 home-manager/home-manager:385
msgid "Creating %s..."
msgstr ""
#: home-manager/home-manager:427
msgid "Creating initial Home Manager generation..."
msgstr "Laver initial Home Manager generation..."
#. translators: The "%s" specifier will be replaced by a file path.
#: home-manager/home-manager:432
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 ""
"Alt er færdigt! Home-manager værktøjet burde nu være installeret, og du kan "
"ændre\n"
"\n"
" %s\n"
" \n"
"For at konfigurere Home Manager. Kør 'man home-configuration.nix' for at \n"
"se alle de mulige indstillinger."
#. translators: The "%s" specifier will be replaced by a URL.
#: home-manager/home-manager:437
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 ""
"Åh nej, installationen fejlede! Venligst opret en fejlrapport ved\n"
"\n"
" %s\n"
" \n"
"hvis fejlen fremstår som forskyldt af Home Manager."
#. translators: Here "flake" is a noun that refers to the Nix Flakes feature.
#: home-manager/home-manager:448
msgid "Can't instantiate a flake configuration"
msgstr "Kan ikke instantiere en flake konfiguration"
#: home-manager/home-manager:521
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] ""
"Der er %d ulæst og relavante nyheder.\n"
"Læs den ved at køre \"%s news\"."
msgstr[1] ""
"Der er %d ulæste og relavante nyheder.\n"
"Læs dem ved at køre \"%s news\"."
#: home-manager/home-manager:535
msgid "Unknown \"news.display\" setting \"%s\"."
msgstr "Ubekændt \"news.display\" indstilling \"%s\"."
#: home-manager/home-manager:542
#, sh-format
msgid "Please set the $EDITOR environment variable"
msgstr "Venligst sæt $EDITOR miljøvariablen"
#: home-manager/home-manager:557
msgid "Cannot run build in read-only directory"
msgstr "Kan ikke bygge i en læs-kun folder"
#: home-manager/home-manager:641
msgid "No generation with ID %s"
msgstr "Ingen generation med ID %s"
#: home-manager/home-manager:643
msgid "Cannot remove the current generation %s"
msgstr "Kan ikke fjerne den nuværende generation %s"
#: home-manager/home-manager:645
msgid "Removing generation %s"
msgstr "Fjern generation %s"
#: home-manager/home-manager:664
msgid "No generations to expire"
msgstr "Ingen generationer som skal udløbes"
#: home-manager/home-manager:675
msgid "No home-manager packages seem to be installed."
msgstr ""
"Det virker ikke som om der er nogle home-manager pakker der er installeret."
#. translators: Here "flake" is a noun that refers to the Nix Flakes feature.
#: home-manager/home-manager:702
msgid "Sorry, this command is not yet supported in flake setup"
msgstr ""
#: home-manager/home-manager:739
msgid "Unknown argument %s"
msgstr "Ubekendt argument %s"
#: home-manager/home-manager:755
msgid "This will remove Home Manager from your system."
msgstr "Dette vil fjerne Home Manager fra dit system."
#: home-manager/home-manager:758
msgid "This is a dry run, nothing will actually be uninstalled."
msgstr "Dette er en tør kørsel, intet vil rent faktisk blive uinstalleret."
#: home-manager/home-manager:762
msgid "Really uninstall Home Manager?"
msgstr "Virkelig uinstaller Home Manager?"
#: home-manager/home-manager:768
msgid "Switching to empty Home Manager configuration..."
msgstr "Skifter til tom Home Manager konfiguration..."
#: home-manager/home-manager:795
msgid "Yay!"
msgstr "Juhuu!"
#: home-manager/home-manager:800
msgid "Home Manager is uninstalled but your home.nix is left untouched."
msgstr ""
"Home Manager bliver uinstalleret, men din home.nix bliver forladt uberørt."
#: home-manager/home-manager:1011
msgid "expire-generations expects one argument, got %d."
msgstr "expire-generations forventer et argument, fik %d."
#: home-manager/home-manager:1033
msgid "Unknown command: %s"
msgstr "Ubekendt kommando: %s"
#: home-manager/install.nix:18
msgid "This derivation is not buildable, please run it using nix-shell."
msgstr "Denne derivation er ikke bygbar, venligst kør den gennem nix-shell."
#~ msgid "Creating initial Home Manager configuration..."
#~ msgstr "Laver initial Home Manager konfiguration..."
#~ msgid "Remove all Home Manager generations?"
#~ msgstr "Fjern alle Home Manager generationer?"
#~ msgid "All generations are now eligible for garbage collection."
#~ msgstr "Alle generationer kan nu blive tjekket for overflødige filer."
#~ msgid "Leaving generations but they may still be garbage collected."
#~ msgstr ""
#~ "Forlad generationer, men de kan stadig bliver fjernet som overflødige "
#~ "filer."

View File

@@ -1,215 +0,0 @@
# 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: 2023-05-27 09:08+0200\n"
"PO-Revision-Date: 2023-05-13 06:48+0000\n"
"Last-Translator: Reiner Gerecke <me@reinergerecke.de>\n"
"Language-Team: German <https://hosted.weblate.org/projects/home-manager/cli/"
"de/>\n"
"Language: de\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.18-dev\n"
#: home-manager/home-manager:71
msgid "No configuration file found at %s"
msgstr "Keine Konfigurationsdatei unter %s gefunden"
#. translators: The first '%s' specifier will be replaced by either
#. 'home.nix' or 'flake.nix'.
#: home-manager/home-manager:88 home-manager/home-manager:92
#: home-manager/home-manager:154
msgid ""
"Keeping your Home Manager %s in %s is deprecated,\n"
"please move it to %s"
msgstr ""
"Die Aufbewahrung der Home Manager %s in %s ist veraltet,\n"
"bitte verschiebe es nach %s"
#: home-manager/home-manager:99
msgid "No configuration file found. Please create one at %s"
msgstr "Keine Konfigurationsdatei gefunden. Bitte erstellen Sie eine unter %s"
#: home-manager/home-manager:136
msgid "Could not find suitable profile directory, tried %s and %s"
msgstr "Kein passendes Profil-Verzeichnis gefunden. Versuchte %s und %s"
#. translators: Here "flake" is a noun that refers to the Nix Flakes feature.
#: home-manager/home-manager:191
msgid "Can't inspect options of a flake configuration"
msgstr "Die Optionen einer Flake-Konfiguration können nicht inspiziert werden"
#: home-manager/home-manager:253 home-manager/home-manager:276
#: home-manager/home-manager:973
msgid "%s: unknown option '%s'"
msgstr "%s: unbekannte Option '%s'"
#: home-manager/home-manager:258 home-manager/home-manager:974
msgid "Run '%s --help' for usage help"
msgstr "Führe '%s --help' aus, um Hilfe zur Verwendung zu erhalten"
#: home-manager/home-manager:284 home-manager/home-manager:383
msgid "The file %s already exists, leaving it unchanged..."
msgstr "Die Datei %s existiert bereits, sie bleibt unverändert..."
#: home-manager/home-manager:286 home-manager/home-manager:385
msgid "Creating %s..."
msgstr "Erstelle %s..."
#: home-manager/home-manager:427
msgid "Creating initial Home Manager generation..."
msgstr "Erstelle initiale Home Manager Generation..."
#. translators: The "%s" specifier will be replaced by a file path.
#: home-manager/home-manager:432
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 ""
"Alles fertig! Das Home Manager Tool sollte nun installiert sein. Sie können\n"
"\n"
" %s\n"
"\n"
"bearbeiten um Home Manager zu konfigurieren. Führen Sie\n"
"'man home-configuration.nix' aus, um alle verfügbaren Optionen zu\n"
"sehen."
#. translators: The "%s" specifier will be replaced by a URL.
#: home-manager/home-manager:437
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 ""
"Ups, die Installation schlug fehl. Bitte erstellen Sie ein Issue unter\n"
"\n"
" %s\n"
"\n"
"falls der Fehler auf Home Manager zurückzuführen ist."
#. translators: Here "flake" is a noun that refers to the Nix Flakes feature.
#: home-manager/home-manager:448
msgid "Can't instantiate a flake configuration"
msgstr "Kann eine Flake-Konfiguration nicht instanziieren"
#: home-manager/home-manager:521
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] ""
"Es gibt eine ungelesene und relevante Nachricht.\n"
"Lesen Sie sie, indem Sie den Befehl \"%s news\" ausführen."
msgstr[1] ""
"Es gibt %d ungelesene und relevante Nachrichten.\n"
"Lesen Sie sie, indem Sie den Befehl \"%s news\" ausführen."
#: home-manager/home-manager:535
msgid "Unknown \"news.display\" setting \"%s\"."
msgstr "Unbekannte \"news.display\" Einstellung \"%s\"."
#: home-manager/home-manager:542
#, sh-format
msgid "Please set the $EDITOR environment variable"
msgstr "Bitte legen Sie die $EDITOR Variable fest"
#: home-manager/home-manager:557
msgid "Cannot run build in read-only directory"
msgstr "Build kann nicht im schreibgeschützten Ordner ausgeführt werden"
#: home-manager/home-manager:641
msgid "No generation with ID %s"
msgstr "Keine Generation mit ID %s"
#: home-manager/home-manager:643
msgid "Cannot remove the current generation %s"
msgstr "Die jetzige Generation %s kann nicht entfernt werden"
#: home-manager/home-manager:645
msgid "Removing generation %s"
msgstr "Entferne Generation %s"
#: home-manager/home-manager:664
msgid "No generations to expire"
msgstr "Keine ablaufenden Generationen"
#: home-manager/home-manager:675
msgid "No home-manager packages seem to be installed."
msgstr "Es scheint, als ob keine Home Manager Pakete installiert sind."
#. translators: Here "flake" is a noun that refers to the Nix Flakes feature.
#: home-manager/home-manager:702
msgid "Sorry, this command is not yet supported in flake setup"
msgstr "Dieser Befehl wird im Flake-Setup leider noch nicht unterstützt"
#: home-manager/home-manager:739
msgid "Unknown argument %s"
msgstr "Unbekannte Argumente %s"
#: home-manager/home-manager:755
msgid "This will remove Home Manager from your system."
msgstr "Dies wird Home Manager von Ihrem System entfernen."
#: home-manager/home-manager:758
msgid "This is a dry run, nothing will actually be uninstalled."
msgstr "Dies ist ein Probelauf, es wird nichts vom System deinstalliert."
#: home-manager/home-manager:762
msgid "Really uninstall Home Manager?"
msgstr "Möchten Sie wirklich Home Manager deinstallieren?"
#: home-manager/home-manager:768
msgid "Switching to empty Home Manager configuration..."
msgstr "Wechsle zu einer leeren Home Manager Konfiguration..."
#: home-manager/home-manager:795
msgid "Yay!"
msgstr "Juhu!"
#: home-manager/home-manager:800
msgid "Home Manager is uninstalled but your home.nix is left untouched."
msgstr ""
"Home Manager ist installiert, aber Ihre home.nix Datei bleibt unberührt."
#: home-manager/home-manager:1011
msgid "expire-generations expects one argument, got %d."
msgstr "expire-generations erwartet ein Argument, hat aber %d erhalten."
#: home-manager/home-manager:1033
msgid "Unknown command: %s"
msgstr "Unbekannter Befehl: %s"
#: home-manager/install.nix:18
msgid "This derivation is not buildable, please run it using nix-shell."
msgstr ""
"Diese Derivation ist nicht kompilierbar. Bitte führen Sie nix-shell aus."
#~ msgid "Creating initial Home Manager configuration..."
#~ msgstr "Erstelle initiale Home Manager Konfiguration..."
#~ msgid "Remove all Home Manager generations?"
#~ msgstr "Entferne alle Home Manager Generationen?"
#~ msgid "All generations are now eligible for garbage collection."
#~ msgstr "Alle Generationen kommen nun für die Garbage Collection in Frage."
#~ msgid "Leaving generations but they may still be garbage collected."
#~ msgstr ""
#~ "Ignoriere Generationen, aber diese könnten immer noch mittels des Garbage "
#~ "Collectors aufgeräumt werden."

View File

@@ -1,215 +0,0 @@
# 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: 2023-05-27 09:08+0200\n"
"PO-Revision-Date: 2023-04-10 22:05+0000\n"
"Last-Translator: gallegonovato <fran-carro@hotmail.es>\n"
"Language-Team: Spanish <https://hosted.weblate.org/projects/home-manager/cli/"
"es/>\n"
"Language: es\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.17-dev\n"
#: home-manager/home-manager:71
msgid "No configuration file found at %s"
msgstr "Archivo de configuración no encontrado en %s"
#. translators: The first '%s' specifier will be replaced by either
#. 'home.nix' or 'flake.nix'.
#: home-manager/home-manager:88 home-manager/home-manager:92
#: home-manager/home-manager:154
msgid ""
"Keeping your Home Manager %s in %s is deprecated,\n"
"please move it to %s"
msgstr ""
"Mantener tu Home Manager %s en %s está obsoleto,\n"
"por favor muévalo a %s"
#: home-manager/home-manager:99
msgid "No configuration file found. Please create one at %s"
msgstr "Archivo de configuración no encontrado. Por favor cree uno en %s"
#: home-manager/home-manager:136
msgid "Could not find suitable profile directory, tried %s and %s"
msgstr ""
"No se ha podido encontrar un directorio de perfiles adecuado, se ha probado "
"con %s y %s"
#. translators: Here "flake" is a noun that refers to the Nix Flakes feature.
#: home-manager/home-manager:191
msgid "Can't inspect options of a flake configuration"
msgstr "No se pudo inspeccionar las opciones de la configuración flake"
#: home-manager/home-manager:253 home-manager/home-manager:276
#: home-manager/home-manager:973
msgid "%s: unknown option '%s'"
msgstr "%s: opción desconocida '%s'"
#: home-manager/home-manager:258 home-manager/home-manager:974
msgid "Run '%s --help' for usage help"
msgstr "Ejecute '%s --help' para ver ayuda"
#: home-manager/home-manager:284 home-manager/home-manager:383
msgid "The file %s already exists, leaving it unchanged..."
msgstr "El fichero %s ya existe, dejándolo sin modificar..."
#: home-manager/home-manager:286 home-manager/home-manager:385
msgid "Creating %s..."
msgstr "Creando %s..."
#: home-manager/home-manager:427
msgid "Creating initial Home Manager generation..."
msgstr "Creando generación inicial de Home Manager..."
#. translators: The "%s" specifier will be replaced by a file path.
#: home-manager/home-manager:432
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 ""
"Listo! home-manager ha sido instalado y ahora puede editar\n"
"\n"
" %s\n"
"\n"
"para configurar Home Manager. Ejecute 'man home-configuration.nix' para\n"
"ver todas las opciones disponibles."
#. translators: The "%s" specifier will be replaced by a URL.
#: home-manager/home-manager:437
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 ""
"La instalación ha fallado. Por favor notifíquelo en\n"
"\n"
" %s\n"
"\n"
"si el error parecer ser culpa de Home Manager."
#. translators: Here "flake" is a noun that refers to the Nix Flakes feature.
#: home-manager/home-manager:448
msgid "Can't instantiate a flake configuration"
msgstr "No se pudo instanciar una configuración flake"
#: home-manager/home-manager:521
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] ""
"Hay %d noticia relevante no leída.\n"
"Léala ejecutando el comando \"%s news\"."
msgstr[1] ""
"Hay %d noticias relevantes no leídas.\n"
"Léalas ejecutando el comando \"%s news\"."
#: home-manager/home-manager:535
msgid "Unknown \"news.display\" setting \"%s\"."
msgstr "Configuración \"news.display\" no reconocida \"%s\"."
#: home-manager/home-manager:542
#, sh-format
msgid "Please set the $EDITOR environment variable"
msgstr "Defina la variable de ambiente $EDITOR"
#: home-manager/home-manager:557
msgid "Cannot run build in read-only directory"
msgstr "No se puede ejecutar en un directorio de sólo lectura"
#: home-manager/home-manager:641
msgid "No generation with ID %s"
msgstr "No existe la generación con ID %s"
#: home-manager/home-manager:643
msgid "Cannot remove the current generation %s"
msgstr "No se pudo borrar la generación actual %s"
#: home-manager/home-manager:645
msgid "Removing generation %s"
msgstr "Borrando generación %s"
#: home-manager/home-manager:664
msgid "No generations to expire"
msgstr "No se encontraron generaciones para expirar"
#: home-manager/home-manager:675
msgid "No home-manager packages seem to be installed."
msgstr "No se encontró ningún paquete home-manager instalado."
#. translators: Here "flake" is a noun that refers to the Nix Flakes feature.
#: home-manager/home-manager:702
msgid "Sorry, this command is not yet supported in flake setup"
msgstr ""
"Lo sentimos, este comando aún no está soportado en la configuración de flake"
#: home-manager/home-manager:739
msgid "Unknown argument %s"
msgstr "Argumento desconocido %s"
#: home-manager/home-manager:755
msgid "This will remove Home Manager from your system."
msgstr "Home Manager será borrado del sistema."
#: home-manager/home-manager:758
msgid "This is a dry run, nothing will actually be uninstalled."
msgstr "Este es un simulacro, nada será realmente desinstalado."
#: home-manager/home-manager:762
msgid "Really uninstall Home Manager?"
msgstr "Desinstalar Home Manager?"
#: home-manager/home-manager:768
msgid "Switching to empty Home Manager configuration..."
msgstr "Cambiando a configuración vacía de Home Manager..."
#: home-manager/home-manager:795
msgid "Yay!"
msgstr "Bien!"
#: home-manager/home-manager:800
msgid "Home Manager is uninstalled but your home.nix is left untouched."
msgstr "Home Manager desinstalado pero no se ha modificado home.nix."
#: home-manager/home-manager:1011
msgid "expire-generations expects one argument, got %d."
msgstr "expire-generations espera un argumento pero se dieron %d."
#: home-manager/home-manager:1033
msgid "Unknown command: %s"
msgstr "Comando desconocido %s"
#: home-manager/install.nix:18
msgid "This derivation is not buildable, please run it using nix-shell."
msgstr "Esta derivación no se puede construir, ejecute con nix-shell."
#~ msgid "Creating initial Home Manager configuration..."
#~ msgstr "Creando configuración inicial de Home Manager..."
#~ msgid "Remove all Home Manager generations?"
#~ msgstr "Borrar todas las generaciones de Home Manager?"
#~ msgid "All generations are now eligible for garbage collection."
#~ msgstr "Ahora todas las generaciones son aptas para recolección de basura."
#~ msgid "Leaving generations but they may still be garbage collected."
#~ msgstr ""
#~ "Dejando generaciones aunque podrían aún ser borradas por el recolector de "
#~ "basura."

View File

@@ -1,185 +0,0 @@
# 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: 2023-05-27 09:08+0200\n"
"PO-Revision-Date: 2023-05-28 22:49+0000\n"
"Last-Translator: Mohammad Abdolirad <m.abdolirad@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.18-dev\n"
#: home-manager/home-manager:71
msgid "No configuration file found at %s"
msgstr "هیچ فایل تنظیماتی در %s پیدا نشد"
#. translators: The first '%s' specifier will be replaced by either
#. 'home.nix' or 'flake.nix'.
#: home-manager/home-manager:88 home-manager/home-manager:92
#: home-manager/home-manager:154
msgid ""
"Keeping your Home Manager %s in %s is deprecated,\n"
"please move it to %s"
msgstr ""
#: home-manager/home-manager:99
msgid "No configuration file found. Please create one at %s"
msgstr "هیچ فایل تنظیماتی پیدا نشد. لطفا یک فایل در %s بسازید"
#: home-manager/home-manager:136
msgid "Could not find suitable profile directory, tried %s and %s"
msgstr ""
#. translators: Here "flake" is a noun that refers to the Nix Flakes feature.
#: home-manager/home-manager:191
msgid "Can't inspect options of a flake configuration"
msgstr ""
#: home-manager/home-manager:253 home-manager/home-manager:276
#: home-manager/home-manager:973
msgid "%s: unknown option '%s'"
msgstr ""
#: home-manager/home-manager:258 home-manager/home-manager:974
msgid "Run '%s --help' for usage help"
msgstr ""
#: home-manager/home-manager:284 home-manager/home-manager:383
msgid "The file %s already exists, leaving it unchanged..."
msgstr "فایل %s از قبل وجود داشته است، بدون تغییر رها شد..."
#: home-manager/home-manager:286 home-manager/home-manager:385
msgid "Creating %s..."
msgstr "ساختن %s..."
#: home-manager/home-manager:427
msgid "Creating initial Home Manager generation..."
msgstr ""
#. translators: The "%s" specifier will be replaced by a file path.
#: home-manager/home-manager:432
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/home-manager:437
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 ""
#. translators: Here "flake" is a noun that refers to the Nix Flakes feature.
#: home-manager/home-manager:448
msgid "Can't instantiate a flake configuration"
msgstr ""
#: home-manager/home-manager:521
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:535
msgid "Unknown \"news.display\" setting \"%s\"."
msgstr ""
#: home-manager/home-manager:542
#, sh-format
msgid "Please set the $EDITOR environment variable"
msgstr "لطفا متغیر محیطی $EDITOR را مقدار دهی کنید"
#: home-manager/home-manager:557
msgid "Cannot run build in read-only directory"
msgstr ""
#: home-manager/home-manager:641
msgid "No generation with ID %s"
msgstr ""
#: home-manager/home-manager:643
msgid "Cannot remove the current generation %s"
msgstr "نمی‌توان نسل فعلی %s را حذف کرد"
#: home-manager/home-manager:645
msgid "Removing generation %s"
msgstr "حذف کردن نسل %s"
#: home-manager/home-manager:664
msgid "No generations to expire"
msgstr ""
#: home-manager/home-manager:675
msgid "No home-manager packages seem to be installed."
msgstr ""
#. translators: Here "flake" is a noun that refers to the Nix Flakes feature.
#: home-manager/home-manager:702
msgid "Sorry, this command is not yet supported in flake setup"
msgstr ""
#: home-manager/home-manager:739
msgid "Unknown argument %s"
msgstr ""
#: home-manager/home-manager:755
msgid "This will remove Home Manager from your system."
msgstr ""
#: home-manager/home-manager:758
msgid "This is a dry run, nothing will actually be uninstalled."
msgstr ""
#: home-manager/home-manager:762
msgid "Really uninstall Home Manager?"
msgstr "واقعاً هوم منیجر را حذف نصب کنید؟"
#: home-manager/home-manager:768
msgid "Switching to empty Home Manager configuration..."
msgstr ""
#: home-manager/home-manager:795
#, fuzzy
msgid "Yay!"
msgstr "آره!"
#: home-manager/home-manager:800
msgid "Home Manager is uninstalled but your home.nix is left untouched."
msgstr "هوم منیجر حذف نصب شد اما home.nix شما دست نخورده باقی ماند."
#: home-manager/home-manager:1011
msgid "expire-generations expects one argument, got %d."
msgstr ""
#: home-manager/home-manager:1033
msgid "Unknown command: %s"
msgstr "دستور ناشناخته: %s"
#: home-manager/install.nix:18
msgid "This derivation is not buildable, please run it using nix-shell."
msgstr ""
#~ msgid "Creating initial Home Manager configuration..."
#~ msgstr "ایجاد تنظیمات اولیه Home-Manager..."

View File

@@ -1,179 +0,0 @@
# 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: 2023-05-27 09:08+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Automatically generated\n"
"Language-Team: none\n"
"Language: fi\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"
#: home-manager/home-manager:71
msgid "No configuration file found at %s"
msgstr ""
#. translators: The first '%s' specifier will be replaced by either
#. 'home.nix' or 'flake.nix'.
#: home-manager/home-manager:88 home-manager/home-manager:92
#: home-manager/home-manager:154
msgid ""
"Keeping your Home Manager %s in %s is deprecated,\n"
"please move it to %s"
msgstr ""
#: home-manager/home-manager:99
msgid "No configuration file found. Please create one at %s"
msgstr ""
#: home-manager/home-manager:136
msgid "Could not find suitable profile directory, tried %s and %s"
msgstr ""
#. translators: Here "flake" is a noun that refers to the Nix Flakes feature.
#: home-manager/home-manager:191
msgid "Can't inspect options of a flake configuration"
msgstr ""
#: home-manager/home-manager:253 home-manager/home-manager:276
#: home-manager/home-manager:973
msgid "%s: unknown option '%s'"
msgstr ""
#: home-manager/home-manager:258 home-manager/home-manager:974
msgid "Run '%s --help' for usage help"
msgstr ""
#: home-manager/home-manager:284 home-manager/home-manager:383
msgid "The file %s already exists, leaving it unchanged..."
msgstr ""
#: home-manager/home-manager:286 home-manager/home-manager:385
msgid "Creating %s..."
msgstr ""
#: home-manager/home-manager:427
msgid "Creating initial Home Manager generation..."
msgstr ""
#. translators: The "%s" specifier will be replaced by a file path.
#: home-manager/home-manager:432
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/home-manager:437
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 ""
#. translators: Here "flake" is a noun that refers to the Nix Flakes feature.
#: home-manager/home-manager:448
msgid "Can't instantiate a flake configuration"
msgstr ""
#: home-manager/home-manager:521
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:535
msgid "Unknown \"news.display\" setting \"%s\"."
msgstr ""
#: home-manager/home-manager:542
#, sh-format
msgid "Please set the $EDITOR environment variable"
msgstr ""
#: home-manager/home-manager:557
msgid "Cannot run build in read-only directory"
msgstr ""
#: home-manager/home-manager:641
msgid "No generation with ID %s"
msgstr ""
#: home-manager/home-manager:643
msgid "Cannot remove the current generation %s"
msgstr ""
#: home-manager/home-manager:645
msgid "Removing generation %s"
msgstr ""
#: home-manager/home-manager:664
msgid "No generations to expire"
msgstr ""
#: home-manager/home-manager:675
msgid "No home-manager packages seem to be installed."
msgstr ""
#. translators: Here "flake" is a noun that refers to the Nix Flakes feature.
#: home-manager/home-manager:702
msgid "Sorry, this command is not yet supported in flake setup"
msgstr ""
#: home-manager/home-manager:739
msgid "Unknown argument %s"
msgstr ""
#: home-manager/home-manager:755
msgid "This will remove Home Manager from your system."
msgstr ""
#: home-manager/home-manager:758
msgid "This is a dry run, nothing will actually be uninstalled."
msgstr ""
#: home-manager/home-manager:762
msgid "Really uninstall Home Manager?"
msgstr ""
#: home-manager/home-manager:768
msgid "Switching to empty Home Manager configuration..."
msgstr ""
#: home-manager/home-manager:795
msgid "Yay!"
msgstr ""
#: home-manager/home-manager:800
msgid "Home Manager is uninstalled but your home.nix is left untouched."
msgstr ""
#: home-manager/home-manager:1011
msgid "expire-generations expects one argument, got %d."
msgstr ""
#: home-manager/home-manager:1033
msgid "Unknown command: %s"
msgstr ""
#: home-manager/install.nix:18
msgid "This derivation is not buildable, please run it using nix-shell."
msgstr ""

View File

@@ -1,216 +0,0 @@
# 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: 2023-05-27 09:08+0200\n"
"PO-Revision-Date: 2023-04-11 20:41+0000\n"
"Last-Translator: Robert Helgesson <robert@rycee.net>\n"
"Language-Team: French <https://hosted.weblate.org/projects/home-manager/cli/"
"fr/>\n"
"Language: fr\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.17-dev\n"
#: home-manager/home-manager:71
msgid "No configuration file found at %s"
msgstr "Aucun fichier de configuration trouvé à l'emplacement %s"
#. translators: The first '%s' specifier will be replaced by either
#. 'home.nix' or 'flake.nix'.
#: home-manager/home-manager:88 home-manager/home-manager:92
#: home-manager/home-manager:154
msgid ""
"Keeping your Home Manager %s in %s is deprecated,\n"
"please move it to %s"
msgstr ""
#: home-manager/home-manager:99
msgid "No configuration file found. Please create one at %s"
msgstr ""
"Aucun fichier de configuration trouvé. Veuillez en créer un à l'emplacement "
"%s"
#: home-manager/home-manager:136
msgid "Could not find suitable profile directory, tried %s and %s"
msgstr ""
#. translators: Here "flake" is a noun that refers to the Nix Flakes feature.
#: home-manager/home-manager:191
msgid "Can't inspect options of a flake configuration"
msgstr "Impossible d'inspecter les options d'une configuration en flocons"
#: home-manager/home-manager:253 home-manager/home-manager:276
#: home-manager/home-manager:973
msgid "%s: unknown option '%s'"
msgstr "%s : option inconnue « %s »"
#: home-manager/home-manager:258 home-manager/home-manager:974
msgid "Run '%s --help' for usage help"
msgstr "Exécuter « %s --help » pour de l'aide sur l'utilisation"
#: home-manager/home-manager:284 home-manager/home-manager:383
msgid "The file %s already exists, leaving it unchanged..."
msgstr "Le fichier %s existe déjà, il sera laissé inchangé..."
#: home-manager/home-manager:286 home-manager/home-manager:385
msgid "Creating %s..."
msgstr ""
#: home-manager/home-manager:427
msgid "Creating initial Home Manager generation..."
msgstr "Création de la génération initiale de Home Manager..."
#. translators: The "%s" specifier will be replaced by a file path.
#: home-manager/home-manager:432
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 ""
"Tout est fait! Home Manager devrait désormais être installé et vous pouvez "
"éditer\n"
"\n"
" %s\n"
"\n"
"pour configurer Home Manager. Pour avoir une liste des options disponibles,\n"
"essayez 'man home-configuration.nix'."
#. translators: The "%s" specifier will be replaced by a URL.
#: home-manager/home-manager:437
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 ""
"Uh oh, l'installation n'a pas réussi! Veuillez signaler cette erreur à "
"l'adresse suivante\n"
"\n"
" %s\n"
"\n"
"si l'erreur semble être liée à Home Manager."
#. translators: Here "flake" is a noun that refers to the Nix Flakes feature.
#: home-manager/home-manager:448
msgid "Can't instantiate a flake configuration"
msgstr "Impossible d'instancier une configuration flake"
#: home-manager/home-manager:521
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] ""
"Il y a %d nouvel élément non lu et pertinent.\n"
"Vous pouvez le lire en exécutant la commande \"%s news\"."
msgstr[1] ""
"Il y a %d nouveaux éléments non lus et pertinents.\n"
"Vous pouvez les lire en exécutant la commande \"%s news\"."
#: home-manager/home-manager:535
msgid "Unknown \"news.display\" setting \"%s\"."
msgstr "Configuration \"news.display\" iconnue \"%s\"."
#: home-manager/home-manager:542
#, sh-format
msgid "Please set the $EDITOR environment variable"
msgstr "Veuillez définir la variable d'environnement $EDITOR"
#: home-manager/home-manager:557
msgid "Cannot run build in read-only directory"
msgstr "Impossible de lancer une compilation dans un dossier en écriture seule"
#: home-manager/home-manager:641
msgid "No generation with ID %s"
msgstr "Aucune génération avec l'identifiant %s"
#: home-manager/home-manager:643
msgid "Cannot remove the current generation %s"
msgstr "Impossible de supprimer la génération courante %s"
#: home-manager/home-manager:645
msgid "Removing generation %s"
msgstr "Suppression de la génération %s"
#: home-manager/home-manager:664
msgid "No generations to expire"
msgstr "Aucune génération expirée"
#: home-manager/home-manager:675
msgid "No home-manager packages seem to be installed."
msgstr "Aucun paquet home-manager ne semble être installé."
#. translators: Here "flake" is a noun that refers to the Nix Flakes feature.
#: home-manager/home-manager:702
msgid "Sorry, this command is not yet supported in flake setup"
msgstr ""
#: home-manager/home-manager:739
msgid "Unknown argument %s"
msgstr "Aucun argument %s"
#: home-manager/home-manager:755
msgid "This will remove Home Manager from your system."
msgstr "Cela va supprimer Home Manager de votre système."
#: home-manager/home-manager:758
msgid "This is a dry run, nothing will actually be uninstalled."
msgstr "C'est un essai, rien ne sera réellement désinstallé."
#: home-manager/home-manager:762
msgid "Really uninstall Home Manager?"
msgstr "Voulez-vous vraiment désinstaller Home Manager ?"
#: home-manager/home-manager:768
msgid "Switching to empty Home Manager configuration..."
msgstr "Changement vers une configuration vierge de Home Manager..."
#: home-manager/home-manager:795
msgid "Yay!"
msgstr "Yay !"
#: home-manager/home-manager:800
msgid "Home Manager is uninstalled but your home.nix is left untouched."
msgstr "Home Manager est désinstallé mais votre home.nix reste intact."
#: home-manager/home-manager:1011
msgid "expire-generations expects one argument, got %d."
msgstr "expire-generations attend un argument, a obtenu %d."
#: home-manager/home-manager:1033
msgid "Unknown command: %s"
msgstr "Commande inconnue : %s"
#: home-manager/install.nix:18
msgid "This derivation is not buildable, please run it using nix-shell."
msgstr "Cette dérivation ne peut être construite, essayez avec nix-shell."
#~ msgid "Creating initial Home Manager configuration..."
#~ msgstr "Création de la configuration initiale de Home Manager..."
#~ msgid "Remove all Home Manager generations?"
#~ msgstr "Supprimer toutes les générations de Home Manager ?"
#~ msgid "All generations are now eligible for garbage collection."
#~ msgstr ""
#~ "Toutes les générations sont maintenant éligibles pour la collecte des "
#~ "ordures."
#~ msgid "Leaving generations but they may still be garbage collected."
#~ msgstr ""
#~ "Les générations sortantes mais elles peuvent encore être collectées par "
#~ "les ordures."

View File

@@ -1,180 +0,0 @@
# 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.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: Home Manager\n"
"Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n"
"POT-Creation-Date: 2023-05-27 09:08+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
#: home-manager/home-manager:71
msgid "No configuration file found at %s"
msgstr ""
#. translators: The first '%s' specifier will be replaced by either
#. 'home.nix' or 'flake.nix'.
#: home-manager/home-manager:88 home-manager/home-manager:92
#: home-manager/home-manager:154
msgid ""
"Keeping your Home Manager %s in %s is deprecated,\n"
"please move it to %s"
msgstr ""
#: home-manager/home-manager:99
msgid "No configuration file found. Please create one at %s"
msgstr ""
#: home-manager/home-manager:136
msgid "Could not find suitable profile directory, tried %s and %s"
msgstr ""
#. translators: Here "flake" is a noun that refers to the Nix Flakes feature.
#: home-manager/home-manager:191
msgid "Can't inspect options of a flake configuration"
msgstr ""
#: home-manager/home-manager:253 home-manager/home-manager:276
#: home-manager/home-manager:973
msgid "%s: unknown option '%s'"
msgstr ""
#: home-manager/home-manager:258 home-manager/home-manager:974
msgid "Run '%s --help' for usage help"
msgstr ""
#: home-manager/home-manager:284 home-manager/home-manager:383
msgid "The file %s already exists, leaving it unchanged..."
msgstr ""
#: home-manager/home-manager:286 home-manager/home-manager:385
msgid "Creating %s..."
msgstr ""
#: home-manager/home-manager:427
msgid "Creating initial Home Manager generation..."
msgstr ""
#. translators: The "%s" specifier will be replaced by a file path.
#: home-manager/home-manager:432
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/home-manager:437
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 ""
#. translators: Here "flake" is a noun that refers to the Nix Flakes feature.
#: home-manager/home-manager:448
msgid "Can't instantiate a flake configuration"
msgstr ""
#: home-manager/home-manager:521
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:535
msgid "Unknown \"news.display\" setting \"%s\"."
msgstr ""
#: home-manager/home-manager:542
#, sh-format
msgid "Please set the $EDITOR environment variable"
msgstr ""
#: home-manager/home-manager:557
msgid "Cannot run build in read-only directory"
msgstr ""
#: home-manager/home-manager:641
msgid "No generation with ID %s"
msgstr ""
#: home-manager/home-manager:643
msgid "Cannot remove the current generation %s"
msgstr ""
#: home-manager/home-manager:645
msgid "Removing generation %s"
msgstr ""
#: home-manager/home-manager:664
msgid "No generations to expire"
msgstr ""
#: home-manager/home-manager:675
msgid "No home-manager packages seem to be installed."
msgstr ""
#. translators: Here "flake" is a noun that refers to the Nix Flakes feature.
#: home-manager/home-manager:702
msgid "Sorry, this command is not yet supported in flake setup"
msgstr ""
#: home-manager/home-manager:739
msgid "Unknown argument %s"
msgstr ""
#: home-manager/home-manager:755
msgid "This will remove Home Manager from your system."
msgstr ""
#: home-manager/home-manager:758
msgid "This is a dry run, nothing will actually be uninstalled."
msgstr ""
#: home-manager/home-manager:762
msgid "Really uninstall Home Manager?"
msgstr ""
#: home-manager/home-manager:768
msgid "Switching to empty Home Manager configuration..."
msgstr ""
#: home-manager/home-manager:795
msgid "Yay!"
msgstr ""
#: home-manager/home-manager:800
msgid "Home Manager is uninstalled but your home.nix is left untouched."
msgstr ""
#: home-manager/home-manager:1011
msgid "expire-generations expects one argument, got %d."
msgstr ""
#: home-manager/home-manager:1033
msgid "Unknown command: %s"
msgstr ""
#: home-manager/install.nix:18
msgid "This derivation is not buildable, please run it using nix-shell."
msgstr ""

View File

@@ -1,210 +0,0 @@
# 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: 2023-05-27 09:08+0200\n"
"PO-Revision-Date: 2023-04-11 20:41+0000\n"
"Last-Translator: Robert Helgesson <robert@rycee.net>\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.17-dev\n"
#: home-manager/home-manager:71
msgid "No configuration file found at %s"
msgstr "Nessun file di configurazione trovato in %s"
#. translators: The first '%s' specifier will be replaced by either
#. 'home.nix' or 'flake.nix'.
#: home-manager/home-manager:88 home-manager/home-manager:92
#: home-manager/home-manager:154
msgid ""
"Keeping your Home Manager %s in %s is deprecated,\n"
"please move it to %s"
msgstr ""
#: home-manager/home-manager:99
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:136
msgid "Could not find suitable profile directory, tried %s and %s"
msgstr ""
#. translators: Here "flake" is a noun that refers to the Nix Flakes feature.
#: home-manager/home-manager:191
msgid "Can't inspect options of a flake configuration"
msgstr "Impossibile ispezionare le opzioni di configurazione flake"
#: home-manager/home-manager:253 home-manager/home-manager:276
#: home-manager/home-manager:973
msgid "%s: unknown option '%s'"
msgstr "%s: opzione sconosciuta '%s'"
#: home-manager/home-manager:258 home-manager/home-manager:974
msgid "Run '%s --help' for usage help"
msgstr "Esegui '%s --help' per ottenere aiuto"
#: home-manager/home-manager:284 home-manager/home-manager:383
msgid "The file %s already exists, leaving it unchanged..."
msgstr "Il file %s è già esistente, non verrà modificato..."
#: home-manager/home-manager:286 home-manager/home-manager:385
msgid "Creating %s..."
msgstr ""
#: home-manager/home-manager:427
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/home-manager:432
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/home-manager:437
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."
#. translators: Here "flake" is a noun that refers to the Nix Flakes feature.
#: home-manager/home-manager:448
msgid "Can't instantiate a flake configuration"
msgstr "Impossibile istanziare una configurazione flake"
#: home-manager/home-manager:521
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:535
msgid "Unknown \"news.display\" setting \"%s\"."
msgstr "Opzione \"news.display\" sconosciuta \"%s\"."
#: home-manager/home-manager:542
#, sh-format
msgid "Please set the $EDITOR environment variable"
msgstr "Per favore impostare la variabile d'ambient $EDITOR"
#: home-manager/home-manager:557
msgid "Cannot run build in read-only directory"
msgstr "Impossibile eseguire la build in una cartella in sola lettura"
#: home-manager/home-manager:641
msgid "No generation with ID %s"
msgstr "Nessuna generazione con ID %s"
#: home-manager/home-manager:643
msgid "Cannot remove the current generation %s"
msgstr "Impossibile rimuovere la generazione corrente %s"
#: home-manager/home-manager:645
msgid "Removing generation %s"
msgstr "Rimuovo la generazione %s"
#: home-manager/home-manager:664
msgid "No generations to expire"
msgstr "Nessuna generazione in scadenza"
#: home-manager/home-manager:675
msgid "No home-manager packages seem to be installed."
msgstr "Nessun pacchetto home-manager sembra essere installato."
#. translators: Here "flake" is a noun that refers to the Nix Flakes feature.
#: home-manager/home-manager:702
msgid "Sorry, this command is not yet supported in flake setup"
msgstr ""
#: home-manager/home-manager:739
msgid "Unknown argument %s"
msgstr "Argomento sconosciuto: %s"
#: home-manager/home-manager:755
msgid "This will remove Home Manager from your system."
msgstr "Questo rimuoverà Home Manger dal tuo sistema."
#: home-manager/home-manager:758
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:762
msgid "Really uninstall Home Manager?"
msgstr "Vuoi davvero disinstallare Home Manager?"
#: home-manager/home-manager:768
msgid "Switching to empty Home Manager configuration..."
msgstr "Cambio ad una configurazione Home Manager vuota..."
#: home-manager/home-manager:795
msgid "Yay!"
msgstr "Urrà!"
#: home-manager/home-manager:800
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:1011
msgid "expire-generations expects one argument, got %d."
msgstr "expire-generations si aspetta un solo argomento, invece di %d."
#: home-manager/home-manager:1033
msgid "Unknown command: %s"
msgstr "Comando sconosciuto: %s"
#: home-manager/install.nix:18
msgid "This derivation is not buildable, please run it using nix-shell."
msgstr ""
"Questa derivazione non è compilabile, prova ad eseguila usando nix-shell."
#~ msgid "Creating initial Home Manager configuration..."
#~ msgstr "Creando la configurazione iniziale di Home Manager..."
#~ msgid "Remove all Home Manager generations?"
#~ msgstr "Rimuovere tutte le generazioni Home Manager?"
#~ msgid "All generations are now eligible for garbage collection."
#~ msgstr "Tutte le generazioni sono ora pronte per essere cestinate."
#~ msgid "Leaving generations but they may still be garbage collected."
#~ msgstr "Abbandono le generazioni, ma possono essere ancora cestinate."

View File

@@ -1,215 +0,0 @@
# 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: 2023-05-27 09:08+0200\n"
"PO-Revision-Date: 2023-05-13 06:48+0000\n"
"Last-Translator: Markus Amano <markus.a.amano@gmail.com>\n"
"Language-Team: Japanese <https://hosted.weblate.org/projects/home-manager/"
"cli/ja/>\n"
"Language: ja\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: Weblate 4.18-dev\n"
#: home-manager/home-manager:71
msgid "No configuration file found at %s"
msgstr "%s に設定ファイルが見つかりません"
#. translators: The first '%s' specifier will be replaced by either
#. 'home.nix' or 'flake.nix'.
#: home-manager/home-manager:88 home-manager/home-manager:92
#: home-manager/home-manager:154
msgid ""
"Keeping your Home Manager %s in %s is deprecated,\n"
"please move it to %s"
msgstr ""
"Home Managerの %s の %s への保管は非推奨となりました\n"
"%s へ移動させてください"
#: home-manager/home-manager:99
msgid "No configuration file found. Please create one at %s"
msgstr "設定ファイルがありません。ファイルを %s に作ってください"
#: home-manager/home-manager:136
msgid "Could not find suitable profile directory, tried %s and %s"
msgstr ""
"適切なプロファイル ディレクトリが見つかりませんでした。%s と %s を試しました"
#. translators: Here "flake" is a noun that refers to the Nix Flakes feature.
#: home-manager/home-manager:191
msgid "Can't inspect options of a flake configuration"
msgstr "flake設定のオプションを検査できません"
#: home-manager/home-manager:253 home-manager/home-manager:276
#: home-manager/home-manager:973
msgid "%s: unknown option '%s'"
msgstr "%s: 不明なオプション '%s'"
#: home-manager/home-manager:258 home-manager/home-manager:974
msgid "Run '%s --help' for usage help"
msgstr "'%s --help' でヘルプを参照することができます"
#: home-manager/home-manager:284 home-manager/home-manager:383
msgid "The file %s already exists, leaving it unchanged..."
msgstr "%s は既に存在します。変更せずに続行しています..."
#: home-manager/home-manager:286 home-manager/home-manager:385
msgid "Creating %s..."
msgstr "%s を作成中です..."
#: home-manager/home-manager:427
msgid "Creating initial Home Manager generation..."
msgstr "Home Managerの世代を初期化しています..."
#. translators: The "%s" specifier will be replaced by a file path.
#: home-manager/home-manager:432
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 ""
"全てが完了しました! Home-managerはインストール済みで、\n"
"\n"
" %s\n"
"\n"
"でHome Managerの設定を編集することができるはずです。利用可能なオプションを参"
"照するには\n"
"'man home-configuration.nix' を実行してください。"
#. translators: The "%s" specifier will be replaced by a URL.
#: home-manager/home-manager:437
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の欠陥によって生"
"じたと考えられる場合は、\n"
"\n"
" %s\n"
"\n"
"というissueを立ててください。"
#. translators: Here "flake" is a noun that refers to the Nix Flakes feature.
#: home-manager/home-manager:448
msgid "Can't instantiate a flake configuration"
msgstr "flake設定を初期化できません"
#: home-manager/home-manager:521
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] ""
"未読のお知らせが%d件あります。\n"
"\"%s news\"コマンドで確認できます。"
#: home-manager/home-manager:535
msgid "Unknown \"news.display\" setting \"%s\"."
msgstr "\"news.display\"に\"%s\"という設定は存在しません。"
#: home-manager/home-manager:542
#, sh-format
msgid "Please set the $EDITOR environment variable"
msgstr "$EDITOR環境変数を設定してください"
#: home-manager/home-manager:557
msgid "Cannot run build in read-only directory"
msgstr "読み込み専用ディレクトリ内ではbuild作成できません"
#: home-manager/home-manager:641
msgid "No generation with ID %s"
msgstr "ID %s を持つ世代はありません"
#: home-manager/home-manager:643
msgid "Cannot remove the current generation %s"
msgstr "現在使用中の世代 %s は削除できません"
#: home-manager/home-manager:645
msgid "Removing generation %s"
msgstr "世代 %s を削除中です"
#: home-manager/home-manager:664
msgid "No generations to expire"
msgstr "期限切れで削除される世代はありません"
#: home-manager/home-manager:675
msgid "No home-manager packages seem to be installed."
msgstr "home-managerパッケージがインストールされていないようです。"
#. translators: Here "flake" is a noun that refers to the Nix Flakes feature.
#: home-manager/home-manager:702
msgid "Sorry, this command is not yet supported in flake setup"
msgstr ""
#: home-manager/home-manager:739
msgid "Unknown argument %s"
msgstr "不明な引数 %s"
#: home-manager/home-manager:755
msgid "This will remove Home Manager from your system."
msgstr "この操作によってHome Managerはシステムから削除されます。"
#: home-manager/home-manager:758
msgid "This is a dry run, nothing will actually be uninstalled."
msgstr "これはdry run (予行練習)で、実際にはアンインストールは行われません。"
#: home-manager/home-manager:762
msgid "Really uninstall Home Manager?"
msgstr "本当にHome Managerをアンインストールしますか"
#: home-manager/home-manager:768
msgid "Switching to empty Home Manager configuration..."
msgstr "空のHome Managerの設定に切り替えています..."
#: home-manager/home-manager:795
msgid "Yay!"
msgstr "イェイ!"
#: home-manager/home-manager:800
msgid "Home Manager is uninstalled but your home.nix is left untouched."
msgstr ""
"Home Managerはアンインストールされましたが、home.nixはそのまま残してありま"
"す。"
#: home-manager/home-manager:1011
msgid "expire-generations expects one argument, got %d."
msgstr ""
"expire-generations は一つしか引数を取らないところ、%d 個が与えられました。"
#: home-manager/home-manager:1033
msgid "Unknown command: %s"
msgstr "不明なコマンド: %s"
#: home-manager/install.nix:18
msgid "This derivation is not buildable, please run it using nix-shell."
msgstr "この派生はビルドできません。nix-shellを使って実行してください。"
#~ msgid "Creating initial Home Manager configuration..."
#~ msgstr "Home Managerの設定を初期化しています..."
#~ msgid "Remove all Home Manager generations?"
#~ msgstr "Home-managerの全ての世代を削除しますか"
#~ msgid "All generations are now eligible for garbage collection."
#~ msgstr "全ての世代がガベージコレクションの対象になりました。"
#~ msgid "Leaving generations but they may still be garbage collected."
#~ msgstr ""
#~ "世代を残すようにしますが、やはりガベージコレクションで回収されるかもしれま"
#~ "せん。"

View File

@@ -1,213 +0,0 @@
# 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: 2023-05-27 09:08+0200\n"
"PO-Revision-Date: 2023-04-19 15:49+0000\n"
"Last-Translator: Suwon Park <sepiabrown@naver.com>\n"
"Language-Team: Korean <https://hosted.weblate.org/projects/home-manager/cli/"
"ko/>\n"
"Language: ko\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: Weblate 4.18-dev\n"
#: home-manager/home-manager:71
msgid "No configuration file found at %s"
msgstr "%s에서 설정 파일을 찾을 수 없음"
#. translators: The first '%s' specifier will be replaced by either
#. 'home.nix' or 'flake.nix'.
#: home-manager/home-manager:88 home-manager/home-manager:92
#: home-manager/home-manager:154
msgid ""
"Keeping your Home Manager %s in %s is deprecated,\n"
"please move it to %s"
msgstr ""
"홈 매니저 %s 을 %s 안에 선언하는 것은 더 이상 사용되지 않습니다.\n"
"%s로 옮겨주십시오"
#: home-manager/home-manager:99
msgid "No configuration file found. Please create one at %s"
msgstr "설정 파일을 찾을 수 없음. %s에 설정 파일을 생성하십시오"
#: home-manager/home-manager:136
msgid "Could not find suitable profile directory, tried %s and %s"
msgstr "%s와 %s를 시도했지만, 적합한 프로파일 디렉토리를 찾을 수 없습니다"
#. translators: Here "flake" is a noun that refers to the Nix Flakes feature.
#: home-manager/home-manager:191
msgid "Can't inspect options of a flake configuration"
msgstr "flake 설정의 옵션들을 검사할 수 없음"
#: home-manager/home-manager:253 home-manager/home-manager:276
#: home-manager/home-manager:973
msgid "%s: unknown option '%s'"
msgstr "%s: 알 수 없는 옵션 '%s'"
#: home-manager/home-manager:258 home-manager/home-manager:974
msgid "Run '%s --help' for usage help"
msgstr "도움말을 보려면 '%s --help'를 실행하십시오"
#: home-manager/home-manager:284 home-manager/home-manager:383
msgid "The file %s already exists, leaving it unchanged..."
msgstr "%s 파일은 이미 존재하므로, 수정하지 않음..."
#: home-manager/home-manager:286 home-manager/home-manager:385
msgid "Creating %s..."
msgstr "%s를 생성하는 중..."
#: home-manager/home-manager:427
msgid "Creating initial Home Manager generation..."
msgstr "최초의 홈 매니저 세대를 생성하는 중..."
#. translators: The "%s" specifier will be replaced by a file path.
#: home-manager/home-manager:432
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 ""
"완료! 홈 매니저 도구들이 설치 되었고 이제 \n"
"\n"
" %s\n"
"\n"
"파일을 수정해서 홈 매니저를 설정할 수 있습니다. 'man home-configuration."
"nix'를\n"
"실행해서 가능한 모든 옵션을 살펴보십시오."
#. translators: The "%s" specifier will be replaced by a URL.
#: home-manager/home-manager:437
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 ""
"이런, 설치가 실패했습니다! 만약 에러가 홈 매니저의 문제라고 생각된다면\n"
"\n"
" %s\n"
"\n"
"위 사이트에서 이슈를 생성하십시오."
#. translators: Here "flake" is a noun that refers to the Nix Flakes feature.
#: home-manager/home-manager:448
msgid "Can't instantiate a flake configuration"
msgstr "flake 설정을 인스턴스화 할 수 없음"
#: home-manager/home-manager:521
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] ""
"읽지 않은 관련된 뉴스 항목들이 %d 개 있습니다.\n"
"\"%s news\" 명령어를 실행해 읽어보십시오."
#: home-manager/home-manager:535
msgid "Unknown \"news.display\" setting \"%s\"."
msgstr "알 수 없는 \"news.display\"의 설정 \"%s\"."
#: home-manager/home-manager:542
#, sh-format
msgid "Please set the $EDITOR environment variable"
msgstr "환경변수 $EDITOR를 설정하십시오"
#: home-manager/home-manager:557
msgid "Cannot run build in read-only directory"
msgstr "읽기전용 폴더에서 빌드를 실행할 수 없습니다"
#: home-manager/home-manager:641
msgid "No generation with ID %s"
msgstr "ID %s를 갖는 세대가 존재하지 않음"
#: home-manager/home-manager:643
msgid "Cannot remove the current generation %s"
msgstr "현재 세대인 %s를 삭제할 수 없음"
#: home-manager/home-manager:645
msgid "Removing generation %s"
msgstr "%s 세대를 삭제하는 중"
#: home-manager/home-manager:664
msgid "No generations to expire"
msgstr "유효 기간이 지난 세대가 없음"
#: home-manager/home-manager:675
msgid "No home-manager packages seem to be installed."
msgstr "홈 매니저 패키지들이 설치되지 않은 것으로 보입니다."
#. translators: Here "flake" is a noun that refers to the Nix Flakes feature.
#: home-manager/home-manager:702
msgid "Sorry, this command is not yet supported in flake setup"
msgstr "죄송합니다만, 이 명령어는 아직 flake 환경에서 지원되지 않습니다"
#: home-manager/home-manager:739
msgid "Unknown argument %s"
msgstr "알 수 없는 매개변수 %s"
#: home-manager/home-manager:755
msgid "This will remove Home Manager from your system."
msgstr "시스템에서 홈 매니저를 삭제할 것입니다."
#: home-manager/home-manager:758
msgid "This is a dry run, nothing will actually be uninstalled."
msgstr "모의 실행 중으로, 아무것도 실제로 설치되지 않습니다."
#: home-manager/home-manager:762
msgid "Really uninstall Home Manager?"
msgstr "정말로 홈 매니저를 삭제할까요?"
#: home-manager/home-manager:768
msgid "Switching to empty Home Manager configuration..."
msgstr "빈 홈 매니저 설정으로 바꾸는 중..."
#: home-manager/home-manager:795
msgid "Yay!"
msgstr "야호!"
#: home-manager/home-manager:800
msgid "Home Manager is uninstalled but your home.nix is left untouched."
msgstr "홈 매니저는 삭제되지만 home.nix 파일은 남겨집니다."
#: home-manager/home-manager:1011
msgid "expire-generations expects one argument, got %d."
msgstr ""
"expire-generations 명령어는 매개변수가 한 개 필요한데, %d 개가 입력되었습니"
"다."
#: home-manager/home-manager:1033
msgid "Unknown command: %s"
msgstr "알 수 없는 명령어: %s"
#: home-manager/install.nix:18
msgid "This derivation is not buildable, please run it using nix-shell."
msgstr ""
"이 derivation은 빌드 할 수 없습니다. nix-shell을 이용해서 실행해 주십시오."
#~ msgid "Creating initial Home Manager configuration..."
#~ msgstr "최초의 홈 매니저 설정을 생성하는 중..."
#~ msgid "Remove all Home Manager generations?"
#~ msgstr "모든 홈 매니저 세대를 지울까요?"
#~ msgid "All generations are now eligible for garbage collection."
#~ msgstr "이제 모든 세대가 쓰레기 수집(가비지 컬렉션)의 대상이 됩니다."
#~ msgid "Leaving generations but they may still be garbage collected."
#~ msgstr ""
#~ "세대들을 그대로 놔두지만 그들은 여전히 쓰레기 수집(가비지 컬렉션) 될 수 있"
#~ "습니다."

View File

@@ -1,208 +0,0 @@
# 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: 2023-05-27 09:08+0200\n"
"PO-Revision-Date: 2023-01-09 11:33+0000\n"
"Last-Translator: Kornelijus Tvarijanavičius <kornelijus@tvaria.com>\n"
"Language-Team: Lithuanian <https://hosted.weblate.org/projects/home-manager/"
"cli/lt/>\n"
"Language: lt\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=(n % 10 == 1 && (n % 100 < 11 || n % 100 > "
"19)) ? 0 : ((n % 10 >= 2 && n % 10 <= 9 && (n % 100 < 11 || n % 100 > 19)) ? "
"1 : 2);\n"
"X-Generator: Weblate 4.15.1-dev\n"
#: home-manager/home-manager:71
msgid "No configuration file found at %s"
msgstr "Nerastas konfigūracijos failas %s"
#. translators: The first '%s' specifier will be replaced by either
#. 'home.nix' or 'flake.nix'.
#: home-manager/home-manager:88 home-manager/home-manager:92
#: home-manager/home-manager:154
msgid ""
"Keeping your Home Manager %s in %s is deprecated,\n"
"please move it to %s"
msgstr ""
#: home-manager/home-manager:99
msgid "No configuration file found. Please create one at %s"
msgstr "Nerastas konfigūracijos failas. Sukurkite jį adresu %s"
#: home-manager/home-manager:136
msgid "Could not find suitable profile directory, tried %s and %s"
msgstr ""
#. translators: Here "flake" is a noun that refers to the Nix Flakes feature.
#: home-manager/home-manager:191
msgid "Can't inspect options of a flake configuration"
msgstr "Negalima patikrinti flake konfigūracijos pasirinkimų"
#: home-manager/home-manager:253 home-manager/home-manager:276
#: home-manager/home-manager:973
msgid "%s: unknown option '%s'"
msgstr "%s: nežinomas pasirinkimas „%s“"
#: home-manager/home-manager:258 home-manager/home-manager:974
msgid "Run '%s --help' for usage help"
msgstr "Paleiskite „%s --help“, kad gautumėte naudojimosi instrukcijas"
#: home-manager/home-manager:284 home-manager/home-manager:383
msgid "The file %s already exists, leaving it unchanged..."
msgstr ""
#: home-manager/home-manager:286 home-manager/home-manager:385
msgid "Creating %s..."
msgstr ""
#: home-manager/home-manager:427
msgid "Creating initial Home Manager generation..."
msgstr "Kuriama pradinė Home Manager generacija..."
#. translators: The "%s" specifier will be replaced by a file path.
#: home-manager/home-manager:432
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 ""
"Viskas baigta! Įrankis home-manager turėtų būti įdiegtas ir dabar galite "
"redaguoti\n"
"\n"
". . . .%s\n"
"\n"
", kad konfigūruotumėte Home Manager. Paleiskite „man home-configuration."
"nix“,\n"
"jei norite pamatyti visus pasirinkimus."
#. translators: The "%s" specifier will be replaced by a URL.
#: home-manager/home-manager:437
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 ""
#. translators: Here "flake" is a noun that refers to the Nix Flakes feature.
#: home-manager/home-manager:448
msgid "Can't instantiate a flake configuration"
msgstr "Negalima sukurti pradinės flake konfigūracijos"
#: home-manager/home-manager:521
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] ""
"Yra %d neperskaityta ir aktuali naujiena.\n"
"Perskaitykite ją paleidus komandą \"%s news\"."
msgstr[1] ""
"Yra %d neperskaitytos ir aktualios naujienos.\n"
"Perskaitykite jas paleidus komandą \"%s news\"."
msgstr[2] ""
"Yra %d neperskaitytų ir aktualių naujienų.\n"
"Perskaitykite jas paleidus komandą \"%s news\"."
#: home-manager/home-manager:535
msgid "Unknown \"news.display\" setting \"%s\"."
msgstr "Nežinomas \"news.display\" nustatymas \"%s\"."
#: home-manager/home-manager:542
#, sh-format
msgid "Please set the $EDITOR environment variable"
msgstr "Prašome nustatyti $EDITOR aplinkos kintamąjį"
#: home-manager/home-manager:557
msgid "Cannot run build in read-only directory"
msgstr ""
#: home-manager/home-manager:641
msgid "No generation with ID %s"
msgstr "Nėra generacijos su ID %s"
#: home-manager/home-manager:643
msgid "Cannot remove the current generation %s"
msgstr "Negalima pašalinti esamos generacijos %s"
#: home-manager/home-manager:645
msgid "Removing generation %s"
msgstr "Pašalinama generacija %s"
#: home-manager/home-manager:664
msgid "No generations to expire"
msgstr ""
#: home-manager/home-manager:675
msgid "No home-manager packages seem to be installed."
msgstr "Nėra instaliuotų home-manager paketų."
#. translators: Here "flake" is a noun that refers to the Nix Flakes feature.
#: home-manager/home-manager:702
msgid "Sorry, this command is not yet supported in flake setup"
msgstr ""
#: home-manager/home-manager:739
msgid "Unknown argument %s"
msgstr "Nežinomas argumentas %s"
#: home-manager/home-manager:755
msgid "This will remove Home Manager from your system."
msgstr "Tai pašalins Home Manager iš jūsų sistemos."
#: home-manager/home-manager:758
msgid "This is a dry run, nothing will actually be uninstalled."
msgstr "Tai bandomasis paleidimas, niekas nebus ištrinta."
#: home-manager/home-manager:762
msgid "Really uninstall Home Manager?"
msgstr "Tikrai išdiegti Home Manager?"
#: home-manager/home-manager:768
msgid "Switching to empty Home Manager configuration..."
msgstr "Perjungiama į tuščią Home Manager konfigūraciją..."
#: home-manager/home-manager:795
msgid "Yay!"
msgstr "Valio!"
#: home-manager/home-manager:800
msgid "Home Manager is uninstalled but your home.nix is left untouched."
msgstr "Home Manager yra išdiegtas, bet jūsų home.nix liko nepaliestas."
#: home-manager/home-manager:1011
msgid "expire-generations expects one argument, got %d."
msgstr "expire-generations tikisi vieno argumento, gauta %d."
#: home-manager/home-manager:1033
msgid "Unknown command: %s"
msgstr "Nežinoma komanda: %s"
#: home-manager/install.nix:18
msgid "This derivation is not buildable, please run it using nix-shell."
msgstr ""
#~ msgid "Creating initial Home Manager configuration..."
#~ msgstr "Kuriama pradinė Home Manager konfigūracija..."
#~ msgid "Remove all Home Manager generations?"
#~ msgstr "Pašalinti visas Home Manager generacijas?"
#~ msgid "All generations are now eligible for garbage collection."
#~ msgstr ""
#~ "Visos generacijos jau tinkamos šiukšlių surinkimui (garbage collection)."

View File

@@ -1,209 +0,0 @@
# 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: 2023-05-27 09:08+0200\n"
"PO-Revision-Date: 2023-03-08 07:22+0000\n"
"Last-Translator: \"Kim A. Ødegaard\" <kim@dyktig.no>\n"
"Language-Team: Norwegian Bokmål <https://hosted.weblate.org/projects/home-"
"manager/cli/nb_NO/>\n"
"Language: nb_NO\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.16.2-dev\n"
#: home-manager/home-manager:71
msgid "No configuration file found at %s"
msgstr "Fant ingen oppsettsfil i %s"
#. translators: The first '%s' specifier will be replaced by either
#. 'home.nix' or 'flake.nix'.
#: home-manager/home-manager:88 home-manager/home-manager:92
#: home-manager/home-manager:154
msgid ""
"Keeping your Home Manager %s in %s is deprecated,\n"
"please move it to %s"
msgstr ""
#: home-manager/home-manager:99
msgid "No configuration file found. Please create one at %s"
msgstr "Fant ikke noen oppsettsfil. Opprett en i %s"
#: home-manager/home-manager:136
msgid "Could not find suitable profile directory, tried %s and %s"
msgstr ""
#. translators: Here "flake" is a noun that refers to the Nix Flakes feature.
#: home-manager/home-manager:191
msgid "Can't inspect options of a flake configuration"
msgstr "Kan ikke inspisere alternativer for et flake-oppsett"
#: home-manager/home-manager:253 home-manager/home-manager:276
#: home-manager/home-manager:973
msgid "%s: unknown option '%s'"
msgstr "%s: ukjent alternativ «%s»"
#: home-manager/home-manager:258 home-manager/home-manager:974
msgid "Run '%s --help' for usage help"
msgstr "Kjør «%s --help» for brukshjelp"
#: home-manager/home-manager:284 home-manager/home-manager:383
msgid "The file %s already exists, leaving it unchanged..."
msgstr ""
#: home-manager/home-manager:286 home-manager/home-manager:385
msgid "Creating %s..."
msgstr ""
#: home-manager/home-manager:427
msgid "Creating initial Home Manager generation..."
msgstr "Oppretter ny Home Manager-generasjon..."
#. translators: The "%s" specifier will be replaced by a file path.
#: home-manager/home-manager:432
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 ""
"Ferdig! `home-manager`-verktøyet skal nå være installert og du kan redigere\n"
"\n"
" %s\n"
"\n"
"for å konfigurere Home Manager. Kjør 'man home-configuration.nix' for å\n"
"se alle tilgjengelige innstillinger."
#. translators: The "%s" specifier will be replaced by a URL.
#: home-manager/home-manager:437
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 ""
"Oops, installasjonen feilet! Vennligst opprett en sak på\n"
"\n"
" %s\n"
"\n"
"hvis du tror feilen er forårsaket av Home Manager."
#. translators: Here "flake" is a noun that refers to the Nix Flakes feature.
#: home-manager/home-manager:448
msgid "Can't instantiate a flake configuration"
msgstr "Kan ikke igangsette flak-oppsett"
#: home-manager/home-manager:521
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] ""
"Det er %d ulest og relevant nyhetssak.\n"
"Les den ved å kjøre kommandoen «%s news»."
msgstr[1] ""
"Det er %d uleste og relevante nyhetssaker.\n"
"Les dem ved å kjøre kommandoen «%s news»."
#: home-manager/home-manager:535
msgid "Unknown \"news.display\" setting \"%s\"."
msgstr "Ukjent «news.display»-innstilling «%s»."
#: home-manager/home-manager:542
#, sh-format
msgid "Please set the $EDITOR environment variable"
msgstr "Sett «$EDITOR»-miljøvariabelen"
#: home-manager/home-manager:557
msgid "Cannot run build in read-only directory"
msgstr "Kan ikke kjøre bygg i skrivebeskyttet mappe"
#: home-manager/home-manager:641
msgid "No generation with ID %s"
msgstr "Ingen generering med ID-en %s"
#: home-manager/home-manager:643
msgid "Cannot remove the current generation %s"
msgstr "Kan ikke fjerne nåværende generering %s"
#: home-manager/home-manager:645
msgid "Removing generation %s"
msgstr "Fjerner generering %s"
#: home-manager/home-manager:664
msgid "No generations to expire"
msgstr "Ingen genereringer til utløp"
#: home-manager/home-manager:675
msgid "No home-manager packages seem to be installed."
msgstr "Ingen «home-manager»-pakker ser ut til å være installert."
#. translators: Here "flake" is a noun that refers to the Nix Flakes feature.
#: home-manager/home-manager:702
msgid "Sorry, this command is not yet supported in flake setup"
msgstr ""
#: home-manager/home-manager:739
msgid "Unknown argument %s"
msgstr "Ukjent parameter %s"
#: home-manager/home-manager:755
msgid "This will remove Home Manager from your system."
msgstr "Dette vil fjerne Home Manager fra systemet ditt."
#: home-manager/home-manager:758
msgid "This is a dry run, nothing will actually be uninstalled."
msgstr "Dette er en testkjøring. Ingenting vil bli avinstallert."
#: home-manager/home-manager:762
msgid "Really uninstall Home Manager?"
msgstr "Vil du avinstallere Home Manager?"
#: home-manager/home-manager:768
msgid "Switching to empty Home Manager configuration..."
msgstr "Bytter til tomt Home Manager-oppsett …"
#: home-manager/home-manager:795
msgid "Yay!"
msgstr "Hurra!"
#: home-manager/home-manager:800
msgid "Home Manager is uninstalled but your home.nix is left untouched."
msgstr "Home Manager er avinstallert, men din home.nix er levnet uforandret."
#: home-manager/home-manager:1011
msgid "expire-generations expects one argument, got %d."
msgstr "«expire-generations» forventet ett argument, mottok %d."
#: home-manager/home-manager:1033
msgid "Unknown command: %s"
msgstr "Ukjent kommando: %s"
#: home-manager/install.nix:18
msgid "This derivation is not buildable, please run it using nix-shell."
msgstr "Denne avledningen kan ikke bygges, vennligst kjør den i nix-shell."
#~ msgid "Creating initial Home Manager configuration..."
#~ msgstr "Oppretter ny Home Manager-konfigurasjon..."
#~ msgid "Remove all Home Manager generations?"
#~ msgstr "Fjern alle Home Manager-genereringer?"
#~ msgid "All generations are now eligible for garbage collection."
#~ msgstr "Alle genereringer er nå satt ut til søppelhenting."
#~ msgid "Leaving generations but they may still be garbage collected."
#~ msgstr ""
#~ "Levner genereringer, men de kan fremdeles ryddes opp av søppelinnsamleren."

View File

@@ -1,214 +0,0 @@
# 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: 2023-05-27 09:08+0200\n"
"PO-Revision-Date: 2023-04-10 11:48+0000\n"
"Last-Translator: Pablo Bollansee <pablo.bollansee@gmail.com>\n"
"Language-Team: Dutch <https://hosted.weblate.org/projects/home-manager/cli/"
"nl/>\n"
"Language: nl\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.17-dev\n"
#: home-manager/home-manager:71
msgid "No configuration file found at %s"
msgstr "Geen configuratiebestand gevonden op %s"
#. translators: The first '%s' specifier will be replaced by either
#. 'home.nix' or 'flake.nix'.
#: home-manager/home-manager:88 home-manager/home-manager:92
#: home-manager/home-manager:154
msgid ""
"Keeping your Home Manager %s in %s is deprecated,\n"
"please move it to %s"
msgstr ""
"Je Home Manager %s bestand opslaan in %s is niet langer ondersteund,\n"
"gelieve het te verplaatsen naar %s"
#: home-manager/home-manager:99
msgid "No configuration file found. Please create one at %s"
msgstr "Geen configuratiebestand gevonden, maak er alstublieft een aan op %s"
#: home-manager/home-manager:136
msgid "Could not find suitable profile directory, tried %s and %s"
msgstr ""
#. translators: Here "flake" is a noun that refers to the Nix Flakes feature.
#: home-manager/home-manager:191
msgid "Can't inspect options of a flake configuration"
msgstr "Kan de opties van een flake configuratie niet inspecteren"
#: home-manager/home-manager:253 home-manager/home-manager:276
#: home-manager/home-manager:973
msgid "%s: unknown option '%s'"
msgstr "%s: onbekende keuze '%s'"
#: home-manager/home-manager:258 home-manager/home-manager:974
msgid "Run '%s --help' for usage help"
msgstr "Voer '%s --help' in om gebruiksinfo te zien"
#: home-manager/home-manager:284 home-manager/home-manager:383
msgid "The file %s already exists, leaving it unchanged..."
msgstr "Het bestand %s bestaat al, het zal niet aangepast worden..."
#: home-manager/home-manager:286 home-manager/home-manager:385
msgid "Creating %s..."
msgstr "%s aan het aanmaken..."
#: home-manager/home-manager:427
msgid "Creating initial Home Manager generation..."
msgstr "Initiële Home Manager generatie aan het maken..."
#. translators: The "%s" specifier will be replaced by a file path.
#: home-manager/home-manager:432
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 ""
"Helemaal klaar! De home-manager tool zou nu geïnstalleerd moeten zijn en je "
"kan\n"
"\n"
" %s\n"
"\n"
"aanpassen om Home Manager te configureren. Draai 'man home-configuration."
"nix' om\n"
"alle opties te zien."
#. translators: The "%s" specifier will be replaced by a URL.
#: home-manager/home-manager:437
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 nee, de installatie is mislukt. Gelieve een ticket aan te maken in\n"
"\n"
" %s\n"
"\n"
"als de error de schuld van Home Manager lijkt te zijn."
#. translators: Here "flake" is a noun that refers to the Nix Flakes feature.
#: home-manager/home-manager:448
msgid "Can't instantiate a flake configuration"
msgstr "Het is niet gelukt om de flake-configuratie te creëren"
#: home-manager/home-manager:521
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] ""
"Er is %d ongelezen and relevant nieuws artikel.\n"
"Lees het door het commando \"%s news\" uit te voeren."
msgstr[1] ""
"Er zijn %d ongelezen and relevante nieuws artikelen.\n"
"Lees ze door het commando \"%s news\" uit te voeren."
#: home-manager/home-manager:535
msgid "Unknown \"news.display\" setting \"%s\"."
msgstr "Onbekende \"new.display\" instelling \"%s\"."
#: home-manager/home-manager:542
#, sh-format
msgid "Please set the $EDITOR environment variable"
msgstr "Gelieve de $EDITOR omgevingsvariabele in te stellen"
#: home-manager/home-manager:557
msgid "Cannot run build in read-only directory"
msgstr "Het is niet mogelijk om te bouwen in een read-only map"
#: home-manager/home-manager:641
msgid "No generation with ID %s"
msgstr "Geen generatie met de ID %s"
#: home-manager/home-manager:643
msgid "Cannot remove the current generation %s"
msgstr "Het is niet mogelijk om de huidige generatie %s te verwijderen"
#: home-manager/home-manager:645
msgid "Removing generation %s"
msgstr "Generatie %s aan het verwijderen"
#: home-manager/home-manager:664
msgid "No generations to expire"
msgstr "Geen generatie om te beëindigen"
#: home-manager/home-manager:675
msgid "No home-manager packages seem to be installed."
msgstr "Er lijkt geen home-manager pakket geïnstalleerd te zijn."
#. translators: Here "flake" is a noun that refers to the Nix Flakes feature.
#: home-manager/home-manager:702
msgid "Sorry, this command is not yet supported in flake setup"
msgstr ""
#: home-manager/home-manager:739
msgid "Unknown argument %s"
msgstr "Onbekend argument %s"
#: home-manager/home-manager:755
msgid "This will remove Home Manager from your system."
msgstr "Dit zal Home Manager van jouw systeem verwijderen."
#: home-manager/home-manager:758
msgid "This is a dry run, nothing will actually be uninstalled."
msgstr "Dit is een oefening, niets wordt werkelijk geïnstalleerd."
#: home-manager/home-manager:762
msgid "Really uninstall Home Manager?"
msgstr "Wilt u zeker Home Manager verwijderen?"
#: home-manager/home-manager:768
msgid "Switching to empty Home Manager configuration..."
msgstr "Naar een lege Home Manager configuratie aan het veranderen..."
#: home-manager/home-manager:795
msgid "Yay!"
msgstr "Joepie!"
#: home-manager/home-manager:800
msgid "Home Manager is uninstalled but your home.nix is left untouched."
msgstr "Home Manager is verwijdert maar jouw home.nix is onaangeraakt."
#: home-manager/home-manager:1011
msgid "expire-generations expects one argument, got %d."
msgstr "expire-generations verwacht één argument, maar kreeg er %d."
#: home-manager/home-manager:1033
msgid "Unknown command: %s"
msgstr "Onbekende opdracht: %s"
#: home-manager/install.nix:18
msgid "This derivation is not buildable, please run it using nix-shell."
msgstr ""
"Deze afleiding kan niet gebouwd worden, voer het alstublieft uit met nix-"
"shell."
#~ msgid "Creating initial Home Manager configuration..."
#~ msgstr "Initiële Home Manager configuratie aan het maken..."
#~ msgid "Remove all Home Manager generations?"
#~ msgstr "Alle Home Manager generaties verwijderen?"
#~ msgid "All generations are now eligible for garbage collection."
#~ msgstr "Alle generaties zijn nu in aanmerking voor afvalinzameling."
#~ msgid "Leaving generations but they may still be garbage collected."
#~ msgstr "Generaties blijven momenteel bestaan maar worden later opgekuist."

View File

@@ -1,220 +0,0 @@
# 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: 2023-05-27 09:08+0200\n"
"PO-Revision-Date: 2023-05-03 19:48+0000\n"
"Last-Translator: Eryk Michalak <gnu.ewm@protonmail.com>\n"
"Language-Team: Polish <https://hosted.weblate.org/projects/home-manager/cli/"
"pl/>\n"
"Language: pl\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
"|| n%100>=20) ? 1 : 2;\n"
"X-Generator: Weblate 4.18-dev\n"
#: home-manager/home-manager:71
msgid "No configuration file found at %s"
msgstr "Nie znaleziono pliku konfiguracyjnego %s"
#. translators: The first '%s' specifier will be replaced by either
#. 'home.nix' or 'flake.nix'.
#: home-manager/home-manager:88 home-manager/home-manager:92
#: home-manager/home-manager:154
msgid ""
"Keeping your Home Manager %s in %s is deprecated,\n"
"please move it to %s"
msgstr ""
"Przechowywanie Home Manager %s w %s jest przestarzałe,\n"
"proszę przenieść go do %s"
#: home-manager/home-manager:99
msgid "No configuration file found. Please create one at %s"
msgstr "Nie znaleziono pliku konfiguracyjnego. Proszę utworzyć plik %s"
#: home-manager/home-manager:136
msgid "Could not find suitable profile directory, tried %s and %s"
msgstr "Nie można znaleźć odpowiedniego katalogu profilu, próbowano %s i %s"
#. translators: Here "flake" is a noun that refers to the Nix Flakes feature.
#: home-manager/home-manager:191
msgid "Can't inspect options of a flake configuration"
msgstr "Nie mogę sprawdzić konfiguracji flake'a"
#: home-manager/home-manager:253 home-manager/home-manager:276
#: home-manager/home-manager:973
msgid "%s: unknown option '%s'"
msgstr "%s: nieznana opcja „%s”"
#: home-manager/home-manager:258 home-manager/home-manager:974
msgid "Run '%s --help' for usage help"
msgstr "Uruchom „%s --help” by otrzymać pomoc"
#: home-manager/home-manager:284 home-manager/home-manager:383
msgid "The file %s already exists, leaving it unchanged..."
msgstr "Plik %s już istnieje, pozostawianie go bez zmian..."
#: home-manager/home-manager:286 home-manager/home-manager:385
msgid "Creating %s..."
msgstr "Tworzenie %s..."
#: home-manager/home-manager:427
msgid "Creating initial Home Manager generation..."
msgstr "Tworzenie pierwotnej generacji Home Managera..."
#. translators: The "%s" specifier will be replaced by a file path.
#: home-manager/home-manager:432
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 ""
"Skończone! Narzędzie home-manager powinno być zainstalowane i może edytować\n"
"\n"
" %s\n"
"\n"
"by skonfigurować Home Managera. Uruchom „man home-configuration.nix” aby\n"
"sprawdzić wszystkie możliwe opcje konfiguracyjne."
#. translators: The "%s" specifier will be replaced by a URL.
#: home-manager/home-manager:437
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 ""
"Ojoj, instalacja nie powiodła się! Proszę opisz problem na\n"
"\n"
" %s\n"
"\n"
"jeśli myślisz, że problem spowodowany jest przez błąd Home Managera."
#. translators: Here "flake" is a noun that refers to the Nix Flakes feature.
#: home-manager/home-manager:448
msgid "Can't instantiate a flake configuration"
msgstr "Nie mogę zinstancjować konfiguracji flake'a"
#: home-manager/home-manager:521
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] ""
"Jest %d nieodczytana wiadomość.\n"
"Możesz ją odczytać uruchamiając „%s news”."
msgstr[1] ""
"Jest %d nieodczytanych wiadomości.\n"
"Możesz je odczytać uruchamiając „%s news”."
msgstr[2] ""
"Jest %d nieodczytanych wiadomości.\n"
"Możesz je odczytać uruchamiając „%s news”."
#: home-manager/home-manager:535
msgid "Unknown \"news.display\" setting \"%s\"."
msgstr "Nieznane ustawienie „%s” „news.display”."
#: home-manager/home-manager:542
#, sh-format
msgid "Please set the $EDITOR environment variable"
msgstr "Proszę ustawić zmienną środowiskową $EDITOR"
#: home-manager/home-manager:557
msgid "Cannot run build in read-only directory"
msgstr "Nie mogę uruchomić budowania w katalogu tylko-do-odczytu"
#: home-manager/home-manager:641
msgid "No generation with ID %s"
msgstr "Brak generacji z ID %s"
#: home-manager/home-manager:643
msgid "Cannot remove the current generation %s"
msgstr "Nie mogę usunąć bieżącej generacji %s"
#: home-manager/home-manager:645
msgid "Removing generation %s"
msgstr "Usuwanie generacji %s"
#: home-manager/home-manager:664
msgid "No generations to expire"
msgstr "Brak wygasających generacji"
#: home-manager/home-manager:675
msgid "No home-manager packages seem to be installed."
msgstr "Pakiety home-manager nie wydają się być zainstalowane."
#. translators: Here "flake" is a noun that refers to the Nix Flakes feature.
#: home-manager/home-manager:702
msgid "Sorry, this command is not yet supported in flake setup"
msgstr ""
"Przepraszamy, ta komenda nie jest jeszcze obsługiwana w konfiguracji flake"
#: home-manager/home-manager:739
msgid "Unknown argument %s"
msgstr "Nieznany argument %s"
#: home-manager/home-manager:755
msgid "This will remove Home Manager from your system."
msgstr "To usunie Home Managera z twojego systemu."
#: home-manager/home-manager:758
msgid "This is a dry run, nothing will actually be uninstalled."
msgstr "To jest próba, faktycznie nic nie będzie usunięte."
#: home-manager/home-manager:762
msgid "Really uninstall Home Manager?"
msgstr "Jesteś pewien usunięcia Home Managera?"
#: home-manager/home-manager:768
msgid "Switching to empty Home Manager configuration..."
msgstr "Przełączanie do pustej konfiguracji Home Managera..."
#: home-manager/home-manager:795
msgid "Yay!"
msgstr "Jej!"
#: home-manager/home-manager:800
msgid "Home Manager is uninstalled but your home.nix is left untouched."
msgstr ""
"Home Manager jest usunięty ale twój home.nix jest pozostawiony nietknięty."
#: home-manager/home-manager:1011
msgid "expire-generations expects one argument, got %d."
msgstr "expire-generations oczekuje jednego argumentu, otrzymane %d."
#: home-manager/home-manager:1033
msgid "Unknown command: %s"
msgstr "Nieznana komenda: %s"
#: home-manager/install.nix:18
msgid "This derivation is not buildable, please run it using nix-shell."
msgstr ""
"Ta paczka (derivation) nie da się budować, proszę uruchom używając nix-shell."
#~ msgid "Creating initial Home Manager configuration..."
#~ msgstr "Tworzenie pierwotnej konfiguracji Home Managera..."
#~ msgid "Remove all Home Manager generations?"
#~ msgstr "Usunąć wszystkie generacje Home Managera?"
#~ msgid "All generations are now eligible for garbage collection."
#~ msgstr ""
#~ "Wszystkie generacje są uwzględnione przy oczyszczaniu (garbage "
#~ "collection)."
#~ msgid "Leaving generations but they may still be garbage collected."
#~ msgstr ""
#~ "Zostawiam generacje ale wciąż mogą zostać usunięte (garbage collection)."

View File

@@ -1,213 +0,0 @@
# 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: 2023-05-27 09:08+0200\n"
"PO-Revision-Date: 2023-02-19 10:19+0000\n"
"Last-Translator: ssantos <ssantos@web.de>\n"
"Language-Team: Portuguese <https://hosted.weblate.org/projects/home-manager/"
"cli/pt/>\n"
"Language: pt\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.16-dev\n"
#: home-manager/home-manager:71
msgid "No configuration file found at %s"
msgstr "Nenhum ficheiro de configuração encontrado no %s"
#. translators: The first '%s' specifier will be replaced by either
#. 'home.nix' or 'flake.nix'.
#: home-manager/home-manager:88 home-manager/home-manager:92
#: home-manager/home-manager:154
msgid ""
"Keeping your Home Manager %s in %s is deprecated,\n"
"please move it to %s"
msgstr ""
#: home-manager/home-manager:99
msgid "No configuration file found. Please create one at %s"
msgstr "Ficheiro de configuração não encontrado. Por favor crie um em %s"
#: home-manager/home-manager:136
msgid "Could not find suitable profile directory, tried %s and %s"
msgstr ""
#. translators: Here "flake" is a noun that refers to the Nix Flakes feature.
#: home-manager/home-manager:191
msgid "Can't inspect options of a flake configuration"
msgstr "Não é possivel inspecionar a opção de configuração do flake"
#: home-manager/home-manager:253 home-manager/home-manager:276
#: home-manager/home-manager:973
msgid "%s: unknown option '%s'"
msgstr "%s: opção não reconhecida '%s'"
#: home-manager/home-manager:258 home-manager/home-manager:974
msgid "Run '%s --help' for usage help"
msgstr "Execute '%s --help' para instruções de uso"
#: home-manager/home-manager:284 home-manager/home-manager:383
msgid "The file %s already exists, leaving it unchanged..."
msgstr ""
#: home-manager/home-manager:286 home-manager/home-manager:385
msgid "Creating %s..."
msgstr ""
#: home-manager/home-manager:427
msgid "Creating initial Home Manager generation..."
msgstr "Criando a geração inicial do Home Manager..."
#. translators: The "%s" specifier will be replaced by a file path.
#: home-manager/home-manager:432
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 ""
"Pronto! O home-manager agora deve ser instalado e poderá editar o ficheiro\n"
"\n"
" %s\n"
"\n"
"para configurar o Home Manager. Execute 'man home-configuration.nix' para\n"
"ver todas as opções disponíveis."
#. translators: The "%s" specifier will be replaced by a URL.
#: home-manager/home-manager:437
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 ""
"Ixi, a instalação falhou! Por favor crie um issue no\n"
"\n"
" %s\n"
"\n"
"se o erro lhe parecer ser um problema do Home Manager."
#. translators: Here "flake" is a noun that refers to the Nix Flakes feature.
#: home-manager/home-manager:448
msgid "Can't instantiate a flake configuration"
msgstr "Não foi possível instanciar a configuração de flake"
#: home-manager/home-manager:521
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] ""
"Há %d novo item relevante não lido\n"
"Leia executando o comando \"%s news\"."
msgstr[1] ""
"Há %d novos itens relevants não lidos\n"
"Leia executando o comando \"%s news\"."
#: home-manager/home-manager:535
msgid "Unknown \"news.display\" setting \"%s\"."
msgstr "Valor \"%s\" para configuração \"news.display\" não reconhecido."
#: home-manager/home-manager:542
#, sh-format
msgid "Please set the $EDITOR environment variable"
msgstr "Por favor defina a variável de ambiente $EDITOR"
#: home-manager/home-manager:557
msgid "Cannot run build in read-only directory"
msgstr "Não é possível fazer o build num diretório somente leitura"
#: home-manager/home-manager:641
msgid "No generation with ID %s"
msgstr "Nenhuma geração com ID %s"
#: home-manager/home-manager:643
msgid "Cannot remove the current generation %s"
msgstr "Não foi possível remover a geração atual %s"
#: home-manager/home-manager:645
msgid "Removing generation %s"
msgstr "A remover a geração %s"
#: home-manager/home-manager:664
msgid "No generations to expire"
msgstr "Nenhuma geração a expirar"
#: home-manager/home-manager:675
msgid "No home-manager packages seem to be installed."
msgstr "Nenhum pacote parece instalado com home-manager."
#. translators: Here "flake" is a noun that refers to the Nix Flakes feature.
#: home-manager/home-manager:702
msgid "Sorry, this command is not yet supported in flake setup"
msgstr ""
#: home-manager/home-manager:739
msgid "Unknown argument %s"
msgstr "Argumento desconhecido %s"
#: home-manager/home-manager:755
msgid "This will remove Home Manager from your system."
msgstr "Isto irá remover o Home Manager do seu sistema."
#: home-manager/home-manager:758
msgid "This is a dry run, nothing will actually be uninstalled."
msgstr "Essa é uma execução de teste, nada de fato será desinstalado."
#: home-manager/home-manager:762
msgid "Really uninstall Home Manager?"
msgstr "Confirma a desinstalação do Home Manager?"
#: home-manager/home-manager:768
msgid "Switching to empty Home Manager configuration..."
msgstr "Trocando para configuração vazia do Home Manager..."
#: home-manager/home-manager:795
msgid "Yay!"
msgstr "Boa!"
#: home-manager/home-manager:800
msgid "Home Manager is uninstalled but your home.nix is left untouched."
msgstr "Home Manager foi desinstalado, mas o seu home.nix foi deixado intacto."
#: home-manager/home-manager:1011
msgid "expire-generations expects one argument, got %d."
msgstr "expire-generations espera um argumento, recebeu %d."
#: home-manager/home-manager:1033
msgid "Unknown command: %s"
msgstr "Comando não reconhecido: %s"
#: home-manager/install.nix:18
msgid "This derivation is not buildable, please run it using nix-shell."
msgstr ""
"O build dessa derivation não pode ser feito, por favor rode usando o nix-"
"shell."
#~ msgid "Creating initial Home Manager configuration..."
#~ msgstr "Criando a configuração inicial do Home Manager..."
#~ msgid "Remove all Home Manager generations?"
#~ msgstr "Remover todas as gerações do Home Manager?"
#~ msgid "All generations are now eligible for garbage collection."
#~ msgstr ""
#~ "Todas gerações agora são elegíveis para coleta do garbage collector."
#~ msgid "Leaving generations but they may still be garbage collected."
#~ msgstr ""
#~ "Deixando gerações, entretanto elas ainda poderão ser limpas pelo garbage "
#~ "collector."

View File

@@ -1,214 +0,0 @@
# 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: 2023-05-27 09:08+0200\n"
"PO-Revision-Date: 2022-04-04 11:11+0000\n"
"Last-Translator: Alex Miranda <alexmirandamoraes@gmail.com>\n"
"Language-Team: Portuguese (Brazil) <https://hosted.weblate.org/projects/home-"
"manager/cli/pt_BR/>\n"
"Language: pt_BR\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:71
msgid "No configuration file found at %s"
msgstr "Nenhum arquivo de configuração encontrado no %s"
#. translators: The first '%s' specifier will be replaced by either
#. 'home.nix' or 'flake.nix'.
#: home-manager/home-manager:88 home-manager/home-manager:92
#: home-manager/home-manager:154
msgid ""
"Keeping your Home Manager %s in %s is deprecated,\n"
"please move it to %s"
msgstr ""
#: home-manager/home-manager:99
msgid "No configuration file found. Please create one at %s"
msgstr "Arquivo de configuração não encontrado. Por favor crie um em %s"
#: home-manager/home-manager:136
msgid "Could not find suitable profile directory, tried %s and %s"
msgstr ""
#. translators: Here "flake" is a noun that refers to the Nix Flakes feature.
#: home-manager/home-manager:191
msgid "Can't inspect options of a flake configuration"
msgstr "Não é possivel inspecionar a opção de configuração do flake"
#: home-manager/home-manager:253 home-manager/home-manager:276
#: home-manager/home-manager:973
msgid "%s: unknown option '%s'"
msgstr "%s: opção não reconhecida '%s'"
#: home-manager/home-manager:258 home-manager/home-manager:974
msgid "Run '%s --help' for usage help"
msgstr "Execute '%s --help' para instruções de uso"
#: home-manager/home-manager:284 home-manager/home-manager:383
msgid "The file %s already exists, leaving it unchanged..."
msgstr ""
#: home-manager/home-manager:286 home-manager/home-manager:385
msgid "Creating %s..."
msgstr ""
#: home-manager/home-manager:427
msgid "Creating initial Home Manager generation..."
msgstr "Criando a geração inicial do Home Manager..."
#. translators: The "%s" specifier will be replaced by a file path.
#: home-manager/home-manager:432
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 ""
"Pronto! O home-manager deve ser instalado agora e você poderá editar o "
"arquivo\n"
"\n"
" %s\n"
"\n"
"para configurar o Home Manager. Execute 'man home-configuration.nix' para\n"
"ver todas as opções disponíveis."
#. translators: The "%s" specifier will be replaced by a URL.
#: home-manager/home-manager:437
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 ""
"Ixi, a instalação falhou! Por favor crie um issue no\n"
"\n"
" %s\n"
"\n"
"se o erro lhe parecer ser um problema do Home Manager."
#. translators: Here "flake" is a noun that refers to the Nix Flakes feature.
#: home-manager/home-manager:448
msgid "Can't instantiate a flake configuration"
msgstr "Não foi possível instanciar a configuração de flake"
#: home-manager/home-manager:521
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] ""
"Há %d novo item relevante não lido\n"
"Leia executando o comando \"%s news\"."
msgstr[1] ""
"Há %d novos itens relevants não lidos\n"
"Leia executando o comando \"%s news\"."
#: home-manager/home-manager:535
msgid "Unknown \"news.display\" setting \"%s\"."
msgstr "Valor \"%s\" para configuração \"news.display\" não reconhecido."
#: home-manager/home-manager:542
#, sh-format
msgid "Please set the $EDITOR environment variable"
msgstr "Por favor defina a variável de ambiente $EDITOR"
#: home-manager/home-manager:557
msgid "Cannot run build in read-only directory"
msgstr "Não é possível fazer o build em um diretório somente leitura"
#: home-manager/home-manager:641
msgid "No generation with ID %s"
msgstr "Nenhuma geração com ID %s"
#: home-manager/home-manager:643
msgid "Cannot remove the current generation %s"
msgstr "Não foi possível remover a geração atual %s"
#: home-manager/home-manager:645
msgid "Removing generation %s"
msgstr "Removendo geração %s"
#: home-manager/home-manager:664
msgid "No generations to expire"
msgstr "Nenhuma geração a expirar"
#: home-manager/home-manager:675
msgid "No home-manager packages seem to be installed."
msgstr "Nenhum pacote parece instalado com home-manager."
#. translators: Here "flake" is a noun that refers to the Nix Flakes feature.
#: home-manager/home-manager:702
msgid "Sorry, this command is not yet supported in flake setup"
msgstr ""
#: home-manager/home-manager:739
msgid "Unknown argument %s"
msgstr "Argumento desconhecido %s"
#: home-manager/home-manager:755
msgid "This will remove Home Manager from your system."
msgstr "Isso irá remover o Home Manager do seu sistema."
#: home-manager/home-manager:758
msgid "This is a dry run, nothing will actually be uninstalled."
msgstr "Essa é uma execução de teste, nada de fato será desinstalado."
#: home-manager/home-manager:762
msgid "Really uninstall Home Manager?"
msgstr "Confirma a desinstalação do Home Manager?"
#: home-manager/home-manager:768
msgid "Switching to empty Home Manager configuration..."
msgstr "Trocando para configuração vazia do Home Manager..."
#: home-manager/home-manager:795
msgid "Yay!"
msgstr "Boa!"
#: home-manager/home-manager:800
msgid "Home Manager is uninstalled but your home.nix is left untouched."
msgstr "Home Manager foi desinstalado, mas o seu home.nix foi deixado intacto."
#: home-manager/home-manager:1011
msgid "expire-generations expects one argument, got %d."
msgstr "expire-generations espera um argumento, recebeu %d."
#: home-manager/home-manager:1033
msgid "Unknown command: %s"
msgstr "Comando não reconhecido: %s"
#: home-manager/install.nix:18
msgid "This derivation is not buildable, please run it using nix-shell."
msgstr ""
"O build dessa derivation não pode ser feito, por favor rode usando o nix-"
"shell."
#~ msgid "Creating initial Home Manager configuration..."
#~ msgstr "Criando a configuração inicial do Home Manager..."
#~ msgid "Remove all Home Manager generations?"
#~ msgstr "Remover todas as gerações do Home Manager?"
#~ msgid "All generations are now eligible for garbage collection."
#~ msgstr ""
#~ "Todas gerações agora são elegíveis para coleta do garbage collector."
#~ msgid "Leaving generations but they may still be garbage collected."
#~ msgstr ""
#~ "Deixando gerações, entretanto elas ainda poderão ser limpas pelo garbage "
#~ "collector."

View File

@@ -1,180 +0,0 @@
# 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: 2023-05-27 09:08+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Automatically generated\n"
"Language-Team: none\n"
"Language: ro\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=n==1 ? 0 : (n==0 || (n%100 > 0 && n%100 < "
"20)) ? 1 : 2;\n"
#: home-manager/home-manager:71
msgid "No configuration file found at %s"
msgstr ""
#. translators: The first '%s' specifier will be replaced by either
#. 'home.nix' or 'flake.nix'.
#: home-manager/home-manager:88 home-manager/home-manager:92
#: home-manager/home-manager:154
msgid ""
"Keeping your Home Manager %s in %s is deprecated,\n"
"please move it to %s"
msgstr ""
#: home-manager/home-manager:99
msgid "No configuration file found. Please create one at %s"
msgstr ""
#: home-manager/home-manager:136
msgid "Could not find suitable profile directory, tried %s and %s"
msgstr ""
#. translators: Here "flake" is a noun that refers to the Nix Flakes feature.
#: home-manager/home-manager:191
msgid "Can't inspect options of a flake configuration"
msgstr ""
#: home-manager/home-manager:253 home-manager/home-manager:276
#: home-manager/home-manager:973
msgid "%s: unknown option '%s'"
msgstr ""
#: home-manager/home-manager:258 home-manager/home-manager:974
msgid "Run '%s --help' for usage help"
msgstr ""
#: home-manager/home-manager:284 home-manager/home-manager:383
msgid "The file %s already exists, leaving it unchanged..."
msgstr ""
#: home-manager/home-manager:286 home-manager/home-manager:385
msgid "Creating %s..."
msgstr ""
#: home-manager/home-manager:427
msgid "Creating initial Home Manager generation..."
msgstr ""
#. translators: The "%s" specifier will be replaced by a file path.
#: home-manager/home-manager:432
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/home-manager:437
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 ""
#. translators: Here "flake" is a noun that refers to the Nix Flakes feature.
#: home-manager/home-manager:448
msgid "Can't instantiate a flake configuration"
msgstr ""
#: home-manager/home-manager:521
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:535
msgid "Unknown \"news.display\" setting \"%s\"."
msgstr ""
#: home-manager/home-manager:542
#, sh-format
msgid "Please set the $EDITOR environment variable"
msgstr ""
#: home-manager/home-manager:557
msgid "Cannot run build in read-only directory"
msgstr ""
#: home-manager/home-manager:641
msgid "No generation with ID %s"
msgstr ""
#: home-manager/home-manager:643
msgid "Cannot remove the current generation %s"
msgstr ""
#: home-manager/home-manager:645
msgid "Removing generation %s"
msgstr ""
#: home-manager/home-manager:664
msgid "No generations to expire"
msgstr ""
#: home-manager/home-manager:675
msgid "No home-manager packages seem to be installed."
msgstr ""
#. translators: Here "flake" is a noun that refers to the Nix Flakes feature.
#: home-manager/home-manager:702
msgid "Sorry, this command is not yet supported in flake setup"
msgstr ""
#: home-manager/home-manager:739
msgid "Unknown argument %s"
msgstr ""
#: home-manager/home-manager:755
msgid "This will remove Home Manager from your system."
msgstr ""
#: home-manager/home-manager:758
msgid "This is a dry run, nothing will actually be uninstalled."
msgstr ""
#: home-manager/home-manager:762
msgid "Really uninstall Home Manager?"
msgstr ""
#: home-manager/home-manager:768
msgid "Switching to empty Home Manager configuration..."
msgstr ""
#: home-manager/home-manager:795
msgid "Yay!"
msgstr ""
#: home-manager/home-manager:800
msgid "Home Manager is uninstalled but your home.nix is left untouched."
msgstr ""
#: home-manager/home-manager:1011
msgid "expire-generations expects one argument, got %d."
msgstr ""
#: home-manager/home-manager:1033
msgid "Unknown command: %s"
msgstr ""
#: home-manager/install.nix:18
msgid "This derivation is not buildable, please run it using nix-shell."
msgstr ""

View File

@@ -1,213 +0,0 @@
# 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: 2023-05-27 09:08+0200\n"
"PO-Revision-Date: 2021-12-21 19:55+0000\n"
"Last-Translator: Mikhail Chekan <chekoopa@mail.ru>\n"
"Language-Team: Russian <https://hosted.weblate.org/projects/home-manager/cli/"
"ru/>\n"
"Language: ru\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
"X-Generator: Weblate 4.10\n"
#: home-manager/home-manager:71
msgid "No configuration file found at %s"
msgstr "Не найден файл конфигурации в %s"
#. translators: The first '%s' specifier will be replaced by either
#. 'home.nix' or 'flake.nix'.
#: home-manager/home-manager:88 home-manager/home-manager:92
#: home-manager/home-manager:154
msgid ""
"Keeping your Home Manager %s in %s is deprecated,\n"
"please move it to %s"
msgstr ""
#: home-manager/home-manager:99
msgid "No configuration file found. Please create one at %s"
msgstr "Не найден файл конфигурации. Пожалуйста, создайте его в %s"
#: home-manager/home-manager:136
msgid "Could not find suitable profile directory, tried %s and %s"
msgstr ""
#. translators: Here "flake" is a noun that refers to the Nix Flakes feature.
#: home-manager/home-manager:191
msgid "Can't inspect options of a flake configuration"
msgstr "Не могу получить опции для flake-конфигурации"
#: home-manager/home-manager:253 home-manager/home-manager:276
#: home-manager/home-manager:973
msgid "%s: unknown option '%s'"
msgstr "%s: неизвестная опция '%s'"
#: home-manager/home-manager:258 home-manager/home-manager:974
msgid "Run '%s --help' for usage help"
msgstr "Выполните '%s --help', чтобы получить справку"
#: home-manager/home-manager:284 home-manager/home-manager:383
msgid "The file %s already exists, leaving it unchanged..."
msgstr ""
#: home-manager/home-manager:286 home-manager/home-manager:385
msgid "Creating %s..."
msgstr ""
#: home-manager/home-manager:427
msgid "Creating initial Home Manager generation..."
msgstr "Создаю начальное поколение Home Manager..."
#. translators: The "%s" specifier will be replaced by a file path.
#: home-manager/home-manager:432
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 ""
"Готово! Теперь вам должна быть доступна утилита home-manager,\n"
"и вы можете отредактировать настройки в файле\n"
"\n"
" %s\n"
"\n"
"Выполните 'man home-configuration.nix', чтобы увидеть доступные опции."
#. translators: The "%s" specifier will be replaced by a URL.
#: home-manager/home-manager:437
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 ""
"Ой, установка не удалась! Пожалуйста, создайте тему в багтрекере\n"
"\n"
" %s\n"
"\n"
"если считаете, что в ошибке виноват Home Manager."
#. translators: Here "flake" is a noun that refers to the Nix Flakes feature.
#: home-manager/home-manager:448
msgid "Can't instantiate a flake configuration"
msgstr "Не могу создать экземляр для flake-конфигурации"
#: home-manager/home-manager:521
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] ""
"У вас есть %d непрочитанная и релевантная новость.\n"
"Прочтите её, выполнив команду \"%s news\"."
msgstr[1] ""
"У вас есть %d непрочитанные и релевантные новости.\n"
"Прочтите их, выполнив команду \"%s news\"."
msgstr[2] ""
"У вас есть %d непрочитанных и релевантных новостей.\n"
"Прочтите их, выполнив команду \"%s news\"."
#: home-manager/home-manager:535
msgid "Unknown \"news.display\" setting \"%s\"."
msgstr "Неизвестное значение \"news.display\": \"%s\"."
#: home-manager/home-manager:542
#, sh-format
msgid "Please set the $EDITOR environment variable"
msgstr "Пожалуйста, определите переменную среды $EDITOR"
#: home-manager/home-manager:557
msgid "Cannot run build in read-only directory"
msgstr "Не могу начать сборку в директории, защищённой от записи"
#: home-manager/home-manager:641
msgid "No generation with ID %s"
msgstr "Поколение под номером %s не существует"
#: home-manager/home-manager:643
msgid "Cannot remove the current generation %s"
msgstr "Не могу удалить текущее поколение %s"
#: home-manager/home-manager:645
msgid "Removing generation %s"
msgstr "Удаляю поколение %s"
#: home-manager/home-manager:664
msgid "No generations to expire"
msgstr "Нет поколений, которые можно просрочить"
#: home-manager/home-manager:675
msgid "No home-manager packages seem to be installed."
msgstr "Не обнаружено пакетов, установленных через home-manager."
#. translators: Here "flake" is a noun that refers to the Nix Flakes feature.
#: home-manager/home-manager:702
msgid "Sorry, this command is not yet supported in flake setup"
msgstr ""
#: home-manager/home-manager:739
msgid "Unknown argument %s"
msgstr "Неизвестный аргумент %s"
#: home-manager/home-manager:755
msgid "This will remove Home Manager from your system."
msgstr "Это удалит Home Manager из вашей системы."
#: home-manager/home-manager:758
msgid "This is a dry run, nothing will actually be uninstalled."
msgstr "Это пробный запуск, на самом деле ничего не удаляется."
#: home-manager/home-manager:762
msgid "Really uninstall Home Manager?"
msgstr "Действительно хотите удалить Home Manager?"
#: home-manager/home-manager:768
msgid "Switching to empty Home Manager configuration..."
msgstr "Переключаюсь на пустую конфигурацию Home Manager..."
#: home-manager/home-manager:795
msgid "Yay!"
msgstr "Ура!"
#: home-manager/home-manager:800
msgid "Home Manager is uninstalled but your home.nix is left untouched."
msgstr "Home Manager удалён, но ваш home.nix остался нетронутым."
#: home-manager/home-manager:1011
msgid "expire-generations expects one argument, got %d."
msgstr "expire-generations требует один аргумент, но передано %d."
#: home-manager/home-manager:1033
msgid "Unknown command: %s"
msgstr "Неизвестная команда: %s"
#: home-manager/install.nix:18
msgid "This derivation is not buildable, please run it using nix-shell."
msgstr ""
"Это определение нельзя собрать. Пожалуйста, запустите его через nix-shell."
#~ msgid "Creating initial Home Manager configuration..."
#~ msgstr "Создаю начальную конфигурацию Home Manager..."
#~ msgid "Remove all Home Manager generations?"
#~ msgstr "Удалить все поколения Home Manager?"
#~ msgid "All generations are now eligible for garbage collection."
#~ msgstr "Теперь все поколения готовы к удалению сборщиком мусора."
#~ msgid "Leaving generations but they may still be garbage collected."
#~ msgstr "Поколения остаются, но их ещё можно удалить сборщиком мусора."

View File

@@ -1,211 +0,0 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE 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: 2023-05-27 09:08+0200\n"
"PO-Revision-Date: 2023-04-11 20:41+0000\n"
"Last-Translator: Robert Helgesson <robert@rycee.net>\n"
"Language-Team: Swedish <https://hosted.weblate.org/projects/home-manager/cli/"
"sv/>\n"
"Language: sv\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.17-dev\n"
#: home-manager/home-manager:71
msgid "No configuration file found at %s"
msgstr "Det finns ingen konfigurationsfil i %s"
#. translators: The first '%s' specifier will be replaced by either
#. 'home.nix' or 'flake.nix'.
#: home-manager/home-manager:88 home-manager/home-manager:92
#: home-manager/home-manager:154
msgid ""
"Keeping your Home Manager %s in %s is deprecated,\n"
"please move it to %s"
msgstr ""
"Att behålla din Home Manager %s i %s är föråldrat,\n"
"snälla flytta den till %s"
#: home-manager/home-manager:99
msgid "No configuration file found. Please create one at %s"
msgstr "Hittade ingen konfigurationsfil. Skapa en i %s"
#: home-manager/home-manager:136
msgid "Could not find suitable profile directory, tried %s and %s"
msgstr "Kunde inte hitta lämplig profil-katalog, försökte med %s och %s"
#. translators: Here "flake" is a noun that refers to the Nix Flakes feature.
#: home-manager/home-manager:191
msgid "Can't inspect options of a flake configuration"
msgstr "Kan inte granska alternativ i en flake-konfiguration"
#: home-manager/home-manager:253 home-manager/home-manager:276
#: home-manager/home-manager:973
msgid "%s: unknown option '%s'"
msgstr "%s: okänt val '%s'"
#: home-manager/home-manager:258 home-manager/home-manager:974
msgid "Run '%s --help' for usage help"
msgstr "Kör '%s --help' för användarhjälp"
#: home-manager/home-manager:284 home-manager/home-manager:383
msgid "The file %s already exists, leaving it unchanged..."
msgstr "Filen %s finns redan, lämnar den orörd..."
#: home-manager/home-manager:286 home-manager/home-manager:385
msgid "Creating %s..."
msgstr "Skapar %s..."
#: home-manager/home-manager:427
msgid "Creating initial Home Manager generation..."
msgstr "Skapar initial Home Manager-generation..."
#. translators: The "%s" specifier will be replaced by a file path.
#: home-manager/home-manager:432
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 ""
"Färdig! Verktyget home-manager borde nu vara installerat och du kan editera\n"
"\n"
" %s\n"
"\n"
"för att konfigurera Home Manager. Kör 'man home-configuration.nix' för\n"
"att se alla tillgängliga alternativ."
#. translators: The "%s" specifier will be replaced by a URL.
#: home-manager/home-manager:437
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 ""
"Ajdå, installationen misslyckades! Skapa gärna en rapport på\n"
"\n"
" %s\n"
"\n"
"om problemet verkar bero på något Home Manager gör fel."
#. translators: Here "flake" is a noun that refers to the Nix Flakes feature.
#: home-manager/home-manager:448
msgid "Can't instantiate a flake configuration"
msgstr "Kan inte instansera en flake-konfiguration"
#: home-manager/home-manager:521
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] ""
"Det finns %d oläst och relevant nyhet.\n"
"Läs den genom att köra kommandot \"%s news\"."
msgstr[1] ""
"Det finns %d olästa och relevanta nyheter.\n"
"Läs dem genom att köra kommandot \"%s news\"."
#: home-manager/home-manager:535
msgid "Unknown \"news.display\" setting \"%s\"."
msgstr "Okänt \"news.display\"-värde \"%s\"."
#: home-manager/home-manager:542
#, sh-format
msgid "Please set the $EDITOR environment variable"
msgstr "Vänligen tilldela miljövariablen $EDITOR"
#: home-manager/home-manager:557
msgid "Cannot run build in read-only directory"
msgstr "Kan inte bygga i katalog med bara läsrättigheter"
#: home-manager/home-manager:641
msgid "No generation with ID %s"
msgstr "Ingen generation med ID %s"
#: home-manager/home-manager:643
msgid "Cannot remove the current generation %s"
msgstr "Kan inte ta bort nuvarande generation %s"
#: home-manager/home-manager:645
msgid "Removing generation %s"
msgstr "Tar bort generation %s"
#: home-manager/home-manager:664
msgid "No generations to expire"
msgstr "Ingen generation att förfalla"
#: home-manager/home-manager:675
msgid "No home-manager packages seem to be installed."
msgstr "Paketet home-manager verkar inte vara installerat."
#. translators: Here "flake" is a noun that refers to the Nix Flakes feature.
#: home-manager/home-manager:702
msgid "Sorry, this command is not yet supported in flake setup"
msgstr ""
"Ursäkta, för tillfället stödjs detta kommando inte när Nix flakes används"
#: home-manager/home-manager:739
msgid "Unknown argument %s"
msgstr "Okänt argument %s"
#: home-manager/home-manager:755
msgid "This will remove Home Manager from your system."
msgstr "Detta kommer att ta bort Home Manager från ditt system."
#: home-manager/home-manager:758
msgid "This is a dry run, nothing will actually be uninstalled."
msgstr "Detta är en testkörning, inget kommer att bli avinstallerat."
#: home-manager/home-manager:762
msgid "Really uninstall Home Manager?"
msgstr "Verkligen avinstallera Home Manager?"
#: home-manager/home-manager:768
msgid "Switching to empty Home Manager configuration..."
msgstr "Byter till tom Home Manager-konfiguration..."
#: home-manager/home-manager:795
msgid "Yay!"
msgstr "Hurra!"
#: home-manager/home-manager:800
msgid "Home Manager is uninstalled but your home.nix is left untouched."
msgstr "Home Manager är avinstallerad men din home.nix är orörd."
#: home-manager/home-manager:1011
msgid "expire-generations expects one argument, got %d."
msgstr "expect-generations förväntar sig ett argument, fick %d."
#: home-manager/home-manager:1033
msgid "Unknown command: %s"
msgstr "Okänt kommando: %s"
#: home-manager/install.nix:18
msgid "This derivation is not buildable, please run it using nix-shell."
msgstr "Denna derivation är inte byggbar, kör den med nix-shell istället."
#~ msgid "Creating initial Home Manager configuration..."
#~ msgstr "Skapar initial Home Manager-konfiguration..."
#~ msgid "Remove all Home Manager generations?"
#~ msgstr "Ta bort alla Home Manager-generationer?"
#~ msgid "All generations are now eligible for garbage collection."
#~ msgstr "Alla generationer kan nu skräpsamlas."
#~ msgid "Leaving generations but they may still be garbage collected."
#~ msgstr "Låter generationer vara kvar men de kan fortfarande skräpsamlas."

View File

@@ -1,211 +0,0 @@
# 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: 2023-05-27 09:08+0200\n"
"PO-Revision-Date: 2022-03-26 23:57+0000\n"
"Last-Translator: Oğuz Ersen <oguz@ersen.moe>\n"
"Language-Team: Turkish <https://hosted.weblate.org/projects/home-manager/cli/"
"tr/>\n"
"Language: tr\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:71
msgid "No configuration file found at %s"
msgstr "%s konumunda yapılandırma dosyası bulunamadı"
#. translators: The first '%s' specifier will be replaced by either
#. 'home.nix' or 'flake.nix'.
#: home-manager/home-manager:88 home-manager/home-manager:92
#: home-manager/home-manager:154
msgid ""
"Keeping your Home Manager %s in %s is deprecated,\n"
"please move it to %s"
msgstr ""
#: home-manager/home-manager:99
msgid "No configuration file found. Please create one at %s"
msgstr ""
"Yapılandırma dosyası bulunamadı. Lütfen %s konumunda bir tane oluşturun"
#: home-manager/home-manager:136
msgid "Could not find suitable profile directory, tried %s and %s"
msgstr ""
#. translators: Here "flake" is a noun that refers to the Nix Flakes feature.
#: home-manager/home-manager:191
msgid "Can't inspect options of a flake configuration"
msgstr "Flake yapılandırmasının ayarları incelenemiyor"
#: home-manager/home-manager:253 home-manager/home-manager:276
#: home-manager/home-manager:973
msgid "%s: unknown option '%s'"
msgstr "%s: Bilinmeyen komut '%s'"
#: home-manager/home-manager:258 home-manager/home-manager:974
msgid "Run '%s --help' for usage help"
msgstr "Yardım için '%s --help'"
#: home-manager/home-manager:284 home-manager/home-manager:383
msgid "The file %s already exists, leaving it unchanged..."
msgstr ""
#: home-manager/home-manager:286 home-manager/home-manager:385
msgid "Creating %s..."
msgstr ""
#: home-manager/home-manager:427
msgid "Creating initial Home Manager generation..."
msgstr "İlk Home Manager inşası oluşturuluyor..."
#. translators: The "%s" specifier will be replaced by a file path.
#: home-manager/home-manager:432
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 ""
"Herşey tamam! home-manager aracı kuruldu. Home Manager'ı yapılandırmak için\n"
"\n"
" %s\n"
"\n"
"dosyasını düzenleyin. Kullanılabilir seçenekleri görmek için:\n"
"'man home-configuration.nix'."
#. translators: The "%s" specifier will be replaced by a URL.
#: home-manager/home-manager:437
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 ""
"Eyvah, kurulum başarısız! Eğer hatanın Home Manager'dan kaynaklandığını "
"düşünüyorsanız\n"
"\n"
" %s\n"
"\n"
"adresinden bildirin."
#. translators: Here "flake" is a noun that refers to the Nix Flakes feature.
#: home-manager/home-manager:448
msgid "Can't instantiate a flake configuration"
msgstr "Flake yapılandırması örneklendirilemiyor"
#: home-manager/home-manager:521
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] ""
"%d tane okunmamış ilgili haber bulunmakta.\n"
"Okumak için \"%s news\"."
msgstr[1] ""
"%d tane okunmamış ilgili haberler bulunmakta.\n"
"Okumak için \"%s news\"."
#: home-manager/home-manager:535
msgid "Unknown \"news.display\" setting \"%s\"."
msgstr "Bilinmeyen \"news.display\" seçeneği \"%s\"."
#: home-manager/home-manager:542
#, sh-format
msgid "Please set the $EDITOR environment variable"
msgstr "Lütfen $EDITOR ortam değişkenini tanımlayın"
#: home-manager/home-manager:557
msgid "Cannot run build in read-only directory"
msgstr "İnşa, sadece okunabilir bir klasörde çalıştırılamaz"
#: home-manager/home-manager:641
msgid "No generation with ID %s"
msgstr "%s ID'sine sahip inşa bulunamadı"
#: home-manager/home-manager:643
msgid "Cannot remove the current generation %s"
msgstr "Kullanımda olan %s inşası silinemez"
#: home-manager/home-manager:645
msgid "Removing generation %s"
msgstr "İnşa siliniyor %s"
#: home-manager/home-manager:664
msgid "No generations to expire"
msgstr "Süresi dolacak inşa yok"
#: home-manager/home-manager:675
msgid "No home-manager packages seem to be installed."
msgstr "Galiba home-manager paketi kurulu değil."
#. translators: Here "flake" is a noun that refers to the Nix Flakes feature.
#: home-manager/home-manager:702
msgid "Sorry, this command is not yet supported in flake setup"
msgstr ""
#: home-manager/home-manager:739
msgid "Unknown argument %s"
msgstr "Bilinmeyen argüman %s"
#: home-manager/home-manager:755
msgid "This will remove Home Manager from your system."
msgstr "Bu, sisteminizden Home Manager'ı kaldıracak."
#: home-manager/home-manager:758
msgid "This is a dry run, nothing will actually be uninstalled."
msgstr "Bu sadece bir inşa denemesi, hiçbir şey silinmeyecek."
#: home-manager/home-manager:762
msgid "Really uninstall Home Manager?"
msgstr "Home Manager'ı silmek istediğinize emin misiniz?"
#: home-manager/home-manager:768
msgid "Switching to empty Home Manager configuration..."
msgstr "Boş Home Manager yapılandırmasına geçiliyor..."
#: home-manager/home-manager:795
msgid "Yay!"
msgstr "Güzel!"
#: home-manager/home-manager:800
msgid "Home Manager is uninstalled but your home.nix is left untouched."
msgstr "Home Manager kaldırıldı ama home.nix dosyasına dokunulmadı."
#: home-manager/home-manager:1011
msgid "expire-generations expects one argument, got %d."
msgstr "expire-generations bir argüman istiyor, %d tane girildi."
#: home-manager/home-manager:1033
msgid "Unknown command: %s"
msgstr "Bilinmeyen komut: %s"
#: home-manager/install.nix:18
msgid "This derivation is not buildable, please run it using nix-shell."
msgstr ""
"Bu türetim inşa edilebilir değil, lütfen onu nix-shell kullanarak çalıştırın."
#~ msgid "Creating initial Home Manager configuration..."
#~ msgstr "İlk Home Manager yapılandırması oluşturuluyor..."
#~ msgid "Remove all Home Manager generations?"
#~ msgstr "Tüm Home Manager inşaları kaldırılsın mı?"
#~ msgid "All generations are now eligible for garbage collection."
#~ msgstr "Artık tüm inşalar çöp olarak toplanabilir."
#~ msgid "Leaving generations but they may still be garbage collected."
#~ msgstr "İnşalar yine de çöp olarak toplanabilir."

View File

@@ -1,207 +0,0 @@
# 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: 2023-05-27 09:08+0200\n"
"PO-Revision-Date: 2023-04-13 13:47+0000\n"
"Last-Translator: Dan <denqwerta@gmail.com>\n"
"Language-Team: Ukrainian <https://hosted.weblate.org/projects/home-manager/"
"cli/uk/>\n"
"Language: uk\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
"X-Generator: Weblate 4.17-dev\n"
#: home-manager/home-manager:71
msgid "No configuration file found at %s"
msgstr "Файл конфігурації не знайдено в %s"
#. translators: The first '%s' specifier will be replaced by either
#. 'home.nix' or 'flake.nix'.
#: home-manager/home-manager:88 home-manager/home-manager:92
#: home-manager/home-manager:154
msgid ""
"Keeping your Home Manager %s in %s is deprecated,\n"
"please move it to %s"
msgstr ""
"Збереження вашого Home Manager %s у %s є застарілим,\n"
"будь ласка, перемістіть його до %s"
#: home-manager/home-manager:99
msgid "No configuration file found. Please create one at %s"
msgstr "Файл конфігурації не знайдено. Будь ласка, створіть його в %s"
#: home-manager/home-manager:136
msgid "Could not find suitable profile directory, tried %s and %s"
msgstr "Не вдалося знайти відповідний каталог профілю, спробував %s і %s"
#. translators: Here "flake" is a noun that refers to the Nix Flakes feature.
#: home-manager/home-manager:191
msgid "Can't inspect options of a flake configuration"
msgstr "Неможливо перевірити параметри flake-конфігурації"
#: home-manager/home-manager:253 home-manager/home-manager:276
#: home-manager/home-manager:973
msgid "%s: unknown option '%s'"
msgstr "%s: невідомий параметр '%s'"
#: home-manager/home-manager:258 home-manager/home-manager:974
msgid "Run '%s --help' for usage help"
msgstr "Запустіть '%s --help' для отримання довідки про використання"
#: home-manager/home-manager:284 home-manager/home-manager:383
msgid "The file %s already exists, leaving it unchanged..."
msgstr "Файл %s вже існує, залишаючи його незмінним..."
#: home-manager/home-manager:286 home-manager/home-manager:385
msgid "Creating %s..."
msgstr "Створення %s..."
#: home-manager/home-manager:427
msgid "Creating initial Home Manager generation..."
msgstr "Створення початкової генерації Home Manager..."
#. translators: The "%s" specifier will be replaced by a file path.
#: home-manager/home-manager:432
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 ""
"Все готово! Інструмент Home-manager тепер повинен бути встановлений, і ви "
"можете редагувати\n"
"\n"
" %s,\n"
"\n"
"щоб налаштувати Home Manager. Запустіть 'man home-configuration.nix', щоб\n"
"переглянути всі доступні варіанти."
#. translators: The "%s" specifier will be replaced by a URL.
#: home-manager/home-manager:437
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 ""
"Ой, не вдалося встановити! Будь ласка, створіть проблему на\n"
"\n"
" %s\n"
"\n"
"якщо здається, що помилка сталася через Home Manager."
#. translators: Here "flake" is a noun that refers to the Nix Flakes feature.
#: home-manager/home-manager:448
msgid "Can't instantiate a flake configuration"
msgstr "Не вдається створити екземпляр flake-конфігурації"
#: home-manager/home-manager:521
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] ""
"Є %d непрочитана і ревалентна новина.\n"
"Прочитайте її, виконавши команду \"%s news\"."
msgstr[1] ""
"Є %d непрочитані і ревалентні новини.\n"
"Прочитайте їх, виконавши команду \"%s news\"."
msgstr[2] ""
"Є %d непрочитаних і ревалентних новин.\n"
"Прочитайте їх, виконавши команду \"%s news\"."
#: home-manager/home-manager:535
msgid "Unknown \"news.display\" setting \"%s\"."
msgstr "Невідоме налаштування \"news.display\" \"%s\"."
#: home-manager/home-manager:542
#, sh-format
msgid "Please set the $EDITOR environment variable"
msgstr "Будь ласка, встановіть змінну середовища $EDITOR"
#: home-manager/home-manager:557
msgid "Cannot run build in read-only directory"
msgstr "Неможливо запустити збірку в каталозі, доступному лише для читання"
#: home-manager/home-manager:641
msgid "No generation with ID %s"
msgstr "Немає генерації з ID %s"
#: home-manager/home-manager:643
msgid "Cannot remove the current generation %s"
msgstr "Не вдається видалити поточну генерацію %s"
#: home-manager/home-manager:645
msgid "Removing generation %s"
msgstr "Видалення генерації %s"
#: home-manager/home-manager:664
msgid "No generations to expire"
msgstr "Немає генерацій, термін дії яких закінчується"
#: home-manager/home-manager:675
msgid "No home-manager packages seem to be installed."
msgstr "Здається, не встановлено жодних пакунків home-manager."
#. translators: Here "flake" is a noun that refers to the Nix Flakes feature.
#: home-manager/home-manager:702
msgid "Sorry, this command is not yet supported in flake setup"
msgstr "На жаль, ця команда ще не підтримується в налаштуваннях flake"
#: home-manager/home-manager:739
msgid "Unknown argument %s"
msgstr "Невідомий аргумент %s"
#: home-manager/home-manager:755
msgid "This will remove Home Manager from your system."
msgstr "Це призведе до видалення Home Manager з вашої системи."
#: home-manager/home-manager:758
msgid "This is a dry run, nothing will actually be uninstalled."
msgstr "Це пробний запуск, насправді нічого не буде видалено."
#: home-manager/home-manager:762
msgid "Really uninstall Home Manager?"
msgstr "Дійсно видаліть Home Manager?"
#: home-manager/home-manager:768
msgid "Switching to empty Home Manager configuration..."
msgstr "Перехід до порожньої конфігурації Home Manager..."
#: home-manager/home-manager:795
msgid "Yay!"
msgstr "Ура!"
#: home-manager/home-manager:800
msgid "Home Manager is uninstalled but your home.nix is left untouched."
msgstr "Home Manager буде видалено, але ваш home.nix залишиться недоторканим."
#: home-manager/home-manager:1011
msgid "expire-generations expects one argument, got %d."
msgstr "expire-generation очікує один аргумент, отримав %d."
#: home-manager/home-manager:1033
msgid "Unknown command: %s"
msgstr "Невідома команда: %s"
#: home-manager/install.nix:18
msgid "This derivation is not buildable, please run it using nix-shell."
msgstr ""
"Цю похідну не можна зібрати, будь ласка, запустіть її за допомогою nix-shell."
#~ msgid "Creating initial Home Manager configuration..."
#~ msgstr "Створення початкової конфігурації Home Manager..."

View File

@@ -1,205 +0,0 @@
# 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: 2023-05-27 09:08+0200\n"
"PO-Revision-Date: 2021-12-28 12:41+0000\n"
"Last-Translator: WhiredPlanck <fungdaat31@outlook.com>\n"
"Language-Team: Chinese (Simplified) <https://hosted.weblate.org/projects/"
"home-manager/cli/zh_Hans/>\n"
"Language: zh_Hans\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: Weblate 4.10.1\n"
#: home-manager/home-manager:71
msgid "No configuration file found at %s"
msgstr "未在 %s 找到配置文件"
#. translators: The first '%s' specifier will be replaced by either
#. 'home.nix' or 'flake.nix'.
#: home-manager/home-manager:88 home-manager/home-manager:92
#: home-manager/home-manager:154
msgid ""
"Keeping your Home Manager %s in %s is deprecated,\n"
"please move it to %s"
msgstr ""
#: home-manager/home-manager:99
msgid "No configuration file found. Please create one at %s"
msgstr "未找到配置文件。请在 %s 处创建一份"
#: home-manager/home-manager:136
msgid "Could not find suitable profile directory, tried %s and %s"
msgstr ""
#. translators: Here "flake" is a noun that refers to the Nix Flakes feature.
#: home-manager/home-manager:191
msgid "Can't inspect options of a flake configuration"
msgstr "无法检查 flake 配置中的选项"
#: home-manager/home-manager:253 home-manager/home-manager:276
#: home-manager/home-manager:973
msgid "%s: unknown option '%s'"
msgstr "%s未知选项 %s"
#: home-manager/home-manager:258 home-manager/home-manager:974
msgid "Run '%s --help' for usage help"
msgstr "运行 %s --help 获取用法帮助"
#: home-manager/home-manager:284 home-manager/home-manager:383
msgid "The file %s already exists, leaving it unchanged..."
msgstr ""
#: home-manager/home-manager:286 home-manager/home-manager:385
msgid "Creating %s..."
msgstr ""
#: home-manager/home-manager:427
msgid "Creating initial Home Manager generation..."
msgstr "正在创建初始 Home Manager 世代 ..."
#. translators: The "%s" specifier will be replaced by a file path.
#: home-manager/home-manager:432
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 ""
"全部工作完成了home-manager 工具现应已安装,您可以编辑\n"
"\n"
" %s\n"
"\n"
"来配置 Home Manager。运行 man home-configuration.nix\n"
"来查看所有可用选项。"
#. translators: The "%s" specifier will be replaced by a URL.
#: home-manager/home-manager:437
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 造成的错误,请在下方\n"
"\n"
" %s\n"
"\n"
"处创建 Issue 告知我们。"
#. translators: Here "flake" is a noun that refers to the Nix Flakes feature.
#: home-manager/home-manager:448
msgid "Can't instantiate a flake configuration"
msgstr "无法创建 flake 配置实例"
#: home-manager/home-manager:521
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] ""
"有 %d 条未读的相关新闻或消息。\n"
"可运行 “%s news” 命令进行阅读。"
#: home-manager/home-manager:535
msgid "Unknown \"news.display\" setting \"%s\"."
msgstr "未知的 “news.display” 设置项 “%s”。"
#: home-manager/home-manager:542
#, sh-format
msgid "Please set the $EDITOR environment variable"
msgstr "请设定 $EDITOR 环境变量"
#: home-manager/home-manager:557
msgid "Cannot run build in read-only directory"
msgstr "无法在只读目录中运行构建"
#: home-manager/home-manager:641
msgid "No generation with ID %s"
msgstr "没有 ID 为 %s 的世代"
#: home-manager/home-manager:643
msgid "Cannot remove the current generation %s"
msgstr "无法移除当前世代 %s"
#: home-manager/home-manager:645
msgid "Removing generation %s"
msgstr "正在移除世代 %s"
#: home-manager/home-manager:664
msgid "No generations to expire"
msgstr "没有即将过期的世代"
#: home-manager/home-manager:675
msgid "No home-manager packages seem to be installed."
msgstr "似乎没有安装 home-manager 软件包。"
#. translators: Here "flake" is a noun that refers to the Nix Flakes feature.
#: home-manager/home-manager:702
msgid "Sorry, this command is not yet supported in flake setup"
msgstr ""
#: home-manager/home-manager:739
msgid "Unknown argument %s"
msgstr "未知参数 %s"
#: home-manager/home-manager:755
msgid "This will remove Home Manager from your system."
msgstr "这将会从系统中移除 Home Manager。"
#: home-manager/home-manager:758
msgid "This is a dry run, nothing will actually be uninstalled."
msgstr "这是试运行结果,没有实际卸载任何软件包。"
#: home-manager/home-manager:762
msgid "Really uninstall Home Manager?"
msgstr "确定要卸载 Home Manager 吗?"
#: home-manager/home-manager:768
msgid "Switching to empty Home Manager configuration..."
msgstr "正在切换至空的 Home Manager 配置 ..."
#: home-manager/home-manager:795
msgid "Yay!"
msgstr "好耶!"
#: home-manager/home-manager:800
msgid "Home Manager is uninstalled but your home.nix is left untouched."
msgstr "Home Manager 已卸载,但未改动您的 home.nix 配置文件。"
#: home-manager/home-manager:1011
msgid "expire-generations expects one argument, got %d."
msgstr "expire-generations 须要一个参数,但获取到了 %d 个。"
#: home-manager/home-manager:1033
msgid "Unknown command: %s"
msgstr "未知命令:%s"
#: home-manager/install.nix:18
msgid "This derivation is not buildable, please run it using nix-shell."
msgstr "此配置文件/变体不可构建,请在 nix-shell 中运行它。"
#~ msgid "Creating initial Home Manager configuration..."
#~ msgstr "正在创建初始 Home Manager 配置 ..."
#~ msgid "Remove all Home Manager generations?"
#~ msgstr "要移除所有 Home Manager 配置世代吗?"
#~ msgid "All generations are now eligible for garbage collection."
#~ msgstr "所有世代现在均符合垃圾回收的条件。"
#~ msgid "Leaving generations but they may still be garbage collected."
#~ msgstr "保留世代,但它们仍然可能被垃圾回收。"

View File

@@ -1,205 +0,0 @@
# 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: 2023-05-27 09:08+0200\n"
"PO-Revision-Date: 2021-12-29 08:48+0000\n"
"Last-Translator: WhiredPlanck <fungdaat31@outlook.com>\n"
"Language-Team: Chinese (Traditional) <https://hosted.weblate.org/projects/"
"home-manager/cli/zh_Hant/>\n"
"Language: zh_Hant\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: Weblate 4.10.1\n"
#: home-manager/home-manager:71
msgid "No configuration file found at %s"
msgstr "未在 %s 處找到配置檔案"
#. translators: The first '%s' specifier will be replaced by either
#. 'home.nix' or 'flake.nix'.
#: home-manager/home-manager:88 home-manager/home-manager:92
#: home-manager/home-manager:154
msgid ""
"Keeping your Home Manager %s in %s is deprecated,\n"
"please move it to %s"
msgstr ""
#: home-manager/home-manager:99
msgid "No configuration file found. Please create one at %s"
msgstr "未找到配置檔案。請在 %s 處建立一份"
#: home-manager/home-manager:136
msgid "Could not find suitable profile directory, tried %s and %s"
msgstr ""
#. translators: Here "flake" is a noun that refers to the Nix Flakes feature.
#: home-manager/home-manager:191
msgid "Can't inspect options of a flake configuration"
msgstr "無法檢查 flake 配置中的選項"
#: home-manager/home-manager:253 home-manager/home-manager:276
#: home-manager/home-manager:973
msgid "%s: unknown option '%s'"
msgstr "%s未知選項 %s"
#: home-manager/home-manager:258 home-manager/home-manager:974
msgid "Run '%s --help' for usage help"
msgstr "執行 %s --help 獲取用法幫助"
#: home-manager/home-manager:284 home-manager/home-manager:383
msgid "The file %s already exists, leaving it unchanged..."
msgstr ""
#: home-manager/home-manager:286 home-manager/home-manager:385
msgid "Creating %s..."
msgstr ""
#: home-manager/home-manager:427
msgid "Creating initial Home Manager generation..."
msgstr "正在建立初始 Home Manager 世代 ..."
#. translators: The "%s" specifier will be replaced by a file path.
#: home-manager/home-manager:432
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 ""
"全部工作完成了home-manager 工具現應已安裝,您可以編輯\n"
"\n"
" %s\n"
"\n"
"來配置 Home Manager。執行 man home-configuration.nix\n"
"來檢視所有可用選項。"
#. translators: The "%s" specifier will be replaced by a URL.
#: home-manager/home-manager:437
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 造成的錯誤,請在下方\n"
"\n"
" %s\n"
"\n"
"處建立 Issue 告知我們。"
#. translators: Here "flake" is a noun that refers to the Nix Flakes feature.
#: home-manager/home-manager:448
msgid "Can't instantiate a flake configuration"
msgstr "無法建立 flake 配置例項"
#: home-manager/home-manager:521
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] ""
"有 %d 條未讀的相關新聞或訊息。\n"
"可執行 “%s news” 命令進行閱讀。"
#: home-manager/home-manager:535
msgid "Unknown \"news.display\" setting \"%s\"."
msgstr "未知的 “news.display” 設定項 “%s”。"
#: home-manager/home-manager:542
#, sh-format
msgid "Please set the $EDITOR environment variable"
msgstr "請設定 $EDITOR 環境變數"
#: home-manager/home-manager:557
msgid "Cannot run build in read-only directory"
msgstr "無法在只讀目錄中執行構建"
#: home-manager/home-manager:641
msgid "No generation with ID %s"
msgstr "沒有 ID 為 %s 的世代"
#: home-manager/home-manager:643
msgid "Cannot remove the current generation %s"
msgstr "無法移除當前世代 %s"
#: home-manager/home-manager:645
msgid "Removing generation %s"
msgstr "正在移除世代 %s"
#: home-manager/home-manager:664
msgid "No generations to expire"
msgstr "沒有即將過期的世代"
#: home-manager/home-manager:675
msgid "No home-manager packages seem to be installed."
msgstr "似乎沒有安裝 home-manager 軟體包。"
#. translators: Here "flake" is a noun that refers to the Nix Flakes feature.
#: home-manager/home-manager:702
msgid "Sorry, this command is not yet supported in flake setup"
msgstr ""
#: home-manager/home-manager:739
msgid "Unknown argument %s"
msgstr "未知引數 %s"
#: home-manager/home-manager:755
msgid "This will remove Home Manager from your system."
msgstr "這將會從系統中移除 Home Manager。"
#: home-manager/home-manager:758
msgid "This is a dry run, nothing will actually be uninstalled."
msgstr "這是試執行結果,沒有實際解除安裝任何軟體包。"
#: home-manager/home-manager:762
msgid "Really uninstall Home Manager?"
msgstr "確定要解除安裝 Home Manager 嗎?"
#: home-manager/home-manager:768
msgid "Switching to empty Home Manager configuration..."
msgstr "正在切換至空的 Home Manager 配置 ..."
#: home-manager/home-manager:795
msgid "Yay!"
msgstr "好耶!"
#: home-manager/home-manager:800
msgid "Home Manager is uninstalled but your home.nix is left untouched."
msgstr "Home Manager 已解除安裝,但未改動您的 home.nix 配置檔案。"
#: home-manager/home-manager:1011
msgid "expire-generations expects one argument, got %d."
msgstr "expire-generations 須要一個引數,但獲取到了 %d 個。"
#: home-manager/home-manager:1033
msgid "Unknown command: %s"
msgstr "未知命令:%s"
#: home-manager/install.nix:18
msgid "This derivation is not buildable, please run it using nix-shell."
msgstr "此配置檔案/變體不可構建,請在 nix-shell 中執行它。"
#~ msgid "Creating initial Home Manager configuration..."
#~ msgstr "正在建立初始 Home Manager 配置 ..."
#~ msgid "Remove all Home Manager generations?"
#~ msgstr "要移除所有 Home Manager 配置世代嗎?"
#~ msgid "All generations are now eligible for garbage collection."
#~ msgstr "所有世代現在均符合垃圾回收的條件。"
#~ msgid "Leaving generations but they may still be garbage collected."
#~ msgstr "保留世代,但它們仍然可能被垃圾回收。"

View File

@@ -1,85 +0,0 @@
#!/usr/bin/env bash
#
# This file contains a number of utilities for use by the home-manager tool and
# the generated Home Manager activation scripts. No guarantee is made about
# backwards or forward compatibility.
#
# Sets up colors suitable for the `errorEcho`, `warnEcho`, and `noteEcho`
# functions.
#
# The check for terminal output and color support is heavily inspired by
# https://unix.stackexchange.com/a/10065.
#
# The setup respects the `NO_COLOR` environment variable.
function setupColors() {
normalColor=""
errorColor=""
warnColor=""
noteColor=""
# Enable colors for terminals, and allow opting out.
if [[ ! -v NO_COLOR && -t 1 ]]; then
# See if it supports colors.
local ncolors
ncolors=$(tput colors 2> /dev/null || echo 0)
if [[ -n "$ncolors" && "$ncolors" -ge 8 ]]; then
normalColor="$(tput sgr0)"
errorColor="$(tput bold)$(tput setaf 1)"
warnColor="$(tput setaf 3)"
noteColor="$(tput bold)$(tput setaf 6)"
fi
fi
}
setupColors
function errorEcho() {
echo "${errorColor}$*${normalColor}"
}
function warnEcho() {
echo "${warnColor}$*${normalColor}"
}
function noteEcho() {
echo "${noteColor}$*${normalColor}"
}
function _i() {
local msgid="$1"
shift
# shellcheck disable=2059
printf "$(gettext "$msgid")\n" "$@"
}
function _ip() {
local msgid="$1"
local msgidPlural="$2"
local count="$3"
shift 3
# shellcheck disable=2059
printf "$(ngettext "$msgid" "$msgidPlural" "$count")\n" "$@"
}
function _iError() {
echo -n "${errorColor}"
_i "$@"
echo -n "${normalColor}"
}
function _iWarn() {
echo -n "${warnColor}"
_i "$@"
echo -n "${normalColor}"
}
function _iNote() {
echo -n "${noteColor}"
_i "$@"
echo -n "${normalColor}"
}

View File

@@ -44,28 +44,6 @@ let
'';
};
delimiter = mkOption {
type = types.str;
default = ''
--
'';
example = literalExpression ''
~*~*~*~*~*~*~*~*~*~*~*~
'';
description = ''
The delimiter used between the document and the signature.
'';
};
command = mkOption {
type = with types; nullOr path;
default = null;
example = literalExpression ''
pkgs.writeScript "signature" "echo This is my signature"
'';
description = "A command that generates a signature.";
};
showSignature = mkOption {
type = types.enum [ "append" "attach" "none" ];
default = "none";
@@ -93,7 +71,7 @@ let
};
certificatesFile = mkOption {
type = types.nullOr types.path;
type = types.path;
default = config.accounts.email.certificatesFile;
defaultText = "config.accounts.email.certificatesFile";
description = ''
@@ -136,38 +114,6 @@ let
};
};
jmapModule = types.submodule {
options = {
host = mkOption {
type = types.nullOr types.str;
default = null;
example = "jmap.example.org";
description = ''
Hostname of JMAP server.
</para><para>
If both this option and <xref
linkend="opt-accounts.email.accounts._name_.jmap.sessionUrl"/> are specified,
<code>host</code> is preferred by applications when establishing a
session.
'';
};
sessionUrl = mkOption {
type = types.nullOr types.str;
default = null;
example = "https://jmap.example.org:443/.well-known/jmap";
description = ''
URL for the JMAP Session resource.
</para><para>
If both this option and <xref
linkend="opt-accounts.email.accounts._name_.jmap.host"/> are specified,
<code>host</code> is preferred by applications when establishing a
session.
'';
};
};
};
smtpModule = types.submodule {
options = {
host = mkOption {
@@ -242,14 +188,7 @@ let
};
flavor = mkOption {
type = types.enum [
"plain"
"gmail.com"
"runbox.com"
"fastmail.com"
"yandex.com"
"outlook.office365.com"
];
type = types.enum [ "plain" "gmail.com" "runbox.com" ];
default = "plain";
description = ''
Some email providers have peculiar behavior that require
@@ -257,7 +196,7 @@ let
indicate the nature of the provider.
</para><para>
When this indicates a specific provider then, for example,
the IMAP, SMTP, and JMAP server configuration may be set
the IMAP and SMTP server configuration may be set
automatically.
'';
};
@@ -286,7 +225,7 @@ let
default = null;
description = ''
The server username of this account. This will be used as
the SMTP, IMAP, and JMAP user name.
the SMTP and IMAP user name.
'';
};
@@ -321,7 +260,7 @@ let
};
drafts = mkOption {
type = types.nullOr types.str;
type = types.str;
default = "Drafts";
description = ''
Relative path of the drafts mail folder.
@@ -351,14 +290,6 @@ let
'';
};
jmap = mkOption {
type = types.nullOr jmapModule;
default = null;
description = ''
The JMAP configuration to use for this account.
'';
};
signature = mkOption {
type = signatureModule;
default = { };
@@ -398,60 +329,6 @@ let
maildir = mkOptionDefault { path = "${name}"; };
}
(mkIf (config.flavor == "yandex.com") {
userName = mkDefault config.address;
imap = {
host = "imap.yandex.com";
port = 993;
tls.enable = true;
};
smtp = {
host = "smtp.yandex.com";
port = 465;
tls.enable = true;
};
})
(mkIf (config.flavor == "outlook.office365.com") {
userName = mkDefault config.address;
imap = {
host = "outlook.office365.com";
port = 993;
tls.enable = true;
};
smtp = {
host = "smtp.office365.com";
port = 587;
tls = {
enable = true;
useStartTls = true;
};
};
})
(mkIf (config.flavor == "fastmail.com") {
userName = mkDefault config.address;
imap = {
host = "imap.fastmail.com";
port = 993;
};
smtp = {
host = "smtp.fastmail.com";
port = if config.smtp.tls.useStartTls then 587 else 465;
};
jmap = {
host = "fastmail.com";
sessionUrl = "https://jmap.fastmail.com/.well-known/jmap";
};
})
(mkIf (config.flavor == "gmail.com") {
userName = mkDefault config.address;
@@ -477,7 +354,7 @@ let
in {
options.accounts.email = {
certificatesFile = mkOption {
type = types.nullOr types.path;
type = types.path;
default = "/etc/ssl/certs/ca-certificates.crt";
description = ''
Path to default file containing certificate authorities that

View File

@@ -1,158 +0,0 @@
{ config, options, lib, pkgs, ... }:
with lib;
let
cfg = config.home.pointerCursor;
pointerCursorModule = types.submodule {
options = {
package = mkOption {
type = types.package;
example = literalExpression "pkgs.vanilla-dmz";
description = "Package providing the cursor theme.";
};
name = mkOption {
type = types.str;
example = "Vanilla-DMZ";
description = "The cursor name within the package.";
};
size = mkOption {
type = types.int;
default = 32;
example = 64;
description = "The cursor size.";
};
x11 = {
enable = mkEnableOption ''
x11 config generation for <option>home.pointerCursor</option>
'';
defaultCursor = mkOption {
type = types.str;
default = "left_ptr";
example = "X_cursor";
description = "The default cursor file to use within the package.";
};
};
gtk = {
enable = mkEnableOption ''
gtk config generation for <option>home.pointerCursor</option>
'';
};
};
};
cursorPath = "${cfg.package}/share/icons/${escapeShellArg cfg.name}/cursors/${
escapeShellArg cfg.x11.defaultCursor
}";
in {
meta.maintainers = [ maintainers.polykernel maintainers.league ];
imports = [
(mkAliasOptionModule [ "xsession" "pointerCursor" "package" ] [
"home"
"pointerCursor"
"package"
])
(mkAliasOptionModule [ "xsession" "pointerCursor" "name" ] [
"home"
"pointerCursor"
"name"
])
(mkAliasOptionModule [ "xsession" "pointerCursor" "size" ] [
"home"
"pointerCursor"
"size"
])
(mkAliasOptionModule [ "xsession" "pointerCursor" "defaultCursor" ] [
"home"
"pointerCursor"
"x11"
"defaultCursor"
])
({ ... }: {
warnings = optional (any (x:
getAttrFromPath
([ "xsession" "pointerCursor" ] ++ [ x ] ++ [ "isDefined" ])
options) [ "package" "name" "size" "defaultCursor" ]) ''
The option `xsession.pointerCursor` has been merged into `home.pointerCursor` and will be removed
in the future. Please change to set `home.pointerCursor` directly and enable `home.pointerCursor.x11.enable`
to generate x11 specific cursor configurations. You can refer to the documentation for more details.
'';
})
];
options = {
home.pointerCursor = mkOption {
type = types.nullOr pointerCursorModule;
default = null;
description = ''
Cursor configuration. Set to <literal>null</literal> to disable.
</para><para>
Top-level options declared under this submodule are backend independent
options. Options declared under namespaces such as <literal>x11</literal>
are backend specific options. By default, only backend independent cursor
configurations are generated. If you need configurations for specific
backends, you can toggle them via the enable option. For example,
<xref linkend="opt-home.pointerCursor.x11.enable"/>
will enable x11 cursor configurations.
'';
};
};
config = mkIf (cfg != null) (mkMerge [
{
assertions = [
(hm.assertions.assertPlatform "home.pointerCursor" pkgs platforms.linux)
];
home.packages = [ cfg.package ];
# Set name in icons theme, for compatibility with AwesomeWM etc. See:
# https://github.com/nix-community/home-manager/issues/2081
# https://wiki.archlinux.org/title/Cursor_themes#XDG_specification
xdg.dataFile."icons/default/index.theme".text = ''
[icon theme]
Name=Default
Comment=Default Cursor Theme
Inherits=${cfg.name}
'';
# Set directory to look for cursors in, needed for some applications
# that are unable to find cursors otherwise. See:
# https://github.com/nix-community/home-manager/issues/2812
# https://wiki.archlinux.org/title/Cursor_themes#Environment_variable
home.sessionVariables = {
XCURSOR_PATH = mkDefault ("$XCURSOR_PATH\${XCURSOR_PATH:+:}"
+ "${config.home.profileDirectory}/share/icons");
XCURSOR_SIZE = mkDefault cfg.size;
XCURSOR_THEME = mkDefault cfg.name;
};
}
(mkIf cfg.x11.enable {
xsession.initExtra = ''
${pkgs.xorg.xsetroot}/bin/xsetroot -xcf ${cursorPath} ${
toString cfg.size
}
'';
xresources.properties = {
"Xcursor.theme" = cfg.name;
"Xcursor.size" = cfg.size;
};
})
(mkIf cfg.gtk.enable {
gtk.cursorTheme = mkDefault { inherit (cfg) package name size; };
})
]);
}

View File

@@ -36,7 +36,7 @@ let
in {
meta.maintainers = with maintainers; [ midchildan ];
config = mkIf pkgs.stdenv.hostPlatform.isLinux {
config = mkIf pkgs.hostPlatform.isLinux {
# For shell sessions.
home.sessionVariables = localeVars;

View File

@@ -21,7 +21,7 @@ let
in
fold f res res.config.warnings;
extendedLib = import ./lib/stdlib-extended.nix lib;
extendedLib = import ./lib/stdlib-extended.nix pkgs.lib;
hmModules =
import ./modules.nix {
@@ -61,6 +61,4 @@ in
sort (a: b: a.time > b.time) (
filter (a: a.condition) rawModule.config.news.entries
);
inherit (module._module.args) pkgs;
}

View File

@@ -4,7 +4,7 @@ with lib;
let
cfg = filterAttrs (n: f: f.enable) config.home.file;
cfg = config.home.file;
homeDirectory = config.home.homeDirectory;
@@ -28,7 +28,7 @@ in
home.file = mkOption {
description = "Attribute set of files to link into the user home.";
default = {};
type = fileType "home.file" "<envar>HOME</envar>" homeDirectory;
type = fileType "<envar>HOME</envar>" homeDirectory;
};
home-files = mkOption {
@@ -80,7 +80,7 @@ in
(filterAttrs (n: v: v.force) cfg));
check = pkgs.writeText "check" ''
${config.lib.bash.initHomeManagerLib}
. ${./lib-bash/color-echo.sh}
# A symbolic link whose target path matches this pattern will be
# considered part of a Home Manager generation.
@@ -106,12 +106,7 @@ in
$VERBOSE_ECHO "Skipping collision check for $targetPath"
elif [[ -e "$targetPath" \
&& ! "$(readlink "$targetPath")" == $homeFilePattern ]] ; then
# The target file already exists and it isn't a symlink owned by Home Manager.
if cmp -s "$sourcePath" "$targetPath"; then
# First compare the files' content. If they're equal, we're fine.
warnEcho "Existing file '$targetPath' is in the way of '$sourcePath', will be skipped since they are the same"
elif [[ ! -L "$targetPath" && -n "$HOME_MANAGER_BACKUP_EXT" ]] ; then
# Next, try to move the file to a backup location if configured and possible
if [[ ! -L "$targetPath" && -n "$HOME_MANAGER_BACKUP_EXT" ]] ; then
backup="$targetPath.$HOME_MANAGER_BACKUP_EXT"
if [[ -e "$backup" ]]; then
errorEcho "Existing file '$backup' would be clobbered by backing up '$targetPath'"
@@ -120,7 +115,6 @@ in
warnEcho "Existing file '$targetPath' is in the way of '$sourcePath', will be moved to '$backup'"
fi
else
# Fail if nothing else works
errorEcho "Existing file '$targetPath' is in the way of '$sourcePath'"
collision=1
fi
@@ -128,7 +122,7 @@ in
done
if [[ -v collision ]] ; then
errorEcho "Please move the above files and try again or use 'home-manager switch -b backup' to back up existing files automatically."
errorEcho "Please move the above files and try again or use -b <ext> to move automatically."
exit 1
fi
'';
@@ -169,40 +163,33 @@ in
home.activation.linkGeneration = hm.dag.entryAfter ["writeBoundary"] (
let
link = pkgs.writeShellScript "link" ''
newGenFiles="$1"
shift
rootPath="$1"
newGenFiles="$2"
shift 2
for sourcePath in "$@" ; do
relativePath="''${sourcePath#$newGenFiles/}"
targetPath="$HOME/$relativePath"
targetPath="$rootPath/$relativePath"
if [[ -e "$targetPath" && ! -L "$targetPath" && -n "$HOME_MANAGER_BACKUP_EXT" ]] ; then
# The target exists, back it up
backup="$targetPath.$HOME_MANAGER_BACKUP_EXT"
$DRY_RUN_CMD mv $VERBOSE_ARG "$targetPath" "$backup" || errorEcho "Moving '$targetPath' failed!"
fi
if [[ -e "$targetPath" && ! -L "$targetPath" ]] && cmp -s "$sourcePath" "$targetPath" ; then
# The target exists but is identical don't do anything.
$VERBOSE_ECHO "Skipping '$targetPath' as it is identical to '$sourcePath'"
else
# Place that symlink, --force
# This can still fail if the target is a directory, in which case we bail out.
$DRY_RUN_CMD mkdir -p $VERBOSE_ARG "$(dirname "$targetPath")"
$DRY_RUN_CMD ln -Tsf $VERBOSE_ARG "$sourcePath" "$targetPath" || exit 1
fi
$DRY_RUN_CMD mkdir -p $VERBOSE_ARG "$(dirname "$targetPath")"
$DRY_RUN_CMD ln -nsf $VERBOSE_ARG "$sourcePath" "$targetPath"
done
'';
cleanup = pkgs.writeShellScript "cleanup" ''
${config.lib.bash.initHomeManagerLib}
. ${./lib-bash/color-echo.sh}
# A symbolic link whose target path matches this pattern will be
# considered part of a Home Manager generation.
homeFilePattern="$(readlink -e ${escapeShellArg builtins.storeDir})/*-home-manager-files/*"
newGenFiles="$1"
shift 1
rootPath="$1"
newGenFiles="$2"
shift 2
for relativePath in "$@" ; do
targetPath="$HOME/$relativePath"
targetPath="$rootPath/$relativePath"
if [[ -e "$newGenFiles/$relativePath" ]] ; then
$VERBOSE_ECHO "Checking $targetPath: exists"
elif [[ ! "$(readlink "$targetPath")" == $homeFilePattern ]] ; then
@@ -214,7 +201,8 @@ in
# Recursively delete empty parent directories.
targetDir="$(dirname "$relativePath")"
if [[ "$targetDir" != "." ]] ; then
pushd "$HOME" > /dev/null
# TODO
# pushd "$HOME" > /dev/null
# Call rmdir with a relative path excluding $HOME.
# Otherwise, it might try to delete $HOME and exit
@@ -223,7 +211,7 @@ in
-p --ignore-fail-on-non-empty \
"$targetDir"
popd > /dev/null
# popd > /dev/null
fi
fi
done
@@ -231,53 +219,63 @@ in
in
''
function linkNewGen() {
_i "Creating home file links in %s" "$HOME"
echo "Creating home file links"
local rootPath=
if [[ $newGenLayoutVersion -eq 0 ]] ; then
rootPath="$HOME"
fi
local newGenFiles
newGenFiles="$(readlink -e "$newGenPath/home-files")"
find "$newGenFiles" \( -type f -or -type l \) \
-exec bash ${link} "$newGenFiles" {} +
-exec bash ${link} "$rootPath" "$newGenFiles" {} +
}
function cleanOldGen() {
if [[ ! -v oldGenPath || ! -e "$oldGenPath/home-files" ]] ; then
if [[ ! -v oldGenPath ]] ; then
return
fi
_i "Cleaning up orphan links from %s" "$HOME"
echo "Cleaning up orphan links"
local newGenFiles oldGenFiles
newGenFiles="$(readlink -e "$newGenPath/home-files")"
oldGenFiles="$(readlink -e "$oldGenPath/home-files")"
# Apply the cleanup script on each leaf in the old
# generation. The find command below will print the
# relative path of the entry.
find "$oldGenFiles" '(' -type f -or -type l ')' -printf '%P\0' \
| xargs -0 bash ${cleanup} "$newGenFiles"
# When transitioning from layout 0 to 1 we need to prefix all old
# paths with the home directory. Conversely, if we ever go from
# layout 1 to 0 we need to "subtract" the home directory from the
# old generation path, this is done by appending an "antiprefix" to
# the layout 1 paths.
local prefix= antiprefix=
if [[ $oldGenLayoutVersion -eq 0 && $newGenLayoutVersion -ge 1 ]] ; then
prefix="''${HOME#/}/"
elif [[ $oldGenLayoutVersion -ge 1 && $newGenLayoutVersion -eq 0 ]] ; then
antiprefix="/$HOME"
fi
local rootPath=
if [[ $newGenLayoutVersion -eq 0 ]] ; then
rootPath="$HOME"
fi
$VERBOSE_ECHO "Orphan link cleanup uses prefix=$prefix antiprefix=$antiprefix rootPath=$rootPath"
# Apply the cleanup script on each leaf in the old generation. The
# find command below will print the relative path of the entry.
find "$oldGenFiles$antiprefix" '(' -type f -or -type l ')' -printf "$prefix%P\0" \
| xargs -0 bash ${cleanup} "$rootPath" "$newGenFiles"
}
cleanOldGen
if [[ ! -v oldGenPath || "$oldGenPath" != "$newGenPath" ]] ; then
_i "Creating profile generation %s" $newGenNum
if [[ -e "$genProfilePath"/manifest.json ]] ; then
# Remove all packages from "$genProfilePath"
# `nix profile remove '.*' --profile "$genProfilePath"` was not working, so here is a workaround:
nix profile list --profile "$genProfilePath" \
| cut -d ' ' -f 4 \
| xargs -t $DRY_RUN_CMD nix profile remove $VERBOSE_ARG --profile "$genProfilePath"
$DRY_RUN_CMD nix profile install $VERBOSE_ARG --profile "$genProfilePath" "$newGenPath"
else
$DRY_RUN_CMD nix-env $VERBOSE_ARG --profile "$genProfilePath" --set "$newGenPath"
fi
$DRY_RUN_CMD nix-store --realise "$newGenPath" --add-root "$newGenGcPath" > "$DRY_RUN_NULL"
if [[ -e "$legacyGenGcPath" ]]; then
$DRY_RUN_CMD rm $VERBOSE_ARG "$legacyGenGcPath"
fi
echo "Creating profile generation $newGenNum"
$DRY_RUN_CMD nix-env $VERBOSE_ARG --profile "$genProfilePath" --set "$newGenPath"
$DRY_RUN_CMD ln -Tsf $VERBOSE_ARG "$newGenPath" "$newGenGcPath"
else
_i "No change so reusing latest profile generation %s" "$oldGenNum"
echo "No change so reusing latest profile generation $oldGenNum"
fi
linkNewGen
@@ -312,13 +310,8 @@ in
home.activation.onFilesChange = hm.dag.entryAfter ["linkGeneration"] (
concatMapStrings (v: ''
if (( ''${changedFiles[${escapeShellArg v.target}]} == 1 )); then
if [[ -v DRY_RUN || -v VERBOSE ]]; then
echo "Running onChange hook for" ${escapeShellArg v.target}
fi
if [[ ! -v DRY_RUN ]]; then
${v.onChange}
fi
if [[ ''${changedFiles[${escapeShellArg v.target}]} -eq 1 ]]; then
${v.onChange}
fi
'') (filter (v: v.onChange != "") (attrValues cfg))
);

View File

@@ -4,8 +4,6 @@ with lib;
let
inherit (config.home) stateVersion;
cfg = config.home;
languageSubModule = types.submodule {
@@ -117,7 +115,7 @@ let
if versionAtLeast config.home.stateVersion "19.09"
then null
else "us";
defaultText = literalExpression "null";
defaultText = literalExample "null";
description = ''
Keyboard layout. If <literal>null</literal>, then the system
configuration will be used.
@@ -151,7 +149,7 @@ let
if versionAtLeast config.home.stateVersion "19.09"
then null
else "";
defaultText = literalExpression "null";
defaultText = literalExample "null";
example = "colemak";
description = ''
X keyboard variant. If <literal>null</literal>, then the
@@ -184,7 +182,7 @@ in
options = {
home.username = mkOption {
type = types.str;
defaultText = literalExpression ''
defaultText = literalExample ''
"$USER" for state version < 20.09,
undefined for state version 20.09
'';
@@ -194,7 +192,7 @@ in
home.homeDirectory = mkOption {
type = types.path;
defaultText = literalExpression ''
defaultText = literalExample ''
"$HOME" for state version < 20.09,
undefined for state version 20.09
'';
@@ -205,13 +203,12 @@ in
home.profileDirectory = mkOption {
type = types.path;
defaultText = literalExpression ''
"''${home.homeDirectory}/.nix-profile" or
"/etc/profiles/per-user/''${home.username}"
'';
defaultText = "~/.nix-profile";
internal = true;
readOnly = true;
description = ''
The profile directory where Home Manager generations are installed.
The profile directory where Home Manager generations are
installed.
'';
};
@@ -223,40 +220,16 @@ in
home.keyboard = mkOption {
type = types.nullOr keyboardSubModule;
default = if versionAtLeast stateVersion "21.11" then null else { };
defaultText = literalExpression ''
"{ }" for state version < 21.11,
"null" for state version 21.11
'';
default = {};
description = ''
Keyboard configuration. Set to <literal>null</literal> to
disable Home Manager keyboard management.
'';
};
home.shellAliases = mkOption {
type = with types; attrsOf str;
default = { };
example = literalExpression ''
{
g = "git";
"..." = "cd ../..";
}
'';
description = ''
An attribute set that maps aliases (the top level attribute names
in this option) to command strings or directly to build outputs.
</para><para>
This option should only be used to manage simple aliases that are
compatible across all shells. If you need to use a shell specific
feature then make sure to use a shell specific option, for example
<xref linkend="opt-programs.bash.shellAliases"/> for Bash.
'';
};
home.sessionVariables = mkOption {
default = {};
type = with types; lazyAttrsOf (oneOf [ str path int float ]);
type = types.attrs;
example = { EDITOR = "emacs"; GS_OPTIONS = "-sPAPERSIZE=a4"; };
description = ''
Environment variables to always set at login.
@@ -291,34 +264,15 @@ in
'';
};
home.sessionVariablesPackage = mkOption {
type = types.package;
internal = true;
description = ''
The package containing the
<filename>hm-session-vars.sh</filename> file.
'';
};
home.sessionPath = mkOption {
type = with types; listOf str;
default = [ ];
example = [
"$HOME/.local/bin"
"\${xdg.configHome}/emacs/bin"
".git/safe/../../bin"
"\${xdg.configHome}/emacs/bin"
"~/.local/bin"
];
description = ''
Extra directories to add to <envar>PATH</envar>.
</para><para>
These directories are added to the <envar>PATH</envar> variable in a
double-quoted context, so expressions like <code>$HOME</code> are
expanded by the shell. However, since expressions like <code>~</code> or
<code>*</code> are escaped, they will end up in the <envar>PATH</envar>
verbatim.
'';
description = "Extra directories to add to <envar>PATH</envar>.";
};
home.sessionVariablesExtra = mkOption {
@@ -355,25 +309,19 @@ in
home.emptyActivationPath = mkOption {
internal = true;
default = false;
type = types.bool;
default = versionAtLeast stateVersion "22.11";
defaultText = literalExpression ''
false for state version < 22.11,
true for state version 22.11
'';
description = ''
Whether the activation script should start with an empty
<envar>PATH</envar> variable. When <literal>false</literal> then the
user's <envar>PATH</envar> will be accessible in the script. It is
recommended to keep this at <literal>true</literal> to avoid
uncontrolled use of tools found in PATH.
<envar>PATH</envar> variable. When <literal>false</literal>
then the user's <envar>PATH</envar> will be used.
'';
};
home.activation = mkOption {
type = hm.types.dagOf types.str;
default = {};
example = literalExpression ''
example = literalExample ''
{
myActivationAction = lib.hm.dag.entryAfter ["writeBoundary"] '''
$DRY_RUN_CMD ln -s $VERBOSE_ARG \
@@ -398,7 +346,7 @@ in
unexpected state is found. For example, the
<literal>checkLinkTargets</literal> script block checks for
collisions between non-managed files and files defined in
<xref linkend="opt-home.file"/>.
<varname><link linkend="opt-home.file">home.file</link></varname>.
</para><para>
@@ -455,7 +403,7 @@ in
home.enableNixpkgsReleaseCheck = mkOption {
type = types.bool;
default = false; # Temporarily disabled until release stabilizes.
default = true;
description = ''
Determines whether to check for release version mismatch between Home
Manager and Nixpkgs. Using mismatched versions is likely to cause errors
@@ -517,14 +465,8 @@ in
if config.submoduleSupport.enable
&& config.submoduleSupport.externalPackageInstall
then "/etc/profiles/per-user/${cfg.username}"
else if config.nix.enable && (config.nix.settings.use-xdg-base-directories or false)
then "${config.xdg.stateHome}/nix/profile"
else cfg.homeDirectory + "/.nix-profile";
programs.bash.shellAliases = cfg.shellAliases;
programs.zsh.shellAliases = cfg.shellAliases;
programs.fish.shellAliases = cfg.shellAliases;
home.sessionVariables =
let
maybeSet = n: v: optionalAttrs (v != null) { ${n} = v; };
@@ -553,22 +495,24 @@ in
//
(maybeSet "LC_MEASUREMENT" cfg.language.measurement);
# Provide a file holding all session variables.
home.sessionVariablesPackage = pkgs.writeTextFile {
name = "hm-session-vars.sh";
destination = "/etc/profile.d/hm-session-vars.sh";
text = ''
# Only source this once.
if [ -n "$__HM_SESS_VARS_SOURCED" ]; then return; fi
export __HM_SESS_VARS_SOURCED=1
home.packages = [
# Provide a file holding all session variables.
(
pkgs.writeTextFile {
name = "hm-session-vars.sh";
destination = "/etc/profile.d/hm-session-vars.sh";
text = ''
# Only source this once.
if [ -n "$__HM_SESS_VARS_SOURCED" ]; then return; fi
export __HM_SESS_VARS_SOURCED=1
${config.lib.shell.exportAll cfg.sessionVariables}
'' + lib.optionalString (cfg.sessionPath != [ ]) ''
export PATH="$PATH''${PATH:+:}${concatStringsSep ":" cfg.sessionPath}"
'' + cfg.sessionVariablesExtra;
};
home.packages = [ config.home.sessionVariablesPackage ];
${config.lib.shell.exportAll cfg.sessionVariables}
'' + lib.optionalString (cfg.sessionPath != [ ]) ''
export PATH="$PATH''${PATH:+:}${concatStringsSep ":" cfg.sessionPath}"
'' + cfg.sessionVariablesExtra;
}
)
];
# A dummy entry acting as a boundary between the activation
# script's "check" and the "write" phases.
@@ -593,78 +537,37 @@ in
if config.submoduleSupport.externalPackageInstall
then
''
if [[ -e $HOME/.nix-profile/manifest.json ]] ; then
nix profile list \
| { grep 'home-manager-path$' || test $? = 1; } \
| cut -d ' ' -f 4 \
| xargs -t $DRY_RUN_CMD nix profile remove $VERBOSE_ARG
else
if nix-env -q | grep '^home-manager-path$'; then
$DRY_RUN_CMD nix-env -e home-manager-path
fi
if nix-env -q | grep '^home-manager-path$'; then
$DRY_RUN_CMD nix-env -e home-manager-path
fi
''
else
''
function nixReplaceProfile() {
local oldNix="$(command -v nix)"
if ! $DRY_RUN_CMD nix-env -i ${cfg.path} ; then
cat <<EOF
nix profile list \
| { grep 'home-manager-path$' || test $? = 1; } \
| cut -d ' ' -f 4 \
| xargs -t $DRY_RUN_CMD nix profile remove $VERBOSE_ARG
Oops, nix-env failed to install your new Home Manager profile!
$DRY_RUN_CMD $oldNix profile install $1
}
Perhaps there is a conflict with a package that was installed using
'nix-env -i'? Try running
if [[ -e $HOME/.nix-profile/manifest.json ]] ; then
INSTALL_CMD="nix profile install"
INSTALL_CMD_ACTUAL="nixReplaceProfile"
LIST_CMD="nix profile list"
REMOVE_CMD_SYNTAX='nix profile remove {number | store path}'
else
INSTALL_CMD="nix-env -i"
INSTALL_CMD_ACTUAL="$DRY_RUN_CMD nix-env -i"
LIST_CMD="nix-env -q"
REMOVE_CMD_SYNTAX='nix-env -e {package name}'
fi
nix-env -q
if ! $INSTALL_CMD_ACTUAL ${cfg.path} ; then
echo
_iError $'Oops, Nix failed to install your new Home Manager profile!\n\nPerhaps there is a conflict with a package that was installed using\n"%s"? Try running\n\n %s\n\nand if there is a conflicting package you can remove it with\n\n %s\n\nThen try activating your Home Manager configuration again.' "$INSTALL_CMD" "$LIST_CMD" "$REMOVE_CMD_SYNTAX"
and if there is a conflicting package you can remove it with
nix-env -e {package name}
Then try activating your Home Manager configuration again.
EOF
exit 1
fi
unset -f nixReplaceProfile
unset INSTALL_CMD INSTALL_CMD_ACTUAL LIST_CMD REMOVE_CMD_SYNTAX
''
);
# Text containing Bash commands that will initialize the Home Manager Bash
# library. Most importantly, this will prepare for using translated strings
# in the `hm-modules` text domain.
lib.bash.initHomeManagerLib =
let
domainDir = pkgs.runCommand "hm-modules-messages" {
nativeBuildInputs = [ pkgs.buildPackages.gettext ];
} ''
for path in ${./po}/*.po; do
lang="''${path##*/}"
lang="''${lang%%.*}"
mkdir -p "$out/$lang/LC_MESSAGES"
msgfmt -o "$out/$lang/LC_MESSAGES/hm-modules.mo" "$path"
done
'';
in
''
export TEXTDOMAIN=hm-modules
export TEXTDOMAINDIR=${domainDir}
source ${../lib/bash/home-manager.sh}
'';
home.activationPackage =
let
mkCmd = res: ''
_iNote "Activating %s" "${res.name}"
noteEcho Activating ${res.name}
${res.data}
'';
sortedCommands = hm.dag.topoSort cfg.activation;
@@ -678,25 +581,15 @@ in
# Programs that always should be available on the activation
# script's PATH.
activationBinPaths = lib.makeBinPath (
with pkgs; [
bash
coreutils
diffutils # For `cmp` and `diff`.
findutils
gettext
gnugrep
gnused
ncurses # For `tput`.
]
++ config.home.extraActivationPath
)
+ (
# Add path of the Nix binaries, if a Nix package is configured, then
# use that one, otherwise grab the path of the nix-env tool.
if config.nix.enable && config.nix.package != null then
":${config.nix.package}/bin"
else
":$(${pkgs.coreutils}/bin/dirname $(${pkgs.coreutils}/bin/readlink -m $(type -p nix-env)))"
[
pkgs.bash
pkgs.coreutils
pkgs.diffutils # For `cmp` and `diff`.
pkgs.findutils
pkgs.gnugrep
pkgs.gnused
pkgs.ncurses # For `tput`.
] ++ config.home.extraActivationPath
)
+ optionalString (!cfg.emptyActivationPath) "\${PATH:+:}$PATH";
@@ -707,13 +600,11 @@ in
cd $HOME
export PATH="${activationBinPaths}"
${config.lib.bash.initHomeManagerLib}
. ${./lib-bash/color-echo.sh}
${builtins.readFile ./lib-bash/activation-init.sh}
checkUsername ${escapeShellArg config.home.username}
checkHomeDirectory ${escapeShellArg config.home.homeDirectory}
${activationCmds}
'';
in
@@ -721,17 +612,23 @@ in
"home-manager-generation"
{
preferLocalBuild = true;
allowSubstitutes = false;
}
''
mkdir -p $out
echo "${config.home.version.full}" > $out/hm-version
cp ${activationScript} $out/activate
mkdir $out/bin
ln -s $out/activate $out/bin/home-manager-generation
# The generation directory layout version.
#
# - Version 0 (also implied when file is missing) means
# "legacy layout".
# - Version 1 adds full home file paths.
echo 0 > $out/version
substituteInPlace $out/activate \
--subst-var-by GENERATION_DIR $out

View File

@@ -22,7 +22,8 @@ let
'';
in {
imports = [ ./fcitx5.nix ./hime.nix ./kime.nix ./nabi.nix ./uim.nix ];
imports =
[ ./fcitx.nix ./fcitx5.nix ./hime.nix ./kime.nix ./nabi.nix ./uim.nix ];
options.i18n = {
inputMethod = {
@@ -30,7 +31,7 @@ in {
type = types.nullOr
(types.enum [ "fcitx" "fcitx5" "nabi" "uim" "hime" "kime" ]);
default = null;
example = "fcitx5";
example = "fcitx";
description = ''
Select the enabled input method. Input methods is a software to input
symbols that are not available on standard input devices.
@@ -41,10 +42,17 @@ in {
Currently the following input methods are available in Home Manager:
<variablelist>
<varlistentry>
<term><literal>fcitx</literal></term>
<listitem><para>
A customizable lightweight input method
extra input engines can be added using
<literal>i18n.inputMethod.fcitx.engines</literal>.
</para></listitem>
</varlistentry>
<varlistentry>
<term><literal>fcitx5</literal></term>
<listitem><para>
A customizable lightweight input method.
The next generation of fcitx,
addons (including engines, dictionaries, skins) can be added using
<literal>i18n.inputMethod.fcitx5.addons</literal>.
@@ -89,10 +97,6 @@ in {
config = mkIf (cfg.enabled != null) {
assertions = [
(hm.assertions.assertPlatform "i18n.inputMethod" pkgs platforms.linux)
{
assertion = cfg.enabled != "fcitx";
message = "fcitx has been removed, please use fcitx5 instead";
}
];
home.packages = [ cfg.package gtk2Cache gtk3Cache ];

View File

@@ -0,0 +1,50 @@
{ config, pkgs, lib, ... }:
with lib;
let
cfg = config.i18n.inputMethod.fcitx;
fcitxPackage = pkgs.fcitx.override { plugins = cfg.engines; };
fcitxEngine = types.package // {
name = "fcitx-engine";
check = x:
types.package.check x && attrByPath [ "meta" "isFcitxEngine" ] false x;
};
in {
options = {
i18n.inputMethod.fcitx = {
engines = mkOption {
type = with types; listOf fcitxEngine;
default = [ ];
example = literalExample "with pkgs.fcitx-engines; [ mozc hangul ]";
description = let
enginesDrv = filterAttrs (const isDerivation) pkgs.fcitx-engines;
engines = concatStringsSep ", "
(map (name: "<literal>${name}</literal>") (attrNames enginesDrv));
in "Enabled Fcitx engines. Available engines are: ${engines}.";
};
};
};
config = mkIf (config.i18n.inputMethod.enabled == "fcitx") {
i18n.inputMethod.package = fcitxPackage;
home.sessionVariables = {
GTK_IM_MODULE = "fcitx";
QT_IM_MODULE = "fcitx";
XMODIFIERS = "@im=fcitx";
};
systemd.user.services.fcitx-daemon = {
Unit = {
Description = "Fcitx input method editor";
PartOf = [ "graphical-session.desktop" ];
};
Service.ExecStart = "${fcitxPackage}/bin/fcitx";
Install.WantedBy = [ "graphical-session.target" ];
};
};
}

View File

@@ -12,7 +12,7 @@ in {
addons = mkOption {
type = with types; listOf package;
default = [ ];
example = literalExpression "with pkgs; [ fcitx5-rime ]";
example = literalExample "with pkgs; [ fcitx5-rime ]";
description = ''
Enabled Fcitx5 addons.
'';
@@ -24,7 +24,6 @@ in {
i18n.inputMethod.package = fcitx5Package;
home.sessionVariables = {
GLFW_IM_MODULE = "ibus"; # IME support in kitty
GTK_IM_MODULE = "fcitx";
QT_IM_MODULE = "fcitx";
XMODIFIERS = "@im=fcitx";

View File

@@ -9,7 +9,7 @@ in {
config = mkOption {
type = yamlFormat.type;
default = { };
example = literalExpression ''
example = literalExample ''
{
daemon = {
modules = ["Xim" "Indicator"];
@@ -48,12 +48,11 @@ in {
replaceStrings [ "\\\\" ] [ "\\" ] (builtins.toJSON cfg.config);
systemd.user.services.kime-daemon = {
Unit = {
Description = "Kime input method editor";
PartOf = [ "graphical-session.target" ];
};
Unit = { Description = "Kime input method editor"; };
PartOf = [ "graphical-session.target" ];
Service.ExecStart = "${pkgs.kime}/bin/kime";
Install.WantedBy = [ "graphical-session.target" ];
};
};
}

View File

@@ -1,215 +0,0 @@
{ 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 /bin/launchctl bootout "$domain/$agentName" || err=$?
if [[ -v DRY_RUN ]]; then
break
fi
if (( err != 9216 )) &&
! /bin/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 /bin/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 /bin/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
'';
})
];
}

View File

@@ -1,902 +0,0 @@
# launchd option type from nix-darwin
#
# Original Source:
# https://github.com/LnL7/nix-darwin/blob/14a12e9/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;
{
freeformType = with types; attrsOf anything; # added by Home Manager
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 running
system. If you wish to know whether a job is loaded in launchd, reading this key from a configuration
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 necessarily
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 criteria
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.hostname
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.hostname
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 invocation.
'';
};
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.
'';
};
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.
'';
};
AfterInitialDemand = mkOption {
type = types.nullOr types.bool;
default = null;
};
};
}));
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 dictionary
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 (HardResourceLimits)
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 (HardResourceLimits)
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. Interactive
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. Setting
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 bootstrap_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.
'';
};
};
});
};
LaunchEvents = mkOption {
type = types.nullOr (types.attrs);
default = null;
description = ''
Specifies higher-level event types to be used as launch-on-demand event
sources. Each sub-dictionary defines events for a particular event
subsystem, such as "com.apple.iokit.matching", which can be used to
launch jobs based on the appearance of nodes in the IORegistry. Each
dictionary within the sub-dictionary specifies an event descriptor that
is specified to each event subsystem. With this key, the job promises to
use the xpc_set_event_stream_handler(3) API to consume events. See
xpc_events(3) for more details on event sources.
'';
example = {
"com.apple.iokit.matching" = {
"com.apple.usb.device" = {
IOMatchLaunchStream = true;
IOProviderClass = "IOUSBDevice";
idProduct = "*";
idVendor = "*";
};
};
};
};
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 application
developer to use to differentiate which descriptors correspond to which application level protocols
(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 inherited
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 SockServiceName.
'';
};
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 SockFamily
family also be set, otherwise the results are undefined.
'';
};
};
}));
};
};
config = { };
}

View File

@@ -1,149 +1,92 @@
# Moves the existing profile from /nix or $XDG_STATE_HOME/home-manager to
# $XDG_STATE_HOME/nix to match changed behavior in Nix 2.14. See
# https://github.com/NixOS/nix/pull/5226.
function migrateProfile() {
declare -r stateHome="${XDG_STATE_HOME:-$HOME/.local/state}"
declare -r userNixStateDir="$stateHome/nix"
declare -r hmStateDir="$stateHome/home-manager"
declare -r globalNixStateDir="${NIX_STATE_DIR:-/nix/var/nix}"
declare -r globalProfilesDir="$globalNixStateDir/profiles/per-user/$USER"
if [[ -e $globalProfilesDir/home-manager ]]; then
declare -r oldProfilesDir="$globalProfilesDir"
elif [[ -e $hmStateDir/profiles/home-manager ]]; then
declare -r oldProfilesDir="$hmStateDir/profiles"
fi
declare -r newProfilesDir="$userNixStateDir/profiles"
if [[ -v oldProfilesDir && -e $newProfilesDir ]]; then
if [[ ! -e $newProfilesDir/home-manager ]]; then
_i 'Migrating profile from %s to %s' "$oldProfilesDir" "$newProfilesDir"
for p in "$oldProfilesDir"/home-manager-*; do
declare name="${p##*/}"
nix-store --realise "$p" --add-root "$newProfilesDir/$name" > /dev/null
done
cp -P "$oldProfilesDir/home-manager" "$newProfilesDir"
fi
rm "$oldProfilesDir/home-manager" "$oldProfilesDir"/home-manager-*
fi
}
#!/usr/bin/env bash
function setupVars() {
declare -r stateHome="${XDG_STATE_HOME:-$HOME/.local/state}"
declare -r userNixStateDir="$stateHome/nix"
declare -r hmGcrootsDir="$stateHome/home-manager/gcroots"
local nixStateDir="${NIX_STATE_DIR:-/nix/var/nix}"
local profilesPath="$nixStateDir/profiles/per-user/$USER"
local gcPath="$nixStateDir/gcroots/per-user/$USER"
declare -r globalNixStateDir="${NIX_STATE_DIR:-/nix/var/nix}"
declare -r globalProfilesDir="$globalNixStateDir/profiles/per-user/$USER"
declare -r globalGcrootsDir="$globalNixStateDir/gcroots/per-user/$USER"
# If the user Nix profiles path exists, then place the HM profile there.
# Otherwise, if the global Nix per-user state directory exists then use
# that. If neither exists, then we give up.
#
# shellcheck disable=2174
if [[ -d $userNixStateDir/profiles ]]; then
declare -r profilesDir="$userNixStateDir/profiles"
elif [[ -d $globalProfilesDir ]]; then
declare -r profilesDir="$globalProfilesDir"
else
_iError 'Could not find suitable profile directory, tried %s and %s' \
"$userNixStateDir/profiles" "$globalProfilesDir" >&2
exit 1
fi
declare -gr genProfilePath="$profilesDir/home-manager"
declare -gr genProfilePath="$profilesPath/home-manager"
declare -gr newGenPath="@GENERATION_DIR@";
declare -gr newGenGcPath="$hmGcrootsDir/current-home"
declare -gr legacyGenGcPath="$globalGcrootsDir/current-home"
declare -gr newGenGcPath="$gcPath/current-home"
declare greatestGenNum
declare -g newGenLayoutVersion
if [[ -f $newGenPath/version ]]; then
newGenLayoutVersion=$(< "$newGenPath/version")
else
newGenLayoutVersion=0
fi
readonly newGenLayoutVersion
local greatestGenNum
greatestGenNum=$( \
nix-env --list-generations --profile "$genProfilePath" \
| tail -1 \
| sed -E 's/ *([[:digit:]]+) .*/\1/')
if [[ -n $greatestGenNum ]] ; then
declare -gr oldGenNum=$greatestGenNum
declare -gr newGenNum=$((oldGenNum + 1))
oldGenNum=$greatestGenNum
newGenNum=$((oldGenNum + 1))
else
declare -gr newGenNum=1
newGenNum=1
fi
if [[ -e $genProfilePath ]] ; then
declare -g oldGenPath
oldGenPath="$(readlink -e "$genProfilePath")"
if [[ -e $profilesPath/home-manager ]] ; then
declare -g oldGenPath oldGenLayoutVersion
oldGenPath="$(readlink -e "$profilesPath/home-manager")"
if [[ -f $oldGenPath/version ]]; then
oldGenLayoutVersion=$(< "$oldGenPath/version")
else
oldGenLayoutVersion=0
fi
readonly oldGenPath oldGenLayoutVersion
fi
$VERBOSE_RUN _i "Sanity checking oldGenNum and oldGenPath"
$VERBOSE_ECHO "Sanity checking oldGenNum and oldGenPath"
if [[ -v oldGenNum && ! -v oldGenPath
|| ! -v oldGenNum && -v oldGenPath ]]; then
_i $'The previous generation number and path are in conflict! These\nmust be either both empty or both set but are now set to\n\n \'%s\' and \'%s\'\n\nIf you don\'t mind losing previous profile generations then\nthe easiest solution is probably to run\n\n rm %s/home-manager*\n rm %s/current-home\n\nand trying home-manager switch again. Good luck!' \
"${oldGenNum:-}" "${oldGenPath:-}" \
"$profilesDir" "$hmGcrootsDir"
errorEcho "Invalid profile number and current profile values! These"
errorEcho "must be either both empty or both set but are now set to"
errorEcho " '${oldGenNum:-}' and '${oldGenPath:-}'"
errorEcho "If you don't mind losing previous profile generations then"
errorEcho "the easiest solution is probably to run"
errorEcho " rm $profilesPath/home-manager*"
errorEcho " rm $gcPath/current-home"
errorEcho "and trying home-manager switch again. Good luck!"
exit 1
fi
}
function checkUsername() {
local expectedUser="$1"
if [[ "$USER" != "$expectedUser" ]]; then
_iError 'Error: USER is set to "%s" but we expect "%s"' "$USER" "$expectedUser"
exit 1
fi
}
function checkHomeDirectory() {
local expectedHome="$1"
if ! [[ $HOME -ef $expectedHome ]]; then
_iError 'Error: HOME is set to "%s" but we expect "%s"' "$HOME" "$expectedHome"
exit 1
fi
}
if [[ -v VERBOSE ]]; then
export VERBOSE_ECHO=echo
export VERBOSE_ARG="--verbose"
export VERBOSE_RUN=""
else
export VERBOSE_ECHO=true
export VERBOSE_ARG=""
export VERBOSE_RUN=true
fi
_i "Starting Home Manager activation"
echo "Starting home manager activation"
# Verify that we can connect to the Nix store and/or daemon. This will
# also create the necessary directories in profiles and gcroots.
$VERBOSE_RUN _i "Sanity checking Nix"
$VERBOSE_ECHO "Sanity checking Nix"
nix-build --expr '{}' --no-out-link
# Also make sure that the Nix profiles path is created.
nix-env -q > /dev/null 2>&1 || true
migrateProfile
setupVars
if [[ -v DRY_RUN ]] ; then
_i "This is a dry run"
echo "This is a dry run"
export DRY_RUN_CMD=echo
export DRY_RUN_NULL=/dev/stdout
else
$VERBOSE_RUN _i "This is a live run"
$VERBOSE_ECHO "This is a live run"
export DRY_RUN_CMD=""
export DRY_RUN_NULL=/dev/null
fi
if [[ -v VERBOSE ]]; then
_i 'Using Nix version: %s' "$(nix-env --version)"
echo -n "Using Nix version: "
nix-env --version
fi
$VERBOSE_RUN _i "Activation variables:"
$VERBOSE_ECHO "Activation variables:"
if [[ -v oldGenNum ]] ; then
$VERBOSE_ECHO " oldGenNum=$oldGenNum"
$VERBOSE_ECHO " oldGenPath=$oldGenPath"
@@ -153,6 +96,5 @@ else
fi
$VERBOSE_ECHO " newGenPath=$newGenPath"
$VERBOSE_ECHO " newGenNum=$newGenNum"
$VERBOSE_ECHO " genProfilePath=$genProfilePath"
$VERBOSE_ECHO " newGenGcPath=$newGenGcPath"
$VERBOSE_ECHO " legacyGenGcPath=$legacyGenGcPath"
$VERBOSE_ECHO " genProfilePath=$genProfilePath"

View File

@@ -0,0 +1,39 @@
# The check for terminal output and color support is heavily inspired
# by https://unix.stackexchange.com/a/10065.
#
# Allow opt out by respecting the `NO_COLOR` environment variable.
function setupColors() {
normalColor=""
errorColor=""
warnColor=""
noteColor=""
# Enable colors for terminals, and allow opting out.
if [[ ! -v NO_COLOR && -t 1 ]]; then
# See if it supports colors.
local ncolors
ncolors=$(tput colors)
if [[ -n "$ncolors" && "$ncolors" -ge 8 ]]; then
normalColor="$(tput sgr0)"
errorColor="$(tput bold)$(tput setaf 1)"
warnColor="$(tput setaf 3)"
noteColor="$(tput bold)$(tput setaf 6)"
fi
fi
}
setupColors
function errorEcho() {
echo "${errorColor}$*${normalColor}"
}
function warnEcho() {
echo "${warnColor}$*${normalColor}"
}
function noteEcho() {
echo "${noteColor}$*${normalColor}"
}

View File

@@ -1,5 +0,0 @@
{ 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";
}

View File

@@ -4,38 +4,40 @@
#
# - not specific to strings, i.e., any payload is OK,
#
# - the addition of the function `entryBefore` indicating a "wanted
# by" relationship.
# - the addition of the function `dagEntryBefore` indicating a
# "wanted by" relationship.
{ lib }:
let inherit (lib) all filterAttrs head hm mapAttrs length tail toposort;
in {
empty = { };
with lib;
rec {
emptyDag = { };
isEntry = e: e ? data && e ? after && e ? before;
isDag = dag:
builtins.isAttrs dag && all hm.dag.isEntry (builtins.attrValues dag);
let isEntry = e: (e ? data) && (e ? after) && (e ? before);
in builtins.isAttrs dag && all (x: x) (mapAttrsToList (n: isEntry) dag);
# Takes an attribute set containing entries built by entryAnywhere,
# entryAfter, and entryBefore to a topologically sorted list of
# entries.
# Takes an attribute set containing entries built by
# dagEntryAnywhere, dagEntryAfter, and dagEntryBefore to a
# topologically sorted list of entries.
#
# Internally this function uses the `toposort` function in
# `<nixpkgs/lib/lists.nix>` and its value is accordingly.
#
# Specifically, the result on success is
#
# { result = [ { name = ?; data = ?; } … ] }
# { result = [{name = ?; data = ?;} …] }
#
# For example
#
# nix-repl> topoSort {
# a = entryAnywhere "1";
# b = entryAfter [ "a" "c" ] "2";
# c = entryBefore [ "d" ] "3";
# d = entryBefore [ "e" ] "4";
# e = entryAnywhere "5";
# nix-repl> dagTopoSort {
# a = dagEntryAnywhere "1";
# b = dagEntryAfter ["a" "c"] "2";
# c = dagEntryBefore ["d"] "3";
# d = dagEntryBefore ["e"] "4";
# e = dagEntryAnywhere "5";
# } == {
# result = [
# { data = "1"; name = "a"; }
@@ -50,80 +52,66 @@ in {
# And the result on error is
#
# {
# cycle = [ { after = ?; name = ?; data = ? } … ];
# loops = [ { after = ?; name = ?; data = ? } … ];
# cycle = [ {after = ?; name = ?; data = ?} … ];
# loops = [ {after = ?; name = ?; data = ?} … ];
# }
#
# For example
#
# nix-repl> topoSort {
# a = entryAnywhere "1";
# b = entryAfter [ "a" "c" ] "2";
# c = entryAfter [ "d" ] "3";
# d = entryAfter [ "b" ] "4";
# e = entryAnywhere "5";
# nix-repl> dagTopoSort {
# a = dagEntryAnywhere "1";
# b = dagEntryAfter ["a" "c"] "2";
# c = dagEntryAfter ["d"] "3";
# d = dagEntryAfter ["b"] "4";
# e = dagEntryAnywhere "5";
# } == {
# cycle = [
# { after = [ "a" "c" ]; data = "2"; name = "b"; }
# { after = [ "d" ]; data = "3"; name = "c"; }
# { after = [ "b" ]; data = "4"; name = "d"; }
# { after = ["a" "c"]; data = "2"; name = "b"; }
# { after = ["d"]; data = "3"; name = "c"; }
# { after = ["b"]; data = "4"; name = "d"; }
# ];
# loops = [
# { after = [ "a" "c" ]; data = "2"; name = "b"; }
# { after = ["a" "c"]; data = "2"; name = "b"; }
# ];
# }
# } == {}
# true
topoSort = dag:
dagTopoSort = dag:
let
dagBefore = dag: name:
builtins.attrNames
(filterAttrs (n: v: builtins.elem name v.before) dag);
mapAttrsToList (n: v: n)
(filterAttrs (n: v: any (a: a == name) v.before) dag);
normalizedDag = mapAttrs (n: v: {
name = n;
data = v.data;
after = v.after ++ dagBefore dag n;
}) dag;
before = a: b: builtins.elem a.name b.after;
sorted = toposort before (builtins.attrValues normalizedDag);
before = a: b: any (c: a.name == c) b.after;
sorted = toposort before (mapAttrsToList (n: v: v) normalizedDag);
in if sorted ? result then {
result = map (v: { inherit (v) name data; }) sorted.result;
} else
sorted;
# Applies a function to each element of the given DAG.
map = f: mapAttrs (n: v: v // { data = f n v.data; });
entryBetween = before: after: data: { inherit data before after; };
dagMap = f: dag: mapAttrs (n: v: v // { data = f n v.data; }) dag;
# Create a DAG entry with no particular dependency information.
entryAnywhere = hm.dag.entryBetween [ ] [ ];
dagEntryAnywhere = data: {
inherit data;
before = [ ];
after = [ ];
};
entryAfter = hm.dag.entryBetween [ ];
entryBefore = before: hm.dag.entryBetween before [ ];
dagEntryBetween = before: after: data: { inherit data before after; };
# Given a list of entries, this function places them in order within the DAG.
# Each entry is labeled "${tag}-${entry index}" and other DAG entries can be
# added with 'before' or 'after' referring these indexed entries.
#
# The entries as a whole can be given a relation to other DAG nodes. All
# generated nodes are then placed before or after those dependencies.
entriesBetween = tag:
let
go = i: before: after: entries:
let
name = "${tag}-${toString i}";
i' = i + 1;
in if entries == [ ] then
hm.dag.empty
else if length entries == 1 then {
"${name}" = hm.dag.entryBetween before after (head entries);
} else
{
"${name}" = hm.dag.entryAfter after (head entries);
} // go (i + 1) before [ name ] (tail entries);
in go 0;
dagEntryAfter = after: data: {
inherit data after;
before = [ ];
};
dagEntryBefore = before: data: {
inherit data before;
after = [ ];
};
entriesAnywhere = tag: hm.dag.entriesBetween tag [ ] [ ];
entriesAfter = tag: hm.dag.entriesBetween tag [ ];
entriesBefore = tag: before: hm.dag.entriesBetween tag before [ ];
}

View File

@@ -1,16 +1,27 @@
{ lib }:
rec {
dag = import ./dag.nix { inherit lib; };
dag =
let
d = import ./dag.nix { inherit lib; };
in
{
empty = d.emptyDag;
isDag = d.isDag;
topoSort = d.dagTopoSort;
map = d.dagMap;
entryAnywhere = d.dagEntryAnywhere;
entryBetween = d.dagEntryBetween;
entryAfter = d.dagEntryAfter;
entryBefore = d.dagEntryBefore;
};
assertions = import ./assertions.nix { inherit lib; };
booleans = import ./booleans.nix { inherit lib; };
generators = import ./generators.nix { inherit lib; };
gvariant = import ./gvariant.nix { inherit lib; };
maintainers = import ./maintainers.nix;
strings = import ./strings.nix { inherit lib; };
types = import ./types.nix { inherit gvariant lib; };
types = import ./types.nix { inherit dag gvariant lib; };
shell = import ./shell.nix { inherit lib; };
zsh = import ./zsh.nix { inherit lib; };

View File

@@ -1,8 +1,7 @@
{ homeDirectory, lib, pkgs }:
let
inherit (lib) hasPrefix hm literalExpression mkDefault mkIf mkOption removePrefix types;
in
with lib;
{
# Constructs a type suitable for a `home.file` like option. The
# target path may be either absolute or relative, in which case it
@@ -10,20 +9,11 @@ in
# absolute path).
#
# Arguments:
# - opt the name of the option, for self-references
# - basePathDesc docbook compatible description of the base path
# - basePath the file base path
fileType = opt: basePathDesc: basePath: types.attrsOf (types.submodule (
fileType = basePathDesc: basePath: types.attrsOf (types.submodule (
{ name, config, ... }: {
options = {
enable = mkOption {
type = types.bool;
default = true;
description = ''
Whether this file should be generated. This option allows specific
files to be disabled.
'';
};
target = mkOption {
type = types.str;
apply = p:
@@ -31,7 +21,7 @@ in
absPath = if hasPrefix "/" p then p else "${basePath}/${p}";
in
removePrefix (homeDirectory + "/") absPath;
defaultText = literalExpression "name";
defaultText = literalExample "<name>";
description = ''
Path to target file relative to ${basePathDesc}.
'';
@@ -42,7 +32,7 @@ in
type = types.nullOr types.lines;
description = ''
Text of the file. If this option is null then
<xref linkend="opt-${opt}._name_.source"/>
<link linkend="opt-home.file._name_.source">home.file.&lt;name?&gt;.source</link>
must be set.
'';
};
@@ -51,7 +41,7 @@ in
type = types.path;
description = ''
Path of the source file or directory. If
<xref linkend="opt-${opt}._name_.text"/>
<link linkend="opt-home.file._name_.text">home.file.&lt;name?&gt;.text</link>
is non-null then this option will automatically point to a file
containing that text.
'';
@@ -115,8 +105,7 @@ in
target = mkDefault name;
source = mkIf (config.text != null) (
mkDefault (pkgs.writeTextFile {
inherit (config) text;
executable = config.executable == true; # can be null
inherit (config) executable text;
name = hm.strings.storeFileName name;
})
);

View File

@@ -1,102 +0,0 @@
{ lib }:
{
toKDL = { }:
let
inherit (lib) concatStringsSep splitString mapAttrsToList any;
inherit (builtins) typeOf replaceStrings elem;
# ListOf String -> String
indentStrings = let
# Although the input of this function is a list of strings,
# the strings themselves *will* contain newlines, so you need
# to normalize the list by joining and resplitting them.
unlines = lib.splitString "\n";
lines = lib.concatStringsSep "\n";
indentAll = lines: concatStringsSep "\n" (map (x: " " + x) lines);
in stringsWithNewlines: indentAll (unlines (lines stringsWithNewlines));
# String -> String
sanitizeString = replaceStrings [ "\n" ''"'' ] [ "\\n" ''\"'' ];
# OneOf [Int Float String Bool Null] -> String
literalValueToString = element:
lib.throwIfNot
(elem (typeOf element) [ "int" "float" "string" "bool" "null" ])
"Cannot convert value of type ${typeOf element} to KDL literal."
(if typeOf element == "null" then
"null"
else if element == false then
"false"
else if element == true then
"true"
else if typeOf element == "string" then
''"${sanitizeString element}"''
else
toString element);
# Attrset Conversion
# String -> AttrsOf Anything -> String
convertAttrsToKDL = name: attrs:
let
optArgsString = lib.optionalString (attrs ? "_args")
(lib.pipe attrs._args [
(map literalValueToString)
(lib.concatStringsSep " ")
(s: s + " ")
]);
optPropsString = lib.optionalString (attrs ? "_props")
(lib.pipe attrs._props [
(lib.mapAttrsToList
(name: value: "${name}=${literalValueToString value}"))
(lib.concatStringsSep " ")
(s: s + " ")
]);
children =
lib.filterAttrs (name: _: !(elem name [ "_args" "_props" ])) attrs;
in ''
${name} ${optArgsString}${optPropsString}{
${indentStrings (mapAttrsToList convertAttributeToKDL children)}
}'';
# List Conversion
# String -> ListOf (OneOf [Int Float String Bool Null]) -> String
convertListOfFlatAttrsToKDL = name: list:
let flatElements = map literalValueToString list;
in "${name} ${concatStringsSep " " flatElements}";
# String -> ListOf Anything -> String
convertListOfNonFlatAttrsToKDL = name: list: ''
${name} {
${indentStrings (map (x: convertAttributeToKDL "-" x) list)}
}'';
# String -> ListOf Anything -> String
convertListToKDL = name: list:
let elementsAreFlat = !any (el: elem (typeOf el) [ "list" "set" ]) list;
in if elementsAreFlat then
convertListOfFlatAttrsToKDL name list
else
convertListOfNonFlatAttrsToKDL name list;
# Combined Conversion
# String -> Anything -> String
convertAttributeToKDL = name: value:
let vType = typeOf value;
in if elem vType [ "int" "float" "bool" "null" "string" ] then
"${name} ${literalValueToString value}"
else if vType == "set" then
convertAttrsToKDL name value
else if vType == "list" then
convertListToKDL name value
else
throw ''
Cannot convert type `(${typeOf value})` to KDL:
${name} = ${toString value}
'';
in attrs: ''
${concatStringsSep "\n" (mapAttrsToList convertAttributeToKDL attrs)}
'';
}

View File

@@ -5,9 +5,9 @@
{ lib }:
with lib;
let
inherit (lib)
concatMapStringsSep concatStrings escape hasPrefix head replaceStrings;
mkPrimitive = t: v: {
_type = "gvariant";
@@ -20,7 +20,6 @@ let
arrayOf = t: "a${t}";
maybeOf = t: "m${t}";
tupleOf = ts: "(${concatStrings ts})";
dictionaryEntryOf = ts: "{${concatStrings ts}}";
string = "s";
boolean = "b";
uchar = "y";
@@ -31,7 +30,6 @@ let
int64 = "x";
uint64 = "t";
double = "d";
variant = "v";
};
# Returns the GVariant type of a given Nix value. If no type can be
@@ -73,16 +71,14 @@ in rec {
inherit type typeOf;
isGVariant = v: v._type or "" == "gvariant";
isArray = hasPrefix "a";
isDictionaryEntry = hasPrefix "{";
isMaybe = hasPrefix "m";
isTuple = hasPrefix "(";
# Returns the GVariant value that most closely matches the given Nix
# value. If no GVariant value can be found then `null` is returned.
#
# No support for dictionaries, maybe types, or variants.
mkValue = v:
if builtins.isBool v then
mkBoolean v
@@ -107,21 +103,6 @@ in rec {
mkEmptyArray = elemType: mkArray elemType [ ];
mkVariant = elem:
let gvarElem = mkValue elem;
in mkPrimitive type.variant gvarElem // {
__toString = self: "@${self.type} <${toString self.value}>";
};
mkDictionaryEntry = elems:
let
gvarElems = map mkValue elems;
dictionaryType = type.dictionaryEntryOf (map (e: e.type) gvarElems);
in mkPrimitive dictionaryType gvarElems // {
__toString = self:
"@${self.type} {${concatMapStringsSep "," toString self.value}}";
};
mkNothing = elemType: mkMaybe elemType null;
mkJust = elem: let gvarElem = mkValue elem; in mkMaybe gvarElem.type gvarElem;
@@ -141,9 +122,8 @@ in rec {
};
mkString = v:
let sanitize = s: replaceStrings [ "\n" ] [ "\\n" ] (escape [ "'" "\\" ] s);
in mkPrimitive type.string v // {
__toString = self: "'${sanitize self.value}'";
mkPrimitive type.string v // {
__toString = self: "'${escape [ "'" "\\" ] self.value}'";
};
mkObjectpath = v:

View File

@@ -7,64 +7,6 @@
# [1] https://github.com/NixOS/nixpkgs/blob/fca0d6e093c82b31103dc0dacc48da2a9b06e24b/maintainers/maintainer-list.nix#LC1
{
amesgen = {
name = "amesgen";
email = "amesgen@amesgen.de";
github = "amesgen";
githubId = 15369874;
};
austreelis = {
email = "github@accounts.austreelis.net";
github = "Austreelis";
githubId = 56743515;
name = "Morgane Austreelis";
};
blmhemu = {
name = "blmhemu";
email = "19410501+blmhemu@users.noreply.github.com";
github = "blmhemu";
githubId = 19410501;
};
bertof = {
name = "bertof";
email = "berto.f@protonmail.com";
github = "bertof";
githubId = 9915675;
};
CarlosLoboxyz = {
name = "Carlos Lobo";
email = "86011416+CarlosLoboxyz@users.noreply.github.com";
github = "CarlosLoboxyz";
githubId = 86011416;
};
d-dervishi = {
email = "david.dervishi@epfl.ch";
github = "d-dervishi";
githubId = 61125355;
name = "David Dervishi";
keys = [{
longKeyId = "rsa4096/0xB1C012F0E7697195";
fingerprint = "4C92 E3B0 21B5 5562 A1E0 CE3D B1C0 12F0 E769 7195";
}];
};
Dines97 = {
name = "Denis Kaynar";
email = "19364873+Dines97@users.noreply.github.com";
github = "Dines97";
githubId = 19364873;
};
dwagenk = {
email = "dwagenk@mailbox.org";
github = "dwagenk";
githubId = 32838899;
name = "Daniel Wagenknecht";
};
jkarlson = {
email = "jekarlson@gmail.com";
github = "jkarlson";
githubId = 1204734;
name = "Emil Karlson";
};
justinlovinger = {
name = "Justin Lovinger";
email = "git@justinlovinger.com";
@@ -89,24 +31,12 @@
github = "chisui";
githubId = 4526429;
};
foo-dogsquared = {
name = "Gabriel Arazas";
email = "foo.dogsquared@gmail.com";
github = "foo-dogsquared";
githubId = 34962634;
};
olmokramer = {
name = "Olmo Kramer";
email = "olmokramer@users.noreply.github.com";
github = "olmokramer";
githubId = 3612514;
};
iosmanthus = {
name = "iosmanthus";
email = "myosmanthustree@gmail.com";
github = "iosmanthus";
githubId = 16307070;
};
kalhauge = {
name = "Christian Gram Kalhauge";
email = "kalhauge@users.noreply.github.com";
@@ -123,48 +53,18 @@
fingerprint = "2BE3 BAFD 793E A349 ED1F F00F 04D0 CEAF 916A 9A40";
}];
};
katexochen = {
name = "Paul Meyer";
email = "49727155+katexochen@users.noreply.github.com";
github = "katexochen";
githubId = 49727155;
};
kubukoz = {
name = "Jakub Kozłowski";
email = "kubukoz@users.noreply.github.com";
github = "kubukoz";
githubId = 894884;
};
loicreynier = {
name = "Loïc Reynier";
email = "loic@loireynier.fr";
github = "loicreynier";
githubId = 88983487;
};
matrss = {
name = "Matthias Riße";
email = "matrss@users.noreply.github.com";
github = "matrss";
githubId = 9308656;
};
mforster = {
name = "Michael Forster";
email = "email@michael-forster.de";
github = "MForster";
githubId = 4067975;
};
mifom = {
name = "mifom";
email = "mifom@users.noreply.github.com";
github = "mifom";
githubId = 23462908;
};
nilp0inter = {
name = "Roberto Abdelkader Martínez Pérez";
email = "robertomartinezp@gmail.com";
github = "nilp0inter";
githubId = 1224006;
};
seylerius = {
email = "sable@seyleri.us";
name = "Sable Seyler";
@@ -175,30 +75,18 @@
fingerprint = "F0E0 0311 126A CD72 4392 25E6 68BF 2EAE 6D91 CAFF";
}];
};
thiagokokada = {
email = "thiagokokada@gmail.com";
name = "Thiago Kenji Okada";
github = "thiagokokada";
githubId = 844343;
};
fendse = {
email = "46252070+Fendse@users.noreply.github.com";
github = "Fendse";
githubId = 46252070;
name = "Sara Johnsson";
};
florpe = {
email = "jens.krewald@gmail.com";
github = "florpe";
githubId = 53856373;
name = "Jens Krewald";
};
GaetanLepage = {
email = "gaetan@glepage.com";
github = "GaetanLepage";
githubId = 33058747;
name = "Gaetan Lepage";
};
maximsmol = {
email = "maximsmol@gmail.com";
github = "maximsmol";
githubId = 1472826;
name = "Max Smolin";
};
msfjarvis = {
email = "me@msfjarvis.dev";
github = "msfjarvis";
@@ -233,171 +121,4 @@
githubId = 5646732;
name = "Andreas Mager";
};
bjpbakker = {
email = "bart@thesoftwarecraft.com";
github = "bjpbakker";
githubId = 605641;
name = "Bart Bakker";
};
jrobsonchase = {
email = "josh@robsonchase.com";
github = "jrobsonchase";
githubId = 1553581;
name = "Josh Robson Chase";
};
jwygoda = {
name = "Jarosław Wygoda";
email = "jaroslaw@wygoda.me";
github = "jwygoda";
githubId = 20658981;
};
hawkw = {
name = "Eliza Weisman";
email = "eliza@elizas.website";
github = "hawkw";
githubId = 2796466;
};
pamplemousse = {
name = "Xavier Maso";
email = "xav.maso@gmail.com";
github = "pamplemousse";
githubId = 2647236;
};
onny = {
name = "onny";
email = "onny@project-insanity.org";
github = "onny";
githubId = 757752;
};
aheaume = {
name = "aheaume";
email = "aheaume@users.noreply.github.com";
github = "aheaume";
githubId = 13830042;
};
t4ccer = {
name = "t4ccer";
email = "t4ccer@users.noreply.github.com";
github = "t4ccer";
githubId = 64430288;
};
nurelin = {
name = "nurelin";
email = "nurelin@users.noreply.github.com";
github = "nurelin";
githubId = 5276274;
};
pltanton = {
name = "pltanton";
email = "plotnikovanton@gmail.com";
github = "pltanton";
githubId = 4561823;
};
Philipp-M = {
email = "philipp@mildenberger.me";
github = "Philipp-M";
githubId = 9267430;
name = "Philipp Mildenberger";
};
pinage404 = {
name = "pinage404";
email = "pinage404@gmail.com";
github = "pinage404";
githubId = 6325757;
};
podocarp = {
name = "Jia Xiaodong";
email = "xdjiaxd@gmail.com";
github = "podocarp";
githubId = 10473184;
};
mainrs = {
name = "mainrs";
email = "5113257+mainrs@users.noreply.github.com";
github = "mainrs";
githubId = 5113257;
};
kmaasrud = {
name = "Knut Magnus Aasrud";
email = "km@aasrud.com";
github = "kmaasrud";
githubId = 54394333;
};
sebtm = {
name = "Sebastian Sellmeier";
email = "sebtm@users.noreply.github.com";
github = "sebtm";
githubId = 17243347;
};
rosuavio = {
name = "Rosario Pulella";
email = "RosarioPulella@gmail.com";
github = "Rosuavio";
githubId = 7164552;
};
rszamszur = {
name = "Radosław Szamszur";
email = "radoslawszamszur@gmail.com";
github = "rszamszur";
githubId = 10353018;
};
rcerc = {
name = "rcerc";
email = "88944439+rcerc@users.noreply.github.com";
github = "rcerc";
githubId = 88944439;
keys = [{
longkeyid = "ed25519/0x3F98EC7EC2B87ED1";
fingerprint = "D5D6 FD1F 0D9A 3284 FB9B C26D 3F98 EC7E C2B8 7ED1";
}];
};
mtoohey = {
name = "Matthew Toohey";
email = "contact@mtoohey.com";
github = "mtoohey31";
githubId = 36740602;
};
lukasngl = {
name = "Lukas Nagel";
email = "69244516+lukasngl@users.noreply.github.com";
github = "lukasngl";
githubId = 69244516;
};
soywod = {
name = "Clément DOUIN";
email = "clement.douin@posteo.net";
matrix = "@soywod:matrix.org";
github = "soywod";
githubId = 10437171;
keys =
[{ fingerprint = "75F0 AB7C FE01 D077 AEE6 CAFD 353E 4A18 EE0F AB72"; }];
};
toastal = {
email = "toastal+nix@posteo.net";
matrix = "@toastal:matrix.org";
github = "toastal";
githubId = 561087;
name = "toastal";
keys =
[{ fingerprint = "7944 74B7 D236 DAB9 C9EF E7F9 5CCE 6F14 66D4 7C9E"; }];
};
tomodachi94 = {
email = "tomodachi94+nixpkgs@protonmail.com";
matrix = "@tomodachi94:matrix.org";
github = "tomodachi94";
githubId = 68489118;
name = "tomodachi94";
};
NateCox = {
name = "Nate Cox";
email = "nate@natecox.dev";
github = "natecox";
githubId = 2782695;
};
pedorich-n = {
name = "Mykyta Pedorich";
email = "pedorich.n@gmail.com";
github = "pedorich-n";
githubId = 15573098;
};
}

Some files were not shown because too many files have changed in this diff Show More