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"
|
interval: "weekly"
|
||||||
commit-message:
|
commit-message:
|
||||||
prefix: "ci:"
|
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}
|
# Home Manager Manual {#home-manager-manual}
|
||||||
|
|
||||||
## Version 24.05 (unstable)
|
## Version 25.05 (unstable)
|
||||||
|
|
||||||
|
|
||||||
```{=include=} preface
|
```{=include=} preface
|
||||||
|
|
|
@ -4,6 +4,7 @@ This section lists the release notes for stable versions of Home Manager
|
||||||
and the current unstable version.
|
and the current unstable version.
|
||||||
|
|
||||||
```{=include=} chapters
|
```{=include=} chapters
|
||||||
|
rl-2505.md
|
||||||
rl-2411.md
|
rl-2411.md
|
||||||
rl-2405.md
|
rl-2405.md
|
||||||
rl-2311.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": {
|
"nodes": {
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1730200266,
|
"lastModified": 1731139594,
|
||||||
"narHash": "sha256-l253w0XMT8nWHGXuXqyiIC/bMvh1VRszGXgdpQlfhvU=",
|
"narHash": "sha256-IigrKK3vYRpUu+HEjPL/phrfh7Ox881er1UEsZvw9Q4=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "807e9154dcb16384b1b765ebe9cd2bba2ac287fd",
|
"rev": "76612b17c0ce71689921ca12d9ffdc9c23ce40b2",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
@ -1044,7 +1044,7 @@ while [[ $# -gt 0 ]]; do
|
||||||
export VERBOSE=1
|
export VERBOSE=1
|
||||||
;;
|
;;
|
||||||
--version)
|
--version)
|
||||||
echo 24.11-pre
|
echo 25.05-pre
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
|
|
@ -280,8 +280,9 @@ in
|
||||||
};
|
};
|
||||||
```
|
```
|
||||||
may not work as expected. If you need to reference another
|
may not work as expected. If you need to reference another
|
||||||
session variable, then do so inside Nix instead. The above
|
session variable (even if it is declared by using other options
|
||||||
example then becomes
|
like [](#opt-xdg.configHome)), then do so inside Nix instead.
|
||||||
|
The above example then becomes
|
||||||
```nix
|
```nix
|
||||||
home.sessionVariables = {
|
home.sessionVariables = {
|
||||||
FOO = "Hello";
|
FOO = "Hello";
|
||||||
|
|
|
@ -99,7 +99,6 @@ in {
|
||||||
force = mkOption {
|
force = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
visible = false;
|
|
||||||
description = ''
|
description = ''
|
||||||
Whether the target path should be unconditionally replaced
|
Whether the target path should be unconditionally replaced
|
||||||
by the managed file source. Warning, this will silently
|
by the managed file source. Warning, this will silently
|
||||||
|
|
|
@ -53,7 +53,7 @@ let
|
||||||
package = mkOption {
|
package = mkOption {
|
||||||
type = types.nullOr types.package;
|
type = types.nullOr types.package;
|
||||||
default = null;
|
default = null;
|
||||||
example = literalExpression "pkgs.gnome.adwaita-icon-theme";
|
example = literalExpression "pkgs.adwaita-icon-theme";
|
||||||
description = ''
|
description = ''
|
||||||
Package providing the icon theme. This package will be installed
|
Package providing the icon theme. This package will be installed
|
||||||
to your profile. If `null` then the theme
|
to your profile. If `null` then the theme
|
||||||
|
|
|
@ -1810,7 +1810,7 @@ in {
|
||||||
|
|
||||||
NixGL solve the "OpenGL" problem with nix. The 'nixGL' module provides
|
NixGL solve the "OpenGL" problem with nix. The 'nixGL' module provides
|
||||||
integration of NixGL into Home Manager. See the "GPU on non-NixOS
|
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"
|
"23.11"
|
||||||
"24.05"
|
"24.05"
|
||||||
"24.11"
|
"24.11"
|
||||||
|
"25.05"
|
||||||
];
|
];
|
||||||
description = ''
|
description = ''
|
||||||
It is occasionally necessary for Home Manager to change
|
It is occasionally necessary for Home Manager to change
|
||||||
|
|
|
@ -230,8 +230,15 @@ in {
|
||||||
else
|
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)
|
in (basicCfg account) // (sourceCfg account) // (outgoingCfg account)
|
||||||
// account.aerc.extraAccounts;
|
// (gpgCfg account) // account.aerc.extraAccounts;
|
||||||
|
|
||||||
mkAccountConfig = name: account:
|
mkAccountConfig = name: account:
|
||||||
mapAttrNames (addAccountName name) account.aerc.extraConfig;
|
mapAttrNames (addAccountName name) account.aerc.extraConfig;
|
||||||
|
|
|
@ -8,6 +8,12 @@ let
|
||||||
|
|
||||||
bindingsOf = t: with types; attrsOf (nullOr (either t (listOf t)));
|
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:
|
renderBindings = bindings:
|
||||||
let
|
let
|
||||||
enabled = filterAttrs (n: v: v != null) bindings;
|
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
|
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
|
action, set its value to null. If you want to bind multiple buttons to
|
||||||
an action, set its value to a list.
|
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.
|
default bindings and available commands.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
@ -58,10 +64,37 @@ in {
|
||||||
Override feh's default keybindings. If you want to disable a keybinding
|
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 null. If you want to bind multiple keys to an action,
|
||||||
set its value to a list.
|
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.
|
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 {
|
config = mkIf cfg.enable {
|
||||||
|
@ -79,5 +112,8 @@ in {
|
||||||
xdg.configFile."feh/keys" = mkIf (cfg.keybindings != { }) {
|
xdg.configFile."feh/keys" = mkIf (cfg.keybindings != { }) {
|
||||||
text = renderBindings cfg.keybindings + "\n";
|
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 (args) config;
|
||||||
inherit lib pkgs;
|
inherit lib pkgs;
|
||||||
appName = cfg.name;
|
appName = cfg.name;
|
||||||
|
package = cfg.finalPackage;
|
||||||
modulePath = modulePath ++ [ "profiles" name "search" ];
|
modulePath = modulePath ++ [ "profiles" name "search" ];
|
||||||
profilePath = config.path;
|
profilePath = config.path;
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ config, lib, pkgs, appName, modulePath, profilePath }:
|
{ config, lib, pkgs, appName, package, modulePath, profilePath }:
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
|
@ -108,10 +108,10 @@ let
|
||||||
# a claim by Mozilla to remove this would be very anti-user, and
|
# a claim by Mozilla to remove this would be very anti-user, and
|
||||||
# is unlikely to be an issue for our use case.
|
# is unlikely to be an issue for our use case.
|
||||||
disclaimer = "By modifying this file, I agree that I am doing so "
|
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 "
|
+ "engine selection processes, and in a way which does not circumvent "
|
||||||
+ "user consent. I acknowledge that any attempt to change this file "
|
+ "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.";
|
+ "to accordingly.";
|
||||||
|
|
||||||
salt = if config.default != null then
|
salt = if config.default != null then
|
||||||
|
@ -124,11 +124,29 @@ let
|
||||||
else
|
else
|
||||||
null;
|
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" {
|
file = pkgs.runCommand "search.json.mozlz4" {
|
||||||
nativeBuildInputs = with pkgs; [ mozlz4a openssl ];
|
nativeBuildInputs = with pkgs; [ mozlz4a openssl ];
|
||||||
json = builtins.toJSON settings;
|
json = builtins.toJSON settings;
|
||||||
inherit salt privateSalt;
|
inherit salt privateSalt;
|
||||||
} ''
|
} ''
|
||||||
|
${appNameVariable}
|
||||||
|
|
||||||
|
salt=''${salt//@appName@/"$appName"}
|
||||||
|
privateSalt=''${privateSalt//@appName@/"$appName"}
|
||||||
|
|
||||||
if [[ -n $salt ]]; then
|
if [[ -n $salt ]]; then
|
||||||
export hash=$(echo -n "$salt" | openssl dgst -sha256 -binary | base64)
|
export hash=$(echo -n "$salt" | openssl dgst -sha256 -binary | base64)
|
||||||
export privateHash=$(echo -n "$privateSalt" | openssl dgst -sha256 -binary | base64)
|
export privateHash=$(echo -n "$privateSalt" | openssl dgst -sha256 -binary | base64)
|
||||||
|
|
|
@ -188,7 +188,7 @@ in {
|
||||||
nativeBuildInputs = [ pkgs.makeWrapper ];
|
nativeBuildInputs = [ pkgs.makeWrapper ];
|
||||||
postBuild = ''
|
postBuild = ''
|
||||||
wrapProgram $out/bin/hx \
|
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 (args) config;
|
||||||
inherit lib pkgs;
|
inherit lib pkgs;
|
||||||
appName = "Thunderbird";
|
appName = "Thunderbird";
|
||||||
|
package = cfg.package;
|
||||||
modulePath =
|
modulePath =
|
||||||
[ "programs" "thunderbird" "profiles" name "search" ];
|
[ "programs" "thunderbird" "profiles" name "search" ];
|
||||||
profilePath = name;
|
profilePath = name;
|
||||||
|
|
|
@ -28,7 +28,7 @@ in {
|
||||||
programs.zsh.plugins = [{
|
programs.zsh.plugins = [{
|
||||||
name = "zsh-abbr";
|
name = "zsh-abbr";
|
||||||
src = pkgs.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 = {
|
xdg.configFile = {
|
||||||
|
|
|
@ -25,7 +25,7 @@ let
|
||||||
options = {
|
options = {
|
||||||
package = mkOption {
|
package = mkOption {
|
||||||
type = types.package;
|
type = types.package;
|
||||||
example = literalExpression "pkgs.gnome.adwaita-icon-theme";
|
example = literalExpression "pkgs.adwaita-icon-theme";
|
||||||
description = "Package providing the theme.";
|
description = "Package providing the theme.";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -16,9 +16,9 @@ let
|
||||||
"PATH=${
|
"PATH=${
|
||||||
lib.makeBinPath (with pkgs; [ openssh git ] ++ repo.extraPackages)
|
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_COMMAND=${cfg.package}/bin/git-sync"
|
||||||
"GIT_SYNC_REPOSITORY=${repo.uri}"
|
"GIT_SYNC_REPOSITORY=${strings.escapeShellArg repo.uri}"
|
||||||
"GIT_SYNC_INTERVAL=${toString repo.interval}"
|
"GIT_SYNC_INTERVAL=${toString repo.interval}"
|
||||||
];
|
];
|
||||||
ExecStart = "${cfg.package}/bin/git-sync-on-inotify";
|
ExecStart = "${cfg.package}/bin/git-sync-on-inotify";
|
||||||
|
@ -112,6 +112,15 @@ in {
|
||||||
description = ''
|
description = ''
|
||||||
The repositories that should be synchronized.
|
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 =
|
xdg.configFile."kanshi/config".text =
|
||||||
if cfg.profiles == { } && cfg.extraConfig == "" then
|
if cfg.profiles == { } && cfg.extraConfig == "" then
|
||||||
directivesStr
|
directivesStr
|
||||||
|
|
|
@ -19,6 +19,9 @@ in {
|
||||||
extraSpecialArgs.nixosConfig = config;
|
extraSpecialArgs.nixosConfig = config;
|
||||||
|
|
||||||
sharedModules = [{
|
sharedModules = [{
|
||||||
|
key = "home-manager#nixos-shared-module";
|
||||||
|
|
||||||
|
config = {
|
||||||
# The per-user directory inside /etc/profiles is not known by
|
# The per-user directory inside /etc/profiles is not known by
|
||||||
# fontconfig by default.
|
# fontconfig by default.
|
||||||
fonts.fontconfig.enable = lib.mkDefault
|
fonts.fontconfig.enable = lib.mkDefault
|
||||||
|
@ -26,6 +29,7 @@ in {
|
||||||
|
|
||||||
# Inherit glibcLocales setting from NixOS.
|
# Inherit glibcLocales setting from NixOS.
|
||||||
i18n.glibcLocales = lib.mkDefault config.i18n.glibcLocales;
|
i18n.glibcLocales = lib.mkDefault config.i18n.glibcLocales;
|
||||||
|
};
|
||||||
}];
|
}];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -48,7 +52,6 @@ in {
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
User = usercfg.home.username;
|
User = usercfg.home.username;
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
RemainAfterExit = "yes";
|
|
||||||
TimeoutStartSec = "5m";
|
TimeoutStartSec = "5m";
|
||||||
SyslogIdentifier = "hm-activate-${username}";
|
SyslogIdentifier = "hm-activate-${username}";
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{
|
{
|
||||||
"release": "24.11",
|
"release": "25.05",
|
||||||
"isReleaseBranch": false
|
"isReleaseBranch": false
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
[font]
|
|
||||||
[font.bold]
|
[font.bold]
|
||||||
family = "SFMono"
|
family = "SFMono"
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
{
|
{
|
||||||
feh-empty-config = ./feh-empty-settings.nix;
|
feh-empty-config = ./feh-empty-settings.nix;
|
||||||
feh-bindings = ./feh-bindings.nix;
|
feh-bindings = ./feh-bindings.nix;
|
||||||
|
feh-themes = ./feh-themes.nix;
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
nmt.script = ''
|
nmt.script = ''
|
||||||
assertPathNotExists home-files/.config/feh/buttons
|
assertPathNotExists home-files/.config/feh/buttons
|
||||||
assertPathNotExists home-files/.config/feh/keys
|
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]]
|
[[themes]]
|
||||||
name = "default2"
|
name = "default2"
|
||||||
|
|
||||||
[themes.component_style]
|
|
||||||
[themes.component_style.block_title]
|
[themes.component_style.block_title]
|
||||||
fg = "Magenta"
|
fg = "Magenta"
|
||||||
|
|
||||||
|
|
|
@ -10,9 +10,7 @@ global_vars:
|
||||||
matches:
|
matches:
|
||||||
- replace: It's {{currentdate}} {{currenttime}}
|
- replace: It's {{currentdate}} {{currenttime}}
|
||||||
trigger: :now
|
trigger: :now
|
||||||
- replace: 'line1
|
- replace: "line1\nline2"
|
||||||
|
|
||||||
line2'
|
|
||||||
trigger: :hello
|
trigger: :hello
|
||||||
- regex: :hi(?P<person>.*)\.
|
- regex: :hi(?P<person>.*)\.
|
||||||
replace: Hi {{person}}!
|
replace: Hi {{person}}!
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
Environment=PATH=@openssh@/bin:/nix/store/00000000000000000000000000000000-git/bin
|
Environment=PATH=@openssh@/bin:/nix/store/00000000000000000000000000000000-git/bin
|
||||||
Environment=GIT_SYNC_DIRECTORY=/a/path
|
Environment=GIT_SYNC_DIRECTORY=/a/path
|
||||||
Environment=GIT_SYNC_COMMAND=@git-sync@/bin/git-sync
|
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
|
Environment=GIT_SYNC_INTERVAL=500
|
||||||
ExecStart=@git-sync@/bin/git-sync-on-inotify
|
ExecStart=@git-sync@/bin/git-sync-on-inotify
|
||||||
Restart=on-abort
|
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