mirror of
https://github.com/nix-community/home-manager.git
synced 2024-12-14 11:57:55 +00:00
Merge branch 'master' into feat-git-sign
This commit is contained in:
commit
04e7c62542
157 changed files with 3302 additions and 1384 deletions
2
.github/workflows/update-flake.yml
vendored
2
.github/workflows/update-flake.yml
vendored
|
@ -14,7 +14,7 @@ jobs:
|
||||||
- name: Install Nix
|
- name: Install Nix
|
||||||
uses: cachix/install-nix-action@v27
|
uses: cachix/install-nix-action@v27
|
||||||
- name: Update flake.lock
|
- name: Update flake.lock
|
||||||
uses: DeterminateSystems/update-flake-lock@v22
|
uses: DeterminateSystems/update-flake-lock@v23
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.GH_TOKEN_FOR_UPDATES }}
|
token: ${{ secrets.GH_TOKEN_FOR_UPDATES }}
|
||||||
pr-labels: dependencies
|
pr-labels: dependencies
|
||||||
|
|
|
@ -32,6 +32,8 @@ in stdenv.mkDerivation {
|
||||||
OPTIONS_JSON \
|
OPTIONS_JSON \
|
||||||
${home-manager-options.nix-darwin}/share/doc/nixos/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 ${./static/style.css} out/style.css
|
||||||
|
|
||||||
cp -r ${./release-notes} release-notes
|
cp -r ${./release-notes} release-notes
|
||||||
|
|
32
docs/manual/introduction.md
Normal file
32
docs/manual/introduction.md
Normal file
|
@ -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 <http://cache.nixos.org/>, 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).
|
|
@ -8,6 +8,7 @@ preface.md
|
||||||
```
|
```
|
||||||
|
|
||||||
```{=include=} parts
|
```{=include=} parts
|
||||||
|
introduction.md
|
||||||
installation.md
|
installation.md
|
||||||
usage.md
|
usage.md
|
||||||
nix-flakes.md
|
nix-flakes.md
|
||||||
|
|
15
docs/options.html
Normal file
15
docs/options.html
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<title>Redirecting…</title>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<link rel="canonical" href="options.xhtml">
|
||||||
|
<noscript><meta http-equiv="refresh" content="0; url=options.xhtml"></noscript>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1>Redirecting…</h1>
|
||||||
|
<script>
|
||||||
|
window.location.href = "options.xhtml" + (window.location.search || "") + (window.location.hash || "");
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -2,11 +2,11 @@
|
||||||
"nodes": {
|
"nodes": {
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1716948383,
|
"lastModified": 1725103162,
|
||||||
"narHash": "sha256-SzDKxseEcHR5KzPXLwsemyTR/kaM9whxeiJohbL04rs=",
|
"narHash": "sha256-Ym04C5+qovuQDYL/rKWSR+WESseQBbNAe5DsXNx5trY=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "ad57eef4ef0659193044870c731987a6df5cf56b",
|
"rev": "12228ff1752d7b7624a54e9c1af4b222b3c1073b",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
@ -198,9 +198,19 @@ function setFlakeAttribute() {
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
local name="$USER"
|
local name="$USER"
|
||||||
|
|
||||||
|
local hostnameArray=()
|
||||||
|
# FQDN lookup can fail depending on the resolver.
|
||||||
|
local fqdn
|
||||||
|
fqdn="$(hostname -f 2> /dev/null)"
|
||||||
|
if [[ $? -eq 0 ]]; then
|
||||||
|
hostnameArray+=( "$USER@$fqdn" )
|
||||||
|
fi
|
||||||
# Check FQDN, long, and short hostnames; long first to preserve
|
# Check FQDN, long, and short hostnames; long first to preserve
|
||||||
# pre-existing behaviour in case both happen to be defined.
|
# pre-existing behaviour in case both happen to be defined.
|
||||||
for n in "$USER@$(hostname -f)" "$USER@$(hostname)" "$USER@$(hostname -s)"; do
|
hostnameArray+=( "$USER@$(hostname)" "$USER@$(hostname -s)" )
|
||||||
|
|
||||||
|
for n in "${hostnameArray[@]}"; do
|
||||||
if [[ "$(nix eval "$flake#homeConfigurations" --apply "x: x ? \"$n\"")" == "true" ]]; then
|
if [[ "$(nix eval "$flake#homeConfigurations" --apply "x: x ? \"$n\"")" == "true" ]]; then
|
||||||
name="$n"
|
name="$n"
|
||||||
if [[ -v VERBOSE ]]; then
|
if [[ -v VERBOSE ]]; then
|
||||||
|
|
217
home-manager/po/ar.po
Normal file
217
home-manager/po/ar.po
Normal file
|
@ -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 <EMAIL@ADDRESS>, YEAR.
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: Home Manager\n"
|
||||||
|
"Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n"
|
||||||
|
"POT-Creation-Date: 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 ""
|
|
@ -8,8 +8,8 @@ msgstr ""
|
||||||
"Project-Id-Version: Home Manager\n"
|
"Project-Id-Version: Home Manager\n"
|
||||||
"Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n"
|
"Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n"
|
||||||
"POT-Creation-Date: 2024-04-17 23:19+0200\n"
|
"POT-Creation-Date: 2024-04-17 23:19+0200\n"
|
||||||
"PO-Revision-Date: 2024-04-05 11:01+0000\n"
|
"PO-Revision-Date: 2024-08-07 17:09+0000\n"
|
||||||
"Last-Translator: Leix b <abone9999@gmail.com>\n"
|
"Last-Translator: Tomi Ockier <ockier1@gmail.com>\n"
|
||||||
"Language-Team: Catalan <https://hosted.weblate.org/projects/home-manager/cli/"
|
"Language-Team: Catalan <https://hosted.weblate.org/projects/home-manager/cli/"
|
||||||
"ca/>\n"
|
"ca/>\n"
|
||||||
"Language: ca\n"
|
"Language: ca\n"
|
||||||
|
@ -17,12 +17,12 @@ msgstr ""
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||||
"X-Generator: Weblate 5.5-dev\n"
|
"X-Generator: Weblate 5.7-dev\n"
|
||||||
|
|
||||||
#. translators: For example: "home-manager: missing argument for --cores"
|
#. translators: For example: "home-manager: missing argument for --cores"
|
||||||
#: home-manager/home-manager:16
|
#: home-manager/home-manager:16
|
||||||
msgid "%s: missing argument for %s"
|
msgid "%s: missing argument for %s"
|
||||||
msgstr ""
|
msgstr "%: falta un argument per %s"
|
||||||
|
|
||||||
#: home-manager/home-manager:64
|
#: home-manager/home-manager:64
|
||||||
msgid "No configuration file found at %s"
|
msgid "No configuration file found at %s"
|
||||||
|
|
258
home-manager/po/hu.po
Normal file
258
home-manager/po/hu.po
Normal file
|
@ -0,0 +1,258 @@
|
||||||
|
# SOME DESCRIPTIVE TITLE.
|
||||||
|
# Copyright (C) YEAR Home Manager contributors
|
||||||
|
# This file is distributed under the same license as the Home Manager package.
|
||||||
|
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: Home Manager\n"
|
||||||
|
"Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n"
|
||||||
|
"POT-Creation-Date: 2024-04-17 23:19+0200\n"
|
||||||
|
"PO-Revision-Date: 2024-09-02 17:09+0000\n"
|
||||||
|
"Last-Translator: Ferenci Ákos <synthetace@gmail.com>\n"
|
||||||
|
"Language-Team: Hungarian <https://hosted.weblate.org/projects/home-manager/"
|
||||||
|
"cli/hu/>\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.8-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 ""
|
||||||
|
"A tartalék Home Manager fájlútvonal %s elavult és fájl/könyvtár található "
|
||||||
|
"itt."
|
||||||
|
|
||||||
|
#. 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 ""
|
||||||
|
"A felmerült hiba elhárítására a következőket tegye:\n"
|
||||||
|
"\n"
|
||||||
|
"1. Közvetlen adja át a Home Manager-nek a fájlútvonalat, pl.:\n"
|
||||||
|
"\n"
|
||||||
|
" { programs.home-manager.path = \"%s\"; }\n"
|
||||||
|
"\n"
|
||||||
|
" sor konfigurációhoz való hozzáadásával.\n"
|
||||||
|
"\n"
|
||||||
|
" Amennyiben a Home Manager-t közvetlen importolja, használhatja a 'path' "
|
||||||
|
"paramétert\n"
|
||||||
|
"\n"
|
||||||
|
" pkgs.callPackage/path/tohome-manager-package{path = \"%s\"; }\n"
|
||||||
|
" a Home Manager csomag meghívásakor.\n"
|
||||||
|
"\n"
|
||||||
|
" 2. Távolítsa el az elavult fájlútvonalat.\n"
|
||||||
|
"\n"
|
||||||
|
" $ rm -r \"$s\""
|
||||||
|
|
||||||
|
#: home-manager/home-manager:146
|
||||||
|
msgid "Sanity checking Nix"
|
||||||
|
msgstr "Nix épségének ellenőrzése"
|
||||||
|
|
||||||
|
#: home-manager/home-manager:166
|
||||||
|
msgid "Could not find suitable profile directory, tried %s and %s"
|
||||||
|
msgstr ""
|
||||||
|
"Nem található megfelelő profil mappa, %s és %s útvonalak lettek kipróbálva."
|
||||||
|
|
||||||
|
#. 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 "Nem lehet a flake konfiguráció beállításait megtekinteni."
|
||||||
|
|
||||||
|
#: 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 ""
|
||||||
|
"Elkészült! A home-manager eszköz most már installálva van és a \n"
|
||||||
|
"\n"
|
||||||
|
" %s\n"
|
||||||
|
"\n"
|
||||||
|
"fájl szerkesztésével konfigurálhatja a Home Manager-t. \n"
|
||||||
|
"Futtassa a 'man home-configuration.nix' parancsot az összes opció "
|
||||||
|
"áttekintéséhez."
|
||||||
|
|
||||||
|
#. 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 ""
|
||||||
|
"Uh oh, az installáció nem sikerült! Kérem készítsen egy jelentést erről a \n"
|
||||||
|
"\n"
|
||||||
|
" %s\n"
|
||||||
|
"\n"
|
||||||
|
"helyen amennyiben a hiba a Home Manager miatt lépett fel."
|
||||||
|
|
||||||
|
#. 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] ""
|
||||||
|
"%d olvasatlan és releváns hírt kapott.\n"
|
||||||
|
"Olvassa el a \"%s news\" futattásával."
|
||||||
|
msgstr[1] ""
|
||||||
|
"%d olvasatlan és releváns hírt kapott.\n"
|
||||||
|
"Olvassa el őket a \"%s news\" futattásával."
|
||||||
|
|
||||||
|
#: home-manager/home-manager:586
|
||||||
|
msgid "Unknown \"news.display\" setting \"%s\"."
|
||||||
|
msgstr "Ismeretlen \"news.display\" opció \"%s\"."
|
||||||
|
|
||||||
|
#: home-manager/home-manager:594
|
||||||
|
#, sh-format
|
||||||
|
msgid "Please set the $EDITOR or $VISUAL environment variable"
|
||||||
|
msgstr "Kérem állítása be az $EDITOR vagy a $VISUAL környezeti változókat."
|
||||||
|
|
||||||
|
#: 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 "Nem található generáció a következő ID-val: %"
|
||||||
|
|
||||||
|
#: home-manager/home-manager:695
|
||||||
|
msgid "Cannot remove the current generation %s"
|
||||||
|
msgstr "A jelenlegi generáció %s nem eltávolítható"
|
||||||
|
|
||||||
|
#: 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 "Nincs lejárandó generáció"
|
||||||
|
|
||||||
|
#: home-manager/home-manager:729
|
||||||
|
msgid "No home-manager packages seem to be installed."
|
||||||
|
msgstr "Nem található installált Home Manager csomag"
|
||||||
|
|
||||||
|
#: 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 "Ez a művelet eltávolítja a Home Manager-t a rendszeréről."
|
||||||
|
|
||||||
|
#: home-manager/home-manager:838
|
||||||
|
msgid "This is a dry run, nothing will actually be uninstalled."
|
||||||
|
msgstr "Ez egy üres járat, semmi nem lesz valójában eltávolítva."
|
||||||
|
|
||||||
|
#: home-manager/home-manager:842
|
||||||
|
msgid "Really uninstall Home Manager?"
|
||||||
|
msgstr "Biztosan eltávolítja a Home Managert-t?"
|
||||||
|
|
||||||
|
#: home-manager/home-manager:848
|
||||||
|
msgid "Switching to empty Home Manager configuration..."
|
||||||
|
msgstr "Átváltás üres Home Manager konfigurációra..."
|
||||||
|
|
||||||
|
#: 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 eltávolítva, de a home.nix fájl érintetlenül maradt."
|
||||||
|
|
||||||
|
#: 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 ""
|
||||||
|
"Ez a származtatás nem építhető fel, kérlek futtasd nix-shell segítségével."
|
|
@ -8,8 +8,8 @@ msgstr ""
|
||||||
"Project-Id-Version: Home Manager\n"
|
"Project-Id-Version: Home Manager\n"
|
||||||
"Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n"
|
"Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n"
|
||||||
"POT-Creation-Date: 2024-04-17 23:19+0200\n"
|
"POT-Creation-Date: 2024-04-17 23:19+0200\n"
|
||||||
"PO-Revision-Date: 2024-02-16 22:01+0000\n"
|
"PO-Revision-Date: 2024-06-17 09:46+0000\n"
|
||||||
"Last-Translator: Robert Helgesson <robert@rycee.net>\n"
|
"Last-Translator: Mateusz P <medan1993@gmail.com>\n"
|
||||||
"Language-Team: Polish <https://hosted.weblate.org/projects/home-manager/cli/"
|
"Language-Team: Polish <https://hosted.weblate.org/projects/home-manager/cli/"
|
||||||
"pl/>\n"
|
"pl/>\n"
|
||||||
"Language: pl\n"
|
"Language: pl\n"
|
||||||
|
@ -18,12 +18,12 @@ msgstr ""
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
|
"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
|
||||||
"|| n%100>=20) ? 1 : 2);\n"
|
"|| 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"
|
#. translators: For example: "home-manager: missing argument for --cores"
|
||||||
#: home-manager/home-manager:16
|
#: home-manager/home-manager:16
|
||||||
msgid "%s: missing argument for %s"
|
msgid "%s: missing argument for %s"
|
||||||
msgstr ""
|
msgstr "%s: brakuje wartości dla %s"
|
||||||
|
|
||||||
#: home-manager/home-manager:64
|
#: home-manager/home-manager:64
|
||||||
msgid "No configuration file found at %s"
|
msgid "No configuration file found at %s"
|
||||||
|
@ -194,7 +194,7 @@ msgstr "Nieznane ustawienie „%s” „news.display”."
|
||||||
#: home-manager/home-manager:594
|
#: home-manager/home-manager:594
|
||||||
#, sh-format
|
#, sh-format
|
||||||
msgid "Please set the $EDITOR or $VISUAL environment variable"
|
msgid "Please set the $EDITOR or $VISUAL environment variable"
|
||||||
msgstr ""
|
msgstr "Proszę ustawić zmienną środowiskową $EDITOR lub $VISUAL"
|
||||||
|
|
||||||
#: home-manager/home-manager:612
|
#: home-manager/home-manager:612
|
||||||
msgid "Cannot run build in read-only directory"
|
msgid "Cannot run build in read-only directory"
|
||||||
|
|
|
@ -8,7 +8,7 @@ msgstr ""
|
||||||
"Project-Id-Version: Home Manager\n"
|
"Project-Id-Version: Home Manager\n"
|
||||||
"Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n"
|
"Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n"
|
||||||
"POT-Creation-Date: 2024-04-17 23:19+0200\n"
|
"POT-Creation-Date: 2024-04-17 23:19+0200\n"
|
||||||
"PO-Revision-Date: 2024-06-02 08:12+0000\n"
|
"PO-Revision-Date: 2024-08-01 04:09+0000\n"
|
||||||
"Last-Translator: goatastronaut0212 <goatastronaut0212@proton.me>\n"
|
"Last-Translator: goatastronaut0212 <goatastronaut0212@proton.me>\n"
|
||||||
"Language-Team: Vietnamese <https://hosted.weblate.org/projects/home-manager/"
|
"Language-Team: Vietnamese <https://hosted.weblate.org/projects/home-manager/"
|
||||||
"cli/vi/>\n"
|
"cli/vi/>\n"
|
||||||
|
@ -17,7 +17,7 @@ msgstr ""
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||||
"X-Generator: Weblate 5.6-dev\n"
|
"X-Generator: Weblate 5.7-dev\n"
|
||||||
|
|
||||||
#. translators: For example: "home-manager: missing argument for --cores"
|
#. translators: For example: "home-manager: missing argument for --cores"
|
||||||
#: home-manager/home-manager:16
|
#: home-manager/home-manager:16
|
||||||
|
@ -97,7 +97,7 @@ msgstr ""
|
||||||
|
|
||||||
#: home-manager/home-manager:146
|
#: home-manager/home-manager:146
|
||||||
msgid "Sanity checking Nix"
|
msgid "Sanity checking Nix"
|
||||||
msgstr "Kiểm tra độ hợp lệ của Nix"
|
msgstr "Kiểm tra hợp lệ của Nix"
|
||||||
|
|
||||||
#: home-manager/home-manager:166
|
#: home-manager/home-manager:166
|
||||||
msgid "Could not find suitable profile directory, tried %s and %s"
|
msgid "Could not find suitable profile directory, tried %s and %s"
|
||||||
|
@ -175,11 +175,12 @@ msgid_plural ""
|
||||||
"There are %d unread and relevant news items.\n"
|
"There are %d unread and relevant news items.\n"
|
||||||
"Read them by running the command \"%s news\"."
|
"Read them by running the command \"%s news\"."
|
||||||
msgstr[0] ""
|
msgstr[0] ""
|
||||||
msgstr[1] ""
|
"Có %d tin tức liên quan và chưa được đọc.\n"
|
||||||
|
"Để đọc nó hãy chạy lệnh \"%s news\"."
|
||||||
|
|
||||||
#: home-manager/home-manager:586
|
#: home-manager/home-manager:586
|
||||||
msgid "Unknown \"news.display\" setting \"%s\"."
|
msgid "Unknown \"news.display\" setting \"%s\"."
|
||||||
msgstr ""
|
msgstr "Không tồn tại \"news.display\" cấu hình \"%s\"."
|
||||||
|
|
||||||
#: home-manager/home-manager:594
|
#: home-manager/home-manager:594
|
||||||
#, sh-format
|
#, sh-format
|
||||||
|
@ -192,19 +193,19 @@ msgstr "Không thể chạy lệnh xây dựng trong thư mục chỉ cho phép
|
||||||
|
|
||||||
#: home-manager/home-manager:693
|
#: home-manager/home-manager:693
|
||||||
msgid "No generation with ID %s"
|
msgid "No generation with ID %s"
|
||||||
msgstr ""
|
msgstr "Không có thế hệ với ID %s"
|
||||||
|
|
||||||
#: home-manager/home-manager:695
|
#: home-manager/home-manager:695
|
||||||
msgid "Cannot remove the current generation %s"
|
msgid "Cannot remove the current generation %s"
|
||||||
msgstr ""
|
msgstr "Không thể xóa thể hệ hiện tại %s"
|
||||||
|
|
||||||
#: home-manager/home-manager:697
|
#: home-manager/home-manager:697
|
||||||
msgid "Removing generation %s"
|
msgid "Removing generation %s"
|
||||||
msgstr ""
|
msgstr "Đang xóa thế hệ %s"
|
||||||
|
|
||||||
#: home-manager/home-manager:718
|
#: home-manager/home-manager:718
|
||||||
msgid "No generations to expire"
|
msgid "No generations to expire"
|
||||||
msgstr ""
|
msgstr "Không có bất kỳ thế hệ nào hết hạn"
|
||||||
|
|
||||||
#: home-manager/home-manager:729
|
#: home-manager/home-manager:729
|
||||||
msgid "No home-manager packages seem to be installed."
|
msgid "No home-manager packages seem to be installed."
|
||||||
|
@ -237,10 +238,12 @@ msgstr "Tuyệt vời!"
|
||||||
#: home-manager/home-manager:868
|
#: home-manager/home-manager:868
|
||||||
msgid "Home Manager is uninstalled but your home.nix is left untouched."
|
msgid "Home Manager is uninstalled but your home.nix is left untouched."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
"Home Manager đã được gỡ cài đặt nhưng home.nix của bạn sẽ được giữ nguyên "
|
||||||
|
"vẹn."
|
||||||
|
|
||||||
#: home-manager/home-manager:1091
|
#: home-manager/home-manager:1091
|
||||||
msgid "expire-generations expects one argument, got %d."
|
msgid "expire-generations expects one argument, got %d."
|
||||||
msgstr ""
|
msgstr "expire-generations kỳ vọng 1 đối số, có %d."
|
||||||
|
|
||||||
#: home-manager/home-manager:1113
|
#: home-manager/home-manager:1113
|
||||||
msgid "Unknown command: %s"
|
msgid "Unknown command: %s"
|
||||||
|
|
|
@ -67,7 +67,7 @@ let
|
||||||
};
|
};
|
||||||
|
|
||||||
in {
|
in {
|
||||||
meta.maintainers = [ maintainers.polykernel maintainers.league ];
|
meta.maintainers = [ maintainers.league ];
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
(mkAliasOptionModule [ "xsession" "pointerCursor" "package" ] [
|
(mkAliasOptionModule [ "xsession" "pointerCursor" "package" ] [
|
||||||
|
|
|
@ -49,6 +49,12 @@
|
||||||
github = "bertof";
|
github = "bertof";
|
||||||
githubId = 9915675;
|
githubId = 9915675;
|
||||||
};
|
};
|
||||||
|
bricked = {
|
||||||
|
name = "Bricked";
|
||||||
|
email = "hello@bricked.dev";
|
||||||
|
github = "brckd";
|
||||||
|
githubId = 92804487;
|
||||||
|
};
|
||||||
CarlosLoboxyz = {
|
CarlosLoboxyz = {
|
||||||
name = "Carlos Lobo";
|
name = "Carlos Lobo";
|
||||||
email = "86011416+CarlosLoboxyz@users.noreply.github.com";
|
email = "86011416+CarlosLoboxyz@users.noreply.github.com";
|
||||||
|
@ -113,6 +119,13 @@
|
||||||
github = "jack5079";
|
github = "jack5079";
|
||||||
githubId = 29169102;
|
githubId = 29169102;
|
||||||
};
|
};
|
||||||
|
janik = {
|
||||||
|
name = "Janik";
|
||||||
|
email = "janik@aq0.de";
|
||||||
|
matrix = "@janik0:matrix.org";
|
||||||
|
github = "Janik-Haag";
|
||||||
|
githubId = 80165193;
|
||||||
|
};
|
||||||
jkarlson = {
|
jkarlson = {
|
||||||
email = "jekarlson@gmail.com";
|
email = "jekarlson@gmail.com";
|
||||||
github = "jkarlson";
|
github = "jkarlson";
|
||||||
|
@ -173,6 +186,13 @@
|
||||||
github = "iosmanthus";
|
github = "iosmanthus";
|
||||||
githubId = 16307070;
|
githubId = 16307070;
|
||||||
};
|
};
|
||||||
|
jonringer = {
|
||||||
|
email = "jonringer117@gmail.com";
|
||||||
|
matrix = "@jonringer:matrix.org";
|
||||||
|
github = "jonringer";
|
||||||
|
githubId = 7673602;
|
||||||
|
name = "Jonathan Ringer";
|
||||||
|
};
|
||||||
kalhauge = {
|
kalhauge = {
|
||||||
name = "Christian Gram Kalhauge";
|
name = "Christian Gram Kalhauge";
|
||||||
email = "kalhauge@users.noreply.github.com";
|
email = "kalhauge@users.noreply.github.com";
|
||||||
|
@ -201,6 +221,19 @@
|
||||||
github = "kubukoz";
|
github = "kubukoz";
|
||||||
githubId = 894884;
|
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 = {
|
loicreynier = {
|
||||||
name = "Loïc Reynier";
|
name = "Loïc Reynier";
|
||||||
email = "loic@loireynier.fr";
|
email = "loic@loireynier.fr";
|
||||||
|
|
|
@ -221,10 +221,9 @@ in {
|
||||||
|
|
||||||
config = mkIf cfg.enable (let
|
config = mkIf cfg.enable (let
|
||||||
gtkIni = optionalAttrs (cfg.font != null) {
|
gtkIni = optionalAttrs (cfg.font != null) {
|
||||||
gtk-font-name = let
|
gtk-font-name =
|
||||||
fontSize =
|
let fontSize = if cfg.font.size != null then cfg.font.size else 10;
|
||||||
optionalString (cfg.font.size != null) " ${toString cfg.font.size}";
|
in "${cfg.font.name} ${toString fontSize}";
|
||||||
in "${cfg.font.name}" + fontSize;
|
|
||||||
} // optionalAttrs (cfg.theme != null) { gtk-theme-name = cfg.theme.name; }
|
} // optionalAttrs (cfg.theme != null) { gtk-theme-name = cfg.theme.name; }
|
||||||
// optionalAttrs (cfg.iconTheme != null) {
|
// optionalAttrs (cfg.iconTheme != null) {
|
||||||
gtk-icon-theme-name = cfg.iconTheme.name;
|
gtk-icon-theme-name = cfg.iconTheme.name;
|
||||||
|
@ -245,10 +244,9 @@ in {
|
||||||
'' + cfg4.extraCss;
|
'' + cfg4.extraCss;
|
||||||
|
|
||||||
dconfIni = optionalAttrs (cfg.font != null) {
|
dconfIni = optionalAttrs (cfg.font != null) {
|
||||||
font-name = let
|
font-name =
|
||||||
fontSize =
|
let fontSize = if cfg.font.size != null then cfg.font.size else 10;
|
||||||
optionalString (cfg.font.size != null) " ${toString cfg.font.size}";
|
in "${cfg.font.name} ${toString fontSize}";
|
||||||
in "${cfg.font.name}" + fontSize;
|
|
||||||
} // optionalAttrs (cfg.theme != null) { gtk-theme = cfg.theme.name; }
|
} // optionalAttrs (cfg.theme != null) { gtk-theme = cfg.theme.name; }
|
||||||
// optionalAttrs (cfg.iconTheme != null) {
|
// optionalAttrs (cfg.iconTheme != null) {
|
||||||
icon-theme = cfg.iconTheme.name;
|
icon-theme = cfg.iconTheme.name;
|
||||||
|
|
|
@ -1673,6 +1673,53 @@ in {
|
||||||
Please migrate to the new option to suppress the generated warning.
|
Please migrate to the new option to suppress the generated warning.
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
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.
|
||||||
|
'';
|
||||||
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,15 +1,40 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
with lib;
|
|
||||||
|
|
||||||
let
|
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;
|
cfg = config.nix;
|
||||||
|
|
||||||
nixPackage = cfg.package;
|
nixPackage = cfg.package;
|
||||||
|
|
||||||
isNixAtLeast = versionAtLeast (getVersion nixPackage);
|
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";
|
nixConf = assert isNixAtLeast "2.2";
|
||||||
let
|
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. `<nixpkgs>`).
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
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 {
|
registry = mkOption {
|
||||||
type = types.attrsOf (types.submodule (let
|
type = types.attrsOf (types.submodule (let
|
||||||
inputAttrs = types.attrsOf
|
inputAttrs = types.attrsOf
|
||||||
|
@ -210,6 +276,19 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable (mkMerge [
|
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 != { }) {
|
(mkIf (cfg.registry != { }) {
|
||||||
xdg.configFile."nix/registry.json".source =
|
xdg.configFile."nix/registry.json".source =
|
||||||
jsonFormat.generate "registry.json" {
|
jsonFormat.generate "registry.json" {
|
||||||
|
@ -232,5 +311,5 @@ in {
|
||||||
})
|
})
|
||||||
]);
|
]);
|
||||||
|
|
||||||
meta.maintainers = [ maintainers.polykernel ];
|
meta.maintainers = [ ];
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,4 +29,19 @@ with lib;
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
config = {
|
||||||
|
# To make it easier for the end user to override the values in the
|
||||||
|
# configuration depending on the installation method, we set default values
|
||||||
|
# for the arguments that are defined in the NixOS/nix-darwin modules.
|
||||||
|
#
|
||||||
|
# Without these defaults, these attributes would simply not exist, and the
|
||||||
|
# module system can not inform modules about their non-existence; see
|
||||||
|
# https://github.com/NixOS/nixpkgs/issues/311709#issuecomment-2110861842
|
||||||
|
_module.args = {
|
||||||
|
osConfig = mkDefault null;
|
||||||
|
nixosConfig = mkDefault null;
|
||||||
|
darwinConfig = mkDefault null;
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,7 +51,7 @@ let
|
||||||
|
|
||||||
terminal = mkOption {
|
terminal = mkOption {
|
||||||
description = "Whether the program runs in a terminal window.";
|
description = "Whether the program runs in a terminal window.";
|
||||||
type = types.bool;
|
type = types.nullOr types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -70,6 +70,16 @@ in {
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
stateFile = mkOption {
|
||||||
|
type = fileType "xdg.stateFile" "<varname>xdg.stateHome</varname>"
|
||||||
|
cfg.stateHome;
|
||||||
|
default = { };
|
||||||
|
description = ''
|
||||||
|
Attribute set of files to link into the user's XDG
|
||||||
|
state home.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
stateHome = mkOption {
|
stateHome = mkOption {
|
||||||
type = types.path;
|
type = types.path;
|
||||||
defaultText = "~/.local/state";
|
defaultText = "~/.local/state";
|
||||||
|
@ -122,6 +132,8 @@ in {
|
||||||
cfg.configFile)
|
cfg.configFile)
|
||||||
(mapAttrs' (name: file: nameValuePair "${cfg.dataHome}/${name}" file)
|
(mapAttrs' (name: file: nameValuePair "${cfg.dataHome}/${name}" file)
|
||||||
cfg.dataFile)
|
cfg.dataFile)
|
||||||
|
(mapAttrs' (name: file: nameValuePair "${cfg.stateHome}/${name}" file)
|
||||||
|
cfg.stateFile)
|
||||||
{ "${cfg.cacheHome}/.keep".text = ""; }
|
{ "${cfg.cacheHome}/.keep".text = ""; }
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -274,6 +274,7 @@ let
|
||||||
./services/barrier.nix
|
./services/barrier.nix
|
||||||
./services/batsignal.nix
|
./services/batsignal.nix
|
||||||
./services/betterlockscreen.nix
|
./services/betterlockscreen.nix
|
||||||
|
./services/blanket.nix
|
||||||
./services/blueman-applet.nix
|
./services/blueman-applet.nix
|
||||||
./services/borgmatic.nix
|
./services/borgmatic.nix
|
||||||
./services/cachix-agent.nix
|
./services/cachix-agent.nix
|
||||||
|
@ -300,6 +301,7 @@ let
|
||||||
./services/fusuma.nix
|
./services/fusuma.nix
|
||||||
./services/getmail.nix
|
./services/getmail.nix
|
||||||
./services/git-sync.nix
|
./services/git-sync.nix
|
||||||
|
./services/glance.nix
|
||||||
./services/gnome-keyring.nix
|
./services/gnome-keyring.nix
|
||||||
./services/gpg-agent.nix
|
./services/gpg-agent.nix
|
||||||
./services/grobi.nix
|
./services/grobi.nix
|
||||||
|
|
113
modules/po/ar.po
Normal file
113
modules/po/ar.po
Normal file
|
@ -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 <EMAIL@ADDRESS>, YEAR.
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: Home Manager Modules\n"
|
||||||
|
"Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n"
|
||||||
|
"POT-Creation-Date: 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 ""
|
117
modules/po/hu.po
Normal file
117
modules/po/hu.po
Normal file
|
@ -0,0 +1,117 @@
|
||||||
|
# SOME DESCRIPTIVE TITLE.
|
||||||
|
# Copyright (C) YEAR Home Manager contributors
|
||||||
|
# This file is distributed under the same license as the Home Manager Modules package.
|
||||||
|
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: Home Manager Modules\n"
|
||||||
|
"Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n"
|
||||||
|
"POT-Creation-Date: 2024-04-17 23:19+0200\n"
|
||||||
|
"PO-Revision-Date: 2024-09-02 17:09+0000\n"
|
||||||
|
"Last-Translator: Ferenci Ákos <synthetace@gmail.com>\n"
|
||||||
|
"Language-Team: Hungarian <https://hosted.weblate.org/projects/home-manager/"
|
||||||
|
"modules/hu/>\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.8-dev\n"
|
||||||
|
|
||||||
|
#: modules/files.nix:191
|
||||||
|
msgid "Creating home file links in %s"
|
||||||
|
msgstr "Hivatkozások létrehozása itt: %s"
|
||||||
|
|
||||||
|
#: modules/files.nix:204
|
||||||
|
msgid "Cleaning up orphan links from %s"
|
||||||
|
msgstr "Árva hivatkozások kitakarítása innen: %s"
|
||||||
|
|
||||||
|
#: modules/files.nix:220
|
||||||
|
msgid "Creating profile generation %s"
|
||||||
|
msgstr "%s. profil generáció létrehozása"
|
||||||
|
|
||||||
|
#: modules/files.nix:237
|
||||||
|
msgid "No change so reusing latest profile generation %s"
|
||||||
|
msgstr "Nincs változás, legutóbbi %s. generáció lesz használva"
|
||||||
|
|
||||||
|
#: 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 ""
|
||||||
|
"Nem található megfelelő profil mappa, %s és %s útvonalak lettek kipróbálva."
|
||||||
|
|
||||||
|
#: 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 "Nix épségének ellenőrzése"
|
||||||
|
|
||||||
|
#: 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 ""
|
|
@ -8,17 +8,17 @@ msgstr ""
|
||||||
"Project-Id-Version: Home Manager Modules\n"
|
"Project-Id-Version: Home Manager Modules\n"
|
||||||
"Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n"
|
"Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n"
|
||||||
"POT-Creation-Date: 2024-04-17 23:19+0200\n"
|
"POT-Creation-Date: 2024-04-17 23:19+0200\n"
|
||||||
"PO-Revision-Date: 2023-05-03 19:48+0000\n"
|
"PO-Revision-Date: 2024-06-17 09:46+0000\n"
|
||||||
"Last-Translator: Eryk Michalak <gnu.ewm@protonmail.com>\n"
|
"Last-Translator: Mateusz P <medan1993@gmail.com>\n"
|
||||||
"Language-Team: Polish <https://hosted.weblate.org/projects/home-manager/"
|
"Language-Team: Polish <https://hosted.weblate.org/projects/home-manager/"
|
||||||
"modules/pl/>\n"
|
"modules/pl/>\n"
|
||||||
"Language: pl\n"
|
"Language: pl\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
"Plural-Forms: nplurals=3; plural=n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
|
"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
|
||||||
"|| n%100>=20) ? 1 : 2;\n"
|
"|| n%100>=20) ? 1 : 2);\n"
|
||||||
"X-Generator: Weblate 4.18-dev\n"
|
"X-Generator: Weblate 5.6-dev\n"
|
||||||
|
|
||||||
#: modules/files.nix:191
|
#: modules/files.nix:191
|
||||||
msgid "Creating home file links in %s"
|
msgid "Creating home file links in %s"
|
||||||
|
@ -112,10 +112,14 @@ msgstr ""
|
||||||
#: modules/lib-bash/activation-init.sh:127
|
#: modules/lib-bash/activation-init.sh:127
|
||||||
msgid "Error: USER is set to \"%s\" but we expect \"%s\""
|
msgid "Error: USER is set to \"%s\" but we expect \"%s\""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
"Błąd: Właściwość USER ma wartość \"%s\" podczas gdy spodziewana wartość to \""
|
||||||
|
"%s\""
|
||||||
|
|
||||||
#: modules/lib-bash/activation-init.sh:136
|
#: modules/lib-bash/activation-init.sh:136
|
||||||
msgid "Error: HOME is set to \"%s\" but we expect \"%s\""
|
msgid "Error: HOME is set to \"%s\" but we expect \"%s\""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
"Błąd: Właściwość HOME ma wartość \"%s\" podczas gdy spodziewana wartość to \""
|
||||||
|
"%s\""
|
||||||
|
|
||||||
#: modules/lib-bash/activation-init.sh:153
|
#: modules/lib-bash/activation-init.sh:153
|
||||||
msgid "Starting Home Manager activation"
|
msgid "Starting Home Manager activation"
|
||||||
|
|
|
@ -8,7 +8,7 @@ msgstr ""
|
||||||
"Project-Id-Version: Home Manager Modules\n"
|
"Project-Id-Version: Home Manager Modules\n"
|
||||||
"Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n"
|
"Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n"
|
||||||
"POT-Creation-Date: 2024-04-17 23:19+0200\n"
|
"POT-Creation-Date: 2024-04-17 23:19+0200\n"
|
||||||
"PO-Revision-Date: 2024-06-02 08:12+0000\n"
|
"PO-Revision-Date: 2024-08-01 04:09+0000\n"
|
||||||
"Last-Translator: goatastronaut0212 <goatastronaut0212@proton.me>\n"
|
"Last-Translator: goatastronaut0212 <goatastronaut0212@proton.me>\n"
|
||||||
"Language-Team: Vietnamese <https://hosted.weblate.org/projects/home-manager/"
|
"Language-Team: Vietnamese <https://hosted.weblate.org/projects/home-manager/"
|
||||||
"modules/vi/>\n"
|
"modules/vi/>\n"
|
||||||
|
@ -17,7 +17,7 @@ msgstr ""
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||||
"X-Generator: Weblate 5.6-dev\n"
|
"X-Generator: Weblate 5.7-dev\n"
|
||||||
|
|
||||||
#: modules/files.nix:191
|
#: modules/files.nix:191
|
||||||
msgid "Creating home file links in %s"
|
msgid "Creating home file links in %s"
|
||||||
|
@ -53,11 +53,11 @@ msgstr ""
|
||||||
|
|
||||||
#: modules/home-environment.nix:667
|
#: modules/home-environment.nix:667
|
||||||
msgid "Activating %s"
|
msgid "Activating %s"
|
||||||
msgstr ""
|
msgstr "Đang khởi động %s"
|
||||||
|
|
||||||
#: modules/lib-bash/activation-init.sh:22
|
#: modules/lib-bash/activation-init.sh:22
|
||||||
msgid "Migrating profile from %s to %s"
|
msgid "Migrating profile from %s to %s"
|
||||||
msgstr ""
|
msgstr "Chuyển đổi hồ sơ từ %s tới %s"
|
||||||
|
|
||||||
#: modules/lib-bash/activation-init.sh:54
|
#: modules/lib-bash/activation-init.sh:54
|
||||||
msgid "Could not find suitable profile directory, tried %s and %s"
|
msgid "Could not find suitable profile directory, tried %s and %s"
|
||||||
|
@ -85,11 +85,11 @@ msgstr ""
|
||||||
|
|
||||||
#: modules/lib-bash/activation-init.sh:127
|
#: modules/lib-bash/activation-init.sh:127
|
||||||
msgid "Error: USER is set to \"%s\" but we expect \"%s\""
|
msgid "Error: USER is set to \"%s\" but we expect \"%s\""
|
||||||
msgstr ""
|
msgstr "Lỗi: USER được đặt thành \"%s\" nhưng chúng tôi kỳ vọng \"%s\""
|
||||||
|
|
||||||
#: modules/lib-bash/activation-init.sh:136
|
#: modules/lib-bash/activation-init.sh:136
|
||||||
msgid "Error: HOME is set to \"%s\" but we expect \"%s\""
|
msgid "Error: HOME is set to \"%s\" but we expect \"%s\""
|
||||||
msgstr ""
|
msgstr "Lỗi: HOME được đặt thành \"%s\" nhưng chúng tôi kỳ vọng \"%s\""
|
||||||
|
|
||||||
#: modules/lib-bash/activation-init.sh:153
|
#: modules/lib-bash/activation-init.sh:153
|
||||||
msgid "Starting Home Manager activation"
|
msgid "Starting Home Manager activation"
|
||||||
|
@ -97,7 +97,7 @@ msgstr ""
|
||||||
|
|
||||||
#: modules/lib-bash/activation-init.sh:157
|
#: modules/lib-bash/activation-init.sh:157
|
||||||
msgid "Sanity checking Nix"
|
msgid "Sanity checking Nix"
|
||||||
msgstr "Kiểm tra độ hợp lệ của Nix"
|
msgstr "Kiểm tra hợp lệ của Nix"
|
||||||
|
|
||||||
#: modules/lib-bash/activation-init.sh:170
|
#: modules/lib-bash/activation-init.sh:170
|
||||||
msgid "This is a dry run"
|
msgid "This is a dry run"
|
||||||
|
|
|
@ -110,18 +110,18 @@ in {
|
||||||
programs.bash.initExtra = mkIf cfg.enableBashIntegration ''
|
programs.bash.initExtra = mkIf cfg.enableBashIntegration ''
|
||||||
if [[ :$SHELLOPTS: =~ :(vi|emacs): ]]; then
|
if [[ :$SHELLOPTS: =~ :(vi|emacs): ]]; then
|
||||||
source "${pkgs.bash-preexec}/share/bash/bash-preexec.sh"
|
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
|
fi
|
||||||
'';
|
'';
|
||||||
|
|
||||||
programs.zsh.initExtra = mkIf cfg.enableZshIntegration ''
|
programs.zsh.initExtra = mkIf cfg.enableZshIntegration ''
|
||||||
if [[ $options[zle] = on ]]; then
|
if [[ $options[zle] = on ]]; then
|
||||||
eval "$(${cfg.package}/bin/atuin init zsh ${flagsStr})"
|
eval "$(${lib.getExe cfg.package} init zsh ${flagsStr})"
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
|
|
||||||
programs.fish.interactiveShellInit = mkIf cfg.enableFishIntegration ''
|
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 {
|
programs.nushell = mkIf cfg.enableNushellIntegration {
|
||||||
|
@ -130,7 +130,9 @@ in {
|
||||||
if not ($atuin_cache | path exists) {
|
if not ($atuin_cache | path exists) {
|
||||||
mkdir $atuin_cache
|
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 = ''
|
extraConfig = ''
|
||||||
source ${config.xdg.cacheHome}/atuin/init.nu
|
source ${config.xdg.cacheHome}/atuin/init.nu
|
||||||
|
|
|
@ -29,6 +29,8 @@ in {
|
||||||
programs.bash = {
|
programs.bash = {
|
||||||
enable = mkEnableOption "GNU Bourne-Again SHell";
|
enable = mkEnableOption "GNU Bourne-Again SHell";
|
||||||
|
|
||||||
|
package = mkPackageOption pkgs "bash" { default = "bashInteractive"; };
|
||||||
|
|
||||||
enableCompletion = mkOption {
|
enableCompletion = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
default = true;
|
default = true;
|
||||||
|
@ -190,7 +192,7 @@ in {
|
||||||
HISTIGNORE = escapeShellArg (concatStringsSep ":" cfg.historyIgnore);
|
HISTIGNORE = escapeShellArg (concatStringsSep ":" cfg.historyIgnore);
|
||||||
}));
|
}));
|
||||||
in mkIf cfg.enable {
|
in mkIf cfg.enable {
|
||||||
home.packages = [ pkgs.bashInteractive ];
|
home.packages = [ cfg.package ];
|
||||||
|
|
||||||
home.file.".bash_profile".source = writeBashScript "bash_profile" ''
|
home.file.".bash_profile".source = writeBashScript "bash_profile" ''
|
||||||
# include .profile if it exists
|
# include .profile if it exists
|
||||||
|
|
|
@ -56,5 +56,5 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
meta.maintainers = [ maintainers.polykernel ];
|
meta.maintainers = [ ];
|
||||||
}
|
}
|
||||||
|
|
|
@ -95,6 +95,7 @@ in {
|
||||||
package = mkPackageOption pkgs "nix-direnv" { };
|
package = mkPackageOption pkgs "nix-direnv" { };
|
||||||
};
|
};
|
||||||
|
|
||||||
|
silent = mkEnableOption "silent mode, that is, disabling direnv logging";
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
@ -163,5 +164,7 @@ in {
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
'');
|
'');
|
||||||
|
|
||||||
|
home.sessionVariables = lib.mkIf cfg.silent { DIRENV_LOG_FORMAT = ""; };
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,6 +5,7 @@ with lib;
|
||||||
let
|
let
|
||||||
|
|
||||||
cfg = config.programs.eww;
|
cfg = config.programs.eww;
|
||||||
|
ewwCmd = "${cfg.package}/bin/eww";
|
||||||
|
|
||||||
in {
|
in {
|
||||||
meta.maintainers = [ hm.maintainers.mainrs ];
|
meta.maintainers = [ hm.maintainers.mainrs ];
|
||||||
|
@ -30,10 +31,40 @@ in {
|
||||||
{file}`$XDG_CONFIG_HOME/eww`.
|
{file}`$XDG_CONFIG_HOME/eww`.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enableBashIntegration = mkEnableOption "Bash integration" // {
|
||||||
|
default = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
enableZshIntegration = mkEnableOption "Zsh integration" // {
|
||||||
|
default = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
enableFishIntegration = mkEnableOption "Fish integration" // {
|
||||||
|
default = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
home.packages = [ cfg.package ];
|
home.packages = [ cfg.package ];
|
||||||
xdg.configFile."eww".source = cfg.configDir;
|
xdg.configFile."eww".source = cfg.configDir;
|
||||||
|
|
||||||
|
programs.bash.initExtra = mkIf cfg.enableBashIntegration ''
|
||||||
|
if [[ $TERM != "dumb" ]]; then
|
||||||
|
eval "$(${ewwCmd} shell-completions --shell bash)"
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
|
||||||
|
programs.zsh.initExtra = mkIf cfg.enableZshIntegration ''
|
||||||
|
if [[ $TERM != "dumb" ]]; then
|
||||||
|
eval "$(${ewwCmd} shell-completions --shell zsh)"
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
|
||||||
|
programs.fish.interactiveShellInit = mkIf cfg.enableFishIntegration ''
|
||||||
|
if test "$TERM" != "dumb"
|
||||||
|
eval "$(${ewwCmd} shell-completions --shell fish)"
|
||||||
|
end
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,7 +26,9 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
display = {
|
display = {
|
||||||
binaryPrefix = "si";
|
size = {
|
||||||
|
binaryPrefix = "si";
|
||||||
|
};
|
||||||
color = "blue";
|
color = "blue";
|
||||||
separator = " ";
|
separator = " ";
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,945 +1,51 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ lib, ... }:
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
let
|
let
|
||||||
|
|
||||||
inherit (pkgs.stdenv.hostPlatform) isDarwin;
|
modulePath = [ "programs" "firefox" ];
|
||||||
|
|
||||||
cfg = config.programs.firefox;
|
moduleName = concatStringsSep "." modulePath;
|
||||||
|
|
||||||
jsonFormat = pkgs.formats.json { };
|
mkFirefoxModule = import ./firefox/mkFirefoxModule.nix;
|
||||||
|
|
||||||
mozillaConfigPath =
|
|
||||||
if isDarwin then "Library/Application Support/Mozilla" else ".mozilla";
|
|
||||||
|
|
||||||
firefoxConfigPath = if isDarwin then
|
|
||||||
"Library/Application Support/Firefox"
|
|
||||||
else
|
|
||||||
"${mozillaConfigPath}/firefox";
|
|
||||||
|
|
||||||
profilesPath =
|
|
||||||
if isDarwin then "${firefoxConfigPath}/Profiles" else firefoxConfigPath;
|
|
||||||
|
|
||||||
nativeMessagingHostsPath = if isDarwin then
|
|
||||||
"${mozillaConfigPath}/NativeMessagingHosts"
|
|
||||||
else
|
|
||||||
"${mozillaConfigPath}/native-messaging-hosts";
|
|
||||||
|
|
||||||
nativeMessagingHostsJoined = pkgs.symlinkJoin {
|
|
||||||
name = "ff_native-messaging-hosts";
|
|
||||||
paths = [
|
|
||||||
# Link a .keep file to keep the directory around
|
|
||||||
(pkgs.writeTextDir "lib/mozilla/native-messaging-hosts/.keep" "")
|
|
||||||
# Link package configured native messaging hosts (entire Firefox actually)
|
|
||||||
cfg.finalPackage
|
|
||||||
]
|
|
||||||
# Link user configured native messaging hosts
|
|
||||||
++ cfg.nativeMessagingHosts;
|
|
||||||
};
|
|
||||||
|
|
||||||
# The extensions path shared by all profiles; will not be supported
|
|
||||||
# by future Firefox versions.
|
|
||||||
extensionPath = "extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}";
|
|
||||||
|
|
||||||
profiles = flip mapAttrs' cfg.profiles (_: profile:
|
|
||||||
nameValuePair "Profile${toString profile.id}" {
|
|
||||||
Name = profile.name;
|
|
||||||
Path = if isDarwin then "Profiles/${profile.path}" else profile.path;
|
|
||||||
IsRelative = 1;
|
|
||||||
Default = if profile.isDefault then 1 else 0;
|
|
||||||
}) // {
|
|
||||||
General = { StartWithLastProfile = 1; };
|
|
||||||
};
|
|
||||||
|
|
||||||
profilesIni = generators.toINI { } profiles;
|
|
||||||
|
|
||||||
userPrefValue = pref:
|
|
||||||
builtins.toJSON (if isBool pref || isInt pref || isString pref then
|
|
||||||
pref
|
|
||||||
else
|
|
||||||
builtins.toJSON pref);
|
|
||||||
|
|
||||||
mkUserJs = prefs: extraPrefs: bookmarks:
|
|
||||||
let
|
|
||||||
prefs' = lib.optionalAttrs ([ ] != bookmarks) {
|
|
||||||
"browser.bookmarks.file" = toString (firefoxBookmarksFile bookmarks);
|
|
||||||
"browser.places.importBookmarksHTML" = true;
|
|
||||||
} // prefs;
|
|
||||||
in ''
|
|
||||||
// Generated by Home Manager.
|
|
||||||
|
|
||||||
${concatStrings (mapAttrsToList (name: value: ''
|
|
||||||
user_pref("${name}", ${userPrefValue value});
|
|
||||||
'') prefs')}
|
|
||||||
|
|
||||||
${extraPrefs}
|
|
||||||
'';
|
|
||||||
|
|
||||||
mkContainersJson = containers:
|
|
||||||
let
|
|
||||||
containerToIdentity = _: container: {
|
|
||||||
userContextId = container.id;
|
|
||||||
name = container.name;
|
|
||||||
icon = container.icon;
|
|
||||||
color = container.color;
|
|
||||||
public = true;
|
|
||||||
};
|
|
||||||
in ''
|
|
||||||
${builtins.toJSON {
|
|
||||||
version = 4;
|
|
||||||
lastUserContextId =
|
|
||||||
elemAt (mapAttrsToList (_: container: container.id) containers) 0;
|
|
||||||
identities = mapAttrsToList containerToIdentity containers ++ [
|
|
||||||
{
|
|
||||||
userContextId = 4294967294; # 2^32 - 2
|
|
||||||
name = "userContextIdInternal.thumbnail";
|
|
||||||
icon = "";
|
|
||||||
color = "";
|
|
||||||
accessKey = "";
|
|
||||||
public = false;
|
|
||||||
}
|
|
||||||
{
|
|
||||||
userContextId = 4294967295; # 2^32 - 1
|
|
||||||
name = "userContextIdInternal.webextStorageLocal";
|
|
||||||
icon = "";
|
|
||||||
color = "";
|
|
||||||
accessKey = "";
|
|
||||||
public = false;
|
|
||||||
}
|
|
||||||
];
|
|
||||||
}}
|
|
||||||
'';
|
|
||||||
|
|
||||||
firefoxBookmarksFile = bookmarks:
|
|
||||||
let
|
|
||||||
indent = level:
|
|
||||||
lib.concatStringsSep "" (map (lib.const " ") (lib.range 1 level));
|
|
||||||
|
|
||||||
bookmarkToHTML = indentLevel: bookmark:
|
|
||||||
''
|
|
||||||
${indent indentLevel}<DT><A HREF="${
|
|
||||||
escapeXML bookmark.url
|
|
||||||
}" ADD_DATE="1" LAST_MODIFIED="1"${
|
|
||||||
lib.optionalString (bookmark.keyword != null)
|
|
||||||
" SHORTCUTURL=\"${escapeXML bookmark.keyword}\""
|
|
||||||
}${
|
|
||||||
lib.optionalString (bookmark.tags != [ ])
|
|
||||||
" TAGS=\"${escapeXML (concatStringsSep "," bookmark.tags)}\""
|
|
||||||
}>${escapeXML bookmark.name}</A>'';
|
|
||||||
|
|
||||||
directoryToHTML = indentLevel: directory: ''
|
|
||||||
${indent indentLevel}<DT>${
|
|
||||||
if directory.toolbar then
|
|
||||||
''
|
|
||||||
<H3 ADD_DATE="1" LAST_MODIFIED="1" PERSONAL_TOOLBAR_FOLDER="true">Bookmarks Toolbar''
|
|
||||||
else
|
|
||||||
''<H3 ADD_DATE="1" LAST_MODIFIED="1">${escapeXML directory.name}''
|
|
||||||
}</H3>
|
|
||||||
${indent indentLevel}<DL><p>
|
|
||||||
${allItemsToHTML (indentLevel + 1) directory.bookmarks}
|
|
||||||
${indent indentLevel}</DL><p>'';
|
|
||||||
|
|
||||||
itemToHTMLOrRecurse = indentLevel: item:
|
|
||||||
if item ? "url" then
|
|
||||||
bookmarkToHTML indentLevel item
|
|
||||||
else
|
|
||||||
directoryToHTML indentLevel item;
|
|
||||||
|
|
||||||
allItemsToHTML = indentLevel: bookmarks:
|
|
||||||
lib.concatStringsSep "\n"
|
|
||||||
(map (itemToHTMLOrRecurse indentLevel) bookmarks);
|
|
||||||
|
|
||||||
bookmarkEntries = allItemsToHTML 1 bookmarks;
|
|
||||||
in pkgs.writeText "firefox-bookmarks.html" ''
|
|
||||||
<!DOCTYPE NETSCAPE-Bookmark-file-1>
|
|
||||||
<!-- This is an automatically generated file.
|
|
||||||
It will be read and overwritten.
|
|
||||||
DO NOT EDIT! -->
|
|
||||||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
|
|
||||||
<TITLE>Bookmarks</TITLE>
|
|
||||||
<H1>Bookmarks Menu</H1>
|
|
||||||
<DL><p>
|
|
||||||
${bookmarkEntries}
|
|
||||||
</DL>
|
|
||||||
'';
|
|
||||||
|
|
||||||
mkNoDuplicateAssertion = entities: entityKind:
|
|
||||||
(let
|
|
||||||
# Return an attribute set with entity IDs as keys and a list of
|
|
||||||
# entity names with corresponding ID as value. An ID is present in
|
|
||||||
# the result only if more than one entity has it. The argument
|
|
||||||
# entities is a list of AttrSet of one id/name pair.
|
|
||||||
findDuplicateIds = entities:
|
|
||||||
filterAttrs (_entityId: entityNames: length entityNames != 1)
|
|
||||||
(zipAttrs entities);
|
|
||||||
|
|
||||||
duplicates = findDuplicateIds (mapAttrsToList
|
|
||||||
(entityName: entity: { "${toString entity.id}" = entityName; })
|
|
||||||
entities);
|
|
||||||
|
|
||||||
mkMsg = entityId: entityNames:
|
|
||||||
" - ID ${entityId} is used by " + concatStringsSep ", " entityNames;
|
|
||||||
in {
|
|
||||||
assertion = duplicates == { };
|
|
||||||
message = ''
|
|
||||||
Must not have a Firefox ${entityKind} with an existing ID but
|
|
||||||
'' + concatStringsSep "\n" (mapAttrsToList mkMsg duplicates);
|
|
||||||
});
|
|
||||||
|
|
||||||
wrapPackage = package:
|
|
||||||
let
|
|
||||||
# The configuration expected by the Firefox wrapper.
|
|
||||||
fcfg = { enableGnomeExtensions = cfg.enableGnomeExtensions; };
|
|
||||||
|
|
||||||
# A bit of hackery to force a config into the wrapper.
|
|
||||||
browserName =
|
|
||||||
package.browserName or (builtins.parseDrvName package.name).name;
|
|
||||||
|
|
||||||
# The configuration expected by the Firefox wrapper builder.
|
|
||||||
bcfg = setAttrByPath [ browserName ] fcfg;
|
|
||||||
|
|
||||||
in if package == null then
|
|
||||||
null
|
|
||||||
else if isDarwin then
|
|
||||||
package
|
|
||||||
else if versionAtLeast config.home.stateVersion "19.09" then
|
|
||||||
package.override (old: {
|
|
||||||
cfg = old.cfg or { } // fcfg;
|
|
||||||
extraPolicies = (old.extraPolicies or { }) // cfg.policies;
|
|
||||||
})
|
|
||||||
else
|
|
||||||
(pkgs.wrapFirefox.override { config = bcfg; }) package { };
|
|
||||||
|
|
||||||
in {
|
in {
|
||||||
meta.maintainers = [ maintainers.rycee maintainers.kira-bruneau ];
|
meta.maintainers =
|
||||||
|
[ maintainers.rycee maintainers.kira-bruneau hm.maintainers.bricked ];
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
(mkRemovedOptionModule [ "programs" "firefox" "extensions" ] ''
|
(mkFirefoxModule {
|
||||||
|
inherit modulePath;
|
||||||
|
name = "Firefox";
|
||||||
|
wrappedPackageName = "firefox";
|
||||||
|
unwrappedPackageName = "firefox-unwrapped";
|
||||||
|
visible = true;
|
||||||
|
|
||||||
|
platforms.linux = rec {
|
||||||
|
vendorPath = ".mozilla";
|
||||||
|
configPath = "${vendorPath}/firefox";
|
||||||
|
};
|
||||||
|
platforms.darwin = {
|
||||||
|
vendorPath = "Library/Application Support/Mozilla";
|
||||||
|
configPath = "Library/Application Support/Firefox";
|
||||||
|
};
|
||||||
|
})
|
||||||
|
|
||||||
|
(mkRemovedOptionModule (modulePath ++ [ "extensions" ]) ''
|
||||||
|
|
||||||
Extensions are now managed per-profile. That is, change from
|
Extensions are now managed per-profile. That is, change from
|
||||||
|
|
||||||
programs.firefox.extensions = [ foo bar ];
|
${moduleName}.extensions = [ foo bar ];
|
||||||
|
|
||||||
to
|
to
|
||||||
|
|
||||||
programs.firefox.profiles.myprofile.extensions = [ foo bar ];'')
|
${moduleName}.profiles.myprofile.extensions = [ foo bar ];'')
|
||||||
(mkRemovedOptionModule [ "programs" "firefox" "enableAdobeFlash" ]
|
(mkRemovedOptionModule (modulePath ++ [ "enableAdobeFlash" ])
|
||||||
"Support for this option has been removed.")
|
"Support for this option has been removed.")
|
||||||
(mkRemovedOptionModule [ "programs" "firefox" "enableGoogleTalk" ]
|
(mkRemovedOptionModule (modulePath ++ [ "enableGoogleTalk" ])
|
||||||
"Support for this option has been removed.")
|
"Support for this option has been removed.")
|
||||||
(mkRemovedOptionModule [ "programs" "firefox" "enableIcedTea" ]
|
(mkRemovedOptionModule (modulePath ++ [ "enableIcedTea" ])
|
||||||
"Support for this option has been removed.")
|
"Support for this option has been removed.")
|
||||||
];
|
];
|
||||||
|
|
||||||
options = {
|
|
||||||
programs.firefox = {
|
|
||||||
enable = mkEnableOption "Firefox";
|
|
||||||
|
|
||||||
package = mkOption {
|
|
||||||
type = with types; nullOr package;
|
|
||||||
default = if versionAtLeast config.home.stateVersion "19.09" then
|
|
||||||
pkgs.firefox
|
|
||||||
else
|
|
||||||
pkgs.firefox-unwrapped;
|
|
||||||
defaultText = literalExpression "pkgs.firefox";
|
|
||||||
example = literalExpression ''
|
|
||||||
pkgs.firefox.override {
|
|
||||||
# See nixpkgs' firefox/wrapper.nix to check which options you can use
|
|
||||||
nativeMessagingHosts = [
|
|
||||||
# Gnome shell native connector
|
|
||||||
pkgs.gnome-browser-connector
|
|
||||||
# Tridactyl native connector
|
|
||||||
pkgs.tridactyl-native
|
|
||||||
];
|
|
||||||
}
|
|
||||||
'';
|
|
||||||
description = ''
|
|
||||||
The Firefox package to use. If state version ≥ 19.09 then
|
|
||||||
this should be a wrapped Firefox package. For earlier state
|
|
||||||
versions it should be an unwrapped Firefox package.
|
|
||||||
Set to `null` to disable installing Firefox.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
nativeMessagingHosts = mkOption {
|
|
||||||
type = types.listOf types.package;
|
|
||||||
default = [ ];
|
|
||||||
description = ''
|
|
||||||
Additional packages containing native messaging hosts that should be
|
|
||||||
made available to Firefox extensions.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
finalPackage = mkOption {
|
|
||||||
type = with types; nullOr package;
|
|
||||||
readOnly = true;
|
|
||||||
description = "Resulting Firefox package.";
|
|
||||||
};
|
|
||||||
|
|
||||||
policies = mkOption {
|
|
||||||
type = types.attrsOf jsonFormat.type;
|
|
||||||
default = { };
|
|
||||||
description =
|
|
||||||
"[See list of policies](https://mozilla.github.io/policy-templates/).";
|
|
||||||
example = {
|
|
||||||
DefaultDownloadDirectory = "\${home}/Downloads";
|
|
||||||
BlockAboutConfig = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
profiles = mkOption {
|
|
||||||
type = types.attrsOf (types.submodule ({ config, name, ... }: {
|
|
||||||
options = {
|
|
||||||
name = mkOption {
|
|
||||||
type = types.str;
|
|
||||||
default = name;
|
|
||||||
description = "Profile name.";
|
|
||||||
};
|
|
||||||
|
|
||||||
id = mkOption {
|
|
||||||
type = types.ints.unsigned;
|
|
||||||
default = 0;
|
|
||||||
description = ''
|
|
||||||
Profile ID. This should be set to a unique number per profile.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
settings = mkOption {
|
|
||||||
type = types.attrsOf (jsonFormat.type // {
|
|
||||||
description =
|
|
||||||
"Firefox preference (int, bool, string, and also attrs, list, float as a JSON string)";
|
|
||||||
});
|
|
||||||
default = { };
|
|
||||||
example = literalExpression ''
|
|
||||||
{
|
|
||||||
"browser.startup.homepage" = "https://nixos.org";
|
|
||||||
"browser.search.region" = "GB";
|
|
||||||
"browser.search.isUS" = false;
|
|
||||||
"distribution.searchplugins.defaultLocale" = "en-GB";
|
|
||||||
"general.useragent.locale" = "en-GB";
|
|
||||||
"browser.bookmarks.showMobileBookmarks" = true;
|
|
||||||
"browser.newtabpage.pinned" = [{
|
|
||||||
title = "NixOS";
|
|
||||||
url = "https://nixos.org";
|
|
||||||
}];
|
|
||||||
}
|
|
||||||
'';
|
|
||||||
description = ''
|
|
||||||
Attribute set of Firefox preferences.
|
|
||||||
|
|
||||||
Firefox only supports int, bool, and string types for
|
|
||||||
preferences, but home-manager will automatically
|
|
||||||
convert all other JSON-compatible values into strings.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
extraConfig = mkOption {
|
|
||||||
type = types.lines;
|
|
||||||
default = "";
|
|
||||||
description = ''
|
|
||||||
Extra preferences to add to {file}`user.js`.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
userChrome = mkOption {
|
|
||||||
type = types.lines;
|
|
||||||
default = "";
|
|
||||||
description = "Custom Firefox user chrome CSS.";
|
|
||||||
example = ''
|
|
||||||
/* Hide tab bar in FF Quantum */
|
|
||||||
@-moz-document url("chrome://browser/content/browser.xul") {
|
|
||||||
#TabsToolbar {
|
|
||||||
visibility: collapse !important;
|
|
||||||
margin-bottom: 21px !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
#sidebar-box[sidebarcommand="treestyletab_piro_sakura_ne_jp-sidebar-action"] #sidebar-header {
|
|
||||||
visibility: collapse !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
userContent = mkOption {
|
|
||||||
type = types.lines;
|
|
||||||
default = "";
|
|
||||||
description = "Custom Firefox user content CSS.";
|
|
||||||
example = ''
|
|
||||||
/* Hide scrollbar in FF Quantum */
|
|
||||||
*{scrollbar-width:none !important}
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
bookmarks = mkOption {
|
|
||||||
type = let
|
|
||||||
bookmarkSubmodule = types.submodule ({ config, name, ... }: {
|
|
||||||
options = {
|
|
||||||
name = mkOption {
|
|
||||||
type = types.str;
|
|
||||||
default = name;
|
|
||||||
description = "Bookmark name.";
|
|
||||||
};
|
|
||||||
|
|
||||||
tags = mkOption {
|
|
||||||
type = types.listOf types.str;
|
|
||||||
default = [ ];
|
|
||||||
description = "Bookmark tags.";
|
|
||||||
};
|
|
||||||
|
|
||||||
keyword = mkOption {
|
|
||||||
type = types.nullOr types.str;
|
|
||||||
default = null;
|
|
||||||
description = "Bookmark search keyword.";
|
|
||||||
};
|
|
||||||
|
|
||||||
url = mkOption {
|
|
||||||
type = types.str;
|
|
||||||
description = "Bookmark url, use %s for search terms.";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}) // {
|
|
||||||
description = "bookmark submodule";
|
|
||||||
};
|
|
||||||
|
|
||||||
bookmarkType = types.addCheck bookmarkSubmodule (x: x ? "url");
|
|
||||||
|
|
||||||
directoryType = types.submodule ({ config, name, ... }: {
|
|
||||||
options = {
|
|
||||||
name = mkOption {
|
|
||||||
type = types.str;
|
|
||||||
default = name;
|
|
||||||
description = "Directory name.";
|
|
||||||
};
|
|
||||||
|
|
||||||
bookmarks = mkOption {
|
|
||||||
type = types.listOf nodeType;
|
|
||||||
default = [ ];
|
|
||||||
description = "Bookmarks within directory.";
|
|
||||||
};
|
|
||||||
|
|
||||||
toolbar = mkOption {
|
|
||||||
type = types.bool;
|
|
||||||
default = false;
|
|
||||||
description = ''
|
|
||||||
Make this the toolbar directory. Note, this does _not_
|
|
||||||
mean that this directory will be added to the toolbar,
|
|
||||||
this directory _is_ the toolbar.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}) // {
|
|
||||||
description = "directory submodule";
|
|
||||||
};
|
|
||||||
|
|
||||||
nodeType = types.either bookmarkType directoryType;
|
|
||||||
in with types;
|
|
||||||
coercedTo (attrsOf nodeType) attrValues (listOf nodeType);
|
|
||||||
default = [ ];
|
|
||||||
example = literalExpression ''
|
|
||||||
[
|
|
||||||
{
|
|
||||||
name = "wikipedia";
|
|
||||||
tags = [ "wiki" ];
|
|
||||||
keyword = "wiki";
|
|
||||||
url = "https://en.wikipedia.org/wiki/Special:Search?search=%s&go=Go";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "kernel.org";
|
|
||||||
url = "https://www.kernel.org";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "Nix sites";
|
|
||||||
toolbar = true;
|
|
||||||
bookmarks = [
|
|
||||||
{
|
|
||||||
name = "homepage";
|
|
||||||
url = "https://nixos.org/";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "wiki";
|
|
||||||
tags = [ "wiki" "nix" ];
|
|
||||||
url = "https://wiki.nixos.org/";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
}
|
|
||||||
]
|
|
||||||
'';
|
|
||||||
description = ''
|
|
||||||
Preloaded bookmarks. Note, this may silently overwrite any
|
|
||||||
previously existing bookmarks!
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
path = mkOption {
|
|
||||||
type = types.str;
|
|
||||||
default = name;
|
|
||||||
description = "Profile path.";
|
|
||||||
};
|
|
||||||
|
|
||||||
isDefault = mkOption {
|
|
||||||
type = types.bool;
|
|
||||||
default = config.id == 0;
|
|
||||||
defaultText = "true if profile ID is 0";
|
|
||||||
description = "Whether this is a default profile.";
|
|
||||||
};
|
|
||||||
|
|
||||||
search = {
|
|
||||||
force = mkOption {
|
|
||||||
type = with types; bool;
|
|
||||||
default = false;
|
|
||||||
description = ''
|
|
||||||
Whether to force replace the existing search
|
|
||||||
configuration. This is recommended since Firefox will
|
|
||||||
replace the symlink for the search configuration on every
|
|
||||||
launch, but note that you'll lose any existing
|
|
||||||
configuration by enabling this.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
default = mkOption {
|
|
||||||
type = with types; nullOr str;
|
|
||||||
default = null;
|
|
||||||
example = "DuckDuckGo";
|
|
||||||
description = ''
|
|
||||||
The default search engine used in the address bar and search bar.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
privateDefault = mkOption {
|
|
||||||
type = with types; nullOr str;
|
|
||||||
default = null;
|
|
||||||
example = "DuckDuckGo";
|
|
||||||
description = ''
|
|
||||||
The default search engine used in the Private Browsing.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
order = mkOption {
|
|
||||||
type = with types; uniq (listOf str);
|
|
||||||
default = [ ];
|
|
||||||
example = [ "DuckDuckGo" "Google" ];
|
|
||||||
description = ''
|
|
||||||
The order the search engines are listed in. Any engines
|
|
||||||
that aren't included in this list will be listed after
|
|
||||||
these in an unspecified order.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
engines = mkOption {
|
|
||||||
type = with types; attrsOf (attrsOf jsonFormat.type);
|
|
||||||
default = { };
|
|
||||||
example = literalExpression ''
|
|
||||||
{
|
|
||||||
"Nix Packages" = {
|
|
||||||
urls = [{
|
|
||||||
template = "https://search.nixos.org/packages";
|
|
||||||
params = [
|
|
||||||
{ name = "type"; value = "packages"; }
|
|
||||||
{ name = "query"; value = "{searchTerms}"; }
|
|
||||||
];
|
|
||||||
}];
|
|
||||||
|
|
||||||
icon = "''${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
|
|
||||||
definedAliases = [ "@np" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
"NixOS Wiki" = {
|
|
||||||
urls = [{ template = "https://wiki.nixos.org/index.php?search={searchTerms}"; }];
|
|
||||||
iconUpdateURL = "https://wiki.nixos.org/favicon.png";
|
|
||||||
updateInterval = 24 * 60 * 60 * 1000; # every day
|
|
||||||
definedAliases = [ "@nw" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
"Bing".metaData.hidden = true;
|
|
||||||
"Google".metaData.alias = "@g"; # builtin engines only support specifying one additional alias
|
|
||||||
}
|
|
||||||
'';
|
|
||||||
description = ''
|
|
||||||
Attribute set of search engine configurations. Engines
|
|
||||||
that only have {var}`metaData` specified will
|
|
||||||
be treated as builtin to Firefox.
|
|
||||||
|
|
||||||
See [SearchEngine.jsm](https://searchfox.org/mozilla-central/rev/669329e284f8e8e2bb28090617192ca9b4ef3380/toolkit/components/search/SearchEngine.jsm#1138-1177)
|
|
||||||
in Firefox's source for available options. We maintain a
|
|
||||||
mapping to let you specify all options in the referenced
|
|
||||||
link without underscores, but it may fall out of date with
|
|
||||||
future options.
|
|
||||||
|
|
||||||
Note, {var}`icon` is also a special option
|
|
||||||
added by Home Manager to make it convenient to specify
|
|
||||||
absolute icon paths.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
containersForce = mkOption {
|
|
||||||
type = types.bool;
|
|
||||||
default = false;
|
|
||||||
description = ''
|
|
||||||
Whether to force replace the existing containers
|
|
||||||
configuration. This is recommended since Firefox will
|
|
||||||
replace the symlink on every launch, but note that you'll
|
|
||||||
lose any existing configuration by enabling this.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
containers = mkOption {
|
|
||||||
type = types.attrsOf (types.submodule ({ name, ... }: {
|
|
||||||
options = {
|
|
||||||
name = mkOption {
|
|
||||||
type = types.str;
|
|
||||||
default = name;
|
|
||||||
description = "Container name, e.g., shopping.";
|
|
||||||
};
|
|
||||||
|
|
||||||
id = mkOption {
|
|
||||||
type = types.ints.unsigned;
|
|
||||||
default = 0;
|
|
||||||
description = ''
|
|
||||||
Container ID. This should be set to a unique number per container in this profile.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
# List of colors at
|
|
||||||
# https://searchfox.org/mozilla-central/rev/5ad226c7379b0564c76dc3b54b44985356f94c5a/toolkit/components/extensions/parent/ext-contextualIdentities.js#32
|
|
||||||
color = mkOption {
|
|
||||||
type = types.enum [
|
|
||||||
"blue"
|
|
||||||
"turquoise"
|
|
||||||
"green"
|
|
||||||
"yellow"
|
|
||||||
"orange"
|
|
||||||
"red"
|
|
||||||
"pink"
|
|
||||||
"purple"
|
|
||||||
"toolbar"
|
|
||||||
];
|
|
||||||
default = "pink";
|
|
||||||
description = "Container color.";
|
|
||||||
};
|
|
||||||
|
|
||||||
icon = mkOption {
|
|
||||||
type = types.enum [
|
|
||||||
"briefcase"
|
|
||||||
"cart"
|
|
||||||
"circle"
|
|
||||||
"dollar"
|
|
||||||
"fence"
|
|
||||||
"fingerprint"
|
|
||||||
"gift"
|
|
||||||
"vacation"
|
|
||||||
"food"
|
|
||||||
"fruit"
|
|
||||||
"pet"
|
|
||||||
"tree"
|
|
||||||
"chill"
|
|
||||||
];
|
|
||||||
default = "fruit";
|
|
||||||
description = "Container icon.";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}));
|
|
||||||
default = { };
|
|
||||||
example = {
|
|
||||||
"shopping" = {
|
|
||||||
id = 1;
|
|
||||||
color = "blue";
|
|
||||||
icon = "cart";
|
|
||||||
};
|
|
||||||
"dangerous" = {
|
|
||||||
id = 2;
|
|
||||||
color = "red";
|
|
||||||
icon = "fruit";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
description = ''
|
|
||||||
Attribute set of container configurations. See
|
|
||||||
[Multi-Account
|
|
||||||
Containers](https://support.mozilla.org/en-US/kb/containers)
|
|
||||||
for more information.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
extensions = mkOption {
|
|
||||||
type = types.listOf types.package;
|
|
||||||
default = [ ];
|
|
||||||
example = literalExpression ''
|
|
||||||
with pkgs.nur.repos.rycee.firefox-addons; [
|
|
||||||
privacy-badger
|
|
||||||
]
|
|
||||||
'';
|
|
||||||
description = ''
|
|
||||||
List of Firefox add-on packages to install for this profile.
|
|
||||||
Some pre-packaged add-ons are accessible from the
|
|
||||||
[Nix User Repository](https://github.com/nix-community/NUR).
|
|
||||||
Once you have NUR installed run
|
|
||||||
|
|
||||||
```console
|
|
||||||
$ nix-env -f '<nixpkgs>' -qaP -A nur.repos.rycee.firefox-addons
|
|
||||||
```
|
|
||||||
|
|
||||||
to list the available Firefox add-ons.
|
|
||||||
|
|
||||||
Note that it is necessary to manually enable these extensions
|
|
||||||
inside Firefox after the first installation.
|
|
||||||
|
|
||||||
To automatically enable extensions add
|
|
||||||
`"extensions.autoDisableScopes" = 0;`
|
|
||||||
to
|
|
||||||
[{option}`programs.firefox.profiles.<profile>.settings`](#opt-programs.firefox.profiles._name_.settings)
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
||||||
}));
|
|
||||||
default = { };
|
|
||||||
description = "Attribute set of Firefox profiles.";
|
|
||||||
};
|
|
||||||
|
|
||||||
enableGnomeExtensions = mkOption {
|
|
||||||
type = types.bool;
|
|
||||||
default = false;
|
|
||||||
description = ''
|
|
||||||
Whether to enable the GNOME Shell native host connector. Note, you
|
|
||||||
also need to set the NixOS option
|
|
||||||
`services.gnome.gnome-browser-connector.enable` to
|
|
||||||
`true`.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
|
||||||
assertions = [
|
|
||||||
(let
|
|
||||||
defaults =
|
|
||||||
catAttrs "name" (filter (a: a.isDefault) (attrValues cfg.profiles));
|
|
||||||
in {
|
|
||||||
assertion = cfg.profiles == { } || length defaults == 1;
|
|
||||||
message = "Must have exactly one default Firefox profile but found "
|
|
||||||
+ toString (length defaults) + optionalString (length defaults > 1)
|
|
||||||
(", namely " + concatStringsSep ", " defaults);
|
|
||||||
})
|
|
||||||
|
|
||||||
(let
|
|
||||||
getContainers = profiles:
|
|
||||||
flatten
|
|
||||||
(mapAttrsToList (_: value: (attrValues value.containers)) profiles);
|
|
||||||
|
|
||||||
findInvalidContainerIds = profiles:
|
|
||||||
filter (container: container.id >= 4294967294)
|
|
||||||
(getContainers profiles);
|
|
||||||
in {
|
|
||||||
assertion = cfg.profiles == { }
|
|
||||||
|| length (findInvalidContainerIds cfg.profiles) == 0;
|
|
||||||
message = "Container id must be smaller than 4294967294 (2^32 - 2)";
|
|
||||||
})
|
|
||||||
|
|
||||||
(mkNoDuplicateAssertion cfg.profiles "profile")
|
|
||||||
] ++ (mapAttrsToList
|
|
||||||
(_: profile: mkNoDuplicateAssertion profile.containers "container")
|
|
||||||
cfg.profiles);
|
|
||||||
|
|
||||||
warnings = optional (cfg.enableGnomeExtensions or false) ''
|
|
||||||
Using 'programs.firefox.enableGnomeExtensions' has been deprecated and
|
|
||||||
will be removed in the future. Please change to overriding the package
|
|
||||||
configuration using 'programs.firefox.package' instead. You can refer to
|
|
||||||
its example for how to do this.
|
|
||||||
'';
|
|
||||||
|
|
||||||
programs.firefox.finalPackage = wrapPackage cfg.package;
|
|
||||||
|
|
||||||
home.packages = lib.optional (cfg.finalPackage != null) cfg.finalPackage;
|
|
||||||
|
|
||||||
home.file = mkMerge ([{
|
|
||||||
"${firefoxConfigPath}/profiles.ini" =
|
|
||||||
mkIf (cfg.profiles != { }) { text = profilesIni; };
|
|
||||||
|
|
||||||
"${nativeMessagingHostsPath}" = {
|
|
||||||
source =
|
|
||||||
"${nativeMessagingHostsJoined}/lib/mozilla/native-messaging-hosts";
|
|
||||||
recursive = true;
|
|
||||||
};
|
|
||||||
}] ++ flip mapAttrsToList cfg.profiles (_: profile: {
|
|
||||||
"${profilesPath}/${profile.path}/.keep".text = "";
|
|
||||||
|
|
||||||
"${profilesPath}/${profile.path}/chrome/userChrome.css" =
|
|
||||||
mkIf (profile.userChrome != "") { text = profile.userChrome; };
|
|
||||||
|
|
||||||
"${profilesPath}/${profile.path}/chrome/userContent.css" =
|
|
||||||
mkIf (profile.userContent != "") { text = profile.userContent; };
|
|
||||||
|
|
||||||
"${profilesPath}/${profile.path}/user.js" = mkIf (profile.settings != { }
|
|
||||||
|| profile.extraConfig != "" || profile.bookmarks != [ ]) {
|
|
||||||
text =
|
|
||||||
mkUserJs profile.settings profile.extraConfig profile.bookmarks;
|
|
||||||
};
|
|
||||||
|
|
||||||
"${profilesPath}/${profile.path}/containers.json" =
|
|
||||||
mkIf (profile.containers != { }) {
|
|
||||||
force = profile.containersForce;
|
|
||||||
text = mkContainersJson profile.containers;
|
|
||||||
};
|
|
||||||
|
|
||||||
"${profilesPath}/${profile.path}/search.json.mozlz4" = mkIf
|
|
||||||
(profile.search.default != null || profile.search.privateDefault != null
|
|
||||||
|| profile.search.order != [ ] || profile.search.engines != { }) {
|
|
||||||
force = profile.search.force;
|
|
||||||
source = let
|
|
||||||
settings = {
|
|
||||||
version = 6;
|
|
||||||
engines = let
|
|
||||||
# Map of nice field names to internal field names.
|
|
||||||
# This is intended to be exhaustive and should be
|
|
||||||
# updated at every version bump.
|
|
||||||
internalFieldNames = (genAttrs [
|
|
||||||
"name"
|
|
||||||
"isAppProvided"
|
|
||||||
"loadPath"
|
|
||||||
"hasPreferredIcon"
|
|
||||||
"updateInterval"
|
|
||||||
"updateURL"
|
|
||||||
"iconUpdateURL"
|
|
||||||
"iconURL"
|
|
||||||
"iconMapObj"
|
|
||||||
"metaData"
|
|
||||||
"orderHint"
|
|
||||||
"definedAliases"
|
|
||||||
"urls"
|
|
||||||
] (name: "_${name}")) // {
|
|
||||||
searchForm = "__searchForm";
|
|
||||||
};
|
|
||||||
|
|
||||||
processCustomEngineInput = input:
|
|
||||||
(removeAttrs input [ "icon" ])
|
|
||||||
// optionalAttrs (input ? icon) {
|
|
||||||
# Convenience to specify absolute path to icon
|
|
||||||
iconURL = "file://${input.icon}";
|
|
||||||
} // (optionalAttrs (input ? iconUpdateURL) {
|
|
||||||
# Convenience to default iconURL to iconUpdateURL so
|
|
||||||
# the icon is immediately downloaded from the URL
|
|
||||||
iconURL = input.iconURL or input.iconUpdateURL;
|
|
||||||
} // {
|
|
||||||
# Required for custom engine configurations, loadPaths
|
|
||||||
# are unique identifiers that are generally formatted
|
|
||||||
# like: [source]/path/to/engine.xml
|
|
||||||
loadPath = ''
|
|
||||||
[home-manager]/programs.firefox.profiles.${profile.name}.search.engines."${
|
|
||||||
replaceStrings [ "\\" ] [ "\\\\" ] input.name
|
|
||||||
}"'';
|
|
||||||
});
|
|
||||||
|
|
||||||
processEngineInput = name: input:
|
|
||||||
let
|
|
||||||
requiredInput = {
|
|
||||||
inherit name;
|
|
||||||
isAppProvided = input.isAppProvided or removeAttrs input
|
|
||||||
[ "metaData" ] == { };
|
|
||||||
metaData = input.metaData or { };
|
|
||||||
};
|
|
||||||
in if requiredInput.isAppProvided then
|
|
||||||
requiredInput
|
|
||||||
else
|
|
||||||
processCustomEngineInput (input // requiredInput);
|
|
||||||
|
|
||||||
buildEngineConfig = name: input:
|
|
||||||
mapAttrs' (name: value: {
|
|
||||||
name = internalFieldNames.${name} or name;
|
|
||||||
inherit value;
|
|
||||||
}) (processEngineInput name input);
|
|
||||||
|
|
||||||
sortEngineConfigs = configs:
|
|
||||||
let
|
|
||||||
buildEngineConfigWithOrder = order: name:
|
|
||||||
let
|
|
||||||
config = configs.${name} or {
|
|
||||||
_name = name;
|
|
||||||
_isAppProvided = true;
|
|
||||||
_metaData = { };
|
|
||||||
};
|
|
||||||
in config // {
|
|
||||||
_metaData = config._metaData // { inherit order; };
|
|
||||||
};
|
|
||||||
|
|
||||||
engineConfigsWithoutOrder =
|
|
||||||
attrValues (removeAttrs configs profile.search.order);
|
|
||||||
|
|
||||||
sortedEngineConfigs =
|
|
||||||
(imap buildEngineConfigWithOrder profile.search.order)
|
|
||||||
++ engineConfigsWithoutOrder;
|
|
||||||
in sortedEngineConfigs;
|
|
||||||
|
|
||||||
engineInput = profile.search.engines // {
|
|
||||||
# Infer profile.search.default as an app provided
|
|
||||||
# engine if it's not in profile.search.engines
|
|
||||||
${profile.search.default} =
|
|
||||||
profile.search.engines.${profile.search.default} or { };
|
|
||||||
} // {
|
|
||||||
${profile.search.privateDefault} =
|
|
||||||
profile.search.engines.${profile.search.privateDefault} or { };
|
|
||||||
};
|
|
||||||
in sortEngineConfigs (mapAttrs buildEngineConfig engineInput);
|
|
||||||
|
|
||||||
metaData = optionalAttrs (profile.search.default != null) {
|
|
||||||
current = profile.search.default;
|
|
||||||
hash = "@hash@";
|
|
||||||
} // optionalAttrs (profile.search.privateDefault != null) {
|
|
||||||
private = profile.search.privateDefault;
|
|
||||||
privateHash = "@privateHash@";
|
|
||||||
} // {
|
|
||||||
useSavedOrder = profile.search.order != [ ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# Home Manager doesn't circumvent user consent and isn't acting
|
|
||||||
# maliciously. We're modifying the search outside of Firefox, but
|
|
||||||
# a claim by Mozilla to remove this would be very anti-user, and
|
|
||||||
# is unlikely to be an issue for our use case.
|
|
||||||
disclaimer = appName:
|
|
||||||
"By modifying this file, I agree that I am doing so "
|
|
||||||
+ "only within ${appName} itself, using official, user-driven search "
|
|
||||||
+ "engine selection processes, and in a way which does not circumvent "
|
|
||||||
+ "user consent. I acknowledge that any attempt to change this file "
|
|
||||||
+ "from outside of ${appName} is a malicious act, and will be responded "
|
|
||||||
+ "to accordingly.";
|
|
||||||
|
|
||||||
salt = if profile.search.default != null then
|
|
||||||
profile.path + profile.search.default + disclaimer "Firefox"
|
|
||||||
else
|
|
||||||
null;
|
|
||||||
|
|
||||||
privateSalt = if profile.search.privateDefault != null then
|
|
||||||
profile.path + profile.search.privateDefault
|
|
||||||
+ disclaimer "Firefox"
|
|
||||||
else
|
|
||||||
null;
|
|
||||||
in pkgs.runCommand "search.json.mozlz4" {
|
|
||||||
nativeBuildInputs = with pkgs; [ mozlz4a openssl ];
|
|
||||||
json = builtins.toJSON settings;
|
|
||||||
inherit salt privateSalt;
|
|
||||||
} ''
|
|
||||||
if [[ -n $salt ]]; then
|
|
||||||
export hash=$(echo -n "$salt" | openssl dgst -sha256 -binary | base64)
|
|
||||||
export privateHash=$(echo -n "$privateSalt" | openssl dgst -sha256 -binary | base64)
|
|
||||||
mozlz4a <(substituteStream json search.json.in --subst-var hash --subst-var privateHash) "$out"
|
|
||||||
else
|
|
||||||
mozlz4a <(echo "$json") "$out"
|
|
||||||
fi
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
"${profilesPath}/${profile.path}/extensions" =
|
|
||||||
mkIf (profile.extensions != [ ]) {
|
|
||||||
source = let
|
|
||||||
extensionsEnvPkg = pkgs.buildEnv {
|
|
||||||
name = "hm-firefox-extensions";
|
|
||||||
paths = profile.extensions;
|
|
||||||
};
|
|
||||||
in "${extensionsEnvPkg}/share/mozilla/${extensionPath}";
|
|
||||||
recursive = true;
|
|
||||||
force = true;
|
|
||||||
};
|
|
||||||
}));
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
1017
modules/programs/firefox/mkFirefoxModule.nix
Normal file
1017
modules/programs/firefox/mkFirefoxModule.nix
Normal file
File diff suppressed because it is too large
Load diff
|
@ -7,7 +7,7 @@ let
|
||||||
yamlFormat = pkgs.formats.yaml { };
|
yamlFormat = pkgs.formats.yaml { };
|
||||||
|
|
||||||
in {
|
in {
|
||||||
meta.maintainers = [ lib.maintainers.janik ];
|
meta.maintainers = [ lib.hm.maintainers.janik ];
|
||||||
|
|
||||||
options.programs.gh-dash = {
|
options.programs.gh-dash = {
|
||||||
enable = lib.mkEnableOption "GitHub CLI dashboard plugin";
|
enable = lib.mkEnableOption "GitHub CLI dashboard plugin";
|
||||||
|
|
|
@ -225,6 +225,8 @@ in {
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
package = mkPackageOption pkgs "difftastic" { };
|
||||||
|
|
||||||
background = mkOption {
|
background = mkOption {
|
||||||
type = types.enum [ "light" "dark" ];
|
type = types.enum [ "light" "dark" ];
|
||||||
default = "light";
|
default = "light";
|
||||||
|
@ -507,11 +509,11 @@ in {
|
||||||
})
|
})
|
||||||
|
|
||||||
(mkIf cfg.difftastic.enable {
|
(mkIf cfg.difftastic.enable {
|
||||||
home.packages = [ pkgs.difftastic ];
|
home.packages = [ cfg.difftastic.package ];
|
||||||
|
|
||||||
programs.git.iniContent = let
|
programs.git.iniContent = let
|
||||||
difftCommand = concatStringsSep " " [
|
difftCommand = concatStringsSep " " [
|
||||||
"${pkgs.difftastic}/bin/difft"
|
"${getExe cfg.difftastic.package}"
|
||||||
"--color ${cfg.difftastic.color}"
|
"--color ${cfg.difftastic.color}"
|
||||||
"--background ${cfg.difftastic.background}"
|
"--background ${cfg.difftastic.background}"
|
||||||
"--display ${cfg.difftastic.display}"
|
"--display ${cfg.difftastic.display}"
|
||||||
|
|
|
@ -316,7 +316,7 @@ in {
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
home.packages = [ pkgs.gnome.gnome-terminal ];
|
home.packages = [ pkgs.gnome-terminal ];
|
||||||
|
|
||||||
dconf.settings = let dconfPath = "org/gnome/terminal/legacy";
|
dconf.settings = let dconfPath = "org/gnome/terminal/legacy";
|
||||||
in {
|
in {
|
||||||
|
|
|
@ -7,7 +7,7 @@ let
|
||||||
|
|
||||||
jsonFormat = pkgs.formats.json { };
|
jsonFormat = pkgs.formats.json { };
|
||||||
in {
|
in {
|
||||||
meta.maintainers = [ maintainers.lilyinstarlight ];
|
meta.maintainers = [ hm.maintainers.lilyinstarlight ];
|
||||||
|
|
||||||
options.programs.hyfetch = {
|
options.programs.hyfetch = {
|
||||||
enable = mkEnableOption "hyfetch";
|
enable = mkEnableOption "hyfetch";
|
||||||
|
|
|
@ -7,6 +7,11 @@ let
|
||||||
cfg = config.programs.jujutsu;
|
cfg = config.programs.jujutsu;
|
||||||
tomlFormat = pkgs.formats.toml { };
|
tomlFormat = pkgs.formats.toml { };
|
||||||
|
|
||||||
|
configDir = if pkgs.stdenv.isDarwin then
|
||||||
|
"Library/Application Support"
|
||||||
|
else
|
||||||
|
config.xdg.configHome;
|
||||||
|
|
||||||
in {
|
in {
|
||||||
meta.maintainers = [ maintainers.shikanime ];
|
meta.maintainers = [ maintainers.shikanime ];
|
||||||
|
|
||||||
|
@ -51,7 +56,7 @@ in {
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
home.packages = [ cfg.package ];
|
home.packages = [ cfg.package ];
|
||||||
|
|
||||||
xdg.configFile."jj/config.toml" = mkIf (cfg.settings != { }) {
|
home.file."${configDir}/jj/config.toml" = mkIf (cfg.settings != { }) {
|
||||||
source = tomlFormat.generate "jujutsu-config" (cfg.settings
|
source = tomlFormat.generate "jujutsu-config" (cfg.settings
|
||||||
// optionalAttrs (cfg.ediff) (let
|
// optionalAttrs (cfg.ediff) (let
|
||||||
emacsDiffScript = pkgs.writeShellScriptBin "emacs-ediff" ''
|
emacsDiffScript = pkgs.writeShellScriptBin "emacs-ediff" ''
|
||||||
|
|
|
@ -68,6 +68,11 @@ in {
|
||||||
type = with lib.types;
|
type = with lib.types;
|
||||||
attrsOf (submodule {
|
attrsOf (submodule {
|
||||||
options.khard.enable = lib.mkEnableOption "khard access";
|
options.khard.enable = lib.mkEnableOption "khard access";
|
||||||
|
options.khard.defaultCollection = lib.mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "";
|
||||||
|
description = "VCARD collection to be searched by khard.";
|
||||||
|
};
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -75,11 +80,17 @@ in {
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
home.packages = [ pkgs.khard ];
|
home.packages = [ pkgs.khard ];
|
||||||
|
|
||||||
xdg.configFile."khard/khard.conf".text = ''
|
xdg.configFile."khard/khard.conf".text = let
|
||||||
|
makePath = anAccount:
|
||||||
|
builtins.toString (/. + lib.concatStringsSep "/" [
|
||||||
|
anAccount.local.path
|
||||||
|
anAccount.khard.defaultCollection
|
||||||
|
]);
|
||||||
|
in ''
|
||||||
[addressbooks]
|
[addressbooks]
|
||||||
${lib.concatMapStringsSep "\n" (acc: ''
|
${lib.concatMapStringsSep "\n" (acc: ''
|
||||||
[[${acc.name}]]
|
[[${acc.name}]]
|
||||||
path = ${acc.local.path}
|
path = ${makePath acc}
|
||||||
'') (lib.attrValues accounts)}
|
'') (lib.attrValues accounts)}
|
||||||
|
|
||||||
${renderSettings cfg.settings}
|
${renderSettings cfg.settings}
|
||||||
|
|
|
@ -5,6 +5,8 @@ let
|
||||||
|
|
||||||
cfg = config.programs.mcfly;
|
cfg = config.programs.mcfly;
|
||||||
|
|
||||||
|
tomlFormat = pkgs.formats.toml { };
|
||||||
|
|
||||||
bashIntegration = ''
|
bashIntegration = ''
|
||||||
eval "$(${getExe pkgs.mcfly} init bash)"
|
eval "$(${getExe pkgs.mcfly} init bash)"
|
||||||
'' + optionalString cfg.fzf.enable ''
|
'' + optionalString cfg.fzf.enable ''
|
||||||
|
@ -40,6 +42,37 @@ in {
|
||||||
options.programs.mcfly = {
|
options.programs.mcfly = {
|
||||||
enable = mkEnableOption "mcfly";
|
enable = mkEnableOption "mcfly";
|
||||||
|
|
||||||
|
settings = mkOption {
|
||||||
|
type = tomlFormat.type;
|
||||||
|
default = { };
|
||||||
|
example = literalExpression ''
|
||||||
|
{
|
||||||
|
colors = {
|
||||||
|
menubar = {
|
||||||
|
bg = "black";
|
||||||
|
fg = "red";
|
||||||
|
};
|
||||||
|
darkmode = {
|
||||||
|
prompt = "cyan";
|
||||||
|
timing = "yellow";
|
||||||
|
results_selection_fg = "cyan";
|
||||||
|
results_selection_bg = "black";
|
||||||
|
results_selection_hl = "red";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
description = ''
|
||||||
|
Settings written to {file}`~/.config/mcfly/config.toml`.
|
||||||
|
|
||||||
|
Note, if your McFly database is currently in {file}`~/.mcfly`,
|
||||||
|
then this option has no effect.
|
||||||
|
Move the database to {file}`$XDG_DATA_DIR/mcfly/history.db` and
|
||||||
|
remove {file}`~/.mcfly` to make the settings take effect. See
|
||||||
|
<https://github.com/cantino/mcfly#database-location>.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
keyScheme = mkOption {
|
keyScheme = mkOption {
|
||||||
type = types.enum [ "emacs" "vim" ];
|
type = types.enum [ "emacs" "vim" ];
|
||||||
default = "emacs";
|
default = "emacs";
|
||||||
|
@ -105,6 +138,11 @@ in {
|
||||||
{
|
{
|
||||||
home.packages = [ pkgs.mcfly ] ++ optional cfg.fzf.enable pkgs.mcfly-fzf;
|
home.packages = [ pkgs.mcfly ] ++ optional cfg.fzf.enable pkgs.mcfly-fzf;
|
||||||
|
|
||||||
|
# Oddly enough, McFly expects this in the data path, not in config.
|
||||||
|
xdg.dataFile."mcfly/config.toml" = mkIf (cfg.settings != { }) {
|
||||||
|
source = tomlFormat.generate "mcfly-config.toml" cfg.settings;
|
||||||
|
};
|
||||||
|
|
||||||
programs.bash.initExtra = mkIf cfg.enableBashIntegration bashIntegration;
|
programs.bash.initExtra = mkIf cfg.enableBashIntegration bashIntegration;
|
||||||
|
|
||||||
programs.zsh.initExtra = mkIf cfg.enableZshIntegration zshIntegration;
|
programs.zsh.initExtra = mkIf cfg.enableZshIntegration zshIntegration;
|
||||||
|
|
|
@ -15,6 +15,8 @@ in {
|
||||||
programs.micro = {
|
programs.micro = {
|
||||||
enable = mkEnableOption "micro, a terminal-based text editor";
|
enable = mkEnableOption "micro, a terminal-based text editor";
|
||||||
|
|
||||||
|
package = mkPackageOption pkgs "micro" { };
|
||||||
|
|
||||||
settings = mkOption {
|
settings = mkOption {
|
||||||
type = jsonFormat.type;
|
type = jsonFormat.type;
|
||||||
default = { };
|
default = { };
|
||||||
|
@ -35,7 +37,7 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
home.packages = [ pkgs.micro ];
|
home.packages = [ cfg.package ];
|
||||||
|
|
||||||
xdg.configFile."micro/settings.json".source =
|
xdg.configFile."micro/settings.json".source =
|
||||||
jsonFormat.generate "micro-settings" cfg.settings;
|
jsonFormat.generate "micro-settings" cfg.settings;
|
||||||
|
|
|
@ -55,8 +55,10 @@ let
|
||||||
|
|
||||||
mpvPackage = if cfg.scripts == [ ] then
|
mpvPackage = if cfg.scripts == [ ] then
|
||||||
cfg.package
|
cfg.package
|
||||||
|
else if hasAttr "wrapMpv" pkgs then
|
||||||
|
pkgs.wrapMpv pkgs.mpv-unwrapped { scripts = cfg.scripts; }
|
||||||
else
|
else
|
||||||
pkgs.wrapMpv pkgs.mpv-unwrapped { scripts = cfg.scripts; };
|
pkgs.mpv.override { scripts = cfg.scripts; };
|
||||||
|
|
||||||
in {
|
in {
|
||||||
options = {
|
options = {
|
||||||
|
@ -227,5 +229,5 @@ in {
|
||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
|
|
||||||
meta.maintainers = with maintainers; [ tadeokondrak thiagokokada chuangzhu ];
|
meta.maintainers = with maintainers; [ thiagokokada chuangzhu ];
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,6 +19,8 @@ in {
|
||||||
options.programs.papis = {
|
options.programs.papis = {
|
||||||
enable = mkEnableOption "papis";
|
enable = mkEnableOption "papis";
|
||||||
|
|
||||||
|
package = mkPackageOption pkgs "papis" { };
|
||||||
|
|
||||||
settings = mkOption {
|
settings = mkOption {
|
||||||
type = with types; attrsOf (oneOf [ bool int str ]);
|
type = with types; attrsOf (oneOf [ bool int str ]);
|
||||||
default = { };
|
default = { };
|
||||||
|
@ -84,7 +86,7 @@ in {
|
||||||
(", namely " + concatStringsSep "," defaultLibraries);
|
(", namely " + concatStringsSep "," defaultLibraries);
|
||||||
}];
|
}];
|
||||||
|
|
||||||
home.packages = [ pkgs.papis ];
|
home.packages = [ cfg.package ];
|
||||||
|
|
||||||
xdg.configFile."papis/config" =
|
xdg.configFile."papis/config" =
|
||||||
mkIf (cfg.libraries != { }) { text = generators.toINI { } settingsIni; };
|
mkIf (cfg.libraries != { }) { text = generators.toINI { } settingsIni; };
|
||||||
|
|
|
@ -19,7 +19,7 @@ let
|
||||||
base_url = mkOption {
|
base_url = mkOption {
|
||||||
type = with types; nullOr str;
|
type = with types; nullOr str;
|
||||||
default = null;
|
default = null;
|
||||||
example = "bitwarden.example.com";
|
example = "https://bitwarden.example.com/";
|
||||||
description =
|
description =
|
||||||
"The base-url for a self-hosted bitwarden installation.";
|
"The base-url for a self-hosted bitwarden installation.";
|
||||||
};
|
};
|
||||||
|
@ -27,7 +27,7 @@ let
|
||||||
identity_url = mkOption {
|
identity_url = mkOption {
|
||||||
type = with types; nullOr str;
|
type = with types; nullOr str;
|
||||||
default = null;
|
default = null;
|
||||||
example = "identity.example.com";
|
example = "https://identity.example.com/";
|
||||||
description = "The identity url for your bitwarden installation.";
|
description = "The identity url for your bitwarden installation.";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{ config, pkgs, lib, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
let cfg = config.programs.script-directory;
|
let cfg = config.programs.script-directory;
|
||||||
in {
|
in {
|
||||||
meta.maintainers = [ lib.maintainers.janik ];
|
meta.maintainers = [ lib.hm.maintainers.janik ];
|
||||||
|
|
||||||
options.programs.script-directory = {
|
options.programs.script-directory = {
|
||||||
enable = lib.mkEnableOption "script-directory";
|
enable = lib.mkEnableOption "script-directory";
|
||||||
|
|
|
@ -29,7 +29,7 @@ let
|
||||||
in "${key} ${generatedValue}";
|
in "${key} ${generatedValue}";
|
||||||
|
|
||||||
in {
|
in {
|
||||||
meta.maintainers = [ maintainers.ivar ];
|
meta.maintainers = [ ];
|
||||||
|
|
||||||
options.programs.sm64ex = {
|
options.programs.sm64ex = {
|
||||||
enable = mkEnableOption "sm64ex";
|
enable = mkEnableOption "sm64ex";
|
||||||
|
|
|
@ -24,14 +24,7 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
settings = mkOption {
|
settings = mkOption {
|
||||||
type = with types;
|
type = tomlFormat.type;
|
||||||
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"; };
|
|
||||||
default = { };
|
default = { };
|
||||||
example = literalExpression ''
|
example = literalExpression ''
|
||||||
{
|
{
|
||||||
|
|
|
@ -85,7 +85,8 @@ in {
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
package = mkPackageOption pkgs "taskwarrior" { };
|
package =
|
||||||
|
mkPackageOption pkgs "taskwarrior" { example = "pkgs.taskwarrior3"; };
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ let
|
||||||
config.xdg.configHome;
|
config.xdg.configHome;
|
||||||
|
|
||||||
in {
|
in {
|
||||||
meta.maintainers = [ maintainers.polykernel ];
|
meta.maintainers = [ ];
|
||||||
|
|
||||||
options.programs.watson = {
|
options.programs.watson = {
|
||||||
enable = mkEnableOption "watson, a wonderful CLI to track your time";
|
enable = mkEnableOption "watson, a wonderful CLI to track your time";
|
||||||
|
|
|
@ -69,8 +69,8 @@ let
|
||||||
};
|
};
|
||||||
|
|
||||||
modules-left = mkOption {
|
modules-left = mkOption {
|
||||||
type = listOf str;
|
type = nullOr (listOf str);
|
||||||
default = [ ];
|
default = null;
|
||||||
description = "Modules that will be displayed on the left.";
|
description = "Modules that will be displayed on the left.";
|
||||||
example = literalExpression ''
|
example = literalExpression ''
|
||||||
[ "sway/workspaces" "sway/mode" "wlr/taskbar" ]
|
[ "sway/workspaces" "sway/mode" "wlr/taskbar" ]
|
||||||
|
@ -78,8 +78,8 @@ let
|
||||||
};
|
};
|
||||||
|
|
||||||
modules-center = mkOption {
|
modules-center = mkOption {
|
||||||
type = listOf str;
|
type = nullOr (listOf str);
|
||||||
default = [ ];
|
default = null;
|
||||||
description = "Modules that will be displayed in the center.";
|
description = "Modules that will be displayed in the center.";
|
||||||
example = literalExpression ''
|
example = literalExpression ''
|
||||||
[ "sway/window" ]
|
[ "sway/window" ]
|
||||||
|
@ -87,8 +87,8 @@ let
|
||||||
};
|
};
|
||||||
|
|
||||||
modules-right = mkOption {
|
modules-right = mkOption {
|
||||||
type = listOf str;
|
type = nullOr (listOf str);
|
||||||
default = [ ];
|
default = null;
|
||||||
description = "Modules that will be displayed on the right.";
|
description = "Modules that will be displayed on the right.";
|
||||||
example = literalExpression ''
|
example = literalExpression ''
|
||||||
[ "mpd" "custom/mymodule#with-css-id" "temperature" ]
|
[ "mpd" "custom/mymodule#with-css-id" "temperature" ]
|
||||||
|
|
|
@ -7,7 +7,7 @@ let
|
||||||
tomlFormat = pkgs.formats.toml { };
|
tomlFormat = pkgs.formats.toml { };
|
||||||
|
|
||||||
bashIntegration = ''
|
bashIntegration = ''
|
||||||
function ya() {
|
function ${cfg.shellWrapperName}() {
|
||||||
local tmp="$(mktemp -t "yazi-cwd.XXXXX")"
|
local tmp="$(mktemp -t "yazi-cwd.XXXXX")"
|
||||||
yazi "$@" --cwd-file="$tmp"
|
yazi "$@" --cwd-file="$tmp"
|
||||||
if cwd="$(cat -- "$tmp")" && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then
|
if cwd="$(cat -- "$tmp")" && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then
|
||||||
|
@ -18,7 +18,7 @@ let
|
||||||
'';
|
'';
|
||||||
|
|
||||||
fishIntegration = ''
|
fishIntegration = ''
|
||||||
function ya
|
function ${cfg.shellWrapperName}
|
||||||
set tmp (mktemp -t "yazi-cwd.XXXXX")
|
set tmp (mktemp -t "yazi-cwd.XXXXX")
|
||||||
yazi $argv --cwd-file="$tmp"
|
yazi $argv --cwd-file="$tmp"
|
||||||
if set cwd (cat -- "$tmp"); and [ -n "$cwd" ]; and [ "$cwd" != "$PWD" ]
|
if set cwd (cat -- "$tmp"); and [ -n "$cwd" ]; and [ "$cwd" != "$PWD" ]
|
||||||
|
@ -29,7 +29,7 @@ let
|
||||||
'';
|
'';
|
||||||
|
|
||||||
nushellIntegration = ''
|
nushellIntegration = ''
|
||||||
def --env ya [...args] {
|
def --env ${cfg.shellWrapperName} [...args] {
|
||||||
let tmp = (mktemp -t "yazi-cwd.XXXXX")
|
let tmp = (mktemp -t "yazi-cwd.XXXXX")
|
||||||
yazi ...$args --cwd-file $tmp
|
yazi ...$args --cwd-file $tmp
|
||||||
let cwd = (open $tmp)
|
let cwd = (open $tmp)
|
||||||
|
@ -40,13 +40,22 @@ let
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
in {
|
in {
|
||||||
meta.maintainers = with maintainers; [ xyenon ];
|
meta.maintainers = with maintainers; [ xyenon eljamm ];
|
||||||
|
|
||||||
options.programs.yazi = {
|
options.programs.yazi = {
|
||||||
enable = mkEnableOption "yazi";
|
enable = mkEnableOption "yazi";
|
||||||
|
|
||||||
package = mkPackageOption pkgs "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";
|
enableBashIntegration = mkEnableOption "Bash integration";
|
||||||
|
|
||||||
enableZshIntegration = mkEnableOption "Zsh integration";
|
enableZshIntegration = mkEnableOption "Zsh integration";
|
||||||
|
@ -132,7 +141,7 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
initLua = mkOption {
|
initLua = mkOption {
|
||||||
type = with types; nullOr path;
|
type = with types; nullOr (either path lines);
|
||||||
default = null;
|
default = null;
|
||||||
description = ''
|
description = ''
|
||||||
The init.lua for Yazi itself.
|
The init.lua for Yazi itself.
|
||||||
|
@ -145,8 +154,11 @@ in {
|
||||||
default = { };
|
default = { };
|
||||||
description = ''
|
description = ''
|
||||||
Lua plugins.
|
Lua plugins.
|
||||||
|
Values should be a package or path containing an `init.lua` file.
|
||||||
|
Will be linked to {file}`$XDG_CONFIG_HOME/yazi/plugins/<name>.yazi`.
|
||||||
|
|
||||||
See https://yazi-rs.github.io/docs/plugins/overview/ for documentation.
|
See <https://yazi-rs.github.io/docs/plugins/overview>
|
||||||
|
for documentation.
|
||||||
'';
|
'';
|
||||||
example = literalExpression ''
|
example = literalExpression ''
|
||||||
{
|
{
|
||||||
|
@ -161,8 +173,10 @@ in {
|
||||||
default = { };
|
default = { };
|
||||||
description = ''
|
description = ''
|
||||||
Pre-made themes.
|
Pre-made themes.
|
||||||
|
Values should be a package or path containing the required files.
|
||||||
|
Will be linked to {file}`$XDG_CONFIG_HOME/yazi/flavors/<name>.yazi`.
|
||||||
|
|
||||||
See https://yazi-rs.github.io/docs/flavors/overview/ for documentation.
|
See <https://yazi-rs.github.io/docs/flavors/overview/> for documentation.
|
||||||
'';
|
'';
|
||||||
example = literalExpression ''
|
example = literalExpression ''
|
||||||
{
|
{
|
||||||
|
@ -171,7 +185,6 @@ in {
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
@ -197,11 +210,69 @@ in {
|
||||||
"yazi/theme.toml" = mkIf (cfg.theme != { }) {
|
"yazi/theme.toml" = mkIf (cfg.theme != { }) {
|
||||||
source = tomlFormat.generate "yazi-theme" cfg.theme;
|
source = tomlFormat.generate "yazi-theme" cfg.theme;
|
||||||
};
|
};
|
||||||
"yazi/init.lua" = mkIf (cfg.initLua != null) { source = cfg.initLua; };
|
"yazi/init.lua" = mkIf (cfg.initLua != null)
|
||||||
} // (mapAttrs'
|
(if builtins.isPath cfg.initLua then {
|
||||||
(name: value: nameValuePair "yazi/plugins/${name}" { source = value; })
|
source = cfg.initLua;
|
||||||
cfg.plugins) // (mapAttrs'
|
} else {
|
||||||
(name: value: nameValuePair "yazi/flavors/${name}" { source = value; })
|
text = cfg.initLua;
|
||||||
cfg.flavors);
|
});
|
||||||
|
} // (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" ]);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,6 +34,21 @@ let
|
||||||
|
|
||||||
historyModule = types.submodule ({ config, ... }: {
|
historyModule = types.submodule ({ config, ... }: {
|
||||||
options = {
|
options = {
|
||||||
|
append = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
description = ''
|
||||||
|
If set, zsh sessions will append their history list to the history
|
||||||
|
file, rather than replace it. Thus, multiple parallel zsh sessions
|
||||||
|
will all have the new entries from their history lists added to the
|
||||||
|
history file, in the order that they exit.
|
||||||
|
|
||||||
|
This file will still be periodically re-written to trim it when the
|
||||||
|
number of lines grows 20% beyond the value specified by
|
||||||
|
`programs.zsh.history.save`.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
size = mkOption {
|
size = mkOption {
|
||||||
type = types.int;
|
type = types.int;
|
||||||
default = 10000;
|
default = 10000;
|
||||||
|
@ -398,6 +413,22 @@ in
|
||||||
{manpage}`zshzle(1)` for syntax.
|
{manpage}`zshzle(1)` for syntax.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
strategy = mkOption {
|
||||||
|
type = types.listOf (types.enum [ "history" "completion" "match_prev_cmd" ]);
|
||||||
|
default = [ "history" ];
|
||||||
|
description = ''
|
||||||
|
`ZSH_AUTOSUGGEST_STRATEGY` is an array that specifies how suggestions should be generated.
|
||||||
|
The strategies in the array are tried successively until a suggestion is found.
|
||||||
|
There are currently three built-in strategies to choose from:
|
||||||
|
|
||||||
|
- `history`: Chooses the most recent match from history.
|
||||||
|
- `completion`: Chooses a suggestion based on what tab-completion would suggest. (requires `zpty` module)
|
||||||
|
- `match_prev_cmd`: Like `history`, but chooses the most recent match whose preceding history item matches
|
||||||
|
the most recently executed command. Note that this strategy won't work as expected with ZSH options that
|
||||||
|
don't preserve the history order such as `HIST_IGNORE_ALL_DUPS` or `HIST_EXPIRE_DUPS_FIRST`.
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
history = mkOption {
|
history = mkOption {
|
||||||
|
@ -610,6 +641,7 @@ in
|
||||||
|
|
||||||
(optionalString cfg.autosuggestion.enable ''
|
(optionalString cfg.autosuggestion.enable ''
|
||||||
source ${pkgs.zsh-autosuggestions}/share/zsh-autosuggestions/zsh-autosuggestions.zsh
|
source ${pkgs.zsh-autosuggestions}/share/zsh-autosuggestions/zsh-autosuggestions.zsh
|
||||||
|
ZSH_AUTOSUGGEST_STRATEGY=(${concatStringsSep " " cfg.autosuggestion.strategy})
|
||||||
'')
|
'')
|
||||||
(optionalString (cfg.autosuggestion.enable && cfg.autosuggestion.highlight != null) ''
|
(optionalString (cfg.autosuggestion.enable && cfg.autosuggestion.highlight != null) ''
|
||||||
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="${cfg.autosuggestion.highlight}"
|
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="${cfg.autosuggestion.highlight}"
|
||||||
|
@ -652,6 +684,7 @@ in
|
||||||
mkdir -p "$(dirname "$HISTFILE")"
|
mkdir -p "$(dirname "$HISTFILE")"
|
||||||
|
|
||||||
setopt HIST_FCNTL_LOCK
|
setopt HIST_FCNTL_LOCK
|
||||||
|
${if cfg.history.append then "setopt" else "unsetopt"} APPEND_HISTORY
|
||||||
${if cfg.history.ignoreDups then "setopt" else "unsetopt"} HIST_IGNORE_DUPS
|
${if cfg.history.ignoreDups then "setopt" else "unsetopt"} HIST_IGNORE_DUPS
|
||||||
${if cfg.history.ignoreAllDups then "setopt" else "unsetopt"} HIST_IGNORE_ALL_DUPS
|
${if cfg.history.ignoreAllDups then "setopt" else "unsetopt"} HIST_IGNORE_ALL_DUPS
|
||||||
${if cfg.history.ignoreSpace then "setopt" else "unsetopt"} HIST_IGNORE_SPACE
|
${if cfg.history.ignoreSpace then "setopt" else "unsetopt"} HIST_IGNORE_SPACE
|
||||||
|
|
40
modules/services/blanket.nix
Normal file
40
modules/services/blanket.nix
Normal file
|
@ -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;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,7 +1,7 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
let cfg = config.services.cliphist;
|
let cfg = config.services.cliphist;
|
||||||
in {
|
in {
|
||||||
meta.maintainers = [ lib.maintainers.janik ];
|
meta.maintainers = [ lib.hm.maintainers.janik ];
|
||||||
|
|
||||||
options.services.cliphist = {
|
options.services.cliphist = {
|
||||||
enable =
|
enable =
|
||||||
|
|
|
@ -65,9 +65,8 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
configFile = mkOption {
|
configFile = mkOption {
|
||||||
type = with types; either str path;
|
type = with types; nullOr (either str path);
|
||||||
default = "${config.xdg.configHome}/dunst/dunstrc";
|
default = null;
|
||||||
defaultText = "$XDG_CONFIG_HOME/dunst/dunstrc";
|
|
||||||
description = ''
|
description = ''
|
||||||
Path to the configuration file read by dunst.
|
Path to the configuration file read by dunst.
|
||||||
|
|
||||||
|
@ -170,9 +169,9 @@ in {
|
||||||
"stock"
|
"stock"
|
||||||
];
|
];
|
||||||
|
|
||||||
mkPath = { basePath, theme, category }:
|
mkPath = { basePath, theme, category, }:
|
||||||
"${basePath}/share/icons/${theme.name}/${theme.size}/${category}";
|
"${basePath}/share/icons/${theme.name}/${theme.size}/${category}";
|
||||||
in concatMapStringsSep ":" mkPath (cartesianProductOfSets {
|
in concatMapStringsSep ":" mkPath (cartesianProduct {
|
||||||
basePath = basePaths;
|
basePath = basePaths;
|
||||||
theme = themes;
|
theme = themes;
|
||||||
category = categories;
|
category = categories;
|
||||||
|
@ -188,7 +187,9 @@ in {
|
||||||
Service = {
|
Service = {
|
||||||
Type = "dbus";
|
Type = "dbus";
|
||||||
BusName = "org.freedesktop.Notifications";
|
BusName = "org.freedesktop.Notifications";
|
||||||
ExecStart = "${cfg.package}/bin/dunst -config ${cfg.configFile}";
|
ExecStart = escapeShellArgs ([ "${cfg.package}/bin/dunst" ] ++
|
||||||
|
# Using `-config` breaks dunst's drop-ins, so only use it when an alternative path is set
|
||||||
|
optionals (cfg.configFile != null) [ "-config" cfg.configFile ]);
|
||||||
Environment = optionalString (cfg.waylandDisplay != "")
|
Environment = optionalString (cfg.waylandDisplay != "")
|
||||||
"WAYLAND_DISPLAY=${cfg.waylandDisplay}";
|
"WAYLAND_DISPLAY=${cfg.waylandDisplay}";
|
||||||
};
|
};
|
||||||
|
|
|
@ -9,7 +9,7 @@ let
|
||||||
|
|
||||||
iniFormat = pkgs.formats.ini { };
|
iniFormat = pkgs.formats.ini { };
|
||||||
in {
|
in {
|
||||||
meta.maintainers = with maintainers; [ polykernel ];
|
meta.maintainers = [ ];
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
services.fnott = {
|
services.fnott = {
|
||||||
|
|
77
modules/services/glance.nix
Normal file
77
modules/services/glance.nix
Normal file
|
@ -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
|
||||||
|
<https://github.com/glanceapp/glance/blob/main/docs/configuration.md>
|
||||||
|
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}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -49,7 +49,7 @@ in {
|
||||||
args = concatStringsSep " " ([ "--start" "--foreground" ]
|
args = concatStringsSep " " ([ "--start" "--foreground" ]
|
||||||
++ optional (cfg.components != [ ])
|
++ optional (cfg.components != [ ])
|
||||||
("--components=" + concatStringsSep "," 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";
|
Restart = "on-abort";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -52,7 +52,6 @@ in {
|
||||||
"${pkgs.kbfs}/bin/kbfsfuse ${toString cfg.extraFlags} ${mountPoint}";
|
"${pkgs.kbfs}/bin/kbfsfuse ${toString cfg.extraFlags} ${mountPoint}";
|
||||||
ExecStopPost = "/run/wrappers/bin/fusermount -u ${mountPoint}";
|
ExecStopPost = "/run/wrappers/bin/fusermount -u ${mountPoint}";
|
||||||
Restart = "on-failure";
|
Restart = "on-failure";
|
||||||
PrivateTmp = true;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
Install.WantedBy = [ "default.target" ];
|
Install.WantedBy = [ "default.target" ];
|
||||||
|
|
|
@ -171,10 +171,17 @@ in {
|
||||||
];
|
];
|
||||||
|
|
||||||
systemd.user.services.mpd = {
|
systemd.user.services.mpd = {
|
||||||
Unit = {
|
Unit = mkMerge [
|
||||||
After = [ "network.target" "sound.target" ];
|
{
|
||||||
Description = "Music Player Daemon";
|
Description = "Music Player Daemon";
|
||||||
};
|
After = [ "network.target" "sound.target" ];
|
||||||
|
}
|
||||||
|
|
||||||
|
(mkIf cfg.network.startWhenNeeded {
|
||||||
|
Requires = [ "mpd.socket" ];
|
||||||
|
After = [ "mpd.socket" ];
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
Install = mkIf (!cfg.network.startWhenNeeded) {
|
Install = mkIf (!cfg.network.startWhenNeeded) {
|
||||||
WantedBy = [ "default.target" ];
|
WantedBy = [ "default.target" ];
|
||||||
|
|
|
@ -110,9 +110,11 @@ in {
|
||||||
systemd.user.services.nix-gc = {
|
systemd.user.services.nix-gc = {
|
||||||
Unit = { Description = "Nix Garbage Collector"; };
|
Unit = { Description = "Nix Garbage Collector"; };
|
||||||
Service = {
|
Service = {
|
||||||
ExecStart = "${nixPackage}/bin/nix-collect-garbage ${
|
Type = "oneshot";
|
||||||
|
ExecStart = toString (pkgs.writeShellScript "nix-gc"
|
||||||
|
"exec ${nixPackage}/bin/nix-collect-garbage ${
|
||||||
lib.optionalString (cfg.options != null) cfg.options
|
lib.optionalString (cfg.options != null) cfg.options
|
||||||
}";
|
}");
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
systemd.user.timers.nix-gc = {
|
systemd.user.timers.nix-gc = {
|
||||||
|
|
|
@ -15,7 +15,7 @@ let
|
||||||
"--basic-auth ${escapeShellArg cfg.httpAuth}");
|
"--basic-auth ${escapeShellArg cfg.httpAuth}");
|
||||||
|
|
||||||
in {
|
in {
|
||||||
meta.maintainers = [ maintainers.ivar ];
|
meta.maintainers = [ ];
|
||||||
|
|
||||||
options.services.pbgopy = {
|
options.services.pbgopy = {
|
||||||
enable = mkEnableOption "pbgopy";
|
enable = mkEnableOption "pbgopy";
|
||||||
|
|
|
@ -9,7 +9,7 @@ let
|
||||||
presetOpts = optionalString (cfg.preset != "") "--load-preset ${cfg.preset}";
|
presetOpts = optionalString (cfg.preset != "") "--load-preset ${cfg.preset}";
|
||||||
|
|
||||||
in {
|
in {
|
||||||
meta.maintainers = [ maintainers.jonringer ];
|
meta.maintainers = [ hm.maintainers.jonringer ];
|
||||||
|
|
||||||
options.services.pulseeffects = {
|
options.services.pulseeffects = {
|
||||||
enable = mkEnableOption ''
|
enable = mkEnableOption ''
|
||||||
|
|
|
@ -5,7 +5,7 @@ let
|
||||||
cfg = config.services.ssh-agent;
|
cfg = config.services.ssh-agent;
|
||||||
|
|
||||||
in {
|
in {
|
||||||
meta.maintainers = [ lib.maintainers.lheckemann ];
|
meta.maintainers = [ lib.hm.maintainers.lheckemann ];
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
services.ssh-agent = {
|
services.ssh-agent = {
|
||||||
|
|
|
@ -74,7 +74,7 @@ in {
|
||||||
}
|
}
|
||||||
|
|
||||||
(mkIf (cfg.config != { }) {
|
(mkIf (cfg.config != { }) {
|
||||||
home.file.".stalonetrayrc".text = let
|
xdg.configFile."stalonetrayrc".text = let
|
||||||
valueToString = v:
|
valueToString = v:
|
||||||
if isBool v then
|
if isBool v then
|
||||||
(if v then "true" else "false")
|
(if v then "true" else "false")
|
||||||
|
@ -88,7 +88,7 @@ in {
|
||||||
})
|
})
|
||||||
|
|
||||||
(mkIf (cfg.extraConfig != "") {
|
(mkIf (cfg.extraConfig != "") {
|
||||||
home.file.".stalonetrayrc".text = cfg.extraConfig;
|
xdg.configFile."stalonetrayrc".text = cfg.extraConfig;
|
||||||
})
|
})
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,6 +60,8 @@ in {
|
||||||
After = [ "graphical-session.target" ];
|
After = [ "graphical-session.target" ];
|
||||||
ConditionEnvironment = "WAYLAND_DISPLAY";
|
ConditionEnvironment = "WAYLAND_DISPLAY";
|
||||||
Documentation = "man:swayosd(1)";
|
Documentation = "man:swayosd(1)";
|
||||||
|
StartLimitBurst = 5;
|
||||||
|
StartLimitIntervalSec = 10;
|
||||||
};
|
};
|
||||||
|
|
||||||
Service = {
|
Service = {
|
||||||
|
@ -71,6 +73,7 @@ in {
|
||||||
+ (optionalString (cfg.topMargin != null)
|
+ (optionalString (cfg.topMargin != null)
|
||||||
" --top-margin ${toString cfg.topMargin}");
|
" --top-margin ${toString cfg.topMargin}");
|
||||||
Restart = "always";
|
Restart = "always";
|
||||||
|
RestartSec = "2s";
|
||||||
};
|
};
|
||||||
|
|
||||||
Install = { WantedBy = [ "graphical-session.target" ]; };
|
Install = { WantedBy = [ "graphical-session.target" ]; };
|
||||||
|
|
|
@ -12,6 +12,9 @@ in {
|
||||||
options.services.taskwarrior-sync = {
|
options.services.taskwarrior-sync = {
|
||||||
enable = mkEnableOption "Taskwarrior periodic sync";
|
enable = mkEnableOption "Taskwarrior periodic sync";
|
||||||
|
|
||||||
|
package =
|
||||||
|
mkPackageOption pkgs "taskwarrior" { example = "pkgs.taskwarrior3"; };
|
||||||
|
|
||||||
frequency = mkOption {
|
frequency = mkOption {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
default = "*:0/5";
|
default = "*:0/5";
|
||||||
|
@ -36,7 +39,7 @@ in {
|
||||||
Service = {
|
Service = {
|
||||||
CPUSchedulingPolicy = "idle";
|
CPUSchedulingPolicy = "idle";
|
||||||
IOSchedulingClass = "idle";
|
IOSchedulingClass = "idle";
|
||||||
ExecStart = "${pkgs.taskwarrior}/bin/task synchronize";
|
ExecStart = "${cfg.package}/bin/task synchronize";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -40,7 +40,21 @@ in {
|
||||||
];
|
];
|
||||||
|
|
||||||
options.wayland.windowManager.hyprland = {
|
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" { };
|
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.";
|
"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;
|
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
|
xdg.configFile."hypr/hyprland.conf" = let
|
||||||
shouldGenerate = cfg.systemd.enable || cfg.extraConfig != ""
|
shouldGenerate = cfg.systemd.enable || cfg.extraConfig != ""
|
||||||
|
|
|
@ -31,7 +31,7 @@ let
|
||||||
};
|
};
|
||||||
|
|
||||||
size = mkOption {
|
size = mkOption {
|
||||||
type = types.float;
|
type = types.either types.float types.str;
|
||||||
default = 8.0;
|
default = 8.0;
|
||||||
description = ''
|
description = ''
|
||||||
The font size to use for window titles.
|
The font size to use for window titles.
|
||||||
|
|
|
@ -249,7 +249,7 @@ let
|
||||||
moduleStr = moduleType: name: attrs: ''
|
moduleStr = moduleType: name: attrs: ''
|
||||||
${moduleType} "${name}" {
|
${moduleType} "${name}" {
|
||||||
${concatStringsSep "\n"
|
${concatStringsSep "\n"
|
||||||
(mapAttrsToList (name: value: "${name} ${value}") attrs)}
|
(mapAttrsToList (name: value: " ${name} ${value}") attrs)}
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
inputStr = moduleStr "input";
|
inputStr = moduleStr "input";
|
||||||
|
@ -403,7 +403,7 @@ in {
|
||||||
"XCURSOR_THEME"
|
"XCURSOR_THEME"
|
||||||
"XCURSOR_SIZE"
|
"XCURSOR_SIZE"
|
||||||
];
|
];
|
||||||
example = [ "-all" ];
|
example = [ "--all" ];
|
||||||
description = ''
|
description = ''
|
||||||
Environment variables imported into the systemd and D-Bus user environment.
|
Environment variables imported into the systemd and D-Bus user environment.
|
||||||
'';
|
'';
|
||||||
|
@ -411,7 +411,12 @@ in {
|
||||||
|
|
||||||
extraCommands = mkOption {
|
extraCommands = mkOption {
|
||||||
type = types.listOf types.str;
|
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 = ''
|
description = ''
|
||||||
Extra commands to run after D-Bus activation.
|
Extra commands to run after D-Bus activation.
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -14,7 +14,7 @@ let
|
||||||
};
|
};
|
||||||
in attrsOf confAtom;
|
in attrsOf confAtom;
|
||||||
in {
|
in {
|
||||||
meta.maintainers = with maintainers; [ polykernel ];
|
meta.maintainers = [ ];
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
wayland.windowManager.sway.swaynag = {
|
wayland.windowManager.sway.swaynag = {
|
||||||
|
|
|
@ -34,7 +34,7 @@ function systemdPostReload() {
|
||||||
touch "$oldServiceFiles"
|
touch "$oldServiceFiles"
|
||||||
else
|
else
|
||||||
find "$oldUserServicePath" \
|
find "$oldUserServicePath" \
|
||||||
-maxdepth 1 -name '*.service' -exec basename '{}' ';' \
|
-maxdepth 1 -name '*.service' \! -name '*@.service' -exec basename '{}' ';' \
|
||||||
| sort \
|
| sort \
|
||||||
> "$oldServiceFiles"
|
> "$oldServiceFiles"
|
||||||
fi
|
fi
|
||||||
|
@ -43,7 +43,7 @@ function systemdPostReload() {
|
||||||
touch "$newServiceFiles"
|
touch "$newServiceFiles"
|
||||||
else
|
else
|
||||||
find "$newUserServicePath" \
|
find "$newUserServicePath" \
|
||||||
-maxdepth 1 -name '*.service' -exec basename '{}' ';' \
|
-maxdepth 1 -name '*.service' \! -name '*@.service' -exec basename '{}' ';' \
|
||||||
| sort \
|
| sort \
|
||||||
> "$newServiceFiles"
|
> "$newServiceFiles"
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -100,6 +100,8 @@ let
|
||||||
settingsFormat.generate "user.conf" cfg.settings;
|
settingsFormat.generate "user.conf" cfg.settings;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
configHome = lib.removePrefix config.home.homeDirectory config.xdg.configHome;
|
||||||
|
|
||||||
in {
|
in {
|
||||||
meta.maintainers = [ lib.maintainers.rycee ];
|
meta.maintainers = [ lib.maintainers.rycee ];
|
||||||
|
|
||||||
|
@ -181,7 +183,7 @@ in {
|
||||||
default = "suggest";
|
default = "suggest";
|
||||||
type = with types;
|
type = with types;
|
||||||
either bool (enum [ "suggest" "legacy" "sd-switch" ]);
|
either bool (enum [ "suggest" "legacy" "sd-switch" ]);
|
||||||
apply = p: if isBool p then if p then "legacy" else "suggest" else p;
|
apply = p: if isBool p then if p then "sd-switch" else "suggest" else p;
|
||||||
description = ''
|
description = ''
|
||||||
Whether new or changed services that are wanted by active targets
|
Whether new or changed services that are wanted by active targets
|
||||||
should be started. Additionally, stop obsolete services from the
|
should be started. Additionally, stop obsolete services from the
|
||||||
|
@ -194,17 +196,15 @@ in {
|
||||||
{command}`systemctl` commands to run. You will have to
|
{command}`systemctl` commands to run. You will have to
|
||||||
manually run those commands after the switch.
|
manually run those commands after the switch.
|
||||||
|
|
||||||
`legacy` (or `true`)
|
`legacy`
|
||||||
: Use a Ruby script to, in a more robust fashion, determine the
|
: Use a Ruby script to, in a more robust fashion, determine the
|
||||||
necessary changes and automatically run the
|
necessary changes and automatically run the
|
||||||
{command}`systemctl` commands.
|
{command}`systemctl` commands. Note, this alternative will soon
|
||||||
|
be removed.
|
||||||
|
|
||||||
`sd-switch`
|
`sd-switch` (or `true`)
|
||||||
: Use sd-switch, a third party application, to perform the service
|
: Use sd-switch, a tool that determines the necessary changes and
|
||||||
updates. This tool offers more features while having a small
|
automatically apply them.
|
||||||
closure size. Note, it requires a fully functional user D-Bus
|
|
||||||
session. Once tested and deemed sufficiently robust, this will
|
|
||||||
become the default.
|
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -297,6 +297,12 @@ in {
|
||||||
message = "This module is only available on Linux.";
|
message = "This module is only available on Linux.";
|
||||||
}];
|
}];
|
||||||
|
|
||||||
|
warnings = lib.optional (cfg.startServices == "legacy") ''
|
||||||
|
Having 'systemd.user.startServices = "legacy"' is deprecated and will soon be removed.
|
||||||
|
|
||||||
|
Please change to 'systemd.user.startServices = true' to use the new systemd unit switcher (sd-switch).
|
||||||
|
'';
|
||||||
|
|
||||||
xdg.configFile = mkMerge [
|
xdg.configFile = mkMerge [
|
||||||
(lib.listToAttrs ((buildServices "service" cfg.services)
|
(lib.listToAttrs ((buildServices "service" cfg.services)
|
||||||
++ (buildServices "slice" cfg.slices)
|
++ (buildServices "slice" cfg.slices)
|
||||||
|
@ -335,8 +341,8 @@ in {
|
||||||
in ''
|
in ''
|
||||||
${pkgs.sd-switch}/bin/sd-switch \
|
${pkgs.sd-switch}/bin/sd-switch \
|
||||||
''${DRY_RUN:+--dry-run} $VERBOSE_ARG ${timeoutArg} \
|
''${DRY_RUN:+--dry-run} $VERBOSE_ARG ${timeoutArg} \
|
||||||
''${oldGenPath:+--old-units $oldGenPath/home-files/.config/systemd/user} \
|
''${oldUnitsDir:+--old-units $oldUnitsDir} \
|
||||||
--new-units $newGenPath/home-files/.config/systemd/user
|
--new-units "$newUnitsDir"
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -354,8 +360,22 @@ in {
|
||||||
warnEcho "Attempting to reload services anyway..."
|
warnEcho "Attempting to reload services anyway..."
|
||||||
fi
|
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} \
|
${ensureRuntimeDir} \
|
||||||
${getAttr cfg.startServices cmd}
|
${getAttr cfg.startServices cmd}
|
||||||
|
|
||||||
|
unset newUnitsDir oldUnitsDir
|
||||||
else
|
else
|
||||||
echo "User systemd daemon not running. Skipping reload."
|
echo "User systemd daemon not running. Skipping reload."
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -189,7 +189,7 @@ in import nmtSrc {
|
||||||
./modules/programs/bemenu
|
./modules/programs/bemenu
|
||||||
./modules/programs/borgmatic
|
./modules/programs/borgmatic
|
||||||
./modules/programs/boxxy
|
./modules/programs/boxxy
|
||||||
./modules/programs/firefox
|
./modules/programs/firefox/firefox.nix
|
||||||
./modules/programs/foot
|
./modules/programs/foot
|
||||||
./modules/programs/freetube
|
./modules/programs/freetube
|
||||||
./modules/programs/fuzzel
|
./modules/programs/fuzzel
|
||||||
|
@ -224,6 +224,7 @@ in import nmtSrc {
|
||||||
./modules/services/activitywatch
|
./modules/services/activitywatch
|
||||||
./modules/services/avizo
|
./modules/services/avizo
|
||||||
./modules/services/barrier
|
./modules/services/barrier
|
||||||
|
./modules/services/blanket
|
||||||
./modules/services/borgmatic
|
./modules/services/borgmatic
|
||||||
./modules/services/cachix-agent
|
./modules/services/cachix-agent
|
||||||
./modules/services/cliphist
|
./modules/services/cliphist
|
||||||
|
@ -240,6 +241,7 @@ in import nmtSrc {
|
||||||
./modules/services/fnott
|
./modules/services/fnott
|
||||||
./modules/services/fusuma
|
./modules/services/fusuma
|
||||||
./modules/services/git-sync
|
./modules/services/git-sync
|
||||||
|
./modules/services/glance
|
||||||
./modules/services/gpg-agent
|
./modules/services/gpg-agent
|
||||||
./modules/services/gromit-mpx
|
./modules/services/gromit-mpx
|
||||||
./modules/services/home-manager-auto-upgrade
|
./modules/services/home-manager-auto-upgrade
|
||||||
|
|
|
@ -7,6 +7,8 @@
|
||||||
nodes.machine = { ... }: {
|
nodes.machine = { ... }: {
|
||||||
imports = [ ../../../nixos ]; # Import the HM NixOS module.
|
imports = [ ../../../nixos ]; # Import the HM NixOS module.
|
||||||
|
|
||||||
|
virtualisation.memorySize = 2048;
|
||||||
|
|
||||||
users.users.alice = {
|
users.users.alice = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
description = "Alice Foobar";
|
description = "Alice Foobar";
|
||||||
|
@ -31,7 +33,7 @@
|
||||||
machine.send_chars("alice\n")
|
machine.send_chars("alice\n")
|
||||||
machine.wait_until_tty_matches("1", "Password: ")
|
machine.wait_until_tty_matches("1", "Password: ")
|
||||||
machine.send_chars("foobar\n")
|
machine.send_chars("foobar\n")
|
||||||
machine.wait_until_tty_matches("1", "alice\@machine")
|
machine.wait_until_tty_matches("1", "alice\\@machine")
|
||||||
|
|
||||||
def logout_alice():
|
def logout_alice():
|
||||||
machine.send_chars("exit\n")
|
machine.send_chars("exit\n")
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
nodes.machine = { ... }: {
|
nodes.machine = { ... }: {
|
||||||
imports = [ "${pkgs.path}/nixos/modules/installer/cd-dvd/channel.nix" ];
|
imports = [ "${pkgs.path}/nixos/modules/installer/cd-dvd/channel.nix" ];
|
||||||
virtualisation.memorySize = 2048;
|
virtualisation.memorySize = 3072;
|
||||||
nix = {
|
nix = {
|
||||||
registry.home-manager.to = {
|
registry.home-manager.to = {
|
||||||
type = "path";
|
type = "path";
|
||||||
|
@ -32,7 +32,7 @@
|
||||||
machine.send_chars("alice\n")
|
machine.send_chars("alice\n")
|
||||||
machine.wait_until_tty_matches("1", "Password: ")
|
machine.wait_until_tty_matches("1", "Password: ")
|
||||||
machine.send_chars("foobar\n")
|
machine.send_chars("foobar\n")
|
||||||
machine.wait_until_tty_matches("1", "alice\@machine")
|
machine.wait_until_tty_matches("1", "alice\\@machine")
|
||||||
|
|
||||||
def logout_alice():
|
def logout_alice():
|
||||||
machine.send_chars("exit\n")
|
machine.send_chars("exit\n")
|
||||||
|
@ -88,7 +88,7 @@
|
||||||
} /home/alice/.config/home-manager/home.nix")
|
} /home/alice/.config/home-manager/home.nix")
|
||||||
|
|
||||||
actual = succeed_as_alice("home-manager switch")
|
actual = succeed_as_alice("home-manager switch")
|
||||||
expected = "Started pueued.service - active"
|
expected = "Starting units: pueued.service"
|
||||||
assert expected in actual, \
|
assert expected in actual, \
|
||||||
f"expected home-manager switch to contain {expected}, but got {actual}"
|
f"expected home-manager switch to contain {expected}, but got {actual}"
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
machine.send_chars("alice\n")
|
machine.send_chars("alice\n")
|
||||||
machine.wait_until_tty_matches("1", "Password: ")
|
machine.wait_until_tty_matches("1", "Password: ")
|
||||||
machine.send_chars("foobar\n")
|
machine.send_chars("foobar\n")
|
||||||
machine.wait_until_tty_matches("1", "alice\@machine")
|
machine.wait_until_tty_matches("1", "alice\\@machine")
|
||||||
|
|
||||||
def logout_alice():
|
def logout_alice():
|
||||||
machine.send_chars("exit\n")
|
machine.send_chars("exit\n")
|
||||||
|
@ -85,7 +85,7 @@
|
||||||
} /home/alice/.config/home-manager/home.nix")
|
} /home/alice/.config/home-manager/home.nix")
|
||||||
|
|
||||||
actual = succeed_as_alice("home-manager switch")
|
actual = succeed_as_alice("home-manager switch")
|
||||||
expected = "Started pueued.service - active"
|
expected = "Starting units: pueued.service"
|
||||||
assert expected in actual, \
|
assert expected in actual, \
|
||||||
f"expected home-manager switch to contain {expected}, but got {actual}"
|
f"expected home-manager switch to contain {expected}, but got {actual}"
|
||||||
|
|
||||||
|
|
|
@ -4,11 +4,15 @@
|
||||||
version = "0";
|
version = "0";
|
||||||
outPath = null;
|
outPath = null;
|
||||||
buildScript = ''
|
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 \
|
touch $out/bin/fcitx5 \
|
||||||
$out/bin/fcitx5-config-qt \
|
$out/bin/fcitx5-config-qt \
|
||||||
$out/share/applications/org.fcitx.Fcitx5.desktop \
|
$out/share/applications/org.fcitx.Fcitx5.desktop \
|
||||||
|
$out/share/dbus-1/services/org.fcitx.Fcitx5.service \
|
||||||
$out/etc/xdg/autostart/org.fcitx.Fcitx5.desktop
|
$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 \
|
chmod +x $out/bin/fcitx5 \
|
||||||
$out/bin/fcitx5-config-qt
|
$out/bin/fcitx5-config-qt
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -2,4 +2,7 @@
|
||||||
nix-empty-settings = ./empty-settings.nix;
|
nix-empty-settings = ./empty-settings.nix;
|
||||||
nix-example-settings = ./example-settings.nix;
|
nix-example-settings = ./example-settings.nix;
|
||||||
nix-example-registry = ./example-registry.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;
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,6 +8,7 @@ with lib;
|
||||||
|
|
||||||
nmt.script = ''
|
nmt.script = ''
|
||||||
assertPathNotExists home-files/.config/nix
|
assertPathNotExists home-files/.config/nix
|
||||||
|
assertPathNotExists home-files/.nix-defexpr/50-home-manager
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
29
tests/modules/misc/nix/example-channels-xdg.nix
Normal file
29
tests/modules/misc/nix/example-channels-xdg.nix
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
{ lib, config, pkgs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
exampleChannel = pkgs.writeTextDir "default.nix" ''
|
||||||
|
{ pkgs ? import <nixpkgs> { } }:
|
||||||
|
|
||||||
|
{
|
||||||
|
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
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
26
tests/modules/misc/nix/example-channels.nix
Normal file
26
tests/modules/misc/nix/example-channels.nix
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
exampleChannel = pkgs.writeTextDir "default.nix" ''
|
||||||
|
{ pkgs ? import <nixpkgs> { } }:
|
||||||
|
|
||||||
|
{
|
||||||
|
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
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
|
@ -17,6 +17,8 @@ with lib;
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
nixPath = [ "/a" "/b/c" ];
|
||||||
|
|
||||||
settings = {
|
settings = {
|
||||||
use-sandbox = true;
|
use-sandbox = true;
|
||||||
show-trace = true;
|
show-trace = true;
|
||||||
|
@ -28,6 +30,9 @@ with lib;
|
||||||
assertFileContent \
|
assertFileContent \
|
||||||
home-files/.config/nix/nix.conf \
|
home-files/.config/nix/nix.conf \
|
||||||
${./example-settings-expected.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}"'
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
16
tests/modules/misc/nix/keep-old-nix-path.nix
Normal file
16
tests/modules/misc/nix/keep-old-nix-path.nix
Normal file
|
@ -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"'
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
|
@ -11,8 +11,8 @@ with lib;
|
||||||
|
|
||||||
xdg.configFile.test.text = "config";
|
xdg.configFile.test.text = "config";
|
||||||
xdg.dataFile.test.text = "data";
|
xdg.dataFile.test.text = "data";
|
||||||
|
xdg.stateFile.test.text = "state";
|
||||||
home.file."${config.xdg.cacheHome}/test".text = "cache";
|
home.file."${config.xdg.cacheHome}/test".text = "cache";
|
||||||
home.file."${config.xdg.stateHome}/test".text = "state";
|
|
||||||
|
|
||||||
nmt.script = ''
|
nmt.script = ''
|
||||||
assertFileExists home-files/.dummy-config/test
|
assertFileExists home-files/.dummy-config/test
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
test.stubs = {
|
test.stubs = {
|
||||||
atuin = { };
|
atuin = { name = "atuin"; };
|
||||||
bash-preexec = { };
|
bash-preexec = { };
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
programs.atuin.enable = true;
|
programs.atuin.enable = true;
|
||||||
|
|
||||||
test.stubs = {
|
test.stubs = {
|
||||||
atuin = { };
|
atuin = { name = "atuin"; };
|
||||||
bash-preexec = { };
|
bash-preexec = { };
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
test.stubs = {
|
test.stubs = {
|
||||||
atuin = { };
|
atuin = { name = "atuin"; };
|
||||||
bash-preexec = { };
|
bash-preexec = { };
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
lib.mkForce (builtins.toFile "empty" "");
|
lib.mkForce (builtins.toFile "empty" "");
|
||||||
|
|
||||||
test.stubs = {
|
test.stubs = {
|
||||||
atuin = { };
|
atuin = { name = "atuin"; };
|
||||||
bash-preexec = { };
|
bash-preexec = { };
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
lib.mkForce (builtins.toFile "empty" "");
|
lib.mkForce (builtins.toFile "empty" "");
|
||||||
|
|
||||||
test.stubs = {
|
test.stubs = {
|
||||||
atuin = { };
|
atuin = { name = "atuin"; };
|
||||||
bash-preexec = { };
|
bash-preexec = { };
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
lib.mkForce (builtins.toFile "empty" "");
|
lib.mkForce (builtins.toFile "empty" "");
|
||||||
|
|
||||||
test.stubs = {
|
test.stubs = {
|
||||||
atuin = { };
|
atuin = { name = "atuin"; };
|
||||||
bash-preexec = { };
|
bash-preexec = { };
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
test.stubs = {
|
test.stubs = {
|
||||||
atuin = { };
|
atuin = { name = "atuin"; };
|
||||||
bash-preexec = { };
|
bash-preexec = { };
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,27 +1,32 @@
|
||||||
|
modulePath:
|
||||||
{ config, lib, ... }:
|
{ config, lib, ... }:
|
||||||
|
|
||||||
{
|
with lib;
|
||||||
imports = [ ./setup-firefox-mock-overlay.nix ];
|
|
||||||
|
|
||||||
config = lib.mkIf config.test.enableBig {
|
let
|
||||||
|
|
||||||
|
firefoxMockOverlay = import ./setup-firefox-mock-overlay.nix modulePath;
|
||||||
|
|
||||||
|
in {
|
||||||
|
imports = [ firefoxMockOverlay ];
|
||||||
|
|
||||||
|
config = mkIf config.test.enableBig ({
|
||||||
test.asserts.assertions.expected =
|
test.asserts.assertions.expected =
|
||||||
[ "Container id must be smaller than 4294967294 (2^32 - 2)" ];
|
[ "Container id must be smaller than 4294967294 (2^32 - 2)" ];
|
||||||
|
} // setAttrByPath modulePath {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
programs.firefox = {
|
profiles.my-profile = {
|
||||||
enable = true;
|
isDefault = true;
|
||||||
|
id = 1;
|
||||||
|
|
||||||
profiles.my-profile = {
|
containers = {
|
||||||
isDefault = true;
|
"shopping" = {
|
||||||
id = 1;
|
id = 4294967294;
|
||||||
|
color = "blue";
|
||||||
containers = {
|
icon = "circle";
|
||||||
"shopping" = {
|
|
||||||
id = 4294967294;
|
|
||||||
color = "blue";
|
|
||||||
icon = "circle";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +0,0 @@
|
||||||
{
|
|
||||||
firefox-profile-settings = ./profile-settings.nix;
|
|
||||||
firefox-state-version-19_09 = ./state-version-19_09.nix;
|
|
||||||
firefox-deprecated-native-messenger = ./deprecated-native-messenger.nix;
|
|
||||||
firefox-duplicate-profile-ids = ./duplicate-profile-ids.nix;
|
|
||||||
firefox-duplicate-container-ids = ./duplicate-container-ids.nix;
|
|
||||||
firefox-container-id-out-of-range = ./container-id-out-of-range.nix;
|
|
||||||
firefox-policies = ./policies.nix;
|
|
||||||
}
|
|
|
@ -1,21 +1,26 @@
|
||||||
{ config, lib, pkgs, ... }:
|
modulePath:
|
||||||
|
{ config, lib, ... }:
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
{
|
let
|
||||||
imports = [ ./setup-firefox-mock-overlay.nix ];
|
|
||||||
|
|
||||||
config = lib.mkIf config.test.enableBig {
|
moduleName = concatStringsSep "." modulePath;
|
||||||
programs.firefox = {
|
|
||||||
enable = true;
|
|
||||||
enableGnomeExtensions = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
firefoxMockOverlay = import ./setup-firefox-mock-overlay.nix modulePath;
|
||||||
|
|
||||||
|
in {
|
||||||
|
imports = [ firefoxMockOverlay ];
|
||||||
|
|
||||||
|
config = mkIf config.test.enableBig (setAttrByPath modulePath {
|
||||||
|
enable = true;
|
||||||
|
enableGnomeExtensions = true;
|
||||||
|
} // {
|
||||||
test.asserts.warnings.expected = [''
|
test.asserts.warnings.expected = [''
|
||||||
Using 'programs.firefox.enableGnomeExtensions' has been deprecated and
|
Using '${moduleName}.enableGnomeExtensions' has been deprecated and
|
||||||
will be removed in the future. Please change to overriding the package
|
will be removed in the future. Please change to overriding the package
|
||||||
configuration using 'programs.firefox.package' instead. You can refer to
|
configuration using '${moduleName}.package' instead. You can refer to
|
||||||
its example for how to do this.
|
its example for how to do this.
|
||||||
''];
|
''];
|
||||||
};
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,35 +1,42 @@
|
||||||
|
modulePath:
|
||||||
{ config, lib, ... }:
|
{ config, lib, ... }:
|
||||||
|
|
||||||
{
|
with lib;
|
||||||
imports = [ ./setup-firefox-mock-overlay.nix ];
|
|
||||||
|
|
||||||
config = lib.mkIf config.test.enableBig {
|
let
|
||||||
|
|
||||||
|
cfg = getAttrFromPath modulePath config;
|
||||||
|
|
||||||
|
firefoxMockOverlay = import ./setup-firefox-mock-overlay.nix modulePath;
|
||||||
|
|
||||||
|
in {
|
||||||
|
imports = [ firefoxMockOverlay ];
|
||||||
|
|
||||||
|
config = mkIf config.test.enableBig ({
|
||||||
test.asserts.assertions.expected = [''
|
test.asserts.assertions.expected = [''
|
||||||
Must not have a Firefox container with an existing ID but
|
Must not have a ${cfg.name} container with an existing ID but
|
||||||
- ID 9 is used by dangerous, shopping''];
|
- ID 9 is used by dangerous, shopping''];
|
||||||
|
} // setAttrByPath modulePath {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
programs.firefox = {
|
profiles = {
|
||||||
enable = true;
|
my-profile = {
|
||||||
|
isDefault = true;
|
||||||
|
id = 1;
|
||||||
|
|
||||||
profiles = {
|
containers = {
|
||||||
my-profile = {
|
"shopping" = {
|
||||||
isDefault = true;
|
id = 9;
|
||||||
id = 1;
|
color = "blue";
|
||||||
|
icon = "circle";
|
||||||
containers = {
|
};
|
||||||
"shopping" = {
|
"dangerous" = {
|
||||||
id = 9;
|
id = 9;
|
||||||
color = "blue";
|
color = "red";
|
||||||
icon = "circle";
|
icon = "circle";
|
||||||
};
|
|
||||||
"dangerous" = {
|
|
||||||
id = 9;
|
|
||||||
color = "red";
|
|
||||||
icon = "circle";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,23 +1,30 @@
|
||||||
|
modulePath:
|
||||||
{ config, lib, ... }:
|
{ config, lib, ... }:
|
||||||
|
|
||||||
{
|
with lib;
|
||||||
imports = [ ./setup-firefox-mock-overlay.nix ];
|
|
||||||
|
|
||||||
config = lib.mkIf config.test.enableBig {
|
let
|
||||||
|
|
||||||
|
cfg = getAttrFromPath modulePath config;
|
||||||
|
|
||||||
|
firefoxMockOverlay = import ./setup-firefox-mock-overlay.nix modulePath;
|
||||||
|
|
||||||
|
in {
|
||||||
|
imports = [ firefoxMockOverlay ];
|
||||||
|
|
||||||
|
config = mkIf config.test.enableBig ({
|
||||||
test.asserts.assertions.expected = [''
|
test.asserts.assertions.expected = [''
|
||||||
Must not have a Firefox profile with an existing ID but
|
Must not have a ${cfg.name} profile with an existing ID but
|
||||||
- ID 1 is used by first, second''];
|
- ID 1 is used by first, second''];
|
||||||
|
} // setAttrByPath modulePath {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
programs.firefox = {
|
profiles = {
|
||||||
enable = true;
|
first = {
|
||||||
|
isDefault = true;
|
||||||
profiles = {
|
id = 1;
|
||||||
first = {
|
|
||||||
isDefault = true;
|
|
||||||
id = 1;
|
|
||||||
};
|
|
||||||
second = { id = 1; };
|
|
||||||
};
|
};
|
||||||
|
second = { id = 1; };
|
||||||
};
|
};
|
||||||
};
|
});
|
||||||
}
|
}
|
||||||
|
|
11
tests/modules/programs/firefox/firefox.nix
Normal file
11
tests/modules/programs/firefox/firefox.nix
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
let name = "firefox";
|
||||||
|
|
||||||
|
in builtins.mapAttrs (test: module: import module [ "programs" name ]) {
|
||||||
|
"${name}-profile-settings" = ./profile-settings.nix;
|
||||||
|
"${name}-state-version-19_09" = ./state-version-19_09.nix;
|
||||||
|
"${name}-deprecated-native-messenger" = ./deprecated-native-messenger.nix;
|
||||||
|
"${name}-duplicate-profile-ids" = ./duplicate-profile-ids.nix;
|
||||||
|
"${name}-duplicate-container-ids" = ./duplicate-container-ids.nix;
|
||||||
|
"${name}-container-id-out-of-range" = ./container-id-out-of-range.nix;
|
||||||
|
"${name}-policies" = ./policies.nix;
|
||||||
|
}
|
|
@ -1,22 +1,29 @@
|
||||||
|
modulePath:
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
{
|
with lib;
|
||||||
imports = [ ./setup-firefox-mock-overlay.nix ];
|
|
||||||
|
|
||||||
config = lib.mkIf config.test.enableBig {
|
let
|
||||||
|
|
||||||
|
cfg = getAttrFromPath modulePath config;
|
||||||
|
|
||||||
|
firefoxMockOverlay = import ./setup-firefox-mock-overlay.nix modulePath;
|
||||||
|
|
||||||
|
in {
|
||||||
|
imports = [ firefoxMockOverlay ];
|
||||||
|
|
||||||
|
config = mkIf config.test.enableBig ({
|
||||||
home.stateVersion = "23.05";
|
home.stateVersion = "23.05";
|
||||||
|
} // setAttrByPath modulePath {
|
||||||
programs.firefox = {
|
enable = true;
|
||||||
enable = true;
|
policies = { BlockAboutConfig = true; };
|
||||||
policies = { BlockAboutConfig = true; };
|
package = pkgs.${cfg.wrappedPackageName}.override {
|
||||||
package = pkgs.firefox.override {
|
extraPolicies = { DownloadDirectory = "/foo"; };
|
||||||
extraPolicies = { DownloadDirectory = "/foo"; };
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
}) // {
|
||||||
nmt.script = ''
|
nmt.script = ''
|
||||||
jq=${lib.getExe pkgs.jq}
|
jq=${lib.getExe pkgs.jq}
|
||||||
config_file="${config.programs.firefox.finalPackage}/lib/firefox/distribution/policies.json"
|
config_file="${cfg.finalPackage}/lib/${cfg.wrappedPackageName}/distribution/policies.json"
|
||||||
|
|
||||||
assertFileExists "$config_file"
|
assertFileExists "$config_file"
|
||||||
|
|
||||||
|
|
|
@ -1,177 +1,184 @@
|
||||||
|
modulePath:
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
{
|
with lib;
|
||||||
imports = [ ./setup-firefox-mock-overlay.nix ];
|
|
||||||
|
|
||||||
config = lib.mkIf config.test.enableBig {
|
let
|
||||||
programs.firefox = {
|
|
||||||
enable = true;
|
|
||||||
profiles.basic.isDefault = true;
|
|
||||||
|
|
||||||
profiles.test = {
|
cfg = getAttrFromPath modulePath config;
|
||||||
id = 1;
|
|
||||||
settings = {
|
firefoxMockOverlay = import ./setup-firefox-mock-overlay.nix modulePath;
|
||||||
"general.smoothScroll" = false;
|
|
||||||
"browser.newtabpage.pinned" = [{
|
in {
|
||||||
title = "NixOS";
|
imports = [ firefoxMockOverlay ];
|
||||||
url = "https://nixos.org";
|
|
||||||
|
config = mkIf config.test.enableBig (setAttrByPath modulePath {
|
||||||
|
enable = true;
|
||||||
|
profiles.basic.isDefault = true;
|
||||||
|
|
||||||
|
profiles.test = {
|
||||||
|
id = 1;
|
||||||
|
settings = {
|
||||||
|
"general.smoothScroll" = false;
|
||||||
|
"browser.newtabpage.pinned" = [{
|
||||||
|
title = "NixOS";
|
||||||
|
url = "https://nixos.org";
|
||||||
|
}];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
profiles.bookmarks = {
|
||||||
|
id = 2;
|
||||||
|
settings = { "general.smoothScroll" = false; };
|
||||||
|
bookmarks = [
|
||||||
|
{
|
||||||
|
toolbar = true;
|
||||||
|
bookmarks = [{
|
||||||
|
name = "Home Manager";
|
||||||
|
url = "https://wiki.nixos.org/wiki/Home_Manager";
|
||||||
}];
|
}];
|
||||||
};
|
}
|
||||||
};
|
{
|
||||||
|
name = "wikipedia";
|
||||||
|
tags = [ "wiki" ];
|
||||||
|
keyword = "wiki";
|
||||||
|
url = "https://en.wikipedia.org/wiki/Special:Search?search=%s&go=Go";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "kernel.org";
|
||||||
|
url = "https://www.kernel.org";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "Nix sites";
|
||||||
|
bookmarks = [
|
||||||
|
{
|
||||||
|
name = "homepage";
|
||||||
|
url = "https://nixos.org/";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "wiki";
|
||||||
|
tags = [ "wiki" "nix" ];
|
||||||
|
url = "https://wiki.nixos.org/";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "Nix sites";
|
||||||
|
bookmarks = [
|
||||||
|
{
|
||||||
|
name = "homepage";
|
||||||
|
url = "https://nixos.org/";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "wiki";
|
||||||
|
url = "https://wiki.nixos.org/";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
profiles.bookmarks = {
|
profiles.search = {
|
||||||
id = 2;
|
id = 3;
|
||||||
settings = { "general.smoothScroll" = false; };
|
search = {
|
||||||
bookmarks = [
|
force = true;
|
||||||
{
|
default = "Google";
|
||||||
toolbar = true;
|
privateDefault = "DuckDuckGo";
|
||||||
bookmarks = [{
|
order = [ "Nix Packages" "NixOS Wiki" ];
|
||||||
name = "Home Manager";
|
engines = {
|
||||||
url = "https://wiki.nixos.org/wiki/Home_Manager";
|
"Nix Packages" = {
|
||||||
|
urls = [{
|
||||||
|
template = "https://search.nixos.org/packages";
|
||||||
|
params = [
|
||||||
|
{
|
||||||
|
name = "type";
|
||||||
|
value = "packages";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "query";
|
||||||
|
value = "{searchTerms}";
|
||||||
|
}
|
||||||
|
];
|
||||||
}];
|
}];
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "wikipedia";
|
|
||||||
tags = [ "wiki" ];
|
|
||||||
keyword = "wiki";
|
|
||||||
url =
|
|
||||||
"https://en.wikipedia.org/wiki/Special:Search?search=%s&go=Go";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "kernel.org";
|
|
||||||
url = "https://www.kernel.org";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "Nix sites";
|
|
||||||
bookmarks = [
|
|
||||||
{
|
|
||||||
name = "homepage";
|
|
||||||
url = "https://nixos.org/";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "wiki";
|
|
||||||
tags = [ "wiki" "nix" ];
|
|
||||||
url = "https://wiki.nixos.org/";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "Nix sites";
|
|
||||||
bookmarks = [
|
|
||||||
{
|
|
||||||
name = "homepage";
|
|
||||||
url = "https://nixos.org/";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "wiki";
|
|
||||||
url = "https://wiki.nixos.org/";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
}
|
|
||||||
];
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
profiles.search = {
|
icon =
|
||||||
id = 3;
|
"/run/current-system/sw/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
|
||||||
search = {
|
|
||||||
force = true;
|
|
||||||
default = "Google";
|
|
||||||
privateDefault = "DuckDuckGo";
|
|
||||||
order = [ "Nix Packages" "NixOS Wiki" ];
|
|
||||||
engines = {
|
|
||||||
"Nix Packages" = {
|
|
||||||
urls = [{
|
|
||||||
template = "https://search.nixos.org/packages";
|
|
||||||
params = [
|
|
||||||
{
|
|
||||||
name = "type";
|
|
||||||
value = "packages";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "query";
|
|
||||||
value = "{searchTerms}";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
}];
|
|
||||||
|
|
||||||
icon =
|
definedAliases = [ "@np" ];
|
||||||
"/run/current-system/sw/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
|
|
||||||
|
|
||||||
definedAliases = [ "@np" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
"NixOS Wiki" = {
|
|
||||||
urls = [{
|
|
||||||
template =
|
|
||||||
"https://wiki.nixos.org/index.php?search={searchTerms}";
|
|
||||||
}];
|
|
||||||
iconUpdateURL = "https://wiki.nixos.org/favicon.png";
|
|
||||||
updateInterval = 24 * 60 * 60 * 1000;
|
|
||||||
definedAliases = [ "@nw" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
"Bing".metaData.hidden = true;
|
|
||||||
"Google".metaData.alias = "@g";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
"NixOS Wiki" = {
|
||||||
|
urls = [{
|
||||||
|
template =
|
||||||
|
"https://wiki.nixos.org/index.php?search={searchTerms}";
|
||||||
|
}];
|
||||||
|
iconUpdateURL = "https://wiki.nixos.org/favicon.png";
|
||||||
|
updateInterval = 24 * 60 * 60 * 1000;
|
||||||
|
definedAliases = [ "@nw" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
"Bing".metaData.hidden = true;
|
||||||
|
"Google".metaData.alias = "@g";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
|
||||||
profiles.searchWithoutDefault = {
|
profiles.searchWithoutDefault = {
|
||||||
id = 4;
|
id = 4;
|
||||||
search = {
|
search = {
|
||||||
force = true;
|
force = true;
|
||||||
order = [ "Google" "Nix Packages" ];
|
order = [ "Google" "Nix Packages" ];
|
||||||
engines = {
|
engines = {
|
||||||
"Nix Packages" = {
|
"Nix Packages" = {
|
||||||
urls = [{
|
urls = [{
|
||||||
template = "https://search.nixos.org/packages";
|
template = "https://search.nixos.org/packages";
|
||||||
params = [
|
params = [
|
||||||
{
|
{
|
||||||
name = "type";
|
name = "type";
|
||||||
value = "packages";
|
value = "packages";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
name = "query";
|
name = "query";
|
||||||
value = "{searchTerms}";
|
value = "{searchTerms}";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
}];
|
}];
|
||||||
|
|
||||||
definedAliases = [ "@np" ];
|
definedAliases = [ "@np" ];
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
profiles.containers = {
|
|
||||||
id = 5;
|
|
||||||
containers = {
|
|
||||||
"shopping" = {
|
|
||||||
id = 6;
|
|
||||||
icon = "circle";
|
|
||||||
color = "yellow";
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
profiles.containers = {
|
||||||
|
id = 5;
|
||||||
|
containers = {
|
||||||
|
"shopping" = {
|
||||||
|
id = 6;
|
||||||
|
icon = "circle";
|
||||||
|
color = "yellow";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
} // {
|
||||||
|
|
||||||
nmt.script = ''
|
nmt.script = ''
|
||||||
assertFileRegex \
|
assertFileRegex \
|
||||||
home-path/bin/firefox \
|
home-path/bin/${cfg.wrappedPackageName} \
|
||||||
MOZ_APP_LAUNCHER
|
MOZ_APP_LAUNCHER
|
||||||
|
|
||||||
assertDirectoryExists home-files/.mozilla/firefox/basic
|
assertDirectoryExists home-files/${cfg.configPath}/basic
|
||||||
|
|
||||||
assertFileContent \
|
assertFileContent \
|
||||||
home-files/.mozilla/firefox/test/user.js \
|
home-files/${cfg.configPath}/test/user.js \
|
||||||
${./profile-settings-expected-user.js}
|
${./profile-settings-expected-user.js}
|
||||||
|
|
||||||
assertFileContent \
|
assertFileContent \
|
||||||
home-files/.mozilla/firefox/containers/containers.json \
|
home-files/${cfg.configPath}/containers/containers.json \
|
||||||
${./profile-settings-expected-containers.json}
|
${./profile-settings-expected-containers.json}
|
||||||
|
|
||||||
bookmarksUserJs=$(normalizeStorePaths \
|
bookmarksUserJs=$(normalizeStorePaths \
|
||||||
home-files/.mozilla/firefox/bookmarks/user.js)
|
home-files/${cfg.configPath}/bookmarks/user.js)
|
||||||
|
|
||||||
assertFileContent \
|
assertFileContent \
|
||||||
$bookmarksUserJs \
|
$bookmarksUserJs \
|
||||||
|
@ -179,7 +186,7 @@
|
||||||
|
|
||||||
bookmarksFile="$(sed -n \
|
bookmarksFile="$(sed -n \
|
||||||
'/browser.bookmarks.file/ {s|^.*\(/nix/store[^"]*\).*|\1|;p}' \
|
'/browser.bookmarks.file/ {s|^.*\(/nix/store[^"]*\).*|\1|;p}' \
|
||||||
$TESTED/home-files/.mozilla/firefox/bookmarks/user.js)"
|
$TESTED/home-files/${cfg.configPath}/bookmarks/user.js)"
|
||||||
|
|
||||||
assertFileContent \
|
assertFileContent \
|
||||||
$bookmarksFile \
|
$bookmarksFile \
|
||||||
|
@ -197,12 +204,12 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
assertFirefoxSearchContent \
|
assertFirefoxSearchContent \
|
||||||
home-files/.mozilla/firefox/search/search.json.mozlz4 \
|
home-files/${cfg.configPath}/search/search.json.mozlz4 \
|
||||||
${./profile-settings-expected-search.json}
|
${./profile-settings-expected-search.json}
|
||||||
|
|
||||||
assertFirefoxSearchContent \
|
assertFirefoxSearchContent \
|
||||||
home-files/.mozilla/firefox/searchWithoutDefault/search.json.mozlz4 \
|
home-files/${cfg.configPath}/searchWithoutDefault/search.json.mozlz4 \
|
||||||
${./profile-settings-expected-search-without-default.json}
|
${./profile-settings-expected-search-without-default.json}
|
||||||
'';
|
'';
|
||||||
};
|
});
|
||||||
}
|
}
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue