diff --git a/.github/labeler.yml b/.github/labeler.yml
index b03251e89a32..cab1b5438716 100644
--- a/.github/labeler.yml
+++ b/.github/labeler.yml
@@ -1,36 +1,46 @@
"mail":
- - modules/programs/aerc*.nix
- - modules/programs/alot*.nix
- - tests/modules/programs/aerc/*
- - tests/modules/programs/alot/*
- - modules/programs/mujmap.nix
- - tests/modules/programs/mujmap/*
- - modules/programs/notmuch.nix
- - modules/programs/neomutt*
- - tests/modules/programs/neomutt/*
- - modules/programs/getmail*
- - modules/*/mbsync*
- - tests/modules/programs/mbsync/*
- - modules/programs/himalaya.nix
- - tests/modules/programs/himalaya/*
- - modules/programs/thunderbird.nix
- - tests/modules/programs/thunderbird/*
- - modules/services/imapnotify.nix
+- changed-files:
+ - any-glob-to-any-file:
+ - modules/programs/aerc*.nix
+ - modules/programs/alot*.nix
+ - tests/modules/programs/aerc/*
+ - tests/modules/programs/alot/*
+ - modules/programs/mujmap.nix
+ - tests/modules/programs/mujmap/*
+ - modules/programs/notmuch.nix
+ - modules/programs/neomutt*
+ - tests/modules/programs/neomutt/*
+ - modules/programs/getmail*
+ - modules/*/mbsync*
+ - tests/modules/programs/mbsync/*
+ - modules/programs/himalaya.nix
+ - tests/modules/programs/himalaya/*
+ - modules/programs/thunderbird.nix
+ - tests/modules/programs/thunderbird/*
+ - modules/services/imapnotify.nix
"neovim":
- - modules/programs/neovim.nix
- - tests/modules/programs/neovim/**/*
+- changed-files:
+ - any-glob-to-any-file:
+ - modules/programs/neovim.nix
+ - tests/modules/programs/neovim/**/*
"shell":
- - modules/lib/zsh.nix
- - modules/programs/zsh*
- - modules/programs/bash*
- - tests/modules/programs/zsh/**/*
+- changed-files:
+ - any-glob-to-any-file:
+ - modules/lib/zsh.nix
+ - modules/programs/zsh*
+ - modules/programs/bash*
+ - tests/modules/programs/zsh/**/*
"calendar":
- - modules/programs/khal*
- - modules/*/vdirsyncer*
- - modules/accounts/calendar.nix
+- changed-files:
+ - any-glob-to-any-file:
+ - modules/programs/khal*
+ - modules/*/vdirsyncer*
+ - modules/accounts/calendar.nix
"contacts":
- - modules/accounts/contacts.nix
+- changed-files:
+ - any-glob-to-any-file:
+ - modules/accounts/contacts.nix
diff --git a/.github/workflows/github_pages.yml b/.github/workflows/github_pages.yml
index 2dee0786be3c..9f49d49a8617 100644
--- a/.github/workflows/github_pages.yml
+++ b/.github/workflows/github_pages.yml
@@ -11,7 +11,7 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- - uses: cachix/install-nix-action@v23
+ - uses: cachix/install-nix-action@v27
with:
nix_path: nixpkgs=channel:nixos-unstable
- uses: cachix/cachix-action@v15
diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml
index daea610a3a51..81585d85976c 100644
--- a/.github/workflows/labeler.yml
+++ b/.github/workflows/labeler.yml
@@ -17,8 +17,7 @@ jobs:
runs-on: ubuntu-latest
if: github.repository_owner == 'nix-community'
steps:
- - uses: actions/labeler@v4
+ - uses: actions/labeler@v5
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
sync-labels: true
-
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 40d4e2b33bb1..05d04163b540 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -12,7 +12,7 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- - uses: cachix/install-nix-action@v23
+ - uses: cachix/install-nix-action@v27
with:
nix_path: nixpkgs=channel:nixos-unstable
- run: |
diff --git a/.github/workflows/update-flake.yml b/.github/workflows/update-flake.yml
index 6485286687a2..8ba9264d3528 100644
--- a/.github/workflows/update-flake.yml
+++ b/.github/workflows/update-flake.yml
@@ -12,9 +12,9 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Nix
- uses: cachix/install-nix-action@v23
+ uses: cachix/install-nix-action@v27
- name: Update flake.lock
- uses: DeterminateSystems/update-flake-lock@v21
+ uses: DeterminateSystems/update-flake-lock@v23
with:
token: ${{ secrets.GH_TOKEN_FOR_UPDATES }}
pr-labels: dependencies
diff --git a/docs/home-manager-manual.nix b/docs/home-manager-manual.nix
index 34196d423783..23b2d1e65586 100644
--- a/docs/home-manager-manual.nix
+++ b/docs/home-manager-manual.nix
@@ -32,6 +32,8 @@ in stdenv.mkDerivation {
OPTIONS_JSON \
${home-manager-options.nix-darwin}/share/doc/nixos/options.json
+ cp ${./options.html} out/options.html
+
cp ${./static/style.css} out/style.css
cp -r ${./release-notes} release-notes
diff --git a/docs/manual/introduction.md b/docs/manual/introduction.md
new file mode 100644
index 000000000000..ebdac5bd62a5
--- /dev/null
+++ b/docs/manual/introduction.md
@@ -0,0 +1,32 @@
+# Introduction to Home Manager {#ch-introduction}
+
+Home Manager is a [Nix](https://nix.dev/)-powered tool for reproducible management of the contents of users' home directories.
+This includes programs, configuration files, environment variables and, well… arbitrary files.
+The following example snippet of Nix code:
+
+```nix
+programs.git = {
+ enable = true;
+ userEmail = "joe@example.org";
+ userName = "joe";
+};
+```
+
+would make available to a user the `git` executable and man pages and a configuration file `~/.config/git/config`:
+
+```ini
+[user]
+ email = "joe@example.org"
+ name = "joe"
+```
+
+Since Home Manager is implemented in Nix, it provides several benefits:
+
+- Contents are reproducible — a home will be the exact same every time it is built, unless of course, an intentional change is made.
+ This also means you can have the exact same home on different hosts.
+- Significantly faster and more powerful than various backup strategies.
+- Unlike "dotfiles" repositories, Home Manager supports specifying programs, as well as their configurations.
+- Supported by , so that you don't have to build from source.
+- If you do want to build some programs from source, there is hardly a tool more useful than Nix for that, and the build instructions can be neatly integrated in your Home Manager usage.
+- Infinitely composable, so that values in different configuration files and build instructions can share a source of truth.
+- Connects you with the [most extensive](https://repology.org/repositories/statistics/total) and [most up-to-date](https://repology.org/repositories/statistics/newest) software package repository on earth, [Nixpkgs](https://github.com/NixOS/nixpkgs).
diff --git a/docs/manual/manual.md b/docs/manual/manual.md
index a1cfb1a0c4f2..0f81642f7c54 100644
--- a/docs/manual/manual.md
+++ b/docs/manual/manual.md
@@ -8,6 +8,7 @@ preface.md
```
```{=include=} parts
+introduction.md
installation.md
usage.md
nix-flakes.md
diff --git a/docs/options.html b/docs/options.html
new file mode 100644
index 000000000000..66c803fc92bc
--- /dev/null
+++ b/docs/options.html
@@ -0,0 +1,15 @@
+
+
+
+ Redirecting…
+
+
+
+
+
+ Redirecting…
+
+
+
diff --git a/flake.lock b/flake.lock
index 865072042d2e..b700f2083e1c 100644
--- a/flake.lock
+++ b/flake.lock
@@ -2,11 +2,11 @@
"nodes": {
"nixpkgs": {
"locked": {
- "lastModified": 1716948383,
- "narHash": "sha256-SzDKxseEcHR5KzPXLwsemyTR/kaM9whxeiJohbL04rs=",
+ "lastModified": 1719848872,
+ "narHash": "sha256-H3+EC5cYuq+gQW8y0lSrrDZfH71LB4DAf+TDFyvwCNA=",
"owner": "NixOS",
"repo": "nixpkgs",
- "rev": "ad57eef4ef0659193044870c731987a6df5cf56b",
+ "rev": "00d80d13810dbfea8ab4ed1009b09100cca86ba8",
"type": "github"
},
"original": {
diff --git a/home-manager/po/ar.po b/home-manager/po/ar.po
new file mode 100644
index 000000000000..ea67fd5aeb68
--- /dev/null
+++ b/home-manager/po/ar.po
@@ -0,0 +1,217 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR Home Manager contributors
+# This file is distributed under the same license as the Home Manager package.
+# FIRST AUTHOR , 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: 2024-04-17 23:19+0200\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"Language: ar\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 "
+"&& n%100<=10 ? 3 : n%100>=11 ? 4 : 5;\n"
+
+#. translators: For example: "home-manager: missing argument for --cores"
+#: home-manager/home-manager:16
+msgid "%s: missing argument for %s"
+msgstr ""
+
+#: home-manager/home-manager:64
+msgid "No configuration file found at %s"
+msgstr ""
+
+#. translators: The first '%s' specifier will be replaced by either
+#. 'home.nix' or 'flake.nix'.
+#: home-manager/home-manager:81 home-manager/home-manager:85
+#: home-manager/home-manager:184
+msgid ""
+"Keeping your Home Manager %s in %s is deprecated,\n"
+"please move it to %s"
+msgstr ""
+
+#: home-manager/home-manager:92
+msgid "No configuration file found. Please create one at %s"
+msgstr ""
+
+#: home-manager/home-manager:107
+msgid "Home Manager not found at %s."
+msgstr ""
+
+#. 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:115
+msgid ""
+"The fallback Home Manager path %s has been deprecated and a file/directory "
+"was found there."
+msgstr ""
+
+#. 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:118
+msgid ""
+"To remove this warning, do one of the following.\n"
+"\n"
+"1. Explicitly tell Home Manager to use the path, for example by adding\n"
+"\n"
+" { programs.home-manager.path = \"%s\"; }\n"
+"\n"
+" to your configuration.\n"
+"\n"
+" If you import Home Manager directly, you can use the `path` parameter\n"
+"\n"
+" pkgs.callPackage /path/to/home-manager-package { path = \"%s\"; }\n"
+"\n"
+" when calling the Home Manager package.\n"
+"\n"
+"2. Remove the deprecated path.\n"
+"\n"
+" $ rm -r \"%s\""
+msgstr ""
+
+#: home-manager/home-manager:146
+msgid "Sanity checking Nix"
+msgstr ""
+
+#: home-manager/home-manager:166
+msgid "Could not find suitable profile directory, tried %s and %s"
+msgstr ""
+
+#. translators: Here "flake" is a noun that refers to the Nix Flakes feature.
+#: home-manager/home-manager:221
+msgid "Can't inspect options of a flake configuration"
+msgstr ""
+
+#: home-manager/home-manager:296 home-manager/home-manager:319
+#: home-manager/home-manager:1051
+msgid "%s: unknown option '%s'"
+msgstr ""
+
+#: home-manager/home-manager:301 home-manager/home-manager:1052
+msgid "Run '%s --help' for usage help"
+msgstr ""
+
+#: home-manager/home-manager:327 home-manager/home-manager:431
+msgid "The file %s already exists, leaving it unchanged..."
+msgstr ""
+
+#: home-manager/home-manager:329 home-manager/home-manager:433
+msgid "Creating %s..."
+msgstr ""
+
+#: home-manager/home-manager:475
+msgid "Creating initial Home Manager generation..."
+msgstr ""
+
+#. translators: The "%s" specifier will be replaced by a file path.
+#: home-manager/home-manager:480
+msgid ""
+"All done! The home-manager tool should now be installed and you can edit\n"
+"\n"
+" %s\n"
+"\n"
+"to configure Home Manager. Run 'man home-configuration.nix' to\n"
+"see all available options."
+msgstr ""
+
+#. translators: The "%s" specifier will be replaced by a URL.
+#: home-manager/home-manager:485
+msgid ""
+"Uh oh, the installation failed! Please create an issue at\n"
+"\n"
+" %s\n"
+"\n"
+"if the error seems to be the fault of Home Manager."
+msgstr ""
+
+#. translators: Here "flake" is a noun that refers to the Nix Flakes feature.
+#: home-manager/home-manager:496
+msgid "Can't instantiate a flake configuration"
+msgstr ""
+
+#: home-manager/home-manager:572
+msgid ""
+"There is %d unread and relevant news item.\n"
+"Read it by running the command \"%s news\"."
+msgid_plural ""
+"There are %d unread and relevant news items.\n"
+"Read them by running the command \"%s news\"."
+msgstr[0] ""
+msgstr[1] ""
+
+#: home-manager/home-manager:586
+msgid "Unknown \"news.display\" setting \"%s\"."
+msgstr ""
+
+#: home-manager/home-manager:594
+#, sh-format
+msgid "Please set the $EDITOR or $VISUAL environment variable"
+msgstr ""
+
+#: home-manager/home-manager:612
+msgid "Cannot run build in read-only directory"
+msgstr ""
+
+#: home-manager/home-manager:693
+msgid "No generation with ID %s"
+msgstr ""
+
+#: home-manager/home-manager:695
+msgid "Cannot remove the current generation %s"
+msgstr ""
+
+#: home-manager/home-manager:697
+msgid "Removing generation %s"
+msgstr ""
+
+#: home-manager/home-manager:718
+msgid "No generations to expire"
+msgstr ""
+
+#: home-manager/home-manager:729
+msgid "No home-manager packages seem to be installed."
+msgstr ""
+
+#: home-manager/home-manager:811
+msgid "Unknown argument %s"
+msgstr ""
+
+#: home-manager/home-manager:835
+msgid "This will remove Home Manager from your system."
+msgstr ""
+
+#: home-manager/home-manager:838
+msgid "This is a dry run, nothing will actually be uninstalled."
+msgstr ""
+
+#: home-manager/home-manager:842
+msgid "Really uninstall Home Manager?"
+msgstr ""
+
+#: home-manager/home-manager:848
+msgid "Switching to empty Home Manager configuration..."
+msgstr ""
+
+#: home-manager/home-manager:863
+msgid "Yay!"
+msgstr ""
+
+#: home-manager/home-manager:868
+msgid "Home Manager is uninstalled but your home.nix is left untouched."
+msgstr ""
+
+#: home-manager/home-manager:1091
+msgid "expire-generations expects one argument, got %d."
+msgstr ""
+
+#: home-manager/home-manager:1113
+msgid "Unknown command: %s"
+msgstr ""
+
+#: home-manager/install.nix:18
+msgid "This derivation is not buildable, please run it using nix-shell."
+msgstr ""
diff --git a/home-manager/po/hu.po b/home-manager/po/hu.po
new file mode 100644
index 000000000000..a127cf1b0c03
--- /dev/null
+++ b/home-manager/po/hu.po
@@ -0,0 +1,221 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR Home Manager contributors
+# This file is distributed under the same license as the Home Manager package.
+# FIRST AUTHOR , 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: 2024-04-17 23:19+0200\n"
+"PO-Revision-Date: 2024-07-05 14:09+0000\n"
+"Last-Translator: Ferenci Ákos \n"
+"Language-Team: Hungarian \n"
+"Language: hu\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.7-dev\n"
+
+#. translators: For example: "home-manager: missing argument for --cores"
+#: home-manager/home-manager:16
+msgid "%s: missing argument for %s"
+msgstr "%s: hiányzó érték erre: %s"
+
+#: home-manager/home-manager:64
+msgid "No configuration file found at %s"
+msgstr "Nincs konfigurációs fájl itt: %s"
+
+#. translators: The first '%s' specifier will be replaced by either
+#. 'home.nix' or 'flake.nix'.
+#: home-manager/home-manager:81 home-manager/home-manager:85
+#: home-manager/home-manager:184
+msgid ""
+"Keeping your Home Manager %s in %s is deprecated,\n"
+"please move it to %s"
+msgstr ""
+"A Home Manager %s %s elérési úton való tárolása elavult. Kérem helyezze át a "
+"%s elérési úthoz"
+
+#: home-manager/home-manager:92
+msgid "No configuration file found. Please create one at %s"
+msgstr ""
+"Nem található konfigurációs fájl. Kérem hozza létre a fájlt a %s elérési úton"
+
+#: home-manager/home-manager:107
+msgid "Home Manager not found at %s."
+msgstr "Home Manager nem található a %s elérési úton."
+
+#. 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:115
+msgid ""
+"The fallback Home Manager path %s has been deprecated and a file/directory "
+"was found there."
+msgstr ""
+
+#. 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:118
+msgid ""
+"To remove this warning, do one of the following.\n"
+"\n"
+"1. Explicitly tell Home Manager to use the path, for example by adding\n"
+"\n"
+" { programs.home-manager.path = \"%s\"; }\n"
+"\n"
+" to your configuration.\n"
+"\n"
+" If you import Home Manager directly, you can use the `path` parameter\n"
+"\n"
+" pkgs.callPackage /path/to/home-manager-package { path = \"%s\"; }\n"
+"\n"
+" when calling the Home Manager package.\n"
+"\n"
+"2. Remove the deprecated path.\n"
+"\n"
+" $ rm -r \"%s\""
+msgstr ""
+
+#: home-manager/home-manager:146
+msgid "Sanity checking Nix"
+msgstr ""
+
+#: home-manager/home-manager:166
+msgid "Could not find suitable profile directory, tried %s and %s"
+msgstr ""
+
+#. translators: Here "flake" is a noun that refers to the Nix Flakes feature.
+#: home-manager/home-manager:221
+msgid "Can't inspect options of a flake configuration"
+msgstr ""
+
+#: home-manager/home-manager:296 home-manager/home-manager:319
+#: home-manager/home-manager:1051
+msgid "%s: unknown option '%s'"
+msgstr "%s: ismeretlen opció '%s'"
+
+#: home-manager/home-manager:301 home-manager/home-manager:1052
+msgid "Run '%s --help' for usage help"
+msgstr "Futtasa a '%s --help' parancsot a használattal kapcsolatos segítségért"
+
+#: home-manager/home-manager:327 home-manager/home-manager:431
+msgid "The file %s already exists, leaving it unchanged..."
+msgstr "A fájl %s már létezik és változatlan marad..."
+
+#: home-manager/home-manager:329 home-manager/home-manager:433
+msgid "Creating %s..."
+msgstr "%s létrehozása..."
+
+#: home-manager/home-manager:475
+msgid "Creating initial Home Manager generation..."
+msgstr "Kezdeti Home Manager generáció létrehozása..."
+
+#. translators: The "%s" specifier will be replaced by a file path.
+#: home-manager/home-manager:480
+msgid ""
+"All done! The home-manager tool should now be installed and you can edit\n"
+"\n"
+" %s\n"
+"\n"
+"to configure Home Manager. Run 'man home-configuration.nix' to\n"
+"see all available options."
+msgstr ""
+
+#. translators: The "%s" specifier will be replaced by a URL.
+#: home-manager/home-manager:485
+msgid ""
+"Uh oh, the installation failed! Please create an issue at\n"
+"\n"
+" %s\n"
+"\n"
+"if the error seems to be the fault of Home Manager."
+msgstr ""
+
+#. translators: Here "flake" is a noun that refers to the Nix Flakes feature.
+#: home-manager/home-manager:496
+msgid "Can't instantiate a flake configuration"
+msgstr "Flake konfiguráció nem példányosítható"
+
+#: home-manager/home-manager:572
+msgid ""
+"There is %d unread and relevant news item.\n"
+"Read it by running the command \"%s news\"."
+msgid_plural ""
+"There are %d unread and relevant news items.\n"
+"Read them by running the command \"%s news\"."
+msgstr[0] ""
+msgstr[1] ""
+
+#: home-manager/home-manager:586
+msgid "Unknown \"news.display\" setting \"%s\"."
+msgstr ""
+
+#: home-manager/home-manager:594
+#, sh-format
+msgid "Please set the $EDITOR or $VISUAL environment variable"
+msgstr ""
+
+#: home-manager/home-manager:612
+msgid "Cannot run build in read-only directory"
+msgstr "Build futtatása nem lehetséges csak-olvasható könyvtárban"
+
+#: home-manager/home-manager:693
+msgid "No generation with ID %s"
+msgstr ""
+
+#: home-manager/home-manager:695
+msgid "Cannot remove the current generation %s"
+msgstr ""
+
+#: home-manager/home-manager:697
+msgid "Removing generation %s"
+msgstr "%s generáció eltávolítása"
+
+#: home-manager/home-manager:718
+msgid "No generations to expire"
+msgstr ""
+
+#: home-manager/home-manager:729
+msgid "No home-manager packages seem to be installed."
+msgstr ""
+
+#: home-manager/home-manager:811
+msgid "Unknown argument %s"
+msgstr "Ismeretlen argumentum %s"
+
+#: home-manager/home-manager:835
+msgid "This will remove Home Manager from your system."
+msgstr ""
+
+#: home-manager/home-manager:838
+msgid "This is a dry run, nothing will actually be uninstalled."
+msgstr ""
+
+#: home-manager/home-manager:842
+msgid "Really uninstall Home Manager?"
+msgstr ""
+
+#: home-manager/home-manager:848
+msgid "Switching to empty Home Manager configuration..."
+msgstr ""
+
+#: home-manager/home-manager:863
+msgid "Yay!"
+msgstr "Hurrá!"
+
+#: home-manager/home-manager:868
+msgid "Home Manager is uninstalled but your home.nix is left untouched."
+msgstr ""
+
+#: home-manager/home-manager:1091
+msgid "expire-generations expects one argument, got %d."
+msgstr ""
+
+#: home-manager/home-manager:1113
+msgid "Unknown command: %s"
+msgstr "Ismeretlen parancs: %s"
+
+#: home-manager/install.nix:18
+msgid "This derivation is not buildable, please run it using nix-shell."
+msgstr ""
diff --git a/home-manager/po/pl.po b/home-manager/po/pl.po
index c8fa742f069b..63eeed3f0d6d 100644
--- a/home-manager/po/pl.po
+++ b/home-manager/po/pl.po
@@ -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: 2024-04-17 23:19+0200\n"
-"PO-Revision-Date: 2024-02-16 22:01+0000\n"
-"Last-Translator: Robert Helgesson \n"
+"PO-Revision-Date: 2024-06-17 09:46+0000\n"
+"Last-Translator: Mateusz P \n"
"Language-Team: Polish \n"
"Language: pl\n"
@@ -18,12 +18,12 @@ 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 5.4\n"
+"X-Generator: Weblate 5.6-dev\n"
#. translators: For example: "home-manager: missing argument for --cores"
#: home-manager/home-manager:16
msgid "%s: missing argument for %s"
-msgstr ""
+msgstr "%s: brakuje wartości dla %s"
#: home-manager/home-manager:64
msgid "No configuration file found at %s"
@@ -194,7 +194,7 @@ msgstr "Nieznane ustawienie „%s” „news.display”."
#: home-manager/home-manager:594
#, sh-format
msgid "Please set the $EDITOR or $VISUAL environment variable"
-msgstr ""
+msgstr "Proszę ustawić zmienną środowiskową $EDITOR lub $VISUAL"
#: home-manager/home-manager:612
msgid "Cannot run build in read-only directory"
diff --git a/modules/accounts/email.nix b/modules/accounts/email.nix
index 8657c4cbd310..f3996195d2dc 100644
--- a/modules/accounts/email.nix
+++ b/modules/accounts/email.nix
@@ -493,13 +493,14 @@ in {
maildirBasePath = mkOption {
type = types.str;
default = "${config.home.homeDirectory}/Maildir";
- defaultText = "$HOME/Maildir";
+ defaultText = "Maildir";
apply = p:
if hasPrefix "/" p then p else "${config.home.homeDirectory}/${p}";
description = ''
The base directory for account maildir directories. May be a
- relative path, in which case it is relative the home
- directory.
+ relative path (e.g. the user setting this value as "MyMaildir"),
+ in which case it is relative the home directory (e.g. resulting
+ in "~/MyMaildir").
'';
};
diff --git a/modules/lib/maintainers.nix b/modules/lib/maintainers.nix
index b5175a87510a..f1a818155817 100644
--- a/modules/lib/maintainers.nix
+++ b/modules/lib/maintainers.nix
@@ -113,6 +113,13 @@
github = "jack5079";
githubId = 29169102;
};
+ janik = {
+ name = "Janik";
+ email = "janik@aq0.de";
+ matrix = "@janik0:matrix.org";
+ github = "Janik-Haag";
+ githubId = 80165193;
+ };
jkarlson = {
email = "jekarlson@gmail.com";
github = "jkarlson";
@@ -173,6 +180,13 @@
github = "iosmanthus";
githubId = 16307070;
};
+ jonringer = {
+ email = "jonringer117@gmail.com";
+ matrix = "@jonringer:matrix.org";
+ github = "jonringer";
+ githubId = 7673602;
+ name = "Jonathan Ringer";
+ };
kalhauge = {
name = "Christian Gram Kalhauge";
email = "kalhauge@users.noreply.github.com";
@@ -201,6 +215,19 @@
github = "kubukoz";
githubId = 894884;
};
+ lheckemann = {
+ name = "Linus Heckemann";
+ email = "git@sphalerite.org";
+ github = "lheckemann";
+ githubId = 341954;
+ };
+ lilyinstarlight = {
+ email = "lily@lily.flowers";
+ matrix = "@lily:lily.flowers";
+ github = "lilyinstarlight";
+ githubId = 298109;
+ name = "Lily Foster";
+ };
loicreynier = {
name = "Loïc Reynier";
email = "loic@loireynier.fr";
diff --git a/modules/misc/gtk.nix b/modules/misc/gtk.nix
index 6454eb2aeb66..e1ae250fd073 100644
--- a/modules/misc/gtk.nix
+++ b/modules/misc/gtk.nix
@@ -221,10 +221,9 @@ in {
config = mkIf cfg.enable (let
gtkIni = optionalAttrs (cfg.font != null) {
- gtk-font-name = let
- fontSize =
- optionalString (cfg.font.size != null) " ${toString cfg.font.size}";
- in "${cfg.font.name}" + fontSize;
+ gtk-font-name =
+ let fontSize = if cfg.font.size != null then cfg.font.size else 10;
+ in "${cfg.font.name} ${toString fontSize}";
} // optionalAttrs (cfg.theme != null) { gtk-theme-name = cfg.theme.name; }
// optionalAttrs (cfg.iconTheme != null) {
gtk-icon-theme-name = cfg.iconTheme.name;
@@ -245,10 +244,9 @@ in {
'' + cfg4.extraCss;
dconfIni = optionalAttrs (cfg.font != null) {
- font-name = let
- fontSize =
- optionalString (cfg.font.size != null) " ${toString cfg.font.size}";
- in "${cfg.font.name}" + fontSize;
+ font-name =
+ let fontSize = if cfg.font.size != null then cfg.font.size else 10;
+ in "${cfg.font.name} ${toString fontSize}";
} // optionalAttrs (cfg.theme != null) { gtk-theme = cfg.theme.name; }
// optionalAttrs (cfg.iconTheme != null) {
icon-theme = cfg.iconTheme.name;
diff --git a/modules/misc/news.nix b/modules/misc/news.nix
index 2164d66a5bfb..bef867bb4ada 100644
--- a/modules/misc/news.nix
+++ b/modules/misc/news.nix
@@ -1656,6 +1656,53 @@ in {
See https://codeberg.org/dnkl/yambar for more.
'';
}
+
+ {
+ time = "2024-05-25T14:36:03+00:00";
+ message = ''
+ Multiple new options are available:
+
+ - 'nix.nixPath'
+ - 'nix.keepOldNixPath'
+ - 'nix.channels'
+ '';
+ }
+
+ {
+ time = "2024-06-22T05:49:48+00:00";
+ condition = hostPlatform.isLinux;
+ message = ''
+ A new module is available: 'services.blanket'.
+
+ Blanket is a program you can use to improve your focus and increase
+ your productivity by listening to different sounds. See
+ https://github.com/rafaelmardojai/blanket for more.
+ '';
+ }
+
+ {
+ time = "2024-06-26T07:07:17+00:00";
+ condition = with config.programs.yazi;
+ enable && (enableBashIntegration || enableZshIntegration
+ || enableFishIntegration || enableNushellIntegration);
+ message = ''
+ Yazi's shell integration wrappers have been renamed from 'ya' to 'yy'.
+
+ A new option `programs.yazi.shellWrapperName` is also available that
+ allows you to override this name.
+ '';
+ }
+
+ {
+ time = "2024-06-28T14:18:16+00:00";
+ condition = hostPlatform.isLinux;
+ message = ''
+ A new module is available: 'services.glance'.
+
+ Glance is a self-hosted dashboard that puts all your feeds in
+ one place. See https://github.com/glanceapp/glance for more.
+ '';
+ }
];
};
}
diff --git a/modules/misc/nix.nix b/modules/misc/nix.nix
index a4456946e567..2daa56b237b3 100644
--- a/modules/misc/nix.nix
+++ b/modules/misc/nix.nix
@@ -1,15 +1,40 @@
{ config, lib, pkgs, ... }:
-with lib;
-
let
+ inherit (lib)
+ boolToString concatStringsSep escape floatToString getVersion isBool
+ isConvertibleWithToString isDerivation isFloat isInt isList isString
+ literalExpression maintainers mapAttrsToList mkDefault mkEnableOption mkIf
+ mkMerge mkOption optionalString toPretty types versionAtLeast;
+
cfg = config.nix;
nixPackage = cfg.package;
isNixAtLeast = versionAtLeast (getVersion nixPackage);
+ nixPath = concatStringsSep ":" cfg.nixPath;
+
+ useXdg = config.nix.enable
+ && (config.nix.settings.use-xdg-base-directories or false);
+ defexprDir = if useXdg then
+ "${config.xdg.stateHome}/nix/defexpr"
+ else
+ "${config.home.homeDirectory}/.nix-defexpr";
+
+ # The deploy path for declarative channels. The directory name is prefixed
+ # with a number to make it easier for files in defexprDir to control the order
+ # they'll be read relative to each other.
+ channelPath = "${defexprDir}/50-home-manager";
+
+ channelsDrv = let
+ mkEntry = name: drv: {
+ inherit name;
+ path = toString drv;
+ };
+ in pkgs.linkFarm "channels" (lib.mapAttrsToList mkEntry cfg.channels);
+
nixConf = assert isNixAtLeast "2.2";
let
@@ -102,6 +127,47 @@ in {
'';
};
+ nixPath = mkOption {
+ type = types.listOf types.str;
+ default = [ ];
+ example = [
+ "$HOME/.nix-defexpr/channels"
+ "darwin-config=$HOME/.config/nixpkgs/darwin-configuration.nix"
+ ];
+ description = ''
+ Adds new directories to the Nix expression search path.
+
+ Used by Nix when looking up paths in angular brackets
+ (e.g. ``).
+ '';
+ };
+
+ keepOldNixPath = mkOption {
+ type = types.bool;
+ default = true;
+ example = false;
+ description = ''
+ Whether {option}`nix.nixPath` should keep the previously set values in
+ {env}`NIX_PATH`.
+ '';
+ };
+
+ channels = lib.mkOption {
+ type = with lib.types; attrsOf package;
+ default = { };
+ example = lib.literalExpression "{ inherit nixpkgs; }";
+ description = ''
+ A declarative alternative to Nix channels. Whereas with stock channels,
+ you would register URLs and fetch them into the Nix store with
+ {manpage}`nix-channel(1)`, this option allows you to register the store
+ path directly. One particularly useful example is registering flake
+ inputs as channels.
+
+ This option can coexist with stock Nix channels. If the same channel is
+ defined in both, this option takes precedence.
+ '';
+ };
+
registry = mkOption {
type = types.attrsOf (types.submodule (let
inputAttrs = types.attrsOf
@@ -210,6 +276,19 @@ in {
};
config = mkIf cfg.enable (mkMerge [
+ (mkIf (cfg.nixPath != [ ] && !cfg.keepOldNixPath) {
+ home.sessionVariables.NIX_PATH = "${nixPath}";
+ })
+
+ (mkIf (cfg.nixPath != [ ] && cfg.keepOldNixPath) {
+ home.sessionVariables.NIX_PATH = "${nixPath}\${NIX_PATH:+:$NIX_PATH}";
+ })
+
+ (lib.mkIf (cfg.channels != { }) {
+ nix.nixPath = [ channelPath ];
+ home.file."${channelPath}".source = channelsDrv;
+ })
+
(mkIf (cfg.registry != { }) {
xdg.configFile."nix/registry.json".source =
jsonFormat.generate "registry.json" {
diff --git a/modules/misc/xdg-desktop-entries.nix b/modules/misc/xdg-desktop-entries.nix
index 7ec7fa56888c..1aab6ffe7276 100644
--- a/modules/misc/xdg-desktop-entries.nix
+++ b/modules/misc/xdg-desktop-entries.nix
@@ -51,7 +51,7 @@ let
terminal = mkOption {
description = "Whether the program runs in a terminal window.";
- type = types.bool;
+ type = types.nullOr types.bool;
default = false;
};
diff --git a/modules/modules.nix b/modules/modules.nix
index 4e1f0e201ada..dbeebfbf7c9a 100644
--- a/modules/modules.nix
+++ b/modules/modules.nix
@@ -274,6 +274,7 @@ let
./services/barrier.nix
./services/batsignal.nix
./services/betterlockscreen.nix
+ ./services/blanket.nix
./services/blueman-applet.nix
./services/borgmatic.nix
./services/cachix-agent.nix
@@ -300,6 +301,7 @@ let
./services/fusuma.nix
./services/getmail.nix
./services/git-sync.nix
+ ./services/glance.nix
./services/gnome-keyring.nix
./services/gpg-agent.nix
./services/grobi.nix
diff --git a/modules/po/ar.po b/modules/po/ar.po
new file mode 100644
index 000000000000..c2469fa54d17
--- /dev/null
+++ b/modules/po/ar.po
@@ -0,0 +1,113 @@
+# 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 , 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: 2024-04-17 23:19+0200\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"Language: ar\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: modules/files.nix:191
+msgid "Creating home file links in %s"
+msgstr ""
+
+#: modules/files.nix:204
+msgid "Cleaning up orphan links from %s"
+msgstr ""
+
+#: modules/files.nix:220
+msgid "Creating profile generation %s"
+msgstr ""
+
+#: modules/files.nix:237
+msgid "No change so reusing latest profile generation %s"
+msgstr ""
+
+#: modules/home-environment.nix:634
+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:667
+msgid "Activating %s"
+msgstr ""
+
+#: modules/lib-bash/activation-init.sh:22
+msgid "Migrating profile from %s to %s"
+msgstr ""
+
+#: modules/lib-bash/activation-init.sh:54
+msgid "Could not find suitable profile directory, tried %s and %s"
+msgstr ""
+
+#: modules/lib-bash/activation-init.sh:83
+msgid "Sanity checking oldGenNum and oldGenPath"
+msgstr ""
+
+#: modules/lib-bash/activation-init.sh:86
+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:127
+msgid "Error: USER is set to \"%s\" but we expect \"%s\""
+msgstr ""
+
+#: modules/lib-bash/activation-init.sh:136
+msgid "Error: HOME is set to \"%s\" but we expect \"%s\""
+msgstr ""
+
+#: modules/lib-bash/activation-init.sh:153
+msgid "Starting Home Manager activation"
+msgstr ""
+
+#: modules/lib-bash/activation-init.sh:157
+msgid "Sanity checking Nix"
+msgstr ""
+
+#: modules/lib-bash/activation-init.sh:170
+msgid "This is a dry run"
+msgstr ""
+
+#: modules/lib-bash/activation-init.sh:174
+msgid "This is a live run"
+msgstr ""
+
+#: modules/lib-bash/activation-init.sh:180
+msgid "Using Nix version: %s"
+msgstr ""
+
+#: modules/lib-bash/activation-init.sh:183
+msgid "Activation variables:"
+msgstr ""
diff --git a/modules/po/hu.po b/modules/po/hu.po
new file mode 100644
index 000000000000..b52c62933764
--- /dev/null
+++ b/modules/po/hu.po
@@ -0,0 +1,113 @@
+# 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 , 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: 2024-04-17 23:19+0200\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"Language: hu\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: modules/files.nix:191
+msgid "Creating home file links in %s"
+msgstr ""
+
+#: modules/files.nix:204
+msgid "Cleaning up orphan links from %s"
+msgstr ""
+
+#: modules/files.nix:220
+msgid "Creating profile generation %s"
+msgstr ""
+
+#: modules/files.nix:237
+msgid "No change so reusing latest profile generation %s"
+msgstr ""
+
+#: modules/home-environment.nix:634
+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:667
+msgid "Activating %s"
+msgstr ""
+
+#: modules/lib-bash/activation-init.sh:22
+msgid "Migrating profile from %s to %s"
+msgstr ""
+
+#: modules/lib-bash/activation-init.sh:54
+msgid "Could not find suitable profile directory, tried %s and %s"
+msgstr ""
+
+#: modules/lib-bash/activation-init.sh:83
+msgid "Sanity checking oldGenNum and oldGenPath"
+msgstr ""
+
+#: modules/lib-bash/activation-init.sh:86
+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:127
+msgid "Error: USER is set to \"%s\" but we expect \"%s\""
+msgstr ""
+
+#: modules/lib-bash/activation-init.sh:136
+msgid "Error: HOME is set to \"%s\" but we expect \"%s\""
+msgstr ""
+
+#: modules/lib-bash/activation-init.sh:153
+msgid "Starting Home Manager activation"
+msgstr ""
+
+#: modules/lib-bash/activation-init.sh:157
+msgid "Sanity checking Nix"
+msgstr ""
+
+#: modules/lib-bash/activation-init.sh:170
+msgid "This is a dry run"
+msgstr ""
+
+#: modules/lib-bash/activation-init.sh:174
+msgid "This is a live run"
+msgstr ""
+
+#: modules/lib-bash/activation-init.sh:180
+msgid "Using Nix version: %s"
+msgstr ""
+
+#: modules/lib-bash/activation-init.sh:183
+msgid "Activation variables:"
+msgstr ""
diff --git a/modules/po/pl.po b/modules/po/pl.po
index 0e88a781aeab..6ce24f50fecd 100644
--- a/modules/po/pl.po
+++ b/modules/po/pl.po
@@ -8,17 +8,17 @@ msgstr ""
"Project-Id-Version: Home Manager Modules\n"
"Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n"
"POT-Creation-Date: 2024-04-17 23:19+0200\n"
-"PO-Revision-Date: 2023-05-03 19:48+0000\n"
-"Last-Translator: Eryk Michalak \n"
+"PO-Revision-Date: 2024-06-17 09:46+0000\n"
+"Last-Translator: Mateusz P \n"
"Language-Team: Polish \n"
"Language: pl\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=3; plural=n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
-"|| n%100>=20) ? 1 : 2;\n"
-"X-Generator: Weblate 4.18-dev\n"
+"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 5.6-dev\n"
#: modules/files.nix:191
msgid "Creating home file links in %s"
@@ -112,10 +112,14 @@ msgstr ""
#: modules/lib-bash/activation-init.sh:127
msgid "Error: USER is set to \"%s\" but we expect \"%s\""
msgstr ""
+"Błąd: Właściwość USER ma wartość \"%s\" podczas gdy spodziewana wartość to \""
+"%s\""
#: modules/lib-bash/activation-init.sh:136
msgid "Error: HOME is set to \"%s\" but we expect \"%s\""
msgstr ""
+"Błąd: Właściwość HOME ma wartość \"%s\" podczas gdy spodziewana wartość to \""
+"%s\""
#: modules/lib-bash/activation-init.sh:153
msgid "Starting Home Manager activation"
diff --git a/modules/programs/atuin.nix b/modules/programs/atuin.nix
index bd907ac03247..a27bcf8601f9 100644
--- a/modules/programs/atuin.nix
+++ b/modules/programs/atuin.nix
@@ -110,18 +110,18 @@ in {
programs.bash.initExtra = mkIf cfg.enableBashIntegration ''
if [[ :$SHELLOPTS: =~ :(vi|emacs): ]]; then
source "${pkgs.bash-preexec}/share/bash/bash-preexec.sh"
- eval "$(${cfg.package}/bin/atuin init bash ${flagsStr})"
+ eval "$(${lib.getExe cfg.package} init bash ${flagsStr})"
fi
'';
programs.zsh.initExtra = mkIf cfg.enableZshIntegration ''
if [[ $options[zle] = on ]]; then
- eval "$(${cfg.package}/bin/atuin init zsh ${flagsStr})"
+ eval "$(${lib.getExe cfg.package} init zsh ${flagsStr})"
fi
'';
programs.fish.interactiveShellInit = mkIf cfg.enableFishIntegration ''
- ${cfg.package}/bin/atuin init fish ${flagsStr} | source
+ ${lib.getExe cfg.package} init fish ${flagsStr} | source
'';
programs.nushell = mkIf cfg.enableNushellIntegration {
@@ -130,7 +130,9 @@ in {
if not ($atuin_cache | path exists) {
mkdir $atuin_cache
}
- ${cfg.package}/bin/atuin init nu ${flagsStr} | save --force ${config.xdg.cacheHome}/atuin/init.nu
+ ${
+ lib.getExe cfg.package
+ } init nu ${flagsStr} | save --force ${config.xdg.cacheHome}/atuin/init.nu
'';
extraConfig = ''
source ${config.xdg.cacheHome}/atuin/init.nu
diff --git a/modules/programs/direnv.nix b/modules/programs/direnv.nix
index add2c8fca899..4a763670537c 100644
--- a/modules/programs/direnv.nix
+++ b/modules/programs/direnv.nix
@@ -95,6 +95,7 @@ in {
package = mkPackageOption pkgs "nix-direnv" { };
};
+ silent = mkEnableOption "silent mode, that is, disabling direnv logging";
};
config = mkIf cfg.enable {
@@ -163,5 +164,7 @@ in {
}
)
'');
+
+ home.sessionVariables = lib.mkIf cfg.silent { DIRENV_LOG_FORMAT = ""; };
};
}
diff --git a/modules/programs/gh-dash.nix b/modules/programs/gh-dash.nix
index 69d5482b6ad7..b351bb33a052 100644
--- a/modules/programs/gh-dash.nix
+++ b/modules/programs/gh-dash.nix
@@ -7,7 +7,7 @@ let
yamlFormat = pkgs.formats.yaml { };
in {
- meta.maintainers = [ lib.maintainers.janik ];
+ meta.maintainers = [ lib.hm.maintainers.janik ];
options.programs.gh-dash = {
enable = lib.mkEnableOption "GitHub CLI dashboard plugin";
diff --git a/modules/programs/hyfetch.nix b/modules/programs/hyfetch.nix
index 726bc94e63b7..485ceb046515 100644
--- a/modules/programs/hyfetch.nix
+++ b/modules/programs/hyfetch.nix
@@ -7,7 +7,7 @@ let
jsonFormat = pkgs.formats.json { };
in {
- meta.maintainers = [ maintainers.lilyinstarlight ];
+ meta.maintainers = [ hm.maintainers.lilyinstarlight ];
options.programs.hyfetch = {
enable = mkEnableOption "hyfetch";
diff --git a/modules/programs/mpv.nix b/modules/programs/mpv.nix
index 26cad11128c6..f2664e71a6ca 100644
--- a/modules/programs/mpv.nix
+++ b/modules/programs/mpv.nix
@@ -55,8 +55,10 @@ let
mpvPackage = if cfg.scripts == [ ] then
cfg.package
+ else if hasAttr "wrapMpv" pkgs then
+ pkgs.wrapMpv pkgs.mpv-unwrapped { scripts = cfg.scripts; }
else
- pkgs.wrapMpv pkgs.mpv-unwrapped { scripts = cfg.scripts; };
+ pkgs.mpv.override { scripts = cfg.scripts; };
in {
options = {
@@ -227,5 +229,5 @@ in {
}
]);
- meta.maintainers = with maintainers; [ tadeokondrak thiagokokada chuangzhu ];
+ meta.maintainers = with maintainers; [ thiagokokada chuangzhu ];
}
diff --git a/modules/programs/rbw.nix b/modules/programs/rbw.nix
index 5dd751d07ce4..b7381c67208d 100644
--- a/modules/programs/rbw.nix
+++ b/modules/programs/rbw.nix
@@ -19,7 +19,7 @@ let
base_url = mkOption {
type = with types; nullOr str;
default = null;
- example = "bitwarden.example.com";
+ example = "https://bitwarden.example.com/";
description =
"The base-url for a self-hosted bitwarden installation.";
};
@@ -27,7 +27,7 @@ let
identity_url = mkOption {
type = with types; nullOr str;
default = null;
- example = "identity.example.com";
+ example = "https://identity.example.com/";
description = "The identity url for your bitwarden installation.";
};
diff --git a/modules/programs/script-directory.nix b/modules/programs/script-directory.nix
index 9f5abf65a414..bd6b3b40138e 100644
--- a/modules/programs/script-directory.nix
+++ b/modules/programs/script-directory.nix
@@ -1,7 +1,7 @@
{ config, pkgs, lib, ... }:
let cfg = config.programs.script-directory;
in {
- meta.maintainers = [ lib.maintainers.janik ];
+ meta.maintainers = [ lib.hm.maintainers.janik ];
options.programs.script-directory = {
enable = lib.mkEnableOption "script-directory";
diff --git a/modules/programs/sm64ex.nix b/modules/programs/sm64ex.nix
index 35d608baba9a..23b75808fc3e 100644
--- a/modules/programs/sm64ex.nix
+++ b/modules/programs/sm64ex.nix
@@ -29,7 +29,7 @@ let
in "${key} ${generatedValue}";
in {
- meta.maintainers = [ maintainers.ivar ];
+ meta.maintainers = [ ];
options.programs.sm64ex = {
enable = mkEnableOption "sm64ex";
diff --git a/modules/programs/starship.nix b/modules/programs/starship.nix
index f253fa7f07cf..9ccff7fcfda0 100644
--- a/modules/programs/starship.nix
+++ b/modules/programs/starship.nix
@@ -24,14 +24,7 @@ in {
};
settings = mkOption {
- type = with types;
- let
- prim = either bool (either int str);
- primOrPrimAttrs = either prim (attrsOf prim);
- entry = either prim (listOf primOrPrimAttrs);
- entryOrAttrsOf = t: either entry (attrsOf t);
- entries = entryOrAttrsOf (entryOrAttrsOf entry);
- in attrsOf entries // { description = "Starship configuration"; };
+ type = tomlFormat.type;
default = { };
example = literalExpression ''
{
diff --git a/modules/programs/waybar.nix b/modules/programs/waybar.nix
index 9925effc926a..72d247323fb8 100644
--- a/modules/programs/waybar.nix
+++ b/modules/programs/waybar.nix
@@ -69,8 +69,8 @@ let
};
modules-left = mkOption {
- type = listOf str;
- default = [ ];
+ type = nullOr (listOf str);
+ default = null;
description = "Modules that will be displayed on the left.";
example = literalExpression ''
[ "sway/workspaces" "sway/mode" "wlr/taskbar" ]
@@ -78,8 +78,8 @@ let
};
modules-center = mkOption {
- type = listOf str;
- default = [ ];
+ type = nullOr (listOf str);
+ default = null;
description = "Modules that will be displayed in the center.";
example = literalExpression ''
[ "sway/window" ]
@@ -87,8 +87,8 @@ let
};
modules-right = mkOption {
- type = listOf str;
- default = [ ];
+ type = nullOr (listOf str);
+ default = null;
description = "Modules that will be displayed on the right.";
example = literalExpression ''
[ "mpd" "custom/mymodule#with-css-id" "temperature" ]
diff --git a/modules/programs/yazi.nix b/modules/programs/yazi.nix
index 11f4e75cf11f..d7b880200d62 100644
--- a/modules/programs/yazi.nix
+++ b/modules/programs/yazi.nix
@@ -7,7 +7,7 @@ let
tomlFormat = pkgs.formats.toml { };
bashIntegration = ''
- function ya() {
+ function ${cfg.shellWrapperName}() {
local tmp="$(mktemp -t "yazi-cwd.XXXXX")"
yazi "$@" --cwd-file="$tmp"
if cwd="$(cat -- "$tmp")" && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then
@@ -18,7 +18,7 @@ let
'';
fishIntegration = ''
- function ya
+ function ${cfg.shellWrapperName}
set tmp (mktemp -t "yazi-cwd.XXXXX")
yazi $argv --cwd-file="$tmp"
if set cwd (cat -- "$tmp"); and [ -n "$cwd" ]; and [ "$cwd" != "$PWD" ]
@@ -29,7 +29,7 @@ let
'';
nushellIntegration = ''
- def --env ya [...args] {
+ def --env ${cfg.shellWrapperName} [...args] {
let tmp = (mktemp -t "yazi-cwd.XXXXX")
yazi ...$args --cwd-file $tmp
let cwd = (open $tmp)
@@ -40,13 +40,22 @@ let
}
'';
in {
- meta.maintainers = with maintainers; [ xyenon ];
+ meta.maintainers = with maintainers; [ xyenon eljamm ];
options.programs.yazi = {
enable = mkEnableOption "yazi";
package = mkPackageOption pkgs "yazi" { };
+ shellWrapperName = mkOption {
+ type = types.str;
+ default = "yy";
+ example = "y";
+ description = ''
+ Name of the shell wrapper to be called.
+ '';
+ };
+
enableBashIntegration = mkEnableOption "Bash integration";
enableZshIntegration = mkEnableOption "Zsh integration";
@@ -132,7 +141,7 @@ in {
};
initLua = mkOption {
- type = with types; nullOr path;
+ type = with types; nullOr (either path lines);
default = null;
description = ''
The init.lua for Yazi itself.
@@ -145,8 +154,11 @@ in {
default = { };
description = ''
Lua plugins.
+ Values should be a package or path containing an `init.lua` file.
+ Will be linked to {file}`$XDG_CONFIG_HOME/yazi/plugins/.yazi`.
- See https://yazi-rs.github.io/docs/plugins/overview/ for documentation.
+ See
+ for documentation.
'';
example = literalExpression ''
{
@@ -161,8 +173,10 @@ in {
default = { };
description = ''
Pre-made themes.
+ Values should be a package or path containing the required files.
+ Will be linked to {file}`$XDG_CONFIG_HOME/yazi/flavors/.yazi`.
- See https://yazi-rs.github.io/docs/flavors/overview/ for documentation.
+ See for documentation.
'';
example = literalExpression ''
{
@@ -171,7 +185,6 @@ in {
}
'';
};
-
};
config = mkIf cfg.enable {
@@ -197,11 +210,69 @@ in {
"yazi/theme.toml" = mkIf (cfg.theme != { }) {
source = tomlFormat.generate "yazi-theme" cfg.theme;
};
- "yazi/init.lua" = mkIf (cfg.initLua != null) { source = cfg.initLua; };
- } // (mapAttrs'
- (name: value: nameValuePair "yazi/plugins/${name}" { source = value; })
- cfg.plugins) // (mapAttrs'
- (name: value: nameValuePair "yazi/flavors/${name}" { source = value; })
- cfg.flavors);
+ "yazi/init.lua" = mkIf (cfg.initLua != null)
+ (if builtins.isPath cfg.initLua then {
+ source = cfg.initLua;
+ } else {
+ text = cfg.initLua;
+ });
+ } // (mapAttrs' (name: value:
+ nameValuePair "yazi/flavors/${name}.yazi" { source = value; })
+ cfg.flavors) // (mapAttrs' (name: value:
+ nameValuePair "yazi/plugins/${name}.yazi" { source = value; })
+ cfg.plugins);
+
+ warnings = filter (s: s != "") (concatLists [
+ (mapAttrsToList (name: value:
+ optionalString (hasSuffix ".yazi" name) ''
+ Flavors like `programs.yazi.flavors."${name}"` should no longer have the suffix ".yazi" in their attribute name.
+ The flavor will be linked to `$XDG_CONFIG_HOME/yazi/flavors/${name}.yazi`.
+ You probably want to rename it to `programs.yazi.flavors."${
+ removeSuffix ".yazi" name
+ }"`.
+ '') cfg.flavors)
+ (mapAttrsToList (name: value:
+ optionalString (hasSuffix ".yazi" name) ''
+ Plugins like `programs.yazi.plugins."${name}"` should no longer have the suffix ".yazi" in their attribute name.
+ The plugin will be linked to `$XDG_CONFIG_HOME/yazi/plugins/${name}.yazi`.
+ You probably want to rename it to `programs.yazi.plugins."${
+ removeSuffix ".yazi" name
+ }"`.
+ '') cfg.plugins)
+ ]);
+
+ assertions = let
+ mkAsserts = opt: requiredFiles:
+ mapAttrsToList (name: value:
+ let
+ isDir = pathIsDirectory "${value}";
+ msgNotDir = optionalString (!isDir)
+ "The path or package should be a directory, not a single file.";
+ isFileMissing = file:
+ !(pathExists "${value}/${file}")
+ || pathIsDirectory "${value}/${file}";
+ missingFiles = filter isFileMissing requiredFiles;
+ msgFilesMissing = optionalString (missingFiles != [ ])
+ "The ${singularOpt} is missing these files: ${
+ toString missingFiles
+ }";
+ singularOpt = removeSuffix "s" opt;
+ in {
+ assertion = isDir && missingFiles == [ ];
+ message = ''
+ Value at `programs.yazi.${opt}.${name}` is not a valid yazi ${singularOpt}.
+ ${msgNotDir}
+ ${msgFilesMissing}
+ Evaluated value: `${value}`
+ '';
+ }) cfg.${opt};
+ in (mkAsserts "flavors" [
+ "flavor.toml"
+ "tmtheme.xml"
+ "README.md"
+ "preview.png"
+ "LICENSE"
+ "LICENSE-tmtheme"
+ ]) ++ (mkAsserts "plugins" [ "init.lua" ]);
};
}
diff --git a/modules/services/blanket.nix b/modules/services/blanket.nix
new file mode 100644
index 000000000000..5eeb2ab1e150
--- /dev/null
+++ b/modules/services/blanket.nix
@@ -0,0 +1,40 @@
+{ pkgs, lib, config, ... }:
+
+let
+ cfg = config.services.blanket;
+
+ inherit (lib) mkIf mkEnableOption mkPackageOption hm platforms;
+in {
+ meta.maintainers = [ lib.maintainers.daru-san ];
+
+ options.services.blanket = {
+ enable = mkEnableOption "blanket";
+
+ package = mkPackageOption pkgs "blanket" { };
+ };
+
+ config = mkIf cfg.enable {
+ assertions = [
+ (hm.assertions.assertPlatform "services.blanket" pkgs platforms.linux)
+ ];
+
+ home.packages = [ cfg.package ];
+
+ systemd.user.services.blanket = {
+ Unit = {
+ Description = "Blanket daemon";
+ Requires = [ "dbus.service" ];
+ After = [ "graphical-session-pre.target" ];
+ PartOf = [ "graphical-session.target" "pipewire.service" ];
+ };
+
+ Install.WantedBy = [ "graphical-session.target" ];
+
+ Service = {
+ ExecStart = "${cfg.package}/bin/blanket --gapplication-service";
+ Restart = "on-failure";
+ RestartSec = 5;
+ };
+ };
+ };
+}
diff --git a/modules/services/cliphist.nix b/modules/services/cliphist.nix
index 3599557f059f..1877a6de0ff2 100644
--- a/modules/services/cliphist.nix
+++ b/modules/services/cliphist.nix
@@ -1,7 +1,7 @@
{ config, lib, pkgs, ... }:
let cfg = config.services.cliphist;
in {
- meta.maintainers = [ lib.maintainers.janik ];
+ meta.maintainers = [ lib.hm.maintainers.janik ];
options.services.cliphist = {
enable =
diff --git a/modules/services/dunst.nix b/modules/services/dunst.nix
index daa800cf0cd8..bd8c4adfbffd 100644
--- a/modules/services/dunst.nix
+++ b/modules/services/dunst.nix
@@ -172,7 +172,7 @@ in {
mkPath = { basePath, theme, category }:
"${basePath}/share/icons/${theme.name}/${theme.size}/${category}";
- in concatMapStringsSep ":" mkPath (cartesianProductOfSets {
+ in concatMapStringsSep ":" mkPath (cartesianProduct {
basePath = basePaths;
theme = themes;
category = categories;
diff --git a/modules/services/glance.nix b/modules/services/glance.nix
new file mode 100644
index 000000000000..fa4f1a8d70ef
--- /dev/null
+++ b/modules/services/glance.nix
@@ -0,0 +1,77 @@
+{ config, lib, pkgs, ... }:
+
+let
+ cfg = config.services.glance;
+
+ inherit (lib) mkEnableOption mkPackageOption mkOption mkIf getExe;
+
+ settingsFormat = pkgs.formats.yaml { };
+
+ settingsFile = settingsFormat.generate "glance.yml" cfg.settings;
+
+ configFilePath = "${config.xdg.configHome}/glance/glance.yml";
+in {
+ meta.maintainers = [ pkgs.lib.maintainers.gepbird ];
+
+ options.services.glance = {
+ enable = mkEnableOption "glance";
+
+ package = mkPackageOption pkgs "glance" { };
+
+ settings = mkOption {
+ type = settingsFormat.type;
+ default = {
+ pages = [{
+ name = "Calendar";
+ columns = [{
+ size = "full";
+ widgets = [{ type = "calendar"; }];
+ }];
+ }];
+ };
+ example = {
+ server.port = 5678;
+ pages = [{
+ name = "Home";
+ columns = [{
+ size = "full";
+ widgets = [
+ { type = "calendar"; }
+ {
+ type = "weather";
+ location = "London, United Kingdom";
+ }
+ ];
+ }];
+ }];
+ };
+ description = ''
+ Configuration written to a yaml file that is read by glance. See
+
+ for more.
+ '';
+ };
+ };
+
+ config = mkIf cfg.enable {
+ assertions = [
+ (lib.hm.assertions.assertPlatform "services.glance" pkgs
+ lib.platforms.linux)
+ ];
+
+ home.packages = [ cfg.package ];
+
+ xdg.configFile."glance/glance.yml".source = settingsFile;
+
+ systemd.user.services.glance = {
+ Unit = {
+ Description = "Glance feed dashboard server";
+ PartOf = [ "graphical-session.target" ];
+ };
+
+ Install.WantedBy = [ "graphical-session.target" ];
+
+ Service.ExecStart = "${getExe cfg.package} --config ${configFilePath}";
+ };
+ };
+}
diff --git a/modules/services/gnome-keyring.nix b/modules/services/gnome-keyring.nix
index 460e4abd15e6..2cfa33d03852 100644
--- a/modules/services/gnome-keyring.nix
+++ b/modules/services/gnome-keyring.nix
@@ -49,7 +49,7 @@ in {
args = concatStringsSep " " ([ "--start" "--foreground" ]
++ optional (cfg.components != [ ])
("--components=" + concatStringsSep "," cfg.components));
- in "${pkgs.gnome.gnome-keyring}/bin/gnome-keyring-daemon ${args}";
+ in "${pkgs.gnome-keyring}/bin/gnome-keyring-daemon ${args}";
Restart = "on-abort";
};
diff --git a/modules/services/mpd.nix b/modules/services/mpd.nix
index a0011b0213a5..3d8d03be7161 100644
--- a/modules/services/mpd.nix
+++ b/modules/services/mpd.nix
@@ -171,10 +171,17 @@ in {
];
systemd.user.services.mpd = {
- Unit = {
- After = [ "network.target" "sound.target" ];
- Description = "Music Player Daemon";
- };
+ Unit = mkMerge [
+ {
+ Description = "Music Player Daemon";
+ After = [ "network.target" "sound.target" ];
+ }
+
+ (mkIf cfg.network.startWhenNeeded {
+ Requires = [ "mpd.socket" ];
+ After = [ "mpd.socket" ];
+ })
+ ];
Install = mkIf (!cfg.network.startWhenNeeded) {
WantedBy = [ "default.target" ];
diff --git a/modules/services/nix-gc.nix b/modules/services/nix-gc.nix
index 8ac26dfeef93..652c575ac1f8 100644
--- a/modules/services/nix-gc.nix
+++ b/modules/services/nix-gc.nix
@@ -90,6 +90,18 @@ in {
garbage collector is run automatically.
'';
};
+
+ persistent = mkOption {
+ type = types.bool;
+ default = true;
+ example = false;
+ description = ''
+ If true, the time when the service unit was last triggered is
+ stored on disk. When the timer is activated, the service unit is
+ triggered immediately if it would have been triggered at least once
+ during the time when the timer was inactive.
+ '';
+ };
};
};
@@ -107,6 +119,7 @@ in {
Unit = { Description = "Nix Garbage Collector"; };
Timer = {
OnCalendar = "${cfg.frequency}";
+ Persistent = cfg.persistent;
Unit = "nix-gc.service";
};
Install = { WantedBy = [ "timers.target" ]; };
diff --git a/modules/services/pbgopy.nix b/modules/services/pbgopy.nix
index fecc64ca0f4e..3a3499e52007 100644
--- a/modules/services/pbgopy.nix
+++ b/modules/services/pbgopy.nix
@@ -15,7 +15,7 @@ let
"--basic-auth ${escapeShellArg cfg.httpAuth}");
in {
- meta.maintainers = [ maintainers.ivar ];
+ meta.maintainers = [ ];
options.services.pbgopy = {
enable = mkEnableOption "pbgopy";
diff --git a/modules/services/pulseeffects.nix b/modules/services/pulseeffects.nix
index 434adf85e8d9..3edc53499eaf 100644
--- a/modules/services/pulseeffects.nix
+++ b/modules/services/pulseeffects.nix
@@ -9,7 +9,7 @@ let
presetOpts = optionalString (cfg.preset != "") "--load-preset ${cfg.preset}";
in {
- meta.maintainers = [ maintainers.jonringer ];
+ meta.maintainers = [ hm.maintainers.jonringer ];
options.services.pulseeffects = {
enable = mkEnableOption ''
diff --git a/modules/services/ssh-agent.nix b/modules/services/ssh-agent.nix
index 16db3232c6a1..88ecf38b81c2 100644
--- a/modules/services/ssh-agent.nix
+++ b/modules/services/ssh-agent.nix
@@ -5,7 +5,7 @@ let
cfg = config.services.ssh-agent;
in {
- meta.maintainers = [ lib.maintainers.lheckemann ];
+ meta.maintainers = [ lib.hm.maintainers.lheckemann ];
options = {
services.ssh-agent = {
diff --git a/modules/services/stalonetray.nix b/modules/services/stalonetray.nix
index 172d6dd9dcf6..9d4d7a53eee7 100644
--- a/modules/services/stalonetray.nix
+++ b/modules/services/stalonetray.nix
@@ -74,7 +74,7 @@ in {
}
(mkIf (cfg.config != { }) {
- home.file.".stalonetrayrc".text = let
+ xdg.configFile."stalonetrayrc".text = let
valueToString = v:
if isBool v then
(if v then "true" else "false")
@@ -88,7 +88,7 @@ in {
})
(mkIf (cfg.extraConfig != "") {
- home.file.".stalonetrayrc".text = cfg.extraConfig;
+ xdg.configFile."stalonetrayrc".text = cfg.extraConfig;
})
]);
}
diff --git a/modules/services/window-managers/hyprland.nix b/modules/services/window-managers/hyprland.nix
index 6b79248bae21..73602ec61cf3 100644
--- a/modules/services/window-managers/hyprland.nix
+++ b/modules/services/window-managers/hyprland.nix
@@ -40,7 +40,21 @@ in {
];
options.wayland.windowManager.hyprland = {
- enable = lib.mkEnableOption "Hyprland wayland compositor";
+ enable = lib.mkOption {
+ type = lib.types.bool;
+ default = false;
+ description = ''
+ Whether to enable configuration for Hyprland, a tiling Wayland
+ compositor that doesn't sacrifice on its looks.
+
+ ::: {.note}
+ This module configures Hyprland and adds it to your user's {env}`PATH`,
+ but does not make certain system-level changes. NixOS users should
+ enable the NixOS module with {option}`programs.hyprland.enable`, which
+ makes system-level changes such as adding a desktop session entry.
+ :::
+ '';
+ };
package = lib.mkPackageOption pkgs "hyprland" { };
@@ -206,7 +220,10 @@ in {
"You have enabled hyprland.systemd.enable or listed plugins in hyprland.plugins but do not have any configuration in hyprland.settings or hyprland.extraConfig. This is almost certainly a mistake.";
in lib.optional inconsistent warning;
- home.packages = lib.optional (cfg.package != null) cfg.finalPackage;
+ home.packages = lib.concatLists [
+ (lib.optional (cfg.package != null) cfg.finalPackage)
+ (lib.optional (cfg.xwayland.enable) pkgs.xwayland)
+ ];
xdg.configFile."hypr/hyprland.conf" = let
shouldGenerate = cfg.systemd.enable || cfg.extraConfig != ""
diff --git a/modules/services/window-managers/i3-sway/sway.nix b/modules/services/window-managers/i3-sway/sway.nix
index 4eafed2da47f..2b6e5622da1f 100644
--- a/modules/services/window-managers/i3-sway/sway.nix
+++ b/modules/services/window-managers/i3-sway/sway.nix
@@ -414,7 +414,7 @@ in {
"XCURSOR_THEME"
"XCURSOR_SIZE"
];
- example = [ "-all" ];
+ example = [ "--all" ];
description = ''
Environment variables imported into the systemd and D-Bus user environment.
'';
@@ -422,7 +422,12 @@ in {
extraCommands = mkOption {
type = types.listOf types.str;
- default = [ "systemctl --user start sway-session.target" ];
+ default = [
+ "systemctl --user reset-failed"
+ "systemctl --user start sway-session.target"
+ "swaymsg -mt subscribe '[]' || true"
+ "systemctl --user stop sway-session.target"
+ ];
description = ''
Extra commands to run after D-Bus activation.
'';
diff --git a/modules/systemd-activate.sh b/modules/systemd-activate.sh
index 235f1a241cf0..ca26fea8b7b7 100644
--- a/modules/systemd-activate.sh
+++ b/modules/systemd-activate.sh
@@ -34,7 +34,7 @@ function systemdPostReload() {
touch "$oldServiceFiles"
else
find "$oldUserServicePath" \
- -maxdepth 1 -name '*.service' -exec basename '{}' ';' \
+ -maxdepth 1 -name '*.service' \! -name '*@.service' -exec basename '{}' ';' \
| sort \
> "$oldServiceFiles"
fi
@@ -43,7 +43,7 @@ function systemdPostReload() {
touch "$newServiceFiles"
else
find "$newUserServicePath" \
- -maxdepth 1 -name '*.service' -exec basename '{}' ';' \
+ -maxdepth 1 -name '*.service' \! -name '*@.service' -exec basename '{}' ';' \
| sort \
> "$newServiceFiles"
fi
diff --git a/modules/systemd.nix b/modules/systemd.nix
index f209f65dd4dc..717a5922d48f 100644
--- a/modules/systemd.nix
+++ b/modules/systemd.nix
@@ -100,6 +100,8 @@ let
settingsFormat.generate "user.conf" cfg.settings;
};
+ configHome = lib.removePrefix config.home.homeDirectory config.xdg.configHome;
+
in {
meta.maintainers = [ lib.maintainers.rycee ];
@@ -335,8 +337,8 @@ in {
in ''
${pkgs.sd-switch}/bin/sd-switch \
''${DRY_RUN:+--dry-run} $VERBOSE_ARG ${timeoutArg} \
- ''${oldGenPath:+--old-units $oldGenPath/home-files/.config/systemd/user} \
- --new-units $newGenPath/home-files/.config/systemd/user
+ ''${oldUnitsDir:+--old-units $oldUnitsDir} \
+ --new-units "$newUnitsDir"
'';
};
@@ -354,8 +356,22 @@ in {
warnEcho "Attempting to reload services anyway..."
fi
+ if [[ -v oldGenPath ]]; then
+ oldUnitsDir="$oldGenPath/home-files${configHome}/systemd/user"
+ if [[ ! -e $oldUnitsDir ]]; then
+ oldUnitsDir=
+ fi
+ fi
+
+ newUnitsDir="$newGenPath/home-files${configHome}/systemd/user"
+ if [[ ! -e $newUnitsDir ]]; then
+ newUnitsDir=${pkgs.emptyDirectory}
+ fi
+
${ensureRuntimeDir} \
${getAttr cfg.startServices cmd}
+
+ unset newUnitsDir oldUnitsDir
else
echo "User systemd daemon not running. Skipping reload."
fi
diff --git a/tests/default.nix b/tests/default.nix
index 4d8d49d456c4..28ce4f648a38 100644
--- a/tests/default.nix
+++ b/tests/default.nix
@@ -224,6 +224,7 @@ in import nmtSrc {
./modules/services/activitywatch
./modules/services/avizo
./modules/services/barrier
+ ./modules/services/blanket
./modules/services/borgmatic
./modules/services/cachix-agent
./modules/services/cliphist
@@ -240,6 +241,7 @@ in import nmtSrc {
./modules/services/fnott
./modules/services/fusuma
./modules/services/git-sync
+ ./modules/services/glance
./modules/services/gpg-agent
./modules/services/gromit-mpx
./modules/services/home-manager-auto-upgrade
diff --git a/tests/integration/nixos/basics.nix b/tests/integration/nixos/basics.nix
index 001623ca55b3..43f537c7944c 100644
--- a/tests/integration/nixos/basics.nix
+++ b/tests/integration/nixos/basics.nix
@@ -7,6 +7,8 @@
nodes.machine = { ... }: {
imports = [ ../../../nixos ]; # Import the HM NixOS module.
+ virtualisation.memorySize = 2048;
+
users.users.alice = {
isNormalUser = true;
description = "Alice Foobar";
diff --git a/tests/integration/standalone/flake-basics.nix b/tests/integration/standalone/flake-basics.nix
index 8f9627d9f48f..9638862f29c1 100644
--- a/tests/integration/standalone/flake-basics.nix
+++ b/tests/integration/standalone/flake-basics.nix
@@ -6,7 +6,7 @@
nodes.machine = { ... }: {
imports = [ "${pkgs.path}/nixos/modules/installer/cd-dvd/channel.nix" ];
- virtualisation.memorySize = 2048;
+ virtualisation.memorySize = 3072;
nix = {
registry.home-manager.to = {
type = "path";
@@ -88,7 +88,7 @@
} /home/alice/.config/home-manager/home.nix")
actual = succeed_as_alice("home-manager switch")
- expected = "Started pueued.service - active"
+ expected = "Starting units: pueued.service"
assert expected in actual, \
f"expected home-manager switch to contain {expected}, but got {actual}"
diff --git a/tests/integration/standalone/standard-basics.nix b/tests/integration/standalone/standard-basics.nix
index d4cac249a5fa..b994ff370eb2 100644
--- a/tests/integration/standalone/standard-basics.nix
+++ b/tests/integration/standalone/standard-basics.nix
@@ -85,7 +85,7 @@
} /home/alice/.config/home-manager/home.nix")
actual = succeed_as_alice("home-manager switch")
- expected = "Started pueued.service - active"
+ expected = "Starting units: pueued.service"
assert expected in actual, \
f"expected home-manager switch to contain {expected}, but got {actual}"
diff --git a/tests/modules/i18n/input-method/fcitx5-stubs.nix b/tests/modules/i18n/input-method/fcitx5-stubs.nix
index 2390ddde89f0..9712a7518d2f 100644
--- a/tests/modules/i18n/input-method/fcitx5-stubs.nix
+++ b/tests/modules/i18n/input-method/fcitx5-stubs.nix
@@ -4,11 +4,15 @@
version = "0";
outPath = null;
buildScript = ''
- mkdir -p $out/bin $out/share/applications $out/etc/xdg/autostart
+ mkdir -p $out/bin $out/share/applications $out/share/dbus-1/services $out/etc/xdg/autostart
touch $out/bin/fcitx5 \
$out/bin/fcitx5-config-qt \
$out/share/applications/org.fcitx.Fcitx5.desktop \
+ $out/share/dbus-1/services/org.fcitx.Fcitx5.service \
$out/etc/xdg/autostart/org.fcitx.Fcitx5.desktop
+ # The grep usage of fcitx5-with-addons expects one of the files to match with the fcitx5.out
+ # https://github.com/NixOS/nixpkgs/blob/d2eb4be48705289791428c07aca8ff654c1422ba/pkgs/tools/inputmethods/fcitx5/with-addons.nix#L40-L44
+ echo $out >> $out/etc/xdg/autostart/org.fcitx.Fcitx5.desktop
chmod +x $out/bin/fcitx5 \
$out/bin/fcitx5-config-qt
'';
diff --git a/tests/modules/misc/nix/default.nix b/tests/modules/misc/nix/default.nix
index b0370c2e4644..4c8822bf2a03 100644
--- a/tests/modules/misc/nix/default.nix
+++ b/tests/modules/misc/nix/default.nix
@@ -2,4 +2,7 @@
nix-empty-settings = ./empty-settings.nix;
nix-example-settings = ./example-settings.nix;
nix-example-registry = ./example-registry.nix;
+ nix-keep-old-nix-path = ./keep-old-nix-path.nix;
+ nix-example-channels = ./example-channels.nix;
+ nix-example-channels-xdg = ./example-channels-xdg.nix;
}
diff --git a/tests/modules/misc/nix/empty-settings.nix b/tests/modules/misc/nix/empty-settings.nix
index 18f1ab4301d4..7e5844742f3c 100644
--- a/tests/modules/misc/nix/empty-settings.nix
+++ b/tests/modules/misc/nix/empty-settings.nix
@@ -8,6 +8,7 @@ with lib;
nmt.script = ''
assertPathNotExists home-files/.config/nix
+ assertPathNotExists home-files/.nix-defexpr/50-home-manager
'';
};
}
diff --git a/tests/modules/misc/nix/example-channels-xdg.nix b/tests/modules/misc/nix/example-channels-xdg.nix
new file mode 100644
index 000000000000..8ca1569f34be
--- /dev/null
+++ b/tests/modules/misc/nix/example-channels-xdg.nix
@@ -0,0 +1,29 @@
+{ lib, config, pkgs, ... }:
+
+let
+ exampleChannel = pkgs.writeTextDir "default.nix" ''
+ { pkgs ? import { } }:
+
+ {
+ example = pkgs.emptyDirectory;
+ }
+ '';
+in {
+ config = {
+ nix = {
+ package = config.lib.test.mkStubPackage {
+ version = lib.getVersion pkgs.nixVersions.stable;
+ };
+ channels.example = exampleChannel;
+ settings.use-xdg-base-directories = true;
+ };
+
+ nmt.script = ''
+ assertFileContains home-path/etc/profile.d/hm-session-vars.sh \
+ 'export NIX_PATH="/home/hm-user/.local/state/nix/defexpr/50-home-manager''${NIX_PATH:+:$NIX_PATH}"'
+ assertFileContent \
+ home-files/.local/state/nix/defexpr/50-home-manager/example/default.nix \
+ ${exampleChannel}/default.nix
+ '';
+ };
+}
diff --git a/tests/modules/misc/nix/example-channels.nix b/tests/modules/misc/nix/example-channels.nix
new file mode 100644
index 000000000000..4b98c55d4e40
--- /dev/null
+++ b/tests/modules/misc/nix/example-channels.nix
@@ -0,0 +1,26 @@
+{ config, pkgs, ... }:
+
+let
+ exampleChannel = pkgs.writeTextDir "default.nix" ''
+ { pkgs ? import { } }:
+
+ {
+ example = pkgs.emptyDirectory;
+ }
+ '';
+in {
+ config = {
+ nix = {
+ package = config.lib.test.mkStubPackage { };
+ channels.example = exampleChannel;
+ };
+
+ nmt.script = ''
+ assertFileContains home-path/etc/profile.d/hm-session-vars.sh \
+ 'export NIX_PATH="/home/hm-user/.nix-defexpr/50-home-manager''${NIX_PATH:+:$NIX_PATH}"'
+ assertFileContent \
+ home-files/.nix-defexpr/50-home-manager/example/default.nix \
+ ${exampleChannel}/default.nix
+ '';
+ };
+}
diff --git a/tests/modules/misc/nix/example-settings.nix b/tests/modules/misc/nix/example-settings.nix
index 6cbcd9dfa430..df62fe8d12bd 100644
--- a/tests/modules/misc/nix/example-settings.nix
+++ b/tests/modules/misc/nix/example-settings.nix
@@ -17,6 +17,8 @@ with lib;
'';
};
+ nixPath = [ "/a" "/b/c" ];
+
settings = {
use-sandbox = true;
show-trace = true;
@@ -28,6 +30,9 @@ with lib;
assertFileContent \
home-files/.config/nix/nix.conf \
${./example-settings-expected.conf}
+
+ assertFileContains home-path/etc/profile.d/hm-session-vars.sh \
+ 'export NIX_PATH="/a:/b/c''${NIX_PATH:+:$NIX_PATH}"'
'';
};
}
diff --git a/tests/modules/misc/nix/keep-old-nix-path.nix b/tests/modules/misc/nix/keep-old-nix-path.nix
new file mode 100644
index 000000000000..72bd9f164421
--- /dev/null
+++ b/tests/modules/misc/nix/keep-old-nix-path.nix
@@ -0,0 +1,16 @@
+{ config, ... }:
+
+{
+ config = {
+ nix = {
+ package = config.lib.test.mkStubPackage { };
+ nixPath = [ "/a" "/b/c" ];
+ keepOldNixPath = false;
+ };
+
+ nmt.script = ''
+ assertFileContains home-path/etc/profile.d/hm-session-vars.sh \
+ 'export NIX_PATH="/a:/b/c"'
+ '';
+ };
+}
diff --git a/tests/modules/programs/atuin/bash.nix b/tests/modules/programs/atuin/bash.nix
index a84ea99e3ab6..21d306b2fa4d 100644
--- a/tests/modules/programs/atuin/bash.nix
+++ b/tests/modules/programs/atuin/bash.nix
@@ -10,7 +10,7 @@
};
test.stubs = {
- atuin = { };
+ atuin = { name = "atuin"; };
bash-preexec = { };
};
diff --git a/tests/modules/programs/atuin/empty-settings.nix b/tests/modules/programs/atuin/empty-settings.nix
index 58f126965dd5..be6b55986145 100644
--- a/tests/modules/programs/atuin/empty-settings.nix
+++ b/tests/modules/programs/atuin/empty-settings.nix
@@ -4,7 +4,7 @@
programs.atuin.enable = true;
test.stubs = {
- atuin = { };
+ atuin = { name = "atuin"; };
bash-preexec = { };
};
diff --git a/tests/modules/programs/atuin/example-settings.nix b/tests/modules/programs/atuin/example-settings.nix
index f2d3a887691f..98aca707da6b 100644
--- a/tests/modules/programs/atuin/example-settings.nix
+++ b/tests/modules/programs/atuin/example-settings.nix
@@ -13,7 +13,7 @@
};
test.stubs = {
- atuin = { };
+ atuin = { name = "atuin"; };
bash-preexec = { };
};
diff --git a/tests/modules/programs/atuin/fish.nix b/tests/modules/programs/atuin/fish.nix
index ae3122cf15ff..49d9a2821881 100644
--- a/tests/modules/programs/atuin/fish.nix
+++ b/tests/modules/programs/atuin/fish.nix
@@ -11,7 +11,7 @@
lib.mkForce (builtins.toFile "empty" "");
test.stubs = {
- atuin = { };
+ atuin = { name = "atuin"; };
bash-preexec = { };
};
diff --git a/tests/modules/programs/atuin/no-shell.nix b/tests/modules/programs/atuin/no-shell.nix
index 381bcc0caaa2..c6481e4276a5 100644
--- a/tests/modules/programs/atuin/no-shell.nix
+++ b/tests/modules/programs/atuin/no-shell.nix
@@ -18,7 +18,7 @@
lib.mkForce (builtins.toFile "empty" "");
test.stubs = {
- atuin = { };
+ atuin = { name = "atuin"; };
bash-preexec = { };
};
diff --git a/tests/modules/programs/atuin/set-flags.nix b/tests/modules/programs/atuin/set-flags.nix
index 7e3a7982fe22..b6e8330d1395 100644
--- a/tests/modules/programs/atuin/set-flags.nix
+++ b/tests/modules/programs/atuin/set-flags.nix
@@ -17,7 +17,7 @@
lib.mkForce (builtins.toFile "empty" "");
test.stubs = {
- atuin = { };
+ atuin = { name = "atuin"; };
bash-preexec = { };
};
diff --git a/tests/modules/programs/atuin/zsh.nix b/tests/modules/programs/atuin/zsh.nix
index 14adddcac491..2cb4fefef6d8 100644
--- a/tests/modules/programs/atuin/zsh.nix
+++ b/tests/modules/programs/atuin/zsh.nix
@@ -7,7 +7,7 @@
};
test.stubs = {
- atuin = { };
+ atuin = { name = "atuin"; };
bash-preexec = { };
};
diff --git a/tests/modules/programs/waybar/deprecated-modules-option.nix b/tests/modules/programs/waybar/deprecated-modules-option.nix
index b4d730afcf1d..09f163b0fcfd 100644
--- a/tests/modules/programs/waybar/deprecated-modules-option.nix
+++ b/tests/modules/programs/waybar/deprecated-modules-option.nix
@@ -31,8 +31,6 @@ with lib;
"modules-center": [
"test"
],
- "modules-left": [],
- "modules-right": [],
"test": {}
}
]
diff --git a/tests/modules/programs/waybar/settings-complex-expected.json b/tests/modules/programs/waybar/settings-complex-expected.json
index 87e4f690d05f..e7ec8b4a3a90 100644
--- a/tests/modules/programs/waybar/settings-complex-expected.json
+++ b/tests/modules/programs/waybar/settings-complex-expected.json
@@ -51,7 +51,6 @@
"modules-left": [
"sway/mode"
],
- "modules-right": [],
"output": [
"!DP-1"
],
diff --git a/tests/modules/programs/yazi/bash-integration-enabled.nix b/tests/modules/programs/yazi/bash-integration-enabled.nix
index ac2e4979606b..474a989f98a4 100644
--- a/tests/modules/programs/yazi/bash-integration-enabled.nix
+++ b/tests/modules/programs/yazi/bash-integration-enabled.nix
@@ -2,7 +2,7 @@
let
shellIntegration = ''
- function ya() {
+ function yy() {
local tmp="$(mktemp -t "yazi-cwd.XXXXX")"
yazi "$@" --cwd-file="$tmp"
if cwd="$(cat -- "$tmp")" && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then
diff --git a/tests/modules/programs/yazi/default.nix b/tests/modules/programs/yazi/default.nix
index 09d52ac3df5c..ec543c84d7b6 100644
--- a/tests/modules/programs/yazi/default.nix
+++ b/tests/modules/programs/yazi/default.nix
@@ -1,5 +1,6 @@
{
yazi-settings = ./settings.nix;
+ yazi-init-lua-string = ./init-lua-string.nix;
yazi-bash-integration-enabled = ./bash-integration-enabled.nix;
yazi-zsh-integration-enabled = ./zsh-integration-enabled.nix;
yazi-fish-integration-enabled = ./fish-integration-enabled.nix;
diff --git a/tests/modules/programs/yazi/empty/.gitkeep b/tests/modules/programs/yazi/empty/.gitkeep
new file mode 100644
index 000000000000..e69de29bb2d1
diff --git a/tests/modules/programs/yazi/fish-integration-enabled.nix b/tests/modules/programs/yazi/fish-integration-enabled.nix
index 6d2b9fa31387..2231035b9a88 100644
--- a/tests/modules/programs/yazi/fish-integration-enabled.nix
+++ b/tests/modules/programs/yazi/fish-integration-enabled.nix
@@ -2,7 +2,7 @@
let
shellIntegration = ''
- function ya
+ function yy
set tmp (mktemp -t "yazi-cwd.XXXXX")
yazi $argv --cwd-file="$tmp"
if set cwd (cat -- "$tmp"); and [ -n "$cwd" ]; and [ "$cwd" != "$PWD" ]
diff --git a/tests/modules/programs/yazi/flavor/LICENSE b/tests/modules/programs/yazi/flavor/LICENSE
new file mode 100644
index 000000000000..e69de29bb2d1
diff --git a/tests/modules/programs/yazi/flavor/LICENSE-tmtheme b/tests/modules/programs/yazi/flavor/LICENSE-tmtheme
new file mode 100644
index 000000000000..e69de29bb2d1
diff --git a/tests/modules/programs/yazi/flavor/README.md b/tests/modules/programs/yazi/flavor/README.md
new file mode 100644
index 000000000000..3ba41d0dbfe6
--- /dev/null
+++ b/tests/modules/programs/yazi/flavor/README.md
@@ -0,0 +1,50 @@
+
+
+
+
+
+ Example Flavor for Yazi
+
+
+## Cooking up a new flavor
+
+> [!NOTE]
+> Please remove this section from your README before publishing.
+
+1. [x] Fork this repository and rename it to `your-flavor-name.yazi`.
+2. [ ] Copy the **parts you need to customize** from the [default theme.toml](https://github.com/sxyazi/yazi/blob/main/yazi-config/preset/theme.toml) as `./flavor.toml`, and change them to meet your preferences.
+3. [ ] Find a `.tmTheme` file on GitHub that matches the color of your flavor, copy it and it's license file as `./tmtheme.xml`, and `LICENSE-tmtheme`.
+4. [ ] Modify the content and preview image in the README to fit your flavor.
+
+## 👀 Preview
+
+
+
+## 🎨 Installation
+
+
+
+```bash
+# Linux/macOS
+git clone https://github.com/username/example.yazi.git ~/.config/yazi/flavors/example.yazi
+
+# Windows
+git clone https://github.com/username/example.yazi.git %AppData%\yazi\config\flavors\example.yazi
+```
+
+## ⚙️ Usage
+
+Add the these lines to your `theme.toml` configuration file to use it:
+
+
+
+```toml
+[flavor]
+use = "example"
+```
+
+## 📜 License
+
+The flavor is MIT-licensed, and the included tmTheme is also MIT-licensed.
+
+Check the [LICENSE](LICENSE) and [LICENSE-tmtheme](LICENSE-tmtheme) file for more details.
diff --git a/tests/modules/programs/yazi/flavor/flavor.toml b/tests/modules/programs/yazi/flavor/flavor.toml
new file mode 100644
index 000000000000..35e1fe770463
--- /dev/null
+++ b/tests/modules/programs/yazi/flavor/flavor.toml
@@ -0,0 +1,2 @@
+# This is a flavor.
+
diff --git a/tests/modules/programs/yazi/flavor/init.lua b/tests/modules/programs/yazi/flavor/init.lua
deleted file mode 100644
index 8d06fa7a9b0d..000000000000
--- a/tests/modules/programs/yazi/flavor/init.lua
+++ /dev/null
@@ -1 +0,0 @@
--- This is a flavor.
diff --git a/tests/modules/programs/yazi/flavor/preview.png b/tests/modules/programs/yazi/flavor/preview.png
new file mode 100644
index 000000000000..e69de29bb2d1
diff --git a/tests/modules/programs/yazi/flavor/tmtheme.xml b/tests/modules/programs/yazi/flavor/tmtheme.xml
new file mode 100644
index 000000000000..e69de29bb2d1
diff --git a/tests/modules/programs/yazi/init-lua-string.nix b/tests/modules/programs/yazi/init-lua-string.nix
new file mode 100644
index 000000000000..999dd6bc6f97
--- /dev/null
+++ b/tests/modules/programs/yazi/init-lua-string.nix
@@ -0,0 +1,14 @@
+{ ... }: {
+ programs.yazi = {
+ enable = true;
+
+ initLua = builtins.readFile ./init.lua;
+ };
+
+ test.stubs.yazi = { };
+
+ nmt.script = ''
+ assertFileContent home-files/.config/yazi/init.lua \
+ ${./init.lua}
+ '';
+}
diff --git a/tests/modules/programs/yazi/nushell-integration-enabled.nix b/tests/modules/programs/yazi/nushell-integration-enabled.nix
index 9adbaa982899..a2de2d8b7848 100644
--- a/tests/modules/programs/yazi/nushell-integration-enabled.nix
+++ b/tests/modules/programs/yazi/nushell-integration-enabled.nix
@@ -2,7 +2,7 @@
let
shellIntegration = ''
- def --env ya [...args] {
+ def --env yy [...args] {
let tmp = (mktemp -t "yazi-cwd.XXXXX")
yazi ...$args --cwd-file $tmp
let cwd = (open $tmp)
diff --git a/tests/modules/programs/yazi/settings.nix b/tests/modules/programs/yazi/settings.nix
index 4655ae8b3551..2694dadec871 100644
--- a/tests/modules/programs/yazi/settings.nix
+++ b/tests/modules/programs/yazi/settings.nix
@@ -70,8 +70,22 @@
};
};
initLua = ./init.lua;
- plugins = { "test.yazi" = ./plugin; };
- flavors = { "test.yazi" = ./flavor; };
+ plugins = {
+ testplugin = ./plugin;
+ ## Produces warning
+ #"plugin-with-suffix.yazi" = ./plugin;
+ ## Fails assertion
+ #single-file-plugin = ./plugin/init.lua;
+ #empty-dir-plugin = ./empty;
+ };
+ flavors = {
+ testflavor = ./flavor;
+ ## Produces warning
+ #"flavor-with-suffix.yazi" = ./flavor;
+ ## Fails assertion
+ #single-file-flavor = ./flavor/flavor.toml;
+ #empty-dir-flavor = ./empty;
+ };
};
test.stubs.yazi = { };
@@ -85,9 +99,9 @@
${./theme-expected.toml}
assertFileContent home-files/.config/yazi/init.lua \
${./init.lua}
- assertFileContent home-files/.config/yazi/plugins/test.yazi/init.lua \
+ assertFileContent home-files/.config/yazi/plugins/testplugin.yazi/init.lua \
${./plugin/init.lua}
- assertFileContent home-files/.config/yazi/flavors/test.yazi/init.lua \
- ${./flavor/init.lua}
+ assertFileContent home-files/.config/yazi/flavors/testflavor.yazi/flavor.toml \
+ ${./flavor/flavor.toml}
'';
}
diff --git a/tests/modules/programs/yazi/zsh-integration-enabled.nix b/tests/modules/programs/yazi/zsh-integration-enabled.nix
index d5090a6a84b9..0c0ec217fc4d 100644
--- a/tests/modules/programs/yazi/zsh-integration-enabled.nix
+++ b/tests/modules/programs/yazi/zsh-integration-enabled.nix
@@ -2,7 +2,7 @@
let
shellIntegration = ''
- function ya() {
+ function yy() {
local tmp="$(mktemp -t "yazi-cwd.XXXXX")"
yazi "$@" --cwd-file="$tmp"
if cwd="$(cat -- "$tmp")" && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then
diff --git a/tests/modules/services/blanket/basic-configuration.nix b/tests/modules/services/blanket/basic-configuration.nix
new file mode 100644
index 000000000000..740c4d08df5f
--- /dev/null
+++ b/tests/modules/services/blanket/basic-configuration.nix
@@ -0,0 +1,31 @@
+{ ... }:
+
+{
+ services.blanket = { enable = true; };
+
+ test.stubs.blanket = { };
+
+ nmt.script = ''
+ clientServiceFile=home-files/.config/systemd/user/blanket.service
+
+ assertFileExists $clientServiceFile
+ assertFileContent $clientServiceFile ${
+ builtins.toFile "expected.service" ''
+ [Install]
+ WantedBy=graphical-session.target
+
+ [Service]
+ ExecStart=@blanket@/bin/blanket --gapplication-service
+ Restart=on-failure
+ RestartSec=5
+
+ [Unit]
+ After=graphical-session-pre.target
+ Description=Blanket daemon
+ PartOf=graphical-session.target
+ PartOf=pipewire.service
+ Requires=dbus.service
+ ''
+ }
+ '';
+}
diff --git a/tests/modules/services/blanket/default.nix b/tests/modules/services/blanket/default.nix
new file mode 100644
index 000000000000..8a439a52a349
--- /dev/null
+++ b/tests/modules/services/blanket/default.nix
@@ -0,0 +1 @@
+{ blanket-basic-configuration = ./basic-configuration.nix; }
diff --git a/tests/modules/services/glance/default-settings.nix b/tests/modules/services/glance/default-settings.nix
new file mode 100644
index 000000000000..7b35db779c83
--- /dev/null
+++ b/tests/modules/services/glance/default-settings.nix
@@ -0,0 +1,15 @@
+{ ... }:
+
+{
+ services.glance.enable = true;
+
+ test.stubs.glance = { };
+
+ nmt.script = ''
+ configFile=home-files/.config/glance/glance.yml
+ serviceFile=home-files/.config/systemd/user/glance.service
+
+ assertFileContent $configFile ${./glance-default-config.yml}
+ assertFileContent $serviceFile ${./glance.service}
+ '';
+}
diff --git a/tests/modules/services/glance/default.nix b/tests/modules/services/glance/default.nix
new file mode 100644
index 000000000000..893ba6516baa
--- /dev/null
+++ b/tests/modules/services/glance/default.nix
@@ -0,0 +1,4 @@
+{
+ glance-default-settings = ./default-settings.nix;
+ glance-example-settings = ./example-settings.nix;
+}
diff --git a/tests/modules/services/glance/example-settings.nix b/tests/modules/services/glance/example-settings.nix
new file mode 100644
index 000000000000..9e2101d2e540
--- /dev/null
+++ b/tests/modules/services/glance/example-settings.nix
@@ -0,0 +1,33 @@
+{ ... }:
+
+{
+ services.glance = {
+ enable = true;
+ settings = {
+ server.port = 5678;
+ pages = [{
+ name = "Home";
+ columns = [{
+ size = "full";
+ widgets = [
+ { type = "calendar"; }
+ {
+ type = "weather";
+ location = "London, United Kingdom";
+ }
+ ];
+ }];
+ }];
+ };
+ };
+
+ test.stubs.glance = { };
+
+ nmt.script = ''
+ configFile=home-files/.config/glance/glance.yml
+ serviceFile=home-files/.config/systemd/user/glance.service
+
+ assertFileContent $configFile ${./glance-example-config.yml}
+ assertFileContent $serviceFile ${./glance.service}
+ '';
+}
diff --git a/tests/modules/services/glance/glance-default-config.yml b/tests/modules/services/glance/glance-default-config.yml
new file mode 100644
index 000000000000..024a896490f5
--- /dev/null
+++ b/tests/modules/services/glance/glance-default-config.yml
@@ -0,0 +1,6 @@
+pages:
+- columns:
+ - size: full
+ widgets:
+ - type: calendar
+ name: Calendar
diff --git a/tests/modules/services/glance/glance-example-config.yml b/tests/modules/services/glance/glance-example-config.yml
new file mode 100644
index 000000000000..2775916ec4ef
--- /dev/null
+++ b/tests/modules/services/glance/glance-example-config.yml
@@ -0,0 +1,10 @@
+pages:
+- columns:
+ - size: full
+ widgets:
+ - type: calendar
+ - location: London, United Kingdom
+ type: weather
+ name: Home
+server:
+ port: 5678
diff --git a/tests/modules/services/glance/glance.service b/tests/modules/services/glance/glance.service
new file mode 100644
index 000000000000..07b82d1d98af
--- /dev/null
+++ b/tests/modules/services/glance/glance.service
@@ -0,0 +1,9 @@
+[Install]
+WantedBy=graphical-session.target
+
+[Service]
+ExecStart=@glance@/bin/dummy --config /home/hm-user/.config/glance/glance.yml
+
+[Unit]
+Description=Glance feed dashboard server
+PartOf=graphical-session.target
diff --git a/tests/modules/services/mpd/default.nix b/tests/modules/services/mpd/default.nix
index d2fd2a2922d2..f7919b227197 100644
--- a/tests/modules/services/mpd/default.nix
+++ b/tests/modules/services/mpd/default.nix
@@ -1,5 +1,6 @@
{
mpd-basic-configuration = ./basic-configuration.nix;
mpd-before-state-version-22_11 = ./before-state-version-22_11.nix;
+ mpd-start-when-needed = ./start-when-needed.nix;
mpd-xdg-music-dir = ./xdg-music-dir.nix;
}
diff --git a/tests/modules/services/mpd/start-when-needed.nix b/tests/modules/services/mpd/start-when-needed.nix
new file mode 100644
index 000000000000..31017c9e3035
--- /dev/null
+++ b/tests/modules/services/mpd/start-when-needed.nix
@@ -0,0 +1,29 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+
+{
+ services.mpd = {
+ enable = true;
+ musicDirectory = "/my/music/dir";
+ extraArgs = [ "--verbose" ];
+ network.startWhenNeeded = true;
+ };
+
+ home.stateVersion = "22.11";
+
+ test.stubs.mpd = { };
+
+ nmt.script = ''
+ serviceFile=$(normalizeStorePaths home-files/.config/systemd/user/mpd.service)
+ assertFileContent "$serviceFile" ${./start-when-needed.service}
+
+ socketFile=home-files/.config/systemd/user/mpd.socket
+ assertFileContent "$socketFile" ${./start-when-needed.socket}
+
+ confFile=$(grep -o \
+ '/nix/store/.*-mpd.conf' \
+ $TESTED/home-files/.config/systemd/user/mpd.service)
+ assertFileContent "$confFile" ${./basic-configuration.conf}
+ '';
+}
diff --git a/tests/modules/services/mpd/start-when-needed.service b/tests/modules/services/mpd/start-when-needed.service
new file mode 100644
index 000000000000..87eb4b79a2f9
--- /dev/null
+++ b/tests/modules/services/mpd/start-when-needed.service
@@ -0,0 +1,12 @@
+[Service]
+Environment=PATH=/home/hm-user/.nix-profile/bin
+ExecStart=@mpd@/bin/mpd --no-daemon /nix/store/00000000000000000000000000000000-mpd.conf '--verbose'
+ExecStartPre=/nix/store/00000000000000000000000000000000-bash/bin/bash -c "/nix/store/00000000000000000000000000000000-coreutils/bin/mkdir -p '/home/hm-user/.local/share/mpd' '/home/hm-user/.local/share/mpd/playlists'"
+Type=notify
+
+[Unit]
+After=network.target
+After=sound.target
+After=mpd.socket
+Description=Music Player Daemon
+Requires=mpd.socket
diff --git a/tests/modules/services/mpd/start-when-needed.socket b/tests/modules/services/mpd/start-when-needed.socket
new file mode 100644
index 000000000000..b5687b117305
--- /dev/null
+++ b/tests/modules/services/mpd/start-when-needed.socket
@@ -0,0 +1,8 @@
+[Install]
+WantedBy=sockets.target
+
+[Socket]
+Backlog=5
+KeepAlive=true
+ListenStream=127.0.0.1:6600
+ListenStream=%t/mpd/socket
diff --git a/tests/modules/services/nix-gc/expected.timer b/tests/modules/services/nix-gc/expected.timer
index 2b0c66031ebf..ef30df4359dc 100644
--- a/tests/modules/services/nix-gc/expected.timer
+++ b/tests/modules/services/nix-gc/expected.timer
@@ -3,6 +3,7 @@ WantedBy=timers.target
[Timer]
OnCalendar=monthly
+Persistent=true
Unit=nix-gc.service
[Unit]
diff --git a/tests/modules/services/window-managers/sway/sway-bar-focused-colors.conf b/tests/modules/services/window-managers/sway/sway-bar-focused-colors.conf
index 448c41f47f9d..10019319263d 100644
--- a/tests/modules/services/window-managers/sway/sway-bar-focused-colors.conf
+++ b/tests/modules/services/window-managers/sway/sway-bar-focused-colors.conf
@@ -108,4 +108,4 @@ bar {
}
}
-exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE NIXOS_OZONE_WL XCURSOR_THEME XCURSOR_SIZE; systemctl --user start sway-session.target"
+exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE NIXOS_OZONE_WL XCURSOR_THEME XCURSOR_SIZE; systemctl --user reset-failed && systemctl --user start sway-session.target && swaymsg -mt subscribe '[]' || true && systemctl --user stop sway-session.target"
diff --git a/tests/modules/services/window-managers/sway/sway-bindkeys-to-code-and-extra-config.conf b/tests/modules/services/window-managers/sway/sway-bindkeys-to-code-and-extra-config.conf
index d11f6f2bca17..28513fcd5ed7 100644
--- a/tests/modules/services/window-managers/sway/sway-bindkeys-to-code-and-extra-config.conf
+++ b/tests/modules/services/window-managers/sway/sway-bindkeys-to-code-and-extra-config.conf
@@ -107,5 +107,5 @@ bar {
}
}
-exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE NIXOS_OZONE_WL XCURSOR_THEME XCURSOR_SIZE; systemctl --user start sway-session.target"
+exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE NIXOS_OZONE_WL XCURSOR_THEME XCURSOR_SIZE; systemctl --user reset-failed && systemctl --user start sway-session.target && swaymsg -mt subscribe '[]' || true && systemctl --user stop sway-session.target"
exec_always pkill flashfocus; flasfocus &
diff --git a/tests/modules/services/window-managers/sway/sway-default.conf b/tests/modules/services/window-managers/sway/sway-default.conf
index 71a0b13fb52f..cefe4e0afd24 100644
--- a/tests/modules/services/window-managers/sway/sway-default.conf
+++ b/tests/modules/services/window-managers/sway/sway-default.conf
@@ -105,4 +105,4 @@ bar {
}
}
-exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE NIXOS_OZONE_WL XCURSOR_THEME XCURSOR_SIZE; systemctl --user start sway-session.target"
+exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE NIXOS_OZONE_WL XCURSOR_THEME XCURSOR_SIZE; systemctl --user reset-failed && systemctl --user start sway-session.target && swaymsg -mt subscribe '[]' || true && systemctl --user stop sway-session.target"
diff --git a/tests/modules/services/window-managers/sway/sway-followmouse-expected.conf b/tests/modules/services/window-managers/sway/sway-followmouse-expected.conf
index af259face8bb..f4f60ddf0756 100644
--- a/tests/modules/services/window-managers/sway/sway-followmouse-expected.conf
+++ b/tests/modules/services/window-managers/sway/sway-followmouse-expected.conf
@@ -83,4 +83,4 @@ mode "resize" {
bindsym l resize grow width 10 px
}
-exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE NIXOS_OZONE_WL XCURSOR_THEME XCURSOR_SIZE; systemctl --user start sway-session.target"
+exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE NIXOS_OZONE_WL XCURSOR_THEME XCURSOR_SIZE; systemctl --user reset-failed && systemctl --user start sway-session.target && swaymsg -mt subscribe '[]' || true && systemctl --user stop sway-session.target"
diff --git a/tests/modules/services/window-managers/sway/sway-followmouse-legacy-expected.conf b/tests/modules/services/window-managers/sway/sway-followmouse-legacy-expected.conf
index 1fd0003fc6ea..c10dbd90db6a 100644
--- a/tests/modules/services/window-managers/sway/sway-followmouse-legacy-expected.conf
+++ b/tests/modules/services/window-managers/sway/sway-followmouse-legacy-expected.conf
@@ -83,4 +83,4 @@ mode "resize" {
bindsym l resize grow width 10 px
}
-exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE NIXOS_OZONE_WL XCURSOR_THEME XCURSOR_SIZE; systemctl --user start sway-session.target"
+exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE NIXOS_OZONE_WL XCURSOR_THEME XCURSOR_SIZE; systemctl --user reset-failed && systemctl --user start sway-session.target && swaymsg -mt subscribe '[]' || true && systemctl --user stop sway-session.target"
diff --git a/tests/modules/services/window-managers/sway/sway-modules.conf b/tests/modules/services/window-managers/sway/sway-modules.conf
index 766d61de7f63..d0302d07a9d7 100644
--- a/tests/modules/services/window-managers/sway/sway-modules.conf
+++ b/tests/modules/services/window-managers/sway/sway-modules.conf
@@ -117,4 +117,4 @@ bar {
}
}
-exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE NIXOS_OZONE_WL XCURSOR_THEME XCURSOR_SIZE; systemctl --user start sway-session.target"
+exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE NIXOS_OZONE_WL XCURSOR_THEME XCURSOR_SIZE; systemctl --user reset-failed && systemctl --user start sway-session.target && swaymsg -mt subscribe '[]' || true && systemctl --user stop sway-session.target"
diff --git a/tests/modules/services/window-managers/sway/sway-null-package.conf b/tests/modules/services/window-managers/sway/sway-null-package.conf
index 67073371ff8e..9df934b2fe97 100644
--- a/tests/modules/services/window-managers/sway/sway-null-package.conf
+++ b/tests/modules/services/window-managers/sway/sway-null-package.conf
@@ -105,4 +105,4 @@ bar {
}
}
-exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE NIXOS_OZONE_WL XCURSOR_THEME XCURSOR_SIZE; systemctl --user start sway-session.target"
+exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE NIXOS_OZONE_WL XCURSOR_THEME XCURSOR_SIZE; systemctl --user reset-failed && systemctl --user start sway-session.target && swaymsg -mt subscribe '[]' || true && systemctl --user stop sway-session.target"
diff --git a/tests/modules/services/window-managers/sway/sway-post-2003.conf b/tests/modules/services/window-managers/sway/sway-post-2003.conf
index 67073371ff8e..9df934b2fe97 100644
--- a/tests/modules/services/window-managers/sway/sway-post-2003.conf
+++ b/tests/modules/services/window-managers/sway/sway-post-2003.conf
@@ -105,4 +105,4 @@ bar {
}
}
-exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE NIXOS_OZONE_WL XCURSOR_THEME XCURSOR_SIZE; systemctl --user start sway-session.target"
+exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE NIXOS_OZONE_WL XCURSOR_THEME XCURSOR_SIZE; systemctl --user reset-failed && systemctl --user start sway-session.target && swaymsg -mt subscribe '[]' || true && systemctl --user stop sway-session.target"
diff --git a/tests/modules/services/window-managers/sway/sway-systemd-variables.conf b/tests/modules/services/window-managers/sway/sway-systemd-variables.conf
index 1cbb92c32314..3710c5392c80 100644
--- a/tests/modules/services/window-managers/sway/sway-systemd-variables.conf
+++ b/tests/modules/services/window-managers/sway/sway-systemd-variables.conf
@@ -105,4 +105,4 @@ bar {
}
}
-exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd XCURSOR_THEME XCURSOR_SIZE; systemctl --user start sway-session.target"
+exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd XCURSOR_THEME XCURSOR_SIZE; systemctl --user reset-failed && systemctl --user start sway-session.target && swaymsg -mt subscribe '[]' || true && systemctl --user stop sway-session.target"
diff --git a/tests/modules/services/window-managers/sway/sway-workspace-default-expected.conf b/tests/modules/services/window-managers/sway/sway-workspace-default-expected.conf
index 5233c0bb2a7c..4fe87282189d 100644
--- a/tests/modules/services/window-managers/sway/sway-workspace-default-expected.conf
+++ b/tests/modules/services/window-managers/sway/sway-workspace-default-expected.conf
@@ -104,4 +104,4 @@ bar {
}
}
-exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE NIXOS_OZONE_WL XCURSOR_THEME XCURSOR_SIZE; systemctl --user start sway-session.target"
+exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE NIXOS_OZONE_WL XCURSOR_THEME XCURSOR_SIZE; systemctl --user reset-failed && systemctl --user start sway-session.target && swaymsg -mt subscribe '[]' || true && systemctl --user stop sway-session.target"
diff --git a/tests/modules/services/window-managers/sway/sway-workspace-output-expected.conf b/tests/modules/services/window-managers/sway/sway-workspace-output-expected.conf
index 32dfd7344d3c..7148d0030daf 100644
--- a/tests/modules/services/window-managers/sway/sway-workspace-output-expected.conf
+++ b/tests/modules/services/window-managers/sway/sway-workspace-output-expected.conf
@@ -110,4 +110,4 @@ workspace "ABC" output "DP"
workspace "3: Test" output "HDMI"
workspace "!"§$%&/(){}[]=?\*#<>-_.:,;²³" output "DVI"
workspace "Multiple" output "DVI" "HDMI" "DP"
-exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE NIXOS_OZONE_WL XCURSOR_THEME XCURSOR_SIZE; systemctl --user start sway-session.target"
+exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE NIXOS_OZONE_WL XCURSOR_THEME XCURSOR_SIZE; systemctl --user reset-failed && systemctl --user start sway-session.target && swaymsg -mt subscribe '[]' || true && systemctl --user stop sway-session.target"