Compare commits
47 commits
master
...
release-22
Author | SHA1 | Date | |
---|---|---|---|
b372d7f8d5 | |||
f9edbedaf0 | |||
d6f3ba090e | |||
dd73caf55c | |||
7da74ff66d | |||
83110c2598 | |||
97b452d868 | |||
9154cd519a | |||
68163d27e9 | |||
74e0b590c0 | |||
b0be47978d | |||
07b0b43a92 | |||
86bb69b0b1 | |||
a7d3f51e9e | |||
71c6073ee0 | |||
550809881b | |||
2928097823 | |||
00efa2d4c2 | |||
2cb27c7911 | |||
65c47ced08 | |||
89a8ba0b5b | |||
6b8836ce6c | |||
2d5b55d23d | |||
2bfcc6be42 | |||
d965d248aa | |||
d977182704 | |||
0e8125916b | |||
06fbc3a480 | |||
7eee2b197a | |||
9ad9dfe371 | |||
44ca0df409 | |||
50cee5be70 | |||
3cd5c21b80 | |||
e704ef9ec7 | |||
3c3af4bbff | |||
32c336c767 | |||
6ee09246d9 | |||
3bf287ef12 | |||
c4c5ef1fa8 | |||
e006495c15 | |||
e66194675f | |||
6b71989c0d | |||
6d3912c6db | |||
8f26dec249 | |||
9cbe8a2888 | |||
e891b060e7 | |||
73dbcfbca6 |
7
.github/CODEOWNERS
vendored
7
.github/CODEOWNERS
vendored
|
@ -136,8 +136,8 @@ Makefile @thiagokokada
|
|||
/modules/programs/hexchat.nix @thiagokokada
|
||||
/tests/modules/programs/hexchat @thiagokokada
|
||||
|
||||
/modules/programs/himalaya.nix @ambroisie
|
||||
/tests/modules/programs/himalaya @ambroisie
|
||||
/modules/programs/himalaya.nix @toastal
|
||||
/tests/modules/programs/himalaya @toastal
|
||||
|
||||
/modules/programs/home-manager.nix @rycee
|
||||
|
||||
|
@ -263,6 +263,9 @@ Makefile @thiagokokada
|
|||
/modules/programs/pls.nix @arjan-s
|
||||
/tests/modules/programs/pls @arjan-s
|
||||
|
||||
/modules/programs/polybar.nix @h7x4
|
||||
/tests/modules/programs/polybar @h7x4
|
||||
|
||||
/modules/programs/powerline-go.nix @DamienCassou
|
||||
|
||||
/modules/programs/pubs.nix @loicreynier
|
||||
|
|
3
.github/workflows/github_pages.yml
vendored
3
.github/workflows/github_pages.yml
vendored
|
@ -11,8 +11,9 @@ jobs:
|
|||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: cachix/install-nix-action@v18
|
||||
- uses: cachix/install-nix-action@v21
|
||||
with:
|
||||
install_url: https://releases.nixos.org/nix/nix-2.13.3/install
|
||||
nix_path: nixpkgs=channel:nixos-unstable
|
||||
- uses: cachix/cachix-action@v12
|
||||
with:
|
||||
|
|
5
.github/workflows/test.yml
vendored
5
.github/workflows/test.yml
vendored
|
@ -12,9 +12,10 @@ jobs:
|
|||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: cachix/install-nix-action@v18
|
||||
- uses: cachix/install-nix-action@v21
|
||||
with:
|
||||
nix_path: nixpkgs=channel:nixos-unstable
|
||||
install_url: https://releases.nixos.org/nix/nix-2.13.3/install
|
||||
nix_path: nixpkgs=channel:nixos-22.11
|
||||
- uses: cachix/cachix-action@v12
|
||||
with:
|
||||
name: nix-community
|
||||
|
|
6
.github/workflows/update-flake.yml
vendored
6
.github/workflows/update-flake.yml
vendored
|
@ -12,9 +12,11 @@ jobs:
|
|||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
- name: Install Nix
|
||||
uses: cachix/install-nix-action@v18
|
||||
uses: cachix/install-nix-action@v21
|
||||
with:
|
||||
install_url: https://releases.nixos.org/nix/nix-2.13.3/install
|
||||
- name: Update flake.lock
|
||||
uses: DeterminateSystems/update-flake-lock@v14
|
||||
uses: DeterminateSystems/update-flake-lock@v19
|
||||
with:
|
||||
token: ${{ secrets.GH_TOKEN_FOR_UPDATES }}
|
||||
pr-labels: dependencies
|
||||
|
|
|
@ -42,7 +42,7 @@ will write to your 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 configuration.
|
||||
|
||||
Home Manager targets [NixOS][] unstable and NixOS version 22.05 (the
|
||||
Home Manager targets [NixOS][] unstable and NixOS version 22.11 (the
|
||||
current stable version), it may or may not work on other Linux
|
||||
distributions and NixOS versions.
|
||||
|
||||
|
@ -107,7 +107,7 @@ Home Manager is developed against `nixpkgs-unstable` branch, which
|
|||
often causes it to contain tweaks for changes/packages not yet
|
||||
released in stable NixOS. To avoid breaking users' configurations,
|
||||
Home Manager is released in branches corresponding to NixOS releases
|
||||
(e.g. `release-22.05`). These branches get fixes, but usually not new
|
||||
(e.g. `release-22.11`). These branches get fixes, but usually not new
|
||||
modules. If you need a module to be backported, then feel free to open
|
||||
an issue.
|
||||
|
||||
|
|
|
@ -51,11 +51,11 @@ $ nix-channel --add https://github.com/nix-community/home-manager/archive/master
|
|||
$ nix-channel --update
|
||||
----
|
||||
+
|
||||
and if you follow a Nixpkgs version 22.05 channel you can run
|
||||
and if you follow a Nixpkgs version 22.11 channel you can run
|
||||
+
|
||||
[source,console]
|
||||
----
|
||||
$ nix-channel --add https://github.com/nix-community/home-manager/archive/release-22.05.tar.gz home-manager
|
||||
$ nix-channel --add https://github.com/nix-community/home-manager/archive/release-22.11.tar.gz home-manager
|
||||
$ nix-channel --update
|
||||
----
|
||||
+
|
||||
|
@ -133,11 +133,11 @@ $ sudo nix-channel --add https://github.com/nix-community/home-manager/archive/m
|
|||
$ sudo nix-channel --update
|
||||
----
|
||||
|
||||
and if you follow a Nixpkgs version 22.05 channel, you can run
|
||||
and if you follow a Nixpkgs version 22.11 channel, you can run
|
||||
|
||||
[source,console]
|
||||
----
|
||||
$ sudo nix-channel --add https://github.com/nix-community/home-manager/archive/release-22.05.tar.gz home-manager
|
||||
$ sudo nix-channel --add https://github.com/nix-community/home-manager/archive/release-22.11.tar.gz home-manager
|
||||
$ sudo nix-channel --update
|
||||
----
|
||||
|
||||
|
@ -244,11 +244,11 @@ $ nix-channel --add https://github.com/nix-community/home-manager/archive/master
|
|||
$ nix-channel --update
|
||||
----
|
||||
|
||||
and if you follow a Nixpkgs version 22.05 channel, you can run
|
||||
and if you follow a Nixpkgs version 22.11 channel, you can run
|
||||
|
||||
[source,console]
|
||||
----
|
||||
$ nix-channel --add https://github.com/nix-community/home-manager/archive/release-22.05.tar.gz home-manager
|
||||
$ nix-channel --add https://github.com/nix-community/home-manager/archive/release-22.11.tar.gz home-manager
|
||||
$ nix-channel --update
|
||||
----
|
||||
|
||||
|
@ -303,7 +303,7 @@ can be sourced directly by POSIX.2-like shells such as {bash}[Bash] or
|
|||
[NOTE]
|
||||
====
|
||||
By default user packages will not be ignored in favor of
|
||||
`environment.systemPackages`, but they will be intalled to
|
||||
`environment.systemPackages`, but they will be installed to
|
||||
`/etc/profiles/per-user/$USERNAME` if
|
||||
|
||||
[source,nix]
|
||||
|
|
|
@ -155,6 +155,18 @@
|
|||
--keep-going
|
||||
</arg>
|
||||
|
||||
<arg>
|
||||
<group choice="req">
|
||||
<arg choice="plain">
|
||||
-L
|
||||
</arg>
|
||||
|
||||
<arg choice="plain">
|
||||
--print-build-logs
|
||||
</arg>
|
||||
</group>
|
||||
</arg>
|
||||
|
||||
<arg>
|
||||
--show-trace
|
||||
</arg>
|
||||
|
@ -546,6 +558,22 @@
|
|||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<option>-L</option>
|
||||
</term>
|
||||
<term>
|
||||
<option>--print-build-logs</option>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Passed on to <citerefentry>
|
||||
<refentrytitle>nix build</refentrytitle>
|
||||
</citerefentry>
|
||||
when building from a flake.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<option>--show-trace</option>
|
||||
|
|
|
@ -7,7 +7,7 @@ Home Manager includes a `flake.nix` file for compatibility with {nixos-wiki-flak
|
|||
The support is still experimental and may change in backwards incompatible ways.
|
||||
|
||||
[[sec-flakes-prerequisties]]
|
||||
=== Prerequisties
|
||||
=== Prerequisites
|
||||
|
||||
* Install Nix 2.4 or later, or have it in `nix-shell`.
|
||||
|
||||
|
@ -90,9 +90,9 @@ writing a Home Manager configuration.
|
|||
====
|
||||
* The above example tracks the master branch of Home Manager
|
||||
and nixos-unstable branch of Nixpkgs.
|
||||
If you would like to use the `release-22.05` branch,
|
||||
change the `home-manager` input url to `github:nix-community/home-manager/release-22.05`
|
||||
and `nixpkgs` url to `github:NixOS/nixpkgs/nixos-22.05`.
|
||||
If you would like to use the `release-22.11` branch,
|
||||
change the `home-manager` input url to `github:nix-community/home-manager/release-22.11`
|
||||
and `nixpkgs` url to `github:NixOS/nixpkgs/nixos-22.11`.
|
||||
|
||||
* The Home Manager library is exported by the flake under
|
||||
`lib.hm`.
|
||||
|
@ -200,7 +200,7 @@ is similar to that of NixOS. The `flake.nix` would be:
|
|||
[source,nix]
|
||||
----
|
||||
{
|
||||
description = "NixOS configuration";
|
||||
description = "Darwin configuration";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
|
|
|
@ -52,7 +52,7 @@ A fresh install of Home Manager will generate a minimal `~/.config/nixpkgs/home.
|
|||
# You can update Home Manager without changing this value. See
|
||||
# the Home Manager release notes for a list of state version
|
||||
# changes in each release.
|
||||
home.stateVersion = "22.05";
|
||||
home.stateVersion = "22.11";
|
||||
|
||||
# Let Home Manager install and manage itself.
|
||||
programs.home-manager.enable = true;
|
||||
|
@ -92,7 +92,7 @@ To satisfy the above setup we should elaborate the `home.nix` file as follows:
|
|||
# You can update Home Manager without changing this value. See
|
||||
# the Home Manager release notes for a list of state version
|
||||
# changes in each release.
|
||||
home.stateVersion = "22.05";
|
||||
home.stateVersion = "22.11";
|
||||
|
||||
# Let Home Manager install and manage itself.
|
||||
programs.home-manager.enable = true;
|
||||
|
|
|
@ -293,6 +293,7 @@ _home-manager_completions ()
|
|||
Options=( "-f" "--file" "-b" "-A" "-I" "-h" "--help" "-n" "--dry-run" "-v" \
|
||||
"--verbose" "--cores" "--debug" "--impure" "--keep-failed" \
|
||||
"--keep-going" "-j" "--max-jobs" "--no-substitute" "--no-out-link" \
|
||||
"-L" "--print-build-logs" \
|
||||
"--show-trace" "--substitute" "--builders" "--version" \
|
||||
"--update-input" "--override-input" "--experimental-features" \
|
||||
"--extra-experimental-features" )
|
||||
|
|
|
@ -60,6 +60,7 @@ complete -c home-manager -f -l "keep-going" -d "Keep going in case of failed bui
|
|||
complete -c home-manager -x -s j -l "max-jobs" -d "Max number of build jobs in parallel"
|
||||
complete -c home-manager -x -l "option" -d "Set Nix configuration option"
|
||||
complete -c home-manager -x -l "builders" -d "Remote builders"
|
||||
complete -c home-manager -f -s L -l "print-build-logs" -d "Print full build logs on standard error"
|
||||
complete -c home-manager -f -l "show-trace" -d "Print stack trace of evaluation errors"
|
||||
complete -c home-manager -f -l "substitute"
|
||||
complete -c home-manager -f -l "no-substitute"
|
||||
|
|
|
@ -19,6 +19,7 @@ _arguments \
|
|||
'(-j --max-jobs)'{--max-jobs,-j}'[max jobs]:NUM:()' \
|
||||
'--option[option]:NAME VALUE:()' \
|
||||
'--builders[builders]:SPEC:()' \
|
||||
'(-L --print-build-logs)'{--print-build-logs,-L}'[print build logs]' \
|
||||
'--show-trace[show trace]' \
|
||||
'--override-input[override flake input]:NAME VALUE:()' \
|
||||
'--update-input[update flake input]:NAME:()' \
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{ runCommand, lib, bash, callPackage, coreutils, findutils, gettext, gnused
|
||||
, less, ncurses
|
||||
, less, ncurses, unixtools
|
||||
# used for pkgs.path for nixos-option
|
||||
, pkgs
|
||||
|
||||
|
@ -39,6 +39,7 @@ in runCommand "home-manager" {
|
|||
less
|
||||
ncurses
|
||||
nixos-option
|
||||
unixtools.hostname
|
||||
]
|
||||
}" \
|
||||
--subst-var-by HOME_MANAGER_LIB '${../lib/bash/home-manager.sh}' \
|
||||
|
|
|
@ -106,10 +106,17 @@ function setFlakeAttribute() {
|
|||
local name="${FLAKE_ARG#*#}"
|
||||
;;
|
||||
*)
|
||||
local name="$USER@$(hostname)"
|
||||
if [ "$(nix eval "$flake#homeConfigurations" --apply "x: x ? \"$name\"")" = "false" ]; then
|
||||
name="$USER"
|
||||
local name="$USER"
|
||||
# Check both long and short hostnames; long first to preserve
|
||||
# pre-existing behaviour in case both happen to be defined.
|
||||
for n in "$USER@$(hostname)" "$USER@$(hostname -s)"; do
|
||||
if [[ "$(nix eval "$flake#homeConfigurations" --apply "x: x ? \"$n\"")" == "true" ]]; then
|
||||
name="$n"
|
||||
if [[ -v VERBOSE ]]; then
|
||||
echo "Using flake homeConfiguration for $name"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
;;
|
||||
esac
|
||||
export FLAKE_CONFIG_URI="$flake#homeConfigurations.\"$name\""
|
||||
|
@ -282,6 +289,7 @@ function doBuild() {
|
|||
"$FLAKE_CONFIG_URI.activationPackage" \
|
||||
${DRY_RUN+--dry-run} \
|
||||
${NO_OUT_LINK+--no-link} \
|
||||
${PRINT_BUILD_LOGS+--print-build-logs} \
|
||||
|| return
|
||||
else
|
||||
doBuildAttr \
|
||||
|
@ -312,6 +320,7 @@ function doSwitch() {
|
|||
doBuildFlake \
|
||||
"$FLAKE_CONFIG_URI.activationPackage" \
|
||||
--out-link "$generation" \
|
||||
${PRINT_BUILD_LOGS+--print-build-logs} \
|
||||
&& "$generation/activate" || return
|
||||
else
|
||||
doBuildAttr \
|
||||
|
@ -544,6 +553,7 @@ function doHelp() {
|
|||
echo " --keep-going"
|
||||
echo " -j, --max-jobs NUM"
|
||||
echo " --option NAME VALUE"
|
||||
echo " -L, --print-build-logs"
|
||||
echo " --show-trace"
|
||||
echo " --(no-)substitute"
|
||||
echo " --no-out-link Do not create a symlink to the output path"
|
||||
|
@ -641,6 +651,9 @@ while [[ $# -gt 0 ]]; do
|
|||
--no-out-link)
|
||||
NO_OUT_LINK=1
|
||||
;;
|
||||
-L|--print-build-logs)
|
||||
PRINT_BUILD_LOGS=1
|
||||
;;
|
||||
-h|--help)
|
||||
doHelp
|
||||
exit 0
|
||||
|
@ -664,7 +677,7 @@ while [[ $# -gt 0 ]]; do
|
|||
export VERBOSE=1
|
||||
;;
|
||||
--version)
|
||||
echo 22.05
|
||||
echo 22.11
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
|
|
|
@ -54,7 +54,7 @@ in runCommand "home-manager-install" {
|
|||
# You can update Home Manager without changing this value. See
|
||||
# the Home Manager release notes for a list of state version
|
||||
# changes in each release.
|
||||
home.stateVersion = "22.05";
|
||||
home.stateVersion = "22.11";
|
||||
|
||||
# Let Home Manager install and manage itself.
|
||||
programs.home-manager.enable = true;
|
||||
|
|
|
@ -44,6 +44,19 @@ let
|
|||
'';
|
||||
};
|
||||
|
||||
delimiter = mkOption {
|
||||
type = types.str;
|
||||
default = ''
|
||||
--
|
||||
'';
|
||||
example = literalExpression ''
|
||||
~*~*~*~*~*~*~*~*~*~*~*~
|
||||
'';
|
||||
description = ''
|
||||
The delimiter used between the document and the signature.
|
||||
'';
|
||||
};
|
||||
|
||||
command = mkOption {
|
||||
type = with types; nullOr path;
|
||||
default = null;
|
||||
|
|
|
@ -679,7 +679,6 @@ in
|
|||
gnused
|
||||
ncurses # For `tput`.
|
||||
]
|
||||
++ optional (config.nix.enable && config.nix.package != null) config.nix.package
|
||||
++ config.home.extraActivationPath
|
||||
)
|
||||
+ (
|
||||
|
@ -688,7 +687,7 @@ in
|
|||
if config.nix.enable && config.nix.package != null then
|
||||
":${config.nix.package}/bin"
|
||||
else
|
||||
":$(dirname $(readlink -m $(type -p nix-env)))"
|
||||
":$(${pkgs.coreutils}/bin/dirname $(${pkgs.coreutils}/bin/readlink -m $(type -p nix-env)))"
|
||||
)
|
||||
+ optionalString (!cfg.emptyActivationPath) "\${PATH:+:}$PATH";
|
||||
|
||||
|
|
|
@ -39,19 +39,19 @@ with lib;
|
|||
default = null;
|
||||
description = ''
|
||||
This optional key is used as a hint to <literal>launchctl(1)</literal> that it should not submit this job to launchd when
|
||||
loading a job or jobs. The value of this key does NOT reflect the current state of the job on the run-ning running
|
||||
ning system. If you wish to know whether a job is loaded in launchd, reading this key from a configura-tion configuration
|
||||
tion file yourself is not a sufficient test. You should query launchd for the presence of the job using
|
||||
loading a job or jobs. The value of this key does NOT reflect the current state of the job on the running
|
||||
system. If you wish to know whether a job is loaded in launchd, reading this key from a configuration
|
||||
file yourself is not a sufficient test. You should query launchd for the presence of the job using
|
||||
the <literal>launchctl(1)</literal> list subcommand or use the ServiceManagement framework's
|
||||
<literal>SMJobCopyDictionary()</literal> method.
|
||||
|
||||
Note that as of Mac OS X v10.6, this key's value in a configuration file conveys a default value, which
|
||||
is changed with the [-w] option of the <literal>launchctl(1)</literal> load and unload subcommands. These subcommands no
|
||||
longer modify the configuration file, so the value displayed in the configuration file is not necessar-ily necessarily
|
||||
ily the value that <literal>launchctl(1)</literal> will apply. See <literal>launchctl(1)</literal> for more information.
|
||||
longer modify the configuration file, so the value displayed in the configuration file is not necessarily
|
||||
the value that <literal>launchctl(1)</literal> will apply. See <literal>launchctl(1)</literal> for more information.
|
||||
|
||||
Please also be mindful that you should only use this key if the provided on-demand and KeepAlive crite-ria criteria
|
||||
ria are insufficient to describe the conditions under which your job needs to run. The cost to have a
|
||||
Please also be mindful that you should only use this key if the provided on-demand and KeepAlive criteria
|
||||
are insufficient to describe the conditions under which your job needs to run. The cost to have a
|
||||
job loaded in launchd is negligible, so there is no harm in loading a job which only runs once or very
|
||||
rarely.
|
||||
'';
|
||||
|
@ -147,8 +147,7 @@ with lib;
|
|||
type = types.nullOr types.bool;
|
||||
default = null;
|
||||
description = ''
|
||||
This flag causes launchd to use the <literal>glob(3)</literal> mechanism to update the program arguments before invoca-tion. invocation.
|
||||
tion.
|
||||
This flag causes launchd to use the <literal>glob(3)</literal> mechanism to update the program arguments before invocation.
|
||||
'';
|
||||
};
|
||||
|
||||
|
@ -236,12 +235,12 @@ with lib;
|
|||
description = ''
|
||||
This optional key is used to control whether your job is to be kept continuously running or to let
|
||||
demand and conditions control the invocation. The default is false and therefore only demand will start
|
||||
the job. The value may be set to true to unconditionally keep the job alive. Alternatively, a dictio-nary dictionary
|
||||
nary of conditions may be specified to selectively control whether launchd keeps a job alive or not. If
|
||||
the job. The value may be set to true to unconditionally keep the job alive. Alternatively, a dictionary
|
||||
of conditions may be specified to selectively control whether launchd keeps a job alive or not. If
|
||||
multiple keys are provided, launchd ORs them, thus providing maximum flexibility to the job to refine
|
||||
the logic and stall if necessary. If launchd finds no reason to restart the job, it falls back on
|
||||
demand based invocation. Jobs that exit quickly and frequently when configured to be kept alive will
|
||||
be throttled to converve system resources.
|
||||
be throttled to conserve system resources.
|
||||
'';
|
||||
};
|
||||
|
||||
|
@ -677,8 +676,8 @@ with lib;
|
|||
XPC connections. See <literal>xpc_transaction_begin(3)</literal> for details.
|
||||
|
||||
Interactive
|
||||
Interactive jobs run with the same resource limitations as apps, that is to say, none. Interac-tive Interactive
|
||||
tive jobs are critical to maintaining a responsive user experience, and this key should only be
|
||||
Interactive jobs run with the same resource limitations as apps, that is to say, none. Interactive
|
||||
jobs are critical to maintaining a responsive user experience, and this key should only be
|
||||
used if an app's ability to be responsive depends on it, and cannot be made Adaptive.
|
||||
'';
|
||||
};
|
||||
|
@ -687,8 +686,8 @@ with lib;
|
|||
type = types.nullOr types.bool;
|
||||
default = null;
|
||||
description = ''
|
||||
When a job dies, launchd kills any remaining processes with the same process group ID as the job. Set-ting Setting
|
||||
ting this key to true disables that behavior.
|
||||
When a job dies, launchd kills any remaining processes with the same process group ID as the job. Setting
|
||||
this key to true disables that behavior.
|
||||
'';
|
||||
};
|
||||
|
||||
|
@ -753,9 +752,9 @@ with lib;
|
|||
description = ''
|
||||
This optional key is used to specify launch on demand sockets that can be used to let launchd know when
|
||||
to run the job. The job must check-in to get a copy of the file descriptors using APIs outlined in
|
||||
launch(3). The keys of the top level Sockets dictionary can be anything. They are meant for the appli-cation application
|
||||
cation developer to use to differentiate which descriptors correspond to which application level proto-cols protocols
|
||||
cols (e.g. http vs. ftp vs. DNS...). At check-in time, the value of each Sockets dictionary key will
|
||||
launch(3). The keys of the top level Sockets dictionary can be anything. They are meant for the application
|
||||
developer to use to differentiate which descriptors correspond to which application level protocols
|
||||
(e.g. http vs. ftp vs. DNS...). At check-in time, the value of each Sockets dictionary key will
|
||||
be an array of descriptors. Daemon/Agent writers should consider all descriptors of a given key to be
|
||||
to be effectively equivalent, even though each file descriptor likely represents a different networking
|
||||
protocol which conforms to the criteria specified in the job configuration file.
|
||||
|
@ -829,8 +828,8 @@ with lib;
|
|||
default = null;
|
||||
description = ''
|
||||
This optional key is a variant of SockPathName. Instead of binding to a known path, a securely
|
||||
generated socket is created and the path is assigned to the environment variable that is inher-ited inherited
|
||||
ited by all jobs spawned by launchd.
|
||||
generated socket is created and the path is assigned to the environment variable that is inherited
|
||||
by all jobs spawned by launchd.
|
||||
'';
|
||||
};
|
||||
|
||||
|
|
|
@ -345,4 +345,13 @@
|
|||
github = "lukasngl";
|
||||
githubId = 69244516;
|
||||
};
|
||||
toastal = {
|
||||
email = "toastal+nix@posteo.net";
|
||||
matrix = "@toastal:matrix.org";
|
||||
github = "toastal";
|
||||
githubId = 561087;
|
||||
name = "toastal";
|
||||
keys =
|
||||
[{ fingerprint = "7944 74B7 D236 DAB9 C9EF E7F9 5CCE 6F14 66D4 7C9E"; }];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -102,7 +102,7 @@ in {
|
|||
if [[ -v DBUS_SESSION_BUS_ADDRESS ]]; then
|
||||
export DCONF_DBUS_RUN_SESSION=""
|
||||
else
|
||||
export DCONF_DBUS_RUN_SESSION="${pkgs.dbus}/bin/dbus-run-session"
|
||||
export DCONF_DBUS_RUN_SESSION="${pkgs.dbus}/bin/dbus-run-session --dbus-daemon=${pkgs.dbus}/bin/dbus-daemon"
|
||||
fi
|
||||
|
||||
if [[ -v oldGenPath ]]; then
|
||||
|
|
|
@ -843,6 +843,14 @@ in
|
|||
export MOZ_ALLOW_DOWNGRADE=1
|
||||
'';
|
||||
}
|
||||
|
||||
{
|
||||
time = "2022-12-28T16:20:51+00:00";
|
||||
condition = hostPlatform.isLinux;
|
||||
message = ''
|
||||
A new module is available: 'services.cachix-agent'.
|
||||
'';
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -202,7 +202,7 @@ in {
|
|||
<citerefentry>
|
||||
<refentrytitle>nix.conf</refentrytitle>
|
||||
<manvolnum>5</manvolnum>
|
||||
</citerefentry> for avalaible options.
|
||||
</citerefentry> for available options.
|
||||
The value declared here will be translated directly to the key-value pairs Nix expects.
|
||||
</para>
|
||||
<para>
|
||||
|
|
|
@ -41,7 +41,7 @@ with lib;
|
|||
suffix =
|
||||
optionalString (revision != null) "+${substring 0 8 revision}";
|
||||
in "${release}${suffix}";
|
||||
example = "22.05+213a0629";
|
||||
example = "22.11+213a0629";
|
||||
description = "The full Home Manager version.";
|
||||
};
|
||||
|
||||
|
@ -50,7 +50,7 @@ with lib;
|
|||
readOnly = true;
|
||||
type = types.str;
|
||||
default = fileContents ../../.release;
|
||||
example = "22.05";
|
||||
example = "22.11";
|
||||
description = "The Home Manager release.";
|
||||
};
|
||||
|
||||
|
|
|
@ -204,6 +204,7 @@ let
|
|||
./services/betterlockscreen.nix
|
||||
./services/blueman-applet.nix
|
||||
./services/borgmatic.nix
|
||||
./services/cachix-agent.nix
|
||||
./services/caffeine.nix
|
||||
./services/cbatticon.nix
|
||||
./services/clipmenu.nix
|
||||
|
|
|
@ -305,7 +305,7 @@ in {
|
|||
DPI=144
|
||||
;;
|
||||
*)
|
||||
echo "Unknown profle: $AUTORANDR_CURRENT_PROFILE"
|
||||
echo "Unknown profile: $AUTORANDR_CURRENT_PROFILE"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
|
|
|
@ -64,7 +64,7 @@ let
|
|||
id = mkOption {
|
||||
type = strMatching "[a-zA-Z]{32}";
|
||||
description = ''
|
||||
The extension's ID from the Chome Web Store url or the unpacked crx.
|
||||
The extension's ID from the Chrome Web Store url or the unpacked crx.
|
||||
'';
|
||||
default = "";
|
||||
};
|
||||
|
|
|
@ -29,7 +29,7 @@ in {
|
|||
default = { };
|
||||
description = ''
|
||||
Configuration written to
|
||||
<filename>$XDG_CONFIG_HOME/direnv/config.toml</filename>.
|
||||
<filename>$XDG_CONFIG_HOME/direnv/direnv.toml</filename>.
|
||||
</para><para>
|
||||
See
|
||||
<citerefentry>
|
||||
|
@ -92,7 +92,7 @@ in {
|
|||
config = mkIf cfg.enable {
|
||||
home.packages = [ pkgs.direnv ];
|
||||
|
||||
xdg.configFile."direnv/config.toml" = mkIf (cfg.config != { }) {
|
||||
xdg.configFile."direnv/direnv.toml" = mkIf (cfg.config != { }) {
|
||||
source = tomlFormat.generate "direnv-config" cfg.config;
|
||||
};
|
||||
|
||||
|
|
|
@ -52,6 +52,10 @@ in {
|
|||
Configuration to include in the Emacs default init file. See
|
||||
<link xlink:href="https://www.gnu.org/software/emacs/manual/html_node/elisp/Init-File.html"/>
|
||||
for more.
|
||||
</para><para>
|
||||
Note, the <literal>inhibit-startup-message</literal> Emacs option
|
||||
cannot be set here since Emacs disallows setting it from the default
|
||||
initialization file.
|
||||
'';
|
||||
};
|
||||
|
||||
|
|
|
@ -267,7 +267,7 @@ in {
|
|||
difftastic = {
|
||||
enable = mkEnableOption "" // {
|
||||
description = ''
|
||||
Enable the <command>difft</command> syntax highlighter.
|
||||
Enable the <command>difftastic</command> syntax highlighter.
|
||||
See <link xlink:href="https://github.com/Wilfred/difftastic" />.
|
||||
'';
|
||||
};
|
||||
|
@ -278,7 +278,7 @@ in {
|
|||
example = "dark";
|
||||
description = ''
|
||||
Determines whether difftastic should use the lighter or darker colors
|
||||
for syntax highlithing.
|
||||
for syntax highlighting.
|
||||
'';
|
||||
};
|
||||
|
||||
|
@ -340,6 +340,14 @@ in {
|
|||
'';
|
||||
};
|
||||
|
||||
pagerOpts = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [ "--tabs=4" "-RFX" ];
|
||||
description = ''
|
||||
Arguments to be passed to <command>less</command>.
|
||||
'';
|
||||
};
|
||||
|
||||
markEmptyLines = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
|
@ -458,8 +466,8 @@ in {
|
|||
(mkIf (cfg.signing != null) {
|
||||
programs.git.iniContent = {
|
||||
user.signingKey = mkIf (cfg.signing.key != null) cfg.signing.key;
|
||||
commit.gpgSign = cfg.signing.signByDefault;
|
||||
tag.gpgSign = cfg.signing.signByDefault;
|
||||
commit.gpgSign = mkDefault cfg.signing.signByDefault;
|
||||
tag.gpgSign = mkDefault cfg.signing.signByDefault;
|
||||
gpg.program = cfg.signing.gpgPath;
|
||||
};
|
||||
})
|
||||
|
@ -550,7 +558,9 @@ in {
|
|||
programs.git.iniContent =
|
||||
let dsfCommand = "${pkgs.diff-so-fancy}/bin/diff-so-fancy";
|
||||
in {
|
||||
core.pager = "${dsfCommand} | ${pkgs.less}/bin/less --tabs=4 -RFX";
|
||||
core.pager = "${dsfCommand} | ${pkgs.less}/bin/less ${
|
||||
escapeShellArgs cfg.diff-so-fancy.pagerOpts
|
||||
}";
|
||||
interactive.diffFilter = "${dsfCommand} --patch";
|
||||
diff-so-fancy = {
|
||||
markEmptyLines = cfg.diff-so-fancy.markEmptyLines;
|
||||
|
|
|
@ -170,7 +170,7 @@ let
|
|||
servers = mkOption {
|
||||
type = listOf str;
|
||||
default = [ ];
|
||||
example = [ "chat.freenode.net" "irc.freenode.net" ];
|
||||
example = [ "irc.oftc.net" ];
|
||||
description = "IRC Server Address List.";
|
||||
};
|
||||
};
|
||||
|
@ -239,11 +239,10 @@ in {
|
|||
default = { };
|
||||
example = literalExpression ''
|
||||
{
|
||||
freenode = {
|
||||
oftc = {
|
||||
autojoin = [
|
||||
"#home-manager"
|
||||
"#linux"
|
||||
"#nixos"
|
||||
];
|
||||
charset = "UTF-8 (Unicode)";
|
||||
commands = [
|
||||
|
@ -263,8 +262,7 @@ in {
|
|||
password = "my_password";
|
||||
realName = "my_realname";
|
||||
servers = [
|
||||
"chat.freenode.net"
|
||||
"irc.freenode.net"
|
||||
"irc.oftc.net"
|
||||
];
|
||||
userName = "my_username";
|
||||
};
|
||||
|
|
|
@ -11,7 +11,7 @@ let
|
|||
toHimalayaConfig = account:
|
||||
{
|
||||
email = account.address;
|
||||
name = account.realName;
|
||||
display-name = account.realName;
|
||||
default = account.primary;
|
||||
|
||||
mailboxes = {
|
||||
|
@ -20,30 +20,46 @@ let
|
|||
draft = account.folders.drafts;
|
||||
# NOTE: himalaya does not support configuring the name of the trash folder
|
||||
};
|
||||
|
||||
} // (lib.optionalAttrs (account.signature.showSignature == "append") {
|
||||
# FIXME: signature cannot be attached
|
||||
signature = account.signature.text;
|
||||
signature-delim = account.signature.delimiter;
|
||||
}) // (if account.himalaya.backend == null then {
|
||||
backend = "none";
|
||||
} else if account.himalaya.backend == "imap" then {
|
||||
# FIXME: does not support disabling TLS altogether
|
||||
# NOTE: does not accept sequence of strings for password commands
|
||||
backend = account.himalaya.backend;
|
||||
imap-login = account.userName;
|
||||
imap-passwd-cmd = lib.escapeShellArgs account.passwordCommand;
|
||||
imap-host = account.imap.host;
|
||||
imap-port = account.imap.port;
|
||||
imap-starttls = account.imap.tls.useStartTls;
|
||||
|
||||
} else if account.himalaya.backend == "maildir" then {
|
||||
backend = account.himalaya.backend;
|
||||
maildir-root-dir = account.maildirBasePath;
|
||||
} else
|
||||
throw "Unsupported backend: ${account.himalaya.backend}")
|
||||
// (if account.himalaya.sender == null then {
|
||||
sender = "none";
|
||||
} else if account.himalaya.sender == "smtp" then {
|
||||
sender = account.himalaya.sender;
|
||||
smtp-login = account.userName;
|
||||
smtp-passwd-cmd = lib.escapeShellArgs account.passwordCommand;
|
||||
smtp-host = account.smtp.host;
|
||||
smtp-port = account.smtp.port;
|
||||
smtp-starttls = account.smtp.tls.useStartTls;
|
||||
} // (lib.optionalAttrs (account.signature.showSignature == "append") {
|
||||
# FIXME: signature cannot be attached
|
||||
signature = account.signature.text;
|
||||
}) // account.himalaya.settings;
|
||||
} else if account.himalaya.sender == "sendmail" then {
|
||||
sender = account.himalaya.sender;
|
||||
} else
|
||||
throw "Unsupported sender: ${account.himalaya.sender}")
|
||||
// account.himalaya.settings;
|
||||
in {
|
||||
# NOTE: will not start without this configured, but each account overrides it
|
||||
name = "";
|
||||
display-name = "";
|
||||
} // cfg.settings // (lib.mapAttrs (_: toHimalayaConfig) enabledAccounts);
|
||||
in {
|
||||
meta.maintainers = with lib.hm.maintainers; [ ambroisie ];
|
||||
meta.maintainers = with lib.hm.maintainers; [ toastal ];
|
||||
|
||||
options = with lib; {
|
||||
programs.himalaya = {
|
||||
|
@ -63,7 +79,8 @@ in {
|
|||
default = { };
|
||||
example = lib.literalExpression ''
|
||||
{
|
||||
default-page-size = 50;
|
||||
email-listing-page-size = 50;
|
||||
watch-cmds = [ "mbsync -a" ]
|
||||
}
|
||||
'';
|
||||
description = ''
|
||||
|
@ -80,6 +97,22 @@ in {
|
|||
the himalaya mail client for this account
|
||||
'';
|
||||
|
||||
backend = mkOption {
|
||||
# TODO: “notmuch” (requires compile flag for himalaya, libnotmuch)
|
||||
type = types.nullOr (types.enum [ "imap" "maildir" ]);
|
||||
description = ''
|
||||
The method for which <command>himalaya</command> will fetch, store,
|
||||
etc. mail.
|
||||
'';
|
||||
};
|
||||
|
||||
sender = mkOption {
|
||||
type = types.nullOr (types.enum [ "smtp" "sendmail" ]);
|
||||
description = ''
|
||||
The method for which <command>himalaya</command> will send mail.
|
||||
'';
|
||||
};
|
||||
|
||||
settings = mkOption {
|
||||
type = tomlFormat.type;
|
||||
default = { };
|
||||
|
|
|
@ -185,10 +185,10 @@ in {
|
|||
default = { };
|
||||
example = literalExpression ''
|
||||
{
|
||||
freenode = {
|
||||
liberachat = {
|
||||
nick = "hmuser";
|
||||
server = {
|
||||
address = "chat.freenode.net";
|
||||
address = "irc.libera.chat";
|
||||
port = 6697;
|
||||
autoConnect = true;
|
||||
};
|
||||
|
|
|
@ -36,11 +36,6 @@ in {
|
|||
config = mkIf cfg.enable {
|
||||
home.packages = [ cfg.package ];
|
||||
|
||||
home.sessionVariables = {
|
||||
JAVA_HOME = fileContents (pkgs.runCommandLocal "java-home" { } ''
|
||||
source "${cfg.package}/nix-support/setup-hook"
|
||||
echo "$JAVA_HOME" > $out
|
||||
'');
|
||||
};
|
||||
home.sessionVariables.JAVA_HOME = cfg.package.home;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -9,44 +9,14 @@ let
|
|||
in {
|
||||
meta.maintainers = [ hm.maintainers.maximsmol ];
|
||||
|
||||
options.programs.just = {
|
||||
enable = mkEnableOption
|
||||
"just, a handy way to save and run project-specific commands";
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.just;
|
||||
defaultText = literalExpression "pkgs.just";
|
||||
description = "Package providing the <command>just</command> tool.";
|
||||
};
|
||||
|
||||
enableBashIntegration = mkEnableOption "Bash integration" // {
|
||||
default = true;
|
||||
};
|
||||
|
||||
enableZshIntegration = mkEnableOption "Zsh integration" // {
|
||||
default = true;
|
||||
};
|
||||
|
||||
enableFishIntegration = mkEnableOption "Fish integration" // {
|
||||
default = true;
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = [ cfg.package ];
|
||||
|
||||
programs.bash.initExtra = mkIf cfg.enableBashIntegration ''
|
||||
source ${cfg.package}/share/bash-completion/completions/just.bash
|
||||
'';
|
||||
|
||||
programs.zsh.initExtra = mkIf cfg.enableZshIntegration ''
|
||||
source ${cfg.package}/share/zsh/site-functions/_just
|
||||
'';
|
||||
|
||||
programs.fish.shellInit = mkIf cfg.enableFishIntegration ''
|
||||
source ${cfg.package}/share/fish/vendor_completions.d/just.fish
|
||||
'';
|
||||
|
||||
};
|
||||
imports = let
|
||||
msg = ''
|
||||
'program.just' is deprecated, simply add 'pkgs.just' to 'home.packages' instead.
|
||||
See https://github.com/nix-community/home-manager/issues/3449#issuecomment-1329823502'';
|
||||
in [
|
||||
(mkRemovedOptionModule [ "programs" "just" "enable" ] msg)
|
||||
(mkRemovedOptionModule [ "programs" "just" "enableBashIntegration" ] msg)
|
||||
(mkRemovedOptionModule [ "programs" "just" "enableZshIntegration" ] msg)
|
||||
(mkRemovedOptionModule [ "programs" "just" "enableFishIntegration" ] msg)
|
||||
];
|
||||
}
|
||||
|
|
|
@ -240,6 +240,17 @@ in {
|
|||
'';
|
||||
};
|
||||
|
||||
extraLuaConfig = mkOption {
|
||||
type = types.lines;
|
||||
default = "";
|
||||
example = ''
|
||||
vim.opt.nobackup = true
|
||||
'';
|
||||
description = ''
|
||||
Custom lua lines.
|
||||
'';
|
||||
};
|
||||
|
||||
extraPackages = mkOption {
|
||||
type = with types; listOf package;
|
||||
default = [ ];
|
||||
|
@ -373,6 +384,7 @@ in {
|
|||
luaRcContent =
|
||||
lib.optionalString (neovimConfig.neovimRcContent != "")
|
||||
"vim.cmd [[source ${config.xdg.configHome}/nvim/init-home-manager.vim]]"
|
||||
+ config.programs.neovim.extraLuaConfig
|
||||
+ lib.optionalString hasLuaConfig
|
||||
config.programs.neovim.generatedConfigs.lua;
|
||||
in mkIf (luaRcContent != "") { text = luaRcContent; };
|
||||
|
|
|
@ -6,14 +6,17 @@ let
|
|||
|
||||
cfg = config.programs.nushell;
|
||||
|
||||
tomlFormat = pkgs.formats.toml { };
|
||||
|
||||
linesOrSource = name:
|
||||
types.submodule ({ config, ... }: {
|
||||
options = {
|
||||
text = mkOption {
|
||||
type = types.lines;
|
||||
default = "";
|
||||
default = if config.source != null then
|
||||
builtins.readFile config.source
|
||||
else
|
||||
"";
|
||||
defaultText = literalExpression
|
||||
"if source is defined, the content of source, otherwise empty";
|
||||
description = ''
|
||||
Text of the nushell <filename>${name}</filename> file.
|
||||
If unset then the source option will be preferred.
|
||||
|
@ -22,18 +25,14 @@ let
|
|||
|
||||
source = mkOption {
|
||||
type = types.nullOr types.path;
|
||||
default = pkgs.writeTextFile {
|
||||
inherit (config) text;
|
||||
name = hm.strings.storeFileName name;
|
||||
};
|
||||
defaultText = literalExpression "file containing text";
|
||||
default = null;
|
||||
description = ''
|
||||
Path of the nushell <filename>${name}</filename> file to use.
|
||||
If the text option is set, it will be preferred.
|
||||
'';
|
||||
};
|
||||
};
|
||||
});
|
||||
|
||||
in {
|
||||
meta.maintainers = [ maintainers.Philipp-M ];
|
||||
|
||||
|
@ -91,14 +90,40 @@ in {
|
|||
See <link xlink:href="https://www.nushell.sh/book/configuration.html#configuration" /> for more information.
|
||||
'';
|
||||
};
|
||||
|
||||
extraConfig = mkOption {
|
||||
type = types.lines;
|
||||
default = "";
|
||||
description = ''
|
||||
Additional configuration to add to the nushell configuration file.
|
||||
'';
|
||||
};
|
||||
|
||||
extraEnv = mkOption {
|
||||
type = types.lines;
|
||||
default = "";
|
||||
description = ''
|
||||
Additional configuration to add to the nushell environment variables file.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = [ cfg.package ];
|
||||
|
||||
xdg.configFile = mkMerge [
|
||||
(mkIf (cfg.configFile != null) { "nushell/config.nu" = cfg.configFile; })
|
||||
(mkIf (cfg.envFile != null) { "nushell/env.nu" = cfg.envFile; })
|
||||
(mkIf (cfg.configFile != null || cfg.extraConfig != "") {
|
||||
"nushell/config.nu".text = mkMerge [
|
||||
(mkIf (cfg.configFile != null) cfg.configFile.text)
|
||||
cfg.extraConfig
|
||||
];
|
||||
})
|
||||
(mkIf (cfg.envFile != null || cfg.extraEnv != "") {
|
||||
"nushell/env.nu".text = mkMerge [
|
||||
(mkIf (cfg.envFile != null) cfg.envFile.text)
|
||||
cfg.extraEnv
|
||||
];
|
||||
})
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -99,8 +99,9 @@ in {
|
|||
else {
|
||||
General = cfg.settings;
|
||||
});
|
||||
"pet/snippet.toml".source =
|
||||
format.generate "snippet.toml" { snippets = cfg.snippets; };
|
||||
"pet/snippet.toml" = mkIf (cfg.snippets != [ ]) {
|
||||
source = format.generate "snippet.toml" { snippets = cfg.snippets; };
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -58,36 +58,24 @@ in {
|
|||
'';
|
||||
};
|
||||
|
||||
enableBashIntegration = mkOption {
|
||||
enableBashIntegration = mkEnableOption "Bash integration" // {
|
||||
default = true;
|
||||
type = types.bool;
|
||||
description = ''
|
||||
Whether to enable Bash integration.
|
||||
'';
|
||||
};
|
||||
|
||||
enableZshIntegration = mkOption {
|
||||
enableZshIntegration = mkEnableOption "Zsh integration" // {
|
||||
default = true;
|
||||
type = types.bool;
|
||||
description = ''
|
||||
Whether to enable Zsh integration.
|
||||
'';
|
||||
};
|
||||
|
||||
enableFishIntegration = mkOption {
|
||||
enableFishIntegration = mkEnableOption "Fish integration" // {
|
||||
default = true;
|
||||
type = types.bool;
|
||||
description = ''
|
||||
Whether to enable Fish integration.
|
||||
'';
|
||||
};
|
||||
|
||||
enableIonIntegration = mkOption {
|
||||
enableIonIntegration = mkEnableOption "Ion integration" // {
|
||||
default = true;
|
||||
};
|
||||
|
||||
enableNushellIntegration = mkEnableOption "Nushell integration" // {
|
||||
default = true;
|
||||
type = types.bool;
|
||||
description = ''
|
||||
Whether to enable Ion integration.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -121,5 +109,22 @@ in {
|
|||
eval $(${starshipCmd} init ion)
|
||||
end
|
||||
'';
|
||||
|
||||
programs.nushell = mkIf cfg.enableNushellIntegration {
|
||||
# Unfortunately nushell doesn't allow conditionally sourcing nor
|
||||
# conditionally setting (global) environment variables, which is why the
|
||||
# check for terminal compatibility (as seen above for the other shells) is
|
||||
# not done here.
|
||||
extraEnv = ''
|
||||
let starship_cache = "${config.xdg.cacheHome}/starship"
|
||||
if not ($starship_cache | path exists) {
|
||||
mkdir $starship_cache
|
||||
}
|
||||
${starshipCmd} init nu | save --force ${config.xdg.cacheHome}/starship/init.nu
|
||||
'';
|
||||
extraConfig = ''
|
||||
source ${config.xdg.cacheHome}/starship/init.nu
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -29,11 +29,13 @@ in {
|
|||
type = with types; attrsOf (oneOf [ bool int str ]);
|
||||
default = { };
|
||||
example = literalExpression ''
|
||||
{
|
||||
embed-thumbnail = true;
|
||||
embed-subs = true;
|
||||
sub-langs = "all";
|
||||
downloader = "aria2c";
|
||||
downloader-args = "aria2c:'-c -x8 -s8 -k1M'";
|
||||
}
|
||||
'';
|
||||
description = ''
|
||||
Configuration written to
|
||||
|
|
84
modules/services/cachix-agent.nix
Normal file
84
modules/services/cachix-agent.nix
Normal file
|
@ -0,0 +1,84 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
|
||||
cfg = config.services.cachix-agent;
|
||||
|
||||
in {
|
||||
meta.maintainers = [ maintainers.rycee ];
|
||||
|
||||
options.services.cachix-agent = {
|
||||
enable = mkEnableOption ''
|
||||
Cachix Deploy Agent: <link xlink:href="https://docs.cachix.org/deploy/"/>'';
|
||||
|
||||
name = mkOption {
|
||||
type = types.str;
|
||||
description = "The unique agent name.";
|
||||
};
|
||||
|
||||
verbose = mkEnableOption "verbose output";
|
||||
|
||||
profile = mkOption {
|
||||
type = types.str;
|
||||
default = "home-manager";
|
||||
description = ''
|
||||
The Nix profile name.
|
||||
'';
|
||||
};
|
||||
|
||||
host = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
description = "Cachix URI to use.";
|
||||
};
|
||||
|
||||
package = mkPackageOption pkgs "cachix" { };
|
||||
|
||||
credentialsFile = mkOption {
|
||||
type = types.path;
|
||||
default = "${config.xdg.configHome}/cachix-agent.token";
|
||||
defaultText =
|
||||
literalExpression ''"''${config.xdg.configHome}/cachix-agent.token"'';
|
||||
description = ''
|
||||
Required file that needs to contain
|
||||
<literal>CACHIX_AGENT_TOKEN=...</literal>.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
assertions = [
|
||||
(lib.hm.assertions.assertPlatform "services.cachix-agent" pkgs
|
||||
lib.platforms.linux)
|
||||
];
|
||||
|
||||
systemd.user.services.cachix-agent = {
|
||||
Unit.Description = "Cachix Deploy Agent";
|
||||
|
||||
Service = {
|
||||
Environment = [
|
||||
"PATH=${
|
||||
if config.nix.enable && config.nix.package != null then
|
||||
config.nix.package
|
||||
else
|
||||
pkgs.nix
|
||||
}/bin"
|
||||
];
|
||||
EnvironmentFile = cfg.credentialsFile;
|
||||
|
||||
# We don't want to kill children processes as those are deployments.
|
||||
KillMode = "process";
|
||||
Restart = "on-failure";
|
||||
ExecStart = escapeShellArgs ([ "${cfg.package}/bin/cachix" ]
|
||||
++ optional cfg.verbose "--verbose"
|
||||
++ optional (cfg.host != null) "--host ${cfg.host}"
|
||||
++ [ "deploy" "agent" cfg.name ]
|
||||
++ optional (cfg.profile != null) cfg.profile);
|
||||
};
|
||||
|
||||
Install.WantedBy = [ "default.target" ];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -61,7 +61,7 @@ in {
|
|||
<citerefentry>
|
||||
<refentrytitle>fnott.ini</refentrytitle>
|
||||
<manvolnum>5</manvolnum>
|
||||
</citerefentry> for a list of avaliable options and <link
|
||||
</citerefentry> for a list of available options and <link
|
||||
xlink:href="https://codeberg.org/dnkl/fnott/src/branch/master/fnott.ini"/>
|
||||
for an example configuration.
|
||||
'';
|
||||
|
|
|
@ -109,7 +109,7 @@ let
|
|||
example =
|
||||
"[ \${pkg.sway}/bin/swaymsg workspace 1, move workspace to eDP-1 ]";
|
||||
description = ''
|
||||
Commands executed after the profile is succesfully applied.
|
||||
Commands executed after the profile is successfully applied.
|
||||
Note that if you provide multiple commands, they will be
|
||||
executed asynchronously with no guaranteed ordering.
|
||||
'';
|
||||
|
|
|
@ -129,8 +129,8 @@ in {
|
|||
type = types.nullOr types.str;
|
||||
description = ''
|
||||
Set margin of each edge specified in pixels. Specify single value to
|
||||
apply margin on all sides. Two comma-seperated values will set
|
||||
vertical and horizontal edges seperately. Four comma-seperated will
|
||||
apply margin on all sides. Two comma-separated values will set
|
||||
vertical and horizontal edges separately. Four comma-seperated will
|
||||
give each edge a seperate value.
|
||||
For example: 10,20,5 will set top margin to 10, left and right to 20
|
||||
and bottom to five.
|
||||
|
@ -142,8 +142,8 @@ in {
|
|||
type = types.nullOr types.str;
|
||||
description = ''
|
||||
Set padding of each edge specified in pixels. Specify single value to
|
||||
apply margin on all sides. Two comma-seperated values will set
|
||||
vertical and horizontal edges seperately. Four comma-seperated will
|
||||
apply margin on all sides. Two comma-separated values will set
|
||||
vertical and horizontal edges separately. Four comma-seperated will
|
||||
give each edge a seperate value.
|
||||
For example: 10,20,5 will set top margin to 10, left and right to 20
|
||||
and bottom to five.
|
||||
|
|
|
@ -46,7 +46,7 @@ in {
|
|||
Description = "Discord Rich Presence for MPD";
|
||||
Documentation = "https://github.com/JakeStanger/mpd-discord-rpc";
|
||||
After = [ "graphical-session-pre.target" ];
|
||||
PartOf = [ "graphical-session.desktop" ];
|
||||
PartOf = [ "graphical-session.target" ];
|
||||
};
|
||||
Service = {
|
||||
ExecStart = "${cfg.package}/bin/mpd-discord-rpc";
|
||||
|
|
|
@ -198,10 +198,10 @@ in {
|
|||
};
|
||||
|
||||
backend = mkOption {
|
||||
type = types.enum [ "glx" "xrender" "xr_glx_hybrid" ];
|
||||
type = types.enum [ "egl" "glx" "xrender" "xr_glx_hybrid" ];
|
||||
default = "xrender";
|
||||
description = ''
|
||||
Backend to use: <literal>glx</literal>, <literal>xrender</literal> or <literal>xr_glx_hybrid</literal>.
|
||||
Backend to use: <literal>egl</literal>, <literal>glx</literal>, <literal>xrender</literal> or <literal>xr_glx_hybrid</literal>.
|
||||
'';
|
||||
};
|
||||
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
{ config, options, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
|
||||
cfg = config.services.polybar;
|
||||
opt = options.services.polybar;
|
||||
|
||||
eitherStrBoolIntList = with types;
|
||||
either str (either bool (either int (listOf str)));
|
||||
|
@ -54,11 +55,17 @@ let
|
|||
in "${key}=${value'}";
|
||||
};
|
||||
|
||||
configFile = pkgs.writeText "polybar.conf" ''
|
||||
configFile = let
|
||||
isDeclarativeConfig = cfg.settings != opt.settings.default || cfg.config
|
||||
!= opt.config.default || cfg.extraConfig != opt.extraConfig.default;
|
||||
in if isDeclarativeConfig then
|
||||
pkgs.writeText "polybar.conf" ''
|
||||
${toPolybarIni cfg.config}
|
||||
${toPolybarIni (mapAttrs convertPolybarSection cfg.settings)}
|
||||
${cfg.extraConfig}
|
||||
'';
|
||||
''
|
||||
else
|
||||
null;
|
||||
|
||||
in {
|
||||
options = {
|
||||
|
@ -198,15 +205,17 @@ in {
|
|||
lib.platforms.linux)
|
||||
];
|
||||
|
||||
meta.maintainers = with maintainers; [ h7x4 ];
|
||||
|
||||
home.packages = [ cfg.package ];
|
||||
xdg.configFile."polybar/config.ini".source = configFile;
|
||||
xdg.configFile."polybar/config.ini" =
|
||||
mkIf (configFile != null) { source = configFile; };
|
||||
|
||||
systemd.user.services.polybar = {
|
||||
Unit = {
|
||||
Description = "Polybar status bar";
|
||||
PartOf = [ "tray.target" ];
|
||||
X-Restart-Triggers =
|
||||
[ "${config.xdg.configFile."polybar/config.ini".source}" ];
|
||||
X-Restart-Triggers = mkIf (configFile != null) "${configFile}";
|
||||
};
|
||||
|
||||
Service = {
|
||||
|
|
|
@ -8,7 +8,7 @@ in {
|
|||
meta.maintainers = [ maintainers.thibautmarty ];
|
||||
|
||||
options.services.poweralertd.enable =
|
||||
mkEnableOption "the Upower-powered power alerterd";
|
||||
mkEnableOption "the Upower-powered power alertd";
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
assertions = [
|
||||
|
|
|
@ -39,7 +39,8 @@ in {
|
|||
|
||||
home.packages = [ cfg.package ];
|
||||
|
||||
xdg.configFile."pueue/pueue.yml".source = configFile;
|
||||
xdg.configFile =
|
||||
mkIf (cfg.settings != { }) { "pueue/pueue.yml".source = configFile; };
|
||||
|
||||
systemd.user = {
|
||||
services.pueued = {
|
||||
|
|
|
@ -88,7 +88,7 @@ in {
|
|||
{ event = "lock"; command = "lock"; }
|
||||
]
|
||||
'';
|
||||
description = "Run command on occurence of a event.";
|
||||
description = "Run command on occurrence of a event.";
|
||||
};
|
||||
|
||||
extraArgs = mkOption {
|
||||
|
|
|
@ -193,7 +193,7 @@ let
|
|||
# We have to make sure the wrapper does not start a dbus session
|
||||
export DBUS_SESSION_BUS_ADDRESS=1
|
||||
|
||||
# A zero exit code means i3 succesfully validated the configuration
|
||||
# A zero exit code means i3 successfully validated the configuration
|
||||
i3 -c ${configFile} -C -d all || {
|
||||
echo "i3 configuration validation failed"
|
||||
echo "For a verbose log of the failure, run 'i3 -c ${configFile} -C -d all'"
|
||||
|
|
|
@ -33,7 +33,7 @@ in {
|
|||
<refentrytitle>swaynag</refentrytitle>
|
||||
<manvolnum>5</manvolnum>
|
||||
</citerefentry>
|
||||
for a list of avaliable options and an example configuration.
|
||||
for a list of available options and an example configuration.
|
||||
Note, configurations declared under <literal><config></literal>
|
||||
will override the default type values of swaynag.
|
||||
'';
|
||||
|
|
|
@ -50,7 +50,7 @@ in {
|
|||
AppleMetricUnits = mkNullableEnableOption "the metric system";
|
||||
|
||||
NSAutomaticCapitalizationEnabled =
|
||||
mkNullableEnableOption "automatic captilization";
|
||||
mkNullableEnableOption "automatic capitalization";
|
||||
|
||||
NSAutomaticDashSubstitutionEnabled =
|
||||
mkNullableEnableOption "smart dashes";
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
description = "NixOS configuration";
|
||||
description = "Darwin configuration";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
|
|
|
@ -166,6 +166,7 @@ import nmt {
|
|||
./modules/programs/yt-dlp
|
||||
./modules/services/barrier
|
||||
./modules/services/borgmatic
|
||||
./modules/services/cachix-agent
|
||||
./modules/services/devilspie2
|
||||
./modules/services/dropbox
|
||||
./modules/services/emacs
|
||||
|
|
|
@ -1,9 +1,6 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
config = {
|
||||
programs.broot = {
|
||||
enable = true;
|
||||
settings.modal = true;
|
||||
|
@ -12,7 +9,7 @@ with lib;
|
|||
nmt.script = ''
|
||||
assertFileExists home-files/.config/broot/conf.toml
|
||||
assertFileContent home-files/.config/broot/conf.toml ${
|
||||
pkgs.writeText "broot.expected" ''
|
||||
builtins.toFile "broot.expected" ''
|
||||
imports = ["verbs.hjson", {file = "dark-blue-skin.hjson", luma = ["dark", "unknown"]}, {file = "white-skin.hjson", luma = "light"}]
|
||||
modal = true
|
||||
show_selection_mark = true
|
||||
|
@ -22,5 +19,4 @@ with lib;
|
|||
''
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
|
@ -23,4 +23,3 @@
|
|||
</p></DL>
|
||||
</p></DL>
|
||||
</p></DL>
|
||||
</p></DL>
|
||||
|
|
|
@ -11,8 +11,8 @@
|
|||
{
|
||||
source = pkgs.fetchurl {
|
||||
url =
|
||||
"https://keybase.io/rycee/pgp_keys.asc?fingerprint=36cacf52d098cc0e78fb0cb13573356c25c424d4";
|
||||
sha256 = "082mjy6llvrdry6i9r5gx97nw9d89blnam7bghza4ynsjk1mmx6c";
|
||||
"https://keys.openpgp.org/pks/lookup?op=get&options=mr&search=0x36cacf52d098cc0e78fb0cb13573356c25c424d4";
|
||||
hash = "sha256-9Zjsb/TtOyiPzMO/Jg3CtJwSxuw7QmX0pcfZT2/1w5E=";
|
||||
};
|
||||
trust = 1; # "unknown"
|
||||
}
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
};
|
||||
|
||||
test.stubs.gnupg = { };
|
||||
test.stubs.systemd = { }; # depends on gnupg.override
|
||||
|
||||
nmt.script = ''
|
||||
assertFileContains activate "export GNUPGHOME='/home/hm-user/.gnupg'"
|
||||
|
|
|
@ -8,7 +8,7 @@ S=irc.mzima.net
|
|||
S=irc.prison.net
|
||||
J=#computers
|
||||
|
||||
N=freenode
|
||||
N=oftc
|
||||
L=6
|
||||
E=UTF-8 (Unicode)
|
||||
F=12
|
||||
|
@ -17,8 +17,6 @@ i=user_
|
|||
R=real_user
|
||||
U=user
|
||||
P=password
|
||||
S=chat.freenode.net
|
||||
S=irc.freenode.net
|
||||
S=irc.oftc.net
|
||||
J=#home-manager
|
||||
J=#nixos
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
enable = true;
|
||||
overwriteConfigFiles = true;
|
||||
channels = {
|
||||
freenode = {
|
||||
oftc = {
|
||||
charset = "UTF-8 (Unicode)";
|
||||
userName = "user";
|
||||
password = "password";
|
||||
|
@ -18,8 +18,8 @@
|
|||
autoconnect = true;
|
||||
forceSSL = true;
|
||||
};
|
||||
servers = [ "chat.freenode.net" "irc.freenode.net" ];
|
||||
autojoin = [ "#home-manager" "#nixos" ];
|
||||
servers = [ "irc.oftc.net" ];
|
||||
autojoin = [ "#home-manager" ];
|
||||
};
|
||||
efnet = {
|
||||
options = { forceSSL = true; };
|
||||
|
|
|
@ -1,16 +1,18 @@
|
|||
display-name = ""
|
||||
downloads-dir = "/data/download"
|
||||
name = ""
|
||||
|
||||
["hm@example.com"]
|
||||
backend = "imap"
|
||||
default = true
|
||||
default-page-size = 50
|
||||
display-name = "H. M. Test"
|
||||
email = "hm@example.com"
|
||||
email-listing-page-size = 50
|
||||
imap-host = "imap.example.com"
|
||||
imap-login = "home.manager"
|
||||
imap-passwd-cmd = "'password-command'"
|
||||
imap-port = 995
|
||||
imap-starttls = false
|
||||
name = "H. M. Test"
|
||||
sender = "smtp"
|
||||
smtp-host = "smtp.example.com"
|
||||
smtp-login = "home.manager"
|
||||
smtp-passwd-cmd = "'password-command'"
|
||||
|
|
|
@ -10,7 +10,9 @@ with lib;
|
|||
himalaya = {
|
||||
enable = true;
|
||||
|
||||
settings = { default-page-size = 50; };
|
||||
backend = "imap";
|
||||
sender = "smtp";
|
||||
settings = { email-listing-page-size = 50; };
|
||||
};
|
||||
|
||||
folders = {
|
||||
|
@ -38,4 +40,3 @@ with lib;
|
|||
}
|
||||
'';
|
||||
}
|
||||
|
||||
|
|
|
@ -102,14 +102,14 @@ with lib;
|
|||
icons = "awesome5"
|
||||
theme = "gruvbox-dark"
|
||||
[[block]]
|
||||
alert = 10
|
||||
alert = 10.0
|
||||
alias = "/"
|
||||
block = "disk_space"
|
||||
info_type = "available"
|
||||
interval = 60
|
||||
path = "/"
|
||||
unit = "GB"
|
||||
warning = 20
|
||||
warning = 20.0
|
||||
|
||||
[[block]]
|
||||
block = "memory"
|
||||
|
|
|
@ -16,14 +16,14 @@ with lib;
|
|||
icons = "none"
|
||||
theme = "plain"
|
||||
[[block]]
|
||||
alert = 10
|
||||
alert = 10.0
|
||||
alias = "/"
|
||||
block = "disk_space"
|
||||
info_type = "available"
|
||||
interval = 60
|
||||
path = "/"
|
||||
unit = "GB"
|
||||
warning = 20
|
||||
warning = 20.0
|
||||
|
||||
[[block]]
|
||||
block = "memory"
|
||||
|
|
|
@ -111,14 +111,14 @@ with lib;
|
|||
pkgs.writeText "i3status-rust-expected-config" ''
|
||||
icons = "awesome5"
|
||||
[[block]]
|
||||
alert = 10
|
||||
alert = 10.0
|
||||
alias = "/"
|
||||
block = "disk_space"
|
||||
info_type = "available"
|
||||
interval = 60
|
||||
path = "/"
|
||||
unit = "GB"
|
||||
warning = 20
|
||||
warning = 20.0
|
||||
|
||||
[[block]]
|
||||
block = "memory"
|
||||
|
|
|
@ -62,14 +62,14 @@ with lib;
|
|||
icons = "none"
|
||||
theme = "plain"
|
||||
[[block]]
|
||||
alert = 10
|
||||
alert = 10.0
|
||||
alias = "/"
|
||||
block = "disk_space"
|
||||
info_type = "available"
|
||||
interval = 60
|
||||
path = "/"
|
||||
unit = "GB"
|
||||
warning = 20
|
||||
warning = 20.0
|
||||
|
||||
[[block]]
|
||||
block = "memory"
|
||||
|
|
|
@ -5,4 +5,5 @@
|
|||
|
||||
# waiting for a nixpkgs patch
|
||||
neovim-no-init = ./no-init.nix;
|
||||
neovim-extra-lua-init = ./extra-lua-init.nix;
|
||||
}
|
||||
|
|
23
tests/modules/programs/neovim/extra-lua-init.nix
Normal file
23
tests/modules/programs/neovim/extra-lua-init.nix
Normal file
|
@ -0,0 +1,23 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
config = {
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
|
||||
extraLuaConfig = ''
|
||||
-- extraLuaConfig
|
||||
'';
|
||||
};
|
||||
nmt.script = ''
|
||||
nvimFolder="home-files/.config/nvim"
|
||||
assertFileContent "$nvimFolder/init.lua" ${
|
||||
pkgs.writeText "init.lua-expected" ''
|
||||
-- extraLuaConfig
|
||||
''
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
|
@ -14,7 +14,10 @@ with lib;
|
|||
extraPython3Packages = (ps: with ps; [ jedi pynvim ]);
|
||||
|
||||
# plugins without associated config should not trigger the creation of init.vim
|
||||
plugins = with pkgs.vimPlugins; [ fugitive ({ plugin = vim-sensible; }) ];
|
||||
plugins = with pkgs.vimPlugins; [
|
||||
vim-fugitive
|
||||
({ plugin = vim-sensible; })
|
||||
];
|
||||
};
|
||||
nmt.script = ''
|
||||
nvimFolder="home-files/.config/nvim"
|
||||
|
|
|
@ -3,3 +3,4 @@ let $config = {
|
|||
table_mode: rounded
|
||||
use_ls_colors: true
|
||||
}
|
||||
|
||||
|
|
|
@ -1 +1,2 @@
|
|||
let-env FOO = 'BAR'
|
||||
|
||||
|
|
32
tests/modules/services/cachix-agent/basic-setup.nix
Normal file
32
tests/modules/services/cachix-agent/basic-setup.nix
Normal file
|
@ -0,0 +1,32 @@
|
|||
{ config, ... }:
|
||||
|
||||
{
|
||||
services.cachix-agent = {
|
||||
enable = true;
|
||||
package = config.lib.test.mkStubPackage { outPath = "@cachix-agent@"; };
|
||||
name = "test-agent";
|
||||
};
|
||||
|
||||
test.stubs.nix = { };
|
||||
|
||||
nmt.script = ''
|
||||
assertFileContent \
|
||||
home-files/.config/systemd/user/cachix-agent.service \
|
||||
${
|
||||
builtins.toFile "cachix-agent.service" ''
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
|
||||
[Service]
|
||||
Environment=PATH=@nix@/bin
|
||||
EnvironmentFile=/home/hm-user/.config/cachix-agent.token
|
||||
ExecStart='@cachix-agent@/bin/cachix' 'deploy' 'agent' 'test-agent' 'home-manager'
|
||||
KillMode=process
|
||||
Restart=on-failure
|
||||
|
||||
[Unit]
|
||||
Description=Cachix Deploy Agent
|
||||
''
|
||||
}
|
||||
'';
|
||||
}
|
1
tests/modules/services/cachix-agent/default.nix
Normal file
1
tests/modules/services/cachix-agent/default.nix
Normal file
|
@ -0,0 +1 @@
|
|||
{ cachix = ./basic-setup.nix; }
|
|
@ -9,6 +9,7 @@ with lib;
|
|||
programs.gpg.enable = true;
|
||||
|
||||
test.stubs.gnupg = { };
|
||||
test.stubs.systemd = { }; # depends on gnupg.override
|
||||
|
||||
nmt.script = ''
|
||||
in="${config.systemd.user.sockets.gpg-agent.Socket.ListenStream}"
|
||||
|
|
|
@ -12,6 +12,7 @@ with lib;
|
|||
};
|
||||
|
||||
test.stubs.gnupg = { };
|
||||
test.stubs.systemd = { }; # depends on gnupg.override
|
||||
|
||||
nmt.script = ''
|
||||
in="${config.systemd.user.sockets.gpg-agent.Socket.ListenStream}"
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
serviceFile=home-files/.config/systemd/user/polybar.service
|
||||
|
||||
assertFileExists $serviceFile
|
||||
assertFileRegex $serviceFile 'X-Restart-Triggers=.*polybar\.conf'
|
||||
assertFileRegex $serviceFile 'X-Restart-Triggers=/nix/store/.*-polybar.conf$'
|
||||
assertFileRegex $serviceFile 'ExecStart=.*/bin/polybar-start'
|
||||
|
||||
assertFileExists home-files/.config/polybar/config.ini
|
||||
|
|
|
@ -1 +1,4 @@
|
|||
{ polybar-basic-configuration = ./basic-configuration.nix; }
|
||||
{
|
||||
polybar-basic-configuration = ./basic-configuration.nix;
|
||||
polybar-empty-configuration = ./empty-configuration.nix;
|
||||
}
|
||||
|
|
21
tests/modules/services/polybar/empty-configuration.nix
Normal file
21
tests/modules/services/polybar/empty-configuration.nix
Normal file
|
@ -0,0 +1,21 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
config = {
|
||||
services.polybar = {
|
||||
enable = true;
|
||||
package = config.lib.test.mkStubPackage { };
|
||||
script = "polybar bar &";
|
||||
};
|
||||
|
||||
nmt.script = ''
|
||||
serviceFile=home-files/.config/systemd/user/polybar.service
|
||||
|
||||
assertFileExists $serviceFile
|
||||
assertFileNotRegex $serviceFile 'X-Restart-Triggers=/nix/store/.*-polybar.conf$'
|
||||
assertFileRegex $serviceFile 'ExecStart=.*/bin/polybar-start'
|
||||
|
||||
assertPathNotExists home-files/.config/polybar/config.ini
|
||||
'';
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue