mirror of
https://github.com/nix-community/home-manager
synced 2024-11-10 07:04:17 +00:00
Merge branch 'nix-community:master' into master
This commit is contained in:
commit
1921e1cf5c
355 changed files with 7364 additions and 1316 deletions
60
.github/CODEOWNERS
vendored
60
.github/CODEOWNERS
vendored
|
@ -59,6 +59,8 @@ Makefile @thiagokokada
|
|||
/tests/modules/misc/xdg/desktop-full-expected.desktop @cwyc
|
||||
/tests/modules/misc/xdg/desktop-min-expected.desktop @cwyc
|
||||
|
||||
/modules/misc/xfconf.nix @chuangzhu
|
||||
|
||||
/modules/programs/aerc.nix @lukasngl
|
||||
/modules/programs/aerc-accounts.nix @lukasngl
|
||||
/tests/modules/programs/aerc @lukasngl
|
||||
|
@ -84,7 +86,7 @@ Makefile @thiagokokada
|
|||
/modules/programs/bottom.nix @polykernel
|
||||
/tests/modules/programs/bottom @polykernel
|
||||
|
||||
/modules/programs/broot.nix @aheaume
|
||||
/modules/programs/broot.nix @aheaume @dermetfan
|
||||
|
||||
/modules/programs/btop.nix @GaetanLepage
|
||||
/tests/modules/programs/btop.nix @GaetanLepage
|
||||
|
@ -93,6 +95,8 @@ Makefile @thiagokokada
|
|||
|
||||
/modules/programs/direnv.nix @rycee
|
||||
|
||||
/modules/programs/discocss.nix @Kranzes
|
||||
|
||||
/modules/programs/eclipse.nix @rycee
|
||||
|
||||
/modules/programs/emacs.nix @rycee
|
||||
|
@ -124,14 +128,16 @@ Makefile @thiagokokada
|
|||
|
||||
/modules/programs/go.nix @rvolosatovs
|
||||
|
||||
/modules/programs/havoc.nix @AndersonTorres
|
||||
|
||||
/modules/programs/helix.nix @Philipp-M
|
||||
/tests/modules/programs/helix @Philipp-M
|
||||
|
||||
/modules/programs/hexchat.nix @thiagokokada
|
||||
/tests/modules/programs/hexchat @thiagokokada
|
||||
|
||||
/modules/programs/himalaya.nix @ambroisie
|
||||
/tests/modules/programs/himalaya @ambroisie
|
||||
/modules/programs/himalaya.nix @toastal
|
||||
/tests/modules/programs/himalaya @toastal
|
||||
|
||||
/modules/programs/home-manager.nix @rycee
|
||||
|
||||
|
@ -151,6 +157,9 @@ Makefile @thiagokokada
|
|||
|
||||
/modules/programs/just.nix @maximsmol
|
||||
|
||||
/modules/programs/k9s.nix @katexochen
|
||||
/tests/modules/programs/k9s @katexochen
|
||||
|
||||
/modules/programs/keychain.nix @marsam
|
||||
|
||||
/modules/programs/kodi.nix @dwagenk
|
||||
|
@ -158,6 +167,8 @@ Makefile @thiagokokada
|
|||
|
||||
/modules/programs/lazygit.nix @kalhauge
|
||||
|
||||
/modules/programs/ledger.nix @marsam
|
||||
|
||||
/modules/programs/less.nix @pamplemousse
|
||||
/tests/modules/programs/less @pamplemousse
|
||||
|
||||
|
@ -170,6 +181,9 @@ Makefile @thiagokokada
|
|||
|
||||
/modules/programs/lieer.nix @tadfisher
|
||||
|
||||
/modules/programs/looking-glass-client.nix @j-brn
|
||||
/tests/modules/programs/looking-glass-client @j-brn
|
||||
|
||||
/modules/programs/lsd.nix @marsam
|
||||
|
||||
/modules/programs/matplotlib.nix @rprospero
|
||||
|
@ -225,6 +239,9 @@ Makefile @thiagokokada
|
|||
|
||||
/modules/programs/octant.nix @06kellyjac
|
||||
|
||||
/modules/programs/oh-my-posh.nix @arjan-s
|
||||
/tests/modules/programs/oh-my-posh @arjan-s
|
||||
|
||||
/modules/programs/opam.nix @marsam
|
||||
|
||||
/modules/programs/openssh.nix @rycee
|
||||
|
@ -232,6 +249,9 @@ Makefile @thiagokokada
|
|||
/modules/programs/pandoc.nix @kirelagin
|
||||
/tests/modules/programs/pandoc @kirelagin
|
||||
|
||||
/modules/programs/papis.nix @marsam
|
||||
/tests/modules/programs/papis @marsam
|
||||
|
||||
/modules/programs/password-store.nix @pacien
|
||||
|
||||
/modules/programs/pazi.nix @marsam
|
||||
|
@ -243,6 +263,12 @@ Makefile @thiagokokada
|
|||
|
||||
/modules/programs/piston-cli.nix @ethancedwards8
|
||||
|
||||
/modules/programs/pls.nix @arjan-s
|
||||
/tests/modules/programs/pls @arjan-s
|
||||
|
||||
/modules/programs/polybar.nix @h7x4
|
||||
/tests/modules/programs/polybar @h7x4
|
||||
|
||||
/modules/programs/powerline-go.nix @DamienCassou
|
||||
|
||||
/modules/programs/pubs.nix @loicreynier
|
||||
|
@ -250,6 +276,8 @@ Makefile @thiagokokada
|
|||
|
||||
/modules/programs/pylint.nix @florpe
|
||||
|
||||
/modules/programs/rbenv.nix @marsam
|
||||
|
||||
/modules/programs/rbw.nix @ambroisie
|
||||
/tests/modules/programs/rbw @ambroisie
|
||||
|
||||
|
@ -292,15 +320,24 @@ Makefile @thiagokokada
|
|||
|
||||
/modules/programs/texlive.nix @rycee
|
||||
|
||||
/modules/programs/thunderbird.nix @d-dervishi
|
||||
/tests/modules/programs/thunderbird @d-dervishi
|
||||
|
||||
/modules/programs/timidity.nix @amesgen
|
||||
|
||||
/modules/programs/tint2.nix @CarlosLoboxyz
|
||||
|
||||
/modules/programs/tiny.nix @kmaasrud
|
||||
|
||||
/modules/programs/tmate.nix @jlesquembre
|
||||
/tests/modules/programs/tmate @jlesquembre
|
||||
|
||||
/modules/programs/topgrade.nix @msfjarvis
|
||||
/tests/modules/programs/topgrade @msfjarvis
|
||||
|
||||
/modules/programs/vim-vint.nix @tomodachi94
|
||||
/tests/modules/programs/vim-vint @tomodachi94
|
||||
|
||||
/modules/programs/watson.nix @polykernel
|
||||
/tests/modules/programs/watson @polykernel
|
||||
|
||||
|
@ -314,6 +351,7 @@ Makefile @thiagokokada
|
|||
/tests/modules/programs/xmobar @t4ccer
|
||||
|
||||
/modules/programs/yt-dlp.nix @marsam
|
||||
/tests/modules/programs/yt-dlp @marsam
|
||||
|
||||
/modules/programs/z-lua.nix @marsam
|
||||
|
||||
|
@ -325,15 +363,25 @@ Makefile @thiagokokada
|
|||
|
||||
/modules/programs/zsh/prezto.nix @NickHu
|
||||
|
||||
/modules/services/autorandr.nix @GaetanLepage
|
||||
|
||||
/modules/services/barrier.nix @Kritnich
|
||||
/tests/modules/services/barrier @Kritnich
|
||||
|
||||
/modules/services/betterlockscreen.nix @SebTM
|
||||
|
||||
/modules/programs/borgmatic.nix @DamienCassou
|
||||
/modules/services/borgmatic.nix @DamienCassou
|
||||
/tests/modules/programs/borgmatic @DamienCassou
|
||||
/tests/modules/services/borgmatic @DamienCassou
|
||||
|
||||
/modules/services/caffeine.nix @uvNikita
|
||||
|
||||
/modules/services/cbatticon.nix @pmiddend
|
||||
|
||||
/modules/services/clipman.nix @jwygoda
|
||||
/tests/modules/services/clipman @jwygoda
|
||||
|
||||
/modules/services/clipmenu.nix @DamienCassou
|
||||
|
||||
/modules/services/devilspie2.nix @dawidsowa
|
||||
|
@ -392,6 +440,8 @@ Makefile @thiagokokada
|
|||
|
||||
/modules/services/mbsync.nix @pjones
|
||||
|
||||
/modules/services/megasync.nix @GaetanLepage
|
||||
|
||||
/modules/services/mopidy.nix @foo-dogsquared
|
||||
/tests/modules/services/mopidy @foo-dogsquared
|
||||
|
||||
|
@ -447,6 +497,8 @@ Makefile @thiagokokada
|
|||
/modules/services/redshift-gammastep @rycee @petabyteboy @thiagokokada
|
||||
/tests/modules/redshift-gammastep @thiagokokada
|
||||
|
||||
/modules/services/safeeyes @Rosuavio
|
||||
|
||||
/modules/services/screen-locker.nix @jrobsonchase @rszamszur
|
||||
/tests/modules/services/screen-locker @jrobsonchase @rszamszur
|
||||
|
||||
|
@ -483,6 +535,8 @@ Makefile @thiagokokada
|
|||
/modules/services/window-managers/bspwm @ncfavier
|
||||
/tests/modules/services/window-managers/bspwm @ncfavier
|
||||
|
||||
/modules/services/window-managers/fluxbox.nix @AndersonTorres
|
||||
|
||||
/modules/services/window-managers/herbstluftwm @olmokramer
|
||||
/tests/modules/services/window-managers/herbstluftwm @olmokramer
|
||||
|
||||
|
|
2
.github/dependabot.yml
vendored
2
.github/dependabot.yml
vendored
|
@ -10,7 +10,7 @@ updates:
|
|||
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
target-branch: "release-21.11"
|
||||
target-branch: "release-22.11"
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
commit-message:
|
||||
|
|
19
.github/labeler.yml
vendored
Normal file
19
.github/labeler.yml
vendored
Normal file
|
@ -0,0 +1,19 @@
|
|||
"mail":
|
||||
- modules/programs/alot*.nix
|
||||
- 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/*
|
||||
|
||||
"neovim":
|
||||
- modules/programs/neovim.nix
|
||||
- tests/modules/programs/neovim/**/*
|
6
.github/workflows/github_pages.yml
vendored
6
.github/workflows/github_pages.yml
vendored
|
@ -11,13 +11,13 @@ jobs:
|
|||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: cachix/install-nix-action@v17
|
||||
- uses: cachix/install-nix-action@v18
|
||||
with:
|
||||
nix_path: nixpkgs=channel:nixos-unstable
|
||||
- uses: cachix/cachix-action@v10
|
||||
- uses: cachix/cachix-action@v12
|
||||
with:
|
||||
name: nix-community
|
||||
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
|
||||
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
|
||||
- run: |
|
||||
nix-build -A docs.html
|
||||
cp -r result/share/doc/home-manager public
|
||||
|
|
24
.github/workflows/labeler.yml
vendored
Normal file
24
.github/workflows/labeler.yml
vendored
Normal file
|
@ -0,0 +1,24 @@
|
|||
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
|
||||
|
6
.github/workflows/test.yml
vendored
6
.github/workflows/test.yml
vendored
|
@ -12,13 +12,13 @@ jobs:
|
|||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: cachix/install-nix-action@v17
|
||||
- uses: cachix/install-nix-action@v18
|
||||
with:
|
||||
nix_path: nixpkgs=channel:nixos-unstable
|
||||
- uses: cachix/cachix-action@v10
|
||||
- uses: cachix/cachix-action@v12
|
||||
with:
|
||||
name: nix-community
|
||||
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
|
||||
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
|
||||
|
|
4
.github/workflows/update-flake.yml
vendored
4
.github/workflows/update-flake.yml
vendored
|
@ -12,9 +12,9 @@ jobs:
|
|||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
- name: Install Nix
|
||||
uses: cachix/install-nix-action@v17
|
||||
uses: cachix/install-nix-action@v18
|
||||
- name: Update flake.lock
|
||||
uses: DeterminateSystems/update-flake-lock@v13
|
||||
uses: DeterminateSystems/update-flake-lock@v16
|
||||
with:
|
||||
token: ${{ secrets.GH_TOKEN_FOR_UPDATES }}
|
||||
pr-labels: dependencies
|
||||
|
|
|
@ -4,17 +4,8 @@ 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:
|
||||
|
|
2
.release
2
.release
|
@ -1 +1 @@
|
|||
22.11
|
||||
23.05
|
||||
|
|
|
@ -14,8 +14,9 @@ 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] and
|
||||
- the [Home Manager configuration options][configuration options].
|
||||
- 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.
|
||||
|
@ -41,7 +42,7 @@ 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 22.05 (the
|
||||
Home Manager targets [NixOS][] unstable and NixOS version 22.11 (the
|
||||
current stable version), it may or may not work on other Linux
|
||||
distributions and NixOS versions.
|
||||
|
||||
|
@ -106,7 +107,7 @@ 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-22.05`). These branches get fixes, but usually not new
|
||||
(e.g. `release-22.11`). These branches get fixes, but usually not new
|
||||
modules. If you need a module to be backported, then feel free to open
|
||||
an issue.
|
||||
|
||||
|
|
|
@ -28,6 +28,11 @@ 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
|
||||
|
@ -256,3 +261,8 @@ 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 system’s nixpkgs, and may cause failures. To run against the nixpkgs from the flake.lock, use instead e.g.
|
||||
|
||||
[source,console]
|
||||
$ nix develop --ignore-environment .#tests.all
|
||||
|
|
|
@ -7,8 +7,8 @@ let
|
|||
|
||||
nmdSrc = fetchTarball {
|
||||
url =
|
||||
"https://gitlab.com/api/v4/projects/rycee%2Fnmd/repository/archive.tar.gz?sha=91dee681dd1c478d6040a00835d73c0f4a4c5c29";
|
||||
sha256 = "07szg39wmna287hv5w9hl45wvm04zbh0k54br59nv3yzvg9ymlj4";
|
||||
"https://git.sr.ht/~rycee/nmd/archive/409f1310b168f96c6c8b556d24731a3e7c26c255.tar.gz";
|
||||
sha256 = "1v43qgfwa9s84728lv1njz2zdsfzp8kas3w4s3jan7w813c8flh8";
|
||||
};
|
||||
|
||||
nmd = import nmdSrc { inherit lib pkgs; };
|
||||
|
|
|
@ -51,23 +51,13 @@ $ nix-channel --add https://github.com/nix-community/home-manager/archive/master
|
|||
$ nix-channel --update
|
||||
----
|
||||
+
|
||||
and if you follow a Nixpkgs version 22.05 channel you can run
|
||||
and if you follow a Nixpkgs version 22.11 channel you can run
|
||||
+
|
||||
[source,console]
|
||||
----
|
||||
$ nix-channel --add https://github.com/nix-community/home-manager/archive/release-22.05.tar.gz home-manager
|
||||
$ nix-channel --add https://github.com/nix-community/home-manager/archive/release-22.11.tar.gz home-manager
|
||||
$ nix-channel --update
|
||||
----
|
||||
+
|
||||
On non-NixOS, you may have to add
|
||||
+
|
||||
[source,bash]
|
||||
export NIX_PATH=$HOME/.nix-defexpr/channels:/nix/var/nix/profiles/per-user/root/channels${NIX_PATH:+:$NIX_PATH}
|
||||
+
|
||||
to your shell (see https://github.com/NixOS/nix/issues/2033[nix#2033]
|
||||
and
|
||||
https://discourse.nixos.org/t/where-is-nix-path-supposed-to-be-set/16434/8[this
|
||||
reply on the Nix Discourse]).
|
||||
|
||||
3. Run the Home Manager installation command and create the first Home
|
||||
Manager generation:
|
||||
|
@ -133,11 +123,11 @@ $ sudo nix-channel --add https://github.com/nix-community/home-manager/archive/m
|
|||
$ sudo nix-channel --update
|
||||
----
|
||||
|
||||
and if you follow a Nixpkgs version 22.05 channel, you can run
|
||||
and if you follow a Nixpkgs version 22.11 channel, you can run
|
||||
|
||||
[source,console]
|
||||
----
|
||||
$ sudo nix-channel --add https://github.com/nix-community/home-manager/archive/release-22.05.tar.gz home-manager
|
||||
$ sudo nix-channel --add https://github.com/nix-community/home-manager/archive/release-22.11.tar.gz home-manager
|
||||
$ sudo nix-channel --update
|
||||
----
|
||||
|
||||
|
@ -244,11 +234,11 @@ $ nix-channel --add https://github.com/nix-community/home-manager/archive/master
|
|||
$ nix-channel --update
|
||||
----
|
||||
|
||||
and if you follow a Nixpkgs version 22.05 channel, you can run
|
||||
and if you follow a Nixpkgs version 22.11 channel, you can run
|
||||
|
||||
[source,console]
|
||||
----
|
||||
$ nix-channel --add https://github.com/nix-community/home-manager/archive/release-22.05.tar.gz home-manager
|
||||
$ nix-channel --add https://github.com/nix-community/home-manager/archive/release-22.11.tar.gz home-manager
|
||||
$ nix-channel --update
|
||||
----
|
||||
|
||||
|
@ -303,7 +293,7 @@ can be sourced directly by POSIX.2-like shells such as {bash}[Bash] or
|
|||
[NOTE]
|
||||
====
|
||||
By default user packages will not be ignored in favor of
|
||||
`environment.systemPackages`, but they will be intalled to
|
||||
`environment.systemPackages`, but they will be installed to
|
||||
`/etc/profiles/per-user/$USERNAME` if
|
||||
|
||||
[source,nix]
|
||||
|
|
|
@ -155,6 +155,18 @@
|
|||
--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>
|
||||
|
@ -167,6 +179,10 @@
|
|||
--no-out-link
|
||||
</arg>
|
||||
|
||||
<arg>
|
||||
--refresh
|
||||
</arg>
|
||||
|
||||
<arg>
|
||||
<group choice="req">
|
||||
<arg choice="plain">
|
||||
|
@ -546,6 +562,22 @@
|
|||
</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>
|
||||
|
@ -583,6 +615,18 @@
|
|||
</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>
|
||||
|
|
|
@ -6,19 +6,31 @@
|
|||
Home Manager includes a `flake.nix` file for compatibility with {nixos-wiki-flakes}[Nix Flakes].
|
||||
The support is still experimental and may change in backwards incompatible ways.
|
||||
|
||||
[[sec-flakes-prerequisties]]
|
||||
=== Prerequisties
|
||||
[[sec-flakes-prerequisites]]
|
||||
=== Prerequisites
|
||||
|
||||
* Install Nix 2.4 or later, or have it in `nix-shell`.
|
||||
|
||||
* Enable experimental features `nix-command` and `flakes`.
|
||||
+
|
||||
Either set in `nix.conf`
|
||||
** 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
|
||||
+
|
||||
or pass them to `nix` and `home-manager` by
|
||||
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]
|
||||
----
|
||||
|
@ -78,9 +90,9 @@ writing a Home Manager configuration.
|
|||
====
|
||||
* The above example tracks the master branch of Home Manager
|
||||
and nixos-unstable branch of Nixpkgs.
|
||||
If you would like to use the `release-22.05` branch,
|
||||
change the `home-manager` input url to `github:nix-community/home-manager/release-22.05`
|
||||
and `nixpkgs` url to `github:NixOS/nixpkgs/nixos-22.05`.
|
||||
If you would like to use the `release-22.11` branch,
|
||||
change the `home-manager` input url to `github:nix-community/home-manager/release-22.11`
|
||||
and `nixpkgs` url to `github:NixOS/nixpkgs/nixos-22.11`.
|
||||
|
||||
* The Home Manager library is exported by the flake under
|
||||
`lib.hm`.
|
||||
|
@ -188,7 +200,7 @@ is similar to that of NixOS. The `flake.nix` would be:
|
|||
[source,nix]
|
||||
----
|
||||
{
|
||||
description = "NixOS configuration";
|
||||
description = "Darwin configuration";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
|
|
|
@ -6,6 +6,8 @@ This section lists the release notes for stable versions of Home Manager and the
|
|||
|
||||
:leveloffset: 1
|
||||
|
||||
include::rl-2305.adoc[]
|
||||
|
||||
include::rl-2211.adoc[]
|
||||
|
||||
include::rl-2205.adoc[]
|
||||
|
|
|
@ -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,
|
||||
+
|
||||
|
|
|
@ -93,4 +93,21 @@ release 20.03. Use `services.picom` instead.
|
|||
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.
|
||||
|
||||
* No changes.
|
||||
* 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`.
|
||||
|
|
23
docs/release-notes/rl-2305.adoc
Normal file
23
docs/release-notes/rl-2305.adoc
Normal file
|
@ -0,0 +1,23 @@
|
|||
[[sec-release-23.05]]
|
||||
== Release 23.05
|
||||
|
||||
This is the current unstable branch and the information in this section is therefore not final.
|
||||
|
||||
[[sec-release-23.05-highlights]]
|
||||
=== Highlights
|
||||
|
||||
This release has the following notable changes:
|
||||
|
||||
* No highlights.
|
||||
|
||||
[[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 <<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>>, options now default to `true` which
|
||||
is consistent with the default values for those options used by `i3` and `sway`.
|
|
@ -52,7 +52,7 @@ A fresh install of Home Manager will generate a minimal `~/.config/nixpkgs/home.
|
|||
# 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 = "22.05";
|
||||
home.stateVersion = "22.11";
|
||||
|
||||
# Let Home Manager install and manage itself.
|
||||
programs.home-manager.enable = true;
|
||||
|
@ -92,7 +92,7 @@ To satisfy the above setup we should elaborate the `home.nix` file as follows:
|
|||
# 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 = "22.05";
|
||||
home.stateVersion = "22.11";
|
||||
|
||||
# Let Home Manager install and manage itself.
|
||||
programs.home-manager.enable = true;
|
||||
|
|
|
@ -167,9 +167,11 @@ Builds a GVariant array containing the given list of elements, where each elemen
|
|||
- `hm.gvariant.type.int64`
|
||||
- `hm.gvariant.type.uint64`
|
||||
- `hm.gvariant.type.double`
|
||||
- `hm.gvariant.type.variant`
|
||||
- `hm.gvariant.type.arrayOf type`
|
||||
- `hm.gvariant.type.maybeOf type`
|
||||
- `hm.gvariant.type.tupleOf types`
|
||||
- `hm.gvariant.type.dictionaryEntryOf types`
|
||||
--
|
||||
+
|
||||
where `type` and `types` are themselves a type and list of types, respectively.
|
||||
|
@ -185,3 +187,9 @@ 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.
|
||||
+
|
||||
`hm.gvariant.mkVariant element`:::
|
||||
Builds a GVariant variant which contains the value of a GVariant element.
|
||||
+
|
||||
`hm.gvariant.mkDictionaryEntry elements`:::
|
||||
Builds a GVariant dictionary entry containing the given list of elements, where each element is a GVariant value.
|
||||
|
|
12
flake.lock
12
flake.lock
|
@ -2,11 +2,11 @@
|
|||
"nodes": {
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1654953433,
|
||||
"narHash": "sha256-TwEeh4r50NdWHFAHQSyjCk2cZxgwUfcCCAJOhPdXB28=",
|
||||
"lastModified": 1675115703,
|
||||
"narHash": "sha256-4zetAPSyY0D77x+Ww9QBe8RHn1akvIvHJ/kgg8kGDbk=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "90cd5459a1fd707819b9a3fb9c852beaaac3b79a",
|
||||
"rev": "2caf4ef5005ecc68141ecb4aac271079f7371c44",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -24,11 +24,11 @@
|
|||
},
|
||||
"utils": {
|
||||
"locked": {
|
||||
"lastModified": 1653893745,
|
||||
"narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=",
|
||||
"lastModified": 1667395993,
|
||||
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "1ed9fb1935d260de5fe1c2f7ee0ebaae17ed2fa1",
|
||||
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
48
flake.nix
48
flake.nix
|
@ -45,27 +45,37 @@
|
|||
, configuration ? null, extraModules ? null, stateVersion ? null
|
||||
, username ? null, homeDirectory ? null, system ? null }@args:
|
||||
let
|
||||
throwForRemovedArg = v:
|
||||
lib.throwIf (v != null) ''
|
||||
The 'homeManagerConfiguration' arguments
|
||||
msgForRemovedArg = ''
|
||||
The 'homeManagerConfiguration' arguments
|
||||
|
||||
- 'configuration',
|
||||
- 'username',
|
||||
- 'homeDirectory'
|
||||
- 'stateVersion',
|
||||
- 'extraModules', and
|
||||
- 'system'
|
||||
- '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.
|
||||
'';
|
||||
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;
|
||||
|
||||
throwForRemovedArgs = throwForRemovedArg configuration # \
|
||||
throwForRemovedArg username # \
|
||||
throwForRemovedArg homeDirectory # \
|
||||
throwForRemovedArg stateVersion # \
|
||||
throwForRemovedArg extraModules # \
|
||||
throwForRemovedArg system;
|
||||
in throwForRemovedArgs (import ./modules {
|
||||
inherit pkgs lib check extraSpecialArgs;
|
||||
configuration = { ... }: {
|
||||
|
@ -78,7 +88,9 @@
|
|||
let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
docs = import ./docs { inherit pkgs; };
|
||||
tests = import ./tests { inherit pkgs; };
|
||||
in {
|
||||
devShells.tests = tests.run;
|
||||
packages = rec {
|
||||
home-manager = pkgs.callPackage ./home-manager { };
|
||||
docs-html = docs.manual.html;
|
||||
|
|
1
format
1
format
|
@ -21,7 +21,6 @@ find . -name '*.nix' \
|
|||
! -path ./modules/lib/default.nix \
|
||||
! -path ./modules/lib/file-type.nix \
|
||||
! -path ./modules/misc/news.nix \
|
||||
! -path ./modules/programs/bash.nix \
|
||||
! -path ./modules/programs/ssh.nix \
|
||||
! -path ./modules/programs/zsh.nix \
|
||||
! -path ./tests/default.nix \
|
||||
|
|
|
@ -293,9 +293,10 @@ _home-manager_completions ()
|
|||
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" )
|
||||
"--extra-experimental-features" "--refresh")
|
||||
|
||||
# ^ « home-manager »'s options.
|
||||
|
||||
|
|
|
@ -60,6 +60,7 @@ complete -c home-manager -f -l "keep-going" -d "Keep going in case of failed bui
|
|||
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"
|
||||
|
@ -68,3 +69,4 @@ 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"
|
||||
|
|
|
@ -19,6 +19,7 @@ _arguments \
|
|||
'(-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:()' \
|
||||
|
@ -62,6 +63,7 @@ case "$state" in
|
|||
'--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:()' \
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{ runCommand, lib, bash, callPackage, coreutils, findutils, gettext, gnused
|
||||
, less, ncurses
|
||||
, less, ncurses, unixtools
|
||||
# used for pkgs.path for nixos-option
|
||||
, pkgs
|
||||
|
||||
|
@ -39,6 +39,7 @@ in runCommand "home-manager" {
|
|||
less
|
||||
ncurses
|
||||
nixos-option
|
||||
unixtools.hostname
|
||||
]
|
||||
}" \
|
||||
--subst-var-by HOME_MANAGER_LIB '${../lib/bash/home-manager.sh}' \
|
||||
|
|
|
@ -87,7 +87,7 @@ function setHomeManagerNixPath() {
|
|||
"${XDG_CONFIG_HOME:-$HOME/.config}/nixpkgs/home-manager" \
|
||||
"$HOME/.nixpkgs/home-manager" ; do
|
||||
if [[ -e "$path" || "$path" =~ ^https?:// ]] ; then
|
||||
export NIX_PATH="home-manager=$path${NIX_PATH:+:}$NIX_PATH"
|
||||
EXTRA_NIX_PATH+=("home-manager=$path")
|
||||
return
|
||||
fi
|
||||
done
|
||||
|
@ -106,10 +106,17 @@ function setFlakeAttribute() {
|
|||
local name="${FLAKE_ARG#*#}"
|
||||
;;
|
||||
*)
|
||||
local name="$USER@$(hostname)"
|
||||
if [ "$(nix eval "$flake#homeConfigurations" --apply "x: x ? \"$name\"")" = "false" ]; then
|
||||
name="$USER"
|
||||
fi
|
||||
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
|
||||
;;
|
||||
esac
|
||||
export FLAKE_CONFIG_URI="$flake#homeConfigurations.\"$name\""
|
||||
|
@ -123,7 +130,6 @@ function doInspectOption() {
|
|||
exit 1
|
||||
fi
|
||||
setConfigFile
|
||||
setHomeManagerNixPath
|
||||
|
||||
local extraArgs=("$@")
|
||||
|
||||
|
@ -163,7 +169,6 @@ function doInstantiate() {
|
|||
exit 1
|
||||
fi
|
||||
setConfigFile
|
||||
setHomeManagerNixPath
|
||||
|
||||
local extraArgs=()
|
||||
|
||||
|
@ -185,7 +190,6 @@ function doInstantiate() {
|
|||
|
||||
function doBuildAttr() {
|
||||
setConfigFile
|
||||
setHomeManagerNixPath
|
||||
|
||||
local extraArgs=("$@")
|
||||
|
||||
|
@ -282,6 +286,7 @@ function doBuild() {
|
|||
"$FLAKE_CONFIG_URI.activationPackage" \
|
||||
${DRY_RUN+--dry-run} \
|
||||
${NO_OUT_LINK+--no-link} \
|
||||
${PRINT_BUILD_LOGS+--print-build-logs} \
|
||||
|| return
|
||||
else
|
||||
doBuildAttr \
|
||||
|
@ -312,6 +317,7 @@ function doSwitch() {
|
|||
doBuildFlake \
|
||||
"$FLAKE_CONFIG_URI.activationPackage" \
|
||||
--out-link "$generation" \
|
||||
${PRINT_BUILD_LOGS+--print-build-logs} \
|
||||
&& "$generation/activate" || return
|
||||
else
|
||||
doBuildAttr \
|
||||
|
@ -480,7 +486,10 @@ function doUninstall() {
|
|||
y|Y)
|
||||
_i "Switching to empty Home Manager configuration..."
|
||||
HOME_MANAGER_CONFIG="$(mktemp --tmpdir home-manager.XXXXXXXXXX)"
|
||||
echo "{ lib, ... }: { home.file = lib.mkForce {}; }" > "$HOME_MANAGER_CONFIG"
|
||||
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"
|
||||
doSwitch
|
||||
$DRY_RUN_CMD $REMOVE_CMD home-manager-path || true
|
||||
rm "$HOME_MANAGER_CONFIG"
|
||||
|
@ -541,11 +550,13 @@ function doHelp() {
|
|||
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
|
||||
|
@ -589,6 +600,8 @@ COMMAND=""
|
|||
COMMAND_ARGS=()
|
||||
FLAKE_ARG=""
|
||||
|
||||
setHomeManagerNixPath
|
||||
|
||||
while [[ $# -gt 0 ]]; do
|
||||
opt="$1"
|
||||
shift
|
||||
|
@ -616,7 +629,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)
|
||||
--recreate-lock-file|--no-update-lock-file|--no-write-lock-file|--no-registries|--commit-lock-file|--refresh)
|
||||
PASSTHROUGH_OPTS+=("$opt")
|
||||
;;
|
||||
--update-input)
|
||||
|
@ -638,6 +651,9 @@ while [[ $# -gt 0 ]]; do
|
|||
--no-out-link)
|
||||
NO_OUT_LINK=1
|
||||
;;
|
||||
-L|--print-build-logs)
|
||||
PRINT_BUILD_LOGS=1
|
||||
;;
|
||||
-h|--help)
|
||||
doHelp
|
||||
exit 0
|
||||
|
@ -661,7 +677,7 @@ while [[ $# -gt 0 ]]; do
|
|||
export VERBOSE=1
|
||||
;;
|
||||
--version)
|
||||
echo 22.05
|
||||
echo 22.11
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
|
|
|
@ -54,7 +54,7 @@ in runCommand "home-manager-install" {
|
|||
# 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 = "22.05";
|
||||
home.stateVersion = "22.11";
|
||||
|
||||
# Let Home Manager install and manage itself.
|
||||
programs.home-manager.enable = true;
|
||||
|
|
187
home-manager/po/da.po
Normal file
187
home-manager/po/da.po
Normal file
|
@ -0,0 +1,187 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR Home Manager contributors
|
||||
# This file is distributed under the same license as the Home Manager package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Home Manager\n"
|
||||
"Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n"
|
||||
"POT-Creation-Date: 2022-03-26 15:08+0100\n"
|
||||
"PO-Revision-Date: 2022-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:60
|
||||
msgid "No configuration file found at %s"
|
||||
msgstr "Ingen konfigurationsfiler fundet ved %s"
|
||||
|
||||
#: home-manager/home-manager:79
|
||||
msgid "No configuration file found. Please create one at %s"
|
||||
msgstr "Ingen konfigurationsfiler fundet. Venligst lav en ved %s"
|
||||
|
||||
#: home-manager/home-manager:122
|
||||
msgid "Can't inspect options of a flake configuration"
|
||||
msgstr "Kan ikke inspicere indstillinger af en flake konfiguration"
|
||||
|
||||
#: home-manager/home-manager:162
|
||||
msgid "Can't instantiate a flake configuration"
|
||||
msgstr "Kan ikke instantiere en flake konfiguration"
|
||||
|
||||
#: home-manager/home-manager:237
|
||||
msgid ""
|
||||
"There is %d unread and relevant news item.\n"
|
||||
"Read it by running the command \"%s news\"."
|
||||
msgid_plural ""
|
||||
"There are %d unread and relevant news items.\n"
|
||||
"Read them by running the command \"%s news\"."
|
||||
msgstr[0] ""
|
||||
"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:251
|
||||
msgid "Unknown \"news.display\" setting \"%s\"."
|
||||
msgstr "Ubekændt \"news.display\" indstilling \"%s\"."
|
||||
|
||||
#: home-manager/home-manager:258
|
||||
#, sh-format
|
||||
msgid "Please set the $EDITOR environment variable"
|
||||
msgstr "Venligst sæt $EDITOR miljøvariablen"
|
||||
|
||||
#: home-manager/home-manager:273
|
||||
msgid "Cannot run build in read-only directory"
|
||||
msgstr "Kan ikke bygge i en læs-kun folder"
|
||||
|
||||
#: home-manager/home-manager:355
|
||||
msgid "No generation with ID %s"
|
||||
msgstr "Ingen generation med ID %s"
|
||||
|
||||
#: home-manager/home-manager:357
|
||||
msgid "Cannot remove the current generation %s"
|
||||
msgstr "Kan ikke fjerne den nuværende generation %s"
|
||||
|
||||
#: home-manager/home-manager:359
|
||||
msgid "Removing generation %s"
|
||||
msgstr "Fjern generation %s"
|
||||
|
||||
#: home-manager/home-manager:385
|
||||
msgid "No generations to expire"
|
||||
msgstr "Ingen generationer som skal udløbes"
|
||||
|
||||
#: home-manager/home-manager:396
|
||||
msgid "No home-manager packages seem to be installed."
|
||||
msgstr ""
|
||||
"Det virker ikke som om der er nogle home-manager pakker der er installeret."
|
||||
|
||||
#: home-manager/home-manager:453
|
||||
msgid "Unknown argument %s"
|
||||
msgstr "Ubekendt argument %s"
|
||||
|
||||
#: home-manager/home-manager:469
|
||||
msgid "This will remove Home Manager from your system."
|
||||
msgstr "Dette vil fjerne Home Manager fra dit system."
|
||||
|
||||
#: home-manager/home-manager:472
|
||||
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:476
|
||||
msgid "Really uninstall Home Manager?"
|
||||
msgstr "Virkelig uinstaller Home Manager?"
|
||||
|
||||
#: home-manager/home-manager:481
|
||||
msgid "Switching to empty Home Manager configuration..."
|
||||
msgstr "Skifter til tom Home Manager konfiguration..."
|
||||
|
||||
#: home-manager/home-manager:493
|
||||
msgid "Yay!"
|
||||
msgstr "Juhuu!"
|
||||
|
||||
#: home-manager/home-manager:500
|
||||
msgid "Remove all Home Manager generations?"
|
||||
msgstr "Fjern alle Home Manager generationer?"
|
||||
|
||||
#: home-manager/home-manager:507
|
||||
msgid "All generations are now eligible for garbage collection."
|
||||
msgstr "Alle generationer kan nu blive tjekket for overflødige filer."
|
||||
|
||||
#: home-manager/home-manager:510
|
||||
msgid "Leaving generations but they may still be garbage collected."
|
||||
msgstr ""
|
||||
"Forlad generationer, men de kan stadig bliver fjernet som overflødige filer."
|
||||
|
||||
#: home-manager/home-manager:514
|
||||
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:673
|
||||
msgid "%s: unknown option '%s'"
|
||||
msgstr "%s: ukendt indstilling '%s'"
|
||||
|
||||
#: home-manager/home-manager:674
|
||||
msgid "Run '%s --help' for usage help"
|
||||
msgstr "Kør '%s --help' for brugsvejledning"
|
||||
|
||||
#: home-manager/home-manager:708
|
||||
msgid "expire-generations expects one argument, got %d."
|
||||
msgstr "expire-generations forventer et argument, fik %d."
|
||||
|
||||
#: home-manager/home-manager:730
|
||||
msgid "Unknown command: %s"
|
||||
msgstr "Ubekendt kommando: %s"
|
||||
|
||||
#: home-manager/install.nix:22
|
||||
msgid "Creating initial Home Manager configuration..."
|
||||
msgstr "Laver initial Home Manager konfiguration..."
|
||||
|
||||
#: home-manager/install.nix:66
|
||||
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/install.nix:71
|
||||
msgid ""
|
||||
"All done! The home-manager tool should now be installed and you can edit\n"
|
||||
"\n"
|
||||
" %s\n"
|
||||
"\n"
|
||||
"to configure Home Manager. Run 'man home-configuration.nix' to\n"
|
||||
"see all available options."
|
||||
msgstr ""
|
||||
"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/install.nix:76
|
||||
msgid ""
|
||||
"Uh oh, the installation failed! Please create an issue at\n"
|
||||
"\n"
|
||||
" %s\n"
|
||||
"\n"
|
||||
"if the error seems to be the fault of Home Manager."
|
||||
msgstr ""
|
||||
"Åh nej, installationen fejlede! Venligst opret en fejlrapport ved\n"
|
||||
"\n"
|
||||
" %s\n"
|
||||
" \n"
|
||||
"hvis fejlen fremstår som forskyldt af Home Manager."
|
||||
|
||||
#: home-manager/install.nix:83
|
||||
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."
|
186
home-manager/po/lt.po
Normal file
186
home-manager/po/lt.po
Normal file
|
@ -0,0 +1,186 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR Home Manager contributors
|
||||
# This file is distributed under the same license as the Home Manager package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Home Manager\n"
|
||||
"Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n"
|
||||
"POT-Creation-Date: 2022-03-26 15:08+0100\n"
|
||||
"PO-Revision-Date: 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:60
|
||||
msgid "No configuration file found at %s"
|
||||
msgstr "Nerastas konfigūracijos failas %s"
|
||||
|
||||
#: home-manager/home-manager:79
|
||||
msgid "No configuration file found. Please create one at %s"
|
||||
msgstr "Nerastas konfigūracijos failas. Sukurkite jį adresu %s"
|
||||
|
||||
#: home-manager/home-manager:122
|
||||
msgid "Can't inspect options of a flake configuration"
|
||||
msgstr "Negalima patikrinti flake konfigūracijos pasirinkimų"
|
||||
|
||||
#: home-manager/home-manager:162
|
||||
msgid "Can't instantiate a flake configuration"
|
||||
msgstr "Negalima sukurti pradinės flake konfigūracijos"
|
||||
|
||||
#: home-manager/home-manager:237
|
||||
msgid ""
|
||||
"There is %d unread and relevant news item.\n"
|
||||
"Read it by running the command \"%s news\"."
|
||||
msgid_plural ""
|
||||
"There are %d unread and relevant news items.\n"
|
||||
"Read them by running the command \"%s news\"."
|
||||
msgstr[0] ""
|
||||
"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:251
|
||||
msgid "Unknown \"news.display\" setting \"%s\"."
|
||||
msgstr "Nežinomas \"news.display\" nustatymas \"%s\"."
|
||||
|
||||
#: home-manager/home-manager:258
|
||||
#, sh-format
|
||||
msgid "Please set the $EDITOR environment variable"
|
||||
msgstr "Prašome nustatyti $EDITOR aplinkos kintamąjį"
|
||||
|
||||
#: home-manager/home-manager:273
|
||||
msgid "Cannot run build in read-only directory"
|
||||
msgstr ""
|
||||
|
||||
#: home-manager/home-manager:355
|
||||
msgid "No generation with ID %s"
|
||||
msgstr "Nėra generacijos su ID %s"
|
||||
|
||||
#: home-manager/home-manager:357
|
||||
msgid "Cannot remove the current generation %s"
|
||||
msgstr "Negalima pašalinti esamos generacijos %s"
|
||||
|
||||
#: home-manager/home-manager:359
|
||||
msgid "Removing generation %s"
|
||||
msgstr "Pašalinama generacija %s"
|
||||
|
||||
#: home-manager/home-manager:385
|
||||
msgid "No generations to expire"
|
||||
msgstr ""
|
||||
|
||||
#: home-manager/home-manager:396
|
||||
msgid "No home-manager packages seem to be installed."
|
||||
msgstr "Nėra instaliuotų home-manager paketų."
|
||||
|
||||
#: home-manager/home-manager:453
|
||||
msgid "Unknown argument %s"
|
||||
msgstr "Nežinomas argumentas %s"
|
||||
|
||||
#: home-manager/home-manager:469
|
||||
msgid "This will remove Home Manager from your system."
|
||||
msgstr "Tai pašalins Home Manager iš jūsų sistemos."
|
||||
|
||||
#: home-manager/home-manager:472
|
||||
msgid "This is a dry run, nothing will actually be uninstalled."
|
||||
msgstr "Tai bandomasis paleidimas, niekas nebus ištrinta."
|
||||
|
||||
#: home-manager/home-manager:476
|
||||
msgid "Really uninstall Home Manager?"
|
||||
msgstr "Tikrai išdiegti Home Manager?"
|
||||
|
||||
#: home-manager/home-manager:481
|
||||
msgid "Switching to empty Home Manager configuration..."
|
||||
msgstr "Perjungiama į tuščią Home Manager konfigūraciją..."
|
||||
|
||||
#: home-manager/home-manager:493
|
||||
msgid "Yay!"
|
||||
msgstr "Valio!"
|
||||
|
||||
#: home-manager/home-manager:500
|
||||
msgid "Remove all Home Manager generations?"
|
||||
msgstr "Pašalinti visas Home Manager generacijas?"
|
||||
|
||||
#: home-manager/home-manager:507
|
||||
msgid "All generations are now eligible for garbage collection."
|
||||
msgstr ""
|
||||
"Visos generacijos jau tinkamos šiukšlių surinkimui (garbage collection)."
|
||||
|
||||
#: home-manager/home-manager:510
|
||||
msgid "Leaving generations but they may still be garbage collected."
|
||||
msgstr ""
|
||||
|
||||
#: home-manager/home-manager:514
|
||||
msgid "Home Manager is uninstalled but your home.nix is left untouched."
|
||||
msgstr "Home Manager yra išdiegtas, bet jūsų home.nix liko nepaliestas."
|
||||
|
||||
#: home-manager/home-manager:673
|
||||
msgid "%s: unknown option '%s'"
|
||||
msgstr "%s: nežinomas pasirinkimas „%s“"
|
||||
|
||||
#: home-manager/home-manager:674
|
||||
msgid "Run '%s --help' for usage help"
|
||||
msgstr "Paleiskite „%s --help“, kad gautumėte naudojimosi instrukcijas"
|
||||
|
||||
#: home-manager/home-manager:708
|
||||
msgid "expire-generations expects one argument, got %d."
|
||||
msgstr "expire-generations tikisi vieno argumento, gauta %d."
|
||||
|
||||
#: home-manager/home-manager:730
|
||||
msgid "Unknown command: %s"
|
||||
msgstr "Nežinoma komanda: %s"
|
||||
|
||||
#: home-manager/install.nix:22
|
||||
msgid "Creating initial Home Manager configuration..."
|
||||
msgstr "Kuriama pradinė Home Manager konfigūracija..."
|
||||
|
||||
#: home-manager/install.nix:66
|
||||
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/install.nix:71
|
||||
msgid ""
|
||||
"All done! The home-manager tool should now be installed and you can edit\n"
|
||||
"\n"
|
||||
" %s\n"
|
||||
"\n"
|
||||
"to configure Home Manager. Run 'man home-configuration.nix' to\n"
|
||||
"see all available options."
|
||||
msgstr ""
|
||||
"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/install.nix:76
|
||||
msgid ""
|
||||
"Uh oh, the installation failed! Please create an issue at\n"
|
||||
"\n"
|
||||
" %s\n"
|
||||
"\n"
|
||||
"if the error seems to be the fault of Home Manager."
|
||||
msgstr ""
|
||||
|
||||
#: home-manager/install.nix:83
|
||||
msgid "This derivation is not buildable, please run it using nix-shell."
|
||||
msgstr ""
|
|
@ -8,16 +8,16 @@ msgstr ""
|
|||
"Project-Id-Version: Home Manager\n"
|
||||
"Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n"
|
||||
"POT-Creation-Date: 2022-03-26 15:08+0100\n"
|
||||
"PO-Revision-Date: 2021-12-13 20:50+0000\n"
|
||||
"Last-Translator: Allan Nordhøy <epost@anotheragency.no>\n"
|
||||
"Language-Team: Norwegian Bokmål <https://hosted.weblate.org/projects/home-"
|
||||
"manager/cli/nb_NO/>\n"
|
||||
"PO-Revision-Date: 2023-01-08 11:50+0000\n"
|
||||
"Last-Translator: Petter K <petterkarlsrud@me.com>\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.10-dev\n"
|
||||
"X-Generator: Weblate 4.15.1-dev\n"
|
||||
|
||||
#: home-manager/home-manager:60
|
||||
msgid "No configuration file found at %s"
|
||||
|
@ -139,12 +139,13 @@ msgid "Unknown command: %s"
|
|||
msgstr "Ukjent kommando: %s"
|
||||
|
||||
#: home-manager/install.nix:22
|
||||
#, fuzzy
|
||||
msgid "Creating initial Home Manager configuration..."
|
||||
msgstr ""
|
||||
msgstr "Oppretter ny Home Manager-konfigurasjon..."
|
||||
|
||||
#: home-manager/install.nix:66
|
||||
msgid "Creating initial Home Manager generation..."
|
||||
msgstr ""
|
||||
msgstr "Oppretter ny Home Manager-generasjon..."
|
||||
|
||||
#. translators: The "%s" specifier will be replaced by a file path.
|
||||
#: home-manager/install.nix:71
|
||||
|
|
|
@ -8,8 +8,8 @@ msgstr ""
|
|||
"Project-Id-Version: Home Manager\n"
|
||||
"Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n"
|
||||
"POT-Creation-Date: 2022-03-26 15:08+0100\n"
|
||||
"PO-Revision-Date: 2022-07-12 19:40+0000\n"
|
||||
"Last-Translator: Frederik Engels <frederik.engels92@gmail.com>\n"
|
||||
"PO-Revision-Date: 2022-11-16 13:47+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"
|
||||
|
@ -17,23 +17,23 @@ msgstr ""
|
|||
"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-dev\n"
|
||||
"X-Generator: Weblate 4.15-dev\n"
|
||||
|
||||
#: home-manager/home-manager:60
|
||||
msgid "No configuration file found at %s"
|
||||
msgstr ""
|
||||
msgstr "Geen configuratiebestand gevonden op %s"
|
||||
|
||||
#: home-manager/home-manager:79
|
||||
msgid "No configuration file found. Please create one at %s"
|
||||
msgstr ""
|
||||
msgstr "Geen configuratiebestand gevonden, maak er alstublieft een aan op %s"
|
||||
|
||||
#: home-manager/home-manager:122
|
||||
msgid "Can't inspect options of a flake configuration"
|
||||
msgstr ""
|
||||
msgstr "Kan de opties van een flake configuratie niet inspecteren"
|
||||
|
||||
#: home-manager/home-manager:162
|
||||
msgid "Can't instantiate a flake configuration"
|
||||
msgstr ""
|
||||
msgstr "Het is niet gelukt om de vlok-configuratie te creëren"
|
||||
|
||||
#: home-manager/home-manager:237
|
||||
msgid ""
|
||||
|
@ -43,66 +43,68 @@ 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:251
|
||||
msgid "Unknown \"news.display\" setting \"%s\"."
|
||||
msgstr ""
|
||||
msgstr "Onbekende \"new.display\" instelling \"%s\"."
|
||||
|
||||
#: home-manager/home-manager:258
|
||||
#, sh-format
|
||||
msgid "Please set the $EDITOR environment variable"
|
||||
msgstr ""
|
||||
msgstr "Gelieve de $EDITOR omgevingsvariabele in te stellen"
|
||||
|
||||
#: home-manager/home-manager:273
|
||||
msgid "Cannot run build in read-only directory"
|
||||
msgstr ""
|
||||
msgstr "Het is niet mogelijk om te bouwen in een read-only map"
|
||||
|
||||
#: home-manager/home-manager:355
|
||||
msgid "No generation with ID %s"
|
||||
msgstr ""
|
||||
msgstr "Geen generatie met de ID %s"
|
||||
|
||||
#: home-manager/home-manager:357
|
||||
msgid "Cannot remove the current generation %s"
|
||||
msgstr ""
|
||||
msgstr "Het is niet mogelijk om de huidige generatie %s te verwijderen"
|
||||
|
||||
#: home-manager/home-manager:359
|
||||
msgid "Removing generation %s"
|
||||
msgstr ""
|
||||
msgstr "Generatie %s aan het verwijderen"
|
||||
|
||||
#: home-manager/home-manager:385
|
||||
msgid "No generations to expire"
|
||||
msgstr ""
|
||||
msgstr "Geen generatie om te beëindigen"
|
||||
|
||||
#: home-manager/home-manager:396
|
||||
msgid "No home-manager packages seem to be installed."
|
||||
msgstr ""
|
||||
msgstr "Er lijkt geen home-manager pakket geïnstalleerd te zijn."
|
||||
|
||||
#: home-manager/home-manager:453
|
||||
msgid "Unknown argument %s"
|
||||
msgstr "Onbekend argument %s"
|
||||
|
||||
#: home-manager/home-manager:469
|
||||
#, fuzzy
|
||||
msgid "This will remove Home Manager from your system."
|
||||
msgstr "Dit zal Home Manager van jouw systeem verwijderen."
|
||||
|
||||
#: home-manager/home-manager:472
|
||||
#, fuzzy
|
||||
msgid "This is a dry run, nothing will actually be uninstalled."
|
||||
msgstr "Dit is een oefening, niks word werkelijk geinstalleerd."
|
||||
msgstr "Dit is een oefening, niets wordt werkelijk geïnstalleerd."
|
||||
|
||||
#: home-manager/home-manager:476
|
||||
msgid "Really uninstall Home Manager?"
|
||||
msgstr "Werkelijk Home Manager verwijderen?"
|
||||
msgstr "Wilt u zeker Home Manager verwijderen?"
|
||||
|
||||
#: home-manager/home-manager:481
|
||||
msgid "Switching to empty Home Manager configuration..."
|
||||
msgstr ""
|
||||
msgstr "Naar een lege Home Manager configuratie aan het veranderen..."
|
||||
|
||||
#: home-manager/home-manager:493
|
||||
msgid "Yay!"
|
||||
msgstr "Jaaa!"
|
||||
msgstr "Joepie!"
|
||||
|
||||
#: home-manager/home-manager:500
|
||||
msgid "Remove all Home Manager generations?"
|
||||
|
@ -114,7 +116,7 @@ msgstr "Alle generaties zijn nu in aanmerking voor afvalinzameling."
|
|||
|
||||
#: home-manager/home-manager:510
|
||||
msgid "Leaving generations but they may still be garbage collected."
|
||||
msgstr ""
|
||||
msgstr "Generaties blijven momenteel bestaan maar worden later opgekuist."
|
||||
|
||||
#: home-manager/home-manager:514
|
||||
msgid "Home Manager is uninstalled but your home.nix is left untouched."
|
||||
|
@ -126,11 +128,11 @@ msgstr "%s: onbekende keuze '%s'"
|
|||
|
||||
#: home-manager/home-manager:674
|
||||
msgid "Run '%s --help' for usage help"
|
||||
msgstr ""
|
||||
msgstr "Voer '%s --help' in om gebruiksinfo te zien"
|
||||
|
||||
#: home-manager/home-manager:708
|
||||
msgid "expire-generations expects one argument, got %d."
|
||||
msgstr ""
|
||||
msgstr "expire-generations verwacht één argument, maar kreeg er %d."
|
||||
|
||||
#: home-manager/home-manager:730
|
||||
msgid "Unknown command: %s"
|
||||
|
@ -138,11 +140,11 @@ msgstr "Onbekende opdracht: %s"
|
|||
|
||||
#: home-manager/install.nix:22
|
||||
msgid "Creating initial Home Manager configuration..."
|
||||
msgstr ""
|
||||
msgstr "Initiële Home Manager configuratie aan het maken..."
|
||||
|
||||
#: home-manager/install.nix:66
|
||||
msgid "Creating initial Home Manager generation..."
|
||||
msgstr ""
|
||||
msgstr "Initiële Home Manager generatie aan het maken..."
|
||||
|
||||
#. translators: The "%s" specifier will be replaced by a file path.
|
||||
#: home-manager/install.nix:71
|
||||
|
@ -154,6 +156,14 @@ msgid ""
|
|||
"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/install.nix:76
|
||||
|
@ -164,9 +174,13 @@ msgid ""
|
|||
"\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."
|
||||
|
||||
#: home-manager/install.nix:83
|
||||
#, fuzzy
|
||||
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-"
|
||||
|
|
|
@ -1,41 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# 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}"
|
||||
}
|
|
@ -23,7 +23,7 @@ function setupColors() {
|
|||
if [[ ! -v NO_COLOR && -t 1 ]]; then
|
||||
# See if it supports colors.
|
||||
local ncolors
|
||||
ncolors=$(tput colors)
|
||||
ncolors=$(tput colors 2> /dev/null || echo 0)
|
||||
|
||||
if [[ -n "$ncolors" && "$ncolors" -ge 8 ]]; then
|
||||
normalColor="$(tput sgr0)"
|
||||
|
|
|
@ -44,6 +44,19 @@ 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;
|
||||
|
|
|
@ -97,7 +97,7 @@ in {
|
|||
description = ''
|
||||
Cursor configuration. Set to <literal>null</literal> to disable.
|
||||
</para><para>
|
||||
Top-level options declared under this submodule are backend indepedent
|
||||
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
|
||||
|
@ -131,8 +131,8 @@ in {
|
|||
# https://github.com/nix-community/home-manager/issues/2812
|
||||
# https://wiki.archlinux.org/title/Cursor_themes#Environment_variable
|
||||
home.sessionVariables = {
|
||||
XCURSOR_PATH = "$XCURSOR_PATH\${XCURSOR_PATH:+:}"
|
||||
+ "${config.home.profileDirectory}/share/icons";
|
||||
XCURSOR_PATH = mkDefault ("$XCURSOR_PATH\${XCURSOR_PATH:+:}"
|
||||
+ "${config.home.profileDirectory}/share/icons");
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ with lib;
|
|||
|
||||
let
|
||||
|
||||
cfg = config.home.file;
|
||||
cfg = filterAttrs (n: f: f.enable) config.home.file;
|
||||
|
||||
homeDirectory = config.home.homeDirectory;
|
||||
|
||||
|
@ -185,8 +185,9 @@ in
|
|||
$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 -nsf $VERBOSE_ARG "$sourcePath" "$targetPath"
|
||||
$DRY_RUN_CMD ln -Tsf $VERBOSE_ARG "$sourcePath" "$targetPath" || exit 1
|
||||
fi
|
||||
done
|
||||
'';
|
||||
|
|
|
@ -256,7 +256,7 @@ in
|
|||
|
||||
home.sessionVariables = mkOption {
|
||||
default = {};
|
||||
type = types.attrs;
|
||||
type = with types; lazyAttrsOf (oneOf [ str path int float ]);
|
||||
example = { EDITOR = "emacs"; GS_OPTIONS = "-sPAPERSIZE=a4"; };
|
||||
description = ''
|
||||
Environment variables to always set at login.
|
||||
|
@ -346,12 +346,18 @@ 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 used.
|
||||
<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.
|
||||
'';
|
||||
};
|
||||
|
||||
|
@ -581,7 +587,6 @@ in
|
|||
if [[ -e "$nixProfilePath"/manifest.json ]] ; then
|
||||
nix profile list \
|
||||
| { grep 'home-manager-path$' || test $? = 1; } \
|
||||
| awk -F ' ' '{ print $4 }' \
|
||||
| cut -d ' ' -f 4 \
|
||||
| xargs -t $DRY_RUN_CMD nix profile remove $VERBOSE_ARG
|
||||
else
|
||||
|
@ -592,22 +597,36 @@ in
|
|||
''
|
||||
else
|
||||
''
|
||||
function nixReplaceProfile() {
|
||||
local oldNix="$(command -v nix)"
|
||||
|
||||
nix profile list \
|
||||
| { grep 'home-manager-path$' || test $? = 1; } \
|
||||
| cut -d ' ' -f 4 \
|
||||
| xargs -t $DRY_RUN_CMD nix profile remove $VERBOSE_ARG
|
||||
|
||||
$DRY_RUN_CMD $oldNix profile install $1
|
||||
}
|
||||
|
||||
if [[ -e "$nixProfilePath"/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
|
||||
|
||||
if ! $DRY_RUN_CMD $INSTALL_CMD ${cfg.path} ; then
|
||||
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"
|
||||
exit 1
|
||||
fi
|
||||
unset INSTALL_CMD LIST_CMD REMOVE_CMD_SYNTAX
|
||||
unset -f nixReplaceProfile
|
||||
unset INSTALL_CMD INSTALL_CMD_ACTUAL LIST_CMD REMOVE_CMD_SYNTAX
|
||||
''
|
||||
);
|
||||
|
||||
|
@ -659,7 +678,16 @@ in
|
|||
gnugrep
|
||||
gnused
|
||||
ncurses # For `tput`.
|
||||
] ++ config.home.extraActivationPath
|
||||
]
|
||||
++ 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)))"
|
||||
)
|
||||
+ optionalString (!cfg.emptyActivationPath) "\${PATH:+:}$PATH";
|
||||
|
||||
|
@ -685,6 +713,8 @@ in
|
|||
''
|
||||
mkdir -p $out
|
||||
|
||||
echo "${config.home.version.full}" > $out/hm-version
|
||||
|
||||
cp ${activationScript} $out/activate
|
||||
|
||||
mkdir $out/bin
|
||||
|
|
|
@ -24,6 +24,7 @@ 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";
|
||||
|
|
|
@ -162,12 +162,12 @@ in {
|
|||
fi
|
||||
if [[ -f "$dstPath" ]]; then
|
||||
for (( i = 0; i < bootout_retries; i++ )); do
|
||||
$DRY_RUN_CMD launchctl bootout "$domain/$agentName" || err=$?
|
||||
$DRY_RUN_CMD /bin/launchctl bootout "$domain/$agentName" || err=$?
|
||||
if [[ -v DRY_RUN ]]; then
|
||||
break
|
||||
fi
|
||||
if (( err != 9216 )) &&
|
||||
! launchctl print "$domain/$agentName" &> /dev/null; then
|
||||
! /bin/launchctl print "$domain/$agentName" &> /dev/null; then
|
||||
break
|
||||
fi
|
||||
sleep 1
|
||||
|
@ -178,7 +178,7 @@ in {
|
|||
fi
|
||||
fi
|
||||
$DRY_RUN_CMD install -Dm444 -T "$srcPath" "$dstPath"
|
||||
$DRY_RUN_CMD launchctl bootstrap "$domain" "$dstPath"
|
||||
$DRY_RUN_CMD /bin/launchctl bootstrap "$domain" "$dstPath"
|
||||
done
|
||||
|
||||
if [[ ! -e "$oldDir" ]]; then
|
||||
|
@ -194,7 +194,7 @@ in {
|
|||
continue
|
||||
fi
|
||||
|
||||
$DRY_RUN_CMD launchctl bootout "$domain/$agentName" || :
|
||||
$DRY_RUN_CMD /bin/launchctl bootout "$domain/$agentName" || :
|
||||
if [[ ! -e "$dstPath" ]]; then
|
||||
continue
|
||||
fi
|
||||
|
|
|
@ -39,19 +39,19 @@ with lib;
|
|||
default = null;
|
||||
description = ''
|
||||
This optional key is used as a hint to <literal>launchctl(1)</literal> that it should not submit this job to launchd when
|
||||
loading a job or jobs. The value of this key does NOT reflect the current state of the job on the run-ning running
|
||||
ning system. If you wish to know whether a job is loaded in launchd, reading this key from a configura-tion configuration
|
||||
tion file yourself is not a sufficient test. You should query launchd for the presence of the job using
|
||||
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 necessar-ily necessarily
|
||||
ily the value that <literal>launchctl(1)</literal> will apply. See <literal>launchctl(1)</literal> for more information.
|
||||
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 crite-ria criteria
|
||||
ria are insufficient to describe the conditions under which your job needs to run. The cost to have a
|
||||
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.
|
||||
'';
|
||||
|
@ -147,8 +147,7 @@ with lib;
|
|||
type = types.nullOr types.bool;
|
||||
default = null;
|
||||
description = ''
|
||||
This flag causes launchd to use the <literal>glob(3)</literal> mechanism to update the program arguments before invoca-tion. invocation.
|
||||
tion.
|
||||
This flag causes launchd to use the <literal>glob(3)</literal> mechanism to update the program arguments before invocation.
|
||||
'';
|
||||
};
|
||||
|
||||
|
@ -236,12 +235,12 @@ with lib;
|
|||
description = ''
|
||||
This optional key is used to control whether your job is to be kept continuously running or to let
|
||||
demand and conditions control the invocation. The default is false and therefore only demand will start
|
||||
the job. The value may be set to true to unconditionally keep the job alive. Alternatively, a dictio-nary dictionary
|
||||
nary of conditions may be specified to selectively control whether launchd keeps a job alive or not. If
|
||||
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.
|
||||
be throttled to conserve system resources.
|
||||
'';
|
||||
};
|
||||
|
||||
|
@ -677,8 +676,8 @@ with lib;
|
|||
XPC connections. See <literal>xpc_transaction_begin(3)</literal> for details.
|
||||
|
||||
Interactive
|
||||
Interactive jobs run with the same resource limitations as apps, that is to say, none. Interac-tive Interactive
|
||||
tive jobs are critical to maintaining a responsive user experience, and this key should only be
|
||||
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.
|
||||
'';
|
||||
};
|
||||
|
@ -687,8 +686,8 @@ with lib;
|
|||
type = types.nullOr types.bool;
|
||||
default = null;
|
||||
description = ''
|
||||
When a job dies, launchd kills any remaining processes with the same process group ID as the job. Set-ting Setting
|
||||
ting this key to true disables that behavior.
|
||||
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.
|
||||
'';
|
||||
};
|
||||
|
||||
|
@ -753,9 +752,9 @@ with lib;
|
|||
description = ''
|
||||
This optional key is used to specify launch on demand sockets that can be used to let launchd know when
|
||||
to run the job. The job must check-in to get a copy of the file descriptors using APIs outlined in
|
||||
launch(3). The keys of the top level Sockets dictionary can be anything. They are meant for the appli-cation application
|
||||
cation developer to use to differentiate which descriptors correspond to which application level proto-cols protocols
|
||||
cols (e.g. http vs. ftp vs. DNS...). At check-in time, the value of each Sockets dictionary key will
|
||||
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.
|
||||
|
@ -829,8 +828,8 @@ with lib;
|
|||
default = null;
|
||||
description = ''
|
||||
This optional key is a variant of SockPathName. Instead of binding to a known path, a securely
|
||||
generated socket is created and the path is assigned to the environment variable that is inher-ited inherited
|
||||
ited by all jobs spawned by launchd.
|
||||
generated socket is created and the path is assigned to the environment variable that is inherited
|
||||
by all jobs spawned by launchd.
|
||||
'';
|
||||
};
|
||||
|
||||
|
|
|
@ -1,39 +0,0 @@
|
|||
# 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}"
|
||||
}
|
|
@ -15,6 +15,14 @@ in
|
|||
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:
|
||||
|
|
|
@ -20,6 +20,7 @@ let
|
|||
arrayOf = t: "a${t}";
|
||||
maybeOf = t: "m${t}";
|
||||
tupleOf = ts: "(${concatStrings ts})";
|
||||
dictionaryEntryOf = ts: "{${concatStrings ts}}";
|
||||
string = "s";
|
||||
boolean = "b";
|
||||
uchar = "y";
|
||||
|
@ -30,6 +31,7 @@ let
|
|||
int64 = "x";
|
||||
uint64 = "t";
|
||||
double = "d";
|
||||
variant = "v";
|
||||
};
|
||||
|
||||
# Returns the GVariant type of a given Nix value. If no type can be
|
||||
|
@ -74,13 +76,13 @@ in rec {
|
|||
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
|
||||
|
@ -105,6 +107,21 @@ 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;
|
||||
|
|
|
@ -37,12 +37,28 @@
|
|||
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";
|
||||
}];
|
||||
};
|
||||
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";
|
||||
|
@ -101,6 +117,12 @@
|
|||
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";
|
||||
|
@ -211,6 +233,12 @@
|
|||
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";
|
||||
|
@ -289,6 +317,12 @@
|
|||
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";
|
||||
|
@ -317,4 +351,20 @@
|
|||
github = "lukasngl";
|
||||
githubId = 69244516;
|
||||
};
|
||||
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";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -55,7 +55,7 @@ in rec {
|
|||
};
|
||||
|
||||
size = mkOption {
|
||||
type = types.nullOr types.int;
|
||||
type = types.nullOr types.number;
|
||||
default = null;
|
||||
example = "8";
|
||||
description = ''
|
||||
|
@ -95,6 +95,10 @@ in rec {
|
|||
mergeOneOption loc defs
|
||||
else if gvar.isMaybe sharedDefType && allChecked then
|
||||
mergeOneOption loc defs
|
||||
else if gvar.isDictionaryEntry sharedDefType && allChecked then
|
||||
mergeOneOption loc defs
|
||||
else if gvar.type.variant == sharedDefType && allChecked then
|
||||
mergeOneOption loc defs
|
||||
else if gvar.type.string == sharedDefType && allChecked then
|
||||
types.str.merge loc defs
|
||||
else if gvar.type.double == sharedDefType && allChecked then
|
||||
|
|
|
@ -10,6 +10,14 @@ let
|
|||
|
||||
mkIniKeyValue = key: value: "${key}=${toString (hm.gvariant.mkValue value)}";
|
||||
|
||||
# The dconf keys managed by this configuration. We store this as part of the
|
||||
# generation state to be able to reset keys that become unmanaged during
|
||||
# switch.
|
||||
stateDconfKeys = pkgs.writeText "dconf-keys.json" (builtins.toJSON
|
||||
(concatLists (mapAttrsToList
|
||||
(dir: entries: mapAttrsToList (key: _: "/${dir}/${key}") entries)
|
||||
cfg.settings)));
|
||||
|
||||
in {
|
||||
meta.maintainers = [ maintainers.rycee ];
|
||||
|
||||
|
@ -54,22 +62,58 @@ in {
|
|||
# Make sure the dconf directory exists.
|
||||
xdg.configFile."dconf/.keep".source = builtins.toFile "keep" "";
|
||||
|
||||
home.activation.dconfSettings = hm.dag.entryAfter [ "installPackages" ]
|
||||
(let iniFile = pkgs.writeText "hm-dconf.ini" (toDconfIni cfg.settings);
|
||||
in ''
|
||||
if [[ -v DBUS_SESSION_BUS_ADDRESS ]]; then
|
||||
DCONF_DBUS_RUN_SESSION=""
|
||||
else
|
||||
DCONF_DBUS_RUN_SESSION="${pkgs.dbus}/bin/dbus-run-session"
|
||||
home.extraBuilderCommands = ''
|
||||
mkdir -p $out/state/
|
||||
ln -s ${stateDconfKeys} $out/state/${stateDconfKeys.name}
|
||||
'';
|
||||
|
||||
home.activation.dconfSettings = hm.dag.entryAfter [ "installPackages" ] (let
|
||||
iniFile = pkgs.writeText "hm-dconf.ini" (toDconfIni cfg.settings);
|
||||
|
||||
statePath = "state/${stateDconfKeys.name}";
|
||||
|
||||
cleanup = pkgs.writeShellScript "dconf-cleanup" ''
|
||||
set -euo pipefail
|
||||
|
||||
${config.lib.bash.initHomeManagerLib}
|
||||
|
||||
PATH=${makeBinPath [ pkgs.dconf pkgs.jq ]}''${PATH:+:}$PATH
|
||||
|
||||
oldState="$1"
|
||||
newState="$2"
|
||||
|
||||
# Can't do cleanup if we don't know the old state.
|
||||
if [[ ! -f $oldState ]]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [[ -v DRY_RUN ]]; then
|
||||
echo $DCONF_DBUS_RUN_SESSION ${pkgs.dconf}/bin/dconf load / "<" ${iniFile}
|
||||
else
|
||||
$DCONF_DBUS_RUN_SESSION ${pkgs.dconf}/bin/dconf load / < ${iniFile}
|
||||
fi
|
||||
# Reset all keys that are present in the old generation but not the new
|
||||
# one.
|
||||
jq -r -n \
|
||||
--slurpfile old "$oldState" \
|
||||
--slurpfile new "$newState" \
|
||||
'($old[] - $new[])[]' \
|
||||
| while read -r key; do
|
||||
$VERBOSE_ECHO "Resetting dconf key \"$key\""
|
||||
$DRY_RUN_CMD $DCONF_DBUS_RUN_SESSION dconf reset "$key"
|
||||
done
|
||||
'';
|
||||
in ''
|
||||
if [[ -v DBUS_SESSION_BUS_ADDRESS ]]; then
|
||||
export DCONF_DBUS_RUN_SESSION=""
|
||||
else
|
||||
export DCONF_DBUS_RUN_SESSION="${pkgs.dbus}/bin/dbus-run-session --dbus-daemon=${pkgs.dbus}/bin/dbus-daemon"
|
||||
fi
|
||||
|
||||
unset DCONF_DBUS_RUN_SESSION
|
||||
'');
|
||||
if [[ -v oldGenPath ]]; then
|
||||
${cleanup} \
|
||||
"$oldGenPath/${statePath}" \
|
||||
"$newGenPath/${statePath}"
|
||||
fi
|
||||
|
||||
$DRY_RUN_CMD $DCONF_DBUS_RUN_SESSION ${pkgs.dconf}/bin/dconf load / < ${iniFile}
|
||||
|
||||
unset DCONF_DBUS_RUN_SESSION
|
||||
'');
|
||||
};
|
||||
}
|
||||
|
|
|
@ -696,6 +696,225 @@ in
|
|||
A new module is available: 'programs.gallery-dl'.
|
||||
'';
|
||||
}
|
||||
|
||||
{
|
||||
time = "2022-09-21T22:42:42+00:00";
|
||||
condition = hostPlatform.isLinux;
|
||||
message = ''
|
||||
A new module is available: 'xsession.windowManager.fluxbox'.
|
||||
'';
|
||||
}
|
||||
|
||||
{
|
||||
time = "2022-09-25T21:00:05+00:00";
|
||||
condition = hostPlatform.isLinux;
|
||||
message = ''
|
||||
A new module is available: 'services.safeeyes'.
|
||||
'';
|
||||
}
|
||||
|
||||
{
|
||||
time = "2022-09-25T22:22:17+00:00";
|
||||
message = ''
|
||||
A new module is available: 'programs.tmate'.
|
||||
'';
|
||||
}
|
||||
|
||||
{
|
||||
time = "2022-09-29T13:43:02+00:00";
|
||||
message = ''
|
||||
A new module is available: 'programs.pls'.
|
||||
'';
|
||||
}
|
||||
|
||||
{
|
||||
time = "2022-10-06T23:06:08+00:00";
|
||||
message = ''
|
||||
A new module is available: 'programs.ledger'.
|
||||
'';
|
||||
}
|
||||
|
||||
{
|
||||
time = "2022-10-06T23:19:10+00:00";
|
||||
condition = hostPlatform.isLinux;
|
||||
message = ''
|
||||
A new module is available: 'programs.havoc'.
|
||||
'';
|
||||
}
|
||||
|
||||
{
|
||||
time = "2022-10-12T23:10:48+00:00";
|
||||
message = ''
|
||||
A new module is available: 'programs.discocss'.
|
||||
'';
|
||||
}
|
||||
|
||||
{
|
||||
time = "2022-10-16T19:49:46+00:00";
|
||||
condition = hostPlatform.isLinux;
|
||||
message = ''
|
||||
Two new modules are available:
|
||||
|
||||
- 'programs.borgmatic' and
|
||||
- 'services.borgmatic'.
|
||||
|
||||
use the first to configure the borgmatic tool and the second if you
|
||||
want to automatically run scheduled backups.
|
||||
'';
|
||||
}
|
||||
|
||||
{
|
||||
time = "2022-10-18T08:07:43+00:00";
|
||||
condition = hostPlatform.isLinux;
|
||||
message = ''
|
||||
A new module is available: 'programs.looking-glass-client'.
|
||||
'';
|
||||
}
|
||||
|
||||
{
|
||||
time = "2022-10-22T17:52:30+00:00";
|
||||
condition = config.programs.firefox.enable;
|
||||
message = ''
|
||||
It is now possible to configure the default search engine in Firefox
|
||||
with
|
||||
|
||||
programs.firefox.profiles.<name>.search.default
|
||||
|
||||
and add custom engines with
|
||||
|
||||
programs.firefox.profiles.<name>.search.engines.
|
||||
|
||||
It is also recommended to set
|
||||
|
||||
programs.firefox.profiles.<name>.search.force = true
|
||||
|
||||
since Firefox will replace the symlink for the search configuration on
|
||||
every launch, but note that you'll lose any existing configuration by
|
||||
enabling this.
|
||||
'';
|
||||
}
|
||||
|
||||
{
|
||||
time = "2022-10-24T22:05:27+00:00";
|
||||
message = ''
|
||||
A new module is available: 'programs.k9s'.
|
||||
'';
|
||||
}
|
||||
|
||||
{
|
||||
time = "2022-11-01T23:57:50+00:00";
|
||||
message = ''
|
||||
A new module is available: 'programs.oh-my-posh'.
|
||||
'';
|
||||
}
|
||||
|
||||
{
|
||||
time = "2022-11-02T10:56:14+00:00";
|
||||
condition = hostPlatform.isLinux;
|
||||
message = ''
|
||||
A new module is available: 'xfconf'.
|
||||
'';
|
||||
}
|
||||
|
||||
{
|
||||
time = "2022-11-04T14:56:46+00:00";
|
||||
condition = hostPlatform.isLinux;
|
||||
message = ''
|
||||
A new module is available: 'programs.thunderbird'.
|
||||
'';
|
||||
}
|
||||
|
||||
{
|
||||
time = "2022-11-13T09:05:51+00:00";
|
||||
condition = hostPlatform.isDarwin;
|
||||
message = ''
|
||||
A new module is available: 'programs.thunderbird'.
|
||||
|
||||
Please note that the Thunderbird packages provided by Nix are
|
||||
currently not working on macOS. The module can still be used to manage
|
||||
configuration files by installing Thunderbird manually and setting the
|
||||
'programs.thunderbird.package' option to a dummy package, for example
|
||||
using 'pkgs.runCommand'.
|
||||
|
||||
This module requires you to set the following environment variables
|
||||
when using an installation of Thunderbird that is not provided by Nix:
|
||||
|
||||
export MOZ_LEGACY_PROFILES=1
|
||||
export MOZ_ALLOW_DOWNGRADE=1
|
||||
'';
|
||||
}
|
||||
|
||||
{
|
||||
time = "2022-11-27T13:14:01+00:00";
|
||||
condition = config.programs.ssh.enable;
|
||||
message = ''
|
||||
'programs.ssh.matchBlocks.*' now supports literal 'Match' blocks via
|
||||
'programs.ssh.matchBlocks.*.match' option as an alternative to plain
|
||||
'Host' blocks
|
||||
'';
|
||||
}
|
||||
|
||||
{
|
||||
time = "2022-12-16T15:01:20+00:00";
|
||||
condition = hostPlatform.isLinux;
|
||||
message = ''
|
||||
A new module is available: 'services.megasync'.
|
||||
'';
|
||||
}
|
||||
|
||||
{
|
||||
time = "2022-12-25T08:41:32+00:00";
|
||||
condition = hostPlatform.isLinux;
|
||||
message = ''
|
||||
A new module is available: 'services.cachix-agent'.
|
||||
'';
|
||||
}
|
||||
|
||||
{
|
||||
time = "2022-12-28T21:48:22+00:00";
|
||||
condition = hostPlatform.isLinux;
|
||||
message = ''
|
||||
A new module is available: 'services.clipman'.
|
||||
'';
|
||||
}
|
||||
|
||||
{
|
||||
time = "2023-01-07T10:47:03+00:00";
|
||||
condition = hostPlatform.isLinux;
|
||||
message = ''
|
||||
'xsession.windowManager.i3.config.[window|floating].titlebar' and
|
||||
'wayland.windowManager.sway.config.[window|floating].titlebar' now default to 'true'.
|
||||
'';
|
||||
}
|
||||
|
||||
{
|
||||
time = "2023-01-28T17:35:49+00:00";
|
||||
message = ''
|
||||
A new module is available: 'programs.papis'.
|
||||
'';
|
||||
}
|
||||
|
||||
{
|
||||
time = "2023-01-30T10:39:11+00:00";
|
||||
message = ''
|
||||
A new module is available: 'programs.wlogout'.
|
||||
'';
|
||||
}
|
||||
|
||||
{
|
||||
time = "2023-01-31T22:08:41+00:00";
|
||||
message = ''
|
||||
A new module is available: 'programs.rbenv'.
|
||||
'';
|
||||
}
|
||||
|
||||
{
|
||||
time = "2023-02-02T20:49:05+00:00";
|
||||
condition = hostPlatform.isLinux;
|
||||
message = ''
|
||||
A new module is available: 'services.autorandr'.
|
||||
'';
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -202,7 +202,7 @@ in {
|
|||
<citerefentry>
|
||||
<refentrytitle>nix.conf</refentrytitle>
|
||||
<manvolnum>5</manvolnum>
|
||||
</citerefentry> for avalaible options.
|
||||
</citerefentry> for available options.
|
||||
The value declared here will be translated directly to the key-value pairs Nix expects.
|
||||
</para>
|
||||
<para>
|
||||
|
|
|
@ -16,6 +16,7 @@ with lib;
|
|||
"21.11"
|
||||
"22.05"
|
||||
"22.11"
|
||||
"23.05"
|
||||
];
|
||||
description = ''
|
||||
It is occasionally necessary for Home Manager to change
|
||||
|
@ -30,5 +31,39 @@ with lib;
|
|||
conversion or moving files.
|
||||
'';
|
||||
};
|
||||
|
||||
home.version = {
|
||||
full = mkOption {
|
||||
internal = true;
|
||||
readOnly = true;
|
||||
type = types.str;
|
||||
default = let
|
||||
inherit (config.home.version) release revision;
|
||||
suffix =
|
||||
optionalString (revision != null) "+${substring 0 8 revision}";
|
||||
in "${release}${suffix}";
|
||||
example = "22.11+213a0629";
|
||||
description = "The full Home Manager version.";
|
||||
};
|
||||
|
||||
release = mkOption {
|
||||
internal = true;
|
||||
readOnly = true;
|
||||
type = types.str;
|
||||
default = fileContents ../../.release;
|
||||
example = "22.11";
|
||||
description = "The Home Manager release.";
|
||||
};
|
||||
|
||||
revision = mkOption {
|
||||
internal = true;
|
||||
type = types.nullOr types.str;
|
||||
default = let gitRepo = "${toString ./../..}/.git";
|
||||
in if pathIsGitRepo gitRepo then commitIdFromGitRepo gitRepo else null;
|
||||
description = ''
|
||||
The Git revision from which this Home Manager configuration was built.
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -33,50 +33,66 @@ in {
|
|||
# https://gitlab.freedesktop.org/xdg/xdg-user-dirs/blob/master/man/user-dirs.dirs.xml
|
||||
|
||||
desktop = mkOption {
|
||||
type = with types; coercedTo path toString str;
|
||||
default = "$HOME/Desktop";
|
||||
type = with types; nullOr (coercedTo path toString str);
|
||||
default = "${config.home.homeDirectory}/Desktop";
|
||||
defaultText =
|
||||
literalExpression ''"''${config.home.homeDirectory}/Desktop"'';
|
||||
description = "The Desktop directory.";
|
||||
};
|
||||
|
||||
documents = mkOption {
|
||||
type = with types; coercedTo path toString str;
|
||||
default = "$HOME/Documents";
|
||||
type = with types; nullOr (coercedTo path toString str);
|
||||
default = "${config.home.homeDirectory}/Documents";
|
||||
defaultText =
|
||||
literalExpression ''"''${config.home.homeDirectory}/Documents"'';
|
||||
description = "The Documents directory.";
|
||||
};
|
||||
|
||||
download = mkOption {
|
||||
type = with types; coercedTo path toString str;
|
||||
default = "$HOME/Downloads";
|
||||
type = with types; nullOr (coercedTo path toString str);
|
||||
default = "${config.home.homeDirectory}/Downloads";
|
||||
defaultText =
|
||||
literalExpression ''"''${config.home.homeDirectory}/Downloads"'';
|
||||
description = "The Downloads directory.";
|
||||
};
|
||||
|
||||
music = mkOption {
|
||||
type = with types; coercedTo path toString str;
|
||||
default = "$HOME/Music";
|
||||
type = with types; nullOr (coercedTo path toString str);
|
||||
default = "${config.home.homeDirectory}/Music";
|
||||
defaultText =
|
||||
literalExpression ''"''${config.home.homeDirectory}/Music"'';
|
||||
description = "The Music directory.";
|
||||
};
|
||||
|
||||
pictures = mkOption {
|
||||
type = with types; coercedTo path toString str;
|
||||
default = "$HOME/Pictures";
|
||||
type = with types; nullOr (coercedTo path toString str);
|
||||
default = "${config.home.homeDirectory}/Pictures";
|
||||
defaultText =
|
||||
literalExpression ''"''${config.home.homeDirectory}/Pictures"'';
|
||||
description = "The Pictures directory.";
|
||||
};
|
||||
|
||||
publicShare = mkOption {
|
||||
type = with types; coercedTo path toString str;
|
||||
default = "$HOME/Public";
|
||||
type = with types; nullOr (coercedTo path toString str);
|
||||
default = "${config.home.homeDirectory}/Public";
|
||||
defaultText =
|
||||
literalExpression ''"''${config.home.homeDirectory}/Public"'';
|
||||
description = "The Public share directory.";
|
||||
};
|
||||
|
||||
templates = mkOption {
|
||||
type = with types; coercedTo path toString str;
|
||||
default = "$HOME/Templates";
|
||||
type = with types; nullOr (coercedTo path toString str);
|
||||
default = "${config.home.homeDirectory}/Templates";
|
||||
defaultText =
|
||||
literalExpression ''"''${config.home.homeDirectory}/Templates"'';
|
||||
description = "The Templates directory.";
|
||||
};
|
||||
|
||||
videos = mkOption {
|
||||
type = with types; coercedTo path toString str;
|
||||
default = "$HOME/Videos";
|
||||
type = with types; nullOr (coercedTo path toString str);
|
||||
default = "${config.home.homeDirectory}/Videos";
|
||||
defaultText =
|
||||
literalExpression ''"''${config.home.homeDirectory}/Videos"'';
|
||||
description = "The Videos directory.";
|
||||
};
|
||||
|
||||
|
@ -86,7 +102,7 @@ in {
|
|||
defaultText = literalExpression "{ }";
|
||||
example = literalExpression ''
|
||||
{
|
||||
XDG_MISC_DIR = "$HOME/Misc";
|
||||
XDG_MISC_DIR = "''${config.home.homeDirectory}/Misc";
|
||||
}
|
||||
'';
|
||||
description = "Other user directories.";
|
||||
|
@ -97,7 +113,7 @@ in {
|
|||
};
|
||||
|
||||
config = let
|
||||
directories = {
|
||||
directories = (filterAttrs (n: v: !isNull v) {
|
||||
XDG_DESKTOP_DIR = cfg.desktop;
|
||||
XDG_DOCUMENTS_DIR = cfg.documents;
|
||||
XDG_DOWNLOAD_DIR = cfg.download;
|
||||
|
@ -106,7 +122,7 @@ in {
|
|||
XDG_PUBLICSHARE_DIR = cfg.publicShare;
|
||||
XDG_TEMPLATES_DIR = cfg.templates;
|
||||
XDG_VIDEOS_DIR = cfg.videos;
|
||||
} // cfg.extraConfig;
|
||||
}) // cfg.extraConfig;
|
||||
in mkIf cfg.enable {
|
||||
assertions =
|
||||
[ (hm.assertions.assertPlatform "xdg.userDirs" pkgs platforms.linux) ];
|
||||
|
|
102
modules/misc/xfconf.nix
Normal file
102
modules/misc/xfconf.nix
Normal file
|
@ -0,0 +1,102 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
|
||||
cfg = config.xfconf;
|
||||
|
||||
withType = v:
|
||||
if builtins.isBool v then [
|
||||
"-t"
|
||||
"bool"
|
||||
"-s"
|
||||
(if v then "true" else "false")
|
||||
] else if builtins.isInt v then [
|
||||
"-t"
|
||||
"int"
|
||||
"-s"
|
||||
(toString v)
|
||||
] else if builtins.isFloat v then [
|
||||
"-t"
|
||||
"double"
|
||||
"-s"
|
||||
(toString v)
|
||||
] else if builtins.isString v then [
|
||||
"-t"
|
||||
"string"
|
||||
"-s"
|
||||
v
|
||||
] else if builtins.isList v then
|
||||
[ "-a" ] ++ concatMap withType v
|
||||
else
|
||||
throw "unexpected xfconf type: ${builtins.typeOf v}";
|
||||
|
||||
in {
|
||||
meta.maintainers = [ maintainers.chuangzhu ];
|
||||
|
||||
options.xfconf = {
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
visible = false;
|
||||
description = ''
|
||||
Whether to enable Xfconf settings.
|
||||
</para><para>
|
||||
Note, if you use NixOS then you must add
|
||||
<code>programs.xfconf.enable = true</code>
|
||||
to your system configuration. Otherwise you will see a systemd error
|
||||
message when your configuration is activated.
|
||||
'';
|
||||
};
|
||||
|
||||
settings = mkOption {
|
||||
type = with types;
|
||||
attrsOf (attrsOf (oneOf [
|
||||
bool
|
||||
int
|
||||
float
|
||||
str
|
||||
(listOf (oneOf [ bool int float str ]))
|
||||
])) // {
|
||||
description = "xfconf settings";
|
||||
};
|
||||
default = { };
|
||||
example = literalExpression ''
|
||||
{
|
||||
xfce4-session = {
|
||||
"startup/ssh-agent/enabled" = false;
|
||||
"general/LockCommand" = "''${pkgs.lightdm}/bin/dm-tool lock";
|
||||
};
|
||||
xfce4-desktop = {
|
||||
"backdrop/screen0/monitorLVDS-1/workspace0/last-image" =
|
||||
"''${pkgs.nixos-artwork.wallpapers.stripes-logo.gnomeFilePath}";
|
||||
};
|
||||
}
|
||||
'';
|
||||
description = ''
|
||||
Settings to write to the Xfconf configuration system.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf (cfg.enable && cfg.settings != { }) {
|
||||
assertions =
|
||||
[ (hm.assertions.assertPlatform "xfconf" pkgs platforms.linux) ];
|
||||
|
||||
home.activation.xfconfSettings = hm.dag.entryAfter [ "installPackages" ]
|
||||
(let
|
||||
mkCommand = channel: property: value: ''
|
||||
$DRY_RUN_CMD ${pkgs.xfce.xfconf}/bin/xfconf-query \
|
||||
${
|
||||
escapeShellArgs
|
||||
([ "-n" "-c" channel "-p" "/${property}" ] ++ withType value)
|
||||
}
|
||||
'';
|
||||
|
||||
commands = mapAttrsToList
|
||||
(channel: properties: mapAttrsToList (mkCommand channel) properties)
|
||||
cfg.settings;
|
||||
in concatMapStrings concatStrings commands);
|
||||
};
|
||||
}
|
|
@ -43,6 +43,7 @@ let
|
|||
./misc/xdg-system-dirs.nix
|
||||
./misc/xdg-user-dirs.nix
|
||||
./misc/xdg.nix
|
||||
./misc/xfconf.nix
|
||||
./programs/abook.nix
|
||||
./programs/aerc.nix
|
||||
./programs/afew.nix
|
||||
|
@ -57,6 +58,7 @@ let
|
|||
./programs/bashmount.nix
|
||||
./programs/bat.nix
|
||||
./programs/beets.nix
|
||||
./programs/borgmatic.nix
|
||||
./programs/bottom.nix
|
||||
./programs/broot.nix
|
||||
./programs/browserpass.nix
|
||||
|
@ -65,6 +67,7 @@ let
|
|||
./programs/command-not-found/command-not-found.nix
|
||||
./programs/dircolors.nix
|
||||
./programs/direnv.nix
|
||||
./programs/discocss.nix
|
||||
./programs/eclipse.nix
|
||||
./programs/emacs.nix
|
||||
./programs/eww.nix
|
||||
|
@ -82,6 +85,7 @@ let
|
|||
./programs/gnome-terminal.nix
|
||||
./programs/go.nix
|
||||
./programs/gpg.nix
|
||||
./programs/havoc.nix
|
||||
./programs/helix.nix
|
||||
./programs/hexchat.nix
|
||||
./programs/himalaya.nix
|
||||
|
@ -96,16 +100,19 @@ let
|
|||
./programs/java.nix
|
||||
./programs/jq.nix
|
||||
./programs/just.nix
|
||||
./programs/k9s.nix
|
||||
./programs/kakoune.nix
|
||||
./programs/keychain.nix
|
||||
./programs/kitty.nix
|
||||
./programs/kodi.nix
|
||||
./programs/lazygit.nix
|
||||
./programs/ledger.nix
|
||||
./programs/less.nix
|
||||
./programs/lesspipe.nix
|
||||
./programs/lf.nix
|
||||
./programs/librewolf.nix
|
||||
./programs/lieer.nix
|
||||
./programs/looking-glass-client.nix
|
||||
./programs/lsd.nix
|
||||
./programs/man.nix
|
||||
./programs/mangohud.nix
|
||||
|
@ -134,14 +141,17 @@ let
|
|||
./programs/obs-studio.nix
|
||||
./programs/octant.nix
|
||||
./programs/offlineimap.nix
|
||||
./programs/oh-my-posh.nix
|
||||
./programs/opam.nix
|
||||
./programs/pandoc.nix
|
||||
./programs/papis.nix
|
||||
./programs/password-store.nix
|
||||
./programs/pazi.nix
|
||||
./programs/pet.nix
|
||||
./programs/pidgin.nix
|
||||
./programs/pistol.nix
|
||||
./programs/piston-cli.nix
|
||||
./programs/pls.nix
|
||||
./programs/powerline-go.nix
|
||||
./programs/pubs.nix
|
||||
./programs/pylint.nix
|
||||
|
@ -167,19 +177,24 @@ let
|
|||
./programs/terminator.nix
|
||||
./programs/termite.nix
|
||||
./programs/texlive.nix
|
||||
./programs/thunderbird.nix
|
||||
./programs/timidity.nix
|
||||
./programs/tint2.nix
|
||||
./programs/tiny.nix
|
||||
./programs/tmate.nix
|
||||
./programs/tmux.nix
|
||||
./programs/topgrade.nix
|
||||
./programs/urxvt.nix
|
||||
./programs/vim.nix
|
||||
./programs/vim-vint.nix
|
||||
./programs/vscode.nix
|
||||
./programs/vscode/haskell.nix
|
||||
./programs/pywal.nix
|
||||
./programs/rbenv.nix
|
||||
./programs/watson.nix
|
||||
./programs/waybar.nix
|
||||
./programs/wezterm.nix
|
||||
./programs/wlogout.nix
|
||||
./programs/xmobar.nix
|
||||
./programs/yt-dlp.nix
|
||||
./programs/z-lua.nix
|
||||
|
@ -189,11 +204,15 @@ let
|
|||
./programs/zplug.nix
|
||||
./programs/zsh.nix
|
||||
./programs/zsh/prezto.nix
|
||||
./services/autorandr.nix
|
||||
./services/barrier.nix
|
||||
./services/betterlockscreen.nix
|
||||
./services/blueman-applet.nix
|
||||
./services/borgmatic.nix
|
||||
./services/cachix-agent.nix
|
||||
./services/caffeine.nix
|
||||
./services/cbatticon.nix
|
||||
./services/clipman.nix
|
||||
./services/clipmenu.nix
|
||||
./services/devilspie2.nix
|
||||
./services/dropbox.nix
|
||||
|
@ -226,6 +245,7 @@ let
|
|||
./services/lorri.nix
|
||||
./services/mako.nix
|
||||
./services/mbsync.nix
|
||||
./services/megasync.nix
|
||||
./services/mopidy.nix
|
||||
./services/mpd.nix
|
||||
./services/mpdris2.nix
|
||||
|
@ -256,6 +276,7 @@ let
|
|||
./services/redshift-gammastep/gammastep.nix
|
||||
./services/redshift-gammastep/redshift.nix
|
||||
./services/rsibreak.nix
|
||||
./services/safeeyes.nix
|
||||
./services/screen-locker.nix
|
||||
./services/sctd.nix
|
||||
./services/spotifyd.nix
|
||||
|
@ -276,6 +297,7 @@ let
|
|||
./services/volnoti.nix
|
||||
./services/window-managers/awesome.nix
|
||||
./services/window-managers/bspwm/default.nix
|
||||
./services/window-managers/fluxbox.nix
|
||||
./services/window-managers/herbstluftwm.nix
|
||||
./services/window-managers/i3-sway/i3.nix
|
||||
./services/window-managers/i3-sway/sway.nix
|
||||
|
|
124
modules/po/da.po
Normal file
124
modules/po/da.po
Normal file
|
@ -0,0 +1,124 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR Home Manager contributors
|
||||
# This file is distributed under the same license as the Home Manager Modules package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Home Manager Modules\n"
|
||||
"Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n"
|
||||
"POT-Creation-Date: 2022-03-26 15:08+0100\n"
|
||||
"PO-Revision-Date: 2022-09-19 18:22+0000\n"
|
||||
"Last-Translator: cafkafk <christina@cafkafk.com>\n"
|
||||
"Language-Team: Danish <https://hosted.weblate.org/projects/home-manager/"
|
||||
"modules/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"
|
||||
|
||||
#: modules/files.nix:233
|
||||
msgid "Creating home file links in %s"
|
||||
msgstr "Skaber hjemme fil links i %s"
|
||||
|
||||
#: modules/files.nix:246
|
||||
msgid "Cleaning up orphan links from %s"
|
||||
msgstr "Opryder forældreløse links fra %s"
|
||||
|
||||
#: modules/files.nix:262
|
||||
msgid "Creating profile generation %s"
|
||||
msgstr "Kreere profil generation %s"
|
||||
|
||||
#: modules/files.nix:276
|
||||
msgid "No change so reusing latest profile generation %s"
|
||||
msgstr "Ingen ændring så genbrug den seneste profil generation %s"
|
||||
|
||||
#: modules/home-environment.nix:607
|
||||
msgid ""
|
||||
"Oops, Nix failed to install your new Home Manager profile!\n"
|
||||
"\n"
|
||||
"Perhaps there is a conflict with a package that was installed using\n"
|
||||
"\"%s\"? Try running\n"
|
||||
"\n"
|
||||
" %s\n"
|
||||
"\n"
|
||||
"and if there is a conflicting package you can remove it with\n"
|
||||
"\n"
|
||||
" %s\n"
|
||||
"\n"
|
||||
"Then try activating your Home Manager configuration again."
|
||||
msgstr ""
|
||||
"Åh nej, Nix fejlede i at installere din nye Home Manager profil! \n"
|
||||
" \n"
|
||||
"Måske er der en konflikt med en pakke der blev installeret gennem\n"
|
||||
"\"%s\"? Prøv at køre \n"
|
||||
"\n"
|
||||
" %s\n"
|
||||
" \n"
|
||||
"og hvis der er en pakke konflikt, kan du fjerne pakken med \n"
|
||||
" \n"
|
||||
" %s\n"
|
||||
" \n"
|
||||
"og så prøve at genaktivere din Home Manager konfiguration igen."
|
||||
|
||||
#: modules/home-environment.nix:639
|
||||
msgid "Activating %s"
|
||||
msgstr "Aktivere %s"
|
||||
|
||||
#: modules/lib-bash/activation-init.sh:31
|
||||
msgid "Sanity checking oldGenNum and oldGenPath"
|
||||
msgstr "Tjekker fornuften af oldGenNum and oldGenPath"
|
||||
|
||||
#: modules/lib-bash/activation-init.sh:34
|
||||
msgid ""
|
||||
"The previous generation number and path are in conflict! These\n"
|
||||
"must be either both empty or both set but are now set to\n"
|
||||
"\n"
|
||||
" '%s' and '%s'\n"
|
||||
"\n"
|
||||
"If you don't mind losing previous profile generations then\n"
|
||||
"the easiest solution is probably to run\n"
|
||||
"\n"
|
||||
" rm %s/home-manager*\n"
|
||||
" rm %s/current-home\n"
|
||||
"\n"
|
||||
"and trying home-manager switch again. Good luck!"
|
||||
msgstr ""
|
||||
"Den forrige generations nummer og sti er i konflikt! Disse\n"
|
||||
"skal enten begge være tomme, eller begge være sat, men er nu sat til \n"
|
||||
" \n"
|
||||
" '%s' and '%s'\n"
|
||||
" \n"
|
||||
"Hvis du ikke har noget mod at miste tidligere profil generationer så\n"
|
||||
"er den nemmeste løsning nok at køre \n"
|
||||
" \n"
|
||||
" rm %s/home-manager*\n"
|
||||
" rm %s/current-home\n"
|
||||
" \n"
|
||||
"og så prøve at køre home-manager switch igen. Held og lykke!"
|
||||
|
||||
#: modules/lib-bash/activation-init.sh:51
|
||||
msgid "Starting Home Manager activation"
|
||||
msgstr "Starter Home Manager aktivation"
|
||||
|
||||
#: modules/lib-bash/activation-init.sh:55
|
||||
msgid "Sanity checking Nix"
|
||||
msgstr "Udføre fornuft check af Nix"
|
||||
|
||||
#: modules/lib-bash/activation-init.sh:61
|
||||
msgid "This is a dry run"
|
||||
msgstr "Dette er en tør kørsel"
|
||||
|
||||
#: modules/lib-bash/activation-init.sh:64
|
||||
msgid "This is a live run"
|
||||
msgstr "Dette er en direkte kørsel"
|
||||
|
||||
#: modules/lib-bash/activation-init.sh:69
|
||||
msgid "Using Nix version: %s"
|
||||
msgstr "Bruger Nix version: %s"
|
||||
|
||||
#: modules/lib-bash/activation-init.sh:72
|
||||
msgid "Activation variables:"
|
||||
msgstr "Aktivere variable:"
|
|
@ -8,8 +8,8 @@ msgstr ""
|
|||
"Project-Id-Version: Home Manager Modules\n"
|
||||
"Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n"
|
||||
"POT-Creation-Date: 2022-03-26 15:08+0100\n"
|
||||
"PO-Revision-Date: 2022-04-20 18:18+0000\n"
|
||||
"Last-Translator: Frankie McEyes <mceyes@protonmail.com>\n"
|
||||
"PO-Revision-Date: 2022-12-15 08:50+0000\n"
|
||||
"Last-Translator: Walter Franzini <walter.franzini@gmail.com>\n"
|
||||
"Language-Team: Italian <https://hosted.weblate.org/projects/home-manager/"
|
||||
"modules/it/>\n"
|
||||
"Language: it\n"
|
||||
|
@ -17,7 +17,7 @@ msgstr ""
|
|||
"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"
|
||||
"X-Generator: Weblate 4.15-dev\n"
|
||||
|
||||
#: modules/files.nix:233
|
||||
msgid "Creating home file links in %s"
|
||||
|
@ -57,7 +57,7 @@ msgstr "Attivando %s"
|
|||
|
||||
#: modules/lib-bash/activation-init.sh:31
|
||||
msgid "Sanity checking oldGenNum and oldGenPath"
|
||||
msgstr ""
|
||||
msgstr "Controllando oldGenNum e oldGenPath"
|
||||
|
||||
#: modules/lib-bash/activation-init.sh:34
|
||||
msgid ""
|
||||
|
|
97
modules/po/lt.po
Normal file
97
modules/po/lt.po
Normal file
|
@ -0,0 +1,97 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR Home Manager contributors
|
||||
# This file is distributed under the same license as the Home Manager Modules package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Home Manager Modules\n"
|
||||
"Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n"
|
||||
"POT-Creation-Date: 2022-03-26 15:08+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: Automatically generated\n"
|
||||
"Language-Team: none\n"
|
||||
"Language: lt\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: modules/files.nix:233
|
||||
msgid "Creating home file links in %s"
|
||||
msgstr ""
|
||||
|
||||
#: modules/files.nix:246
|
||||
msgid "Cleaning up orphan links from %s"
|
||||
msgstr ""
|
||||
|
||||
#: modules/files.nix:262
|
||||
msgid "Creating profile generation %s"
|
||||
msgstr ""
|
||||
|
||||
#: modules/files.nix:276
|
||||
msgid "No change so reusing latest profile generation %s"
|
||||
msgstr ""
|
||||
|
||||
#: modules/home-environment.nix:607
|
||||
msgid ""
|
||||
"Oops, Nix failed to install your new Home Manager profile!\n"
|
||||
"\n"
|
||||
"Perhaps there is a conflict with a package that was installed using\n"
|
||||
"\"%s\"? Try running\n"
|
||||
"\n"
|
||||
" %s\n"
|
||||
"\n"
|
||||
"and if there is a conflicting package you can remove it with\n"
|
||||
"\n"
|
||||
" %s\n"
|
||||
"\n"
|
||||
"Then try activating your Home Manager configuration again."
|
||||
msgstr ""
|
||||
|
||||
#: modules/home-environment.nix:639
|
||||
msgid "Activating %s"
|
||||
msgstr ""
|
||||
|
||||
#: modules/lib-bash/activation-init.sh:31
|
||||
msgid "Sanity checking oldGenNum and oldGenPath"
|
||||
msgstr ""
|
||||
|
||||
#: modules/lib-bash/activation-init.sh:34
|
||||
msgid ""
|
||||
"The previous generation number and path are in conflict! These\n"
|
||||
"must be either both empty or both set but are now set to\n"
|
||||
"\n"
|
||||
" '%s' and '%s'\n"
|
||||
"\n"
|
||||
"If you don't mind losing previous profile generations then\n"
|
||||
"the easiest solution is probably to run\n"
|
||||
"\n"
|
||||
" rm %s/home-manager*\n"
|
||||
" rm %s/current-home\n"
|
||||
"\n"
|
||||
"and trying home-manager switch again. Good luck!"
|
||||
msgstr ""
|
||||
|
||||
#: modules/lib-bash/activation-init.sh:51
|
||||
msgid "Starting Home Manager activation"
|
||||
msgstr ""
|
||||
|
||||
#: modules/lib-bash/activation-init.sh:55
|
||||
msgid "Sanity checking Nix"
|
||||
msgstr ""
|
||||
|
||||
#: modules/lib-bash/activation-init.sh:61
|
||||
msgid "This is a dry run"
|
||||
msgstr ""
|
||||
|
||||
#: modules/lib-bash/activation-init.sh:64
|
||||
msgid "This is a live run"
|
||||
msgstr ""
|
||||
|
||||
#: modules/lib-bash/activation-init.sh:69
|
||||
msgid "Using Nix version: %s"
|
||||
msgstr ""
|
||||
|
||||
#: modules/lib-bash/activation-init.sh:72
|
||||
msgid "Activation variables:"
|
||||
msgstr ""
|
|
@ -8,29 +8,33 @@ msgstr ""
|
|||
"Project-Id-Version: Home Manager Modules\n"
|
||||
"Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n"
|
||||
"POT-Creation-Date: 2022-03-26 15:08+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: Automatically generated\n"
|
||||
"Language-Team: none\n"
|
||||
"PO-Revision-Date: 2022-11-16 13:47+0000\n"
|
||||
"Last-Translator: Pablo Bollansee <pablo.bollansee@gmail.com>\n"
|
||||
"Language-Team: Dutch <https://hosted.weblate.org/projects/home-manager/"
|
||||
"modules/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.15-dev\n"
|
||||
|
||||
#: modules/files.nix:233
|
||||
msgid "Creating home file links in %s"
|
||||
msgstr ""
|
||||
msgstr "Home-bestandskoppelingen aan het maken in %s"
|
||||
|
||||
#: modules/files.nix:246
|
||||
msgid "Cleaning up orphan links from %s"
|
||||
msgstr ""
|
||||
msgstr "Wees links van %s aan het opkuisen"
|
||||
|
||||
#: modules/files.nix:262
|
||||
msgid "Creating profile generation %s"
|
||||
msgstr ""
|
||||
msgstr "Profiel generatie %s aan het maken"
|
||||
|
||||
#: modules/files.nix:276
|
||||
msgid "No change so reusing latest profile generation %s"
|
||||
msgstr ""
|
||||
"Geen veranderingen dus de laatste profiel generatie %s wordt hergebruikt"
|
||||
|
||||
#: modules/home-environment.nix:607
|
||||
msgid ""
|
||||
|
@ -47,14 +51,27 @@ msgid ""
|
|||
"\n"
|
||||
"Then try activating your Home Manager configuration again."
|
||||
msgstr ""
|
||||
"Oei, het is Nix niet gelukt om je nieuwe Home Manager profiel te installeren!"
|
||||
"\n"
|
||||
"\n"
|
||||
"Misschien is er een conflict met het pakket dat geïnstalleerd was met\n"
|
||||
"\"%s\"? Probeer het volgende te draaien\n"
|
||||
"\n"
|
||||
" %s\n"
|
||||
"\n"
|
||||
"en als er een pakket is dat een conflict geeft kan je dat verwijderen met\n"
|
||||
"\n"
|
||||
" %s\n"
|
||||
"\n"
|
||||
"Probeer daarna je Home Manager configuratie opnieuw te activeren."
|
||||
|
||||
#: modules/home-environment.nix:639
|
||||
msgid "Activating %s"
|
||||
msgstr ""
|
||||
msgstr "%s aan het activeren"
|
||||
|
||||
#: modules/lib-bash/activation-init.sh:31
|
||||
msgid "Sanity checking oldGenNum and oldGenPath"
|
||||
msgstr ""
|
||||
msgstr "oldGenNum en oldGenPath aan het sanity checken"
|
||||
|
||||
#: modules/lib-bash/activation-init.sh:34
|
||||
msgid ""
|
||||
|
@ -71,27 +88,39 @@ msgid ""
|
|||
"\n"
|
||||
"and trying home-manager switch again. Good luck!"
|
||||
msgstr ""
|
||||
"Er is een conflict met de generatie nummer en pad! Deze\n"
|
||||
"moeten beide leeg of beide ingevuld zijn, maar zijn nu\n"
|
||||
"\n"
|
||||
" '%s' en '%s'\n"
|
||||
"\n"
|
||||
"Als je het niet erg vindt je vorige profiel generaties te verliezen dan\n"
|
||||
"is waarschijnlijk de eenvoudigste oplossing om het volgende te draaien\n"
|
||||
"\n"
|
||||
" rm %s/home-manager*\n"
|
||||
" rm %s/current-home\n"
|
||||
"\n"
|
||||
"en dan opnieuw 'home-manager switch' te proberen. Veel succes!"
|
||||
|
||||
#: modules/lib-bash/activation-init.sh:51
|
||||
msgid "Starting Home Manager activation"
|
||||
msgstr ""
|
||||
msgstr "Home manager activatie aan het starten"
|
||||
|
||||
#: modules/lib-bash/activation-init.sh:55
|
||||
msgid "Sanity checking Nix"
|
||||
msgstr ""
|
||||
msgstr "Nix aan het sanity checken"
|
||||
|
||||
#: modules/lib-bash/activation-init.sh:61
|
||||
msgid "This is a dry run"
|
||||
msgstr ""
|
||||
msgstr "Dit is een oefening"
|
||||
|
||||
#: modules/lib-bash/activation-init.sh:64
|
||||
msgid "This is a live run"
|
||||
msgstr ""
|
||||
msgstr "Dit is voor echt"
|
||||
|
||||
#: modules/lib-bash/activation-init.sh:69
|
||||
msgid "Using Nix version: %s"
|
||||
msgstr ""
|
||||
msgstr "Nix versie %s wordt gebruikt"
|
||||
|
||||
#: modules/lib-bash/activation-init.sh:72
|
||||
msgid "Activation variables:"
|
||||
msgstr ""
|
||||
msgstr "Activatie variabelen:"
|
||||
|
|
|
@ -8,8 +8,8 @@ msgstr ""
|
|||
"Project-Id-Version: Home Manager Modules\n"
|
||||
"Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n"
|
||||
"POT-Creation-Date: 2022-03-26 15:08+0100\n"
|
||||
"PO-Revision-Date: 2022-03-01 13:58+0000\n"
|
||||
"Last-Translator: Anon Ymous <mivon27841@shackvine.com>\n"
|
||||
"PO-Revision-Date: 2022-11-16 13:47+0000\n"
|
||||
"Last-Translator: Jakub Janczak <kubek2k@gmail.com>\n"
|
||||
"Language-Team: Polish <https://hosted.weblate.org/projects/home-manager/"
|
||||
"modules/pl/>\n"
|
||||
"Language: pl\n"
|
||||
|
@ -18,7 +18,7 @@ msgstr ""
|
|||
"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.11.1-dev\n"
|
||||
"X-Generator: Weblate 4.15-dev\n"
|
||||
|
||||
#: modules/files.nix:233
|
||||
msgid "Creating home file links in %s"
|
||||
|
@ -51,6 +51,18 @@ msgid ""
|
|||
"\n"
|
||||
"Then try activating your Home Manager configuration again."
|
||||
msgstr ""
|
||||
"Oops, Nix nie zdołał zainstalować twojego profilu Home Manager'a!\n"
|
||||
"\n"
|
||||
"Być może zaistniał konflikt z pakietem zainstalowanym przez\n"
|
||||
"\"%s\"? Spróbuj uruchomić\n"
|
||||
"\n"
|
||||
" %s\n"
|
||||
"\n"
|
||||
"i jeśli istnieje konflikt możesz spróbować go rozwiązać uruchamiając\n"
|
||||
"\n"
|
||||
" %s\n"
|
||||
"\n"
|
||||
"Następnie spróbuj aktywować konfigurację Home Manager'a ponownie."
|
||||
|
||||
#: modules/home-environment.nix:639
|
||||
msgid "Activating %s"
|
||||
|
@ -75,6 +87,18 @@ msgid ""
|
|||
"\n"
|
||||
"and trying home-manager switch again. Good luck!"
|
||||
msgstr ""
|
||||
"Istnieje konflikt pomiędzy poprzednią generacją i ścieżką! Powinny\n"
|
||||
"być obie puste lub ustawione, a efektywnie są ustawione na:\n"
|
||||
"\n"
|
||||
" '%s' i '%s'\n"
|
||||
"\n"
|
||||
"Jeśli możesz sobie pozwolić na utratę poprzednich generacji,\n"
|
||||
"możesz uruchomić\n"
|
||||
"\n"
|
||||
" rm %s/home-manager*\n"
|
||||
" rm %s/current-home\n"
|
||||
"\n"
|
||||
"i spróbować uruchomić home-manager switch raz jeszcze. Powodzenia!"
|
||||
|
||||
#: modules/lib-bash/activation-init.sh:51
|
||||
msgid "Starting Home Manager activation"
|
||||
|
@ -85,19 +109,17 @@ msgid "Sanity checking Nix"
|
|||
msgstr "Sprawdzanie poprawności Nix"
|
||||
|
||||
#: modules/lib-bash/activation-init.sh:61
|
||||
#, fuzzy
|
||||
msgid "This is a dry run"
|
||||
msgstr "To jest próbne wykonanie"
|
||||
msgstr "To jest wykonanie testowe"
|
||||
|
||||
#: modules/lib-bash/activation-init.sh:64
|
||||
msgid "This is a live run"
|
||||
msgstr ""
|
||||
msgstr "To jest wykonanie właściwe"
|
||||
|
||||
#: modules/lib-bash/activation-init.sh:69
|
||||
msgid "Using Nix version: %s"
|
||||
msgstr "Używając wersji Nix: %s"
|
||||
|
||||
#: modules/lib-bash/activation-init.sh:72
|
||||
#, fuzzy
|
||||
msgid "Activation variables:"
|
||||
msgstr "Zmienne aktywacyjne:"
|
||||
|
|
|
@ -8,8 +8,8 @@ msgstr ""
|
|||
"Project-Id-Version: Home Manager Modules\n"
|
||||
"Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n"
|
||||
"POT-Creation-Date: 2022-03-26 15:08+0100\n"
|
||||
"PO-Revision-Date: 2021-12-29 08:48+0000\n"
|
||||
"Last-Translator: WhiredPlanck <fungdaat31@outlook.com>\n"
|
||||
"PO-Revision-Date: 2023-01-08 11:50+0000\n"
|
||||
"Last-Translator: Eric Ho <eric913@gmail.com>\n"
|
||||
"Language-Team: Chinese (Traditional) <https://hosted.weblate.org/projects/"
|
||||
"home-manager/modules/zh_Hant/>\n"
|
||||
"Language: zh_Hant\n"
|
||||
|
@ -17,7 +17,7 @@ msgstr ""
|
|||
"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"
|
||||
"X-Generator: Weblate 4.15.1-dev\n"
|
||||
|
||||
#: modules/files.nix:233
|
||||
msgid "Creating home file links in %s"
|
||||
|
@ -50,6 +50,18 @@ msgid ""
|
|||
"\n"
|
||||
"Then try activating your Home Manager configuration again."
|
||||
msgstr ""
|
||||
"糟糕,Nix 未能安裝您的新 Home Manager 配置文件!\n"
|
||||
"\n"
|
||||
"也許這裏和使用 \"%s\" 安裝的包有衝突?\n"
|
||||
"嘗試運行\n"
|
||||
"\n"
|
||||
" %s\n"
|
||||
"\n"
|
||||
"如果有衝突的包,你可以用\n"
|
||||
"\n"
|
||||
" %s\n"
|
||||
"\n"
|
||||
"來移除。然後嘗試再次啟用您的 Home Manager 配置。"
|
||||
|
||||
#: modules/home-environment.nix:639
|
||||
msgid "Activating %s"
|
||||
|
@ -57,7 +69,7 @@ msgstr "正在啟用 %s"
|
|||
|
||||
#: modules/lib-bash/activation-init.sh:31
|
||||
msgid "Sanity checking oldGenNum and oldGenPath"
|
||||
msgstr ""
|
||||
msgstr "正在進行 oldGenNum 和 oldGenPath 的完整性檢查"
|
||||
|
||||
#: modules/lib-bash/activation-init.sh:34
|
||||
msgid ""
|
||||
|
@ -81,20 +93,20 @@ msgstr "正在啟動 Home Manager 初始化程式"
|
|||
|
||||
#: modules/lib-bash/activation-init.sh:55
|
||||
msgid "Sanity checking Nix"
|
||||
msgstr ""
|
||||
msgstr "正在進行 Nix 完整性檢查"
|
||||
|
||||
#: modules/lib-bash/activation-init.sh:61
|
||||
msgid "This is a dry run"
|
||||
msgstr ""
|
||||
msgstr "這是試運行"
|
||||
|
||||
#: modules/lib-bash/activation-init.sh:64
|
||||
msgid "This is a live run"
|
||||
msgstr ""
|
||||
msgstr "這是在實際運行"
|
||||
|
||||
#: modules/lib-bash/activation-init.sh:69
|
||||
msgid "Using Nix version: %s"
|
||||
msgstr ""
|
||||
msgstr "正在使用的 Nix 版本: %s"
|
||||
|
||||
#: modules/lib-bash/activation-init.sh:72
|
||||
msgid "Activation variables:"
|
||||
msgstr ""
|
||||
msgstr "啟用的變數:"
|
||||
|
|
|
@ -305,7 +305,7 @@ in {
|
|||
DPI=144
|
||||
;;
|
||||
*)
|
||||
echo "Unknown profle: $AUTORANDR_CURRENT_PROFILE"
|
||||
echo "Unknown profile: $AUTORANDR_CURRENT_PROFILE"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
|
|
|
@ -6,16 +6,15 @@ let
|
|||
|
||||
cfg = config.programs.bash;
|
||||
|
||||
writeBashScript = name: text: pkgs.writeTextFile {
|
||||
inherit name text;
|
||||
checkPhase = ''
|
||||
${pkgs.stdenv.shellDryRun} "$target"
|
||||
'';
|
||||
};
|
||||
writeBashScript = name: text:
|
||||
pkgs.writeTextFile {
|
||||
inherit name text;
|
||||
checkPhase = ''
|
||||
${pkgs.stdenv.shellDryRun} "$target"
|
||||
'';
|
||||
};
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
in {
|
||||
meta.maintainers = [ maintainers.rycee ];
|
||||
|
||||
imports = [
|
||||
|
@ -70,20 +69,18 @@ in
|
|||
};
|
||||
|
||||
historyControl = mkOption {
|
||||
type = types.listOf (types.enum [
|
||||
"erasedups"
|
||||
"ignoredups"
|
||||
"ignorespace"
|
||||
]);
|
||||
default = [];
|
||||
type =
|
||||
types.listOf (types.enum [ "erasedups" "ignoredups" "ignorespace" ]);
|
||||
default = [ ];
|
||||
description = "Controlling how commands are saved on the history list.";
|
||||
};
|
||||
|
||||
historyIgnore = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [];
|
||||
default = [ ];
|
||||
example = [ "ls" "cd" "exit" ];
|
||||
description = "List of commands that should not be saved to the history list.";
|
||||
description =
|
||||
"List of commands that should not be saved to the history list.";
|
||||
};
|
||||
|
||||
shellOptions = mkOption {
|
||||
|
@ -103,10 +100,7 @@ in
|
|||
# Warn if closing shell with running jobs.
|
||||
"checkjobs"
|
||||
];
|
||||
example = [
|
||||
"extglob"
|
||||
"-cdspell"
|
||||
];
|
||||
example = [ "extglob" "-cdspell" ];
|
||||
description = ''
|
||||
Shell options to set. Prefix an option with
|
||||
<quote><literal>-</literal></quote> to unset.
|
||||
|
@ -114,7 +108,7 @@ in
|
|||
};
|
||||
|
||||
sessionVariables = mkOption {
|
||||
default = {};
|
||||
default = { };
|
||||
type = types.attrs;
|
||||
example = { MAILCHECK = 30; };
|
||||
description = ''
|
||||
|
@ -123,7 +117,7 @@ in
|
|||
};
|
||||
|
||||
shellAliases = mkOption {
|
||||
default = {};
|
||||
default = { };
|
||||
type = types.attrsOf types.str;
|
||||
example = literalExpression ''
|
||||
{
|
||||
|
@ -175,80 +169,71 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
config = (
|
||||
let
|
||||
aliasesStr = concatStringsSep "\n" (
|
||||
mapAttrsToList (k: v: "alias ${k}=${escapeShellArg v}") cfg.shellAliases
|
||||
);
|
||||
config = let
|
||||
aliasesStr = concatStringsSep "\n"
|
||||
(mapAttrsToList (k: v: "alias ${k}=${escapeShellArg v}")
|
||||
cfg.shellAliases);
|
||||
|
||||
shoptsStr = let
|
||||
switch = v: if hasPrefix "-" v then "-u" else "-s";
|
||||
in concatStringsSep "\n" (
|
||||
map (v: "shopt ${switch v} ${removePrefix "-" v}") cfg.shellOptions
|
||||
);
|
||||
shoptsStr = let switch = v: if hasPrefix "-" v then "-u" else "-s";
|
||||
in concatStringsSep "\n"
|
||||
(map (v: "shopt ${switch v} ${removePrefix "-" v}") cfg.shellOptions);
|
||||
|
||||
sessionVarsStr = config.lib.shell.exportAll cfg.sessionVariables;
|
||||
sessionVarsStr = config.lib.shell.exportAll cfg.sessionVariables;
|
||||
|
||||
historyControlStr =
|
||||
concatStringsSep "\n" (mapAttrsToList (n: v: "${n}=${v}") (
|
||||
{
|
||||
HISTFILESIZE = toString cfg.historyFileSize;
|
||||
HISTSIZE = toString cfg.historySize;
|
||||
}
|
||||
// optionalAttrs (cfg.historyFile != null) {
|
||||
HISTFILE = "\"${cfg.historyFile}\"";
|
||||
}
|
||||
// optionalAttrs (cfg.historyControl != []) {
|
||||
HISTCONTROL = concatStringsSep ":" cfg.historyControl;
|
||||
}
|
||||
// optionalAttrs (cfg.historyIgnore != []) {
|
||||
HISTIGNORE = concatStringsSep ":" cfg.historyIgnore;
|
||||
}
|
||||
));
|
||||
in mkIf cfg.enable {
|
||||
home.file.".bash_profile".source = writeBashScript "bash_profile" ''
|
||||
# include .profile if it exists
|
||||
[[ -f ~/.profile ]] && . ~/.profile
|
||||
historyControlStr = concatStringsSep "\n"
|
||||
(mapAttrsToList (n: v: "${n}=${v}") ({
|
||||
HISTFILESIZE = toString cfg.historyFileSize;
|
||||
HISTSIZE = toString cfg.historySize;
|
||||
} // optionalAttrs (cfg.historyFile != null) {
|
||||
HISTFILE = ''"${cfg.historyFile}"'';
|
||||
} // optionalAttrs (cfg.historyControl != [ ]) {
|
||||
HISTCONTROL = concatStringsSep ":" cfg.historyControl;
|
||||
} // optionalAttrs (cfg.historyIgnore != [ ]) {
|
||||
HISTIGNORE = escapeShellArg (concatStringsSep ":" cfg.historyIgnore);
|
||||
}));
|
||||
in mkIf cfg.enable {
|
||||
home.file.".bash_profile".source = writeBashScript "bash_profile" ''
|
||||
# include .profile if it exists
|
||||
[[ -f ~/.profile ]] && . ~/.profile
|
||||
|
||||
# include .bashrc if it exists
|
||||
[[ -f ~/.bashrc ]] && . ~/.bashrc
|
||||
'';
|
||||
# include .bashrc if it exists
|
||||
[[ -f ~/.bashrc ]] && . ~/.bashrc
|
||||
'';
|
||||
|
||||
# If completion is enabled then make sure it is sourced very early. This
|
||||
# is to avoid problems if any other initialization code attempts to set up
|
||||
# completion.
|
||||
programs.bash.initExtra = mkIf cfg.enableCompletion (mkOrder 100 ''
|
||||
if [[ ! -v BASH_COMPLETION_VERSINFO ]]; then
|
||||
. "${pkgs.bash-completion}/etc/profile.d/bash_completion.sh"
|
||||
fi
|
||||
'');
|
||||
# If completion is enabled then make sure it is sourced very early. This
|
||||
# is to avoid problems if any other initialization code attempts to set up
|
||||
# completion.
|
||||
programs.bash.initExtra = mkIf cfg.enableCompletion (mkOrder 100 ''
|
||||
if [[ ! -v BASH_COMPLETION_VERSINFO ]]; then
|
||||
. "${pkgs.bash-completion}/etc/profile.d/bash_completion.sh"
|
||||
fi
|
||||
'');
|
||||
|
||||
home.file.".profile".source = writeBashScript "profile" ''
|
||||
. "${config.home.profileDirectory}/etc/profile.d/hm-session-vars.sh"
|
||||
home.file.".profile".source = writeBashScript "profile" ''
|
||||
. "${config.home.profileDirectory}/etc/profile.d/hm-session-vars.sh"
|
||||
|
||||
${sessionVarsStr}
|
||||
${sessionVarsStr}
|
||||
|
||||
${cfg.profileExtra}
|
||||
'';
|
||||
${cfg.profileExtra}
|
||||
'';
|
||||
|
||||
home.file.".bashrc".source = writeBashScript "bashrc" ''
|
||||
${cfg.bashrcExtra}
|
||||
home.file.".bashrc".source = writeBashScript "bashrc" ''
|
||||
${cfg.bashrcExtra}
|
||||
|
||||
# Commands that should be applied only for interactive shells.
|
||||
[[ $- == *i* ]] || return
|
||||
# Commands that should be applied only for interactive shells.
|
||||
[[ $- == *i* ]] || return
|
||||
|
||||
${historyControlStr}
|
||||
${historyControlStr}
|
||||
|
||||
${shoptsStr}
|
||||
${shoptsStr}
|
||||
|
||||
${aliasesStr}
|
||||
${aliasesStr}
|
||||
|
||||
${cfg.initExtra}
|
||||
'';
|
||||
${cfg.initExtra}
|
||||
'';
|
||||
|
||||
home.file.".bash_logout" = mkIf (cfg.logoutExtra != "") {
|
||||
source = writeBashScript "bash_logout" cfg.logoutExtra;
|
||||
};
|
||||
}
|
||||
);
|
||||
home.file.".bash_logout" = mkIf (cfg.logoutExtra != "") {
|
||||
source = writeBashScript "bash_logout" cfg.logoutExtra;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -30,6 +30,16 @@ in {
|
|||
'';
|
||||
};
|
||||
|
||||
extraPackages = mkOption {
|
||||
type = types.listOf types.package;
|
||||
default = [ ];
|
||||
example = literalExpression
|
||||
"with pkgs.bat-extras; [ batdiff batman batgrep batwatch ];";
|
||||
description = ''
|
||||
Additional bat packages to install.
|
||||
'';
|
||||
};
|
||||
|
||||
themes = mkOption {
|
||||
type = types.attrsOf types.lines;
|
||||
default = { };
|
||||
|
@ -51,7 +61,7 @@ in {
|
|||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = [ pkgs.bat ];
|
||||
home.packages = [ pkgs.bat ] ++ cfg.extraPackages;
|
||||
|
||||
xdg.configFile = mkMerge ([{
|
||||
"bat/config" =
|
||||
|
|
196
modules/programs/borgmatic.nix
Normal file
196
modules/programs/borgmatic.nix
Normal file
|
@ -0,0 +1,196 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.programs.borgmatic;
|
||||
|
||||
mkNullableOption = args:
|
||||
lib.mkOption (args // {
|
||||
type = lib.types.nullOr args.type;
|
||||
default = null;
|
||||
});
|
||||
|
||||
mkRetentionOption = frequency:
|
||||
mkNullableOption {
|
||||
type = types.int;
|
||||
description =
|
||||
"Number of ${frequency} archives to keep. Use -1 for no limit.";
|
||||
example = 3;
|
||||
};
|
||||
|
||||
extraConfigOption = mkOption {
|
||||
type = with types; attrsOf (oneOf [ str bool path int (listOf str) ]);
|
||||
default = { };
|
||||
description = "Extra settings.";
|
||||
};
|
||||
|
||||
consistencyCheckModule = types.submodule {
|
||||
options = {
|
||||
name = mkOption {
|
||||
type = types.enum [ "repository" "archives" "data" "extract" ];
|
||||
description = "Name of consistency check to run.";
|
||||
example = "repository";
|
||||
};
|
||||
|
||||
frequency = mkNullableOption {
|
||||
type = types.strMatching "([[:digit:]]+ .*)|always";
|
||||
description = "Frequency of this type of check";
|
||||
example = "2 weeks";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
configModule = types.submodule {
|
||||
options = {
|
||||
location = {
|
||||
sourceDirectories = mkOption {
|
||||
type = types.listOf types.str;
|
||||
description = "Directories to backup.";
|
||||
example = literalExpression "[config.home.homeDirectory]";
|
||||
};
|
||||
|
||||
repositories = mkOption {
|
||||
type = types.listOf types.str;
|
||||
description = "Paths to repositories.";
|
||||
example =
|
||||
literalExpression ''["ssh://myuser@myrepo.myserver.com/./repo"]'';
|
||||
};
|
||||
|
||||
extraConfig = extraConfigOption;
|
||||
};
|
||||
|
||||
storage = {
|
||||
encryptionPasscommand = mkNullableOption {
|
||||
type = types.str;
|
||||
description = "Command writing the passphrase to standard output.";
|
||||
example =
|
||||
literalExpression ''"''${pkgs.password-store}/bin/pass borg-repo"'';
|
||||
};
|
||||
extraConfig = extraConfigOption;
|
||||
};
|
||||
|
||||
retention = {
|
||||
keepWithin = mkNullableOption {
|
||||
type = types.strMatching "[[:digit:]]+[Hdwmy]";
|
||||
description = "Keep all archives within this time interval.";
|
||||
example = "2d";
|
||||
};
|
||||
|
||||
keepSecondly = mkRetentionOption "secondly";
|
||||
keepMinutely = mkRetentionOption "minutely";
|
||||
keepHourly = mkRetentionOption "hourly";
|
||||
keepDaily = mkRetentionOption "daily";
|
||||
keepWeekly = mkRetentionOption "weekly";
|
||||
keepMonthly = mkRetentionOption "monthly";
|
||||
keepYearly = mkRetentionOption "yearly";
|
||||
|
||||
extraConfig = extraConfigOption;
|
||||
};
|
||||
|
||||
consistency = {
|
||||
checks = mkOption {
|
||||
type = types.listOf consistencyCheckModule;
|
||||
default = [ ];
|
||||
description = "Consistency checks to run";
|
||||
example = literalExpression ''
|
||||
[
|
||||
{
|
||||
name = "repository";
|
||||
frequency = "2 weeks";
|
||||
}
|
||||
{
|
||||
name = "archives";
|
||||
frequency = "4 weeks";
|
||||
}
|
||||
{
|
||||
name = "data";
|
||||
frequency = "6 weeks";
|
||||
}
|
||||
{
|
||||
name = "extract";
|
||||
frequency = "6 weeks";
|
||||
}
|
||||
];
|
||||
'';
|
||||
};
|
||||
|
||||
extraConfig = extraConfigOption;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
removeNullValues = attrSet: filterAttrs (key: value: value != null) attrSet;
|
||||
|
||||
writeConfig = config:
|
||||
generators.toYAML { } {
|
||||
location = removeNullValues {
|
||||
source_directories = config.location.sourceDirectories;
|
||||
repositories = config.location.repositories;
|
||||
} // config.location.extraConfig;
|
||||
storage = removeNullValues {
|
||||
encryption_passcommand = config.storage.encryptionPasscommand;
|
||||
} // config.storage.extraConfig;
|
||||
retention = removeNullValues {
|
||||
keep_within = config.retention.keepWithin;
|
||||
keep_secondly = config.retention.keepSecondly;
|
||||
keep_minutely = config.retention.keepMinutely;
|
||||
keep_hourly = config.retention.keepHourly;
|
||||
keep_daily = config.retention.keepDaily;
|
||||
keep_weekly = config.retention.keepWeekly;
|
||||
keep_monthly = config.retention.keepMonthly;
|
||||
keep_yearly = config.retention.keepYearly;
|
||||
} // config.retention.extraConfig;
|
||||
consistency = removeNullValues { checks = config.consistency.checks; }
|
||||
// config.consistency.extraConfig;
|
||||
};
|
||||
in {
|
||||
meta.maintainers = [ maintainers.DamienCassou ];
|
||||
|
||||
options = {
|
||||
programs.borgmatic = {
|
||||
enable = mkEnableOption "Borgmatic";
|
||||
|
||||
package = mkPackageOption pkgs "borgmatic" { };
|
||||
|
||||
backups = mkOption {
|
||||
type = types.attrsOf configModule;
|
||||
description = ''
|
||||
Borgmatic allows for several named backup configurations,
|
||||
each with its own source directories and repositories.
|
||||
'';
|
||||
example = literalExpression ''
|
||||
{
|
||||
personal = {
|
||||
location = {
|
||||
sourceDirectories = [ "/home/me/personal" ];
|
||||
repositories = [ "ssh://myuser@myserver.com/./personal-repo" ];
|
||||
};
|
||||
};
|
||||
work = {
|
||||
location = {
|
||||
sourceDirectories = [ "/home/me/work" ];
|
||||
repositories = [ "ssh://myuser@myserver.com/./work-repo" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
assertions = [
|
||||
(lib.hm.assertions.assertPlatform "programs.borgmatic" pkgs
|
||||
lib.platforms.linux)
|
||||
];
|
||||
|
||||
xdg.configFile = with lib.attrsets;
|
||||
mapAttrs' (configName: config:
|
||||
nameValuePair ("borgmatic.d/" + configName + ".yaml") {
|
||||
text = writeConfig config;
|
||||
}) cfg.backups;
|
||||
|
||||
home.packages = [ cfg.package ];
|
||||
};
|
||||
}
|
|
@ -8,15 +8,160 @@ let
|
|||
|
||||
tomlFormat = pkgs.formats.toml { };
|
||||
|
||||
brootConf = {
|
||||
verbs = cfg.verbs;
|
||||
skin = cfg.skin;
|
||||
modal = cfg.modal;
|
||||
settingsModule = {
|
||||
freeformType = tomlFormat.type;
|
||||
|
||||
options = {
|
||||
modal = mkEnableOption "modal (vim) mode";
|
||||
|
||||
verbs = mkOption {
|
||||
type = with types; listOf (attrsOf (either bool str));
|
||||
default = [ ];
|
||||
example = literalExpression ''
|
||||
[
|
||||
{ invocation = "p"; execution = ":parent"; }
|
||||
{ invocation = "edit"; shortcut = "e"; execution = "$EDITOR {file}" ; }
|
||||
{ invocation = "create {subpath}"; execution = "$EDITOR {directory}/{subpath}"; }
|
||||
{ invocation = "view"; execution = "less {file}"; }
|
||||
{
|
||||
invocation = "blop {name}\\.{type}";
|
||||
execution = "mkdir {parent}/{type} && ''${pkgs.neovim}/bin/nvim {parent}/{type}/{name}.{type}";
|
||||
from_shell = true;
|
||||
}
|
||||
]
|
||||
'';
|
||||
description = ''
|
||||
Define new verbs. For more information, see
|
||||
<link xlink:href="https://dystroy.org/broot/documentation/configuration/#verb-definition-attributes"/>.
|
||||
</para><para>
|
||||
The possible attributes are:
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><literal>invocation</literal> (optional)</term>
|
||||
<listitem><para>how the verb is called by the user, with placeholders for arguments</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><literal>execution</literal> (mandatory)</term>
|
||||
<listitem><para>how the verb is executed</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><literal>key</literal> (optional)</term>
|
||||
<listitem><para>a keyboard key triggering execution</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><literal>shortcut</literal> (optional)</term>
|
||||
<listitem><para>an alternate way to call the verb (without
|
||||
the arguments part)</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><literal>leave_broot</literal> (optional)</term>
|
||||
<listitem><para>whether to quit broot on execution
|
||||
(default: <literal>true</literal>)</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><literal>from_shell</literal> (optional)</term>
|
||||
<listitem><para>whether the verb must be executed from the
|
||||
parent shell (default:
|
||||
<literal>false</literal>)</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
'';
|
||||
};
|
||||
|
||||
skin = mkOption {
|
||||
type = types.attrsOf types.str;
|
||||
default = { };
|
||||
example = literalExpression ''
|
||||
{
|
||||
status_normal_fg = "grayscale(18)";
|
||||
status_normal_bg = "grayscale(3)";
|
||||
status_error_fg = "red";
|
||||
status_error_bg = "yellow";
|
||||
tree_fg = "red";
|
||||
selected_line_bg = "grayscale(7)";
|
||||
permissions_fg = "grayscale(12)";
|
||||
size_bar_full_bg = "red";
|
||||
size_bar_void_bg = "black";
|
||||
directory_fg = "lightyellow";
|
||||
input_fg = "cyan";
|
||||
flag_value_fg = "lightyellow";
|
||||
table_border_fg = "red";
|
||||
code_fg = "lightyellow";
|
||||
}
|
||||
'';
|
||||
description = ''
|
||||
Color configuration.
|
||||
</para><para>
|
||||
Complete list of keys (expected to change before the v1 of broot):
|
||||
|
||||
<itemizedlist>
|
||||
<listitem><para><literal>char_match</literal></para></listitem>
|
||||
<listitem><para><literal>code</literal></para></listitem>
|
||||
<listitem><para><literal>directory</literal></para></listitem>
|
||||
<listitem><para><literal>exe</literal></para></listitem>
|
||||
<listitem><para><literal>file</literal></para></listitem>
|
||||
<listitem><para><literal>file_error</literal></para></listitem>
|
||||
<listitem><para><literal>flag_label</literal></para></listitem>
|
||||
<listitem><para><literal>flag_value</literal></para></listitem>
|
||||
<listitem><para><literal>input</literal></para></listitem>
|
||||
<listitem><para><literal>link</literal></para></listitem>
|
||||
<listitem><para><literal>permissions</literal></para></listitem>
|
||||
<listitem><para><literal>selected_line</literal></para></listitem>
|
||||
<listitem><para><literal>size_bar_full</literal></para></listitem>
|
||||
<listitem><para><literal>size_bar_void</literal></para></listitem>
|
||||
<listitem><para><literal>size_text</literal></para></listitem>
|
||||
<listitem><para><literal>spinner</literal></para></listitem>
|
||||
<listitem><para><literal>status_error</literal></para></listitem>
|
||||
<listitem><para><literal>status_normal</literal></para></listitem>
|
||||
<listitem><para><literal>table_border</literal></para></listitem>
|
||||
<listitem><para><literal>tree</literal></para></listitem>
|
||||
<listitem><para><literal>unlisted</literal></para></listitem>
|
||||
</itemizedlist></para>
|
||||
|
||||
<para>
|
||||
Add <literal>_fg</literal> for a foreground color and
|
||||
<literal>_bg</literal> for a background colors.
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
shellInit = shell:
|
||||
# Using mkAfter to make it more likely to appear after other
|
||||
# manipulations of the prompt.
|
||||
mkAfter ''
|
||||
source ${
|
||||
pkgs.runCommand "br.${shell}" { nativeBuildInputs = [ cfg.package ]; }
|
||||
"broot --print-shell-function ${shell} > $out"
|
||||
}
|
||||
'';
|
||||
in {
|
||||
meta.maintainers = [ hm.maintainers.aheaume ];
|
||||
|
||||
imports = [
|
||||
(mkRenamedOptionModule [ "programs" "broot" "modal" ] [
|
||||
"programs"
|
||||
"broot"
|
||||
"settings"
|
||||
"modal"
|
||||
])
|
||||
(mkRenamedOptionModule [ "programs" "broot" "verbs" ] [
|
||||
"programs"
|
||||
"broot"
|
||||
"settings"
|
||||
"verbs"
|
||||
])
|
||||
(mkRenamedOptionModule [ "programs" "broot" "skin" ] [
|
||||
"programs"
|
||||
"broot"
|
||||
"settings"
|
||||
"skin"
|
||||
])
|
||||
];
|
||||
|
||||
options.programs.broot = {
|
||||
enable = mkEnableOption "Broot, a better way to navigate directories";
|
||||
|
||||
|
@ -44,83 +189,6 @@ in {
|
|||
'';
|
||||
};
|
||||
|
||||
modal = mkEnableOption "modal (vim) mode";
|
||||
|
||||
verbs = mkOption {
|
||||
type = with types; listOf (attrsOf (either bool str));
|
||||
default = [
|
||||
{
|
||||
invocation = "p";
|
||||
execution = ":parent";
|
||||
}
|
||||
{
|
||||
invocation = "edit";
|
||||
shortcut = "e";
|
||||
execution = "$EDITOR {file}";
|
||||
}
|
||||
{
|
||||
invocation = "create {subpath}";
|
||||
execution = "$EDITOR {directory}/{subpath}";
|
||||
}
|
||||
{
|
||||
invocation = "view";
|
||||
execution = "less {file}";
|
||||
}
|
||||
];
|
||||
example = literalExpression ''
|
||||
[
|
||||
{ invocation = "p"; execution = ":parent"; }
|
||||
{ invocation = "edit"; shortcut = "e"; execution = "$EDITOR {file}" ; }
|
||||
{ invocation = "create {subpath}"; execution = "$EDITOR {directory}/{subpath}"; }
|
||||
{ invocation = "view"; execution = "less {file}"; }
|
||||
{
|
||||
invocation = "blop {name}\\.{type}";
|
||||
execution = "/bin/mkdir {parent}/{type} && /usr/bin/nvim {parent}/{type}/{name}.{type}";
|
||||
from_shell = true;
|
||||
}
|
||||
]
|
||||
'';
|
||||
description = ''
|
||||
Define new verbs. For more information, see
|
||||
<link xlink:href="https://dystroy.org/broot/documentation/configuration/#verb-definition-attributes"/>.
|
||||
</para><para>
|
||||
The possible attributes are:
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><literal>invocation</literal> (optional)</term>
|
||||
<listitem><para>how the verb is called by the user, with placeholders for arguments</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><literal>execution</literal> (mandatory)</term>
|
||||
<listitem><para>how the verb is executed</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><literal>key</literal> (optional)</term>
|
||||
<listitem><para>a keyboard key triggering execution</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><literal>shortcut</literal> (optional)</term>
|
||||
<listitem><para>an alternate way to call the verb (without
|
||||
the arguments part)</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><literal>leave_broot</literal> (optional)</term>
|
||||
<listitem><para>whether to quit broot on execution
|
||||
(default: <literal>true</literal>)</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><literal>from_shell</literal> (optional)</term>
|
||||
<listitem><para>whether the verb must be executed from the
|
||||
parent shell (default:
|
||||
<literal>false</literal>)</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
'';
|
||||
};
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.broot;
|
||||
|
@ -128,149 +196,48 @@ in {
|
|||
description = "Package providing broot";
|
||||
};
|
||||
|
||||
skin = mkOption {
|
||||
type = types.attrsOf types.str;
|
||||
settings = mkOption {
|
||||
type = types.submodule settingsModule;
|
||||
default = { };
|
||||
example = literalExpression ''
|
||||
{
|
||||
status_normal_fg = "grayscale(18)";
|
||||
status_normal_bg = "grayscale(3)";
|
||||
status_error_fg = "red";
|
||||
status_error_bg = "yellow";
|
||||
tree_fg = "red";
|
||||
selected_line_bg = "grayscale(7)";
|
||||
permissions_fg = "grayscale(12)";
|
||||
size_bar_full_bg = "red";
|
||||
size_bar_void_bg = "black";
|
||||
directory_fg = "lightyellow";
|
||||
input_fg = "cyan";
|
||||
flag_value_fg = "lightyellow";
|
||||
table_border_fg = "red";
|
||||
code_fg = "lightyellow";
|
||||
}
|
||||
'';
|
||||
description = ''
|
||||
Color configuration.
|
||||
</para><para>
|
||||
Complete list of keys (expected to change before the v1 of broot):
|
||||
|
||||
<itemizedlist>
|
||||
<listitem><para><literal>char_match</literal></para></listitem>
|
||||
<listitem><para><literal>code</literal></para></listitem>
|
||||
<listitem><para><literal>directory</literal></para></listitem>
|
||||
<listitem><para><literal>exe</literal></para></listitem>
|
||||
<listitem><para><literal>file</literal></para></listitem>
|
||||
<listitem><para><literal>file_error</literal></para></listitem>
|
||||
<listitem><para><literal>flag_label</literal></para></listitem>
|
||||
<listitem><para><literal>flag_value</literal></para></listitem>
|
||||
<listitem><para><literal>input</literal></para></listitem>
|
||||
<listitem><para><literal>link</literal></para></listitem>
|
||||
<listitem><para><literal>permissions</literal></para></listitem>
|
||||
<listitem><para><literal>selected_line</literal></para></listitem>
|
||||
<listitem><para><literal>size_bar_full</literal></para></listitem>
|
||||
<listitem><para><literal>size_bar_void</literal></para></listitem>
|
||||
<listitem><para><literal>size_text</literal></para></listitem>
|
||||
<listitem><para><literal>spinner</literal></para></listitem>
|
||||
<listitem><para><literal>status_error</literal></para></listitem>
|
||||
<listitem><para><literal>status_normal</literal></para></listitem>
|
||||
<listitem><para><literal>table_border</literal></para></listitem>
|
||||
<listitem><para><literal>tree</literal></para></listitem>
|
||||
<listitem><para><literal>unlisted</literal></para></listitem>
|
||||
</itemizedlist></para>
|
||||
|
||||
<para>
|
||||
Add <literal>_fg</literal> for a foreground color and
|
||||
<literal>_bg</literal> for a background colors.
|
||||
'';
|
||||
description = "Verbatim config entries";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = [ cfg.package ];
|
||||
|
||||
xdg.configFile."broot/conf.toml".source =
|
||||
tomlFormat.generate "broot-config" brootConf;
|
||||
xdg.configFile."broot" = {
|
||||
recursive = true;
|
||||
source = pkgs.symlinkJoin {
|
||||
name = "xdg.configFile.broot";
|
||||
paths = [
|
||||
(pkgs.writeTextDir "conf.toml" (builtins.readFile
|
||||
(tomlFormat.generate "broot-config" cfg.settings)))
|
||||
|
||||
# Dummy file to prevent broot from trying to reinstall itself
|
||||
xdg.configFile."broot/launcher/installed-v1".text = "";
|
||||
# Copy all files under /resources/default-conf
|
||||
"${cfg.package.src}/resources/default-conf"
|
||||
|
||||
programs.bash.initExtra = mkIf cfg.enableBashIntegration (
|
||||
# Using mkAfter to make it more likely to appear after other
|
||||
# manipulations of the prompt.
|
||||
mkAfter ''
|
||||
# This script was automatically generated by the broot function
|
||||
# More information can be found in https://github.com/Canop/broot
|
||||
# This function starts broot and executes the command
|
||||
# it produces, if any.
|
||||
# It's needed because some shell commands, like `cd`,
|
||||
# have no useful effect if executed in a subshell.
|
||||
function br {
|
||||
f=$(mktemp)
|
||||
(
|
||||
set +e
|
||||
broot --outcmd "$f" "$@"
|
||||
code=$?
|
||||
if [ "$code" != 0 ]; then
|
||||
rm -f "$f"
|
||||
exit "$code"
|
||||
fi
|
||||
)
|
||||
code=$?
|
||||
if [ "$code" != 0 ]; then
|
||||
return "$code"
|
||||
fi
|
||||
d=$(cat "$f")
|
||||
rm -f "$f"
|
||||
eval "$d"
|
||||
}
|
||||
'');
|
||||
# Dummy file to prevent broot from trying to reinstall itself
|
||||
(pkgs.writeTextDir "launcher/installed-v1" "")
|
||||
];
|
||||
|
||||
programs.zsh.initExtra = mkIf cfg.enableZshIntegration ''
|
||||
# This script was automatically generated by the broot function
|
||||
# More information can be found in https://github.com/Canop/broot
|
||||
# This function starts broot and executes the command
|
||||
# it produces, if any.
|
||||
# It's needed because some shell commands, like `cd`,
|
||||
# have no useful effect if executed in a subshell.
|
||||
function br {
|
||||
f=$(mktemp)
|
||||
(
|
||||
set +e
|
||||
broot --outcmd "$f" "$@"
|
||||
code=$?
|
||||
if [ "$code" != 0 ]; then
|
||||
rm -f "$f"
|
||||
exit "$code"
|
||||
fi
|
||||
)
|
||||
code=$?
|
||||
if [ "$code" != 0 ]; then
|
||||
return "$code"
|
||||
fi
|
||||
d=$(cat "$f")
|
||||
rm -f "$f"
|
||||
eval "$d"
|
||||
# Remove conf.hjson, whose content has been merged into programs.broot.settings
|
||||
postBuild = ''
|
||||
rm $out/conf.hjson
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
programs.broot.settings = builtins.fromJSON (builtins.readFile
|
||||
(pkgs.runCommand "default-conf.json" {
|
||||
nativeBuildInputs = [ pkgs.hjson ];
|
||||
}
|
||||
'';
|
||||
"hjson -c ${cfg.package.src}/resources/default-conf/conf.hjson > $out"));
|
||||
|
||||
programs.fish.shellInit = mkIf cfg.enableFishIntegration ''
|
||||
# This script was automatically generated by the broot function
|
||||
# More information can be found in https://github.com/Canop/broot
|
||||
# This function starts broot and executes the command
|
||||
# it produces, if any.
|
||||
# It's needed because some shell commands, like `cd`,
|
||||
# have no useful effect if executed in a subshell.
|
||||
function br
|
||||
set f (mktemp)
|
||||
broot --outcmd $f $argv
|
||||
if test $status -ne 0
|
||||
rm -f "$f"
|
||||
return "$code"
|
||||
end
|
||||
set d (cat "$f")
|
||||
rm -f "$f"
|
||||
eval "$d"
|
||||
end
|
||||
'';
|
||||
programs.bash.initExtra = mkIf cfg.enableBashIntegration (shellInit "bash");
|
||||
|
||||
programs.zsh.initExtra = mkIf cfg.enableZshIntegration (shellInit "zsh");
|
||||
|
||||
programs.fish.shellInit = mkIf cfg.enableFishIntegration (shellInit "fish");
|
||||
};
|
||||
}
|
||||
|
|
|
@ -64,7 +64,7 @@ let
|
|||
id = mkOption {
|
||||
type = strMatching "[a-zA-Z]{32}";
|
||||
description = ''
|
||||
The extension's ID from the Chome Web Store url or the unpacked crx.
|
||||
The extension's ID from the Chrome Web Store url or the unpacked crx.
|
||||
'';
|
||||
default = "";
|
||||
};
|
||||
|
|
|
@ -29,7 +29,7 @@ in {
|
|||
default = { };
|
||||
description = ''
|
||||
Configuration written to
|
||||
<filename>$XDG_CONFIG_HOME/direnv/config.toml</filename>.
|
||||
<filename>$XDG_CONFIG_HOME/direnv/direnv.toml</filename>.
|
||||
</para><para>
|
||||
See
|
||||
<citerefentry>
|
||||
|
@ -80,6 +80,15 @@ in {
|
|||
'';
|
||||
};
|
||||
|
||||
enableNushellIntegration = mkOption {
|
||||
default = true;
|
||||
type = types.bool;
|
||||
readOnly = true;
|
||||
description = ''
|
||||
Whether to enable Nushell integration.
|
||||
'';
|
||||
};
|
||||
|
||||
nix-direnv = {
|
||||
enable = mkEnableOption ''
|
||||
<link
|
||||
|
@ -92,7 +101,7 @@ in {
|
|||
config = mkIf cfg.enable {
|
||||
home.packages = [ pkgs.direnv ];
|
||||
|
||||
xdg.configFile."direnv/config.toml" = mkIf (cfg.config != { }) {
|
||||
xdg.configFile."direnv/direnv.toml" = mkIf (cfg.config != { }) {
|
||||
source = tomlFormat.generate "direnv-config" cfg.config;
|
||||
};
|
||||
|
||||
|
@ -119,5 +128,21 @@ in {
|
|||
mkAfter ''
|
||||
${pkgs.direnv}/bin/direnv hook fish | source
|
||||
'');
|
||||
|
||||
programs.nushell.extraConfig = mkIf cfg.enableNushellIntegration (
|
||||
# Using mkAfter to make it more likely to appear after other
|
||||
# manipulations of the prompt.
|
||||
mkAfter ''
|
||||
let-env config = ($env | default {} config).config
|
||||
let-env config = ($env.config | default {} hooks)
|
||||
let-env config = ($env.config | update hooks ($env.config.hooks | default [] pre_prompt))
|
||||
let-env config = ($env.config | update hooks.pre_prompt ($env.config.hooks.pre_prompt | append {
|
||||
code: "
|
||||
let direnv = (${pkgs.direnv}/bin/direnv export json | from json)
|
||||
let direnv = if ($direnv | length) == 1 { $direnv } else { {} }
|
||||
$direnv | load-env
|
||||
"
|
||||
}))
|
||||
'');
|
||||
};
|
||||
}
|
||||
|
|
49
modules/programs/discocss.nix
Normal file
49
modules/programs/discocss.nix
Normal file
|
@ -0,0 +1,49 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let cfg = config.programs.discocss;
|
||||
in {
|
||||
meta.maintainers = with maintainers; [ kranzes ];
|
||||
|
||||
options = {
|
||||
programs.discocss = {
|
||||
enable = mkEnableOption
|
||||
"discocss, a tiny Discord CSS injector for Linux and MacOS";
|
||||
|
||||
package = mkPackageOption pkgs "discocss" { };
|
||||
|
||||
discordPackage = mkPackageOption pkgs "discord" { };
|
||||
|
||||
discordAlias = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = "Whether to alias discocss to discord.";
|
||||
};
|
||||
|
||||
css = mkOption {
|
||||
type = types.str;
|
||||
default = "";
|
||||
description = "The custom CSS for discocss to use.";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
assertions = [{
|
||||
assertion = cfg.discordAlias
|
||||
-> !(any (p: p.name == cfg.discordPackage.name) config.home.packages);
|
||||
message =
|
||||
"To use discocss with discordAlias you have to remove discord from home.packages, or set discordAlias to false.";
|
||||
}];
|
||||
|
||||
home.packages = [
|
||||
(cfg.package.override {
|
||||
discordAlias = cfg.discordAlias;
|
||||
discord = cfg.discordPackage;
|
||||
})
|
||||
];
|
||||
|
||||
xdg.configFile."discocss/custom.css".text = cfg.css;
|
||||
};
|
||||
}
|
|
@ -52,6 +52,10 @@ in {
|
|||
Configuration to include in the Emacs default init file. See
|
||||
<link xlink:href="https://www.gnu.org/software/emacs/manual/html_node/elisp/Init-File.html"/>
|
||||
for more.
|
||||
</para><para>
|
||||
Note, the <literal>inhibit-startup-message</literal> Emacs option
|
||||
cannot be set here since Emacs disallows setting it from the default
|
||||
initialization file.
|
||||
'';
|
||||
};
|
||||
|
||||
|
|
|
@ -20,11 +20,14 @@ in {
|
|||
options.programs.exa = {
|
||||
enable =
|
||||
mkEnableOption "exa, a modern replacement for <command>ls</command>";
|
||||
|
||||
enableAliases = mkEnableOption "recommended exa aliases";
|
||||
|
||||
package = mkPackageOption pkgs "exa" { };
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = [ pkgs.exa ];
|
||||
home.packages = [ cfg.package ];
|
||||
|
||||
programs.bash.shellAliases = mkIf cfg.enableAliases aliases;
|
||||
|
||||
|
|
|
@ -27,6 +27,8 @@ in {
|
|||
options.programs.feh = {
|
||||
enable = mkEnableOption "feh - a fast and light image viewer";
|
||||
|
||||
package = mkPackageOption pkgs "feh" { };
|
||||
|
||||
buttons = mkOption {
|
||||
default = { };
|
||||
type = with types; bindingsOf (either str int);
|
||||
|
@ -69,7 +71,7 @@ in {
|
|||
"To disable a keybinding, use `null` instead of an empty string.";
|
||||
}];
|
||||
|
||||
home.packages = [ pkgs.feh ];
|
||||
home.packages = [ cfg.package ];
|
||||
|
||||
xdg.configFile."feh/buttons" =
|
||||
mkIf (cfg.buttons != { }) { text = renderBindings cfg.buttons + "\n"; };
|
||||
|
|
|
@ -8,6 +8,8 @@ let
|
|||
|
||||
cfg = config.programs.firefox;
|
||||
|
||||
jsonFormat = pkgs.formats.json { };
|
||||
|
||||
mozillaConfigPath =
|
||||
if isDarwin then "Library/Application Support/Mozilla" else ".mozilla";
|
||||
|
||||
|
@ -40,6 +42,12 @@ let
|
|||
|
||||
profilesIni = generators.toINI { } profiles;
|
||||
|
||||
userPrefValue = pref:
|
||||
builtins.toJSON (if isBool pref || isInt pref || isString pref then
|
||||
pref
|
||||
else
|
||||
builtins.toJSON pref);
|
||||
|
||||
mkUserJs = prefs: extraPrefs: bookmarks:
|
||||
let
|
||||
prefs' = lib.optionalAttrs ([ ] != bookmarks) {
|
||||
|
@ -50,7 +58,7 @@ let
|
|||
// Generated by Home Manager.
|
||||
|
||||
${concatStrings (mapAttrsToList (name: value: ''
|
||||
user_pref("${name}", ${builtins.toJSON value});
|
||||
user_pref("${name}", ${userPrefValue value});
|
||||
'') prefs')}
|
||||
|
||||
${extraPrefs}
|
||||
|
@ -106,7 +114,7 @@ let
|
|||
'';
|
||||
|
||||
in {
|
||||
meta.maintainers = [ maintainers.rycee ];
|
||||
meta.maintainers = [ maintainers.rycee maintainers.kira-bruneau ];
|
||||
|
||||
imports = [
|
||||
(mkRemovedOptionModule [ "programs" "firefox" "enableAdobeFlash" ]
|
||||
|
@ -151,7 +159,6 @@ in {
|
|||
default = [ ];
|
||||
example = literalExpression ''
|
||||
with pkgs.nur.repos.rycee.firefox-addons; [
|
||||
https-everywhere
|
||||
privacy-badger
|
||||
]
|
||||
'';
|
||||
|
@ -200,7 +207,10 @@ in {
|
|||
};
|
||||
|
||||
settings = mkOption {
|
||||
type = with types; attrsOf (either bool (either int str));
|
||||
type = types.attrsOf (jsonFormat.type // {
|
||||
description =
|
||||
"Firefox preference (int, bool, string, and also attrs, list, float as a JSON string)";
|
||||
});
|
||||
default = { };
|
||||
example = literalExpression ''
|
||||
{
|
||||
|
@ -210,9 +220,19 @@ in {
|
|||
"distribution.searchplugins.defaultLocale" = "en-GB";
|
||||
"general.useragent.locale" = "en-GB";
|
||||
"browser.bookmarks.showMobileBookmarks" = true;
|
||||
"browser.newtabpage.pinned" = [{
|
||||
title = "NixOS";
|
||||
url = "https://nixos.org";
|
||||
}];
|
||||
}
|
||||
'';
|
||||
description = "Attribute set of Firefox preferences.";
|
||||
description = ''
|
||||
Attribute set of Firefox preferences.
|
||||
|
||||
Firefox only supports int, bool, and string types for
|
||||
preferences, but home-manager will automatically
|
||||
convert all other JSON-compatible values into strings.
|
||||
'';
|
||||
};
|
||||
|
||||
extraConfig = mkOption {
|
||||
|
@ -351,6 +371,87 @@ in {
|
|||
defaultText = "true if profile ID is 0";
|
||||
description = "Whether this is a default profile.";
|
||||
};
|
||||
|
||||
search = {
|
||||
force = mkOption {
|
||||
type = with types; bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Whether to force replace the existing search
|
||||
configuration. This is recommended since Firefox will
|
||||
replace the symlink for the search configuration on every
|
||||
launch, but note that you'll lose any existing
|
||||
configuration by enabling this.
|
||||
'';
|
||||
};
|
||||
|
||||
default = mkOption {
|
||||
type = with types; nullOr str;
|
||||
default = null;
|
||||
example = "DuckDuckGo";
|
||||
description = ''
|
||||
The default search engine used in the address bar and search bar.
|
||||
'';
|
||||
};
|
||||
|
||||
order = mkOption {
|
||||
type = with types; uniq (listOf str);
|
||||
default = [ ];
|
||||
example = [ "DuckDuckGo" "Google" ];
|
||||
description = ''
|
||||
The order the search engines are listed in. Any engines
|
||||
that aren't included in this list will be listed after
|
||||
these in an unspecified order.
|
||||
'';
|
||||
};
|
||||
|
||||
engines = mkOption {
|
||||
type = with types; attrsOf (attrsOf jsonFormat.type);
|
||||
default = { };
|
||||
example = literalExpression ''
|
||||
{
|
||||
"Nix Packages" = {
|
||||
urls = [{
|
||||
template = "https://search.nixos.org/packages";
|
||||
params = [
|
||||
{ name = "type"; value = "packages"; }
|
||||
{ name = "query"; value = "{searchTerms}"; }
|
||||
];
|
||||
}];
|
||||
|
||||
icon = "''${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
|
||||
definedAliases = [ "@np" ];
|
||||
};
|
||||
|
||||
"NixOS Wiki" = {
|
||||
urls = [{ template = "https://nixos.wiki/index.php?search={searchTerms}"; }];
|
||||
iconUpdateURL = "https://nixos.wiki/favicon.png";
|
||||
updateInterval = 24 * 60 * 60 * 1000; # every day
|
||||
definedAliases = [ "@nw" ];
|
||||
};
|
||||
|
||||
"Bing".metaData.hidden = true;
|
||||
"Google".metaData.alias = "@g"; # builtin engines only support specifying one additional alias
|
||||
}
|
||||
'';
|
||||
description = ''
|
||||
Attribute set of search engine configurations. Engines
|
||||
that only have <varname>metaData</varname> specified will
|
||||
be treated as builtin to Firefox.
|
||||
</para><para>
|
||||
See <link xlink:href=
|
||||
"https://searchfox.org/mozilla-central/rev/669329e284f8e8e2bb28090617192ca9b4ef3380/toolkit/components/search/SearchEngine.jsm#1138-1177">SearchEngine.jsm</link>
|
||||
in Firefox's source for available options. We maintain a
|
||||
mapping to let you specify all options in the referenced
|
||||
link without underscores, but it may fall out of date with
|
||||
future options.
|
||||
</para><para>
|
||||
Note, <varname>icon</varname> is also a special option
|
||||
added by Home Manager to make it convenient to specify
|
||||
absolute icon paths.
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
}));
|
||||
default = { };
|
||||
|
@ -363,7 +464,7 @@ in {
|
|||
description = ''
|
||||
Whether to enable the GNOME Shell native host connector. Note, you
|
||||
also need to set the NixOS option
|
||||
<literal>services.gnome3.chrome-gnome-shell.enable</literal> to
|
||||
<literal>services.gnome.gnome-browser-connector.enable</literal> to
|
||||
<literal>true</literal>.
|
||||
'';
|
||||
};
|
||||
|
@ -444,6 +545,134 @@ in {
|
|||
mkUserJs profile.settings profile.extraConfig profile.bookmarks;
|
||||
};
|
||||
|
||||
"${profilesPath}/${profile.path}/search.json.mozlz4" = mkIf
|
||||
(profile.search.default != null || profile.search.order != [ ]
|
||||
|| profile.search.engines != { }) {
|
||||
force = profile.search.force;
|
||||
source = let
|
||||
settings = {
|
||||
version = 6;
|
||||
engines = let
|
||||
# Map of nice field names to internal field names.
|
||||
# This is intended to be exhaustive and should be
|
||||
# updated at every version bump.
|
||||
internalFieldNames = (genAttrs [
|
||||
"name"
|
||||
"isAppProvided"
|
||||
"loadPath"
|
||||
"hasPreferredIcon"
|
||||
"updateInterval"
|
||||
"updateURL"
|
||||
"iconUpdateURL"
|
||||
"iconURL"
|
||||
"iconMapObj"
|
||||
"metaData"
|
||||
"orderHint"
|
||||
"definedAliases"
|
||||
"urls"
|
||||
] (name: "_${name}")) // {
|
||||
searchForm = "__searchForm";
|
||||
};
|
||||
|
||||
processCustomEngineInput = input:
|
||||
(removeAttrs input [ "icon" ])
|
||||
// optionalAttrs (input ? icon) {
|
||||
# Convenience to specify absolute path to icon
|
||||
iconURL = "file://${input.icon}";
|
||||
} // (optionalAttrs (input ? iconUpdateURL) {
|
||||
# Convenience to default iconURL to iconUpdateURL so
|
||||
# the icon is immediately downloaded from the URL
|
||||
iconURL = input.iconURL or input.iconUpdateURL;
|
||||
} // {
|
||||
# Required for custom engine configurations, loadPaths
|
||||
# are unique identifiers that are generally formatted
|
||||
# like: [source]/path/to/engine.xml
|
||||
loadPath = ''
|
||||
[home-manager]/programs.firefox.profiles.${profile.name}.search.engines."${
|
||||
replaceStrings [ "\\" ] [ "\\\\" ] input.name
|
||||
}"'';
|
||||
});
|
||||
|
||||
processEngineInput = name: input:
|
||||
let
|
||||
requiredInput = {
|
||||
inherit name;
|
||||
isAppProvided = input.isAppProvided or removeAttrs input
|
||||
[ "metaData" ] == { };
|
||||
metaData = input.metaData or { };
|
||||
};
|
||||
in if requiredInput.isAppProvided then
|
||||
requiredInput
|
||||
else
|
||||
processCustomEngineInput (input // requiredInput);
|
||||
|
||||
buildEngineConfig = name: input:
|
||||
mapAttrs' (name: value: {
|
||||
name = internalFieldNames.${name} or name;
|
||||
inherit value;
|
||||
}) (processEngineInput name input);
|
||||
|
||||
sortEngineConfigs = configs:
|
||||
let
|
||||
buildEngineConfigWithOrder = order: name:
|
||||
let
|
||||
config = configs.${name} or {
|
||||
_name = name;
|
||||
_isAppProvided = true;
|
||||
_metaData = { };
|
||||
};
|
||||
in config // {
|
||||
_metaData = config._metaData // { inherit order; };
|
||||
};
|
||||
|
||||
engineConfigsWithoutOrder =
|
||||
attrValues (removeAttrs configs profile.search.order);
|
||||
|
||||
sortedEngineConfigs =
|
||||
(imap buildEngineConfigWithOrder profile.search.order)
|
||||
++ engineConfigsWithoutOrder;
|
||||
in sortedEngineConfigs;
|
||||
|
||||
engineInput = profile.search.engines // {
|
||||
# Infer profile.search.default as an app provided
|
||||
# engine if it's not in profile.search.engines
|
||||
${profile.search.default} =
|
||||
profile.search.engines.${profile.search.default} or { };
|
||||
};
|
||||
in sortEngineConfigs (mapAttrs buildEngineConfig engineInput);
|
||||
|
||||
metaData = optionalAttrs (profile.search.default != null) {
|
||||
current = profile.search.default;
|
||||
hash = "@hash@";
|
||||
} // {
|
||||
useSavedOrder = profile.search.order != [ ];
|
||||
};
|
||||
};
|
||||
|
||||
# Home Manager doesn't circumvent user consent and isn't acting
|
||||
# maliciously. We're modifying the search outside of Firefox, but
|
||||
# a claim by Mozilla to remove this would be very anti-user, and
|
||||
# is unlikely to be an issue for our use case.
|
||||
disclaimer = appName:
|
||||
"By modifying this file, I agree that I am doing so "
|
||||
+ "only within ${appName} itself, using official, user-driven search "
|
||||
+ "engine selection processes, and in a way which does not circumvent "
|
||||
+ "user consent. I acknowledge that any attempt to change this file "
|
||||
+ "from outside of ${appName} is a malicious act, and will be responded "
|
||||
+ "to accordingly.";
|
||||
|
||||
salt = profile.path + profile.search.default
|
||||
+ disclaimer "Firefox";
|
||||
in pkgs.runCommand "search.json.mozlz4" {
|
||||
nativeBuildInputs = with pkgs; [ mozlz4a openssl ];
|
||||
json = builtins.toJSON settings;
|
||||
inherit salt;
|
||||
} ''
|
||||
export hash=$(echo -n "$salt" | openssl dgst -sha256 -binary | base64)
|
||||
mozlz4a <(substituteStream json search.json.in --subst-var hash) "$out"
|
||||
'';
|
||||
};
|
||||
|
||||
"${profilesPath}/${profile.path}/extensions" =
|
||||
mkIf (cfg.extensions != [ ]) {
|
||||
source = "${extensionsEnvPkg}/share/mozilla/${extensionPath}";
|
||||
|
|
|
@ -145,6 +145,13 @@ let
|
|||
aliasesStr = concatStringsSep "\n"
|
||||
(mapAttrsToList (k: v: "alias ${k} ${escapeShellArg v}") cfg.shellAliases);
|
||||
|
||||
fishIndent = name: text:
|
||||
pkgs.runCommand name {
|
||||
nativeBuildInputs = [ cfg.package ];
|
||||
inherit text;
|
||||
passAsFile = [ "text" ];
|
||||
} "env HOME=$(mktemp -d) fish_indent < $textPath > $out";
|
||||
|
||||
in {
|
||||
imports = [
|
||||
(mkRemovedOptionModule [ "programs" "fish" "promptInit" ] ''
|
||||
|
@ -278,7 +285,6 @@ in {
|
|||
<link xlink:href="https://fishshell.com/docs/current/cmds/function.html"/>.
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable (mkMerge [
|
||||
|
@ -340,7 +346,7 @@ in {
|
|||
end
|
||||
'';
|
||||
|
||||
xdg.configFile."fish/config.fish".text = ''
|
||||
xdg.configFile."fish/config.fish".source = fishIndent "config.fish" ''
|
||||
# ~/.config/fish/config.fish: DO NOT EDIT -- this file has been generated
|
||||
# automatically by home-manager.
|
||||
|
||||
|
@ -369,7 +375,7 @@ in {
|
|||
# Aliases
|
||||
${aliasesStr}
|
||||
|
||||
# Interactive shell intialisation
|
||||
# Interactive shell initialisation
|
||||
${cfg.interactiveShellInit}
|
||||
|
||||
end
|
||||
|
@ -379,7 +385,7 @@ in {
|
|||
xdg.configFile = mapAttrs' (name: def: {
|
||||
name = "fish/functions/${name}.fish";
|
||||
value = {
|
||||
text = let
|
||||
source = let
|
||||
modifierStr = n: v: optional (v != null) ''--${n}="${toString v}"'';
|
||||
modifierStrs = n: v: optional (v != null) "--${n}=${toString v}";
|
||||
modifierBool = n: v: optional (v != null && v) "--${n}";
|
||||
|
@ -397,9 +403,9 @@ in {
|
|||
|
||||
modifiers = if isAttrs def then " ${toString mods}" else "";
|
||||
body = if isAttrs def then def.body else def;
|
||||
in ''
|
||||
in fishIndent "${name}.fish" ''
|
||||
function ${name}${modifiers}
|
||||
${body}
|
||||
${lib.strings.removeSuffix "\n" body}
|
||||
end
|
||||
'';
|
||||
};
|
||||
|
@ -410,34 +416,35 @@ in {
|
|||
# in the paths and any initialization scripts.
|
||||
(mkIf (length cfg.plugins > 0) {
|
||||
xdg.configFile = mkMerge ((map (plugin: {
|
||||
"fish/conf.d/plugin-${plugin.name}.fish".text = ''
|
||||
# Plugin ${plugin.name}
|
||||
set -l plugin_dir ${plugin.src}
|
||||
"fish/conf.d/plugin-${plugin.name}.fish".source =
|
||||
fishIndent "${plugin.name}.fish" ''
|
||||
# Plugin ${plugin.name}
|
||||
set -l plugin_dir ${plugin.src}
|
||||
|
||||
# Set paths to import plugin components
|
||||
if test -d $plugin_dir/functions
|
||||
set fish_function_path $fish_function_path[1] $plugin_dir/functions $fish_function_path[2..-1]
|
||||
end
|
||||
|
||||
if test -d $plugin_dir/completions
|
||||
set fish_complete_path $fish_complete_path[1] $plugin_dir/completions $fish_complete_path[2..-1]
|
||||
end
|
||||
|
||||
# Source initialization code if it exists.
|
||||
if test -d $plugin_dir/conf.d
|
||||
for f in $plugin_dir/conf.d/*.fish
|
||||
source $f
|
||||
# Set paths to import plugin components
|
||||
if test -d $plugin_dir/functions
|
||||
set fish_function_path $fish_function_path[1] $plugin_dir/functions $fish_function_path[2..-1]
|
||||
end
|
||||
end
|
||||
|
||||
if test -f $plugin_dir/key_bindings.fish
|
||||
source $plugin_dir/key_bindings.fish
|
||||
end
|
||||
if test -d $plugin_dir/completions
|
||||
set fish_complete_path $fish_complete_path[1] $plugin_dir/completions $fish_complete_path[2..-1]
|
||||
end
|
||||
|
||||
if test -f $plugin_dir/init.fish
|
||||
source $plugin_dir/init.fish
|
||||
end
|
||||
'';
|
||||
# Source initialization code if it exists.
|
||||
if test -d $plugin_dir/conf.d
|
||||
for f in $plugin_dir/conf.d/*.fish
|
||||
source $f
|
||||
end
|
||||
end
|
||||
|
||||
if test -f $plugin_dir/key_bindings.fish
|
||||
source $plugin_dir/key_bindings.fish
|
||||
end
|
||||
|
||||
if test -f $plugin_dir/init.fish
|
||||
source $plugin_dir/init.fish
|
||||
end
|
||||
'';
|
||||
}) cfg.plugins));
|
||||
})
|
||||
]);
|
||||
|
|
|
@ -6,6 +6,10 @@ let
|
|||
|
||||
cfg = config.programs.fzf;
|
||||
|
||||
renderedColors = colors:
|
||||
concatStringsSep ","
|
||||
(mapAttrsToList (name: value: "${name}:${value}") colors);
|
||||
|
||||
in {
|
||||
imports = [
|
||||
(mkRemovedOptionModule [ "programs" "fzf" "historyWidgetCommand" ]
|
||||
|
@ -88,6 +92,24 @@ in {
|
|||
'';
|
||||
};
|
||||
|
||||
colors = mkOption {
|
||||
type = types.attrsOf types.str;
|
||||
default = { };
|
||||
example = literalExpression ''
|
||||
{
|
||||
bg = "#1e1e1e";
|
||||
"bg+" = "#1e1e1e";
|
||||
fg = "#d4d4d4";
|
||||
"fg+" = "#d4d4d4";
|
||||
}
|
||||
'';
|
||||
description = ''
|
||||
Color scheme options added to <code>FZF_DEFAULT_OPTS</code>. See
|
||||
<link xlink:href="https://github.com/junegunn/fzf/wiki/Color-schemes"/>
|
||||
for documentation.
|
||||
'';
|
||||
};
|
||||
|
||||
tmux = {
|
||||
enableShellIntegration = mkEnableOption ''
|
||||
setting <literal>FZF_TMUX=1</literal> which causes shell integration to use fzf-tmux
|
||||
|
@ -141,7 +163,9 @@ in {
|
|||
FZF_CTRL_T_COMMAND = cfg.fileWidgetCommand;
|
||||
FZF_CTRL_T_OPTS = cfg.fileWidgetOptions;
|
||||
FZF_DEFAULT_COMMAND = cfg.defaultCommand;
|
||||
FZF_DEFAULT_OPTS = cfg.defaultOptions;
|
||||
FZF_DEFAULT_OPTS = cfg.defaultOptions
|
||||
++ lib.optionals (cfg.colors != { })
|
||||
[ "--color ${renderedColors cfg.colors}" ];
|
||||
FZF_TMUX = if cfg.tmux.enableShellIntegration then "1" else null;
|
||||
FZF_TMUX_OPTS = cfg.tmux.shellIntegrationOptions;
|
||||
});
|
||||
|
|
|
@ -267,7 +267,7 @@ in {
|
|||
difftastic = {
|
||||
enable = mkEnableOption "" // {
|
||||
description = ''
|
||||
Enable the <command>difft</command> syntax highlighter.
|
||||
Enable the <command>difftastic</command> syntax highlighter.
|
||||
See <link xlink:href="https://github.com/Wilfred/difftastic" />.
|
||||
'';
|
||||
};
|
||||
|
@ -278,7 +278,7 @@ in {
|
|||
example = "dark";
|
||||
description = ''
|
||||
Determines whether difftastic should use the lighter or darker colors
|
||||
for syntax highlithing.
|
||||
for syntax highlighting.
|
||||
'';
|
||||
};
|
||||
|
||||
|
@ -527,10 +527,7 @@ in {
|
|||
"--background ${cfg.difftastic.background}"
|
||||
"--display ${cfg.difftastic.display}"
|
||||
];
|
||||
in {
|
||||
diff.external = difftCommand;
|
||||
core.pager = "${pkgs.less}/bin/less -XF";
|
||||
};
|
||||
in { diff.external = difftCommand; };
|
||||
})
|
||||
|
||||
(mkIf cfg.delta.enable {
|
||||
|
|
|
@ -41,6 +41,8 @@ in {
|
|||
selected_tab: Reset,
|
||||
command_fg: White,
|
||||
selection_bg: Blue,
|
||||
selection_fg: White,
|
||||
cmdbar_bg: Blue,
|
||||
cmdbar_extra_lines_bg: Blue,
|
||||
disabled_fg: DarkGray,
|
||||
diff_line_add: Green,
|
||||
|
@ -55,6 +57,8 @@ in {
|
|||
danger_fg: Red,
|
||||
push_gauge_bg: Blue,
|
||||
push_gauge_fg: Reset,
|
||||
tag_fg: LightMagenta,
|
||||
branch_fg: LightYellow,
|
||||
)
|
||||
'';
|
||||
description = ''
|
||||
|
|
64
modules/programs/havoc.nix
Normal file
64
modules/programs/havoc.nix
Normal file
|
@ -0,0 +1,64 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
|
||||
cfg = config.programs.havoc;
|
||||
iniFormat = pkgs.formats.ini { };
|
||||
|
||||
in {
|
||||
meta.maintainers = with lib.maintainers; [ AndersonTorres ];
|
||||
|
||||
options.programs.havoc = {
|
||||
enable = mkEnableOption "Havoc terminal";
|
||||
|
||||
package = mkPackageOption pkgs "havoc" { };
|
||||
|
||||
settings = mkOption {
|
||||
type = iniFormat.type;
|
||||
default = { };
|
||||
description = ''
|
||||
Configuration written to
|
||||
<filename>$XDG_CONFIG_HOME/havoc.cfg</filename>. See <link
|
||||
xlink:href="https://raw.githubusercontent.com/ii8/havoc/master/havoc.cfg"/>
|
||||
for a list of available options.
|
||||
'';
|
||||
example = literalExpression ''
|
||||
{
|
||||
child.program = "bash";
|
||||
window.opacity = 240;
|
||||
window.margin = no;
|
||||
terminal = {
|
||||
rows = 80;
|
||||
columns = 24;
|
||||
scrollback = 2000;
|
||||
};
|
||||
bind = {
|
||||
"C-S-c" = "copy";
|
||||
"C-S-v" = "paste";
|
||||
"C-S-r" = "reset";
|
||||
"C-S-Delete" = "hard reset";
|
||||
"C-S-j" = "scroll down";
|
||||
"C-S-k" = "scroll up";
|
||||
"C-S-Page_Down" = "scroll down page";
|
||||
"C-S-Page_Up" = "scroll up page";
|
||||
"C-S-End" = "scroll to bottom";
|
||||
"C-S-Home" = "scroll to top";
|
||||
};
|
||||
}
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
assertions =
|
||||
[ (hm.assertions.assertPlatform "programs.havoc" pkgs platforms.linux) ];
|
||||
|
||||
home.packages = [ cfg.package ];
|
||||
|
||||
xdg.configFile."havoc.cfg" = mkIf (cfg.settings != { }) {
|
||||
source = iniFormat.generate "havoc.cfg" cfg.settings;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -170,7 +170,7 @@ let
|
|||
servers = mkOption {
|
||||
type = listOf str;
|
||||
default = [ ];
|
||||
example = [ "chat.freenode.net" "irc.freenode.net" ];
|
||||
example = [ "irc.oftc.net" ];
|
||||
description = "IRC Server Address List.";
|
||||
};
|
||||
};
|
||||
|
@ -239,11 +239,10 @@ in {
|
|||
default = { };
|
||||
example = literalExpression ''
|
||||
{
|
||||
freenode = {
|
||||
oftc = {
|
||||
autojoin = [
|
||||
"#home-manager"
|
||||
"#linux"
|
||||
"#nixos"
|
||||
];
|
||||
charset = "UTF-8 (Unicode)";
|
||||
commands = [
|
||||
|
@ -263,8 +262,7 @@ in {
|
|||
password = "my_password";
|
||||
realName = "my_realname";
|
||||
servers = [
|
||||
"chat.freenode.net"
|
||||
"irc.freenode.net"
|
||||
"irc.oftc.net"
|
||||
];
|
||||
userName = "my_username";
|
||||
};
|
||||
|
|
|
@ -11,7 +11,7 @@ let
|
|||
toHimalayaConfig = account:
|
||||
{
|
||||
email = account.address;
|
||||
name = account.realName;
|
||||
display-name = account.realName;
|
||||
default = account.primary;
|
||||
|
||||
mailboxes = {
|
||||
|
@ -20,30 +20,46 @@ let
|
|||
draft = account.folders.drafts;
|
||||
# NOTE: himalaya does not support configuring the name of the trash folder
|
||||
};
|
||||
|
||||
} // (lib.optionalAttrs (account.signature.showSignature == "append") {
|
||||
# FIXME: signature cannot be attached
|
||||
signature = account.signature.text;
|
||||
signature-delim = account.signature.delimiter;
|
||||
}) // (if account.himalaya.backend == null then {
|
||||
backend = "none";
|
||||
} else if account.himalaya.backend == "imap" then {
|
||||
# FIXME: does not support disabling TLS altogether
|
||||
# NOTE: does not accept sequence of strings for password commands
|
||||
backend = account.himalaya.backend;
|
||||
imap-login = account.userName;
|
||||
imap-passwd-cmd = lib.escapeShellArgs account.passwordCommand;
|
||||
imap-host = account.imap.host;
|
||||
imap-port = account.imap.port;
|
||||
imap-starttls = account.imap.tls.useStartTls;
|
||||
|
||||
} else if account.himalaya.backend == "maildir" then {
|
||||
backend = account.himalaya.backend;
|
||||
maildir-root-dir = account.maildirBasePath;
|
||||
} else
|
||||
throw "Unsupported backend: ${account.himalaya.backend}")
|
||||
// (if account.himalaya.sender == null then {
|
||||
sender = "none";
|
||||
} else if account.himalaya.sender == "smtp" then {
|
||||
sender = account.himalaya.sender;
|
||||
smtp-login = account.userName;
|
||||
smtp-passwd-cmd = lib.escapeShellArgs account.passwordCommand;
|
||||
smtp-host = account.smtp.host;
|
||||
smtp-port = account.smtp.port;
|
||||
smtp-starttls = account.smtp.tls.useStartTls;
|
||||
} // (lib.optionalAttrs (account.signature.showSignature == "append") {
|
||||
# FIXME: signature cannot be attached
|
||||
signature = account.signature.text;
|
||||
}) // account.himalaya.settings;
|
||||
} else if account.himalaya.sender == "sendmail" then {
|
||||
sender = account.himalaya.sender;
|
||||
} else
|
||||
throw "Unsupported sender: ${account.himalaya.sender}")
|
||||
// account.himalaya.settings;
|
||||
in {
|
||||
# NOTE: will not start without this configured, but each account overrides it
|
||||
name = "";
|
||||
display-name = "";
|
||||
} // cfg.settings // (lib.mapAttrs (_: toHimalayaConfig) enabledAccounts);
|
||||
in {
|
||||
meta.maintainers = with lib.hm.maintainers; [ ambroisie ];
|
||||
meta.maintainers = with lib.hm.maintainers; [ toastal ];
|
||||
|
||||
options = with lib; {
|
||||
programs.himalaya = {
|
||||
|
@ -63,7 +79,8 @@ in {
|
|||
default = { };
|
||||
example = lib.literalExpression ''
|
||||
{
|
||||
default-page-size = 50;
|
||||
email-listing-page-size = 50;
|
||||
watch-cmds = [ "mbsync -a" ]
|
||||
}
|
||||
'';
|
||||
description = ''
|
||||
|
@ -80,6 +97,22 @@ in {
|
|||
the himalaya mail client for this account
|
||||
'';
|
||||
|
||||
backend = mkOption {
|
||||
# TODO: “notmuch” (requires compile flag for himalaya, libnotmuch)
|
||||
type = types.nullOr (types.enum [ "imap" "maildir" ]);
|
||||
description = ''
|
||||
The method for which <command>himalaya</command> will fetch, store,
|
||||
etc. mail.
|
||||
'';
|
||||
};
|
||||
|
||||
sender = mkOption {
|
||||
type = types.nullOr (types.enum [ "smtp" "sendmail" ]);
|
||||
description = ''
|
||||
The method for which <command>himalaya</command> will send mail.
|
||||
'';
|
||||
};
|
||||
|
||||
settings = mkOption {
|
||||
type = tomlFormat.type;
|
||||
default = { };
|
||||
|
|
|
@ -138,6 +138,8 @@ in {
|
|||
}
|
||||
'';
|
||||
};
|
||||
|
||||
package = mkPackageOption pkgs "i3status" { };
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
@ -197,7 +199,7 @@ in {
|
|||
};
|
||||
};
|
||||
|
||||
home.packages = [ pkgs.i3status ];
|
||||
home.packages = [ cfg.package ];
|
||||
|
||||
xdg.configFile."i3status/config".text = concatStringsSep "\n" ([ ]
|
||||
++ optional (cfg.general != { }) (formatModule "general" cfg.general)
|
||||
|
|
|
@ -23,6 +23,11 @@ let
|
|||
type = "${v.type}";
|
||||
nick = "${quoteStr v.nick}";
|
||||
autosendcmd = "${concatMapStringsSep ";" quoteStr v.autoCommands}";
|
||||
${
|
||||
lib.optionalString (v.saslExternal) ''
|
||||
sasl_username = "${quoteStr v.nick}";
|
||||
sasl_mechanism = "EXTERNAL";''
|
||||
}
|
||||
};
|
||||
''));
|
||||
|
||||
|
@ -36,7 +41,7 @@ let
|
|||
ssl_verify = "${lib.hm.booleans.yesNo v.server.ssl.verify}";
|
||||
autoconnect = "${lib.hm.booleans.yesNo v.server.autoConnect}";
|
||||
${
|
||||
lib.optionalString (v.server.ssl.certificateFile != null) ''
|
||||
optionalString (v.server.ssl.certificateFile != null) ''
|
||||
ssl_cert = "${v.server.ssl.certificateFile}";
|
||||
''
|
||||
}
|
||||
|
@ -142,6 +147,15 @@ let
|
|||
type = types.attrsOf channelType;
|
||||
default = { };
|
||||
};
|
||||
|
||||
saslExternal = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Enable SASL external authentication. This requires setting a path in
|
||||
<xref linkend="opt-programs.irssi.networks._name_.server.ssl.certificateFile"/>.
|
||||
'';
|
||||
};
|
||||
};
|
||||
});
|
||||
|
||||
|
@ -171,10 +185,10 @@ in {
|
|||
default = { };
|
||||
example = literalExpression ''
|
||||
{
|
||||
freenode = {
|
||||
liberachat = {
|
||||
nick = "hmuser";
|
||||
server = {
|
||||
address = "chat.freenode.net";
|
||||
address = "irc.libera.chat";
|
||||
port = 6697;
|
||||
autoConnect = true;
|
||||
};
|
||||
|
|
|
@ -36,11 +36,8 @@ in {
|
|||
config = mkIf cfg.enable {
|
||||
home.packages = [ cfg.package ];
|
||||
|
||||
home.sessionVariables = {
|
||||
JAVA_HOME = fileContents (pkgs.runCommandLocal "java-home" { } ''
|
||||
source "${cfg.package}/nix-support/setup-hook"
|
||||
echo "$JAVA_HOME" > $out
|
||||
'');
|
||||
};
|
||||
# some instances of `jdk-linux-base.nix` pass through `result` without turning it onto a path-string.
|
||||
# while I suspect this is incorrect, the documentation is unclear.
|
||||
home.sessionVariables.JAVA_HOME = "${cfg.package.home}";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -9,44 +9,14 @@ let
|
|||
in {
|
||||
meta.maintainers = [ hm.maintainers.maximsmol ];
|
||||
|
||||
options.programs.just = {
|
||||
enable = mkEnableOption
|
||||
"just, a handy way to save and run project-specific commands";
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.just;
|
||||
defaultText = literalExpression "pkgs.just";
|
||||
description = "Package providing the <command>just</command> tool.";
|
||||
};
|
||||
|
||||
enableBashIntegration = mkEnableOption "Bash integration" // {
|
||||
default = true;
|
||||
};
|
||||
|
||||
enableZshIntegration = mkEnableOption "Zsh integration" // {
|
||||
default = true;
|
||||
};
|
||||
|
||||
enableFishIntegration = mkEnableOption "Fish integration" // {
|
||||
default = true;
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = [ cfg.package ];
|
||||
|
||||
programs.bash.initExtra = mkIf cfg.enableBashIntegration ''
|
||||
source ${cfg.package}/share/bash-completion/completions/just.bash
|
||||
'';
|
||||
|
||||
programs.zsh.initExtra = mkIf cfg.enableZshIntegration ''
|
||||
source ${cfg.package}/share/zsh/site-functions/_just
|
||||
'';
|
||||
|
||||
programs.fish.shellInit = mkIf cfg.enableFishIntegration ''
|
||||
source ${cfg.package}/share/fish/vendor_completions.d/just.fish
|
||||
'';
|
||||
|
||||
};
|
||||
imports = let
|
||||
msg = ''
|
||||
'program.just' is deprecated, simply add 'pkgs.just' to 'home.packages' instead.
|
||||
See https://github.com/nix-community/home-manager/issues/3449#issuecomment-1329823502'';
|
||||
in [
|
||||
(mkRemovedOptionModule [ "programs" "just" "enable" ] msg)
|
||||
(mkRemovedOptionModule [ "programs" "just" "enableBashIntegration" ] msg)
|
||||
(mkRemovedOptionModule [ "programs" "just" "enableZshIntegration" ] msg)
|
||||
(mkRemovedOptionModule [ "programs" "just" "enableFishIntegration" ] msg)
|
||||
];
|
||||
}
|
||||
|
|
65
modules/programs/k9s.nix
Normal file
65
modules/programs/k9s.nix
Normal file
|
@ -0,0 +1,65 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
|
||||
cfg = config.programs.k9s;
|
||||
yamlFormat = pkgs.formats.yaml { };
|
||||
|
||||
in {
|
||||
meta.maintainers = [ hm.maintainers.katexochen ];
|
||||
|
||||
options.programs.k9s = {
|
||||
enable =
|
||||
mkEnableOption "k9s - Kubernetes CLI To Manage Your Clusters In Style";
|
||||
|
||||
package = mkPackageOption pkgs "k9s" { };
|
||||
|
||||
settings = mkOption {
|
||||
type = yamlFormat.type;
|
||||
default = { };
|
||||
description = ''
|
||||
Configuration written to
|
||||
<filename>$XDG_CONFIG_HOME/k9s/config.yml</filename>. See
|
||||
<link xlink:href="https://k9scli.io/topics/config/"/>
|
||||
for supported values.
|
||||
'';
|
||||
example = literalExpression ''
|
||||
k9s = {
|
||||
refreshRate = 2;
|
||||
};
|
||||
'';
|
||||
};
|
||||
|
||||
skin = mkOption {
|
||||
type = yamlFormat.type;
|
||||
default = { };
|
||||
description = ''
|
||||
Skin written to
|
||||
<filename>$XDG_CONFIG_HOME/k9s/skin.yml</filename>. See
|
||||
<link xlink:href="https://k9scli.io/topics/skins/"/>
|
||||
for supported values.
|
||||
'';
|
||||
example = literalExpression ''
|
||||
k9s = {
|
||||
body = {
|
||||
fgColor = "dodgerblue";
|
||||
};
|
||||
};
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = [ cfg.package ];
|
||||
|
||||
xdg.configFile."k9s/config.yml" = mkIf (cfg.settings != { }) {
|
||||
source = yamlFormat.generate "k9s-config" cfg.settings;
|
||||
};
|
||||
|
||||
xdg.configFile."k9s/skin.yml" = mkIf (cfg.skin != { }) {
|
||||
source = yamlFormat.generate "k9s-skin" cfg.skin;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -10,13 +10,9 @@ let
|
|||
options = {
|
||||
name = mkOption {
|
||||
type = types.enum [
|
||||
"NormalBegin"
|
||||
"NormalIdle"
|
||||
"NormalEnd"
|
||||
"NormalKey"
|
||||
"InsertBegin"
|
||||
"InsertIdle"
|
||||
"InsertEnd"
|
||||
"InsertKey"
|
||||
"InsertChar"
|
||||
"InsertDelete"
|
||||
|
@ -48,8 +44,11 @@ let
|
|||
"RawKey"
|
||||
"InsertCompletionShow"
|
||||
"InsertCompletionHide"
|
||||
"InsertCompletionSelect"
|
||||
"ModuleLoaded"
|
||||
"ClientCreate"
|
||||
"ClientClose"
|
||||
"RegisterModified"
|
||||
"User"
|
||||
];
|
||||
example = "SetOption";
|
||||
description = ''
|
||||
|
@ -489,9 +488,8 @@ let
|
|||
};
|
||||
};
|
||||
|
||||
kakouneWithPlugins = pkgs.wrapKakoune pkgs.kakoune-unwrapped {
|
||||
configure = { plugins = cfg.plugins; };
|
||||
};
|
||||
kakouneWithPlugins =
|
||||
pkgs.wrapKakoune cfg.package { configure = { plugins = cfg.plugins; }; };
|
||||
|
||||
configFile = let
|
||||
wrapOptions = with cfg.config.wrapLines;
|
||||
|
@ -624,6 +622,8 @@ in {
|
|||
programs.kakoune = {
|
||||
enable = mkEnableOption "the kakoune text editor";
|
||||
|
||||
package = mkPackageOption pkgs "kakoune-unwrapped" { };
|
||||
|
||||
config = mkOption {
|
||||
type = types.nullOr configModule;
|
||||
default = { };
|
||||
|
|
|
@ -119,14 +119,6 @@ in {
|
|||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
assertions = [{
|
||||
assertion = (cfg.darwinLaunchOptions != null)
|
||||
-> pkgs.stdenv.hostPlatform.isDarwin;
|
||||
message = ''
|
||||
The 'programs.kitty.darwinLaunchOptions' option is only available on darwin.
|
||||
'';
|
||||
}];
|
||||
|
||||
home.packages = [ cfg.package ] ++ optionalPackage cfg.font;
|
||||
|
||||
xdg.configFile."kitty/kitty.conf" = {
|
||||
|
@ -158,8 +150,8 @@ in {
|
|||
'';
|
||||
};
|
||||
|
||||
xdg.configFile."kitty/macos-launch-services-cmdline" =
|
||||
mkIf (cfg.darwinLaunchOptions != null) {
|
||||
xdg.configFile."kitty/macos-launch-services-cmdline" = mkIf
|
||||
(cfg.darwinLaunchOptions != null && pkgs.stdenv.hostPlatform.isDarwin) {
|
||||
text = concatStringsSep " " cfg.darwinLaunchOptions;
|
||||
};
|
||||
};
|
||||
|
|
|
@ -82,7 +82,7 @@ let
|
|||
attrsetToXml = attrs: name: stylesheet:
|
||||
pkgs.runCommand name {
|
||||
# Package splicing for libxslt does not work correctly leading to errors
|
||||
# when cross-compiling. Use the version from buildPackages explicitely to
|
||||
# when cross-compiling. Use the version from buildPackages explicitly to
|
||||
# fix this.
|
||||
nativeBuildInputs = [ pkgs.buildPackages.libxslt.bin ];
|
||||
xml = builtins.toXML attrs;
|
||||
|
@ -131,9 +131,8 @@ in {
|
|||
type = types.package;
|
||||
default = pkgs.kodi;
|
||||
defaultText = literalExpression "pkgs.kodi";
|
||||
example = literalExpression ''
|
||||
{ pkgs.kodi.withPackages (exts: [ exts.pvr-iptvsimple ]) }
|
||||
'';
|
||||
example = literalExpression
|
||||
"pkgs.kodi.withPackages (exts: [ exts.pvr-iptvsimple ])";
|
||||
description = ''
|
||||
The <literal>kodi</literal> package to use.
|
||||
Can be used to specify extensions.
|
||||
|
|
|
@ -16,6 +16,8 @@ in {
|
|||
options.programs.lazygit = {
|
||||
enable = mkEnableOption "lazygit, a simple terminal UI for git commands";
|
||||
|
||||
package = mkPackageOption pkgs "lazygit" { };
|
||||
|
||||
settings = mkOption {
|
||||
type = yamlFormat.type;
|
||||
default = { };
|
||||
|
@ -41,7 +43,7 @@ in {
|
|||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = [ pkgs.lazygit ];
|
||||
home.packages = [ cfg.package ];
|
||||
|
||||
home.file."Library/Application Support/lazygit/config.yml" =
|
||||
mkIf (cfg.settings != { } && isDarwin) {
|
||||
|
|
39
modules/programs/ledger.nix
Normal file
39
modules/programs/ledger.nix
Normal file
|
@ -0,0 +1,39 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
|
||||
cfg = config.programs.ledger;
|
||||
|
||||
in {
|
||||
meta.maintainers = [ maintainers.marsam ];
|
||||
|
||||
options.programs.ledger = {
|
||||
enable = mkEnableOption "ledger, a double-entry accounting system";
|
||||
|
||||
package = mkPackageOption pkgs "ledger" { };
|
||||
|
||||
extraConfig = mkOption {
|
||||
type = types.lines;
|
||||
default = "";
|
||||
example = literalExpression ''
|
||||
--sort date
|
||||
--effective
|
||||
--date-format %Y-%m-%d
|
||||
'';
|
||||
description = ''
|
||||
Configuration written to <filename>$XDG_CONFIG_HOME/ledger/ledgerrc</filename>.
|
||||
See <link xlink:href="https://www.ledger-cli.org/3.0/doc/ledger3.html#Detailed-Option-Description"/>
|
||||
for explanation about possible values.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = [ cfg.package ];
|
||||
|
||||
xdg.configFile."ledger/ledgerrc" =
|
||||
mkIf (cfg.extraConfig != "") { text = cfg.extraConfig; };
|
||||
};
|
||||
}
|
|
@ -238,8 +238,8 @@ in {
|
|||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.gmailieer;
|
||||
defaultText = "pkgs.gmailieer";
|
||||
default = pkgs.lieer;
|
||||
defaultText = "pkgs.lieer";
|
||||
description = ''
|
||||
lieer package to use.
|
||||
'';
|
||||
|
|
60
modules/programs/looking-glass-client.nix
Normal file
60
modules/programs/looking-glass-client.nix
Normal file
|
@ -0,0 +1,60 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.programs.looking-glass-client;
|
||||
settingsFormat = pkgs.formats.ini { };
|
||||
in {
|
||||
meta.maintainers = with maintainers; [ j-brn ];
|
||||
|
||||
options.programs.looking-glass-client = {
|
||||
enable = mkEnableOption "looking-glass-client";
|
||||
|
||||
package = mkPackageOption pkgs "looking-glass-client" { };
|
||||
|
||||
settings = mkOption {
|
||||
type = settingsFormat.type;
|
||||
default = { };
|
||||
description = "looking-glass-client settings.";
|
||||
example = literalExpression ''
|
||||
{
|
||||
app = {
|
||||
allowDMA = true;
|
||||
shmFile = "/dev/kvmfr0";
|
||||
};
|
||||
|
||||
win = {
|
||||
fullScreen = true;
|
||||
showFPS = false;
|
||||
jitRender = true;
|
||||
};
|
||||
|
||||
spice = {
|
||||
enable = true;
|
||||
audio = true;
|
||||
};
|
||||
|
||||
input = {
|
||||
rawMouse = true;
|
||||
escapeKey = 62;
|
||||
};
|
||||
}
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
assertions = [
|
||||
(hm.assertions.assertPlatform "programs.looking-glass-client" pkgs
|
||||
platforms.linux)
|
||||
];
|
||||
|
||||
home.packages = [ cfg.package ];
|
||||
|
||||
xdg.configFile."looking-glass/client.ini" = mkIf (cfg.settings != { }) {
|
||||
source =
|
||||
settingsFormat.generate ("looking-glass-client.ini") cfg.settings;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -69,7 +69,7 @@ in {
|
|||
echo "MANDB_MAP ${manualPages}/share/man $out" > man.conf
|
||||
|
||||
# Run mandb to generate cache files:
|
||||
${pkgs.man-db}/bin/mandb -C man.conf --no-straycats --create \
|
||||
${cfg.package}/bin/mandb -C man.conf --no-straycats --create \
|
||||
${manualPages}/share/man
|
||||
'';
|
||||
in ''
|
||||
|
|
|
@ -56,7 +56,7 @@ in {
|
|||
description = ''
|
||||
Configuration written to
|
||||
<filename>$XDG_CONFIG_HOME/MangoHud/MangoHud.conf</filename>. See
|
||||
<link xlink:href="https://github.com/flightlessmango/MangoHud/blob/master/bin/MangoHud.conf"/>
|
||||
<link xlink:href="https://github.com/flightlessmango/MangoHud/blob/master/data/MangoHud.conf"/>
|
||||
for the default configuration.
|
||||
'';
|
||||
};
|
||||
|
@ -75,7 +75,7 @@ in {
|
|||
Sets MangoHud settings per application.
|
||||
Configuration written to
|
||||
<filename>$XDG_CONFIG_HOME/MangoHud/{application_name}.conf</filename>. See
|
||||
<link xlink:href="https://github.com/flightlessmango/MangoHud/blob/master/bin/MangoHud.conf"/>
|
||||
<link xlink:href="https://github.com/flightlessmango/MangoHud/blob/master/data/MangoHud.conf"/>
|
||||
for the default configuration.
|
||||
'';
|
||||
};
|
||||
|
|
|
@ -4,7 +4,8 @@ with lib;
|
|||
|
||||
let
|
||||
|
||||
extraConfigType = with lib.types; attrsOf (either (either str int) bool);
|
||||
extraConfigType = with lib.types;
|
||||
attrsOf (oneOf [ str int bool (listOf str) ]);
|
||||
|
||||
perAccountGroups = { name, config, ... }: {
|
||||
options = {
|
||||
|
|
|
@ -84,7 +84,7 @@ let
|
|||
genSection "IMAPAccount ${name}" ({
|
||||
Host = imap.host;
|
||||
User = userName;
|
||||
PassCmd = toString passwordCommand;
|
||||
PassCmd = lib.escapeShellArgs passwordCommand;
|
||||
} // genTlsConfig imap.tls
|
||||
// optionalAttrs (imap.port != null) { Port = toString imap.port; }
|
||||
// mbsync.extraConfig.account) + "\n"
|
||||
|
@ -174,7 +174,7 @@ let
|
|||
flatten (optionals (group.channels != { }) ([ "Group ${group.name}" ]
|
||||
++ (genChannelStrings group.name group.channels)));
|
||||
# Given set of groups, generates list of strings, where each string is one
|
||||
# of the groups and its consituent channels.
|
||||
# of the groups and its constituent channels.
|
||||
genGroupsStrings = mapAttrsToList (name: info:
|
||||
concatStringsSep "\n" (genGroupChannelString groups.${name})) groups;
|
||||
# Join all non-empty groups.
|
||||
|
|
|
@ -52,7 +52,7 @@ in {
|
|||
# In theory, mu is the only thing that creates that directory, and it is
|
||||
# only created during the initial index.
|
||||
if [[ ! -d "${dbLocation}" ]]; then
|
||||
$DRY_RUN_CMD mu init ${maildirOption} ${myAddresses} $VERBOSE_ARG;
|
||||
$DRY_RUN_CMD ${pkgs.mu}/bin/mu init ${maildirOption} ${myAddresses} $VERBOSE_ARG;
|
||||
fi
|
||||
'';
|
||||
};
|
||||
|
|
|
@ -186,7 +186,7 @@ let
|
|||
default = null;
|
||||
example = "https://jmap.example.com/.well-known/jmap";
|
||||
description = ''
|
||||
Sesion URL to connect to.
|
||||
Session URL to connect to.
|
||||
</para><para>
|
||||
Mutually exclusive with
|
||||
<xref linkend="opt-accounts.email.accounts._name_.mujmap.settings.fqdn"/>.
|
||||
|
|
|
@ -62,7 +62,7 @@ in {
|
|||
};
|
||||
|
||||
mpdMusicDir = mkOption {
|
||||
type = types.nullOr types.path;
|
||||
type = with types; nullOr (coercedTo path toString str);
|
||||
default = let mpdCfg = config.services.mpd;
|
||||
in if pkgs.stdenv.hostPlatform.isLinux && mpdCfg.enable then
|
||||
mpdCfg.musicDirectory
|
||||
|
@ -123,7 +123,7 @@ in {
|
|||
xdg.configFile = {
|
||||
"ncmpcpp/config" = let
|
||||
settings = cfg.settings // optionalAttrs (cfg.mpdMusicDir != null) {
|
||||
mpd_music_dir = toString cfg.mpdMusicDir;
|
||||
mpd_music_dir = cfg.mpdMusicDir;
|
||||
};
|
||||
in mkIf (settings != { }) { text = renderSettings settings + "\n"; };
|
||||
|
||||
|
|
|
@ -13,32 +13,13 @@ let
|
|||
|
||||
jsonFormat = pkgs.formats.json { };
|
||||
|
||||
extraPython3PackageType = mkOptionType {
|
||||
name = "extra-python3-packages";
|
||||
description = "python3 packages in python.withPackages format";
|
||||
check = with types;
|
||||
(x: if isFunction x then isList (x pkgs.python3Packages) else false);
|
||||
merge = mergeOneOption;
|
||||
};
|
||||
|
||||
# Currently, upstream Neovim is pinned on Lua 5.1 for LuaJIT support.
|
||||
# This will need to be updated if Neovim ever migrates to a newer
|
||||
# version of Lua.
|
||||
extraLua51PackageType = mkOptionType {
|
||||
name = "extra-lua51-packages";
|
||||
description = "lua5.1 packages in lua5_1.withPackages format";
|
||||
check = with types;
|
||||
(x: if isFunction x then isList (x pkgs.lua51Packages) else false);
|
||||
merge = mergeOneOption;
|
||||
};
|
||||
|
||||
pluginWithConfigType = types.submodule {
|
||||
options = {
|
||||
config = mkOption {
|
||||
type = types.lines;
|
||||
type = types.nullOr types.lines;
|
||||
description =
|
||||
"Script to configure this plugin. The scripting language should match type.";
|
||||
default = "";
|
||||
default = null;
|
||||
};
|
||||
|
||||
type = mkOption {
|
||||
|
@ -80,19 +61,23 @@ let
|
|||
optional = false;
|
||||
};
|
||||
|
||||
luaPackages = cfg.finalPackage.unwrapped.lua.pkgs;
|
||||
resolvedExtraLuaPackages = cfg.extraLuaPackages luaPackages;
|
||||
|
||||
extraMakeWrapperArgs = lib.optionalString (cfg.extraPackages != [ ])
|
||||
''--suffix PATH : "${lib.makeBinPath cfg.extraPackages}"'';
|
||||
extraMakeWrapperLuaCArgs = lib.optionalString (cfg.extraLuaPackages != [ ]) ''
|
||||
--suffix LUA_CPATH ";" "${
|
||||
lib.concatMapStringsSep ";" pkgs.lua51Packages.getLuaCPath
|
||||
cfg.extraLuaPackages
|
||||
}"'';
|
||||
extraMakeWrapperLuaArgs = lib.optionalString (cfg.extraLuaPackages != [ ]) ''
|
||||
--suffix LUA_PATH ";" "${
|
||||
lib.concatMapStringsSep ";" pkgs.lua51Packages.getLuaPath
|
||||
cfg.extraLuaPackages
|
||||
}"'';
|
||||
|
||||
extraMakeWrapperLuaCArgs =
|
||||
lib.optionalString (resolvedExtraLuaPackages != [ ]) ''
|
||||
--suffix LUA_CPATH ";" "${
|
||||
lib.concatMapStringsSep ";" luaPackages.getLuaCPath
|
||||
resolvedExtraLuaPackages
|
||||
}"'';
|
||||
extraMakeWrapperLuaArgs = lib.optionalString (resolvedExtraLuaPackages != [ ])
|
||||
''
|
||||
--suffix LUA_PATH ";" "${
|
||||
lib.concatMapStringsSep ";" luaPackages.getLuaPath
|
||||
resolvedExtraLuaPackages
|
||||
}"'';
|
||||
in {
|
||||
imports = [
|
||||
(mkRemovedOptionModule [ "programs" "neovim" "withPython" ]
|
||||
|
@ -164,24 +149,51 @@ in {
|
|||
};
|
||||
|
||||
extraPython3Packages = mkOption {
|
||||
type = with types; either extraPython3PackageType (listOf package);
|
||||
default = (_: [ ]);
|
||||
# In case we get a plain list, we need to turn it into a function,
|
||||
# as expected by the function in nixpkgs.
|
||||
# The only way to do so is to call `const`, which will ignore its input.
|
||||
type = with types;
|
||||
let fromType = listOf package;
|
||||
in coercedTo fromType (flip warn const ''
|
||||
Assigning a plain list to extraPython3Packages is deprecated.
|
||||
Please assign a function taking a package set as argument, so
|
||||
extraPython3Packages = [ pkgs.python3Packages.xxx ];
|
||||
should become
|
||||
extraPython3Packages = ps: [ ps.xxx ];
|
||||
'') (functionTo fromType);
|
||||
default = _: [ ];
|
||||
defaultText = literalExpression "ps: [ ]";
|
||||
example = literalExpression "(ps: with ps; [ python-language-server ])";
|
||||
example =
|
||||
literalExpression "pyPkgs: with pyPkgs; [ python-language-server ]";
|
||||
description = ''
|
||||
A function in python.withPackages format, which returns a
|
||||
list of Python 3 packages required for your plugins to work.
|
||||
The extra Python 3 packages required for your plugins to work.
|
||||
This option accepts a function that takes a Python 3 package set as an argument,
|
||||
and selects the required Python 3 packages from this package set.
|
||||
See the example for more info.
|
||||
'';
|
||||
};
|
||||
|
||||
# We get the Lua package from the final package and use its
|
||||
# Lua packageset to evaluate the function that this option was set to.
|
||||
# This ensures that we always use the same Lua version as the Neovim package.
|
||||
extraLuaPackages = mkOption {
|
||||
type = with types; either extraLua51PackageType (listOf package);
|
||||
default = [ ];
|
||||
defaultText = literalExpression "[ ]";
|
||||
example = literalExpression "(ps: with ps; [ luautf8 ])";
|
||||
type = with types;
|
||||
let fromType = listOf package;
|
||||
in coercedTo fromType (flip warn const ''
|
||||
Assigning a plain list to extraLuaPackages is deprecated.
|
||||
Please assign a function taking a package set as argument, so
|
||||
extraLuaPackages = [ pkgs.lua51Packages.xxx ];
|
||||
should become
|
||||
extraLuaPackages = ps: [ ps.xxx ];
|
||||
'') (functionTo fromType);
|
||||
default = _: [ ];
|
||||
defaultText = literalExpression "ps: [ ]";
|
||||
example = literalExpression "luaPkgs: with luaPkgs; [ luautf8 ]";
|
||||
description = ''
|
||||
A function in lua5_1.withPackages format, which returns a
|
||||
list of Lua packages required for your plugins to work.
|
||||
The extra Lua packages required for your plugins to work.
|
||||
This option accepts a function that takes a Lua package set as an argument,
|
||||
and selects the required Lua packages from this package set.
|
||||
See the example for more info.
|
||||
'';
|
||||
};
|
||||
|
||||
|
@ -229,6 +241,15 @@ in {
|
|||
description = "Resulting customized neovim package.";
|
||||
};
|
||||
|
||||
defaultEditor = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Whether to configure <command>nvim</command> as the default
|
||||
editor using the <envar>EDITOR</envar> environment variable.
|
||||
'';
|
||||
};
|
||||
|
||||
extraConfig = mkOption {
|
||||
type = types.lines;
|
||||
default = "";
|
||||
|
@ -240,6 +261,17 @@ in {
|
|||
'';
|
||||
};
|
||||
|
||||
extraLuaConfig = mkOption {
|
||||
type = types.lines;
|
||||
default = "";
|
||||
example = ''
|
||||
vim.opt.nobackup = true
|
||||
'';
|
||||
description = ''
|
||||
Custom lua lines.
|
||||
'';
|
||||
};
|
||||
|
||||
extraPackages = mkOption {
|
||||
type = with types; listOf package;
|
||||
default = [ ];
|
||||
|
@ -280,7 +312,7 @@ in {
|
|||
};
|
||||
|
||||
settings = mkOption {
|
||||
type = jsonFormat.type;
|
||||
inherit (jsonFormat) type;
|
||||
default = { };
|
||||
example = literalExpression ''
|
||||
{
|
||||
|
@ -326,7 +358,7 @@ in {
|
|||
defaultPlugin = {
|
||||
type = "viml";
|
||||
plugin = null;
|
||||
config = "";
|
||||
config = null;
|
||||
optional = false;
|
||||
runtime = { };
|
||||
};
|
||||
|
@ -337,7 +369,7 @@ in {
|
|||
allPlugins;
|
||||
|
||||
suppressNotVimlConfig = p:
|
||||
if p.type != "viml" then p // { config = ""; } else p;
|
||||
if p.type != "viml" then p // { config = null; } else p;
|
||||
|
||||
neovimConfig = pkgs.neovimUtils.makeNeovimConfig {
|
||||
inherit (cfg) extraPython3Packages withPython3 withRuby viAlias vimAlias;
|
||||
|
@ -353,26 +385,35 @@ in {
|
|||
programs.neovim.generatedConfigs = let
|
||||
grouped = lib.lists.groupBy (x: x.type) pluginsNormalized;
|
||||
concatConfigs = lib.concatMapStrings (p: p.config);
|
||||
in mapAttrs (name: vals: concatConfigs vals) grouped;
|
||||
configsOnly = lib.foldl
|
||||
(acc: p: if p.config != null then acc ++ [ p.config ] else acc) [ ];
|
||||
in mapAttrs (name: vals: lib.concatStringsSep "\n" (configsOnly vals))
|
||||
grouped;
|
||||
|
||||
home.packages = [ cfg.finalPackage ];
|
||||
|
||||
xdg.configFile = mkMerge (
|
||||
# writes runtime
|
||||
(map (x: x.runtime) pluginsNormalized) ++ [{
|
||||
"nvim/init.vim" = mkIf (neovimConfig.neovimRcContent != "") {
|
||||
text = neovimConfig.neovimRcContent + lib.optionalString
|
||||
(hasAttr "lua" config.programs.neovim.generatedConfigs)
|
||||
"lua require('init-home-manager')";
|
||||
};
|
||||
"nvim/lua/init-home-manager.lua" =
|
||||
mkIf (hasAttr "lua" config.programs.neovim.generatedConfigs) {
|
||||
text = config.programs.neovim.generatedConfigs.lua;
|
||||
home.sessionVariables = mkIf cfg.defaultEditor { EDITOR = "nvim"; };
|
||||
|
||||
xdg.configFile =
|
||||
let hasLuaConfig = hasAttr "lua" config.programs.neovim.generatedConfigs;
|
||||
in mkMerge (
|
||||
# writes runtime
|
||||
(map (x: x.runtime) pluginsNormalized) ++ [{
|
||||
"nvim/init.lua" = let
|
||||
luaRcContent =
|
||||
lib.optionalString (neovimConfig.neovimRcContent != "")
|
||||
"vim.cmd [[source ${
|
||||
pkgs.writeText "nvim-init-home-manager.vim"
|
||||
neovimConfig.neovimRcContent
|
||||
}]]" + config.programs.neovim.extraLuaConfig
|
||||
+ lib.optionalString hasLuaConfig
|
||||
config.programs.neovim.generatedConfigs.lua;
|
||||
in mkIf (luaRcContent != "") { text = luaRcContent; };
|
||||
|
||||
"nvim/coc-settings.json" = mkIf cfg.coc.enable {
|
||||
source = jsonFormat.generate "coc-settings.json" cfg.coc.settings;
|
||||
};
|
||||
"nvim/coc-settings.json" = mkIf cfg.coc.enable {
|
||||
source = jsonFormat.generate "coc-settings.json" cfg.coc.settings;
|
||||
};
|
||||
}]);
|
||||
}]);
|
||||
|
||||
programs.neovim.finalPackage = pkgs.wrapNeovimUnstable cfg.package
|
||||
(neovimConfig // {
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue