mirror of
https://github.com/nix-community/home-manager.git
synced 2024-12-14 11:57:55 +00:00
Merge branch 'nix-community:master' into joplin-desktop
This commit is contained in:
commit
d3e830ae29
76 changed files with 882 additions and 354 deletions
|
@ -28,7 +28,7 @@ Releases
|
||||||
Home Manager is developed against `nixpkgs-unstable` branch, which often causes
|
Home Manager is developed against `nixpkgs-unstable` branch, which often causes
|
||||||
it to contain tweaks for changes/packages not yet released in stable [NixOS][].
|
it to contain tweaks for changes/packages not yet released in stable [NixOS][].
|
||||||
To avoid breaking users' configurations, Home Manager is released in branches
|
To avoid breaking users' configurations, Home Manager is released in branches
|
||||||
corresponding to NixOS releases (e.g. `release-24.05`). These branches get
|
corresponding to NixOS releases (e.g. `release-24.11`). These branches get
|
||||||
fixes, but usually not new modules. If you need a module to be backported, then
|
fixes, but usually not new modules. If you need a module to be backported, then
|
||||||
feel free to open an issue.
|
feel free to open an issue.
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@ dconf store and cannot tell whether a configuration that it is about to be
|
||||||
overwritten was from a previous Home Manager generation or from manual
|
overwritten was from a previous Home Manager generation or from manual
|
||||||
configuration.
|
configuration.
|
||||||
|
|
||||||
Home Manager targets [NixOS][] unstable and NixOS version 24.05 (the current
|
Home Manager targets [NixOS][] unstable and NixOS version 24.11 (the current
|
||||||
stable version), it may or may not work on other Linux distributions and NixOS
|
stable version), it may or may not work on other Linux distributions and NixOS
|
||||||
versions.
|
versions.
|
||||||
|
|
||||||
|
|
|
@ -15,10 +15,10 @@ $ nix-channel --add https://github.com/nix-community/home-manager/archive/master
|
||||||
$ nix-channel --update
|
$ nix-channel --update
|
||||||
```
|
```
|
||||||
|
|
||||||
and if you follow a Nixpkgs version 24.05 channel, you can run
|
and if you follow a Nixpkgs version 24.11 channel, you can run
|
||||||
|
|
||||||
``` shell
|
``` shell
|
||||||
$ nix-channel --add https://github.com/nix-community/home-manager/archive/release-24.05.tar.gz home-manager
|
$ nix-channel --add https://github.com/nix-community/home-manager/archive/release-24.11.tar.gz home-manager
|
||||||
$ nix-channel --update
|
$ nix-channel --update
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ home-manager.users.eve = { pkgs, ... }: {
|
||||||
|
|
||||||
# The state version is required and should stay at the version you
|
# The state version is required and should stay at the version you
|
||||||
# originally installed.
|
# originally installed.
|
||||||
home.stateVersion = "24.05";
|
home.stateVersion = "24.11";
|
||||||
};
|
};
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
@ -17,10 +17,10 @@ $ sudo nix-channel --add https://github.com/nix-community/home-manager/archive/m
|
||||||
$ sudo nix-channel --update
|
$ sudo nix-channel --update
|
||||||
```
|
```
|
||||||
|
|
||||||
and if you follow a Nixpkgs version 24.05 channel, you can run
|
and if you follow a Nixpkgs version 24.11 channel, you can run
|
||||||
|
|
||||||
``` shell
|
``` shell
|
||||||
$ sudo nix-channel --add https://github.com/nix-community/home-manager/archive/release-24.05.tar.gz home-manager
|
$ sudo nix-channel --add https://github.com/nix-community/home-manager/archive/release-24.11.tar.gz home-manager
|
||||||
$ sudo nix-channel --update
|
$ sudo nix-channel --update
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ home-manager.users.eve = { pkgs, ... }: {
|
||||||
|
|
||||||
# The state version is required and should stay at the version you
|
# The state version is required and should stay at the version you
|
||||||
# originally installed.
|
# originally installed.
|
||||||
home.stateVersion = "24.05";
|
home.stateVersion = "24.11";
|
||||||
};
|
};
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
@ -19,10 +19,10 @@
|
||||||
$ nix-channel --update
|
$ nix-channel --update
|
||||||
```
|
```
|
||||||
|
|
||||||
and if you follow a Nixpkgs version 24.05 channel you can run
|
and if you follow a Nixpkgs version 24.11 channel you can run
|
||||||
|
|
||||||
``` shell
|
``` shell
|
||||||
$ nix-channel --add https://github.com/nix-community/home-manager/archive/release-24.05.tar.gz home-manager
|
$ nix-channel --add https://github.com/nix-community/home-manager/archive/release-24.11.tar.gz home-manager
|
||||||
$ nix-channel --update
|
$ nix-channel --update
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
@ -11,10 +11,10 @@ then to generate and activate a basic configuration run the command
|
||||||
$ nix run home-manager/master -- init --switch
|
$ nix run home-manager/master -- init --switch
|
||||||
```
|
```
|
||||||
|
|
||||||
For Nixpkgs or NixOS version 24.05 run
|
For Nixpkgs or NixOS version 24.11 run
|
||||||
|
|
||||||
``` shell
|
``` shell
|
||||||
$ nix run home-manager/release-24.05 -- init --switch
|
$ nix run home-manager/release-24.11 -- init --switch
|
||||||
```
|
```
|
||||||
|
|
||||||
This will generate a `flake.nix` and a `home.nix` file in
|
This will generate a `flake.nix` and a `home.nix` file in
|
||||||
|
@ -30,7 +30,7 @@ $ # Edit files in ~/.config/home-manager
|
||||||
$ nix run home-manager/$branch -- init --switch
|
$ nix run home-manager/$branch -- init --switch
|
||||||
```
|
```
|
||||||
|
|
||||||
Where `$branch` is one of `master` or `release-24.05`.
|
Where `$branch` is one of `master` or `release-24.11`.
|
||||||
|
|
||||||
After the initial activation has completed successfully then building
|
After the initial activation has completed successfully then building
|
||||||
and activating your flake-based configuration is as simple as
|
and activating your flake-based configuration is as simple as
|
||||||
|
|
|
@ -20,7 +20,7 @@ A fresh install of Home Manager will generate a minimal
|
||||||
# You can update Home Manager without changing this value. See
|
# You can update Home Manager without changing this value. See
|
||||||
# the Home Manager release notes for a list of state version
|
# the Home Manager release notes for a list of state version
|
||||||
# changes in each release.
|
# changes in each release.
|
||||||
home.stateVersion = "24.05";
|
home.stateVersion = "24.11";
|
||||||
|
|
||||||
# Let Home Manager install and manage itself.
|
# Let Home Manager install and manage itself.
|
||||||
programs.home-manager.enable = true;
|
programs.home-manager.enable = true;
|
||||||
|
@ -65,7 +65,7 @@ follows:
|
||||||
# You can update Home Manager without changing this value. See
|
# You can update Home Manager without changing this value. See
|
||||||
# the Home Manager release notes for a list of state version
|
# the Home Manager release notes for a list of state version
|
||||||
# changes in each release.
|
# changes in each release.
|
||||||
home.stateVersion = "24.05";
|
home.stateVersion = "24.11";
|
||||||
|
|
||||||
# Let Home Manager install and manage itself.
|
# Let Home Manager install and manage itself.
|
||||||
programs.home-manager.enable = true;
|
programs.home-manager.enable = true;
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
# Release 24.11 {#sec-release-24.11}
|
# Release 24.11 {#sec-release-24.11}
|
||||||
|
|
||||||
This is the current unstable branch and the information in this section
|
The 24.05 release branch became stable in November, 2024.
|
||||||
is therefore not final.
|
|
||||||
|
|
||||||
## Highlights {#sec-release-24.11-highlights}
|
## Highlights {#sec-release-24.11-highlights}
|
||||||
|
|
||||||
|
@ -29,4 +28,4 @@ The state version in this release includes the changes below. These
|
||||||
changes are only active if the `home.stateVersion` option is set to
|
changes are only active if the `home.stateVersion` option is set to
|
||||||
\"24.11\" or later.
|
\"24.11\" or later.
|
||||||
|
|
||||||
- No changes.
|
- There was no state version change in this release.
|
||||||
|
|
|
@ -2,11 +2,11 @@
|
||||||
"nodes": {
|
"nodes": {
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1732014248,
|
"lastModified": 1733212471,
|
||||||
"narHash": "sha256-y/MEyuJ5oBWrWAic/14LaIr/u5E0wRVzyYsouYY3W6w=",
|
"narHash": "sha256-M1+uCoV5igihRfcUKrr1riygbe73/dzNnzPsmaLCmpo=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "23e89b7da85c3640bbc2173fe04f4bd114342367",
|
"rev": "55d15ad12a74eb7d4646254e13638ad0c4128776",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
@ -359,7 +359,7 @@ $xdgVars
|
||||||
# You should not change this value, even if you update Home Manager. If you do
|
# You should not change this value, even if you update Home Manager. If you do
|
||||||
# want to update the value, then make sure to first check the Home Manager
|
# want to update the value, then make sure to first check the Home Manager
|
||||||
# release notes.
|
# release notes.
|
||||||
home.stateVersion = "24.05"; # Please read the comment before changing.
|
home.stateVersion = "24.11"; # Please read the comment before changing.
|
||||||
|
|
||||||
# The home.packages option allows you to install Nix packages into your
|
# The home.packages option allows you to install Nix packages into your
|
||||||
# environment.
|
# environment.
|
||||||
|
@ -857,7 +857,7 @@ function doUninstall() {
|
||||||
uninstall = true;
|
uninstall = true;
|
||||||
home.username = "$USER";
|
home.username = "$USER";
|
||||||
home.homeDirectory = "$HOME";
|
home.homeDirectory = "$HOME";
|
||||||
home.stateVersion = "24.05";
|
home.stateVersion = "24.11";
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
# shellcheck disable=2064
|
# shellcheck disable=2064
|
||||||
|
|
|
@ -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-05-31 17:09+0000\n"
|
"PO-Revision-Date: 2024-12-03 13:00+0000\n"
|
||||||
"Last-Translator: jarre johansson <jarre@johansson.today>\n"
|
"Last-Translator: Ricky Tigg <ricky.tigg@gmail.com>\n"
|
||||||
"Language-Team: Finnish <https://hosted.weblate.org/projects/home-manager/cli/"
|
"Language-Team: Finnish <https://hosted.weblate.org/projects/home-manager/cli/"
|
||||||
"fi/>\n"
|
"fi/>\n"
|
||||||
"Language: fi\n"
|
"Language: fi\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=2; plural=n != 1;\n"
|
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||||
"X-Generator: Weblate 5.6-dev\n"
|
"X-Generator: Weblate 5.9-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
|
||||||
|
@ -26,7 +26,7 @@ msgstr "%s: puuttuva argumentti kohteelle %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"
|
||||||
msgstr "Konfiguraatiotiedostoa ei löytynyt sijainnista %s"
|
msgstr "Kokoonpanotiedostoa ei löydy %s:sta"
|
||||||
|
|
||||||
#. translators: The first '%s' specifier will be replaced by either
|
#. translators: The first '%s' specifier will be replaced by either
|
||||||
#. 'home.nix' or 'flake.nix'.
|
#. 'home.nix' or 'flake.nix'.
|
||||||
|
@ -36,10 +36,12 @@ msgid ""
|
||||||
"Keeping your Home Manager %s in %s is deprecated,\n"
|
"Keeping your Home Manager %s in %s is deprecated,\n"
|
||||||
"please move it to %s"
|
"please move it to %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
"Home Managerin %s pitäminen %s:ssa on vanhentunut.\n"
|
||||||
|
"ole hyvä ja siirrä se %s:een"
|
||||||
|
|
||||||
#: home-manager/home-manager:92
|
#: home-manager/home-manager:92
|
||||||
msgid "No configuration file found. Please create one at %s"
|
msgid "No configuration file found. Please create one at %s"
|
||||||
msgstr "Konfiguraatiotiedostoa ei löytynyt. Luo sellainen sijaintiin %s"
|
msgstr "Kokoonpanotiedostoa ei löytynyt. Luo sellainen %s:lla"
|
||||||
|
|
||||||
#: home-manager/home-manager:107
|
#: home-manager/home-manager:107
|
||||||
msgid "Home Manager not found at %s."
|
msgid "Home Manager not found at %s."
|
||||||
|
|
|
@ -174,7 +174,7 @@ in {
|
||||||
}
|
}
|
||||||
|
|
||||||
(mkIf cfg.x11.enable {
|
(mkIf cfg.x11.enable {
|
||||||
xsession.initExtra = ''
|
xsession.profileExtra = ''
|
||||||
${pkgs.xorg.xsetroot}/bin/xsetroot -xcf ${cursorPath} ${
|
${pkgs.xorg.xsetroot}/bin/xsetroot -xcf ${cursorPath} ${
|
||||||
toString cfg.size
|
toString cfg.size
|
||||||
}
|
}
|
||||||
|
|
|
@ -1827,6 +1827,40 @@ in {
|
||||||
as systemd services.
|
as systemd services.
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
time = "2024-12-01T19:17:40+00:00";
|
||||||
|
message = ''
|
||||||
|
A new module is available: 'programs.nix-your-shell'.
|
||||||
|
|
||||||
|
nix-your-shell is a wrapper for `nix develop` or `nix-shell` to retain
|
||||||
|
the same shell inside the new environment.
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
time = "2024-12-01T19:34:04+00:00";
|
||||||
|
message = ''
|
||||||
|
A new module is available: 'programs.kubecolor'.
|
||||||
|
|
||||||
|
Kubecolor is a kubectl wrapper used to add colors to your kubectl
|
||||||
|
output.
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
time = "2024-12-04T20:00:00+00:00";
|
||||||
|
condition = let
|
||||||
|
sCfg = config.programs.starship;
|
||||||
|
fCfg = config.programs.fish;
|
||||||
|
in sCfg.enable && sCfg.enableFishIntegration && fCfg.enable;
|
||||||
|
message = ''
|
||||||
|
A new option 'programs.starship.enableInteractive' is available for
|
||||||
|
the Fish shell that only enables starship if the shell is interactive.
|
||||||
|
|
||||||
|
Some plugins require this to be set to 'false' to function correctly.
|
||||||
|
'';
|
||||||
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,13 +17,13 @@ in {
|
||||||
powermanagementprofilesrc.AC.HandleButtonEvents.lidAction = 32;
|
powermanagementprofilesrc.AC.HandleButtonEvents.lidAction = 32;
|
||||||
};
|
};
|
||||||
description = ''
|
description = ''
|
||||||
A set of values to be modified by {command}`kwriteconfig5`.
|
A set of values to be modified by {command}`kwriteconfig6`.
|
||||||
|
|
||||||
The example value would cause the following command to run in the
|
The example value would cause the following command to run in the
|
||||||
activation script:
|
activation script:
|
||||||
|
|
||||||
``` shell
|
``` shell
|
||||||
kwriteconfig5 --file $XDG_CONFIG_HOME/powermanagementprofilesrc \
|
kwriteconfig6 --file $XDG_CONFIG_HOME/powermanagementprofilesrc \
|
||||||
--group AC \
|
--group AC \
|
||||||
--group HandleButtonEvents \
|
--group HandleButtonEvents \
|
||||||
--group lidAction \
|
--group lidAction \
|
||||||
|
@ -53,7 +53,7 @@ in {
|
||||||
lib.mapAttrsToList
|
lib.mapAttrsToList
|
||||||
(group: value: toLine file (path ++ [ group ]) value) value
|
(group: value: toLine file (path ++ [ group ]) value) value
|
||||||
else
|
else
|
||||||
"run test -f '${configHome}/${file}' && run ${pkgs.libsForQt5.kconfig}/bin/kwriteconfig5 --file '${configHome}/${file}' ${
|
"run ${pkgs.kdePackages.kconfig}/bin/kwriteconfig6 --file '${configHome}/${file}' ${
|
||||||
lib.concatMapStringsSep " " (x: "--group ${x}")
|
lib.concatMapStringsSep " " (x: "--group ${x}")
|
||||||
(lib.lists.init path)
|
(lib.lists.init path)
|
||||||
} --key '${lib.lists.last path}' ${toValue value}";
|
} --key '${lib.lists.last path}' ${toValue value}";
|
||||||
|
@ -62,7 +62,7 @@ in {
|
||||||
in builtins.concatStringsSep "\n" lines}
|
in builtins.concatStringsSep "\n" lines}
|
||||||
|
|
||||||
# TODO: some way to only call the dbus calls needed
|
# TODO: some way to only call the dbus calls needed
|
||||||
run ${pkgs.libsForQt5.qttools.bin}/bin/qdbus org.kde.KWin /KWin reconfigure || echo "KWin reconfigure failed"
|
run ${pkgs.kdePackages.qttools}/bin/qdbus org.kde.KWin /KWin reconfigure || echo "KWin reconfigure failed"
|
||||||
# the actual values are https://github.com/KDE/plasma-workspace/blob/c97dddf20df5702eb429b37a8c10b2c2d8199d4e/kcms/kcms-common_p.h#L13
|
# the actual values are https://github.com/KDE/plasma-workspace/blob/c97dddf20df5702eb429b37a8c10b2c2d8199d4e/kcms/kcms-common_p.h#L13
|
||||||
for changeType in {0..10}; do
|
for changeType in {0..10}; do
|
||||||
# even if one of those calls fails the others keep running
|
# even if one of those calls fails the others keep running
|
||||||
|
|
|
@ -21,7 +21,7 @@ in {
|
||||||
config = mkIf config.uninstall {
|
config = mkIf config.uninstall {
|
||||||
home.packages = lib.mkForce [ ];
|
home.packages = lib.mkForce [ ];
|
||||||
home.file = lib.mkForce { };
|
home.file = lib.mkForce { };
|
||||||
home.stateVersion = lib.mkForce "24.05";
|
home.stateVersion = lib.mkForce "24.11";
|
||||||
home.enableNixpkgsReleaseCheck = lib.mkForce false;
|
home.enableNixpkgsReleaseCheck = lib.mkForce false;
|
||||||
manual.manpages.enable = lib.mkForce false;
|
manual.manpages.enable = lib.mkForce false;
|
||||||
news.display = lib.mkForce "silent";
|
news.display = lib.mkForce "silent";
|
||||||
|
|
|
@ -143,6 +143,7 @@ let
|
||||||
./programs/khard.nix
|
./programs/khard.nix
|
||||||
./programs/kitty.nix
|
./programs/kitty.nix
|
||||||
./programs/kodi.nix
|
./programs/kodi.nix
|
||||||
|
./programs/kubecolor.nix
|
||||||
./programs/lazygit.nix
|
./programs/lazygit.nix
|
||||||
./programs/ledger.nix
|
./programs/ledger.nix
|
||||||
./programs/less.nix
|
./programs/less.nix
|
||||||
|
@ -176,6 +177,7 @@ let
|
||||||
./programs/nh.nix
|
./programs/nh.nix
|
||||||
./programs/nheko.nix
|
./programs/nheko.nix
|
||||||
./programs/nix-index.nix
|
./programs/nix-index.nix
|
||||||
|
./programs/nix-your-shell.nix
|
||||||
./programs/nnn.nix
|
./programs/nnn.nix
|
||||||
./programs/noti.nix
|
./programs/noti.nix
|
||||||
./programs/notmuch.nix
|
./programs/notmuch.nix
|
||||||
|
|
|
@ -132,6 +132,8 @@ in {
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
package = mkPackageOption pkgs "alot" { };
|
||||||
|
|
||||||
hooks = mkOption {
|
hooks = mkOption {
|
||||||
type = types.lines;
|
type = types.lines;
|
||||||
default = "";
|
default = "";
|
||||||
|
@ -229,7 +231,7 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
home.packages = [ pkgs.alot ];
|
home.packages = [ cfg.package ];
|
||||||
|
|
||||||
xdg.configFile."alot/config".text = configFile;
|
xdg.configFile."alot/config".text = configFile;
|
||||||
|
|
||||||
|
|
|
@ -5,11 +5,13 @@ with lib;
|
||||||
let
|
let
|
||||||
|
|
||||||
cfg = config.programs.atuin;
|
cfg = config.programs.atuin;
|
||||||
|
daemonCfg = cfg.daemon;
|
||||||
|
|
||||||
tomlFormat = pkgs.formats.toml { };
|
tomlFormat = pkgs.formats.toml { };
|
||||||
|
|
||||||
|
inherit (pkgs.stdenv) isLinux isDarwin;
|
||||||
in {
|
in {
|
||||||
meta.maintainers = [ maintainers.hawkw ];
|
meta.maintainers = [ maintainers.hawkw maintainers.water-sucks ];
|
||||||
|
|
||||||
options.programs.atuin = {
|
options.programs.atuin = {
|
||||||
enable = mkEnableOption "atuin";
|
enable = mkEnableOption "atuin";
|
||||||
|
@ -94,49 +96,132 @@ in {
|
||||||
Whether to enable Nushell integration.
|
Whether to enable Nushell integration.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
daemon = {
|
||||||
|
enable = mkEnableOption "Atuin daemon";
|
||||||
|
|
||||||
|
logLevel = mkOption {
|
||||||
|
default = null;
|
||||||
|
type =
|
||||||
|
types.nullOr (types.enum [ "trace" "debug" "info" "warn" "error" ]);
|
||||||
|
description = ''
|
||||||
|
Verbosity of Atuin daemon logging.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = let flagsStr = escapeShellArgs cfg.flags;
|
config = let flagsStr = escapeShellArgs cfg.flags;
|
||||||
in mkIf cfg.enable {
|
in mkIf cfg.enable (mkMerge [
|
||||||
|
{
|
||||||
|
# Always add the configured `atuin` package.
|
||||||
|
home.packages = [ cfg.package ];
|
||||||
|
|
||||||
# Always add the configured `atuin` package.
|
# If there are user-provided settings, generate the config file.
|
||||||
home.packages = [ cfg.package ];
|
xdg.configFile."atuin/config.toml" = mkIf (cfg.settings != { }) {
|
||||||
|
source = tomlFormat.generate "atuin-config" cfg.settings;
|
||||||
|
};
|
||||||
|
|
||||||
# If there are user-provided settings, generate the config file.
|
programs.bash.initExtra = mkIf cfg.enableBashIntegration ''
|
||||||
xdg.configFile."atuin/config.toml" = mkIf (cfg.settings != { }) {
|
if [[ :$SHELLOPTS: =~ :(vi|emacs): ]]; then
|
||||||
source = tomlFormat.generate "atuin-config" cfg.settings;
|
source "${pkgs.bash-preexec}/share/bash/bash-preexec.sh"
|
||||||
};
|
eval "$(${lib.getExe cfg.package} init bash ${flagsStr})"
|
||||||
|
fi
|
||||||
programs.bash.initExtra = mkIf cfg.enableBashIntegration ''
|
|
||||||
if [[ :$SHELLOPTS: =~ :(vi|emacs): ]]; then
|
|
||||||
source "${pkgs.bash-preexec}/share/bash/bash-preexec.sh"
|
|
||||||
eval "$(${lib.getExe cfg.package} init bash ${flagsStr})"
|
|
||||||
fi
|
|
||||||
'';
|
|
||||||
|
|
||||||
programs.zsh.initExtra = mkIf cfg.enableZshIntegration ''
|
|
||||||
if [[ $options[zle] = on ]]; then
|
|
||||||
eval "$(${lib.getExe cfg.package} init zsh ${flagsStr})"
|
|
||||||
fi
|
|
||||||
'';
|
|
||||||
|
|
||||||
programs.fish.interactiveShellInit = mkIf cfg.enableFishIntegration ''
|
|
||||||
${lib.getExe cfg.package} init fish ${flagsStr} | source
|
|
||||||
'';
|
|
||||||
|
|
||||||
programs.nushell = mkIf cfg.enableNushellIntegration {
|
|
||||||
extraEnv = ''
|
|
||||||
let atuin_cache = "${config.xdg.cacheHome}/atuin"
|
|
||||||
if not ($atuin_cache | path exists) {
|
|
||||||
mkdir $atuin_cache
|
|
||||||
}
|
|
||||||
${
|
|
||||||
lib.getExe cfg.package
|
|
||||||
} init nu ${flagsStr} | save --force ${config.xdg.cacheHome}/atuin/init.nu
|
|
||||||
'';
|
'';
|
||||||
extraConfig = ''
|
|
||||||
source ${config.xdg.cacheHome}/atuin/init.nu
|
programs.zsh.initExtra = mkIf cfg.enableZshIntegration ''
|
||||||
|
if [[ $options[zle] = on ]]; then
|
||||||
|
eval "$(${lib.getExe cfg.package} init zsh ${flagsStr})"
|
||||||
|
fi
|
||||||
'';
|
'';
|
||||||
};
|
|
||||||
};
|
programs.fish.interactiveShellInit = mkIf cfg.enableFishIntegration ''
|
||||||
|
${lib.getExe cfg.package} init fish ${flagsStr} | source
|
||||||
|
'';
|
||||||
|
|
||||||
|
programs.nushell = mkIf cfg.enableNushellIntegration {
|
||||||
|
extraEnv = ''
|
||||||
|
let atuin_cache = "${config.xdg.cacheHome}/atuin"
|
||||||
|
if not ($atuin_cache | path exists) {
|
||||||
|
mkdir $atuin_cache
|
||||||
|
}
|
||||||
|
${
|
||||||
|
lib.getExe cfg.package
|
||||||
|
} init nu ${flagsStr} | save --force ${config.xdg.cacheHome}/atuin/init.nu
|
||||||
|
'';
|
||||||
|
extraConfig = ''
|
||||||
|
source ${config.xdg.cacheHome}/atuin/init.nu
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
(mkIf daemonCfg.enable (mkMerge [
|
||||||
|
{
|
||||||
|
assertions = [
|
||||||
|
{
|
||||||
|
assertion = versionAtLeast cfg.package.version "18.2.0";
|
||||||
|
message = ''
|
||||||
|
The Atuin daemon requires at least version 18.2.0 or later.
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
{
|
||||||
|
assertion = isLinux || isDarwin;
|
||||||
|
message =
|
||||||
|
"The Atuin daemon can only be configured on either Linux or macOS.";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
programs.atuin.settings = { daemon = { enabled = true; }; };
|
||||||
|
}
|
||||||
|
(mkIf isLinux {
|
||||||
|
programs.atuin.settings = { daemon = { systemd_socket = true; }; };
|
||||||
|
|
||||||
|
systemd.user.services.atuin-daemon = {
|
||||||
|
Unit = {
|
||||||
|
Description = "Atuin daemon";
|
||||||
|
Requires = [ "atuin-daemon.socket" ];
|
||||||
|
};
|
||||||
|
Install = {
|
||||||
|
Also = [ "atuin-daemon.socket" ];
|
||||||
|
WantedBy = [ "default.target" ];
|
||||||
|
};
|
||||||
|
Service = {
|
||||||
|
ExecStart = "${lib.getExe cfg.package} daemon";
|
||||||
|
Environment = lib.optionals (daemonCfg.logLevel != null)
|
||||||
|
[ "ATUIN_LOG=${daemonCfg.logLevel}" ];
|
||||||
|
Restart = "on-failure";
|
||||||
|
RestartSteps = 3;
|
||||||
|
RestartMaxDelaySec = 6;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.user.sockets.atuin-daemon = {
|
||||||
|
Unit = { Description = "Atuin daemon socket"; };
|
||||||
|
Install = { WantedBy = [ "sockets.target" ]; };
|
||||||
|
Socket = {
|
||||||
|
ListenStream = "%h/.local/share/atuin/atuin.sock";
|
||||||
|
SocketMode = "0600";
|
||||||
|
RemoveOnStop = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
})
|
||||||
|
(mkIf isDarwin {
|
||||||
|
launchd.agents.atuin-daemon = {
|
||||||
|
enable = true;
|
||||||
|
config = {
|
||||||
|
ProgramArguments = [ "${lib.getExe cfg.package}" "daemon" ];
|
||||||
|
EnvironmentVariables =
|
||||||
|
lib.optionalAttrs (daemonCfg.logLevel != null) {
|
||||||
|
ATUIN_LOG = daemonCfg.logLevel;
|
||||||
|
};
|
||||||
|
KeepAlive = {
|
||||||
|
Crashed = true;
|
||||||
|
SuccessfulExit = false;
|
||||||
|
};
|
||||||
|
ProcessType = "Background";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
})
|
||||||
|
]))
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
|
|
|
@ -658,12 +658,30 @@ in {
|
||||||
{command}`nix-env -f '<nixpkgs>' -qaP -A kakounePlugins`.
|
{command}`nix-env -f '<nixpkgs>' -qaP -A kakounePlugins`.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
colorSchemePackage = mkOption {
|
||||||
|
type = with types; nullOr package;
|
||||||
|
default = null;
|
||||||
|
example = literalExpression "pkgs.kakounePlugins.kakoune-catppuccin";
|
||||||
|
description = ''
|
||||||
|
A kakoune color schemes to add to your colors folder. This works
|
||||||
|
because kakoune recursively checks
|
||||||
|
{file}`$XDG_CONFIG_HOME/kak/colors/`. To apply the color scheme use
|
||||||
|
`programs.kakoune.config.colorScheme = "theme"`.
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
home.packages = [ kakouneWithPlugins ];
|
home.packages = [ kakouneWithPlugins ];
|
||||||
home.sessionVariables = mkIf cfg.defaultEditor { EDITOR = "kak"; };
|
home.sessionVariables = mkIf cfg.defaultEditor { EDITOR = "kak"; };
|
||||||
xdg.configFile."kak/kakrc".source = configFile;
|
xdg.configFile = mkMerge [
|
||||||
|
{ "kak/kakrc".source = configFile; }
|
||||||
|
(mkIf (cfg.colorSchemePackage != null) {
|
||||||
|
"kak/colors/${cfg.colorSchemePackage.name}".source =
|
||||||
|
cfg.colorSchemePackage;
|
||||||
|
})
|
||||||
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
87
modules/programs/kubecolor.nix
Normal file
87
modules/programs/kubecolor.nix
Normal file
|
@ -0,0 +1,87 @@
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
|
||||||
|
cfg = config.programs.kubecolor;
|
||||||
|
yamlFormat = pkgs.formats.yaml { };
|
||||||
|
inherit (pkgs.stdenv.hostPlatform) isDarwin;
|
||||||
|
|
||||||
|
in {
|
||||||
|
meta.maintainers = with maintainers; [ ajgon ];
|
||||||
|
|
||||||
|
options.programs.kubecolor = {
|
||||||
|
enable = mkEnableOption "kubecolor - Colorize your kubectl output";
|
||||||
|
|
||||||
|
package = mkPackageOption pkgs "kubecolor" { };
|
||||||
|
|
||||||
|
enableAlias = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
description = ''
|
||||||
|
When set to true, it will create an alias for kubectl pointing to
|
||||||
|
kubecolor, thus making kubecolor the default kubectl client.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
settings = mkOption {
|
||||||
|
type = yamlFormat.type;
|
||||||
|
default = { };
|
||||||
|
example = literalExpression ''
|
||||||
|
kubectl = lib.getExe pkgs.kubectl
|
||||||
|
preset = "dark";
|
||||||
|
paging = "auto";
|
||||||
|
'';
|
||||||
|
description = ''
|
||||||
|
Configuration written to {file}`~/.kube/color.yaml` (Linux)
|
||||||
|
or {file}`Library/Application Support/kube/color.yaml` (Darwin).
|
||||||
|
See <https://kubecolor.github.io/reference/config/> for supported
|
||||||
|
values.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = let
|
||||||
|
preferXdgDirectories = config.home.preferXdgDirectories
|
||||||
|
&& (!isDarwin || config.xdg.enable);
|
||||||
|
|
||||||
|
# https://github.com/kubecolor/kubecolor/pull/145
|
||||||
|
configPathSuffix = if cfg.package.pname == "kubecolor"
|
||||||
|
&& lib.strings.toInt (lib.versions.major cfg.package.version) == 0
|
||||||
|
&& lib.strings.toInt (lib.versions.minor cfg.package.version) < 4 then
|
||||||
|
"kube/"
|
||||||
|
else
|
||||||
|
"kube/color.yaml";
|
||||||
|
|
||||||
|
in mkIf cfg.enable {
|
||||||
|
home.packages = [ cfg.package ];
|
||||||
|
|
||||||
|
home.sessionVariables = if preferXdgDirectories then {
|
||||||
|
KUBECOLOR_CONFIG = "${config.xdg.configHome}/${configPathSuffix}";
|
||||||
|
} else if isDarwin then {
|
||||||
|
KUBECOLOR_CONFIG =
|
||||||
|
"${config.home.homeDirectory}/Library/Application Support/${configPathSuffix}";
|
||||||
|
} else
|
||||||
|
{ };
|
||||||
|
|
||||||
|
xdg.configFile = mkIf preferXdgDirectories {
|
||||||
|
"kube/color.yaml" = mkIf (cfg.settings != { }) {
|
||||||
|
source = yamlFormat.generate "kubecolor-settings" cfg.settings;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
home.file = mkIf (!preferXdgDirectories) {
|
||||||
|
"Library/Application Support/kube/color.yaml" =
|
||||||
|
mkIf (isDarwin && cfg.settings != { }) {
|
||||||
|
source = yamlFormat.generate "kubecolor-settings" cfg.settings;
|
||||||
|
};
|
||||||
|
".kube/color.yaml" = mkIf (!isDarwin && cfg.settings != { }) {
|
||||||
|
source = yamlFormat.generate "kubecolor-settings" cfg.settings;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
home.shellAliases =
|
||||||
|
lib.mkIf cfg.enableAlias { kubectl = lib.getExe cfg.package; };
|
||||||
|
};
|
||||||
|
}
|
|
@ -68,7 +68,7 @@ in {
|
||||||
{
|
{
|
||||||
mpv = {
|
mpv = {
|
||||||
no_display = true;
|
no_display = true;
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
description = ''
|
description = ''
|
||||||
|
|
56
modules/programs/nix-your-shell.nix
Normal file
56
modules/programs/nix-your-shell.nix
Normal file
|
@ -0,0 +1,56 @@
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
|
||||||
|
cfg = config.programs.nix-your-shell;
|
||||||
|
|
||||||
|
in {
|
||||||
|
meta.maintainers = [ maintainers.terlar ];
|
||||||
|
|
||||||
|
options.programs.nix-your-shell = {
|
||||||
|
enable = mkEnableOption ''
|
||||||
|
{command}`nix-your-shell`, a wrapper for `nix develop` or `nix-shell`
|
||||||
|
to retain the same shell inside the new environment'';
|
||||||
|
|
||||||
|
package = mkPackageOption pkgs "nix-your-shell" { };
|
||||||
|
|
||||||
|
enableFishIntegration = mkEnableOption "Fish integration" // {
|
||||||
|
default = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
enableNushellIntegration = mkEnableOption "Nushell integration" // {
|
||||||
|
default = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
enableZshIntegration = mkEnableOption "Zsh integration" // {
|
||||||
|
default = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
home.packages = [ cfg.package ];
|
||||||
|
|
||||||
|
programs = {
|
||||||
|
fish.interactiveShellInit = mkIf cfg.enableFishIntegration ''
|
||||||
|
${cfg.package}/bin/nix-your-shell fish | source
|
||||||
|
'';
|
||||||
|
|
||||||
|
nushell = mkIf cfg.enableNushellIntegration {
|
||||||
|
extraEnv = ''
|
||||||
|
mkdir ${config.xdg.cacheHome}/nix-your-shell
|
||||||
|
${cfg.package}/bin/nix-your-shell nu | save --force ${config.xdg.cacheHome}/nix-your-shell/init.nu
|
||||||
|
'';
|
||||||
|
|
||||||
|
extraConfig = ''
|
||||||
|
source ${config.xdg.cacheHome}/nix-your-shell/init.nu
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
zsh.initExtra = mkIf cfg.enableZshIntegration ''
|
||||||
|
${cfg.package}/bin/nix-your-shell zsh | source /dev/stdin
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -10,6 +10,8 @@ let
|
||||||
|
|
||||||
starshipCmd = "${config.home.profileDirectory}/bin/starship";
|
starshipCmd = "${config.home.profileDirectory}/bin/starship";
|
||||||
|
|
||||||
|
initFish =
|
||||||
|
if cfg.enableInteractive then "interactiveShellInit" else "shellInitLast";
|
||||||
in {
|
in {
|
||||||
meta.maintainers = [ ];
|
meta.maintainers = [ ];
|
||||||
|
|
||||||
|
@ -71,6 +73,17 @@ in {
|
||||||
default = true;
|
default = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enableInteractive = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = true;
|
||||||
|
description = ''
|
||||||
|
Only enable starship when the shell is interactive. This option is only
|
||||||
|
valid for the Fish shell.
|
||||||
|
|
||||||
|
Some plugins require this to be set to `false` to function correctly.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
enableTransience = mkOption {
|
enableTransience = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
|
@ -104,9 +117,9 @@ in {
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
|
|
||||||
programs.fish.interactiveShellInit = mkIf cfg.enableFishIntegration ''
|
programs.fish.${initFish} = mkIf cfg.enableFishIntegration ''
|
||||||
if test "$TERM" != "dumb"
|
if test "$TERM" != "dumb"
|
||||||
eval (${starshipCmd} init fish)
|
${starshipCmd} init fish | source
|
||||||
${lib.optionalString cfg.enableTransience "enable_transience"}
|
${lib.optionalString cfg.enableTransience "enable_transience"}
|
||||||
end
|
end
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -95,6 +95,7 @@ let
|
||||||
''}
|
''}
|
||||||
|
|
||||||
set -g mouse ${boolToStr cfg.mouse}
|
set -g mouse ${boolToStr cfg.mouse}
|
||||||
|
set -g focus-events ${boolToStr cfg.focusEvents}
|
||||||
setw -g aggressive-resize ${boolToStr cfg.aggressiveResize}
|
setw -g aggressive-resize ${boolToStr cfg.aggressiveResize}
|
||||||
setw -g clock-mode-style ${if cfg.clock24 then "24" else "12"}
|
setw -g clock-mode-style ${if cfg.clock24 then "24" else "12"}
|
||||||
set -s escape-time ${toString cfg.escapeTime}
|
set -s escape-time ${toString cfg.escapeTime}
|
||||||
|
@ -191,6 +192,15 @@ in {
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
focusEvents = mkOption {
|
||||||
|
default = false;
|
||||||
|
type = types.bool;
|
||||||
|
description = ''
|
||||||
|
On supported terminals, request focus events and pass them through to
|
||||||
|
applications running in tmux.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
historyLimit = mkOption {
|
historyLimit = mkOption {
|
||||||
default = 2000;
|
default = 2000;
|
||||||
example = 5000;
|
example = 5000;
|
||||||
|
@ -239,7 +249,7 @@ in {
|
||||||
|
|
||||||
sensibleOnTop = mkOption {
|
sensibleOnTop = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
default = true;
|
default = false;
|
||||||
description = ''
|
description = ''
|
||||||
Run the sensible plugin at the top of the configuration. It
|
Run the sensible plugin at the top of the configuration. It
|
||||||
is possible to override the sensible settings using the
|
is possible to override the sensible settings using the
|
||||||
|
|
|
@ -77,16 +77,16 @@ in {
|
||||||
default = { };
|
default = { };
|
||||||
example = literalExpression ''
|
example = literalExpression ''
|
||||||
{
|
{
|
||||||
input.keymap = [
|
input.prepend_keymap = [
|
||||||
{ exec = "close"; on = [ "<C-q>" ]; }
|
{ run = "close"; on = [ "<C-q>" ]; }
|
||||||
{ exec = "close --submit"; on = [ "<Enter>" ]; }
|
{ run = "close --submit"; on = [ "<Enter>" ]; }
|
||||||
{ exec = "escape"; on = [ "<Esc>" ]; }
|
{ run = "escape"; on = [ "<Esc>" ]; }
|
||||||
{ exec = "backspace"; on = [ "<Backspace>" ]; }
|
{ run = "backspace"; on = [ "<Backspace>" ]; }
|
||||||
];
|
];
|
||||||
manager.keymap = [
|
manager.prepend_keymap = [
|
||||||
{ exec = "escape"; on = [ "<Esc>" ]; }
|
{ run = "escape"; on = [ "<Esc>" ]; }
|
||||||
{ exec = "quit"; on = [ "q" ]; }
|
{ run = "quit"; on = [ "q" ]; }
|
||||||
{ exec = "close"; on = [ "<C-q>" ]; }
|
{ run = "close"; on = [ "<C-q>" ]; }
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -427,6 +427,9 @@ in
|
||||||
- `match_prev_cmd`: Like `history`, but chooses the most recent match whose preceding history item matches
|
- `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
|
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`.
|
don't preserve the history order such as `HIST_IGNORE_ALL_DUPS` or `HIST_EXPIRE_DUPS_FIRST`.
|
||||||
|
|
||||||
|
Setting the option to an empty list `[]` will make ZSH_AUTOSUGGESTION_STRATEGY not be set automatically,
|
||||||
|
allowing the variable to be declared in {option}`programs.zsh.localVariables` or {option}`programs.zsh.sessionVariables`
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -641,7 +644,10 @@ 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.strategy != []) ''
|
||||||
|
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}"
|
||||||
|
|
|
@ -9,6 +9,8 @@ in {
|
||||||
enable =
|
enable =
|
||||||
mkEnableOption "zsh-abbr - zsh manager for auto-expanding abbreviations";
|
mkEnableOption "zsh-abbr - zsh manager for auto-expanding abbreviations";
|
||||||
|
|
||||||
|
package = mkPackageOption pkgs "zsh-abbr" { };
|
||||||
|
|
||||||
abbreviations = mkOption {
|
abbreviations = mkOption {
|
||||||
type = types.attrsOf types.str;
|
type = types.attrsOf types.str;
|
||||||
default = { };
|
default = { };
|
||||||
|
@ -27,7 +29,7 @@ in {
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
programs.zsh.plugins = [{
|
programs.zsh.plugins = [{
|
||||||
name = "zsh-abbr";
|
name = "zsh-abbr";
|
||||||
src = pkgs.zsh-abbr;
|
src = cfg.package;
|
||||||
file = "share/zsh/zsh-abbr/zsh-abbr.plugin.zsh";
|
file = "share/zsh/zsh-abbr/zsh-abbr.plugin.zsh";
|
||||||
}];
|
}];
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@ in {
|
||||||
|
|
||||||
serverUrl = mkOption {
|
serverUrl = mkOption {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
default = "https://api.etesync.com/";
|
default = "https://api.etebase.com/partner/etesync/";
|
||||||
description = "The URL to the etesync server.";
|
description = "The URL to the etesync server.";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -27,8 +27,8 @@ let
|
||||||
Restart = "always";
|
Restart = "always";
|
||||||
RestartSec = 30;
|
RestartSec = 30;
|
||||||
Type = "simple";
|
Type = "simple";
|
||||||
} // optionalAttrs account.notmuch.enable {
|
Environment = [ "PATH=${cfg.path}" ]
|
||||||
Environment =
|
++ optional account.notmuch.enable
|
||||||
"NOTMUCH_CONFIG=${config.xdg.configHome}/notmuch/default/config";
|
"NOTMUCH_CONFIG=${config.xdg.configHome}/notmuch/default/config";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -97,6 +97,17 @@ in {
|
||||||
example = literalExpression "pkgs.imapnotify";
|
example = literalExpression "pkgs.imapnotify";
|
||||||
description = "The imapnotify package to use";
|
description = "The imapnotify package to use";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
path = mkOption {
|
||||||
|
type = types.listOf types.package;
|
||||||
|
apply = lib.makeBinPath;
|
||||||
|
default = [ ];
|
||||||
|
description = ''
|
||||||
|
List of packages to provide in PATH for the imapnotify service.
|
||||||
|
|
||||||
|
Note, this does not apply to the Darwin launchd service.
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
accounts.email.accounts = mkOption {
|
accounts.email.accounts = mkOption {
|
||||||
|
@ -122,6 +133,12 @@ in {
|
||||||
(checkAccounts (a: a.userName == null) "username")
|
(checkAccounts (a: a.userName == null) "username")
|
||||||
];
|
];
|
||||||
|
|
||||||
|
services.imapnotify.path = lib.mkMerge [
|
||||||
|
(lib.mkIf config.programs.notmuch.enable [ pkgs.notmuch ])
|
||||||
|
(lib.mkIf config.programs.mbsync.enable
|
||||||
|
[ config.programs.mbsync.package ])
|
||||||
|
];
|
||||||
|
|
||||||
systemd.user.services = listToAttrs (map genAccountUnit imapnotifyAccounts);
|
systemd.user.services = listToAttrs (map genAccountUnit imapnotifyAccounts);
|
||||||
|
|
||||||
launchd.agents = listToAttrs (map genAccountAgent imapnotifyAccounts);
|
launchd.agents = listToAttrs (map genAccountAgent imapnotifyAccounts);
|
||||||
|
|
|
@ -14,8 +14,8 @@ in {
|
||||||
enable = mkEnableOption "KDE connect";
|
enable = mkEnableOption "KDE connect";
|
||||||
package = mkOption {
|
package = mkOption {
|
||||||
type = types.package;
|
type = types.package;
|
||||||
default = pkgs.plasma5Packages.kdeconnect-kde;
|
default = pkgs.kdePackages.kdeconnect-kde;
|
||||||
example = literalExpression "pkgs.kdePackages.kdeconnect-kde";
|
example = literalExpression "pkgs.plasma5Packages.kdeconnect-kde";
|
||||||
description = "The KDE connect package to use";
|
description = "The KDE connect package to use";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -59,7 +59,6 @@ in {
|
||||||
"%C/lorri"
|
"%C/lorri"
|
||||||
# Needs %C/nix/fetcher-cache-v1.sqlite
|
# Needs %C/nix/fetcher-cache-v1.sqlite
|
||||||
"%C/nix"
|
"%C/nix"
|
||||||
"/nix/var/nix/gcroots/per-user/%u"
|
|
||||||
];
|
];
|
||||||
CacheDirectory = [ "lorri" ];
|
CacheDirectory = [ "lorri" ];
|
||||||
Restart = "on-failure";
|
Restart = "on-failure";
|
||||||
|
|
|
@ -23,7 +23,8 @@ let
|
||||||
name = "mopidy-with-extensions-${pkgs.mopidy.version}";
|
name = "mopidy-with-extensions-${pkgs.mopidy.version}";
|
||||||
paths = closePropagation cfg.extensionPackages;
|
paths = closePropagation cfg.extensionPackages;
|
||||||
pathsToLink = [ "/${pkgs.mopidyPackages.python.sitePackages}" ];
|
pathsToLink = [ "/${pkgs.mopidyPackages.python.sitePackages}" ];
|
||||||
buildInputs = [ pkgs.makeWrapper ];
|
nativeBuildInputs = [ pkgs.makeWrapper ];
|
||||||
|
ignoreCollisions = true;
|
||||||
postBuild = ''
|
postBuild = ''
|
||||||
makeWrapper ${pkgs.mopidy}/bin/mopidy $out/bin/mopidy \
|
makeWrapper ${pkgs.mopidy}/bin/mopidy $out/bin/mopidy \
|
||||||
--prefix PYTHONPATH : $out/${pkgs.mopidyPackages.python.sitePackages}
|
--prefix PYTHONPATH : $out/${pkgs.mopidyPackages.python.sitePackages}
|
||||||
|
|
|
@ -61,5 +61,12 @@ in {
|
||||||
Install = { WantedBy = [ "timers.target" ]; };
|
Install = { WantedBy = [ "timers.target" ]; };
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
|
({
|
||||||
|
xdg.configFile."systemd/user/podman-user-wait-network-online.service.d/50-exec-search-path.conf".text =
|
||||||
|
''
|
||||||
|
[Service]
|
||||||
|
ExecSearchPath=${pkgs.bashInteractive}/bin:${pkgs.systemd}/bin:/bin
|
||||||
|
'';
|
||||||
|
})
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
|
@ -99,6 +99,6 @@ in {
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
xsession.initExtra = xrdbMerge;
|
xsession.profileExtra = xrdbMerge;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -98,6 +98,7 @@ in import nmtSrc {
|
||||||
./modules/programs/khal
|
./modules/programs/khal
|
||||||
./modules/programs/khard
|
./modules/programs/khard
|
||||||
./modules/programs/kitty
|
./modules/programs/kitty
|
||||||
|
./modules/programs/kubecolor
|
||||||
./modules/programs/ledger
|
./modules/programs/ledger
|
||||||
./modules/programs/less
|
./modules/programs/less
|
||||||
./modules/programs/lf
|
./modules/programs/lf
|
||||||
|
@ -118,6 +119,7 @@ in import nmtSrc {
|
||||||
./modules/programs/newsboat
|
./modules/programs/newsboat
|
||||||
./modules/programs/nheko
|
./modules/programs/nheko
|
||||||
./modules/programs/nix-index
|
./modules/programs/nix-index
|
||||||
|
./modules/programs/nix-your-shell
|
||||||
./modules/programs/nnn
|
./modules/programs/nnn
|
||||||
./modules/programs/nushell
|
./modules/programs/nushell
|
||||||
./modules/programs/oh-my-posh
|
./modules/programs/oh-my-posh
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
home-manager.users.alice = { ... }: {
|
home-manager.users.alice = { ... }: {
|
||||||
home.stateVersion = "24.05";
|
home.stateVersion = "24.11";
|
||||||
home.file.test.text = "testfile";
|
home.file.test.text = "testfile";
|
||||||
# Enable a light-weight systemd service.
|
# Enable a light-weight systemd service.
|
||||||
services.pueue.enable = true;
|
services.pueue.enable = true;
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
# You should not change this value, even if you update Home Manager. If you do
|
# You should not change this value, even if you update Home Manager. If you do
|
||||||
# want to update the value, then make sure to first check the Home Manager
|
# want to update the value, then make sure to first check the Home Manager
|
||||||
# release notes.
|
# release notes.
|
||||||
home.stateVersion = "24.05"; # Please read the comment before changing.
|
home.stateVersion = "24.11"; # Please read the comment before changing.
|
||||||
|
|
||||||
# The home.packages option allows you to install Nix packages into your
|
# The home.packages option allows you to install Nix packages into your
|
||||||
# environment.
|
# environment.
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
{
|
{
|
||||||
home.username = "alice";
|
home.username = "alice";
|
||||||
home.homeDirectory = "/home/alice";
|
home.homeDirectory = "/home/alice";
|
||||||
home.stateVersion = "24.05";
|
home.stateVersion = "24.11";
|
||||||
home.packages = [ pkgs.hello ];
|
home.packages = [ pkgs.hello ];
|
||||||
home.file.test.text = "test";
|
home.file.test.text = "test";
|
||||||
home.sessionVariables.EDITOR = "emacs";
|
home.sessionVariables.EDITOR = "emacs";
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{ ... }: {
|
{ ... }: {
|
||||||
home.username = "alice";
|
home.username = "alice";
|
||||||
home.homeDirectory = "/home/alice";
|
home.homeDirectory = "/home/alice";
|
||||||
home.stateVersion = "24.05";
|
home.stateVersion = "24.11";
|
||||||
|
|
||||||
# Let Home Manager install and manage itself.
|
# Let Home Manager install and manage itself.
|
||||||
programs.home-manager.enable = true;
|
programs.home-manager.enable = true;
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
home.username = "alice";
|
home.username = "alice";
|
||||||
home.homeDirectory = "/home/alice";
|
home.homeDirectory = "/home/alice";
|
||||||
|
|
||||||
home.stateVersion = "24.05"; # Please read the comment before changing.
|
home.stateVersion = "24.11"; # Please read the comment before changing.
|
||||||
|
|
||||||
# Let Home Manager install and manage itself.
|
# Let Home Manager install and manage itself.
|
||||||
programs.home-manager.enable = true;
|
programs.home-manager.enable = true;
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
i18n.inputMethod = {
|
i18n.inputMethod = {
|
||||||
enabled = "fcitx5";
|
enabled = "fcitx5";
|
||||||
fcitx5.addons = with pkgs; [ fcitx5-chinese-addons ];
|
fcitx5.addons = [ pkgs.libsForQt5.fcitx5-chinese-addons ];
|
||||||
};
|
};
|
||||||
|
|
||||||
nmt.script = ''
|
nmt.script = ''
|
||||||
|
|
|
@ -1,14 +1,10 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, ... }:
|
||||||
|
|
||||||
with lib;
|
|
||||||
|
|
||||||
{
|
{
|
||||||
config = {
|
nix = { package = config.lib.test.mkStubPackage { }; };
|
||||||
nix = { package = config.lib.test.mkStubPackage { }; };
|
|
||||||
|
|
||||||
nmt.script = ''
|
nmt.script = ''
|
||||||
assertPathNotExists home-files/.config/nix
|
assertPathNotExists home-files/.config/nix
|
||||||
assertPathNotExists home-files/.nix-defexpr/50-home-manager
|
assertPathNotExists home-files/.nix-defexpr/50-home-manager
|
||||||
'';
|
'';
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,21 +9,19 @@ let
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
in {
|
in {
|
||||||
config = {
|
nix = {
|
||||||
nix = {
|
package = config.lib.test.mkStubPackage {
|
||||||
package = config.lib.test.mkStubPackage {
|
version = lib.getVersion pkgs.nixVersions.stable;
|
||||||
version = lib.getVersion pkgs.nixVersions.stable;
|
|
||||||
};
|
|
||||||
channels.example = exampleChannel;
|
|
||||||
settings.use-xdg-base-directories = true;
|
|
||||||
};
|
};
|
||||||
|
channels.example = exampleChannel;
|
||||||
nmt.script = ''
|
settings.use-xdg-base-directories = true;
|
||||||
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
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
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
|
||||||
|
'';
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,18 +9,16 @@ let
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
in {
|
in {
|
||||||
config = {
|
nix = {
|
||||||
nix = {
|
package = config.lib.test.mkStubPackage { };
|
||||||
package = config.lib.test.mkStubPackage { };
|
channels.example = exampleChannel;
|
||||||
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
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
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
|
||||||
|
'';
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,25 +1,21 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ ... }:
|
||||||
|
|
||||||
with lib;
|
|
||||||
|
|
||||||
{
|
{
|
||||||
config = {
|
nix = {
|
||||||
nix = {
|
registry = {
|
||||||
registry = {
|
nixpkgs = {
|
||||||
nixpkgs = {
|
to = {
|
||||||
to = {
|
type = "github";
|
||||||
type = "github";
|
owner = "my-org";
|
||||||
owner = "my-org";
|
repo = "my-nixpkgs";
|
||||||
repo = "my-nixpkgs";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
nmt.script = ''
|
|
||||||
assertFileContent \
|
|
||||||
home-files/.config/nix/registry.json \
|
|
||||||
${./example-registry-expected.json}
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
nmt.script = ''
|
||||||
|
assertFileContent \
|
||||||
|
home-files/.config/nix/registry.json \
|
||||||
|
${./example-registry-expected.json}
|
||||||
|
'';
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,38 +1,34 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
with lib;
|
|
||||||
|
|
||||||
{
|
{
|
||||||
config = {
|
nix = {
|
||||||
nix = {
|
package = config.lib.test.mkStubPackage {
|
||||||
package = config.lib.test.mkStubPackage {
|
version = lib.getVersion pkgs.nixVersions.stable;
|
||||||
version = lib.getVersion pkgs.nixVersions.stable;
|
buildScript = ''
|
||||||
buildScript = ''
|
target=$out/bin/nix
|
||||||
target=$out/bin/nix
|
mkdir -p "$(dirname "$target")"
|
||||||
mkdir -p "$(dirname "$target")"
|
|
||||||
|
|
||||||
echo -n "true" > "$target"
|
echo -n "true" > "$target"
|
||||||
|
|
||||||
chmod +x "$target"
|
chmod +x "$target"
|
||||||
'';
|
'';
|
||||||
};
|
|
||||||
|
|
||||||
nixPath = [ "/a" "/b/c" ];
|
|
||||||
|
|
||||||
settings = {
|
|
||||||
use-sandbox = true;
|
|
||||||
show-trace = true;
|
|
||||||
system-features = [ "big-parallel" "kvm" "recursive-nix" ];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
nmt.script = ''
|
nixPath = [ "/a" "/b/c" ];
|
||||||
assertFileContent \
|
|
||||||
home-files/.config/nix/nix.conf \
|
|
||||||
${./example-settings-expected.conf}
|
|
||||||
|
|
||||||
assertFileContains home-path/etc/profile.d/hm-session-vars.sh \
|
settings = {
|
||||||
'export NIX_PATH="/a:/b/c''${NIX_PATH:+:$NIX_PATH}"'
|
use-sandbox = true;
|
||||||
'';
|
show-trace = true;
|
||||||
|
system-features = [ "big-parallel" "kvm" "recursive-nix" ];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
nmt.script = ''
|
||||||
|
assertFileContent \
|
||||||
|
home-files/.config/nix/nix.conf \
|
||||||
|
${./example-settings-expected.conf}
|
||||||
|
|
||||||
|
assertFileContains home-path/etc/profile.d/hm-session-vars.sh \
|
||||||
|
'export NIX_PATH="/a:/b/c''${NIX_PATH:+:$NIX_PATH}"'
|
||||||
|
'';
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,16 +1,14 @@
|
||||||
{ config, ... }:
|
{ config, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
config = {
|
nix = {
|
||||||
nix = {
|
package = config.lib.test.mkStubPackage { };
|
||||||
package = config.lib.test.mkStubPackage { };
|
nixPath = [ "/a" "/b/c" ];
|
||||||
nixPath = [ "/a" "/b/c" ];
|
keepOldNixPath = false;
|
||||||
keepOldNixPath = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
nmt.script = ''
|
|
||||||
assertFileContains home-path/etc/profile.d/hm-session-vars.sh \
|
|
||||||
'export NIX_PATH="/a:/b/c"'
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
nmt.script = ''
|
||||||
|
assertFileContains home-path/etc/profile.d/hm-session-vars.sh \
|
||||||
|
'export NIX_PATH="/a:/b/c"'
|
||||||
|
'';
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,12 +1,10 @@
|
||||||
{
|
{
|
||||||
config = {
|
qt.enable = true;
|
||||||
qt.enable = true;
|
|
||||||
|
|
||||||
nmt.script = ''
|
nmt.script = ''
|
||||||
assertFileRegex home-path/etc/profile.d/hm-session-vars.sh \
|
assertFileRegex home-path/etc/profile.d/hm-session-vars.sh \
|
||||||
'QT_PLUGIN_PATH'
|
'QT_PLUGIN_PATH'
|
||||||
assertFileRegex home-path/etc/profile.d/hm-session-vars.sh \
|
assertFileRegex home-path/etc/profile.d/hm-session-vars.sh \
|
||||||
'QML2_IMPORT_PATH'
|
'QML2_IMPORT_PATH'
|
||||||
'';
|
'';
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,27 +1,30 @@
|
||||||
{
|
{
|
||||||
config = {
|
qt = {
|
||||||
qt = {
|
enable = true;
|
||||||
enable = true;
|
# Check if still backwards compatible
|
||||||
# Check if still backwards compatible
|
platformTheme = "gnome";
|
||||||
platformTheme = "gnome";
|
style.name = "adwaita";
|
||||||
style.name = "adwaita";
|
|
||||||
};
|
|
||||||
|
|
||||||
test.stubs.qgnomeplatform = { };
|
|
||||||
|
|
||||||
nmt.script = ''
|
|
||||||
assertFileRegex home-path/etc/profile.d/hm-session-vars.sh \
|
|
||||||
'QT_QPA_PLATFORMTHEME="gnome"'
|
|
||||||
assertFileRegex home-path/etc/profile.d/hm-session-vars.sh \
|
|
||||||
'QT_STYLE_OVERRIDE="adwaita"'
|
|
||||||
assertFileRegex home-path/etc/profile.d/hm-session-vars.sh \
|
|
||||||
'QT_PLUGIN_PATH'
|
|
||||||
assertFileRegex home-path/etc/profile.d/hm-session-vars.sh \
|
|
||||||
'QML2_IMPORT_PATH'
|
|
||||||
'';
|
|
||||||
test.asserts.warnings.expected = [
|
|
||||||
"The option `qt.platformTheme` has been renamed to `qt.platformTheme.name`."
|
|
||||||
"The value `gnome` for option `qt.platformTheme` is deprecated. Use `adwaita` instead."
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
test.stubs = {
|
||||||
|
qgnomeplatform = { };
|
||||||
|
qgnomeplatform-qt6 = { };
|
||||||
|
adwaita-qt = { };
|
||||||
|
adwaita-qt6 = { };
|
||||||
|
};
|
||||||
|
|
||||||
|
nmt.script = ''
|
||||||
|
assertFileRegex home-path/etc/profile.d/hm-session-vars.sh \
|
||||||
|
'QT_QPA_PLATFORMTHEME="gnome"'
|
||||||
|
assertFileRegex home-path/etc/profile.d/hm-session-vars.sh \
|
||||||
|
'QT_STYLE_OVERRIDE="adwaita"'
|
||||||
|
assertFileRegex home-path/etc/profile.d/hm-session-vars.sh \
|
||||||
|
'QT_PLUGIN_PATH'
|
||||||
|
assertFileRegex home-path/etc/profile.d/hm-session-vars.sh \
|
||||||
|
'QML2_IMPORT_PATH'
|
||||||
|
'';
|
||||||
|
test.asserts.warnings.expected = [
|
||||||
|
"The option `qt.platformTheme` has been renamed to `qt.platformTheme.name`."
|
||||||
|
"The value `gnome` for option `qt.platformTheme` is deprecated. Use `adwaita` instead."
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,18 +1,31 @@
|
||||||
{
|
{
|
||||||
config = {
|
imports = [ ../../i18n/input-method/fcitx5-stubs.nix ];
|
||||||
qt = {
|
|
||||||
enable = true;
|
|
||||||
platformTheme.name = "gtk";
|
|
||||||
};
|
|
||||||
i18n.inputMethod.enabled = "fcitx5";
|
|
||||||
|
|
||||||
nmt.script = ''
|
qt = {
|
||||||
assertFileRegex home-path/etc/profile.d/hm-session-vars.sh \
|
enable = true;
|
||||||
'QT_QPA_PLATFORMTHEME="gtk2"'
|
platformTheme.name = "gtk";
|
||||||
assertFileRegex home-path/etc/profile.d/hm-session-vars.sh \
|
|
||||||
'QT_PLUGIN_PATH'
|
|
||||||
assertFileRegex home-path/etc/profile.d/hm-session-vars.sh \
|
|
||||||
'QML2_IMPORT_PATH'
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
i18n.inputMethod.enabled = "fcitx5";
|
||||||
|
|
||||||
|
nixpkgs.overlays = [
|
||||||
|
(final: prev: {
|
||||||
|
libsForQt5 = prev.libsForQt5.overrideScope (qt5final: qt5prev: {
|
||||||
|
qtstyleplugins = prev.mkStubPackage { outPath = null; };
|
||||||
|
});
|
||||||
|
|
||||||
|
qt6Packages = prev.qt6Packages.overrideScope (qt6final: qt6prev: {
|
||||||
|
qt6gtk2 = prev.mkStubPackage { outPath = null; };
|
||||||
|
});
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
|
nmt.script = ''
|
||||||
|
assertFileRegex home-path/etc/profile.d/hm-session-vars.sh \
|
||||||
|
'QT_QPA_PLATFORMTHEME="gtk2"'
|
||||||
|
assertFileRegex home-path/etc/profile.d/hm-session-vars.sh \
|
||||||
|
'QT_PLUGIN_PATH'
|
||||||
|
assertFileRegex home-path/etc/profile.d/hm-session-vars.sh \
|
||||||
|
'QML2_IMPORT_PATH'
|
||||||
|
'';
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,17 +1,15 @@
|
||||||
{
|
{
|
||||||
config = {
|
qt = {
|
||||||
qt = {
|
enable = true;
|
||||||
enable = true;
|
platformTheme.name = "gtk3";
|
||||||
platformTheme.name = "gtk3";
|
|
||||||
};
|
|
||||||
|
|
||||||
nmt.script = ''
|
|
||||||
assertFileRegex home-path/etc/profile.d/hm-session-vars.sh \
|
|
||||||
'QT_QPA_PLATFORMTHEME="gtk3"'
|
|
||||||
assertFileRegex home-path/etc/profile.d/hm-session-vars.sh \
|
|
||||||
'QT_PLUGIN_PATH'
|
|
||||||
assertFileRegex home-path/etc/profile.d/hm-session-vars.sh \
|
|
||||||
'QML2_IMPORT_PATH'
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
nmt.script = ''
|
||||||
|
assertFileRegex home-path/etc/profile.d/hm-session-vars.sh \
|
||||||
|
'QT_QPA_PLATFORMTHEME="gtk3"'
|
||||||
|
assertFileRegex home-path/etc/profile.d/hm-session-vars.sh \
|
||||||
|
'QT_PLUGIN_PATH'
|
||||||
|
assertFileRegex home-path/etc/profile.d/hm-session-vars.sh \
|
||||||
|
'QML2_IMPORT_PATH'
|
||||||
|
'';
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,6 +7,8 @@
|
||||||
extraConfig = "test";
|
extraConfig = "test";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
test.stubs.cmus = { };
|
||||||
|
|
||||||
nmt.script = ''
|
nmt.script = ''
|
||||||
assertFileContent \
|
assertFileContent \
|
||||||
home-files/.config/cmus/rc \
|
home-files/.config/cmus/rc \
|
||||||
|
|
5
tests/modules/programs/kubecolor/default.nix
Normal file
5
tests/modules/programs/kubecolor/default.nix
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
kubecolor-empty-config = ./empty-config.nix;
|
||||||
|
kubecolor-example-config-default-paths = ./example-config-default-paths.nix;
|
||||||
|
kubecolor-example-config-xdg-paths = ./example-config-xdg-paths.nix;
|
||||||
|
}
|
20
tests/modules/programs/kubecolor/empty-config.nix
Normal file
20
tests/modules/programs/kubecolor/empty-config.nix
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
{ pkgs, config, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
configDir =
|
||||||
|
if pkgs.stdenv.isDarwin then "Library/Application Support" else ".config";
|
||||||
|
in {
|
||||||
|
programs.kubecolor = {
|
||||||
|
enable = true;
|
||||||
|
package = config.lib.test.mkStubPackage {
|
||||||
|
name = "kubecolor";
|
||||||
|
version = "0.4.0";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
test.stubs.kubecolor = { };
|
||||||
|
|
||||||
|
nmt.script = ''
|
||||||
|
assertPathNotExists 'home-files/${configDir}/kube/color.yaml'
|
||||||
|
'';
|
||||||
|
}
|
|
@ -0,0 +1,37 @@
|
||||||
|
{ pkgs, config, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
configDir = if pkgs.stdenv.isDarwin then
|
||||||
|
"Library/Application Support/kube"
|
||||||
|
else
|
||||||
|
".kube";
|
||||||
|
in {
|
||||||
|
programs.kubecolor = {
|
||||||
|
enable = true;
|
||||||
|
package = config.lib.test.mkStubPackage {
|
||||||
|
name = "kubecolor";
|
||||||
|
version = "0.4.0";
|
||||||
|
};
|
||||||
|
settings = {
|
||||||
|
kubectl = "kubectl";
|
||||||
|
preset = "dark";
|
||||||
|
objFreshThreshold = 0;
|
||||||
|
paging = "auto";
|
||||||
|
pager = "less";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
nmt.script = ''
|
||||||
|
assertFileExists 'home-files/${configDir}/color.yaml'
|
||||||
|
assertFileContent 'home-files/${configDir}/color.yaml' \
|
||||||
|
${
|
||||||
|
builtins.toFile "expected.yaml" ''
|
||||||
|
kubectl: kubectl
|
||||||
|
objFreshThreshold: 0
|
||||||
|
pager: less
|
||||||
|
paging: auto
|
||||||
|
preset: dark
|
||||||
|
''
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
}
|
|
@ -0,0 +1,36 @@
|
||||||
|
{ config, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
xdg.enable = true;
|
||||||
|
home.preferXdgDirectories = true;
|
||||||
|
|
||||||
|
programs.kubecolor = {
|
||||||
|
enable = true;
|
||||||
|
package = config.lib.test.mkStubPackage {
|
||||||
|
name = "kubecolor";
|
||||||
|
version = "0.4.0";
|
||||||
|
};
|
||||||
|
settings = {
|
||||||
|
kubectl = "kubectl";
|
||||||
|
preset = "dark";
|
||||||
|
objFreshThreshold = 0;
|
||||||
|
paging = "auto";
|
||||||
|
pager = "less";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
nmt.script = ''
|
||||||
|
assertFileExists 'home-files/.config/kube/color.yaml'
|
||||||
|
assertFileContent 'home-files/.config/kube/color.yaml' \
|
||||||
|
${
|
||||||
|
builtins.toFile "expected.yaml" ''
|
||||||
|
kubectl: kubectl
|
||||||
|
objFreshThreshold: 0
|
||||||
|
pager: less
|
||||||
|
paging: auto
|
||||||
|
preset: dark
|
||||||
|
''
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
|
1
tests/modules/programs/nix-your-shell/default.nix
Normal file
1
tests/modules/programs/nix-your-shell/default.nix
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{ nix-your-shell-enable-shells = ./enable-shells.nix; }
|
48
tests/modules/programs/nix-your-shell/enable-shells.nix
Normal file
48
tests/modules/programs/nix-your-shell/enable-shells.nix
Normal file
|
@ -0,0 +1,48 @@
|
||||||
|
{ pkgs, config, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
programs = {
|
||||||
|
nix-your-shell = {
|
||||||
|
enable = true;
|
||||||
|
enableFishIntegration = true;
|
||||||
|
enableNushellIntegration = true;
|
||||||
|
enableZshIntegration = true;
|
||||||
|
};
|
||||||
|
fish.enable = true;
|
||||||
|
nushell.enable = true;
|
||||||
|
zsh.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
test.stubs = {
|
||||||
|
nix-your-shell = { };
|
||||||
|
nushell = { };
|
||||||
|
zsh = { };
|
||||||
|
};
|
||||||
|
|
||||||
|
nmt.script = let
|
||||||
|
nushellConfigDir = if pkgs.stdenv.isDarwin && !config.xdg.enable then
|
||||||
|
"home-files/Library/Application Support/nushell"
|
||||||
|
else
|
||||||
|
"home-files/.config/nushell";
|
||||||
|
in ''
|
||||||
|
assertFileExists home-files/.config/fish/config.fish
|
||||||
|
assertFileContains \
|
||||||
|
home-files/.config/fish/config.fish \
|
||||||
|
'@nix-your-shell@/bin/nix-your-shell fish | source'
|
||||||
|
|
||||||
|
assertFileExists ${nushellConfigDir}/config.nu
|
||||||
|
assertFileContains \
|
||||||
|
${nushellConfigDir}/config.nu \
|
||||||
|
'source ${config.xdg.cacheHome}/nix-your-shell/init.nu'
|
||||||
|
|
||||||
|
assertFileExists ${nushellConfigDir}/env.nu
|
||||||
|
assertFileContains \
|
||||||
|
${nushellConfigDir}/env.nu \
|
||||||
|
'@nix-your-shell@/bin/nix-your-shell nu | save --force ${config.xdg.cacheHome}/nix-your-shell/init.nu'
|
||||||
|
|
||||||
|
assertFileExists home-files/.zshrc
|
||||||
|
assertFileContains \
|
||||||
|
home-files/.zshrc \
|
||||||
|
'@nix-your-shell@/bin/nix-your-shell zsh | source /dev/stdin'
|
||||||
|
'';
|
||||||
|
}
|
|
@ -2,4 +2,6 @@
|
||||||
starship-settings = ./settings.nix;
|
starship-settings = ./settings.nix;
|
||||||
starship-fish-with-transience = ./fish_with_transience.nix;
|
starship-fish-with-transience = ./fish_with_transience.nix;
|
||||||
starship-fish-without-transience = ./fish_without_transience.nix;
|
starship-fish-without-transience = ./fish_without_transience.nix;
|
||||||
|
starship-fish-with-interactive = ./fish_with_interactive.nix;
|
||||||
|
starship-fish-without-interactive = ./fish_without_interactive.nix;
|
||||||
}
|
}
|
||||||
|
|
27
tests/modules/programs/starship/fish_with_interactive.nix
Normal file
27
tests/modules/programs/starship/fish_with_interactive.nix
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
{
|
||||||
|
config = {
|
||||||
|
programs = {
|
||||||
|
fish.enable = true;
|
||||||
|
starship.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
nmt.script = ''
|
||||||
|
assertFileExists home-files/.config/fish/config.fish
|
||||||
|
|
||||||
|
export GOT="$(tail -n 5 `_abs home-files/.config/fish/config.fish`)"
|
||||||
|
export NOT_EXPECTED="
|
||||||
|
if test \"\$TERM\" != dumb
|
||||||
|
/home/hm-user/.nix-profile/bin/starship init fish | source
|
||||||
|
|
||||||
|
end"
|
||||||
|
|
||||||
|
if [[ "$GOT" == "$NOT_EXPECTED" ]]; then
|
||||||
|
fail "Expected starship init to be inside the 'is-interactive' block but it wasn't."
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
43
tests/modules/programs/starship/fish_without_interactive.nix
Normal file
43
tests/modules/programs/starship/fish_without_interactive.nix
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
{
|
||||||
|
config = {
|
||||||
|
programs = {
|
||||||
|
fish.enable = true;
|
||||||
|
|
||||||
|
starship = {
|
||||||
|
enable = true;
|
||||||
|
enableInteractive = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
nmt.script = ''
|
||||||
|
assertFileExists home-files/.config/fish/config.fish
|
||||||
|
|
||||||
|
export GOT="$(tail -n 5 `_abs home-files/.config/fish/config.fish`)"
|
||||||
|
export EXPECTED="
|
||||||
|
if test \"\$TERM\" != dumb
|
||||||
|
/home/hm-user/.nix-profile/bin/starship init fish | source
|
||||||
|
|
||||||
|
end"
|
||||||
|
|
||||||
|
export MESSAGE="
|
||||||
|
==========
|
||||||
|
Expected
|
||||||
|
==========
|
||||||
|
$EXPECTED
|
||||||
|
==========
|
||||||
|
Got
|
||||||
|
==========
|
||||||
|
$GOT
|
||||||
|
==========
|
||||||
|
"
|
||||||
|
|
||||||
|
if [[ "$GOT" != "$EXPECTED" ]]; then
|
||||||
|
fail "$MESSAGE"
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,8 +1,3 @@
|
||||||
# ============================================= #
|
|
||||||
# Start with defaults from the Sensible plugin #
|
|
||||||
# --------------------------------------------- #
|
|
||||||
run-shell @sensible_rtp@
|
|
||||||
# ============================================= #
|
|
||||||
|
|
||||||
set -g default-terminal "screen"
|
set -g default-terminal "screen"
|
||||||
set -g base-index 0
|
set -g base-index 0
|
||||||
|
@ -24,6 +19,7 @@ set -g mode-keys emacs
|
||||||
|
|
||||||
|
|
||||||
set -g mouse off
|
set -g mouse off
|
||||||
|
set -g focus-events off
|
||||||
setw -g aggressive-resize off
|
setw -g aggressive-resize off
|
||||||
setw -g clock-mode-style 12
|
setw -g clock-mode-style 12
|
||||||
set -s escape-time 500
|
set -s escape-time 500
|
||||||
|
|
|
@ -1,8 +1,3 @@
|
||||||
# ============================================= #
|
|
||||||
# Start with defaults from the Sensible plugin #
|
|
||||||
# --------------------------------------------- #
|
|
||||||
run-shell @sensible_rtp@
|
|
||||||
# ============================================= #
|
|
||||||
|
|
||||||
set -g default-terminal "screen"
|
set -g default-terminal "screen"
|
||||||
set -g base-index 0
|
set -g base-index 0
|
||||||
|
@ -24,6 +19,7 @@ bind-key -N "Kill the current pane" x kill-pane
|
||||||
|
|
||||||
|
|
||||||
set -g mouse off
|
set -g mouse off
|
||||||
|
set -g focus-events off
|
||||||
setw -g aggressive-resize off
|
setw -g aggressive-resize off
|
||||||
setw -g clock-mode-style 12
|
setw -g clock-mode-style 12
|
||||||
set -s escape-time 500
|
set -s escape-time 500
|
||||||
|
|
|
@ -1,8 +1,3 @@
|
||||||
# ============================================= #
|
|
||||||
# Start with defaults from the Sensible plugin #
|
|
||||||
# --------------------------------------------- #
|
|
||||||
run-shell @tmuxplugin_sensible_rtp@
|
|
||||||
# ============================================= #
|
|
||||||
|
|
||||||
set -g default-terminal "screen"
|
set -g default-terminal "screen"
|
||||||
set -g base-index 0
|
set -g base-index 0
|
||||||
|
@ -24,6 +19,7 @@ set -g mode-keys emacs
|
||||||
|
|
||||||
|
|
||||||
set -g mouse off
|
set -g mouse off
|
||||||
|
set -g focus-events off
|
||||||
setw -g aggressive-resize on
|
setw -g aggressive-resize on
|
||||||
setw -g clock-mode-style 24
|
setw -g clock-mode-style 24
|
||||||
set -s escape-time 500
|
set -s escape-time 500
|
||||||
|
|
|
@ -1,8 +1,3 @@
|
||||||
# ============================================= #
|
|
||||||
# Start with defaults from the Sensible plugin #
|
|
||||||
# --------------------------------------------- #
|
|
||||||
run-shell @sensible_rtp@
|
|
||||||
# ============================================= #
|
|
||||||
|
|
||||||
set -g default-terminal "screen"
|
set -g default-terminal "screen"
|
||||||
set -g base-index 0
|
set -g base-index 0
|
||||||
|
@ -22,6 +17,7 @@ set -g mode-keys emacs
|
||||||
|
|
||||||
|
|
||||||
set -g mouse on
|
set -g mouse on
|
||||||
|
set -g focus-events off
|
||||||
setw -g aggressive-resize off
|
setw -g aggressive-resize off
|
||||||
setw -g clock-mode-style 12
|
setw -g clock-mode-style 12
|
||||||
set -s escape-time 500
|
set -s escape-time 500
|
||||||
|
|
|
@ -1,8 +1,3 @@
|
||||||
# ============================================= #
|
|
||||||
# Start with defaults from the Sensible plugin #
|
|
||||||
# --------------------------------------------- #
|
|
||||||
run-shell @sensible_rtp@
|
|
||||||
# ============================================= #
|
|
||||||
|
|
||||||
set -g default-terminal "screen"
|
set -g default-terminal "screen"
|
||||||
set -g base-index 0
|
set -g base-index 0
|
||||||
|
@ -27,6 +22,7 @@ bind -N "Send the prefix key through to the application" \
|
||||||
|
|
||||||
|
|
||||||
set -g mouse off
|
set -g mouse off
|
||||||
|
set -g focus-events off
|
||||||
setw -g aggressive-resize off
|
setw -g aggressive-resize off
|
||||||
setw -g clock-mode-style 12
|
setw -g clock-mode-style 12
|
||||||
set -s escape-time 500
|
set -s escape-time 500
|
||||||
|
|
|
@ -1,8 +1,3 @@
|
||||||
# ============================================= #
|
|
||||||
# Start with defaults from the Sensible plugin #
|
|
||||||
# --------------------------------------------- #
|
|
||||||
run-shell @sensible_rtp@
|
|
||||||
# ============================================= #
|
|
||||||
|
|
||||||
set -g default-terminal "screen"
|
set -g default-terminal "screen"
|
||||||
set -g base-index 0
|
set -g base-index 0
|
||||||
|
@ -28,6 +23,7 @@ bind C-a last-window
|
||||||
|
|
||||||
|
|
||||||
set -g mouse off
|
set -g mouse off
|
||||||
|
set -g focus-events off
|
||||||
setw -g aggressive-resize off
|
setw -g aggressive-resize off
|
||||||
setw -g clock-mode-style 12
|
setw -g clock-mode-style 12
|
||||||
set -s escape-time 500
|
set -s escape-time 500
|
||||||
|
|
|
@ -1,8 +1,3 @@
|
||||||
# ============================================= #
|
|
||||||
# Start with defaults from the Sensible plugin #
|
|
||||||
# --------------------------------------------- #
|
|
||||||
run-shell @sensible_rtp@
|
|
||||||
# ============================================= #
|
|
||||||
|
|
||||||
set -g default-terminal "screen"
|
set -g default-terminal "screen"
|
||||||
set -g base-index 0
|
set -g base-index 0
|
||||||
|
@ -24,6 +19,7 @@ set -g mode-keys vi
|
||||||
|
|
||||||
|
|
||||||
set -g mouse off
|
set -g mouse off
|
||||||
|
set -g focus-events off
|
||||||
setw -g aggressive-resize on
|
setw -g aggressive-resize on
|
||||||
setw -g clock-mode-style 24
|
setw -g clock-mode-style 24
|
||||||
set -s escape-time 500
|
set -s escape-time 500
|
||||||
|
|
|
@ -1,27 +1,27 @@
|
||||||
[[input.keymap]]
|
[[input.prepend_keymap]]
|
||||||
exec = "close"
|
|
||||||
on = ["<C-q>"]
|
on = ["<C-q>"]
|
||||||
|
run = "close"
|
||||||
|
|
||||||
[[input.keymap]]
|
[[input.prepend_keymap]]
|
||||||
exec = "close --submit"
|
|
||||||
on = ["<Enter>"]
|
on = ["<Enter>"]
|
||||||
|
run = "close --submit"
|
||||||
|
|
||||||
[[input.keymap]]
|
[[input.prepend_keymap]]
|
||||||
exec = "escape"
|
|
||||||
on = ["<Esc>"]
|
on = ["<Esc>"]
|
||||||
|
run = "escape"
|
||||||
|
|
||||||
[[input.keymap]]
|
[[input.prepend_keymap]]
|
||||||
exec = "backspace"
|
|
||||||
on = ["<Backspace>"]
|
on = ["<Backspace>"]
|
||||||
|
run = "backspace"
|
||||||
|
|
||||||
[[manager.keymap]]
|
[[manager.prepend_keymap]]
|
||||||
exec = "escape"
|
|
||||||
on = ["<Esc>"]
|
on = ["<Esc>"]
|
||||||
|
run = "escape"
|
||||||
|
|
||||||
[[manager.keymap]]
|
[[manager.prepend_keymap]]
|
||||||
exec = "quit"
|
|
||||||
on = ["q"]
|
on = ["q"]
|
||||||
|
run = "quit"
|
||||||
|
|
||||||
[[manager.keymap]]
|
[[manager.prepend_keymap]]
|
||||||
exec = "close"
|
|
||||||
on = ["<C-q>"]
|
on = ["<C-q>"]
|
||||||
|
run = "close"
|
||||||
|
|
|
@ -5,35 +5,35 @@
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
keymap = {
|
keymap = {
|
||||||
input.keymap = [
|
input.prepend_keymap = [
|
||||||
{
|
{
|
||||||
exec = "close";
|
run = "close";
|
||||||
on = [ "<C-q>" ];
|
on = [ "<C-q>" ];
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
exec = "close --submit";
|
run = "close --submit";
|
||||||
on = [ "<Enter>" ];
|
on = [ "<Enter>" ];
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
exec = "escape";
|
run = "escape";
|
||||||
on = [ "<Esc>" ];
|
on = [ "<Esc>" ];
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
exec = "backspace";
|
run = "backspace";
|
||||||
on = [ "<Backspace>" ];
|
on = [ "<Backspace>" ];
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
manager.keymap = [
|
manager.prepend_keymap = [
|
||||||
{
|
{
|
||||||
exec = "escape";
|
run = "escape";
|
||||||
on = [ "<Esc>" ];
|
on = [ "<Esc>" ];
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
exec = "quit";
|
run = "quit";
|
||||||
on = [ "q" ];
|
on = [ "q" ];
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
exec = "close";
|
run = "close";
|
||||||
on = [ "<C-q>" ];
|
on = [ "<C-q>" ];
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
WantedBy=default.target
|
WantedBy=default.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
|
Environment=PATH=
|
||||||
Environment=NOTMUCH_CONFIG=/home/hm-user/.config/notmuch/default/config
|
Environment=NOTMUCH_CONFIG=/home/hm-user/.config/notmuch/default/config
|
||||||
ExecStart=@goimapnotify@/bin/goimapnotify -conf '/nix/store/00000000000000000000000000000000-imapnotify-hm-example.com-config.json'
|
ExecStart=@goimapnotify@/bin/goimapnotify -conf '/nix/store/00000000000000000000000000000000-imapnotify-hm-example.com-config.json'
|
||||||
Restart=always
|
Restart=always
|
||||||
|
|
|
@ -38,11 +38,11 @@ Delegate=yes
|
||||||
Type=notify
|
Type=notify
|
||||||
NotifyAccess=all
|
NotifyAccess=all
|
||||||
SyslogIdentifier=%N
|
SyslogIdentifier=%N
|
||||||
ExecStart=/nix/store/00000000000000000000000000000000-podman/bin/podman run --name=my-container --cidfile=%t/%N.cid --replace --rm --cgroups=split --network=mynet --network-alias test-alias-1 --network-alias test-alias-2 --sdnotify=conmon -d --device=/dev/null:/dev/null --entrypoint=/sleep.sh --read-only-tmpfs -v /tmp:/tmp --label io.containers.autoupdate=registry --publish 8080:80 --env VAL_A=A --env VAL_B=2 --env VAL_C=false --label nix.home-manager.managed=true --security-opt=no-new-privileges docker.io/alpine:latest
|
ExecStart=/nix/store/00000000000000000000000000000000-podman/bin/podman run --name my-container --cidfile=%t/%N.cid --replace --rm --cgroups=split --entrypoint /sleep.sh --network-alias test-alias-1 --network-alias test-alias-2 --read-only-tmpfs --network mynet --sdnotify=conmon -d --device /dev/null:/dev/null -v /tmp:/tmp --label io.containers.autoupdate=registry --publish 8080:80 --env VAL_A=A --env VAL_B=2 --env VAL_C=false --label nix.home-manager.managed=true --security-opt=no-new-privileges docker.io/alpine:latest
|
||||||
|
|
||||||
[Unit]
|
[Unit]
|
||||||
Wants=network-online.target
|
Wants=podman-user-wait-network-online.service
|
||||||
After=network-online.target
|
After=podman-user-wait-network-online.service
|
||||||
After=network.target
|
After=network.target
|
||||||
Before=fake.target
|
Before=fake.target
|
||||||
Description=home-manager test
|
Description=home-manager test
|
||||||
|
|
|
@ -28,11 +28,11 @@ Delegate=yes
|
||||||
Type=notify
|
Type=notify
|
||||||
NotifyAccess=all
|
NotifyAccess=all
|
||||||
SyslogIdentifier=%N
|
SyslogIdentifier=%N
|
||||||
ExecStart=/nix/store/00000000000000000000000000000000-podman/bin/podman run --name=my-container --cidfile=%t/%N.cid --replace --rm --cgroups=split --network=my-net --network=externalnet --sdnotify=conmon -d --label nix.home-manager.managed=true docker.io/alpine:latest
|
ExecStart=/nix/store/00000000000000000000000000000000-podman/bin/podman run --name my-container --cidfile=%t/%N.cid --replace --rm --cgroups=split --network my-net --network externalnet --sdnotify=conmon -d --label nix.home-manager.managed=true docker.io/alpine:latest
|
||||||
|
|
||||||
[Unit]
|
[Unit]
|
||||||
Wants=network-online.target
|
Wants=podman-user-wait-network-online.service
|
||||||
After=network-online.target
|
After=podman-user-wait-network-online.service
|
||||||
After=network.target
|
After=network.target
|
||||||
After=podman-my-net-network.service
|
After=podman-my-net-network.service
|
||||||
Description=Service for container my-container
|
Description=Service for container my-container
|
||||||
|
|
|
@ -19,11 +19,14 @@ Environment=PATH=/run/wrappers/bin:/usr/bin:/bin:/usr/sbin:/sbin:/nix/store/0000
|
||||||
ExecStartPre=/nix/store/00000000000000000000000000000000-await-podman-unshare
|
ExecStartPre=/nix/store/00000000000000000000000000000000-await-podman-unshare
|
||||||
RemainAfterExit=yes
|
RemainAfterExit=yes
|
||||||
TimeoutStartSec=15
|
TimeoutStartSec=15
|
||||||
ExecStart=/nix/store/00000000000000000000000000000000-podman/bin/podman network create --ignore --subnet=192.168.123.0/24 --gateway=192.168.123.1 --label nix.home-manager.managed=true my-net
|
ExecStart=/nix/store/00000000000000000000000000000000-podman/bin/podman network create --ignore --subnet 192.168.123.0/24 --gateway 192.168.123.1 --label nix.home-manager.managed=true my-net
|
||||||
Type=oneshot
|
|
||||||
SyslogIdentifier=%N
|
SyslogIdentifier=%N
|
||||||
|
Type=oneshot
|
||||||
|
|
||||||
[Unit]
|
[Unit]
|
||||||
|
Wants=podman-user-wait-network-online.service
|
||||||
|
After=podman-user-wait-network-online.service
|
||||||
After=network.target
|
After=network.target
|
||||||
Description=Service for network my-net
|
Description=Service for network my-net
|
||||||
|
SourcePath=/nix/store/00000000000000000000000000000000-home-network-podman-my-net/quadlets/podman-my-net.network
|
||||||
RequiresMountsFor=%t/containers
|
RequiresMountsFor=%t/containers
|
||||||
|
|
|
@ -23,11 +23,14 @@ Environment=PATH=/run/wrappers/bin:/usr/bin:/bin:/usr/sbin:/sbin:/nix/store/0000
|
||||||
ExecStartPre=/nix/store/00000000000000000000000000000000-await-podman-unshare
|
ExecStartPre=/nix/store/00000000000000000000000000000000-await-podman-unshare
|
||||||
RemainAfterExit=yes
|
RemainAfterExit=yes
|
||||||
TimeoutStartSec=15
|
TimeoutStartSec=15
|
||||||
ExecStart=/nix/store/00000000000000000000000000000000-podman/bin/podman network create --ignore --subnet=192.168.1.0/24 --gateway=192.168.1.1 --opt isolate=true --label nix.home-manager.managed=true --ipam-driver dhcp --dns=192.168.55.1 --log-level=debug my-net
|
ExecStart=/nix/store/00000000000000000000000000000000-podman/bin/podman network create --ignore --subnet 192.168.1.0/24 --gateway 192.168.1.1 --opt isolate=true --label nix.home-manager.managed=true --ipam-driver dhcp --dns=192.168.55.1 --log-level=debug my-net
|
||||||
Type=oneshot
|
|
||||||
SyslogIdentifier=%N
|
SyslogIdentifier=%N
|
||||||
|
Type=oneshot
|
||||||
|
|
||||||
[Unit]
|
[Unit]
|
||||||
|
Wants=podman-user-wait-network-online.service
|
||||||
|
After=podman-user-wait-network-online.service
|
||||||
After=network.target
|
After=network.target
|
||||||
Description=Service for network my-net
|
Description=Service for network my-net
|
||||||
|
SourcePath=/nix/store/00000000000000000000000000000000-home-network-podman-my-net/quadlets/podman-my-net.network
|
||||||
RequiresMountsFor=%t/containers
|
RequiresMountsFor=%t/containers
|
||||||
|
|
|
@ -1,13 +1,9 @@
|
||||||
{ config, lib, ... }:
|
{ ... }:
|
||||||
|
|
||||||
with lib;
|
|
||||||
|
|
||||||
{
|
{
|
||||||
config = {
|
xresources.properties = { };
|
||||||
xresources.properties = { };
|
|
||||||
|
|
||||||
nmt.script = ''
|
nmt.script = ''
|
||||||
assertPathNotExists home-files/.Xresources
|
assertPathNotExists home-files/.Xresources
|
||||||
'';
|
'';
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,22 +1,18 @@
|
||||||
{ config, lib, ... }:
|
{ ... }:
|
||||||
|
|
||||||
with lib;
|
|
||||||
|
|
||||||
{
|
{
|
||||||
config = {
|
xresources = {
|
||||||
xresources = {
|
properties = {
|
||||||
properties = {
|
"Test*string" = "test-string";
|
||||||
"Test*string" = "test-string";
|
"Test*boolean1" = true;
|
||||||
"Test*boolean1" = true;
|
"Test*boolean2" = false;
|
||||||
"Test*boolean2" = false;
|
"Test*int" = 10;
|
||||||
"Test*int" = 10;
|
"Test*list" = [ "list-str" true false 10 ];
|
||||||
"Test*list" = [ "list-str" true false 10 ];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
nmt.script = ''
|
|
||||||
assertFileExists home-files/.Xresources
|
|
||||||
assertFileContent home-files/.Xresources ${./xresources-expected.conf}
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
nmt.script = ''
|
||||||
|
assertFileExists home-files/.Xresources
|
||||||
|
assertFileContent home-files/.Xresources ${./xresources-expected.conf}
|
||||||
|
'';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue