From 8be82697f797ce2190b6e2d7b11cd384076caae7 Mon Sep 17 00:00:00 2001 From: Robert Helgesson Date: Sun, 23 Jun 2024 23:03:18 +0200 Subject: [PATCH 01/18] ssh-agent: fix evaluation of maintainer field --- modules/lib/maintainers.nix | 6 ++++++ modules/services/ssh-agent.nix | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/modules/lib/maintainers.nix b/modules/lib/maintainers.nix index b5175a87..a820d534 100644 --- a/modules/lib/maintainers.nix +++ b/modules/lib/maintainers.nix @@ -201,6 +201,12 @@ github = "kubukoz"; githubId = 894884; }; + lheckemann = { + name = "Linus Heckemann"; + email = "git@sphalerite.org"; + github = "lheckemann"; + githubId = 341954; + }; loicreynier = { name = "Loïc Reynier"; email = "loic@loireynier.fr"; diff --git a/modules/services/ssh-agent.nix b/modules/services/ssh-agent.nix index 16db3232..88ecf38b 100644 --- a/modules/services/ssh-agent.nix +++ b/modules/services/ssh-agent.nix @@ -5,7 +5,7 @@ let cfg = config.services.ssh-agent; in { - meta.maintainers = [ lib.maintainers.lheckemann ]; + meta.maintainers = [ lib.hm.maintainers.lheckemann ]; options = { services.ssh-agent = { From 6a9a1e51bbb8c301eae5aa63c9fc3c751ec5315b Mon Sep 17 00:00:00 2001 From: home-manager-bot <106474382+home-manager-bot@users.noreply.github.com> Date: Sun, 23 Jun 2024 23:11:27 +0200 Subject: [PATCH 02/18] flake.lock: Update MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Flake lock file updates: • Updated input 'nixpkgs': 'github:NixOS/nixpkgs/b60ebf54c15553b393d144357375ea956f89e9a9?narHash=sha256-pup6cYwtgvzDpvpSCFh1TEUjw2zkNpk8iolbKnyFmmU%3D' (2024-06-16) → 'github:NixOS/nixpkgs/d603719ec6e294f034936c0d0dc06f689d91b6c3?narHash=sha256-k3JqJrkdoYwE3fHE6xGDY676AYmyh4U2Zw%2B0Bwe5DLU%3D' (2024-06-20) Co-authored-by: github-actions[bot] --- flake.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flake.lock b/flake.lock index 538de1b3..b809cdb7 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1718530797, - "narHash": "sha256-pup6cYwtgvzDpvpSCFh1TEUjw2zkNpk8iolbKnyFmmU=", + "lastModified": 1718895438, + "narHash": "sha256-k3JqJrkdoYwE3fHE6xGDY676AYmyh4U2Zw+0Bwe5DLU=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "b60ebf54c15553b393d144357375ea956f89e9a9", + "rev": "d603719ec6e294f034936c0d0dc06f689d91b6c3", "type": "github" }, "original": { From 5ccc3d6739b5e694841ced27cb5c06b50b163695 Mon Sep 17 00:00:00 2001 From: lordkekz Date: Mon, 3 Jun 2024 19:39:00 +0200 Subject: [PATCH 03/18] yazi: Ensure plugin suffix `.yazi` - Append suffix `.yazi` to symlink targets of yazi plugins, if needed - Improve some docs, especially links to upstream docs. - Update tests to make use of this feature. --- modules/programs/yazi.nix | 29 +++++++++++++++++------- tests/modules/programs/yazi/settings.nix | 7 +++++- 2 files changed, 27 insertions(+), 9 deletions(-) diff --git a/modules/programs/yazi.nix b/modules/programs/yazi.nix index 11f4e75c..f96a9bdf 100644 --- a/modules/programs/yazi.nix +++ b/modules/programs/yazi.nix @@ -144,9 +144,10 @@ in { type = with types; attrsOf (oneOf [ path package ]); default = { }; description = '' - Lua plugins. + Lua plugins. Will be linked into {file}`$XDG_CONFIG_HOME/yazi/plugins/`. - See https://yazi-rs.github.io/docs/plugins/overview/ for documentation. + See + for documentation. ''; example = literalExpression '' { @@ -162,7 +163,7 @@ in { description = '' Pre-made themes. - See https://yazi-rs.github.io/docs/flavors/overview/ for documentation. + See for documentation. ''; example = literalExpression '' { @@ -171,7 +172,6 @@ in { } ''; }; - }; config = mkIf cfg.enable { @@ -199,9 +199,22 @@ in { }; "yazi/init.lua" = mkIf (cfg.initLua != null) { source = cfg.initLua; }; } // (mapAttrs' - (name: value: nameValuePair "yazi/plugins/${name}" { source = value; }) - cfg.plugins) // (mapAttrs' - (name: value: nameValuePair "yazi/flavors/${name}" { source = value; }) - cfg.flavors); + (name: value: nameValuePair "yazi/flavors/${name}" { source = value; }) + cfg.flavors) // (let + # Make sure that the directory ends in `.yazi`, to comply with specification. + # `pluginName` is essential, it's needed to apply config in yazi's `init.lua` + ensureSuffix = pluginName: + if lib.hasSuffix ".yazi" pluginName then + "yazi/plugins/${pluginName}" + else + "yazi/plugins/${pluginName}.yazi"; + + mkPluginLink = pluginName: pluginPackage: { + name = ensureSuffix pluginName; + value.source = pluginPackage; + }; + + pluginLinks = mapAttrs' mkPluginLink cfg.plugins; + in pluginLinks); }; } diff --git a/tests/modules/programs/yazi/settings.nix b/tests/modules/programs/yazi/settings.nix index 4655ae8b..33b99c2c 100644 --- a/tests/modules/programs/yazi/settings.nix +++ b/tests/modules/programs/yazi/settings.nix @@ -70,7 +70,10 @@ }; }; initLua = ./init.lua; - plugins = { "test.yazi" = ./plugin; }; + plugins = { + "test.yazi" = ./plugin; + "anotherTest" = ./plugin; + }; flavors = { "test.yazi" = ./flavor; }; }; @@ -87,6 +90,8 @@ ${./init.lua} assertFileContent home-files/.config/yazi/plugins/test.yazi/init.lua \ ${./plugin/init.lua} + assertFileContent home-files/.config/yazi/plugins/anotherTest.yazi/init.lua \ + ${./plugin/init.lua} assertFileContent home-files/.config/yazi/flavors/test.yazi/init.lua \ ${./flavor/init.lua} ''; From 340b98c0abb56ae24d7ee7dee64104583ad8a8c6 Mon Sep 17 00:00:00 2001 From: lordkekz Date: Mon, 3 Jun 2024 20:29:06 +0200 Subject: [PATCH 04/18] yazi: Assert that plugins have valid structure --- modules/programs/yazi.nix | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/modules/programs/yazi.nix b/modules/programs/yazi.nix index f96a9bdf..59443dd3 100644 --- a/modules/programs/yazi.nix +++ b/modules/programs/yazi.nix @@ -209,12 +209,31 @@ in { else "yazi/plugins/${pluginName}.yazi"; - mkPluginLink = pluginName: pluginPackage: { + mkPluginLink = pluginName: pluginPackageOrPath: { name = ensureSuffix pluginName; - value.source = pluginPackage; + value.source = pluginPackageOrPath; }; pluginLinks = mapAttrs' mkPluginLink cfg.plugins; in pluginLinks); + + assertions = (mapAttrsToList (pluginName: pluginPackageOrPath: + let + isDir = pathIsDirectory "${pluginPackageOrPath}"; + hasInitLua = pathExists "${pluginPackageOrPath}/init.lua" + && !(pathIsDirectory "${pluginPackageOrPath}/init.lua"); + in { + assertion = isDir && hasInitLua; + message = + "Value at `programs.yazi.plugins.${pluginName}` is not a valid yazi plugin." + + (optionalString (!isDir) '' + + The path or package should be a directory, not a single file.'') + + (optionalString (!hasInitLua) '' + + The path or package must contain a file `init.lua`.'') + '' + + Evaluated value: `${pluginPackageOrPath}`''; + }) cfg.plugins); }; } From 09bc5c5949c73cf6b217badaae25feb2b4a7a2e5 Mon Sep 17 00:00:00 2001 From: Didn't read the style guide <50516935+lordkekz@users.noreply.github.com> Date: Tue, 4 Jun 2024 00:56:08 +0200 Subject: [PATCH 05/18] yazi: plugin names should be in kebab case (test) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: 三咲雅 · Misaki Masa --- tests/modules/programs/yazi/settings.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/modules/programs/yazi/settings.nix b/tests/modules/programs/yazi/settings.nix index 33b99c2c..f0d54fae 100644 --- a/tests/modules/programs/yazi/settings.nix +++ b/tests/modules/programs/yazi/settings.nix @@ -71,8 +71,8 @@ }; initLua = ./init.lua; plugins = { - "test.yazi" = ./plugin; - "anotherTest" = ./plugin; + "test" = ./plugin; + "another-test" = ./plugin; }; flavors = { "test.yazi" = ./flavor; }; }; From 16f86c94ce2399ae09ae99b8f071f37bbc964b4f Mon Sep 17 00:00:00 2001 From: lordkekz Date: Wed, 5 Jun 2024 21:24:18 +0200 Subject: [PATCH 06/18] yazi: Assert plugin/flavor structure and warn about plugin/flavor suffix - Always append suffix `.yazi` to plugin's and flavor's attribute names. - Warn if the attribute names already have the suffix. - Assert that plugin's and flavor's values point to directories containing an `init.lua` file. --- modules/programs/yazi.nix | 86 +++++++++++++--------- tests/modules/programs/yazi/empty/.gitkeep | 0 tests/modules/programs/yazi/settings.nix | 23 ++++-- 3 files changed, 66 insertions(+), 43 deletions(-) create mode 100644 tests/modules/programs/yazi/empty/.gitkeep diff --git a/modules/programs/yazi.nix b/modules/programs/yazi.nix index 59443dd3..db946344 100644 --- a/modules/programs/yazi.nix +++ b/modules/programs/yazi.nix @@ -144,7 +144,9 @@ in { type = with types; attrsOf (oneOf [ path package ]); default = { }; description = '' - Lua plugins. Will be linked into {file}`$XDG_CONFIG_HOME/yazi/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/.yazi`. See for documentation. @@ -162,6 +164,8 @@ in { default = { }; description = '' Pre-made themes. + Values should be a package or path containing an `init.lua` file. + Will be linked to {file}`$XDG_CONFIG_HOME/yazi/flavors/.yazi`. See for documentation. ''; @@ -198,42 +202,52 @@ in { source = tomlFormat.generate "yazi-theme" cfg.theme; }; "yazi/init.lua" = mkIf (cfg.initLua != null) { source = cfg.initLua; }; - } // (mapAttrs' - (name: value: nameValuePair "yazi/flavors/${name}" { source = value; }) - cfg.flavors) // (let - # Make sure that the directory ends in `.yazi`, to comply with specification. - # `pluginName` is essential, it's needed to apply config in yazi's `init.lua` - ensureSuffix = pluginName: - if lib.hasSuffix ".yazi" pluginName then - "yazi/plugins/${pluginName}" - else - "yazi/plugins/${pluginName}.yazi"; + } // (mapAttrs' (name: value: + nameValuePair "yazi/flavors/${name}.yazi" { source = value; }) + cfg.flavors) // (mapAttrs' (name: value: + nameValuePair "yazi/plugins/${name}.yazi" { source = value; }) + cfg.plugins); - mkPluginLink = pluginName: pluginPackageOrPath: { - name = ensureSuffix pluginName; - value.source = pluginPackageOrPath; - }; + 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) + ]); - pluginLinks = mapAttrs' mkPluginLink cfg.plugins; - in pluginLinks); - - assertions = (mapAttrsToList (pluginName: pluginPackageOrPath: - let - isDir = pathIsDirectory "${pluginPackageOrPath}"; - hasInitLua = pathExists "${pluginPackageOrPath}/init.lua" - && !(pathIsDirectory "${pluginPackageOrPath}/init.lua"); - in { - assertion = isDir && hasInitLua; - message = - "Value at `programs.yazi.plugins.${pluginName}` is not a valid yazi plugin." - + (optionalString (!isDir) '' - - The path or package should be a directory, not a single file.'') - + (optionalString (!hasInitLua) '' - - The path or package must contain a file `init.lua`.'') + '' - - Evaluated value: `${pluginPackageOrPath}`''; - }) cfg.plugins); + assertions = let + mkAsserts = opt: + mapAttrsToList (name: value: + let + isDir = pathIsDirectory "${value}"; + msgNotDir = optionalString (!isDir) + "The path or package should be a directory, not a single file."; + hasInitLua = pathExists "${value}/init.lua" + && !(pathIsDirectory "${value}/init.lua"); + msgNoInitLua = optionalString (!hasInitLua) + "The path or package must contain a file `init.lua`."; + singularOpt = removeSuffix "s" opt; + in { + assertion = isDir && hasInitLua; + message = '' + Value at `programs.yazi.${opt}.${name}` is not a valid yazi ${singularOpt}. + ${msgNotDir} + ${msgNoInitLua} + Evaluated value: `${value}` + ''; + }) cfg.${opt}; + in (mkAsserts "flavors") ++ (mkAsserts "plugins"); }; } diff --git a/tests/modules/programs/yazi/empty/.gitkeep b/tests/modules/programs/yazi/empty/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/tests/modules/programs/yazi/settings.nix b/tests/modules/programs/yazi/settings.nix index f0d54fae..66703871 100644 --- a/tests/modules/programs/yazi/settings.nix +++ b/tests/modules/programs/yazi/settings.nix @@ -71,10 +71,21 @@ }; initLua = ./init.lua; plugins = { - "test" = ./plugin; - "another-test" = ./plugin; + testplugin = ./plugin; + ## Produces warning + #"plugin-with-suffix.yazi" = ./plugin; + ## Fails assertion + #single-file-plugin = ./plugin/init.lua; + #empty-dir-plugin = ./empty; + }; + flavors = { + testflavor = ./flavor; + ## Produces warning + #"flavor-with-suffix.yazi" = ./flavor; + ## Fails assertion + #single-file-flavor = ./flavor/init.lua; + #empty-dir-flavor = ./empty; }; - flavors = { "test.yazi" = ./flavor; }; }; test.stubs.yazi = { }; @@ -88,11 +99,9 @@ ${./theme-expected.toml} assertFileContent home-files/.config/yazi/init.lua \ ${./init.lua} - assertFileContent home-files/.config/yazi/plugins/test.yazi/init.lua \ + assertFileContent home-files/.config/yazi/plugins/testplugin.yazi/init.lua \ ${./plugin/init.lua} - assertFileContent home-files/.config/yazi/plugins/anotherTest.yazi/init.lua \ - ${./plugin/init.lua} - assertFileContent home-files/.config/yazi/flavors/test.yazi/init.lua \ + assertFileContent home-files/.config/yazi/flavors/testflavor.yazi/init.lua \ ${./flavor/init.lua} ''; } From 216d51eb22f9ce1a4c50a4737a4adcdb42fb6306 Mon Sep 17 00:00:00 2001 From: lordkekz Date: Thu, 6 Jun 2024 12:05:28 +0200 Subject: [PATCH 07/18] yazi: Fix expected structure of flavors --- modules/programs/yazi.nix | 29 +++++++---- tests/modules/programs/yazi/flavor/LICENSE | 0 .../programs/yazi/flavor/LICENSE-tmtheme | 0 tests/modules/programs/yazi/flavor/README.md | 50 +++++++++++++++++++ .../modules/programs/yazi/flavor/flavor.toml | 2 + tests/modules/programs/yazi/flavor/init.lua | 1 - .../modules/programs/yazi/flavor/preview.png | 0 .../modules/programs/yazi/flavor/tmtheme.xml | 0 tests/modules/programs/yazi/settings.nix | 6 +-- 9 files changed, 75 insertions(+), 13 deletions(-) create mode 100644 tests/modules/programs/yazi/flavor/LICENSE create mode 100644 tests/modules/programs/yazi/flavor/LICENSE-tmtheme create mode 100644 tests/modules/programs/yazi/flavor/README.md create mode 100644 tests/modules/programs/yazi/flavor/flavor.toml delete mode 100644 tests/modules/programs/yazi/flavor/init.lua create mode 100644 tests/modules/programs/yazi/flavor/preview.png create mode 100644 tests/modules/programs/yazi/flavor/tmtheme.xml diff --git a/modules/programs/yazi.nix b/modules/programs/yazi.nix index db946344..cb00ecc3 100644 --- a/modules/programs/yazi.nix +++ b/modules/programs/yazi.nix @@ -164,7 +164,7 @@ in { default = { }; description = '' Pre-made themes. - Values should be a package or path containing an `init.lua` file. + Values should be a package or path containing the required files. Will be linked to {file}`$XDG_CONFIG_HOME/yazi/flavors/.yazi`. See for documentation. @@ -228,26 +228,37 @@ in { ]); assertions = let - mkAsserts = opt: + 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."; - hasInitLua = pathExists "${value}/init.lua" - && !(pathIsDirectory "${value}/init.lua"); - msgNoInitLua = optionalString (!hasInitLua) - "The path or package must contain a file `init.lua`."; + 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 && hasInitLua; + assertion = isDir && missingFiles == [ ]; message = '' Value at `programs.yazi.${opt}.${name}` is not a valid yazi ${singularOpt}. ${msgNotDir} - ${msgNoInitLua} + ${msgFilesMissing} Evaluated value: `${value}` ''; }) cfg.${opt}; - in (mkAsserts "flavors") ++ (mkAsserts "plugins"); + in (mkAsserts "flavors" [ + "flavor.toml" + "tmtheme.xml" + "README.md" + "preview.png" + "LICENSE" + "LICENSE-tmtheme" + ]) ++ (mkAsserts "plugins" [ "init.lua" ]); }; } diff --git a/tests/modules/programs/yazi/flavor/LICENSE b/tests/modules/programs/yazi/flavor/LICENSE new file mode 100644 index 00000000..e69de29b diff --git a/tests/modules/programs/yazi/flavor/LICENSE-tmtheme b/tests/modules/programs/yazi/flavor/LICENSE-tmtheme new file mode 100644 index 00000000..e69de29b diff --git a/tests/modules/programs/yazi/flavor/README.md b/tests/modules/programs/yazi/flavor/README.md new file mode 100644 index 00000000..3ba41d0d --- /dev/null +++ b/tests/modules/programs/yazi/flavor/README.md @@ -0,0 +1,50 @@ +
+ Yazi logo +
+ +

