Compare commits

..

16 Commits

Author SHA1 Message Date
Aguirre Matteo
2bd0a86493 rclone: change cache directory to $XDG_CACHE_HOME/rclone
(cherry picked from commit df7bac2b2b)
2025-12-04 23:33:48 +00:00
tsrk.
f63d0fe9d8 thunderbird: fix aliases SMTP configuration not being listed as usable
Signed-off-by: tsrk. <tsrk@tsrk.me>
(cherry picked from commit d441981b20)
2025-12-04 10:34:05 -06:00
Andrew Jeffery
e1680d594a pimsync: Make storage names unique
This includes the calendar/contacts prefix in the storage name as well
as the pair name to ensure that if the same name is used for contacts
and calendar then it is correctly referenced.

(cherry picked from commit 43173abcb4)
2025-12-03 16:49:19 +01:00
home-manager-ci[bot]
3366918730 flake.lock: Update
Flake lock file updates:

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/9561691c9f450fad7c3526916e1c4f44be0d1192?narHash=sha256-CYbMp8hwuOf4umokSNp%2Bt1s4Hjd4vxXq4S5CD%2BxvgNs%3D' (2025-11-29)
  → 'github:NixOS/nixpkgs/8bb5646e0bed5dbd3ab08c7a7cc15b75ab4e1d0f?narHash=sha256-SqUuBFjhl/kpDiVaKLQBoD8TLD%2B/cTUzzgVFoaHrkqY%3D' (2025-11-30)
2025-12-02 22:41:12 -06:00
Anton Mosich
7385f250cc pimsync: extend test to contacts
If I had added such a test right away, I would have encountered #8258
myself. I mistakenly believed the contact and calendar modules to be the
same.

(cherry picked from commit c3d1e5c65a)
2025-12-02 21:33:04 -06:00
Anton Mosich
9ea0c94e00 accounts.contacts: fix eval error
You would encounter an eval error when a module (such as pimsync) would
try to access an attribute of `accounts.contacts.<name>.local`, since it
would default to `null`. The same problem was encountered in the
`accounts.calendar` module, and fixed in
2c157e22dc which has the same solution.

Closes #8258

Reported-by: redbeardymcgee
(cherry picked from commit bf003999ed)
2025-12-02 21:33:04 -06:00
dependabot[bot]
f3902b5d87 ci: bump DeterminateSystems/update-flake-lock from 27 to 28
Bumps [DeterminateSystems/update-flake-lock](https://github.com/determinatesystems/update-flake-lock) from 27 to 28.
- [Release notes](https://github.com/determinatesystems/update-flake-lock/releases)
- [Commits](https://github.com/determinatesystems/update-flake-lock/compare/v27...v28)

---
updated-dependencies:
- dependency-name: DeterminateSystems/update-flake-lock
  dependency-version: '28'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-01 12:22:16 -06:00
novenary
44a3b79aad fish: ensure generated completions considered last
home-manager's generated completions shadow built-in completion scripts.
fish actually has logic to deal with this when the path ends with
/generated_completions, so let's take advantage of it.

Link: 47c773300a/src/autoload.rs (L421-L424)
(cherry picked from commit e4e25a8c31)
2025-12-01 12:21:54 -06:00
novenary
ffae9e1bca Revert "fish: avoid shadowing builtin completions"
This reverts commit 23f2ba7ae0.

(cherry picked from commit 13b089b586)
2025-12-01 12:21:54 -06:00
Jo²
acd2931703 xsession: only require xdg autostart target if explicitely enabled (#8237)
This is a fix for PR #7108 that forcibly enables xdg-desktop-autostart
units, whether or not `config.xdg.autostart` is enabled.
Partially fixes #7708, there is still a risk for conflict if
`xdg.autostart` and `services.picom` are enabled.

(cherry picked from commit b1bb534c17)
2025-12-01 12:21:32 -06:00
Matt Sturgeon
3fdd076e08 fish: avoid shadowing builtin completions
The fish shell comes with builtin completions. For example, git
completion supports context-aware completion of things like commit
hashes, branch names, sub-commands, etc.

Until fish 4.2, builtin completions were explicitly loaded from
`share/fish/completions`, however that is now deprecated and disabled.
In effect, this means generating manpage-based completion will shadow
and disable builtin completion.

Avoid that, by only generating completion when fish does not have
builtin support for the command.

(cherry picked from commit 23f2ba7ae0)
2025-11-30 15:00:51 -06:00
home-manager-ci[bot]
ba2259d7d5 flake.lock: Update
Flake lock file updates:

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/2fecba9952096ba043c16b9ef40b92851ff3e5d9?narHash=sha256-JaNFPy3nywPNxSDpEgFFqvngQww5Igb6twG4NhMo8oc%3D' (2025-11-26)
  → 'github:NixOS/nixpkgs/9561691c9f450fad7c3526916e1c4f44be0d1192?narHash=sha256-CYbMp8hwuOf4umokSNp%2Bt1s4Hjd4vxXq4S5CD%2BxvgNs%3D' (2025-11-29)
2025-11-30 14:18:28 -06:00
Austin Horstman
d0c5fdc48d tests/flake: lock to stable
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2025-11-29 00:48:34 -06:00
home-manager-ci[bot]
7f7e33a679 flake.lock: Update
Flake lock file updates:

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/a320ce8e6e2cc6b4397eef214d202a50a4583829?narHash=sha256-6zddwDs2n%2Bn01l%2B1TG6PlyokDdXzu/oBmEejcH5L5%2BA%3D' (2025-11-24)
  → 'github:NixOS/nixpkgs/2fecba9952096ba043c16b9ef40b92851ff3e5d9?narHash=sha256-JaNFPy3nywPNxSDpEgFFqvngQww5Igb6twG4NhMo8oc%3D' (2025-11-26)
2025-11-29 00:48:34 -06:00
Austin Horstman
2217780c39 flake.nix: lock to stable branch
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2025-11-26 11:18:11 -06:00
Austin Horstman
cbe30a7689 release: mark as release branch
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2025-11-26 10:44:25 -06:00
473 changed files with 3135 additions and 8084 deletions

View File

@@ -22,7 +22,7 @@ Also make sure to read the guidelines found at
- [ ] Change is backwards compatible.
- [ ] Code formatted with `nix fmt` or
`nix-shell -p treefmt nixfmt deadnix keep-sorted nixf-diagnose --run treefmt`.
`nix-shell -p treefmt nixfmt deadnix keep-sorted --run treefmt`.
- [ ] Code tested through `nix run .#tests -- test-all` or
`nix-shell --pure tests -A run.all`.

View File

@@ -7,9 +7,10 @@ updates:
interval: "weekly"
commit-message:
prefix: "ci:"
- package-ecosystem: "github-actions"
directory: "/"
target-branch: "release-25.11"
target-branch: "release-25.05"
schedule:
interval: "weekly"
commit-message:

2
.github/labeler.yml vendored
View File

@@ -165,7 +165,7 @@
"containers":
- changed-files:
- any-glob-to-any-file:
- modules/services/podman/linux/**/*
- modules/services/podman-linux/**/*
- modules/programs/distrobox.nix
- modules/programs/docker-cli.nix
"desktop-ui":

View File

@@ -37,7 +37,7 @@ jobs:
ref: ${{ github.event.pull_request.head.sha }}
- name: Create backport PRs
id: backport
uses: korthout/backport-action@v4
uses: korthout/backport-action@v3
with:
# See https://github.com/korthout/backport-action#inputs
github_token: ${{ steps.app-token.outputs.token || secrets.GITHUB_TOKEN }}

View File

@@ -9,9 +9,8 @@ jobs:
runs-on: ubuntu-latest
if: github.event_name != 'schedule' || github.repository_owner == 'nix-community'
strategy:
fail-fast: false
matrix:
branch: [master, release-25.11]
branch: [master, release-25.05]
steps:
- name: Create GitHub App token
uses: actions/create-github-app-token@v2

View File

@@ -1,10 +1,7 @@
name: Validate maintainers.nix
on:
pull_request:
paths:
- "modules/lib/maintainers.nix"
- "flake.lock"
- "all-maintainers.nix"
paths: ["modules/lib/maintainers.nix"]
workflow_dispatch:
inputs:
run_tests:

View File

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

View File

@@ -121,22 +121,6 @@ Reference commits:
- Change `isReleaseBranch` from `false` to `true`
- Do NOT change the `release` field (it's already correct from Step 1)
2. **flake.nix**
- Update the nixpkgs input to track the corresponding stable branch
- Example: For `release-25.11`, change from:
```nix
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
```
to:
```nix
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11";
```
- Run `nix flake update` to update flake.lock to the stable branch
- Commit the flake.nix and flake.lock changes
**Note**: The release branch should track the stable NixOS release channel
(e.g., `nixos-25.11`), while master continues to track `nixos-unstable`.
#### Step 3.5: On master - Update CI for the New Release Branch
**When**: After marking the release branch as a release branch (Step 3)
@@ -166,37 +150,6 @@ Reference commits:
- This ensures automated flake.lock updates run on the current stable branch
- Note: We only maintain CI for the latest stable release, not older releases
2. **.github/dependabot.yml** (on master)
- Replace the old stable branch with the new release branch
- Example: When creating `release-25.11`, update the target-branch from:
```yaml
- package-ecosystem: "github-actions"
directory: "/"
target-branch: "release-25.05"
schedule:
interval: "weekly"
commit-message:
prefix: "ci:"
```
to:
```yaml
- package-ecosystem: "github-actions"
directory: "/"
target-branch: "release-25.11"
schedule:
interval: "weekly"
commit-message:
prefix: "ci:"
```
- This ensures automated dependency updates for GitHub Actions on the current
stable branch
- Note: We only maintain dependabot for the latest stable release, not older
releases
**Important**: CI workflows are executed from master, so this change must be
committed to the master branch.

View File

@@ -17,4 +17,4 @@ test-install:
HOME=$(shell mktemp -d) NIX_PATH=${NIX_PATH} nix-shell . -A install
format:
nix-shell -p treefmt nixfmt deadnix keep-sorted nixf-diagnose --run "treefmt --config-file ./treefmt.toml"
nix-shell -p treefmt nixfmt deadnix keep-sorted --run "treefmt --config-file ./treefmt.toml"

View File

@@ -19,11 +19,6 @@
email = "da157@voidq.com";
github = "0xda157";
githubId = 153149335;
keys = [
{
fingerprint = "5A66 FF95 36DE B501 DDD2 1647 B7AC 1B10 365D 45FF";
}
];
matrix = "@da157:catgirl.cloud";
name = "0xda157";
source = "nixpkgs";
@@ -70,6 +65,14 @@
name = "Alex";
source = "home-manager";
};
AndersonTorres = {
email = "torres.anderson.85@protonmail.com";
github = "AndersonTorres";
githubId = 5954806;
matrix = "@anderson_torres:matrix.org";
name = "Anderson Torres";
source = "nixpkgs";
};
AndreasMager = {
email = "andreas@mager.eu";
github = "AndreasMager";
@@ -358,11 +361,6 @@
email = "nixpkgs@perchun.it";
github = "PerchunPak";
githubId = 68118654;
keys = [
{
fingerprint = "BBB5 1142 959D 8549 A3D2 F6C5 313F 67D1 EAB7 70F9";
}
];
name = "Perchun Pak";
source = "nixpkgs";
};
@@ -631,13 +629,6 @@
name = "Arjan Schrijver";
source = "nixpkgs";
};
arunoruto = {
email = "mirza.arnaut45@gmail.com";
github = "arunoruto";
githubId = 21687187;
name = "Mirza Arnaut";
source = "nixpkgs";
};
asymmetric = {
email = "lorenzo@mailbox.org";
github = "asymmetric";
@@ -1094,6 +1085,19 @@
name = "Hoang Nguyen";
source = "home-manager";
};
foo-dogsquared = {
email = "foodogsquared@foodogsquared.one";
github = "foo-dogsquared";
githubId = 34962634;
keys = [
{
fingerprint = "DDD7 D0BD 602E 564B AA04 FC35 1431 0D91 4115 2B92";
}
];
matrix = "@foodogsquared:matrix.org";
name = "Gabriel Arazas";
source = "nixpkgs";
};
fpob = {
email = "fpob@proton.me";
github = "fpob";
@@ -1757,7 +1761,7 @@
github = "nickthegroot";
githubId = 1966472;
name = "Nick DeGroot";
source = "nixpkgs";
source = "home-manager";
};
nikp123 = {
email = "nikp123@users.noreply.github.com";
@@ -2009,7 +2013,7 @@
github = "rrvsh";
githubId = 20300874;
name = "Mohammad Rafiq";
source = "nixpkgs";
source = "home-manager";
};
rszamszur = {
email = "radoslawszamszur@gmail.com";
@@ -2062,7 +2066,7 @@
source = "nixpkgs";
};
shikanime = {
email = "william.phetsinorath@shikanime.studio";
email = "deva.shikanime@protonmail.com";
github = "shikanime";
githubId = 22115108;
name = "William Phetsinorath";
@@ -2300,13 +2304,6 @@
name = "Florian Peter";
source = "nixpkgs";
};
xavwe = {
email = "git@xavwe.dev";
github = "xavwe";
githubId = 125409009;
name = "Xaver Wenhart";
source = "nixpkgs";
};
xlambein = {
email = "xlambein@gmail.com";
github = "xlambein";

View File

@@ -110,7 +110,8 @@ let
in
pkgs.buildPackages.nixosOptionsDoc (
{
options = if includeModuleSystemOptions then options else removeAttrs options [ "_module" ];
options =
if includeModuleSystemOptions then options else builtins.removeAttrs options [ "_module" ];
transformOptions =
opt:
opt
@@ -132,7 +133,7 @@ let
) opt.declarations;
};
}
// removeAttrs args [
// builtins.removeAttrs args [
"modules"
"includeModuleSystemOptions"
]

6
docs/flake.lock generated
View File

@@ -2,11 +2,11 @@
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1764081664,
"narHash": "sha256-sUoHmPr/EwXzRMpv1u/kH+dXuvJEyyF2Q7muE+t0EU4=",
"lastModified": 1743938762,
"narHash": "sha256-UgFYn8sGv9B8PoFpUfCa43CjMZBl1x/ShQhRDHBFQdI=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "dc205f7b4fdb04c8b7877b43edb7b73be7730081",
"rev": "74a40410369a1c35ee09b8a1abee6f4acbedc059",
"type": "github"
},
"original": {

View File

@@ -17,11 +17,8 @@ way. In Bash and Z shell this can be done by adding
to your `.profile` and `.zshrc` files, respectively. The
`hm-session-vars.sh` file should work in most Bourne-like shells. For
fish shell, it is possible to source it using [the foreign-env
plugin](https://github.com/oh-my-fish/plugin-foreign-env) or using the builtin
[babelfish](https://github.com/bouk/babelfish)-translated variables:
plugin](https://github.com/oh-my-fish/plugin-foreign-env)
``` bash
fenv source "$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh" > /dev/null
# or
source "$HOME/.nix-profile/etc/profile.d/hm-session-vars.fish"
```

View File

@@ -1,6 +1,6 @@
# Home Manager Manual {#home-manager-manual}
## Version 26.05 (unstable)
## Version 25.11
```{=include=} preface

View File

@@ -4,7 +4,6 @@ This section lists the release notes for stable versions of Home Manager
and the current unstable version.
```{=include=} chapters
rl-2605.md
rl-2511.md
rl-2505.md
rl-2411.md

View File

@@ -57,9 +57,3 @@ changes are only active if the `home.stateVersion` option is set to
now default to `true` which is consistent with the default values
for those options used by `i3` and `sway`.
- The [](#opt-programs.swaylock.enable) option now defaults to `false`
and must be explicitly enabled. Previously, it would be implicitly
enabled when `programs.swaylock.settings` was non-empty. Users with
`home.stateVersion` set to earlier versions will continue to get the
old implicit behavior.

View File

@@ -27,8 +27,4 @@ The state version in this release includes the changes below. These
changes are only active if the `home.stateVersion` option is set to
\"25.05\" or later.
- The [](#opt-programs.git.signing.format) option no longer defaults to
`"openpgp"`. Users who use Git signing with GPG should explicitly set
this option to `"openpgp"` to maintain the previous behavior. Users
with `home.stateVersion` set to earlier versions will continue to get
the `"openpgp"` default for backwards compatibility.
- No changes.

View File

@@ -80,10 +80,3 @@ changes are only active if the `home.stateVersion` option is set to
`{ PASSWORD_STORE_DIR = $XDG_DATA_HOME/password-store; }` anymore by its
default value. This will revert to the default behaviour of the program,
namely `$HOME/.password-store` to be used as the store path.
- On macOS, [](#opt-targets.darwin.copyApps.enable) is now enabled by
default instead of [](#opt-targets.darwin.linkApps.enable). This means
applications from `home.packages` will be copied to
`~/Applications/Home Manager Apps` rather than symlinked, making them
work properly with Spotlight. Users with `home.stateVersion` set to
earlier versions will continue to use `linkApps` by default.

View File

@@ -1,25 +0,0 @@
# Release 26.05 {#sec-release-26.05}
This is the current unstable branch and the information in this
section is therefore not final.
## Highlights {#sec-release-26.05-highlights}
This release has the following notable changes:
- The [](#opt-programs.anki.uiScale) option now expects a value in the
range 1.02.0, previously it erroneously expected values in the
range `0.01.0`.
## State Version Changes {#sec-release-26.05-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
\"26.05\" or later.
- The [](#opt-gtk.gtk4.theme) option does not mirror
[](#opt-gtk.theme) by default anymore.
- The [](#opt-programs.zsh.dotDir) option now defaults to the XDG
configuration directory (usually `~/.config/zsh`) when
[](#opt-xdg.enable) is true.

8
flake.lock generated
View File

@@ -2,16 +2,16 @@
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1767767207,
"narHash": "sha256-Mj3d3PfwltLmukFal5i3fFt27L6NiKXdBezC1EBuZs4=",
"lastModified": 1764522689,
"narHash": "sha256-SqUuBFjhl/kpDiVaKLQBoD8TLD+/cTUzzgVFoaHrkqY=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "5912c1772a44e31bf1c63c0390b90501e5026886",
"rev": "8bb5646e0bed5dbd3ab08c7a7cc15b75ab4e1d0f",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"ref": "nixos-25.11",
"repo": "nixpkgs",
"type": "github"
}

View File

@@ -1,7 +1,7 @@
{
description = "Home Manager for Nix";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11";
outputs =
{
@@ -57,7 +57,6 @@
nixfmt
deadnix
keep-sorted
nixf-diagnose
];
settings = pkgs.lib.importTOML ./treefmt.toml;
}

View File

@@ -1277,7 +1277,7 @@ while [[ $# -gt 0 ]]; do
export VERBOSE=1
;;
--version)
echo 26.05-pre
echo 25.11-pre
exit 0
;;
*)

View File

@@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: Home Manager\n"
"Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n"
"POT-Creation-Date: 2025-07-22 10:59+0200\n"
"PO-Revision-Date: 2026-01-07 17:01+0000\n"
"PO-Revision-Date: 2025-08-23 20:02+0000\n"
"Last-Translator: Brian E <brianellingsgaard9@gmail.com>\n"
"Language-Team: Faroese <https://hosted.weblate.org/projects/home-manager/cli/"
"fo/>\n"
@@ -17,12 +17,12 @@ 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 5.15.1\n"
"X-Generator: Weblate 5.13\n"
#. translators: For example: "home-manager: missing argument for --cores"
#: home-manager/home-manager:16
msgid "%s: missing argument for %s"
msgstr "%s: manglar eitt ávirki fyri %s"
msgstr ""
#. translators: For example: "home-manager: --rollback can only be used after switch"
#: home-manager/home-manager:22
@@ -31,7 +31,7 @@ msgstr "%s: %s kann bert brúkast aftaná %s"
#: home-manager/home-manager:71
msgid "No configuration file found at %s"
msgstr "Eingin samansetingsfíla funni hjá %s"
msgstr ""
#. translators: The first '%s' specifier will be replaced by either
#. 'home.nix' or 'flake.nix'.
@@ -41,12 +41,10 @@ msgid ""
"Keeping your Home Manager %s in %s is deprecated,\n"
"please move it to %s"
msgstr ""
"At hava Heimvørðurin %s í %s er fyrnast,\n"
"vinarliga flyt hann til %s"
#: home-manager/home-manager:99
msgid "No configuration file found. Please create one at %s"
msgstr "Eingin samansetingsfíla funni. Vinarliga stovna ein hjá %s"
msgstr ""
#: home-manager/home-manager:114
msgid "Home Manager not found at %s."

View File

@@ -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: 2025-07-22 10:59+0200\n"
"PO-Revision-Date: 2025-12-04 09:16+0000\n"
"Last-Translator: \"Urocissa Caerulea.Tw\" <urocissa.tw@proton.me>\n"
"PO-Revision-Date: 2025-03-07 18:58+0000\n"
"Last-Translator: 807 <s10855168@gmail.com>\n"
"Language-Team: Chinese (Traditional Han script) <https://hosted.weblate.org/"
"projects/home-manager/cli/zh_Hant/>\n"
"Language: zh_Hant\n"
@@ -17,21 +17,21 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: Weblate 5.15-dev\n"
"X-Generator: Weblate 5.10.3-dev\n"
#. translators: For example: "home-manager: missing argument for --cores"
#: home-manager/home-manager:16
msgid "%s: missing argument for %s"
msgstr "%s:缺少 %s 的引數"
msgstr "%s: 缺少參數 %s"
#. translators: For example: "home-manager: --rollback can only be used after switch"
#: home-manager/home-manager:22
msgid "%s: %s can only be used after %s"
msgstr "%s%s 只能在 %s 之後使用"
msgstr ""
#: home-manager/home-manager:71
msgid "No configuration file found at %s"
msgstr "在 %s 找不到設定檔"
msgstr "在 %s 處找到配置檔案"
#. translators: The first '%s' specifier will be replaced by either
#. 'home.nix' or 'flake.nix'.
@@ -41,12 +41,12 @@ msgid ""
"Keeping your Home Manager %s in %s is deprecated,\n"
"please move it to %s"
msgstr ""
" Home Manager 的 %s 放在 %s 中, 已經被棄用\n"
"請改放到 %s"
"保持你的 Home Manager 在 %s 中,%s 已被拋棄\n"
"請將它移動到 %s"
#: home-manager/home-manager:99
msgid "No configuration file found. Please create one at %s"
msgstr "找不到設定檔。請在 %s 建立新的設定檔"
msgstr "未找到配置檔案。請在 %s 建立一份"
#: home-manager/home-manager:114
msgid "Home Manager not found at %s."
@@ -57,7 +57,7 @@ msgstr "在 %s 中找不到 Home Manager。"
msgid ""
"The fallback Home Manager path %s has been deprecated and a file/directory "
"was found there."
msgstr "備用的 Home Manager 路徑 %s 已被棄用,且在該處找到了檔案/目錄。"
msgstr "備用的 Home Manager 路徑 %s 已被拋棄,但一個檔案/資料夾在這被找到。"
#. translators: This message will be seen by very few users that likely are familiar with English. So feel free to leave this untranslated.
#: home-manager/home-manager:125
@@ -80,21 +80,21 @@ msgid ""
"\n"
" $ rm -r \"%s\""
msgstr ""
"若要移除此警告,請執行下列其中一。\n"
"要消除這個警告,請做以下其中一。\n"
"\n"
"1. 明確告知 Home Manager 使用路徑,例如\n"
"1. 告訴Home Manager使用路徑,例如加入\n"
"\n"
" { programs.home-manager.path = \"%s\"; }\n"
"\n"
" 中,加入您的設定。\n"
" 到你的配置中。\n"
"\n"
" 如果想直接匯入 Home Manager可以在呼叫時使用 `path` 參數來指定路徑:\n"
" 如果你想要直接引入Home Manager 請你使用 `path` 參數r\n"
"\n"
" pkgs.callPackage /path/to/home-manager-package { path = \"%s\"; }\n"
"\n"
" 這樣就能正確傳遞 Home Manager 的路徑。\n"
" 當呼叫 Home Manager 模組。\n"
"\n"
"2. 移除已棄用的路徑\n"
"2. 刪除無效的路徑\n"
"\n"
" $ rm -r \"%s\""
@@ -104,33 +104,33 @@ msgstr "正在進行 Nix 完整性檢查"
#: home-manager/home-manager:173
msgid "Could not find suitable profile directory, tried %s and %s"
msgstr "找不到合適的設定檔目錄,已嘗試 %s 和 %s"
msgstr "找不到合適的 profile 目錄,已嘗試 %s 和 %s"
#. translators: Here "flake" is a noun that refers to the Nix Flakes feature.
#: home-manager/home-manager:230
msgid "Can't inspect options of a flake configuration"
msgstr "無法檢查 flake 設定的選項"
msgstr "無法檢查 flake 配置中的選項"
#: home-manager/home-manager:305 home-manager/home-manager:328
#: home-manager/home-manager:734 home-manager/home-manager:1237
msgid "%s: unknown option '%s'"
msgstr "%s未知選項 '%s'"
msgstr "%s未知選項 %s"
#: home-manager/home-manager:310 home-manager/home-manager:1238
msgid "Run '%s --help' for usage help"
msgstr "執行 '%s --help' 以取得使用說明"
msgstr "執行 %s --help 獲取用法幫助"
#: home-manager/home-manager:336 home-manager/home-manager:441
msgid "The file %s already exists, leaving it unchanged..."
msgstr "檔案 %s 已存在,保持不變..."
msgstr "檔案 %s 已存在,不更改它..."
#: home-manager/home-manager:338 home-manager/home-manager:443
msgid "Creating %s..."
msgstr "正在建立 %s..."
msgstr "創建 %s..."
#: home-manager/home-manager:487
msgid "Creating initial Home Manager generation..."
msgstr "正在建立初始 Home Manager 世代..."
msgstr "正在建立初始 Home Manager 世代 ..."
#. translators: The "%s" specifier will be replaced by a file path.
#: home-manager/home-manager:492
@@ -142,12 +142,12 @@ msgid ""
"to configure Home Manager. Run 'man home-configuration.nix' to\n"
"see all available options."
msgstr ""
"全部完成home-manager 工具現在應該已被安裝,您可以編輯\n"
"全部工作完成home-manager 工具現應已安裝,您可以編輯\n"
"\n"
" %s\n"
"\n"
"來設定 Home Manager。執行 'man home-configuration.nix' 時\n"
"可查看所有可用選項。"
"來配置 Home Manager。執行 man home-configuration.nix\n"
"來檢視所有可用選項。"
#. translators: The "%s" specifier will be replaced by a URL.
#: home-manager/home-manager:497
@@ -158,16 +158,16 @@ msgid ""
"\n"
"if the error seems to be the fault of Home Manager."
msgstr ""
"糟糕,安裝失敗了!如果感覺是 Home Manager 造成的錯誤,請在此連結\n"
"啊哦,安裝失敗了!如果感覺是 Home Manager 造成的錯誤,請在下方\n"
"\n"
" %s\n"
"\n"
"中,建立 Issue 告知我們。"
"建立 Issue 告知我們。"
#. translators: Here "flake" is a noun that refers to the Nix Flakes feature.
#: home-manager/home-manager:508
msgid "Can't instantiate a flake configuration"
msgstr "無法實例化 flake 設定"
msgstr "無法建立 flake 配置例項"
#: home-manager/home-manager:584
msgid ""
@@ -177,12 +177,12 @@ msgid_plural ""
"There are %d unread and relevant news items.\n"
"Read them by running the command \"%s news\"."
msgstr[0] ""
"有 %d 未讀相關的消息項目。\n"
"執行指令 \"%s news\" 來進行確認。"
"有 %d 未讀相關新聞或訊息。\n"
"執行%s news” 命令進行閱讀。"
#: home-manager/home-manager:598
msgid "Unknown \"news.display\" setting \"%s\"."
msgstr "未知的 \"news.display\" 設定值 \"%s\"。"
msgstr "未知的 news.display 設定項 “%s”。"
#: home-manager/home-manager:606
#, sh-format
@@ -191,11 +191,11 @@ msgstr "請設定 $EDITOR 或 $VISUAL 環境變數"
#: home-manager/home-manager:624
msgid "Cannot run build in read-only directory"
msgstr "無法在唯讀目錄中執行建"
msgstr "無法在唯讀目錄中執行建"
#: home-manager/home-manager:787
msgid "The configuration did not contain the specialisation \"%s\""
msgstr "設定中不包含特化設定 \"%s\""
msgstr ""
#: home-manager/home-manager:841
msgid "No generation with ID %s"
@@ -203,7 +203,7 @@ msgstr "沒有 ID 為 %s 的世代"
#: home-manager/home-manager:843
msgid "Cannot remove the current generation %s"
msgstr "無法移除目前的世代 %s"
msgstr "無法移除當前世代 %s"
#: home-manager/home-manager:845
msgid "Removing generation %s"
@@ -215,7 +215,7 @@ msgstr "沒有即將過期的世代"
#: home-manager/home-manager:877
msgid "No home-manager packages seem to be installed."
msgstr "似乎沒有安裝 home-manager 套件。"
msgstr "似乎沒有安裝 home-manager 軟體包。"
#: home-manager/home-manager:962
msgid "Unknown argument %s"
@@ -223,11 +223,11 @@ msgstr "未知引數 %s"
#: home-manager/home-manager:987
msgid "This will remove Home Manager from your system."
msgstr "這將會從您的系統中移除 Home Manager。"
msgstr "這將會從系統中移除 Home Manager。"
#: home-manager/home-manager:990
msgid "This is a dry run, nothing will actually be uninstalled."
msgstr "這是模擬執行,實際上並不會解除安裝任何內容。"
msgstr "這是試執行結果,沒有實際解除安裝任何軟體包。"
#: home-manager/home-manager:994
msgid "Really uninstall Home Manager?"
@@ -235,27 +235,27 @@ msgstr "確定要解除安裝 Home Manager 嗎?"
#: home-manager/home-manager:1000
msgid "Switching to empty Home Manager configuration..."
msgstr "正在切換至空的 Home Manager 設定..."
msgstr "正在切換至空的 Home Manager 配置 ..."
#: home-manager/home-manager:1015
msgid "Yay!"
msgstr "太好了"
msgstr "好耶"
#: home-manager/home-manager:1020
msgid "Home Manager is uninstalled but your home.nix is left untouched."
msgstr "Home Manager 已解除安裝,但您的 home.nix 保持不變。"
msgstr "Home Manager 已解除安裝,但未改動您的 home.nix 配置檔案。"
#: home-manager/home-manager:1285
msgid "expire-generations expects one argument, got %d."
msgstr "expire-generations 預期一個引數,但到了 %d 個。"
msgstr "expire-generations 須要一個引數,但獲取到了 %d 個。"
#: home-manager/home-manager:1310
msgid "Unknown command: %s"
msgstr "未知令:%s"
msgstr "未知令:%s"
#: home-manager/install.nix:21
msgid "This derivation is not buildable, please run it using nix-shell."
msgstr "此 derivation 無法建置,請使用 nix-shell 執行。"
msgstr "此配置檔案/變體不可構建,請在 nix-shell 執行。"
#, sh-format
#~ msgid "Please set the $EDITOR environment variable"

View File

@@ -31,7 +31,7 @@ let
modules = [ configuration ] ++ hmModules;
class = "homeManager";
specialArgs = {
modulesPath = toString ./.;
modulesPath = builtins.toString ./.;
}
// extraSpecialArgs;
};
@@ -57,8 +57,9 @@ let
let
module = moduleChecks rawModule;
in
module
// {
{
inherit (module) options config;
activationPackage = module.config.home.activationPackage;
# For backwards compatibility. Please use activationPackage instead.

View File

@@ -193,13 +193,6 @@ in
description = "The user's username.";
};
home.uid = mkOption {
type = types.nullOr types.ints.unsigned;
default = null;
example = 1000;
description = "The user's uid.";
};
home.homeDirectory = mkOption {
type = types.path;
defaultText = literalExpression ''
@@ -577,25 +570,14 @@ in
warnings =
let
hmRelease = config.home.version.release;
libRelease = lib.trivial.release;
pkgsRelease = pkgs.lib.trivial.release;
releaseMismatch = hmRelease != libRelease || hmRelease != pkgsRelease;
versionsSummary =
if libRelease == pkgsRelease then
''
Home Manager version ${hmRelease} and
Nixpkgs version ${libRelease}.''
else
''
Home Manager version: ${hmRelease}
Nixpkgs version used to evaluate Home Manager: ${libRelease}
Nixpkgs version used for packages (`pkgs`): ${pkgsRelease}'';
nixpkgsRelease = lib.trivial.release;
releaseMismatch = config.home.enableNixpkgsReleaseCheck && hmRelease != nixpkgsRelease;
in
lib.optional (config.home.enableNixpkgsReleaseCheck && releaseMismatch) ''
lib.optional releaseMismatch ''
You are using
${lib.replaceString "\n" "\n " versionsSummary}
Home Manager version ${hmRelease} and
Nixpkgs version ${nixpkgsRelease}.
Using mismatched versions is likely to cause errors and unexpected
behavior. It is therefore highly recommended to use a release of Home
@@ -849,9 +831,6 @@ in
if [[ ! -v SKIP_SANITY_CHECKS ]]; then
checkUsername ${lib.escapeShellArg config.home.username}
checkHomeDirectory ${lib.escapeShellArg config.home.homeDirectory}
${lib.optionalString (config.home.uid != null) ''
checkUid ${toString config.home.uid}
''}
fi
${lib.optionalString config.home.activationGenerateGcRoot ''

View File

@@ -192,7 +192,7 @@ in
++ lib.optionals (cfg.quickPhraseFiles != { }) [
(pkgs.linkFarm "quickPhraseFiles" (
lib.mapAttrs' (
name: value: lib.nameValuePair "share/fcitx5/data/quickphrase.d/${name}.mb" value
name: value: lib.nameValuePair ("share/fcitx5/data/quickphrase.d/${name}.mb") value
) cfg.quickPhraseFiles
))
];

View File

@@ -270,7 +270,9 @@ in
setupLaunchAgents
# Restore errexit
set -e
if [[ -o errexit ]]; then
set -e
fi
'';
})
];

View File

@@ -13,9 +13,12 @@ let
mergeDefinitions
;
inherit (builtins)
map
filter
length
deepSeq
throw
toString
concatLists
;
inherit (lib.options) showDefs;

View File

@@ -117,17 +117,6 @@ function checkHomeDirectory() {
fi
}
function checkUid() {
local expectedUid="$1"
local actualUid
actualUid="$(id -u)"
if [[ "$actualUid" != "$expectedUid" ]]; then
_iError 'Error: UID is "%s" but we expect "%s"' "$actualUid" "$expectedUid"
exit 1
fi
}
# Note, the VERBOSE_ECHO variable is deprecated and should not be used inside
# the Home Manager project. It is provided here for backwards compatibility.
if [[ -v VERBOSE ]]; then

View File

@@ -63,12 +63,12 @@ let
intervalsString = lib.concatStringsSep ", " intervals;
assertInterval = option: interval: pkgs: {
assertion = pkgs.stdenv.isDarwin -> lib.elem interval intervals;
message = "On Darwin, ${option} must be one of: ${intervalsString}.";
assertion = (!pkgs.stdenv.isDarwin) || (lib.elem interval intervals);
message = "On Darwin ${option} must be one of: ${intervalsString}.";
};
intervalDocumentation = ''
On Darwin, it must be one of: ${intervalsString}, which are implemented as defined in {manpage}`systemd.time(7)`.
On Darwin it must be one of: ${intervalsString}, which are implemented as defined in {manpage}`systemd.time(7)`.
'';
in
{

View File

@@ -21,7 +21,6 @@
isList
mapAttrsToList
replicate
attrNames
;
initialIndent = concatStrings (replicate indentLevel " ");
@@ -29,36 +28,31 @@
toHyprconf' =
indent: attrs:
let
isImportantField =
n: _: foldl (acc: prev: if hasPrefix prev n then true else acc) false importantPrefixes;
importantFields = filterAttrs isImportantField attrs;
withoutImportantFields = fields: removeAttrs fields (attrNames importantFields);
allSections = filterAttrs (n: v: isAttrs v || isList v) attrs;
sections = withoutImportantFields allSections;
sections = filterAttrs (n: v: isAttrs v || (isList v && all isAttrs v)) attrs;
mkSection =
n: attrs:
if isList attrs then
let
separator = if all isAttrs attrs then "\n" else "";
in
(concatMapStringsSep separator (a: mkSection n a) attrs)
else if isAttrs attrs then
if lib.isList attrs then
(concatMapStringsSep "\n" (a: mkSection n a) attrs)
else
''
${indent}${n} {
${toHyprconf' " ${indent}" attrs}${indent}}
''
else
toHyprconf' indent { ${n} = attrs; };
'';
mkFields = generators.toKeyValue {
listsAsDuplicateKeys = true;
inherit indent;
};
allFields = filterAttrs (n: v: !(isAttrs v || isList v)) attrs;
fields = withoutImportantFields allFields;
allFields = filterAttrs (n: v: !(isAttrs v || (isList v && all isAttrs v))) attrs;
isImportantField =
n: _: foldl (acc: prev: if hasPrefix prev n then true else acc) false importantPrefixes;
importantFields = filterAttrs isImportantField allFields;
fields = builtins.removeAttrs allFields (mapAttrsToList (n: _: n) importantFields);
in
mkFields importantFields
+ concatStringsSep "\n" (mapAttrsToList mkSection sections)

View File

@@ -175,12 +175,6 @@
github = "exzombie";
githubId = 11456290;
};
farberbrodsky = {
name = "Michael Farber Brodsky";
email = "misha@farberbrodsky.com";
github = "farberbrodsky";
githubId = 36243759;
};
fendse = {
email = "46252070+Fendse@users.noreply.github.com";
github = "Fendse";
@@ -429,6 +423,12 @@
github = "natecox";
githubId = 2782695;
};
nickthegroot = {
name = "Nick DeGroot";
email = "nick@nickthegroot.com";
github = "nickthegroot";
githubId = 1966472;
};
nikp123 = {
name = "nikp123";
email = "nikp123@users.noreply.github.com";
@@ -507,6 +507,12 @@
github = "Rosuavio";
githubId = 7164552;
};
rrvsh = {
name = "Mohammad Rafiq";
email = "rafiq@rrv.sh";
github = "rrvsh";
githubId = 20300874;
};
rszamszur = {
name = "Radosław Szamszur";
email = "radoslawszamszur@gmail.com";

View File

@@ -17,29 +17,15 @@ let
# 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.
mkStateDconfKeys =
nameSuffix: settings:
pkgs.writeText "dconf-keys${nameSuffix}.json" (
builtins.toJSON (
lib.concatLists (
lib.mapAttrsToList (dir: entries: lib.mapAttrsToList (key: _: "/${dir}/${key}") entries) settings
)
stateDconfKeys = pkgs.writeText "dconf-keys.json" (
builtins.toJSON (
lib.concatLists (
lib.mapAttrsToList (
dir: entries: lib.mapAttrsToList (key: _: "/${dir}/${key}") entries
) cfg.settings
)
);
databases =
lib.optional (cfg.settings != { }) {
dconfProfile = null;
stateDconfKeys = mkStateDconfKeys "" cfg.settings;
inherit (cfg) settings;
}
++ lib.mapAttrsToList (name: value: {
dconfProfile = pkgs.writeText "dconf-profile-${name}" ''
user-db:${name}
'';
stateDconfKeys = mkStateDconfKeys "-${name}" value;
settings = value;
}) cfg.databases;
)
);
in
{
@@ -95,87 +81,73 @@ in
to convert dconf database dumps into compatible Nix expression.
'';
};
databases = lib.mkOption {
type = with types; attrsOf (attrsOf (attrsOf lib.hm.types.gvariant));
default = { };
description = ''
Settings to write to specific dconf user databases.
See [](#opt-dconf.settings) for details.
'';
};
};
};
config = lib.mkIf (cfg.enable && databases != [ ]) {
config = lib.mkIf (cfg.enable && cfg.settings != { }) {
# Make sure the dconf directory exists.
xdg.configFile."dconf/.keep".source = builtins.toFile "keep" "";
home.extraBuilderCommands = ''
mkdir -p $out/state/
''
+ lib.concatMapStrings (db: ''
ln -s ${db.stateDconfKeys} $out/state/${db.stateDconfKeys.name}
'') databases;
ln -s ${stateDconfKeys} $out/state/${stateDconfKeys.name}
'';
home.activation.dconfSettings = lib.hm.dag.entryAfter [ "installPackages" ] (
lib.concatMapStrings (
db:
let
iniFile = pkgs.writeText "hm-dconf.ini" (toDconfIni db.settings);
let
iniFile = pkgs.writeText "hm-dconf.ini" (toDconfIni cfg.settings);
statePath = "state/${db.stateDconfKeys.name}";
statePath = "state/${stateDconfKeys.name}";
cleanup = pkgs.writeShellScript "dconf-cleanup" ''
set -euo pipefail
cleanup = pkgs.writeShellScript "dconf-cleanup" ''
set -euo pipefail
${config.lib.bash.initHomeManagerLib}
${config.lib.bash.initHomeManagerLib}
PATH=${
lib.makeBinPath [
pkgs.dconf
pkgs.jq
]
}''${PATH:+:}$PATH
PATH=${
lib.makeBinPath [
pkgs.dconf
pkgs.jq
]
}''${PATH:+:}$PATH
oldState="$1"
newState="$2"
oldState="$1"
newState="$2"
# Can't do cleanup if we don't know the old state.
if [[ ! -f $oldState ]]; then
exit 0
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
verboseEcho "Resetting dconf key \"$key\""
run $DCONF_DBUS_RUN_SESSION dconf reset "$key"
done
'';
envCommand = lib.optionalString (db.dconfProfile != null) "env DCONF_PROFILE=${db.dconfProfile}";
in
''
if [[ -v DBUS_SESSION_BUS_ADDRESS ]]; then
export DCONF_DBUS_RUN_SESSION="${envCommand}"
else
export DCONF_DBUS_RUN_SESSION="${pkgs.dbus}/bin/dbus-run-session --dbus-daemon=${pkgs.dbus}/bin/dbus-daemon ${envCommand}"
# Can't do cleanup if we don't know the old state.
if [[ ! -f $oldState ]]; then
exit 0
fi
if [[ -v oldGenPath ]]; then
${cleanup} \
"$oldGenPath/${statePath}" \
"$newGenPath/${statePath}"
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
verboseEcho "Resetting dconf key \"$key\""
run $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
run $DCONF_DBUS_RUN_SESSION ${pkgs.dconf}/bin/dconf load / < ${iniFile}
if [[ -v oldGenPath ]]; then
${cleanup} \
"$oldGenPath/${statePath}" \
"$newGenPath/${statePath}"
fi
unset DCONF_DBUS_RUN_SESSION
''
) databases
run $DCONF_DBUS_RUN_SESSION ${pkgs.dconf}/bin/dconf load / < ${iniFile}
unset DCONF_DBUS_RUN_SESSION
''
);
};
}

View File

@@ -278,7 +278,7 @@ in
else if builtins.isString value then
"<const>${value}</const>"
else
throw "expected bool or string but got ${builtins.typeOf value}: ${toString value}";
throw ("expected bool or string but got ${builtins.typeOf value}: ${toString value}");
in
''
<match target="font">
@@ -338,7 +338,7 @@ in
xdg.configFile = lib.mapAttrs' (
name: config:
lib.nameValuePair "fontconfig/conf.d/${toString config.priority}-hm-${config.label}.conf" {
lib.nameValuePair "fontconfig/conf.d/${builtins.toString config.priority}-hm-${config.label}.conf" {
inherit (config) enable text;
source = lib.mkIf (config.source != null) config.source;
}

View File

@@ -59,7 +59,7 @@ in
theme = mkOption {
type = types.nullOr themeType;
default = null;
description = "Default theme for GTK 2/3.";
description = "Default theme for all GTK versions.";
};
iconTheme = mkOption {

View File

@@ -45,17 +45,9 @@ in
packageExample = "pkgs.gnome.gnome-themes-extra";
}
);
default = if lib.versionOlder config.home.stateVersion "26.05" then cfg.theme else null;
defaultText = literalExpression ''if lib.versionOlder config.home.stateVersion "26.05" then cfg.theme else null'';
description = ''
Theme for GTK 4 applications.
Warning: This is not officially supported and applied using a workaround.
It may cause issues with some apps.
For context, see [Please dont theme our apps](https://stopthemingmy.app/)
and [Restyling apps at scale](https://blogs.gnome.org/tbernard/2018/10/15/restyling-apps-at-scale/).
'';
default = cfg.theme;
defaultText = literalExpression "config.gtk.theme";
description = "Theme for GTK 4 applications.";
};
iconTheme = mkOption {

View File

@@ -72,7 +72,7 @@ let
fileList ++ subdirFiles;
newsFiles = collectNixFiles ./news;
newsEntries = map (
newsEntries = builtins.map (
newsFile:
let
imported = import newsFile;

View File

@@ -1,9 +0,0 @@
{
time = "2025-10-14T23:44:58+00:00";
condition = true;
message = ''
A new module is available: `services.colima`
Colima is a tool for orchestrating container runtimes under a linux VM.
'';
}

View File

@@ -1,34 +0,0 @@
{
config,
lib,
pkgs,
...
}:
{
time = "2025-11-04T15:44:03+00:00";
condition = true;
message = ''
The 'services.podman' module now supports Darwin (macOS) with declarative
machine management.
On Darwin, podman requires running containers inside a virtual machine.
The new configuration options allow you to declaratively manage podman
machines with automatic creation, configuration, and startup.
By default, a machine named 'podman-machine-default' will be created
automatically. You can customize machines or disable the default with:
services.podman.useDefaultMachine = false;
services.podman.machines = {
"my-machine" = {
cpus = 4;
memory = 8192;
diskSize = 100;
autoStart = true;
};
};
The module includes a launchd-based watchdog service that automatically
starts configured machines on login and keeps them running.
'';
}

View File

@@ -1,9 +0,0 @@
{
time = "2025-11-26T05:33:49+00:00";
condition = true;
message = ''
A new module is available: 'programs.cargo'.
cargo is the build system and package manager of Rust.
'';
}

View File

@@ -1,11 +0,0 @@
{
time = "2025-11-26T10:55:28+00:00";
condition = true;
message = ''
The option 'gtk.theme' does not apply to GTK 4 automatically anymore for new
installations (with `home.stateVersion` >= "26.05"). Using a custom theme is
not officially supported by GTK 4, and implemented by home-manager using a
workaround that may cause issues in some cases. If you still want to use a GTK
4 theme, you need to explicitly set 'gtk.gtk4.theme'.
'';
}

View File

@@ -1,10 +0,0 @@
{ pkgs, ... }:
{
time = "2025-11-27T07:22:14+00:00";
condition = pkgs.stdenv.hostPlatform.isDarwin;
message = ''
A new module is available: 'programs.infat'.
Infat is a command line tool to set default openers
for file formats and url schemes on macOS.
'';
}

View File

@@ -1,7 +0,0 @@
{
time = "2025-11-29T23:04:38+00:00";
condition = true;
message = ''
A new module is available: 'programs.parallel'.
'';
}

View File

@@ -1,16 +0,0 @@
{ config, ... }:
{
time = "2025-12-01T12:35:38+00:00";
condition = config.services.ludusavi.enable;
message = ''
BREAKING CHANGE:
The `ludusavi` module has changed its default backup and restore path.
The new module implements a mechanism to automatically migrate the backups
to the new path, but if it doesn't work and you can't find your backups in
`ludusavi`, they should be in the old path: ~/\$XDG_STATE_HOME/backups/ludusavi/
(that means a directory literally called $XDG_STATE_HOME in your home, rather than
the env var expanded). For more info, see pull #8234.
'';
}

View File

@@ -1,12 +0,0 @@
{
time = "2025-12-03T13:14:53+00:00";
condition = true;
message = ''
A new module is available: `programs.calibre`
Calibre is a powerful and easy to use e-book manager. Users say its outstanding
and a must-have. Itll allow you to do nearly everything and it takes things a
step beyond normal e-book software. Its also completely free and open source
and great for both casual users and computer experts.
'';
}

View File

@@ -1,12 +0,0 @@
{
time = "2025-12-04T19:34:38+00:00";
condition = true;
message = ''
A new module is available: `programs.screen`
GNU Screen is a terminal multiplexer, a software application that can
be used to multiplex several virtual consoles, allowing a user to access
multiple separate login sessions inside a single terminal window, or detach
and reattach sessions from a terminal.
'';
}

View File

@@ -1,12 +0,0 @@
{ pkgs, ... }:
{
time = "2025-12-05T01:50:03+00:00";
condition = pkgs.stdenv.hostPlatform.isLinux;
message = ''
A new module is available: `programs.hyprlauncher`
Hyprlauncher is a multipurpose and versatile launcher/picker
for hyprland. Its fast, simple, and provides various modules.
'';
}

View File

@@ -1,10 +0,0 @@
{
time = "2025-12-06T10:03:01+00:00";
condition = true;
message = ''
A new module is available: `programs.npm`
It allows you manage your npm user configuration (`.npmrc`)
and install a specific version of the package.
'';
}

View File

@@ -1,10 +0,0 @@
{
time = "2025-12-06T10:05:43+00:00";
condition = true;
message = ''
A new module is available: `programs.ty`
It allows to manage the configuration and package
of the Python language server `ty` by Astral.
'';
}

View File

@@ -1,32 +0,0 @@
{ config, ... }:
{
time = "2025-12-11T19:04:30+00:00";
condition =
let
helixEnabled = config.programs.helix.enable && config.programs.helix.defaultEditor;
kakouneEnabled = config.programs.kakoune.enable && config.programs.kakoune.defaultEditor;
neovimEnabled = config.programs.neovim.enable && config.programs.neovim.defaultEditor;
vimEnabled = config.programs.vim.enable && config.programs.vim.defaultEditor;
emacsEnabled = config.services.emacs.enable && config.services.emacs.defaultEditor;
in
helixEnabled || kakouneEnabled || neovimEnabled || vimEnabled || emacsEnabled;
message = ''
The 'defaultEditor' option now sets both {env}`EDITOR` and {env}`VISUAL`
environment variables.
Previously, only {env}`EDITOR` was set. The {env}`VISUAL` variable is now
also configured to point to the same editor, which is the expected behavior
for modern terminal editors.
This change affects the following modules:
- programs.helix
- programs.kakoune
- programs.neovim
- programs.vim
- services.emacs
No action is required. This change should improve compatibility with tools
that check {env}`VISUAL` before {env}`EDITOR`.
'';
}

View File

@@ -1,12 +0,0 @@
{ config, ... }:
{
time = "2025-12-12T19:20:28+00:00";
condition = config.xsession.windowManager.herbstluftwm.enable;
message = ''
It is now possible to disable the `herbstclient` alias in the autostart
script by setting `xsession.windowManagers.herbsluftwm.enableAlias = false`.
This makes it possible to use the `herbstclient` command in bash functions,
though may cause flickering while the autostart script runs.
'';
}

View File

@@ -1,20 +0,0 @@
{ config, ... }:
{
time = "2025-12-27T19:00:00+00:00";
condition = config.programs.zsh.enable;
message = ''
The default value of `programs.zsh.dotDir` has changed.
When `home.stateVersion` is set to "26.05" or later, and `xdg.enable` is
`true` (the default), `programs.zsh.dotDir` now defaults to
`''${config.xdg.configHome}/zsh`. Previously, it defaulted to the home
directory.
This means your Zsh configuration files (`.zshrc`, `.zshenv`, etc.) will be
moved to `~/.config/zsh` (or your configured XDG config home).
If you prefer the old behavior, you can explicitly set:
`programs.zsh.dotDir = config.home.homeDirectory;`
'';
}

View File

@@ -1,10 +0,0 @@
{ config, ... }:
{
time = "2026-01-02T00:03:48+00:00";
condition = config.services.mpd.enable;
message = ''
`MPD_HOST` and `MPD_PORT` environment variables are now set automatically.
This can be disabled with `services.mpd.enableSessionVariables = false`.
'';
}

View File

@@ -1,12 +0,0 @@
{ pkgs, ... }:
{
time = "2026-01-05T11:57:57+00:00";
condition = pkgs.stdenv.hostPlatform.isLinux;
message = ''
A new module is available: 'programs.workstyle'.
Workstyle dynamically renames Sway/i3/Hyprland workspaces to indicate
which programs are running in each one. For example, with a font icon.
'';
}

View File

@@ -8,10 +8,6 @@
let
cfg = config.qt;
qtctFormat = pkgs.formats.ini {
listToValue = values: lib.concatStringsSep ", " values;
};
# Map platform names to their packages.
platformPackages = with pkgs; {
gnome = [
@@ -290,34 +286,7 @@ in
'';
};
};
}
// (lib.genAttrs' [ "qt5ct" "qt6ct" ] (
name:
lib.nameValuePair "${name}Settings" (
lib.mkOption {
type = lib.types.nullOr qtctFormat.type;
default = null;
example = lib.literalExpression ''
{
Appearance = {
style = "kvantum";
icon_theme = "Papirus-Dark";
standar_dialogs = "xdgdesktopportal";
};
Fonts = {
fixed = "\"DejaVuSansM Nerd Font Mono,12\"";
general = "\"DejaVu Sans,12\"";
};
}
'';
description = ''
Qtct configuration. Writes settings to `${name}/${name}.conf`
file. Lists will be translated to comma-separated strings.
Fonts must be quoted (see example).
'';
}
)
));
};
};
config =
@@ -428,18 +397,5 @@ in
]
++ lib.optionals (platformTheme.name != null) [ "QT_QPA_PLATFORMTHEME" ]
++ lib.optionals (cfg.style.name != null) [ "QT_STYLE_OVERRIDE" ];
xdg.configFile =
lib.pipe
[ "qt5ct" "qt6ct" ]
[
(lib.filter (qtct: cfg."${qtct}Settings" != null))
(lib.flip lib.genAttrs' (
qtct:
lib.nameValuePair "${qtct}/${qtct}.conf" {
source = qtctFormat.generate "${qtct}-config" cfg."${qtct}Settings";
}
))
];
};
}

View File

@@ -26,7 +26,6 @@ in
"24.11"
"25.05"
"25.11"
"26.05"
];
description = ''
It is occasionally necessary for Home Manager to change

View File

@@ -47,9 +47,9 @@ in
desktop: terminals:
# Map desktop name such as GNOME to `.config/gnome-xdg-terminals.list`,
# default to `.config/xdg-terminals.list`.
lib.nameValuePair "${
if desktop == "default" then "" else "${lib.toLower desktop}-"
}xdg-terminals.list" { text = lib.concatLines terminals; }
lib.nameValuePair (
"${if desktop == "default" then "" else "${lib.toLower desktop}-"}xdg-terminals.list"
) { text = lib.concatLines terminals; }
) cfg.settings;
};
}

View File

@@ -136,7 +136,7 @@ in
xdg.stateHome = mkOptionDefault defaultStateHome;
home.sessionVariables = variables;
systemd.user.sessionVariables = variables;
systemd.user.sessionVariables = mkIf pkgs.stdenv.hostPlatform.isLinux variables;
}
)

View File

@@ -135,7 +135,7 @@ in
home.activation.xfconfSettings = lib.hm.dag.entryAfter [ "installPackages" ] (
let
mkCommand = channel: property: value: ''
run ${pkgs.xfconf}/bin/xfconf-query \
run ${pkgs.xfce.xfconf}/bin/xfconf-query \
${lib.escapeShellArgs (
[
"-c"

View File

@@ -8,32 +8,30 @@ msgstr ""
"Project-Id-Version: Home Manager Modules\n"
"Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n"
"POT-Creation-Date: 2025-07-22 10:59+0200\n"
"PO-Revision-Date: 2026-01-07 17:01+0000\n"
"Last-Translator: Brian E <brianellingsgaard9@gmail.com>\n"
"Language-Team: Faroese <https://hosted.weblate.org/projects/home-manager/"
"modules/fo/>\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Automatically generated\n"
"Language-Team: none\n"
"Language: fo\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 5.15.1\n"
#: modules/files.nix:206
msgid "Creating home file links in %s"
msgstr "Stávni heimafílaleinkir innaní %s"
msgstr ""
#: modules/files.nix:219
msgid "Cleaning up orphan links from %s"
msgstr "Ruddi foreldraleys leinkir frá %s"
msgstr ""
#: modules/home-environment.nix:647
msgid "Creating new profile generation"
msgstr "Stovni nýggjan profil ættarlið"
msgstr ""
#: modules/home-environment.nix:650
msgid "No change so reusing latest profile generation"
msgstr "Eingin broyting. Seinastið umhvarv ættarlið er enn í brúk"
msgstr ""
#: modules/home-environment.nix:699
msgid ""

View File

@@ -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: 2025-07-22 10:59+0200\n"
"PO-Revision-Date: 2025-12-04 04:17+0000\n"
"Last-Translator: \"Urocissa Caerulea.Tw\" <urocissa.tw@proton.me>\n"
"PO-Revision-Date: 2025-03-07 18:58+0000\n"
"Last-Translator: 807 <s10855168@gmail.com>\n"
"Language-Team: Chinese (Traditional Han script) <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 5.15-dev\n"
"X-Generator: Weblate 5.10.3-dev\n"
#: modules/files.nix:206
msgid "Creating home file links in %s"
@@ -25,15 +25,15 @@ msgstr "正在 %s 中建立家目錄檔案連結"
#: modules/files.nix:219
msgid "Cleaning up orphan links from %s"
msgstr "正在清理 %s 中的孤立連結"
msgstr "正在 %s 清理孤立連結"
#: modules/home-environment.nix:647
msgid "Creating new profile generation"
msgstr "正在建立新的世代設定檔"
msgstr "正在建立新一代的配置文件中"
#: modules/home-environment.nix:650
msgid "No change so reusing latest profile generation"
msgstr "沒有變更,將重複使用最新的設定檔世代"
msgstr "為發生改變,請重新使用新一代的配置文件"
#: modules/home-environment.nix:699
msgid ""
@@ -50,18 +50,18 @@ msgid ""
"\n"
"Then try activating your Home Manager configuration again."
msgstr ""
"糟糕Nix 無法安裝您的新 Home Manager 設定檔\n"
"糟糕Nix 未能安裝您的新 Home Manager 配置文件\n"
"\n"
"可能與使用 \"%s\" 安裝的套件衝突?\n"
"嘗試行\n"
"也許這裏和使用 \"%s\" 安裝的包有衝突?\n"
"嘗試行\n"
"\n"
" %s\n"
"\n"
"如果有衝突的套件,您可以使用以下指令移除\n"
"如果有衝突的包,你可以用\n"
"\n"
" %s\n"
"\n"
"然後再次嘗試啟用您的 Home Manager 設定。"
"來移除。然後嘗試再次啟用您的 Home Manager 配置。"
#: modules/home-environment.nix:735
msgid "Activating %s"
@@ -69,27 +69,27 @@ msgstr "正在啟用 %s"
#: modules/home-environment.nix:807
msgid "%s: unknown option '%s'"
msgstr "%s未知選項 '%s'"
msgstr ""
#: modules/lib-bash/activation-init.sh:22
msgid "Migrating profile from %s to %s"
msgstr "正在將設定檔從 %s 遷移至 %s"
msgstr "正在從 %S 配置文件轉移到 %s"
#: modules/lib-bash/activation-init.sh:54
msgid "Could not find suitable profile directory, tried %s and %s"
msgstr "找不到合適的設定檔目錄,已嘗試 %s 和 %s"
msgstr "找不到合適的 profile 目錄,已嘗試 %s 和 %s"
#: modules/lib-bash/activation-init.sh:106
msgid "Error: USER is set to \"%s\" but we expect \"%s\""
msgstr "錯誤USER 被設定為「%s」但我們的預期為「%s」"
msgstr "錯誤USER 被設定為 「%s」但我們希望是 「%s」"
#: modules/lib-bash/activation-init.sh:115
msgid "Error: HOME is set to \"%s\" but we expect \"%s\""
msgstr "錯誤HOME 被設定為「%s」但我們預期「%s」"
msgstr "錯誤HOME 被設定為 「%s」但我們預期得到 「%s」"
#: modules/lib-bash/activation-init.sh:132
msgid "Starting Home Manager activation"
msgstr "正在進行 Home Manager 啟用程序"
msgstr "正在啟動 Home Manager 初始化程式"
#: modules/lib-bash/activation-init.sh:136
msgid "Sanity checking Nix"
@@ -97,19 +97,19 @@ msgstr "正在進行 Nix 完整性檢查"
#: modules/lib-bash/activation-init.sh:149
msgid "This is a dry run"
msgstr "這是模擬執行"
msgstr "這是試運行"
#: modules/lib-bash/activation-init.sh:153
msgid "This is a live run"
msgstr "這是實際行"
msgstr "這是實際行"
#: modules/lib-bash/activation-init.sh:159
msgid "Using Nix version: %s"
msgstr "使用的 Nix 版本%s"
msgstr "正在使用的 Nix 版本: %s"
#: modules/lib-bash/activation-init.sh:162
msgid "Activation variables:"
msgstr "啟用變數"
msgstr "啟用變數:"
#~ msgid "Creating profile generation %s"
#~ msgstr "正在建立配置檔案世代 %s"

View File

@@ -104,7 +104,7 @@ in
};
stylesets = mkOption {
type = with types; attrsOf sectionsOrLines;
type = with types; attrsOf (sectionsOrLines);
default = { };
example = literalExpression ''
{ default = { ui = { "tab.selected.reverse" = "toggle"; }; }; };

View File

@@ -10,12 +10,6 @@ let
tomlFormat = pkgs.formats.toml { };
configPath =
if config.xdg.enable then
"${lib.removePrefix config.home.homeDirectory config.xdg.configHome}/aerospace/aerospace.toml"
else
".aerospace.toml";
# filterAttrsRecursive supporting lists, as well.
filterListAndAttrsRecursive =
pred: set:
@@ -45,19 +39,6 @@ in
{
meta.maintainers = with lib.maintainers; [ damidoug ];
imports = [
(lib.mkRenamedOptionModule
[ "programs" "aerospace" "userSettings" ]
[ "programs" "aerospace" "settings" ]
)
(lib.mkRemovedOptionModule [
"programs"
"aerospace"
"extraConfig"
] "This option has been removed. Please use 'programs.aerospace.settings' instead.")
];
options.programs.aerospace = {
enable = lib.mkEnableOption "AeroSpace window manager";
@@ -100,7 +81,24 @@ in
};
};
settings = mkOption {
extraConfig = mkOption {
type = types.lines;
default = "";
description = ''
Extra configuration to append to the aerospace.toml file.
This allows you to add raw TOML content, including multiline strings.
'';
example = lib.literalExpression ''
alt-enter = ''''exec-and-forget osascript -e '
tell application "Terminal"
do script
activate
end tell'
''''
'';
};
userSettings = mkOption {
inherit (tomlFormat) type;
default = { };
example = lib.literalExpression ''
@@ -117,27 +115,6 @@ in
alt-k = "focus up";
alt-l = "focus right";
};
on-window-detected = [
{
"if".app-id = "com.apple.finder";
run = "move-node-to-workspace 9";
}
{
"if" = {
app-id = "com.apple.systempreferences";
app-name-regex-substring = "settings";
window-title-regex-substring = "substring";
workspace = "workspace-name";
during-aerospace-startup = true;
};
check-further-callbacks = true;
run = [
"layout floating"
"move-node-to-workspace S"
];
}
];
}
'';
description = ''
@@ -151,68 +128,32 @@ in
config = lib.mkIf cfg.enable {
assertions = [
(lib.hm.assertions.assertPlatform "programs.aerospace" pkgs lib.platforms.darwin)
# 1. Fail if user sets start-at-login = true BUT launchd is disabled.
{
assertion =
!((lib.hasAttr "start-at-login" cfg.settings) && (cfg.settings."start-at-login" == true))
|| (cfg.launchd.enable == true);
message = ''
You have set `programs.aerospace.settings."start-at-login" = true;`
but `programs.aerospace.launchd.enable` is false.
This tells AeroSpace to manage its own startup, which can conflict
with Home Manager.
To manage startup with Home Manager, please set
`programs.aerospace.launchd.enable = true;`
(You can leave `start-at-login = true` in your settings, it will be
correctly overridden).
'';
}
# 2. Fail if user sets after-login-command (in any case).
{
assertion =
!(
(lib.hasAttr "after-login-command" cfg.settings)
&& (lib.isList cfg.settings."after-login-command")
&& (cfg.settings."after-login-command" != [ ])
);
message = ''
You have set `programs.aerospace.settings."after-login-command"`.
This setting is not supported when using this Home Manager module,
as it either conflicts with the launchd service (if enabled)
or bypasses it (if disabled).
The correct way to run commands after AeroSpace starts is to use:
1. `programs.aerospace.launchd.enable = true;`
2. `programs.aerospace.settings."after-startup-command" = [ ... ];`
'';
}
];
home = {
packages = lib.mkIf (cfg.package != null) [ cfg.package ];
file.${configPath} = lib.mkIf (cfg.settings != { }) {
source = tomlFormat.generate "aerospace" (
filterNulls (
cfg.settings
// {
# Override these to avoid launchd conflicts
start-at-login = false;
after-login-command = [ ];
}
)
);
onChange = lib.mkIf cfg.launchd.enable ''
echo "AeroSpace config changed, reloading..."
${lib.getExe cfg.package} reload-config
'';
};
file.".config/aerospace/aerospace.toml".source =
let
generatedConfig = tomlFormat.generate "aerospace" (
filterNulls (
cfg.userSettings
// lib.optionalAttrs cfg.launchd.enable {
# Override these to avoid launchd conflicts
start-at-login = false;
after-login-command = [ ];
}
)
);
extraConfig = pkgs.writeText "aerospace-extra-config" cfg.extraConfig;
in
pkgs.runCommandLocal "aerospace.toml"
{
inherit generatedConfig extraConfig;
}
''
cat "$generatedConfig" "$extraConfig" > "$out"
'';
};
launchd.agents.aerospace = {

View File

@@ -82,7 +82,7 @@ in
};
uiScale = lib.mkOption {
type = with lib.types; nullOr (numbers.between 1.0 2.0);
type = with lib.types; nullOr (numbers.between 0.0 1.0);
default = null;
example = 1.0;
description = "User interface scale.";

View File

@@ -112,7 +112,7 @@ let
answer_keys: tuple[tuple[int, str], ...] = (${
lib.strings.concatMapStringsSep ", " (val: "(${toString val.ease}, '${val.key}')") cfg.answerKeys
}${if cfg.answerKeys != [ ] then "," else ""})
})
for ease, key in answer_keys:
profile_manager.set_answer_key(ease, key)

View File

@@ -6,7 +6,9 @@
}:
let
inherit (builtins)
map
toJSON
toString
substring
stringLength
;
@@ -183,7 +185,7 @@ in
extraCss = mkOption {
type = nullOr lines;
default = null;
default = "";
description = ''
Extra CSS lines to add to {file}`~/.config/anyrun/style.css`.
'';

View File

@@ -11,6 +11,7 @@ let
tomlFormat = pkgs.formats.toml { };
inherit (lib) mkIf mkOption types;
inherit (pkgs.stdenv) isLinux isDarwin;
in
{
meta.maintainers = with lib.maintainers; [
@@ -220,82 +221,98 @@ in
};
}
(mkIf daemonCfg.enable {
assertions = [
(mkIf daemonCfg.enable (
lib.mkMerge [
{
assertion = lib.versionAtLeast cfg.package.version "18.2.0";
message = ''
The Atuin daemon requires at least version 18.2.0 or later.
'';
}
{
assertion = config.systemd.user.enable || config.launchd.enable;
message = "The Atuin daemon can only be configured on systems with systemd or launchd.";
}
];
programs.atuin.settings.daemon = {
enabled = true;
systemd_socket = config.systemd.user.enable;
socket_path = lib.mkIf (!config.systemd.user.enable) (
lib.mkDefault "${config.xdg.dataHome}/atuin/daemon.sock"
);
};
systemd.user.services.atuin-daemon = {
Unit = {
Description = "Atuin daemon";
Requires = [ "atuin-daemon.socket" ];
};
Install = {
Also = [ "atuin-daemon.socket" ];
WantedBy = [ "default.target" ];
};
Service = {
ExecStart = "${lib.getExe cfg.package} daemon";
Environment = lib.optionals (daemonCfg.logLevel != null) [ "ATUIN_LOG=${daemonCfg.logLevel}" ];
Restart = "on-failure";
RestartSteps = 3;
RestartMaxDelaySec = 6;
};
};
systemd.user.sockets.atuin-daemon =
let
socket_dir = if lib.versionAtLeast cfg.package.version "18.4.0" then "%t" else "%D/atuin";
in
{
Unit = {
Description = "Atuin daemon socket";
};
Install = {
WantedBy = [ "sockets.target" ];
};
Socket = {
ListenStream = "${socket_dir}/atuin.sock";
SocketMode = "0600";
RemoveOnStop = true;
};
};
launchd.agents.atuin-daemon = {
enable = true;
config = {
ProgramArguments = [
"${lib.getExe cfg.package}"
"daemon"
assertions = [
{
assertion = lib.versionAtLeast cfg.package.version "18.2.0";
message = ''
The Atuin daemon requires at least version 18.2.0 or later.
'';
}
{
assertion = isLinux || isDarwin;
message = "The Atuin daemon can only be configured on either Linux or macOS.";
}
];
EnvironmentVariables = lib.optionalAttrs (daemonCfg.logLevel != null) {
ATUIN_LOG = daemonCfg.logLevel;
programs.atuin.settings = {
daemon = {
enabled = true;
};
};
KeepAlive = {
Crashed = true;
SuccessfulExit = false;
}
(mkIf isLinux {
programs.atuin.settings = {
daemon = {
systemd_socket = true;
};
};
ProcessType = "Background";
};
};
})
systemd.user.services.atuin-daemon = {
Unit = {
Description = "Atuin daemon";
Requires = [ "atuin-daemon.socket" ];
};
Install = {
Also = [ "atuin-daemon.socket" ];
WantedBy = [ "default.target" ];
};
Service = {
ExecStart = "${lib.getExe cfg.package} daemon";
Environment = lib.optionals (daemonCfg.logLevel != null) [ "ATUIN_LOG=${daemonCfg.logLevel}" ];
Restart = "on-failure";
RestartSteps = 3;
RestartMaxDelaySec = 6;
};
};
systemd.user.sockets.atuin-daemon =
let
socket_dir = if lib.versionAtLeast cfg.package.version "18.4.0" then "%t" else "%D/atuin";
in
{
Unit = {
Description = "Atuin daemon socket";
};
Install = {
WantedBy = [ "sockets.target" ];
};
Socket = {
ListenStream = "${socket_dir}/atuin.sock";
SocketMode = "0600";
RemoveOnStop = true;
};
};
})
(mkIf isDarwin {
programs.atuin.settings = {
daemon = {
socket_path = lib.mkDefault "${config.xdg.dataHome}/atuin/daemon.sock";
};
};
launchd.agents.atuin-daemon = {
enable = true;
config = {
ProgramArguments = [
"${lib.getExe cfg.package}"
"daemon"
];
EnvironmentVariables = lib.optionalAttrs (daemonCfg.logLevel != null) {
ATUIN_LOG = daemonCfg.logLevel;
};
KeepAlive = {
Crashed = true;
SuccessfulExit = false;
};
ProcessType = "Background";
};
};
})
]
))
]
);
}

View File

@@ -8,7 +8,7 @@ let
cfg = config.programs.bashmount;
in
{
meta.maintainers = [ ];
meta.maintainers = [ lib.maintainers.AndersonTorres ];
options.programs.bashmount = {
enable = lib.mkEnableOption "bashmount";

View File

@@ -54,7 +54,7 @@ in
home.packages = lib.mkIf (cfg.package != null) [ cfg.package ];
home.sessionVariables = lib.mkIf (cfg.settings != { }) {
BEMENU_OPTS = lib.cli.toCommandLineShellGNU { } cfg.settings;
BEMENU_OPTS = lib.cli.toGNUCommandLineShell { } cfg.settings;
};
};
}

View File

@@ -1,44 +0,0 @@
{
lib,
pkgs,
config,
...
}:
let
inherit (lib)
types
mkIf
mkEnableOption
mkPackageOption
mkOption
;
cfg = config.programs.calibre;
in
{
meta.maintainers = with lib.hm.maintainers; [ aguirre-matteo ];
options.programs.calibre = {
enable = mkEnableOption "calibre";
package = mkPackageOption pkgs "calibre" { nullable = true; };
plugins = mkOption {
type = with types; listOf path;
default = [ ];
description = "List of plugins to install for calibre";
};
};
config = mkIf cfg.enable {
home.packages = mkIf (cfg.package != null) [ cfg.package ];
xdg.configFile = mkIf (cfg.plugins != [ ]) (
let
symlinkedPlugins = pkgs.symlinkJoin {
name = "calibre-plugins";
paths = cfg.plugins;
};
in
lib.mapAttrs' (
k: _: lib.nameValuePair "calibre/plugins/${k}" { source = (symlinkedPlugins + "/${k}"); }
) (builtins.readDir symlinkedPlugins)
);
};
}

View File

@@ -1,43 +0,0 @@
{
lib,
config,
pkgs,
...
}:
let
inherit (lib) mkEnableOption;
tomlFormat = pkgs.formats.toml { };
cfg = config.programs.cargo;
in
{
meta.maintainers = [ lib.maintainers.friedrichaltheide ];
options = {
programs = {
cargo = {
enable = mkEnableOption "management of cargo config";
settings = lib.mkOption {
inherit (tomlFormat) type;
default = { };
description = ''
Available configuration options for the .cargo/config see:
https://doc.rust-lang.org/cargo/reference/config.html
'';
};
};
};
};
config = lib.mkIf cfg.enable {
home = {
file = {
".cargo/config.toml" = {
source = tomlFormat.generate "config.toml" cfg.settings;
};
};
};
};
}

View File

@@ -40,7 +40,7 @@ let
finalPackage = mkOption {
inherit visible;
type = types.nullOr types.package;
type = types.package;
readOnly = true;
description = ''
Resulting customized ${name} package
@@ -220,22 +220,15 @@ let
};
in
lib.mkIf cfg.enable {
assertions = [
{
assertion = !(cfg.package == null && cfg.commandLineArgs != [ ]);
message = "Cannot set `commandLineArgs` when `package` is null for ${browser}.";
}
];
programs.${browser}.finalPackage =
programs.${browser}.finalPackage = lib.mkIf (cfg.package != null) (
if cfg.commandLineArgs != [ ] then
cfg.package.override {
commandLineArgs = lib.concatStringsSep " " cfg.commandLineArgs;
}
else
cfg.package;
cfg.package
);
home.packages = lib.mkIf (cfg.finalPackage != null) [
cfg.finalPackage
@@ -281,7 +274,7 @@ in
) supportedBrowsers;
config = lib.mkMerge (
map (browser: browserConfig browser config.programs.${browser}) (
builtins.map (browser: browserConfig browser config.programs.${browser}) (
builtins.attrNames supportedBrowsers
)
);

View File

@@ -197,47 +197,6 @@ in
};
};
rules = lib.mkOption {
type = lib.types.attrsOf (lib.types.either lib.types.lines lib.types.path);
default = { };
description = ''
Modular rule files for Claude Code.
The attribute name becomes the rule filename, and the value is either:
- Inline content as a string
- A path to a file containing the rule content
Rules are stored in .claude/rules/ directory.
All markdown files in .claude/rules/ are automatically loaded as project memory.
'';
example = lib.literalExpression ''
{
code-style = '''
# Code Style Guidelines
- Use consistent formatting
- Follow language conventions
''';
testing = '''
# Testing Conventions
- Write tests for all new features
- Maintain test coverage above 80%
''';
security = ./rules/security.md;
}
'';
};
rulesDir = lib.mkOption {
type = lib.types.nullOr lib.types.path;
default = null;
description = ''
Path to a directory containing rule files for Claude Code.
Rule files from this directory will be symlinked to .claude/rules/.
All markdown files in this directory are automatically loaded as project memory.
'';
example = lib.literalExpression "./rules";
};
agentsDir = lib.mkOption {
type = lib.types.nullOr lib.types.path;
default = null;
@@ -366,10 +325,6 @@ in
assertion = !(cfg.memory.text != null && cfg.memory.source != null);
message = "Cannot specify both `programs.claude-code.memory.text` and `programs.claude-code.memory.source`";
}
{
assertion = !(cfg.rules != { } && cfg.rulesDir != null);
message = "Cannot specify both `programs.claude-code.rules` and `programs.claude-code.rulesDir`";
}
{
assertion = !(cfg.agents != { } && cfg.agentsDir != null);
message = "Cannot specify both `programs.claude-code.agents` and `programs.claude-code.agentsDir`";
@@ -393,7 +348,7 @@ in
makeWrapperArgs = lib.flatten (
lib.filter (x: x != [ ]) [
(lib.optional (cfg.mcpServers != { }) [
"--append-flags"
"--add-flags"
"--mcp-config ${jsonFormat.generate "claude-code-mcp-config.json" { inherit (cfg) mcpServers; }}"
])
]
@@ -431,11 +386,6 @@ in
if cfg.memory.text != null then { text = cfg.memory.text; } else { source = cfg.memory.source; }
);
".claude/rules" = lib.mkIf (cfg.rulesDir != null) {
source = cfg.rulesDir;
recursive = true;
};
".claude/agents" = lib.mkIf (cfg.agentsDir != null) {
source = cfg.agentsDir;
recursive = true;
@@ -456,12 +406,6 @@ in
recursive = true;
};
}
// lib.mapAttrs' (
name: content:
lib.nameValuePair ".claude/rules/${name}.md" (
if lib.isPath content then { source = content; } else { text = content; }
)
) cfg.rules
// lib.mapAttrs' (
name: content:
lib.nameValuePair ".claude/agents/${name}.md" (

View File

@@ -68,15 +68,8 @@ in
in
lib.mkMerge [
(mkIf cfg.enable {
assertions = [
{
assertion = !cfg.enableGitIntegration || config.programs.git.package != null;
message = ''
programs.diff-highlight.enableGitIntegration requires programs.git.package to be set.
Please set programs.git.package to a valid git package.
'';
}
];
# Auto-enable git integration if programs.git.diff-highlight.enable was set to true
programs.diff-highlight.enableGitIntegration = lib.mkIf oldOptionEnabled (lib.mkOverride 1490 true);
warnings =
lib.optional
@@ -84,12 +77,9 @@ in
cfg.enableGitIntegration && options.programs.diff-highlight.enableGitIntegration.highestPrio == 1490
)
"`programs.diff-highlight.enableGitIntegration` automatic enablement is deprecated. Please explicitly set `programs.diff-highlight.enableGitIntegration = true`.";
# Auto-enable git integration if programs.git.diff-highlight.enable was set to true
programs.diff-highlight.enableGitIntegration = lib.mkIf oldOptionEnabled (lib.mkOverride 1490 true);
})
(mkIf (cfg.enable && cfg.enableGitIntegration && config.programs.git.package != null) {
(mkIf (cfg.enable && cfg.enableGitIntegration) {
programs.git = {
enable = lib.mkDefault true;
iniContent =

View File

@@ -129,7 +129,7 @@ in
enable = lib.mkDefault true;
iniContent =
let
difftCommand = "${lib.getExe cfg.package} ${lib.cli.toCommandLineShellGNU { } cfg.options}";
difftCommand = "${lib.getExe cfg.package} ${lib.cli.toGNUCommandLineShell { } cfg.options}";
in
mkMerge [
{

View File

@@ -75,7 +75,25 @@ in
enableBashIntegration = lib.hm.shell.mkBashIntegrationOption { inherit config; };
enableFishIntegration = lib.hm.shell.mkFishIntegrationOption { inherit config; };
enableFishIntegration =
lib.hm.shell.mkFishIntegrationOption {
inherit config;
extraDescription = ''
Note, enabling the direnv module will always activate its functionality
for Fish since the direnv package automatically gets loaded in Fish.
If this is not the case try adding
```nix
environment.pathsToLink = [ "/share/fish" ];
```
to the system configuration.
'';
}
// {
default = true;
readOnly = true;
};
enableNushellIntegration = lib.hm.shell.mkNushellIntegrationOption { inherit config; };

View File

@@ -16,7 +16,8 @@ let
generateConfig = lib.generators.toKeyValue {
mkKeyValue =
name: value: if lib.isString value then ''${name}="${value}"'' else "${name}=${toString value}";
name: value:
if lib.isString value then ''${name}="${value}"'' else "${name}=${builtins.toString value}";
};
iniFormat = pkgs.formats.ini { listsAsDuplicateKeys = true; };

View File

@@ -103,7 +103,7 @@ in
{
name = path;
value = {
source = jsonFormat.generate "config.json" ctx;
source = jsonFormat.generate "config.json" (ctx);
};
}
) cfg.contexts;

View File

@@ -471,7 +471,7 @@ in
order = mkOption {
type = with types; uniq (listOf str);
apply = map migrateEngineNameToIdV7;
apply = builtins.map migrateEngineNameToIdV7;
default = [ ];
example = [
"ddg"

View File

@@ -301,13 +301,20 @@ let
let
name = if isAttrs def && def.name != null then def.name else attrName;
mods =
lib.cli.toCommandLineShell
(optionName: {
option = "--${optionName}";
sep = if optionName == "set-cursor" then "=" else null;
explicitBool = false;
formatArg = lib.generators.mkValueStringDefault { };
})
lib.cli.toGNUCommandLineShell
{
mkOption =
k: v:
if v == null then
[ ]
else if k == "set-cursor" then
[ "--${k}=${lib.generators.mkValueStringDefault { } v}" ]
else
[
"--${k}"
(lib.generators.mkValueStringDefault { } v)
];
}
{
inherit (def)
position
@@ -388,14 +395,12 @@ let
passAsFile = [ "text" ];
} "env HOME=$(mktemp -d) fish_indent < $textPath > $out";
sessionVarsFile = "etc/profile.d/hm-session-vars.fish";
sessionVarsPkg = pkgs.runCommandLocal "hm-session-vars.fish" { } ''
mkdir -p "$(dirname $out/${sessionVarsFile})"
translatedSessionVariables = pkgs.runCommandLocal "hm-session-vars.fish" { } ''
(echo "function setup_hm_session_vars;"
${pkgs.buildPackages.babelfish}/bin/babelfish \
<${config.home.sessionVariablesPackage}/etc/profile.d/hm-session-vars.sh
<${config.home.sessionVariablesPackage}/etc/profile.d/hm-session-vars.sh
echo "end"
echo "setup_hm_session_vars") > $out/${sessionVarsFile}
echo "setup_hm_session_vars") > $out
'';
in
@@ -593,25 +598,11 @@ in
<https://fishshell.com/docs/current/completions.html>.
'';
};
programs.fish.sessionVariablesPackage = mkOption {
type = types.package;
internal = true;
description = ''
The package containing the translated {file}`hm-session-vars.fish` file.
'';
};
};
config = mkIf cfg.enable (
lib.mkMerge [
{
home.packages = [
cfg.package
cfg.sessionVariablesPackage
];
programs.fish.sessionVariablesPackage = sessionVarsPkg;
}
{ home.packages = [ cfg.package ]; }
(mkIf cfg.generateCompletions (
let
@@ -627,7 +618,7 @@ in
package
]
++ lib.filter (p: p != null) (
map (outName: package.${outName} or null) config.home.extraOutputsToInstall
builtins.map (outName: package.${outName} or null) config.home.extraOutputsToInstall
);
nativeBuildInputs = [ pkgs.python3 ];
buildInputs = [ cfg.package ];
@@ -724,7 +715,7 @@ in
set -q __fish_home_manager_config_sourced; and exit
set -g __fish_home_manager_config_sourced 1
source ${cfg.sessionVariablesPackage}/${sessionVarsFile}
source ${translatedSessionVariables}
${cfg.shellInit}

View File

@@ -11,7 +11,7 @@ let
tomlFormat = pkgs.formats.toml { };
in
{
meta.maintainers = [ lib.maintainers.rrvsh ];
meta.maintainers = [ lib.hm.maintainers.rrvsh ];
options.programs.gemini-cli = {
enable = lib.mkEnableOption "gemini-cli";
@@ -21,19 +21,14 @@ in
settings = lib.mkOption {
inherit (jsonFormat) type;
default = { };
example = {
ui.theme = "Default";
general = {
vimMode = true;
preferredEditor = "nvim";
previewFeatures = true;
};
ide.enabled = true;
privacy.usageStatisticsEnabled = false;
tools.autoAccept = false;
context.loadMemoryFromIncludeDirectories = true;
security.auth.selectedType = "oauth-personal";
};
example = lib.literalExpression ''
{
"theme": "Default",
"vimMode": true,
"preferredEditor": "nvim",
"autoAccept": true
}
'';
description = "JSON config for gemini-cli";
};
@@ -86,12 +81,12 @@ in
};
defaultModel = lib.mkOption {
type = lib.types.nullOr lib.types.str;
default = null;
type = lib.types.str;
default = "gemini-2.5-pro";
example = "gemini-2.5-flash";
description = ''
The default model to use for the CLI.
Will be set as $GEMINI_MODEL when configured.
Will be set as $GEMINI_MODEL.
'';
};
@@ -143,9 +138,7 @@ in
file.".gemini/settings.json" = lib.mkIf (cfg.settings != { }) {
source = jsonFormat.generate "gemini-cli-settings.json" cfg.settings;
};
sessionVariables = lib.mkIf (cfg.defaultModel != null) {
GEMINI_MODEL = cfg.defaultModel;
};
sessionVariables.GEMINI_MODEL = cfg.defaultModel;
};
}
{

View File

@@ -204,7 +204,7 @@ in
xdg.dataFile."gh/extensions" = mkIf (cfg.extensions != [ ]) {
source = pkgs.linkFarm "gh-extensions" (
map (p: {
builtins.map (p: {
name = p.pname;
path = "${p}/bin";
}) cfg.extensions

View File

@@ -224,20 +224,8 @@ in
message = "Ghostty systemd integration cannot be enabled for non-linux platforms";
}
];
systemd.user.services."app-com.mitchellh.ghostty" = {
Unit = {
X-Base = "${cfg.package}/share/systemd/user/app-com.mitchellh.ghostty.service";
X-SwitchMethod = "keep-old";
X-Reload-Triggers =
let
storePathOf = name: config.xdg.configFile.${name}.source;
in
lib.optionals (cfg.settings != { }) [ (storePathOf "ghostty/config") ]
++ lib.mapAttrsToList (name: _: storePathOf "ghostty/themes/${name}") cfg.themes;
};
};
xdg.configFile."systemd/user/app-com.mitchellh.ghostty.service".source =
"${cfg.package}/share/systemd/user/app-com.mitchellh.ghostty.service";
dbus.packages = [ cfg.package ];
})

View File

@@ -41,7 +41,6 @@ in
enable = mkEnableOption "Git";
package = lib.mkPackageOption pkgs "git" {
nullable = true;
example = "pkgs.gitFull";
extraDescription = ''
Use {var}`pkgs.gitFull`
@@ -329,7 +328,7 @@ in
config = mkIf cfg.enable (
lib.mkMerge [
{
home.packages = lib.optionals (cfg.package != null) [ cfg.package ];
home.packages = [ cfg.package ];
assertions = [
{
@@ -517,7 +516,7 @@ in
Type = "oneshot";
ExecStart =
let
exe = if cfg.package != null then lib.getExe cfg.package else "git";
exe = lib.getExe cfg.package;
in
''
"${exe}" for-each-repo --keep-going --config=maintenance.repo maintenance run --schedule=%i
@@ -554,7 +553,7 @@ in
launchd.agents =
let
baseArguments = [
"${if cfg.package != null then lib.getExe cfg.package else "git"}"
"${lib.getExe cfg.package}"
"for-each-repo"
"--keep-going"
"--config=maintenance.repo"

View File

@@ -16,13 +16,18 @@ let
cfg = config.programs.gpg;
toKeyValue =
settings:
lib.generators.toKeyValue {
mkKeyValue =
key: value: if lib.isString value then "${key} ${value}" else lib.optionalString value key;
listsAsDuplicateKeys = true;
} settings;
mkKeyValue =
key: value: if lib.isString value then "${key} ${value}" else lib.optionalString value key;
cfgText = lib.generators.toKeyValue {
inherit mkKeyValue;
listsAsDuplicateKeys = true;
} cfg.settings;
scdaemonCfgText = lib.generators.toKeyValue {
inherit mkKeyValue;
listsAsDuplicateKeys = true;
} cfg.scdaemonSettings;
primitiveType = types.oneOf [
types.str
@@ -188,7 +193,6 @@ in
scdaemonSettings = mkOption {
type = types.attrsOf (types.either primitiveType (types.listOf types.str));
default = { };
example = literalExpression ''
{
disable-ccid = true;
@@ -203,41 +207,6 @@ in
'';
};
dirmngrSettings = mkOption {
type = types.attrsOf (types.either primitiveType (types.listOf types.str));
default = { };
example = literalExpression ''
{
allow-version-check = true;
keyserver = "ldaps://ldap.example.com";
}
'';
description = ''
Dirmngr configuration options. Available options are described
in
[
{manpage}`dirmngr(1)`
](https://www.gnupg.org/documentation/manuals/gnupg/Dirmngr-Options.html)
'';
};
gpgsmSettings = mkOption {
type = types.attrsOf (types.either primitiveType (types.listOf types.str));
default = { };
example = literalExpression ''
{
with-key-data = true;
}
'';
description = ''
GPGSM configuration options. Available options are described
in
[
{manpage}`gpgsm(1)`
](https://www.gnupg.org/documentation/manuals/gnupg/GPGSM-Options.html)
'';
};
homedir = mkOption {
type = types.path;
example = literalExpression ''"''${config.xdg.dataHome}/gnupg"'';
@@ -298,7 +267,8 @@ in
cert-digest-algo = mkDefault "SHA512";
s2k-digest-algo = mkDefault "SHA512";
s2k-cipher-algo = mkDefault "AES256";
display-charset = mkDefault "utf-8";
charset = mkDefault "utf-8";
fixed-list-mode = mkDefault true;
no-comments = mkDefault true;
no-emit-version = mkDefault true;
keyid-format = mkDefault "0xlong";
@@ -307,6 +277,11 @@ in
with-fingerprint = mkDefault true;
require-cross-certification = mkDefault true;
no-symkey-cache = mkDefault true;
use-agent = mkDefault true;
};
programs.gpg.scdaemonSettings = {
# no defaults for scdaemon
};
home.packages = [ cfg.package ];
@@ -314,21 +289,9 @@ in
GNUPGHOME = cfg.homedir;
};
home.file."${cfg.homedir}/gpg.conf" = mkIf (cfg.settings != { }) {
text = toKeyValue cfg.settings;
};
home.file."${cfg.homedir}/gpg.conf".text = cfgText;
home.file."${cfg.homedir}/scdaemon.conf" = mkIf (cfg.scdaemonSettings != { }) {
text = toKeyValue cfg.scdaemonSettings;
};
home.file."${cfg.homedir}/dirmngr.conf" = mkIf (cfg.dirmngrSettings != { }) {
text = toKeyValue cfg.dirmngrSettings;
};
home.file."${cfg.homedir}/gpgsm.conf" = mkIf (cfg.gpgsmSettings != { }) {
text = toKeyValue cfg.gpgsmSettings;
};
home.file."${cfg.homedir}/scdaemon.conf".text = scdaemonCfgText;
# Link keyring if keys are not mutable
home.file."${cfg.homedir}/pubring.kbx" = mkIf (!cfg.mutableKeys && cfg.publicKeys != [ ]) {

View File

@@ -7,8 +7,6 @@
let
tomlFormat = pkgs.formats.toml { };
cfg = config.programs.gurk-rs;
configDir =
if pkgs.stdenv.hostPlatform.isDarwin then "Library/Application Support" else config.xdg.configHome;
in
{
meta.maintainers = [ lib.maintainers.da157 ];
@@ -48,8 +46,9 @@ in
config = lib.mkIf cfg.enable {
home.packages = lib.mkIf (cfg.package != null) [ cfg.package ];
home.file."${configDir}/gurk/gurk.toml" = lib.mkIf (cfg.settings != { }) {
source = tomlFormat.generate "gurk-config" cfg.settings;
};
home.file."${
if pkgs.stdenv.hostPlatform.isDarwin then "Library/Application Support" else config.xdg.configHome
}/gurk/gurk.toml".source =
lib.mkIf (cfg.settings != { }) (tomlFormat.generate "gurk-config" cfg.settings);
};
}

View File

@@ -9,7 +9,7 @@ let
iniFormat = pkgs.formats.ini { };
in
{
meta.maintainers = [ ];
meta.maintainers = with lib.maintainers; [ AndersonTorres ];
options.programs.havoc = {
enable = lib.mkEnableOption "Havoc terminal";

View File

@@ -49,8 +49,7 @@ in
default = false;
description = ''
Whether to configure {command}`hx` as the default
editor using the {env}`EDITOR` and {env}`VISUAL`
environment variables.
editor using the {env}`EDITOR` environment variable.
'';
};
@@ -226,10 +225,7 @@ in
else
[ cfg.package ];
home.sessionVariables = mkIf cfg.defaultEditor {
EDITOR = "hx";
VISUAL = "hx";
};
home.sessionVariables = mkIf cfg.defaultEditor { EDITOR = "hx"; };
xdg.configFile =
let

View File

@@ -9,7 +9,7 @@ let
jsonFormat = pkgs.formats.json { };
in
{
meta.maintainers = [ lib.maintainers.PerchunPak ];
meta.maintainers = [ lib.maintainers.perchun ];
imports = [
(lib.mkRemovedOptionModule [ "programs" "hyprpanel" "dontAssertNotificationDaemons " ] ''
@@ -70,7 +70,7 @@ in
"mako"
];
in
map (name: {
builtins.map (name: {
assertion = !config.services.${name}.enable;
message = ''
Only one notification daemon can be enabled at once. You have enabled

View File

@@ -1,81 +0,0 @@
{
lib,
config,
pkgs,
...
}:
let
cfg = config.programs.infat;
tomlFormat = pkgs.formats.toml { };
configDir =
if config.xdg.enable then
config.xdg.configHome
else
"${config.home.homeDirectory}/Library/Application Support";
configFile = "${configDir}/infat/config.toml";
in
{
meta.maintainers = with lib.maintainers; [
mirkolenz
];
options = {
programs.infat = {
enable = lib.mkEnableOption "infat";
package = lib.mkPackageOption pkgs "infat" { nullable = true; };
settings = lib.mkOption {
type = tomlFormat.type;
default = { };
example = lib.literalExpression ''
{
extensions = {
md = "TextEdit";
html = "Safari";
pdf = "Preview";
};
schemes = {
mailto = "Mail";
web = "Safari";
};
types = {
plain-text = "VSCode";
};
}
'';
description = ''
Configuration written to
{file}`$XDG_CONFIG_HOME/infat/config.toml`.
'';
};
autoActivate = lib.mkEnableOption "auto-activate infat" // {
default = true;
example = false;
description = ''
Automatically activate infat on startup.
This is useful if you want to use infat as a
default application handler for certain file types.
If you don't want this, set this to false.
This option is only effective if `settings` is set.
'';
};
};
};
config = lib.mkIf cfg.enable {
assertions = [
(lib.hm.assertions.assertPlatform "programs.infat" pkgs lib.platforms.darwin)
];
home = {
packages = lib.mkIf (cfg.package != null) [ cfg.package ];
file.${configFile} = lib.mkIf (cfg.settings != { }) {
source = tomlFormat.generate "infat-settings.toml" cfg.settings;
};
activation = lib.mkIf (cfg.settings != { } && cfg.package != null && cfg.autoActivate) {
infat = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
run ${lib.getExe cfg.package} --config "${configFile}" $VERBOSE_ARG
'';
};
};
};
}

View File

@@ -139,7 +139,7 @@ in
in
lib.hm.dag.entryAfter [ "linkGeneration" ] ''
# Ensure that settings.json exists.
mkdir -p ${dirOf configPath}
mkdir -p ${builtins.dirOf configPath}
touch ${configPath}
# Config has to be written to temporary variable because jq cannot edit files in place.
config="$(jq -s '.[0] + .[1]' ${configPath} ${newConfig})"

View File

@@ -705,8 +705,7 @@ in
default = false;
description = ''
Whether to configure {command}`kak` as the default
editor using the {env}`EDITOR` and {env}`VISUAL`
environment variables.
editor using the {env}`EDITOR` environment variable.
'';
};
@@ -756,10 +755,7 @@ in
programs.kakoune.finalPackage = lib.mkIf (cfg.package != null) kakouneWithPlugins;
home.packages = lib.mkIf (cfg.finalPackage != null) [ cfg.finalPackage ];
home.sessionVariables = mkIf cfg.defaultEditor {
EDITOR = "kak";
VISUAL = "kak";
};
home.sessionVariables = mkIf cfg.defaultEditor { EDITOR = "kak"; };
xdg.configFile = lib.mkMerge [
{ "kak/kakrc".source = configFile; }
(mkIf (cfg.colorSchemePackage != null) {

View File

@@ -62,15 +62,8 @@ in
Configuration written to
{file}`$XDG_CONFIG_HOME/keepassxc/keepassxc.ini`.
See <https://github.com/keepassxreboot/keepassxc/blob/develop/src/core/Config.cpp>
See <https://github.com/keepassxreboot/keepassxc/blob/647272e9c5542297d3fcf6502e6173c96f12a9a0/src/core/Config.cpp#L49-L223>
for the full list of options.
::: {.note}
When the settings are non-empty, the configuration file will be linked
into the Nix store and KeePassXC will report an access error for its
configuration file. This is expected and can not be fixed in a way that
aligns with Home Manager's principles. See [#8257](https://github.com/nix-community/home-manager/issues/8257) for more details.
:::
'';
};

View File

@@ -14,7 +14,7 @@ let
renderSettings =
with lib.generators;
toINI {
mkKeyValue = mkKeyValueDefault {
mkKeyValue = mkKeyValueDefault rec {
mkValueString =
v:
if lib.isList v then
@@ -139,7 +139,7 @@ in
let
makePath =
baseDir: subDir:
toString (
builtins.toString (
/.
+ lib.concatStringsSep "/" [
baseDir

View File

@@ -341,13 +341,16 @@ in
# See https://sw.kovidgoyal.net/kitty/conf.html
${cfg.extraConfig}
'';
onChange =
let
prefix = if pkgs.stdenv.hostPlatform.isDarwin then "/usr" else pkgs.procps;
in
''
${prefix}/bin/pkill -USR1 -u $USER kitty || true
'';
}
// lib.optionalAttrs pkgs.stdenv.hostPlatform.isLinux {
onChange = ''
${pkgs.procps}/bin/pkill -USR1 -u $USER kitty || true
'';
}
// lib.optionalAttrs pkgs.stdenv.hostPlatform.isDarwin {
onChange = ''
/usr/bin/pkill -USR1 -u $USER kitty || true
'';
};
xdg.configFile."kitty/quick-access-terminal.conf" = mkIf (cfg.quickAccessTerminalConfig != { }) {

View File

@@ -9,6 +9,7 @@ let
cfg = config.programs.kubecolor;
yamlFormat = pkgs.formats.yaml { };
inherit (pkgs.stdenv.hostPlatform) isDarwin;
in
{
@@ -49,20 +50,18 @@ in
config =
let
preferXdgDirectories =
config.home.preferXdgDirectories && (!pkgs.stdenv.hostPlatform.isDarwin || config.xdg.enable);
configDir =
if preferXdgDirectories then
"${config.xdg.configHome}/kube"
else if pkgs.stdenv.hostPlatform.isDarwin then
"Library/Application Support/kube"
else
".kube";
preferXdgDirectories = config.home.preferXdgDirectories && (!isDarwin || config.xdg.enable);
# https://github.com/kubecolor/kubecolor/pull/145
configPathSuffix = lib.optionalString (
cfg.package.pname == "kubecolor" && lib.versionOlder (lib.getVersion cfg.package) "0.4"
) "color.yaml";
configPathSuffix =
if
cfg.package.pname == "kubecolor"
&& lib.strings.toInt (lib.versions.major cfg.package.version) == 0
&& lib.strings.toInt (lib.versions.minor cfg.package.version) < 4
then
"kube/"
else
"kube/color.yaml";
in
mkIf cfg.enable {
@@ -74,10 +73,31 @@ in
home.packages = lib.mkIf (cfg.package != null) [ cfg.package ];
home.sessionVariables.KUBECOLOR_CONFIG = "${configDir}/${configPathSuffix}";
home.sessionVariables =
if preferXdgDirectories then
{
KUBECOLOR_CONFIG = "${config.xdg.configHome}/${configPathSuffix}";
}
else if isDarwin then
{
KUBECOLOR_CONFIG = "${config.home.homeDirectory}/Library/Application Support/${configPathSuffix}";
}
else
{ };
home.file."${configDir}/color.yaml" = mkIf (cfg.settings != { }) {
source = yamlFormat.generate "kubecolor-settings" cfg.settings;
xdg.configFile = mkIf preferXdgDirectories {
"kube/color.yaml" = mkIf (cfg.settings != { }) {
source = yamlFormat.generate "kubecolor-settings" cfg.settings;
};
};
home.file = mkIf (!preferXdgDirectories) {
"Library/Application Support/kube/color.yaml" = mkIf (isDarwin && cfg.settings != { }) {
source = yamlFormat.generate "kubecolor-settings" cfg.settings;
};
".kube/color.yaml" = mkIf (!isDarwin && cfg.settings != { }) {
source = yamlFormat.generate "kubecolor-settings" cfg.settings;
};
};
home.shellAliases = lib.mkIf (cfg.enableAlias && (cfg.package != null)) {

View File

@@ -201,7 +201,7 @@ let
plugins:
pkgs.linkFarm "lapce-plugins" (
builtins.listToAttrs (
map (
builtins.map (
{
author,
name,

View File

@@ -11,11 +11,7 @@ let
yamlFormat = pkgs.formats.yaml { };
configDir =
if pkgs.stdenv.hostPlatform.isDarwin && !config.xdg.enable then
"Library/Application Support/jesseduffield"
else
config.xdg.configHome;
inherit (pkgs.stdenv.hostPlatform) isDarwin;
in
{
@@ -55,8 +51,16 @@ in
config = lib.mkIf cfg.enable {
home.packages = lib.mkIf (cfg.package != null) [ cfg.package ];
home.file."${configDir}/lazydocker/config.yml" = lib.mkIf (cfg.settings != { }) {
source = yamlFormat.generate "lazydocker-config" cfg.settings;
};
home.file."Library/Application Support/jesseduffield/lazydocker/config.yml" =
lib.mkIf (cfg.settings != { } && (isDarwin && !config.xdg.enable))
{
source = yamlFormat.generate "lazydocker-config" cfg.settings;
};
xdg.configFile."lazydocker/config.yml" =
lib.mkIf (cfg.settings != { } && !(isDarwin && !config.xdg.enable))
{
source = yamlFormat.generate "lazydocker-config" cfg.settings;
};
};
}

View File

@@ -11,11 +11,8 @@ let
yamlFormat = pkgs.formats.yaml { };
configDir =
if pkgs.stdenv.hostPlatform.isDarwin && !config.xdg.enable then
"Library/Application Support"
else
config.xdg.configHome;
inherit (pkgs.stdenv.hostPlatform) isDarwin;
in
{
meta.maintainers = [
@@ -74,10 +71,17 @@ in
config = mkIf cfg.enable {
home.packages = mkIf (cfg.package != null) [ cfg.package ];
home.file."${configDir}/lazygit/config.yml" = {
enable = cfg.settings != { };
source = yamlFormat.generate "lazygit-config" cfg.settings;
};
home.file."Library/Application Support/lazygit/config.yml" =
mkIf (cfg.settings != { } && (isDarwin && !config.xdg.enable))
{
source = yamlFormat.generate "lazygit-config" cfg.settings;
};
xdg.configFile."lazygit/config.yml" =
mkIf (cfg.settings != { } && !(isDarwin && !config.xdg.enable))
{
source = yamlFormat.generate "lazygit-config" cfg.settings;
};
programs =
let

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