mirror of
https://github.com/nix-community/home-manager
synced 2024-11-26 21:19:45 +01:00
Merge branch 'nix-community:master' into joplin-desktop
This commit is contained in:
commit
a4b2389dda
33 changed files with 222 additions and 36 deletions
8
.github/dependabot.yml
vendored
8
.github/dependabot.yml
vendored
|
@ -15,3 +15,11 @@ updates:
|
|||
interval: "weekly"
|
||||
commit-message:
|
||||
prefix: "ci:"
|
||||
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
target-branch: "release-24.11"
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
commit-message:
|
||||
prefix: "ci:"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Home Manager Manual {#home-manager-manual}
|
||||
|
||||
## Version 24.05 (unstable)
|
||||
## Version 25.05 (unstable)
|
||||
|
||||
|
||||
```{=include=} preface
|
||||
|
|
|
@ -4,6 +4,7 @@ This section lists the release notes for stable versions of Home Manager
|
|||
and the current unstable version.
|
||||
|
||||
```{=include=} chapters
|
||||
rl-2505.md
|
||||
rl-2411.md
|
||||
rl-2405.md
|
||||
rl-2311.md
|
||||
|
|
18
docs/release-notes/rl-2505.md
Normal file
18
docs/release-notes/rl-2505.md
Normal file
|
@ -0,0 +1,18 @@
|
|||
# Release 25.05 {#sec-release-25.05}
|
||||
|
||||
This is the current unstable branch and the information in this
|
||||
section is therefore not final.
|
||||
|
||||
## Highlights {#sec-release-25.05-highlights}
|
||||
|
||||
This release has the following notable changes:
|
||||
|
||||
- No changes.
|
||||
|
||||
## State Version Changes {#sec-release-25.05-state-version-changes}
|
||||
|
||||
The state version in this release includes the changes below. These
|
||||
changes are only active if the `home.stateVersion` option is set to
|
||||
\"25.05\" or later.
|
||||
|
||||
- No changes.
|
|
@ -2,11 +2,11 @@
|
|||
"nodes": {
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1730200266,
|
||||
"narHash": "sha256-l253w0XMT8nWHGXuXqyiIC/bMvh1VRszGXgdpQlfhvU=",
|
||||
"lastModified": 1731139594,
|
||||
"narHash": "sha256-IigrKK3vYRpUu+HEjPL/phrfh7Ox881er1UEsZvw9Q4=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "807e9154dcb16384b1b765ebe9cd2bba2ac287fd",
|
||||
"rev": "76612b17c0ce71689921ca12d9ffdc9c23ce40b2",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
@ -1044,7 +1044,7 @@ while [[ $# -gt 0 ]]; do
|
|||
export VERBOSE=1
|
||||
;;
|
||||
--version)
|
||||
echo 24.11-pre
|
||||
echo 25.05-pre
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
|
|
|
@ -280,8 +280,9 @@ in
|
|||
};
|
||||
```
|
||||
may not work as expected. If you need to reference another
|
||||
session variable, then do so inside Nix instead. The above
|
||||
example then becomes
|
||||
session variable (even if it is declared by using other options
|
||||
like [](#opt-xdg.configHome)), then do so inside Nix instead.
|
||||
The above example then becomes
|
||||
```nix
|
||||
home.sessionVariables = {
|
||||
FOO = "Hello";
|
||||
|
|
|
@ -99,7 +99,6 @@ in {
|
|||
force = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
visible = false;
|
||||
description = ''
|
||||
Whether the target path should be unconditionally replaced
|
||||
by the managed file source. Warning, this will silently
|
||||
|
|
|
@ -53,7 +53,7 @@ let
|
|||
package = mkOption {
|
||||
type = types.nullOr types.package;
|
||||
default = null;
|
||||
example = literalExpression "pkgs.gnome.adwaita-icon-theme";
|
||||
example = literalExpression "pkgs.adwaita-icon-theme";
|
||||
description = ''
|
||||
Package providing the icon theme. This package will be installed
|
||||
to your profile. If `null` then the theme
|
||||
|
|
|
@ -1810,7 +1810,7 @@ in {
|
|||
|
||||
NixGL solve the "OpenGL" problem with nix. The 'nixGL' module provides
|
||||
integration of NixGL into Home Manager. See the "GPU on non-NixOS
|
||||
systems" section in the Home Manager mantual for more.
|
||||
systems" section in the Home Manager manual for more.
|
||||
'';
|
||||
}
|
||||
|
||||
|
|
|
@ -22,6 +22,7 @@ in {
|
|||
"23.11"
|
||||
"24.05"
|
||||
"24.11"
|
||||
"25.05"
|
||||
];
|
||||
description = ''
|
||||
It is occasionally necessary for Home Manager to change
|
||||
|
|
|
@ -230,8 +230,15 @@ in {
|
|||
else
|
||||
{ };
|
||||
|
||||
gpgCfg = account:
|
||||
optionalAttrs (account.gpg != null) {
|
||||
pgp-key-id = account.gpg.key;
|
||||
pgp-auto-sign = account.gpg.signByDefault;
|
||||
pgp-opportunistic-encrypt = account.gpg.encryptByDefault;
|
||||
};
|
||||
|
||||
in (basicCfg account) // (sourceCfg account) // (outgoingCfg account)
|
||||
// account.aerc.extraAccounts;
|
||||
// (gpgCfg account) // account.aerc.extraAccounts;
|
||||
|
||||
mkAccountConfig = name: account:
|
||||
mapAttrNames (addAccountName name) account.aerc.extraConfig;
|
||||
|
|
|
@ -8,6 +8,12 @@ let
|
|||
|
||||
bindingsOf = t: with types; attrsOf (nullOr (either t (listOf t)));
|
||||
|
||||
renderThemes = options:
|
||||
let
|
||||
render =
|
||||
mapAttrsToList (theme: options: "${theme} ${escapeShellArgs options}");
|
||||
in concatStringsSep "\n" (render options);
|
||||
|
||||
renderBindings = bindings:
|
||||
let
|
||||
enabled = filterAttrs (n: v: v != null) bindings;
|
||||
|
@ -41,7 +47,7 @@ in {
|
|||
Override feh's default mouse button mapping. If you want to disable an
|
||||
action, set its value to null. If you want to bind multiple buttons to
|
||||
an action, set its value to a list.
|
||||
See <https://man.finalrewind.org/1/feh/#x425554544f4e53> for
|
||||
See <https://man.finalrewind.org/1/feh/#BUTTONS_CONFIG_SYNTAX> for
|
||||
default bindings and available commands.
|
||||
'';
|
||||
};
|
||||
|
@ -58,10 +64,37 @@ in {
|
|||
Override feh's default keybindings. If you want to disable a keybinding
|
||||
set its value to null. If you want to bind multiple keys to an action,
|
||||
set its value to a list.
|
||||
See <https://man.finalrewind.org/1/feh/#x4b455953> for
|
||||
See <https://man.finalrewind.org/1/feh/#KEYS_CONFIG_SYNTAX> for
|
||||
default bindings and available commands.
|
||||
'';
|
||||
};
|
||||
|
||||
themes = mkOption {
|
||||
default = { };
|
||||
type = with types; attrsOf (listOf str);
|
||||
example = {
|
||||
feh = [ "--image-bg" "black" ];
|
||||
webcam = [ "--multiwindow" "--reload" "20" ];
|
||||
present = [ "--full-screen" "--sort" "name" "--hide-pointer" ];
|
||||
booth = [ "--full-screen" "--hide-pointer" "--slideshow-delay" "20" ];
|
||||
imagemap = [
|
||||
"-rVq"
|
||||
"--thumb-width"
|
||||
"40"
|
||||
"--thumb-height"
|
||||
"30"
|
||||
"--index-info"
|
||||
"%n\\n%wx%h"
|
||||
];
|
||||
example = [ "--info" "foo bar" ];
|
||||
};
|
||||
description = ''
|
||||
Define themes for feh.
|
||||
See <https://man.finalrewind.org/1/feh/#THEMES_CONFIG_SYNTAX> for
|
||||
important guidelines and limitations related to theme configuration.
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
@ -79,5 +112,8 @@ in {
|
|||
xdg.configFile."feh/keys" = mkIf (cfg.keybindings != { }) {
|
||||
text = renderBindings cfg.keybindings + "\n";
|
||||
};
|
||||
|
||||
xdg.configFile."feh/themes" =
|
||||
mkIf (cfg.themes != { }) { text = renderThemes cfg.themes + "\n"; };
|
||||
};
|
||||
}
|
||||
|
|
|
@ -553,6 +553,7 @@ in {
|
|||
inherit (args) config;
|
||||
inherit lib pkgs;
|
||||
appName = cfg.name;
|
||||
package = cfg.finalPackage;
|
||||
modulePath = modulePath ++ [ "profiles" name "search" ];
|
||||
profilePath = config.path;
|
||||
});
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, lib, pkgs, appName, modulePath, profilePath }:
|
||||
{ config, lib, pkgs, appName, package, modulePath, profilePath }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
@ -108,10 +108,10 @@ let
|
|||
# a claim by Mozilla to remove this would be very anti-user, and
|
||||
# is unlikely to be an issue for our use case.
|
||||
disclaimer = "By modifying this file, I agree that I am doing so "
|
||||
+ "only within ${appName} itself, using official, user-driven search "
|
||||
+ "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 "
|
||||
+ "from outside of @appName@ is a malicious act, and will be responded "
|
||||
+ "to accordingly.";
|
||||
|
||||
salt = if config.default != null then
|
||||
|
@ -124,11 +124,29 @@ let
|
|||
else
|
||||
null;
|
||||
|
||||
appNameVariable = if package == null then
|
||||
"appName=${lib.escapeShellArg appName}"
|
||||
else ''
|
||||
applicationIni="$(find ${lib.escapeShellArg package} -maxdepth 3 -path ${
|
||||
lib.escapeShellArg package
|
||||
}'/lib/*/application.ini' -print -quit)"
|
||||
if test -n "$applicationIni"; then
|
||||
appName="$(sed -n 's/^Name=\(.*\)$/\1/p' "$applicationIni" | head -n1)"
|
||||
else
|
||||
appName=${lib.escapeShellArg appName}
|
||||
fi
|
||||
'';
|
||||
|
||||
file = pkgs.runCommand "search.json.mozlz4" {
|
||||
nativeBuildInputs = with pkgs; [ mozlz4a openssl ];
|
||||
json = builtins.toJSON settings;
|
||||
inherit salt privateSalt;
|
||||
} ''
|
||||
${appNameVariable}
|
||||
|
||||
salt=''${salt//@appName@/"$appName"}
|
||||
privateSalt=''${privateSalt//@appName@/"$appName"}
|
||||
|
||||
if [[ -n $salt ]]; then
|
||||
export hash=$(echo -n "$salt" | openssl dgst -sha256 -binary | base64)
|
||||
export privateHash=$(echo -n "$privateSalt" | openssl dgst -sha256 -binary | base64)
|
||||
|
|
|
@ -188,7 +188,7 @@ in {
|
|||
nativeBuildInputs = [ pkgs.makeWrapper ];
|
||||
postBuild = ''
|
||||
wrapProgram $out/bin/hx \
|
||||
--prefix PATH : ${lib.makeBinPath cfg.extraPackages}
|
||||
--suffix PATH : ${lib.makeBinPath cfg.extraPackages}
|
||||
'';
|
||||
})
|
||||
]
|
||||
|
|
|
@ -232,6 +232,7 @@ in {
|
|||
inherit (args) config;
|
||||
inherit lib pkgs;
|
||||
appName = "Thunderbird";
|
||||
package = cfg.package;
|
||||
modulePath =
|
||||
[ "programs" "thunderbird" "profiles" name "search" ];
|
||||
profilePath = name;
|
||||
|
|
|
@ -28,7 +28,7 @@ in {
|
|||
programs.zsh.plugins = [{
|
||||
name = "zsh-abbr";
|
||||
src = pkgs.zsh-abbr;
|
||||
file = "/share/zsh/zsh-abbr/abbr.plugin.zsh";
|
||||
file = "share/zsh/zsh-abbr/zsh-abbr.plugin.zsh";
|
||||
}];
|
||||
|
||||
xdg.configFile = {
|
||||
|
|
|
@ -25,7 +25,7 @@ let
|
|||
options = {
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
example = literalExpression "pkgs.gnome.adwaita-icon-theme";
|
||||
example = literalExpression "pkgs.adwaita-icon-theme";
|
||||
description = "Package providing the theme.";
|
||||
};
|
||||
|
||||
|
|
|
@ -16,9 +16,9 @@ let
|
|||
"PATH=${
|
||||
lib.makeBinPath (with pkgs; [ openssh git ] ++ repo.extraPackages)
|
||||
}"
|
||||
"GIT_SYNC_DIRECTORY=${repo.path}"
|
||||
"GIT_SYNC_DIRECTORY=${strings.escapeShellArg repo.path}"
|
||||
"GIT_SYNC_COMMAND=${cfg.package}/bin/git-sync"
|
||||
"GIT_SYNC_REPOSITORY=${repo.uri}"
|
||||
"GIT_SYNC_REPOSITORY=${strings.escapeShellArg repo.uri}"
|
||||
"GIT_SYNC_INTERVAL=${toString repo.interval}"
|
||||
];
|
||||
ExecStart = "${cfg.package}/bin/git-sync-on-inotify";
|
||||
|
@ -112,6 +112,15 @@ in {
|
|||
description = ''
|
||||
The repositories that should be synchronized.
|
||||
'';
|
||||
example = literalExpression ''
|
||||
{
|
||||
xyz = {
|
||||
path = "''${config.home.homeDirectory}/foo/home-manager";
|
||||
uri = "git@github.com:nix-community/home-manager.git";
|
||||
interval = 1000;
|
||||
};
|
||||
}
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -330,6 +330,8 @@ in {
|
|||
})
|
||||
|
||||
{
|
||||
home.packages = [ cfg.package ];
|
||||
|
||||
xdg.configFile."kanshi/config".text =
|
||||
if cfg.profiles == { } && cfg.extraConfig == "" then
|
||||
directivesStr
|
||||
|
|
|
@ -19,13 +19,17 @@ in {
|
|||
extraSpecialArgs.nixosConfig = config;
|
||||
|
||||
sharedModules = [{
|
||||
# The per-user directory inside /etc/profiles is not known by
|
||||
# fontconfig by default.
|
||||
fonts.fontconfig.enable = lib.mkDefault
|
||||
(cfg.useUserPackages && config.fonts.fontconfig.enable);
|
||||
key = "home-manager#nixos-shared-module";
|
||||
|
||||
# Inherit glibcLocales setting from NixOS.
|
||||
i18n.glibcLocales = lib.mkDefault config.i18n.glibcLocales;
|
||||
config = {
|
||||
# The per-user directory inside /etc/profiles is not known by
|
||||
# fontconfig by default.
|
||||
fonts.fontconfig.enable = lib.mkDefault
|
||||
(cfg.useUserPackages && config.fonts.fontconfig.enable);
|
||||
|
||||
# Inherit glibcLocales setting from NixOS.
|
||||
i18n.glibcLocales = lib.mkDefault config.i18n.glibcLocales;
|
||||
};
|
||||
}];
|
||||
};
|
||||
}
|
||||
|
@ -48,7 +52,6 @@ in {
|
|||
serviceConfig = {
|
||||
User = usercfg.home.username;
|
||||
Type = "oneshot";
|
||||
RemainAfterExit = "yes";
|
||||
TimeoutStartSec = "5m";
|
||||
SyslogIdentifier = "hm-activate-${username}";
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
"release": "24.11",
|
||||
"release": "25.05",
|
||||
"isReleaseBranch": false
|
||||
}
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
[font]
|
||||
[font.bold]
|
||||
family = "SFMono"
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
feh-empty-config = ./feh-empty-settings.nix;
|
||||
feh-bindings = ./feh-bindings.nix;
|
||||
feh-themes = ./feh-themes.nix;
|
||||
}
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
nmt.script = ''
|
||||
assertPathNotExists home-files/.config/feh/buttons
|
||||
assertPathNotExists home-files/.config/feh/keys
|
||||
assertPathNotExists home-files/.config/feh/themes
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
6
tests/modules/programs/feh/feh-themes-expected
Normal file
6
tests/modules/programs/feh/feh-themes-expected
Normal file
|
@ -0,0 +1,6 @@
|
|||
booth --full-screen --hide-pointer --slideshow-delay 20
|
||||
example --info 'foo bar'
|
||||
feh --image-bg black
|
||||
imagemap -rVq --thumb-width 40 --thumb-height 30 --index-info '%n\n%wx%h'
|
||||
present --full-screen --sort name --hide-pointer
|
||||
webcam --multiwindow --reload 20
|
32
tests/modules/programs/feh/feh-themes.nix
Normal file
32
tests/modules/programs/feh/feh-themes.nix
Normal file
|
@ -0,0 +1,32 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
config = {
|
||||
programs.feh.enable = true;
|
||||
|
||||
programs.feh.themes = {
|
||||
feh = [ "--image-bg" "black" ];
|
||||
webcam = [ "--multiwindow" "--reload" "20" ];
|
||||
present = [ "--full-screen" "--sort" "name" "--hide-pointer" ];
|
||||
booth = [ "--full-screen" "--hide-pointer" "--slideshow-delay" "20" ];
|
||||
imagemap = [
|
||||
"-rVq"
|
||||
"--thumb-width"
|
||||
"40"
|
||||
"--thumb-height"
|
||||
"30"
|
||||
"--index-info"
|
||||
"%n\\n%wx%h"
|
||||
];
|
||||
example = [ "--info" "foo bar" ];
|
||||
};
|
||||
|
||||
test.stubs.feh = { };
|
||||
|
||||
nmt.script = ''
|
||||
assertFileContent \
|
||||
home-files/.config/feh/themes \
|
||||
${./feh-themes-expected}
|
||||
'';
|
||||
};
|
||||
}
|
|
@ -1,7 +1,6 @@
|
|||
[[themes]]
|
||||
name = "default2"
|
||||
|
||||
[themes.component_style]
|
||||
[themes.component_style.block_title]
|
||||
fg = "Magenta"
|
||||
|
||||
|
|
|
@ -10,9 +10,7 @@ global_vars:
|
|||
matches:
|
||||
- replace: It's {{currentdate}} {{currenttime}}
|
||||
trigger: :now
|
||||
- replace: 'line1
|
||||
|
||||
line2'
|
||||
- replace: "line1\nline2"
|
||||
trigger: :hello
|
||||
- regex: :hi(?P<person>.*)\.
|
||||
replace: Hi {{person}}!
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
Environment=PATH=@openssh@/bin:/nix/store/00000000000000000000000000000000-git/bin
|
||||
Environment=GIT_SYNC_DIRECTORY=/a/path
|
||||
Environment=GIT_SYNC_COMMAND=@git-sync@/bin/git-sync
|
||||
Environment=GIT_SYNC_REPOSITORY=git+ssh://user@example.com:/~user/path/to/repo.git
|
||||
Environment=GIT_SYNC_REPOSITORY='git+ssh://user@example.com:/~user/path/to/repo.git'
|
||||
Environment=GIT_SYNC_INTERVAL=500
|
||||
ExecStart=@git-sync@/bin/git-sync-on-inotify
|
||||
Restart=on-abort
|
||||
|
|
|
@ -1 +1,4 @@
|
|||
{ git-sync = ./basic.nix; }
|
||||
{
|
||||
git-sync = ./basic.nix;
|
||||
git-sync-with-whitespace = ./whitespace.nix;
|
||||
}
|
||||
|
|
42
tests/modules/services/git-sync/whitespace.nix
Normal file
42
tests/modules/services/git-sync/whitespace.nix
Normal file
|
@ -0,0 +1,42 @@
|
|||
{ config, ... }:
|
||||
|
||||
{
|
||||
services.git-sync = {
|
||||
enable = true;
|
||||
package = config.lib.test.mkStubPackage { outPath = "@git-sync@"; };
|
||||
repositories = {
|
||||
testWithWhitespace = {
|
||||
path = "/a path";
|
||||
uri = "git+ssh://user@example.com:/~user/path to/repo.git";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
test.stubs.openssh = { name = "openssh"; };
|
||||
|
||||
nmt.script = ''
|
||||
serviceFile=home-files/.config/systemd/user/git-sync-testWithWhitespace.service
|
||||
|
||||
assertFileExists $serviceFile
|
||||
|
||||
serviceFile=$(normalizeStorePaths $serviceFile)
|
||||
assertFileContent $serviceFile ${
|
||||
builtins.toFile "expected" ''
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
|
||||
[Service]
|
||||
Environment=PATH=@openssh@/bin:/nix/store/00000000000000000000000000000000-git/bin
|
||||
Environment=GIT_SYNC_DIRECTORY='/a path'
|
||||
Environment=GIT_SYNC_COMMAND=@git-sync@/bin/git-sync
|
||||
Environment=GIT_SYNC_REPOSITORY='git+ssh://user@example.com:/~user/path to/repo.git'
|
||||
Environment=GIT_SYNC_INTERVAL=500
|
||||
ExecStart=@git-sync@/bin/git-sync-on-inotify
|
||||
Restart=on-abort
|
||||
|
||||
[Unit]
|
||||
Description=Git Sync testWithWhitespace
|
||||
''
|
||||
}
|
||||
'';
|
||||
}
|
Loading…
Reference in a new issue