+ Example Flavor for Yazi +

+ +## Cooking up a new flavor + +> [!NOTE] +> Please remove this section from your README before publishing. + +1. [x] Fork this repository and rename it to `your-flavor-name.yazi`. +2. [ ] Copy the **parts you need to customize** from the [default theme.toml](https://github.com/sxyazi/yazi/blob/main/yazi-config/preset/theme.toml) as `./flavor.toml`, and change them to meet your preferences. +3. [ ] Find a `.tmTheme` file on GitHub that matches the color of your flavor, copy it and it's license file as `./tmtheme.xml`, and `LICENSE-tmtheme`. +4. [ ] Modify the content and preview image in the README to fit your flavor. + +## 👀 Preview + + + +## 🎨 Installation + + + +```bash +# Linux/macOS +git clone https://github.com/username/example.yazi.git ~/.config/yazi/flavors/example.yazi + +# Windows +git clone https://github.com/username/example.yazi.git %AppData%\yazi\config\flavors\example.yazi +``` + +## ⚙️ Usage + +Add the these lines to your `theme.toml` configuration file to use it: + + + +```toml +[flavor] +use = "example" +``` + +## 📜 License + +The flavor is MIT-licensed, and the included tmTheme is also MIT-licensed. + +Check the [LICENSE](LICENSE) and [LICENSE-tmtheme](LICENSE-tmtheme) file for more details. diff --git a/tests/modules/programs/yazi/flavor/flavor.toml b/tests/modules/programs/yazi/flavor/flavor.toml new file mode 100644 index 00000000..35e1fe77 --- /dev/null +++ b/tests/modules/programs/yazi/flavor/flavor.toml @@ -0,0 +1,2 @@ +# This is a flavor. + diff --git a/tests/modules/programs/yazi/flavor/init.lua b/tests/modules/programs/yazi/flavor/init.lua deleted file mode 100644 index 8d06fa7a..00000000 --- a/tests/modules/programs/yazi/flavor/init.lua +++ /dev/null @@ -1 +0,0 @@ --- This is a flavor. diff --git a/tests/modules/programs/yazi/flavor/preview.png b/tests/modules/programs/yazi/flavor/preview.png new file mode 100644 index 00000000..e69de29b diff --git a/tests/modules/programs/yazi/flavor/tmtheme.xml b/tests/modules/programs/yazi/flavor/tmtheme.xml new file mode 100644 index 00000000..e69de29b diff --git a/tests/modules/programs/yazi/settings.nix b/tests/modules/programs/yazi/settings.nix index 66703871..2694dade 100644 --- a/tests/modules/programs/yazi/settings.nix +++ b/tests/modules/programs/yazi/settings.nix @@ -83,7 +83,7 @@ ## Produces warning #"flavor-with-suffix.yazi" = ./flavor; ## Fails assertion - #single-file-flavor = ./flavor/init.lua; + #single-file-flavor = ./flavor/flavor.toml; #empty-dir-flavor = ./empty; }; }; @@ -101,7 +101,7 @@ ${./init.lua} assertFileContent home-files/.config/yazi/plugins/testplugin.yazi/init.lua \ ${./plugin/init.lua} - assertFileContent home-files/.config/yazi/flavors/testflavor.yazi/init.lua \ - ${./flavor/init.lua} + assertFileContent home-files/.config/yazi/flavors/testflavor.yazi/flavor.toml \ + ${./flavor/flavor.toml} ''; } From 6b1f90a8ff92e81638ae6eb48cd62349c3e387bb Mon Sep 17 00:00:00 2001 From: h7x4 Date: Sun, 23 Jun 2024 21:11:25 +0200 Subject: [PATCH 08/18] stalonetray: move config file to XDG_CONFIG_HOME --- modules/services/stalonetray.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/services/stalonetray.nix b/modules/services/stalonetray.nix index 172d6dd9..9d4d7a53 100644 --- a/modules/services/stalonetray.nix +++ b/modules/services/stalonetray.nix @@ -74,7 +74,7 @@ in { } (mkIf (cfg.config != { }) { - home.file.".stalonetrayrc".text = let + xdg.configFile."stalonetrayrc".text = let valueToString = v: if isBool v then (if v then "true" else "false") @@ -88,7 +88,7 @@ in { }) (mkIf (cfg.extraConfig != "") { - home.file.".stalonetrayrc".text = cfg.extraConfig; + xdg.configFile."stalonetrayrc".text = cfg.extraConfig; }) ]); } From d3bf2a06129c2493ec55e217be2907b92279f30f Mon Sep 17 00:00:00 2001 From: eljamm Date: Sun, 23 Jun 2024 15:01:38 +0100 Subject: [PATCH 09/18] yazi: add eljamm as maintainer --- modules/programs/yazi.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/programs/yazi.nix b/modules/programs/yazi.nix index cb00ecc3..77acfc6b 100644 --- a/modules/programs/yazi.nix +++ b/modules/programs/yazi.nix @@ -40,7 +40,7 @@ let } ''; in { - meta.maintainers = with maintainers; [ xyenon ]; + meta.maintainers = with maintainers; [ xyenon eljamm ]; options.programs.yazi = { enable = mkEnableOption "yazi"; From 92a26bf6df1f00cbbed16a99d2547531ff4b3a83 Mon Sep 17 00:00:00 2001 From: eljamm Date: Sun, 23 Jun 2024 15:05:25 +0100 Subject: [PATCH 10/18] yazi: add shellWrapperName & rename wrappers to yy MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The program shell wrappers have been renamed from `ya` to `yy` following the introduction of the new CLI tool named `ya`. With this in mind, the `shellWrapperName` option has been introduced to provide users with more flexibility in choosing the name they're most accustomed to (ra, lf, ...). Co-authored-by: XYenon Co-authored-by: 三咲雅 · Misaki Masa --- modules/misc/news.nix | 13 +++++++++++++ modules/programs/yazi.nix | 15 ++++++++++++--- .../programs/yazi/bash-integration-enabled.nix | 2 +- .../programs/yazi/fish-integration-enabled.nix | 2 +- .../programs/yazi/nushell-integration-enabled.nix | 2 +- .../programs/yazi/zsh-integration-enabled.nix | 2 +- 6 files changed, 29 insertions(+), 7 deletions(-) diff --git a/modules/misc/news.nix b/modules/misc/news.nix index 997c7815..e7e582f5 100644 --- a/modules/misc/news.nix +++ b/modules/misc/news.nix @@ -1679,6 +1679,19 @@ in { 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. + ''; + } ]; }; } diff --git a/modules/programs/yazi.nix b/modules/programs/yazi.nix index 77acfc6b..105bbec4 100644 --- a/modules/programs/yazi.nix +++ b/modules/programs/yazi.nix @@ -7,7 +7,7 @@ let tomlFormat = pkgs.formats.toml { }; bashIntegration = '' - function ya() { + function ${cfg.shellWrapperName}() { local tmp="$(mktemp -t "yazi-cwd.XXXXX")" yazi "$@" --cwd-file="$tmp" if cwd="$(cat -- "$tmp")" && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then @@ -18,7 +18,7 @@ let ''; fishIntegration = '' - function ya + function ${cfg.shellWrapperName} set tmp (mktemp -t "yazi-cwd.XXXXX") yazi $argv --cwd-file="$tmp" if set cwd (cat -- "$tmp"); and [ -n "$cwd" ]; and [ "$cwd" != "$PWD" ] @@ -29,7 +29,7 @@ let ''; nushellIntegration = '' - def --env ya [...args] { + def --env ${cfg.shellWrapperName} [...args] { let tmp = (mktemp -t "yazi-cwd.XXXXX") yazi ...$args --cwd-file $tmp let cwd = (open $tmp) @@ -47,6 +47,15 @@ in { package = mkPackageOption pkgs "yazi" { }; + shellWrapperName = mkOption { + type = types.str; + default = "yy"; + example = "y"; + description = '' + Name of the shell wrapper to be called. + ''; + }; + enableBashIntegration = mkEnableOption "Bash integration"; enableZshIntegration = mkEnableOption "Zsh integration"; diff --git a/tests/modules/programs/yazi/bash-integration-enabled.nix b/tests/modules/programs/yazi/bash-integration-enabled.nix index ac2e4979..474a989f 100644 --- a/tests/modules/programs/yazi/bash-integration-enabled.nix +++ b/tests/modules/programs/yazi/bash-integration-enabled.nix @@ -2,7 +2,7 @@ let shellIntegration = '' - function ya() { + function yy() { local tmp="$(mktemp -t "yazi-cwd.XXXXX")" yazi "$@" --cwd-file="$tmp" if cwd="$(cat -- "$tmp")" && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then diff --git a/tests/modules/programs/yazi/fish-integration-enabled.nix b/tests/modules/programs/yazi/fish-integration-enabled.nix index 6d2b9fa3..2231035b 100644 --- a/tests/modules/programs/yazi/fish-integration-enabled.nix +++ b/tests/modules/programs/yazi/fish-integration-enabled.nix @@ -2,7 +2,7 @@ let shellIntegration = '' - function ya + function yy set tmp (mktemp -t "yazi-cwd.XXXXX") yazi $argv --cwd-file="$tmp" if set cwd (cat -- "$tmp"); and [ -n "$cwd" ]; and [ "$cwd" != "$PWD" ] diff --git a/tests/modules/programs/yazi/nushell-integration-enabled.nix b/tests/modules/programs/yazi/nushell-integration-enabled.nix index 9adbaa98..a2de2d8b 100644 --- a/tests/modules/programs/yazi/nushell-integration-enabled.nix +++ b/tests/modules/programs/yazi/nushell-integration-enabled.nix @@ -2,7 +2,7 @@ let shellIntegration = '' - def --env ya [...args] { + def --env yy [...args] { let tmp = (mktemp -t "yazi-cwd.XXXXX") yazi ...$args --cwd-file $tmp let cwd = (open $tmp) diff --git a/tests/modules/programs/yazi/zsh-integration-enabled.nix b/tests/modules/programs/yazi/zsh-integration-enabled.nix index d5090a6a..0c0ec217 100644 --- a/tests/modules/programs/yazi/zsh-integration-enabled.nix +++ b/tests/modules/programs/yazi/zsh-integration-enabled.nix @@ -2,7 +2,7 @@ let shellIntegration = '' - function ya() { + function yy() { local tmp="$(mktemp -t "yazi-cwd.XXXXX")" yazi "$@" --cwd-file="$tmp" if cwd="$(cat -- "$tmp")" && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then From 7a88ff6ad1e001043f876ebdb1d7460cdfe874d2 Mon Sep 17 00:00:00 2001 From: Kacper Koniuszy <120419423+kkoniuszy@users.noreply.github.com> Date: Wed, 26 Jun 2024 17:41:48 +0200 Subject: [PATCH 11/18] systemd: fix sd-switch error on empty target directory After update to sd-switch 0.5.0, `home-manager switch` failed with the following error message: > Error: Error switching > > Caused by: > 0: Failed to build switch plan > 1: No such file or directory (os error 2) This was caused by a non-existing target unit directory due to no user services being managed by home-manager. This change makes sd-switch run with pkgs.emptyDirectory as the target in such cases. Closes: https://github.com/nix-community/home-manager/issues/5552 --- modules/systemd.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/modules/systemd.nix b/modules/systemd.nix index f209f65d..1d96ec8d 100644 --- a/modules/systemd.nix +++ b/modules/systemd.nix @@ -336,7 +336,7 @@ in { ${pkgs.sd-switch}/bin/sd-switch \ ''${DRY_RUN:+--dry-run} $VERBOSE_ARG ${timeoutArg} \ ''${oldGenPath:+--old-units $oldGenPath/home-files/.config/systemd/user} \ - --new-units $newGenPath/home-files/.config/systemd/user + --new-units "$newUnitsDir" ''; }; @@ -354,8 +354,15 @@ in { warnEcho "Attempting to reload services anyway..." fi + newUnitsDir="$newGenPath/home-files/.config/systemd/user" + if [[ ! -e $newUnitsDir ]]; then + newUnitsDir=${pkgs.emptyDirectory} + fi + ${ensureRuntimeDir} \ ${getAttr cfg.startServices cmd} + + unset newUnitsDir else echo "User systemd daemon not running. Skipping reload." fi From 607f969f5dca2dc100cbc53e24ab49ac24ef8987 Mon Sep 17 00:00:00 2001 From: Adam Dinwoodie Date: Wed, 26 Jun 2024 17:14:48 +0100 Subject: [PATCH 12/18] systemd: don't try to restart templates If the user has template services in their systemd configuration, these can't be restarted, and will produces warnings during the activation phase. Avoid those warnings by skipping any uninstantiated templates when looking for services to start or stop. --- modules/systemd-activate.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/systemd-activate.sh b/modules/systemd-activate.sh index 235f1a24..ca26fea8 100644 --- a/modules/systemd-activate.sh +++ b/modules/systemd-activate.sh @@ -34,7 +34,7 @@ function systemdPostReload() { touch "$oldServiceFiles" else find "$oldUserServicePath" \ - -maxdepth 1 -name '*.service' -exec basename '{}' ';' \ + -maxdepth 1 -name '*.service' \! -name '*@.service' -exec basename '{}' ';' \ | sort \ > "$oldServiceFiles" fi @@ -43,7 +43,7 @@ function systemdPostReload() { touch "$newServiceFiles" else find "$newUserServicePath" \ - -maxdepth 1 -name '*.service' -exec basename '{}' ';' \ + -maxdepth 1 -name '*.service' \! -name '*@.service' -exec basename '{}' ';' \ | sort \ > "$newServiceFiles" fi From 1a4f12ae0bda877ec4099b429cf439aad897d7e9 Mon Sep 17 00:00:00 2001 From: "Shahar \"Dawn\" Or" Date: Wed, 26 Jun 2024 21:12:39 +0700 Subject: [PATCH 13/18] docs: introduction chapter Adds an introduction chapter to the manual. --- docs/manual/introduction.md | 32 ++++++++++++++++++++++++++++++++ docs/manual/manual.md | 1 + 2 files changed, 33 insertions(+) create mode 100644 docs/manual/introduction.md diff --git a/docs/manual/introduction.md b/docs/manual/introduction.md new file mode 100644 index 00000000..ebdac5bd --- /dev/null +++ b/docs/manual/introduction.md @@ -0,0 +1,32 @@ +# Introduction to Home Manager {#ch-introduction} + +Home Manager is a [Nix](https://nix.dev/)-powered tool for reproducible management of the contents of users' home directories. +This includes programs, configuration files, environment variables and, well… arbitrary files. +The following example snippet of Nix code: + +```nix +programs.git = { + enable = true; + userEmail = "joe@example.org"; + userName = "joe"; +}; +``` + +would make available to a user the `git` executable and man pages and a configuration file `~/.config/git/config`: + +```ini +[user] + email = "joe@example.org" + name = "joe" +``` + +Since Home Manager is implemented in Nix, it provides several benefits: + +- Contents are reproducible — a home will be the exact same every time it is built, unless of course, an intentional change is made. + This also means you can have the exact same home on different hosts. +- Significantly faster and more powerful than various backup strategies. +- Unlike "dotfiles" repositories, Home Manager supports specifying programs, as well as their configurations. +- Supported by , so that you don't have to build from source. +- If you do want to build some programs from source, there is hardly a tool more useful than Nix for that, and the build instructions can be neatly integrated in your Home Manager usage. +- Infinitely composable, so that values in different configuration files and build instructions can share a source of truth. +- Connects you with the [most extensive](https://repology.org/repositories/statistics/total) and [most up-to-date](https://repology.org/repositories/statistics/newest) software package repository on earth, [Nixpkgs](https://github.com/NixOS/nixpkgs). diff --git a/docs/manual/manual.md b/docs/manual/manual.md index a1cfb1a0..0f81642f 100644 --- a/docs/manual/manual.md +++ b/docs/manual/manual.md @@ -8,6 +8,7 @@ preface.md ``` ```{=include=} parts +introduction.md installation.md usage.md nix-flakes.md From 19e2f43e0b0aec2067e5101f7d1ec75a43f64778 Mon Sep 17 00:00:00 2001 From: Jakob Kukla Date: Fri, 28 Jun 2024 16:16:01 +0200 Subject: [PATCH 14/18] rbw: fix url option examples rbw expects a protocol for its base_url setting[1]. Otherwise fails with `rbw unlock: failed to parse base url: relative URL without a base`. [1] https://github.com/doy/rbw/blob/741a72cf0d7d45fcd32b0326b69f6238733e5a56/README.md#configuration --- modules/programs/rbw.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/programs/rbw.nix b/modules/programs/rbw.nix index 5dd751d0..b7381c67 100644 --- a/modules/programs/rbw.nix +++ b/modules/programs/rbw.nix @@ -19,7 +19,7 @@ let base_url = mkOption { type = with types; nullOr str; default = null; - example = "bitwarden.example.com"; + example = "https://bitwarden.example.com/"; description = "The base-url for a self-hosted bitwarden installation."; }; @@ -27,7 +27,7 @@ let identity_url = mkOption { type = with types; nullOr str; default = null; - example = "identity.example.com"; + example = "https://identity.example.com/"; description = "The identity url for your bitwarden installation."; }; From f50e2779edbc905ab131ce7ce36b14a09ab44f3c Mon Sep 17 00:00:00 2001 From: home-manager-bot <106474382+home-manager-bot@users.noreply.github.com> Date: Fri, 28 Jun 2024 16:16:42 +0200 Subject: [PATCH 15/18] flake.lock: Update MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Flake lock file updates: • Updated input 'nixpkgs': 'github:NixOS/nixpkgs/d603719ec6e294f034936c0d0dc06f689d91b6c3?narHash=sha256-k3JqJrkdoYwE3fHE6xGDY676AYmyh4U2Zw%2B0Bwe5DLU%3D' (2024-06-20) → 'github:NixOS/nixpkgs/2893f56de08021cffd9b6b6dfc70fd9ccd51eb60?narHash=sha256-ECni%2BIkwXjusHsm9Sexdtq8weAq/yUyt1TWIemXt3Ko%3D' (2024-06-24) Co-authored-by: github-actions[bot] --- flake.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flake.lock b/flake.lock index b809cdb7..508f73e5 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1718895438, - "narHash": "sha256-k3JqJrkdoYwE3fHE6xGDY676AYmyh4U2Zw+0Bwe5DLU=", + "lastModified": 1719254875, + "narHash": "sha256-ECni+IkwXjusHsm9Sexdtq8weAq/yUyt1TWIemXt3Ko=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "d603719ec6e294f034936c0d0dc06f689d91b6c3", + "rev": "2893f56de08021cffd9b6b6dfc70fd9ccd51eb60", "type": "github" }, "original": { From 7e68e55d2e16d3a1e92a679430728c35a30fd24e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gutyina=20Gerg=C5=91?= Date: Fri, 28 Jun 2024 08:24:13 -0700 Subject: [PATCH 16/18] glance: add module --- modules/misc/news.nix | 11 +++ modules/modules.nix | 1 + modules/services/glance.nix | 77 +++++++++++++++++++ tests/default.nix | 1 + .../services/glance/default-settings.nix | 15 ++++ tests/modules/services/glance/default.nix | 4 + .../services/glance/example-settings.nix | 33 ++++++++ .../services/glance/glance-default-config.yml | 6 ++ .../services/glance/glance-example-config.yml | 10 +++ tests/modules/services/glance/glance.service | 9 +++ 10 files changed, 167 insertions(+) create mode 100644 modules/services/glance.nix create mode 100644 tests/modules/services/glance/default-settings.nix create mode 100644 tests/modules/services/glance/default.nix create mode 100644 tests/modules/services/glance/example-settings.nix create mode 100644 tests/modules/services/glance/glance-default-config.yml create mode 100644 tests/modules/services/glance/glance-example-config.yml create mode 100644 tests/modules/services/glance/glance.service diff --git a/modules/misc/news.nix b/modules/misc/news.nix index e7e582f5..bef867bb 100644 --- a/modules/misc/news.nix +++ b/modules/misc/news.nix @@ -1692,6 +1692,17 @@ in { allows you to override this name. ''; } + + { + time = "2024-06-28T14:18:16+00:00"; + condition = hostPlatform.isLinux; + message = '' + A new module is available: 'services.glance'. + + Glance is a self-hosted dashboard that puts all your feeds in + one place. See https://github.com/glanceapp/glance for more. + ''; + } ]; }; } diff --git a/modules/modules.nix b/modules/modules.nix index 5b100d47..dbeebfbf 100644 --- a/modules/modules.nix +++ b/modules/modules.nix @@ -301,6 +301,7 @@ let ./services/fusuma.nix ./services/getmail.nix ./services/git-sync.nix + ./services/glance.nix ./services/gnome-keyring.nix ./services/gpg-agent.nix ./services/grobi.nix diff --git a/modules/services/glance.nix b/modules/services/glance.nix new file mode 100644 index 00000000..fa4f1a8d --- /dev/null +++ b/modules/services/glance.nix @@ -0,0 +1,77 @@ +{ config, lib, pkgs, ... }: + +let + cfg = config.services.glance; + + inherit (lib) mkEnableOption mkPackageOption mkOption mkIf getExe; + + settingsFormat = pkgs.formats.yaml { }; + + settingsFile = settingsFormat.generate "glance.yml" cfg.settings; + + configFilePath = "${config.xdg.configHome}/glance/glance.yml"; +in { + meta.maintainers = [ pkgs.lib.maintainers.gepbird ]; + + options.services.glance = { + enable = mkEnableOption "glance"; + + package = mkPackageOption pkgs "glance" { }; + + settings = mkOption { + type = settingsFormat.type; + default = { + pages = [{ + name = "Calendar"; + columns = [{ + size = "full"; + widgets = [{ type = "calendar"; }]; + }]; + }]; + }; + example = { + server.port = 5678; + pages = [{ + name = "Home"; + columns = [{ + size = "full"; + widgets = [ + { type = "calendar"; } + { + type = "weather"; + location = "London, United Kingdom"; + } + ]; + }]; + }]; + }; + description = '' + Configuration written to a yaml file that is read by glance. See + + for more. + ''; + }; + }; + + config = mkIf cfg.enable { + assertions = [ + (lib.hm.assertions.assertPlatform "services.glance" pkgs + lib.platforms.linux) + ]; + + home.packages = [ cfg.package ]; + + xdg.configFile."glance/glance.yml".source = settingsFile; + + systemd.user.services.glance = { + Unit = { + Description = "Glance feed dashboard server"; + PartOf = [ "graphical-session.target" ]; + }; + + Install.WantedBy = [ "graphical-session.target" ]; + + Service.ExecStart = "${getExe cfg.package} --config ${configFilePath}"; + }; + }; +} diff --git a/tests/default.nix b/tests/default.nix index a5e7fe9e..28ce4f64 100644 --- a/tests/default.nix +++ b/tests/default.nix @@ -241,6 +241,7 @@ in import nmtSrc { ./modules/services/fnott ./modules/services/fusuma ./modules/services/git-sync + ./modules/services/glance ./modules/services/gpg-agent ./modules/services/gromit-mpx ./modules/services/home-manager-auto-upgrade diff --git a/tests/modules/services/glance/default-settings.nix b/tests/modules/services/glance/default-settings.nix new file mode 100644 index 00000000..7b35db77 --- /dev/null +++ b/tests/modules/services/glance/default-settings.nix @@ -0,0 +1,15 @@ +{ ... }: + +{ + services.glance.enable = true; + + test.stubs.glance = { }; + + nmt.script = '' + configFile=home-files/.config/glance/glance.yml + serviceFile=home-files/.config/systemd/user/glance.service + + assertFileContent $configFile ${./glance-default-config.yml} + assertFileContent $serviceFile ${./glance.service} + ''; +} diff --git a/tests/modules/services/glance/default.nix b/tests/modules/services/glance/default.nix new file mode 100644 index 00000000..893ba651 --- /dev/null +++ b/tests/modules/services/glance/default.nix @@ -0,0 +1,4 @@ +{ + glance-default-settings = ./default-settings.nix; + glance-example-settings = ./example-settings.nix; +} diff --git a/tests/modules/services/glance/example-settings.nix b/tests/modules/services/glance/example-settings.nix new file mode 100644 index 00000000..9e2101d2 --- /dev/null +++ b/tests/modules/services/glance/example-settings.nix @@ -0,0 +1,33 @@ +{ ... }: + +{ + services.glance = { + enable = true; + settings = { + server.port = 5678; + pages = [{ + name = "Home"; + columns = [{ + size = "full"; + widgets = [ + { type = "calendar"; } + { + type = "weather"; + location = "London, United Kingdom"; + } + ]; + }]; + }]; + }; + }; + + test.stubs.glance = { }; + + nmt.script = '' + configFile=home-files/.config/glance/glance.yml + serviceFile=home-files/.config/systemd/user/glance.service + + assertFileContent $configFile ${./glance-example-config.yml} + assertFileContent $serviceFile ${./glance.service} + ''; +} diff --git a/tests/modules/services/glance/glance-default-config.yml b/tests/modules/services/glance/glance-default-config.yml new file mode 100644 index 00000000..024a8964 --- /dev/null +++ b/tests/modules/services/glance/glance-default-config.yml @@ -0,0 +1,6 @@ +pages: +- columns: + - size: full + widgets: + - type: calendar + name: Calendar diff --git a/tests/modules/services/glance/glance-example-config.yml b/tests/modules/services/glance/glance-example-config.yml new file mode 100644 index 00000000..2775916e --- /dev/null +++ b/tests/modules/services/glance/glance-example-config.yml @@ -0,0 +1,10 @@ +pages: +- columns: + - size: full + widgets: + - type: calendar + - location: London, United Kingdom + type: weather + name: Home +server: + port: 5678 diff --git a/tests/modules/services/glance/glance.service b/tests/modules/services/glance/glance.service new file mode 100644 index 00000000..07b82d1d --- /dev/null +++ b/tests/modules/services/glance/glance.service @@ -0,0 +1,9 @@ +[Install] +WantedBy=graphical-session.target + +[Service] +ExecStart=@glance@/bin/dummy --config /home/hm-user/.config/glance/glance.yml + +[Unit] +Description=Glance feed dashboard server +PartOf=graphical-session.target From c2f806e60ac55c604708250ba0ebcf96bccbbafe Mon Sep 17 00:00:00 2001 From: Robert Helgesson Date: Sat, 29 Jun 2024 17:20:18 +0200 Subject: [PATCH 17/18] pulseeffects: fix test evaluation Fixes #5588 --- modules/lib/maintainers.nix | 7 +++++++ modules/services/pulseeffects.nix | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/modules/lib/maintainers.nix b/modules/lib/maintainers.nix index a820d534..1063f53a 100644 --- a/modules/lib/maintainers.nix +++ b/modules/lib/maintainers.nix @@ -173,6 +173,13 @@ github = "iosmanthus"; githubId = 16307070; }; + jonringer = { + email = "jonringer117@gmail.com"; + matrix = "@jonringer:matrix.org"; + github = "jonringer"; + githubId = 7673602; + name = "Jonathan Ringer"; + }; kalhauge = { name = "Christian Gram Kalhauge"; email = "kalhauge@users.noreply.github.com"; diff --git a/modules/services/pulseeffects.nix b/modules/services/pulseeffects.nix index 434adf85..3edc5349 100644 --- a/modules/services/pulseeffects.nix +++ b/modules/services/pulseeffects.nix @@ -9,7 +9,7 @@ let presetOpts = optionalString (cfg.preset != "") "--load-preset ${cfg.preset}"; in { - meta.maintainers = [ maintainers.jonringer ]; + meta.maintainers = [ hm.maintainers.jonringer ]; options.services.pulseeffects = { enable = mkEnableOption '' From 36317d4d38887f7629876b0e43c8d9593c5cc48d Mon Sep 17 00:00:00 2001 From: Shogo Takata Date: Sat, 29 Jun 2024 15:19:35 +0900 Subject: [PATCH 18/18] direnv: add silent option PR #5586 --- modules/programs/direnv.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/programs/direnv.nix b/modules/programs/direnv.nix index add2c8fc..4a763670 100644 --- a/modules/programs/direnv.nix +++ b/modules/programs/direnv.nix @@ -95,6 +95,7 @@ in { package = mkPackageOption pkgs "nix-direnv" { }; }; + silent = mkEnableOption "silent mode, that is, disabling direnv logging"; }; config = mkIf cfg.enable { @@ -163,5 +164,7 @@ in { } ) ''); + + home.sessionVariables = lib.mkIf cfg.silent { DIRENV_LOG_FORMAT = ""; }; }; }