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
|
/modules/programs/hexchat.nix @thiagokokada
|
||||||
/tests/modules/programs/hexchat @thiagokokada
|
/tests/modules/programs/hexchat @thiagokokada
|
||||||
|
|
||||||
/modules/programs/himalaya.nix @ambroisie
|
/modules/programs/himalaya.nix @toastal
|
||||||
/tests/modules/programs/himalaya @ambroisie
|
/tests/modules/programs/himalaya @toastal
|
||||||
|
|
||||||
/modules/programs/home-manager.nix @rycee
|
/modules/programs/home-manager.nix @rycee
|
||||||
|
|
||||||
|
@ -263,6 +263,9 @@ Makefile @thiagokokada
|
||||||
/modules/programs/pls.nix @arjan-s
|
/modules/programs/pls.nix @arjan-s
|
||||||
/tests/modules/programs/pls @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/powerline-go.nix @DamienCassou
|
||||||
|
|
||||||
/modules/programs/pubs.nix @loicreynier
|
/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 }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: cachix/install-nix-action@v18
|
- uses: cachix/install-nix-action@v21
|
||||||
with:
|
with:
|
||||||
|
install_url: https://releases.nixos.org/nix/nix-2.13.3/install
|
||||||
nix_path: nixpkgs=channel:nixos-unstable
|
nix_path: nixpkgs=channel:nixos-unstable
|
||||||
- uses: cachix/cachix-action@v12
|
- uses: cachix/cachix-action@v12
|
||||||
with:
|
with:
|
||||||
|
|
5
.github/workflows/test.yml
vendored
5
.github/workflows/test.yml
vendored
|
@ -12,9 +12,10 @@ jobs:
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: cachix/install-nix-action@v18
|
- uses: cachix/install-nix-action@v21
|
||||||
with:
|
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
|
- uses: cachix/cachix-action@v12
|
||||||
with:
|
with:
|
||||||
name: nix-community
|
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
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
- name: Install Nix
|
- 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
|
- name: Update flake.lock
|
||||||
uses: DeterminateSystems/update-flake-lock@v14
|
uses: DeterminateSystems/update-flake-lock@v19
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.GH_TOKEN_FOR_UPDATES }}
|
token: ${{ secrets.GH_TOKEN_FOR_UPDATES }}
|
||||||
pr-labels: dependencies
|
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
|
that it is about to be overwritten was from a previous Home Manager
|
||||||
generation or from manual configuration.
|
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
|
current stable version), it may or may not work on other Linux
|
||||||
distributions and NixOS versions.
|
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
|
often causes it to contain tweaks for changes/packages not yet
|
||||||
released in stable NixOS. To avoid breaking users' configurations,
|
released in stable NixOS. To avoid breaking users' configurations,
|
||||||
Home Manager is released in branches corresponding to NixOS releases
|
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
|
modules. If you need a module to be backported, then feel free to open
|
||||||
an issue.
|
an issue.
|
||||||
|
|
||||||
|
|
|
@ -51,11 +51,11 @@ $ 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 22.05 channel you can run
|
and if you follow a Nixpkgs version 22.11 channel you can run
|
||||||
+
|
+
|
||||||
[source,console]
|
[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
|
$ nix-channel --update
|
||||||
----
|
----
|
||||||
+
|
+
|
||||||
|
@ -133,11 +133,11 @@ $ 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 22.05 channel, you can run
|
and if you follow a Nixpkgs version 22.11 channel, you can run
|
||||||
|
|
||||||
[source,console]
|
[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
|
$ sudo nix-channel --update
|
||||||
----
|
----
|
||||||
|
|
||||||
|
@ -244,11 +244,11 @@ $ 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 22.05 channel, you can run
|
and if you follow a Nixpkgs version 22.11 channel, you can run
|
||||||
|
|
||||||
[source,console]
|
[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
|
$ nix-channel --update
|
||||||
----
|
----
|
||||||
|
|
||||||
|
@ -303,7 +303,7 @@ can be sourced directly by POSIX.2-like shells such as {bash}[Bash] or
|
||||||
[NOTE]
|
[NOTE]
|
||||||
====
|
====
|
||||||
By default user packages will not be ignored in favor of
|
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
|
`/etc/profiles/per-user/$USERNAME` if
|
||||||
|
|
||||||
[source,nix]
|
[source,nix]
|
||||||
|
|
|
@ -155,6 +155,18 @@
|
||||||
--keep-going
|
--keep-going
|
||||||
</arg>
|
</arg>
|
||||||
|
|
||||||
|
<arg>
|
||||||
|
<group choice="req">
|
||||||
|
<arg choice="plain">
|
||||||
|
-L
|
||||||
|
</arg>
|
||||||
|
|
||||||
|
<arg choice="plain">
|
||||||
|
--print-build-logs
|
||||||
|
</arg>
|
||||||
|
</group>
|
||||||
|
</arg>
|
||||||
|
|
||||||
<arg>
|
<arg>
|
||||||
--show-trace
|
--show-trace
|
||||||
</arg>
|
</arg>
|
||||||
|
@ -546,6 +558,22 @@
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</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>
|
<varlistentry>
|
||||||
<term>
|
<term>
|
||||||
<option>--show-trace</option>
|
<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.
|
The support is still experimental and may change in backwards incompatible ways.
|
||||||
|
|
||||||
[[sec-flakes-prerequisties]]
|
[[sec-flakes-prerequisties]]
|
||||||
=== Prerequisties
|
=== Prerequisites
|
||||||
|
|
||||||
* Install Nix 2.4 or later, or have it in `nix-shell`.
|
* 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
|
* The above example tracks the master branch of Home Manager
|
||||||
and nixos-unstable branch of Nixpkgs.
|
and nixos-unstable branch of Nixpkgs.
|
||||||
If you would like to use the `release-22.05` branch,
|
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.05`
|
change the `home-manager` input url to `github:nix-community/home-manager/release-22.11`
|
||||||
and `nixpkgs` url to `github:NixOS/nixpkgs/nixos-22.05`.
|
and `nixpkgs` url to `github:NixOS/nixpkgs/nixos-22.11`.
|
||||||
|
|
||||||
* The Home Manager library is exported by the flake under
|
* The Home Manager library is exported by the flake under
|
||||||
`lib.hm`.
|
`lib.hm`.
|
||||||
|
@ -200,7 +200,7 @@ is similar to that of NixOS. The `flake.nix` would be:
|
||||||
[source,nix]
|
[source,nix]
|
||||||
----
|
----
|
||||||
{
|
{
|
||||||
description = "NixOS configuration";
|
description = "Darwin configuration";
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
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
|
# 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 = "22.05";
|
home.stateVersion = "22.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;
|
||||||
|
@ -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
|
# 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 = "22.05";
|
home.stateVersion = "22.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;
|
||||||
|
|
|
@ -293,6 +293,7 @@ _home-manager_completions ()
|
||||||
Options=( "-f" "--file" "-b" "-A" "-I" "-h" "--help" "-n" "--dry-run" "-v" \
|
Options=( "-f" "--file" "-b" "-A" "-I" "-h" "--help" "-n" "--dry-run" "-v" \
|
||||||
"--verbose" "--cores" "--debug" "--impure" "--keep-failed" \
|
"--verbose" "--cores" "--debug" "--impure" "--keep-failed" \
|
||||||
"--keep-going" "-j" "--max-jobs" "--no-substitute" "--no-out-link" \
|
"--keep-going" "-j" "--max-jobs" "--no-substitute" "--no-out-link" \
|
||||||
|
"-L" "--print-build-logs" \
|
||||||
"--show-trace" "--substitute" "--builders" "--version" \
|
"--show-trace" "--substitute" "--builders" "--version" \
|
||||||
"--update-input" "--override-input" "--experimental-features" \
|
"--update-input" "--override-input" "--experimental-features" \
|
||||||
"--extra-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 -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 "option" -d "Set Nix configuration option"
|
||||||
complete -c home-manager -x -l "builders" -d "Remote builders"
|
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 "show-trace" -d "Print stack trace of evaluation errors"
|
||||||
complete -c home-manager -f -l "substitute"
|
complete -c home-manager -f -l "substitute"
|
||||||
complete -c home-manager -f -l "no-substitute"
|
complete -c home-manager -f -l "no-substitute"
|
||||||
|
|
|
@ -19,6 +19,7 @@ _arguments \
|
||||||
'(-j --max-jobs)'{--max-jobs,-j}'[max jobs]:NUM:()' \
|
'(-j --max-jobs)'{--max-jobs,-j}'[max jobs]:NUM:()' \
|
||||||
'--option[option]:NAME VALUE:()' \
|
'--option[option]:NAME VALUE:()' \
|
||||||
'--builders[builders]:SPEC:()' \
|
'--builders[builders]:SPEC:()' \
|
||||||
|
'(-L --print-build-logs)'{--print-build-logs,-L}'[print build logs]' \
|
||||||
'--show-trace[show trace]' \
|
'--show-trace[show trace]' \
|
||||||
'--override-input[override flake input]:NAME VALUE:()' \
|
'--override-input[override flake input]:NAME VALUE:()' \
|
||||||
'--update-input[update flake input]:NAME:()' \
|
'--update-input[update flake input]:NAME:()' \
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{ runCommand, lib, bash, callPackage, coreutils, findutils, gettext, gnused
|
{ runCommand, lib, bash, callPackage, coreutils, findutils, gettext, gnused
|
||||||
, less, ncurses
|
, less, ncurses, unixtools
|
||||||
# used for pkgs.path for nixos-option
|
# used for pkgs.path for nixos-option
|
||||||
, pkgs
|
, pkgs
|
||||||
|
|
||||||
|
@ -39,6 +39,7 @@ in runCommand "home-manager" {
|
||||||
less
|
less
|
||||||
ncurses
|
ncurses
|
||||||
nixos-option
|
nixos-option
|
||||||
|
unixtools.hostname
|
||||||
]
|
]
|
||||||
}" \
|
}" \
|
||||||
--subst-var-by HOME_MANAGER_LIB '${../lib/bash/home-manager.sh}' \
|
--subst-var-by HOME_MANAGER_LIB '${../lib/bash/home-manager.sh}' \
|
||||||
|
|
|
@ -106,10 +106,17 @@ function setFlakeAttribute() {
|
||||||
local name="${FLAKE_ARG#*#}"
|
local name="${FLAKE_ARG#*#}"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
local name="$USER@$(hostname)"
|
local name="$USER"
|
||||||
if [ "$(nix eval "$flake#homeConfigurations" --apply "x: x ? \"$name\"")" = "false" ]; then
|
# Check both long and short hostnames; long first to preserve
|
||||||
name="$USER"
|
# 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
|
||||||
|
fi
|
||||||
|
done
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
export FLAKE_CONFIG_URI="$flake#homeConfigurations.\"$name\""
|
export FLAKE_CONFIG_URI="$flake#homeConfigurations.\"$name\""
|
||||||
|
@ -282,6 +289,7 @@ function doBuild() {
|
||||||
"$FLAKE_CONFIG_URI.activationPackage" \
|
"$FLAKE_CONFIG_URI.activationPackage" \
|
||||||
${DRY_RUN+--dry-run} \
|
${DRY_RUN+--dry-run} \
|
||||||
${NO_OUT_LINK+--no-link} \
|
${NO_OUT_LINK+--no-link} \
|
||||||
|
${PRINT_BUILD_LOGS+--print-build-logs} \
|
||||||
|| return
|
|| return
|
||||||
else
|
else
|
||||||
doBuildAttr \
|
doBuildAttr \
|
||||||
|
@ -312,6 +320,7 @@ function doSwitch() {
|
||||||
doBuildFlake \
|
doBuildFlake \
|
||||||
"$FLAKE_CONFIG_URI.activationPackage" \
|
"$FLAKE_CONFIG_URI.activationPackage" \
|
||||||
--out-link "$generation" \
|
--out-link "$generation" \
|
||||||
|
${PRINT_BUILD_LOGS+--print-build-logs} \
|
||||||
&& "$generation/activate" || return
|
&& "$generation/activate" || return
|
||||||
else
|
else
|
||||||
doBuildAttr \
|
doBuildAttr \
|
||||||
|
@ -544,6 +553,7 @@ function doHelp() {
|
||||||
echo " --keep-going"
|
echo " --keep-going"
|
||||||
echo " -j, --max-jobs NUM"
|
echo " -j, --max-jobs NUM"
|
||||||
echo " --option NAME VALUE"
|
echo " --option NAME VALUE"
|
||||||
|
echo " -L, --print-build-logs"
|
||||||
echo " --show-trace"
|
echo " --show-trace"
|
||||||
echo " --(no-)substitute"
|
echo " --(no-)substitute"
|
||||||
echo " --no-out-link Do not create a symlink to the output path"
|
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)
|
||||||
NO_OUT_LINK=1
|
NO_OUT_LINK=1
|
||||||
;;
|
;;
|
||||||
|
-L|--print-build-logs)
|
||||||
|
PRINT_BUILD_LOGS=1
|
||||||
|
;;
|
||||||
-h|--help)
|
-h|--help)
|
||||||
doHelp
|
doHelp
|
||||||
exit 0
|
exit 0
|
||||||
|
@ -664,7 +677,7 @@ while [[ $# -gt 0 ]]; do
|
||||||
export VERBOSE=1
|
export VERBOSE=1
|
||||||
;;
|
;;
|
||||||
--version)
|
--version)
|
||||||
echo 22.05
|
echo 22.11
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
|
|
@ -54,7 +54,7 @@ in runCommand "home-manager-install" {
|
||||||
# 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 = "22.05";
|
home.stateVersion = "22.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;
|
||||||
|
|
|
@ -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 {
|
command = mkOption {
|
||||||
type = with types; nullOr path;
|
type = with types; nullOr path;
|
||||||
default = null;
|
default = null;
|
||||||
|
|
|
@ -679,7 +679,6 @@ in
|
||||||
gnused
|
gnused
|
||||||
ncurses # For `tput`.
|
ncurses # For `tput`.
|
||||||
]
|
]
|
||||||
++ optional (config.nix.enable && config.nix.package != null) config.nix.package
|
|
||||||
++ config.home.extraActivationPath
|
++ config.home.extraActivationPath
|
||||||
)
|
)
|
||||||
+ (
|
+ (
|
||||||
|
@ -688,7 +687,7 @@ in
|
||||||
if config.nix.enable && config.nix.package != null then
|
if config.nix.enable && config.nix.package != null then
|
||||||
":${config.nix.package}/bin"
|
":${config.nix.package}/bin"
|
||||||
else
|
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";
|
+ optionalString (!cfg.emptyActivationPath) "\${PATH:+:}$PATH";
|
||||||
|
|
||||||
|
|
|
@ -39,19 +39,19 @@ with lib;
|
||||||
default = null;
|
default = null;
|
||||||
description = ''
|
description = ''
|
||||||
This optional key is used as a hint to <literal>launchctl(1)</literal> that it should not submit this job to launchd when
|
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
|
loading a job or jobs. The value of this key does NOT reflect the current state of the job on the running
|
||||||
ning system. If you wish to know whether a job is loaded in launchd, reading this key from a configura-tion configuration
|
system. If you wish to know whether a job is loaded in launchd, reading this key from a configuration
|
||||||
tion file yourself is not a sufficient test. You should query launchd for the presence of the job using
|
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
|
the <literal>launchctl(1)</literal> list subcommand or use the ServiceManagement framework's
|
||||||
<literal>SMJobCopyDictionary()</literal> method.
|
<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
|
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
|
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
|
longer modify the configuration file, so the value displayed in the configuration file is not necessarily
|
||||||
ily the value that <literal>launchctl(1)</literal> will apply. See <literal>launchctl(1)</literal> for more information.
|
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
|
Please also be mindful that you should only use this key if the provided on-demand and KeepAlive criteria
|
||||||
ria are insufficient to describe the conditions under which your job needs to run. The cost to have a
|
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
|
job loaded in launchd is negligible, so there is no harm in loading a job which only runs once or very
|
||||||
rarely.
|
rarely.
|
||||||
'';
|
'';
|
||||||
|
@ -147,8 +147,7 @@ with lib;
|
||||||
type = types.nullOr types.bool;
|
type = types.nullOr types.bool;
|
||||||
default = null;
|
default = null;
|
||||||
description = ''
|
description = ''
|
||||||
This flag causes launchd to use the <literal>glob(3)</literal> mechanism to update the program arguments before invoca-tion. invocation.
|
This flag causes launchd to use the <literal>glob(3)</literal> mechanism to update the program arguments before invocation.
|
||||||
tion.
|
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -236,12 +235,12 @@ with lib;
|
||||||
description = ''
|
description = ''
|
||||||
This optional key is used to control whether your job is to be kept continuously running or to let
|
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
|
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
|
the job. The value may be set to true to unconditionally keep the job alive. Alternatively, a dictionary
|
||||||
nary of conditions may be specified to selectively control whether launchd keeps a job alive or not. If
|
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
|
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
|
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
|
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.
|
XPC connections. See <literal>xpc_transaction_begin(3)</literal> for details.
|
||||||
|
|
||||||
Interactive
|
Interactive
|
||||||
Interactive jobs run with the same resource limitations as apps, that is to say, none. Interac-tive Interactive
|
Interactive jobs run with the same resource limitations as apps, that is to say, none. Interactive
|
||||||
tive jobs are critical to maintaining a responsive user experience, and this key should only be
|
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.
|
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;
|
type = types.nullOr types.bool;
|
||||||
default = null;
|
default = null;
|
||||||
description = ''
|
description = ''
|
||||||
When a job dies, launchd kills any remaining processes with the same process group ID as the job. Set-ting Setting
|
When a job dies, launchd kills any remaining processes with the same process group ID as the job. Setting
|
||||||
ting this key to true disables that behavior.
|
this key to true disables that behavior.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -753,9 +752,9 @@ with lib;
|
||||||
description = ''
|
description = ''
|
||||||
This optional key is used to specify launch on demand sockets that can be used to let launchd know when
|
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
|
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
|
launch(3). The keys of the top level Sockets dictionary can be anything. They are meant for the application
|
||||||
cation developer to use to differentiate which descriptors correspond to which application level proto-cols protocols
|
developer to use to differentiate which descriptors correspond to which application level protocols
|
||||||
cols (e.g. http vs. ftp vs. DNS...). At check-in time, the value of each Sockets dictionary key will
|
(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
|
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
|
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.
|
protocol which conforms to the criteria specified in the job configuration file.
|
||||||
|
@ -829,8 +828,8 @@ with lib;
|
||||||
default = null;
|
default = null;
|
||||||
description = ''
|
description = ''
|
||||||
This optional key is a variant of SockPathName. Instead of binding to a known path, a securely
|
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
|
generated socket is created and the path is assigned to the environment variable that is inherited
|
||||||
ited by all jobs spawned by launchd.
|
by all jobs spawned by launchd.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -345,4 +345,13 @@
|
||||||
github = "lukasngl";
|
github = "lukasngl";
|
||||||
githubId = 69244516;
|
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
|
if [[ -v DBUS_SESSION_BUS_ADDRESS ]]; then
|
||||||
export DCONF_DBUS_RUN_SESSION=""
|
export DCONF_DBUS_RUN_SESSION=""
|
||||||
else
|
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
|
fi
|
||||||
|
|
||||||
if [[ -v oldGenPath ]]; then
|
if [[ -v oldGenPath ]]; then
|
||||||
|
|
|
@ -843,6 +843,14 @@ in
|
||||||
export MOZ_ALLOW_DOWNGRADE=1
|
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>
|
<citerefentry>
|
||||||
<refentrytitle>nix.conf</refentrytitle>
|
<refentrytitle>nix.conf</refentrytitle>
|
||||||
<manvolnum>5</manvolnum>
|
<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.
|
The value declared here will be translated directly to the key-value pairs Nix expects.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
|
|
|
@ -41,7 +41,7 @@ with lib;
|
||||||
suffix =
|
suffix =
|
||||||
optionalString (revision != null) "+${substring 0 8 revision}";
|
optionalString (revision != null) "+${substring 0 8 revision}";
|
||||||
in "${release}${suffix}";
|
in "${release}${suffix}";
|
||||||
example = "22.05+213a0629";
|
example = "22.11+213a0629";
|
||||||
description = "The full Home Manager version.";
|
description = "The full Home Manager version.";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ with lib;
|
||||||
readOnly = true;
|
readOnly = true;
|
||||||
type = types.str;
|
type = types.str;
|
||||||
default = fileContents ../../.release;
|
default = fileContents ../../.release;
|
||||||
example = "22.05";
|
example = "22.11";
|
||||||
description = "The Home Manager release.";
|
description = "The Home Manager release.";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -204,6 +204,7 @@ let
|
||||||
./services/betterlockscreen.nix
|
./services/betterlockscreen.nix
|
||||||
./services/blueman-applet.nix
|
./services/blueman-applet.nix
|
||||||
./services/borgmatic.nix
|
./services/borgmatic.nix
|
||||||
|
./services/cachix-agent.nix
|
||||||
./services/caffeine.nix
|
./services/caffeine.nix
|
||||||
./services/cbatticon.nix
|
./services/cbatticon.nix
|
||||||
./services/clipmenu.nix
|
./services/clipmenu.nix
|
||||||
|
|
|
@ -305,7 +305,7 @@ in {
|
||||||
DPI=144
|
DPI=144
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Unknown profle: $AUTORANDR_CURRENT_PROFILE"
|
echo "Unknown profile: $AUTORANDR_CURRENT_PROFILE"
|
||||||
exit 1
|
exit 1
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|
|
@ -64,7 +64,7 @@ let
|
||||||
id = mkOption {
|
id = mkOption {
|
||||||
type = strMatching "[a-zA-Z]{32}";
|
type = strMatching "[a-zA-Z]{32}";
|
||||||
description = ''
|
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 = "";
|
default = "";
|
||||||
};
|
};
|
||||||
|
|
|
@ -29,7 +29,7 @@ in {
|
||||||
default = { };
|
default = { };
|
||||||
description = ''
|
description = ''
|
||||||
Configuration written to
|
Configuration written to
|
||||||
<filename>$XDG_CONFIG_HOME/direnv/config.toml</filename>.
|
<filename>$XDG_CONFIG_HOME/direnv/direnv.toml</filename>.
|
||||||
</para><para>
|
</para><para>
|
||||||
See
|
See
|
||||||
<citerefentry>
|
<citerefentry>
|
||||||
|
@ -92,7 +92,7 @@ in {
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
home.packages = [ pkgs.direnv ];
|
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;
|
source = tomlFormat.generate "direnv-config" cfg.config;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -52,6 +52,10 @@ in {
|
||||||
Configuration to include in the Emacs default init file. See
|
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"/>
|
<link xlink:href="https://www.gnu.org/software/emacs/manual/html_node/elisp/Init-File.html"/>
|
||||||
for more.
|
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 = {
|
difftastic = {
|
||||||
enable = mkEnableOption "" // {
|
enable = mkEnableOption "" // {
|
||||||
description = ''
|
description = ''
|
||||||
Enable the <command>difft</command> syntax highlighter.
|
Enable the <command>difftastic</command> syntax highlighter.
|
||||||
See <link xlink:href="https://github.com/Wilfred/difftastic" />.
|
See <link xlink:href="https://github.com/Wilfred/difftastic" />.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
@ -278,7 +278,7 @@ in {
|
||||||
example = "dark";
|
example = "dark";
|
||||||
description = ''
|
description = ''
|
||||||
Determines whether difftastic should use the lighter or darker colors
|
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 {
|
markEmptyLines = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
default = true;
|
default = true;
|
||||||
|
@ -458,8 +466,8 @@ in {
|
||||||
(mkIf (cfg.signing != null) {
|
(mkIf (cfg.signing != null) {
|
||||||
programs.git.iniContent = {
|
programs.git.iniContent = {
|
||||||
user.signingKey = mkIf (cfg.signing.key != null) cfg.signing.key;
|
user.signingKey = mkIf (cfg.signing.key != null) cfg.signing.key;
|
||||||
commit.gpgSign = cfg.signing.signByDefault;
|
commit.gpgSign = mkDefault cfg.signing.signByDefault;
|
||||||
tag.gpgSign = cfg.signing.signByDefault;
|
tag.gpgSign = mkDefault cfg.signing.signByDefault;
|
||||||
gpg.program = cfg.signing.gpgPath;
|
gpg.program = cfg.signing.gpgPath;
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
|
@ -550,7 +558,9 @@ in {
|
||||||
programs.git.iniContent =
|
programs.git.iniContent =
|
||||||
let dsfCommand = "${pkgs.diff-so-fancy}/bin/diff-so-fancy";
|
let dsfCommand = "${pkgs.diff-so-fancy}/bin/diff-so-fancy";
|
||||||
in {
|
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";
|
interactive.diffFilter = "${dsfCommand} --patch";
|
||||||
diff-so-fancy = {
|
diff-so-fancy = {
|
||||||
markEmptyLines = cfg.diff-so-fancy.markEmptyLines;
|
markEmptyLines = cfg.diff-so-fancy.markEmptyLines;
|
||||||
|
|
|
@ -170,7 +170,7 @@ let
|
||||||
servers = mkOption {
|
servers = mkOption {
|
||||||
type = listOf str;
|
type = listOf str;
|
||||||
default = [ ];
|
default = [ ];
|
||||||
example = [ "chat.freenode.net" "irc.freenode.net" ];
|
example = [ "irc.oftc.net" ];
|
||||||
description = "IRC Server Address List.";
|
description = "IRC Server Address List.";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -239,11 +239,10 @@ in {
|
||||||
default = { };
|
default = { };
|
||||||
example = literalExpression ''
|
example = literalExpression ''
|
||||||
{
|
{
|
||||||
freenode = {
|
oftc = {
|
||||||
autojoin = [
|
autojoin = [
|
||||||
"#home-manager"
|
"#home-manager"
|
||||||
"#linux"
|
"#linux"
|
||||||
"#nixos"
|
|
||||||
];
|
];
|
||||||
charset = "UTF-8 (Unicode)";
|
charset = "UTF-8 (Unicode)";
|
||||||
commands = [
|
commands = [
|
||||||
|
@ -263,8 +262,7 @@ in {
|
||||||
password = "my_password";
|
password = "my_password";
|
||||||
realName = "my_realname";
|
realName = "my_realname";
|
||||||
servers = [
|
servers = [
|
||||||
"chat.freenode.net"
|
"irc.oftc.net"
|
||||||
"irc.freenode.net"
|
|
||||||
];
|
];
|
||||||
userName = "my_username";
|
userName = "my_username";
|
||||||
};
|
};
|
||||||
|
|
|
@ -11,7 +11,7 @@ let
|
||||||
toHimalayaConfig = account:
|
toHimalayaConfig = account:
|
||||||
{
|
{
|
||||||
email = account.address;
|
email = account.address;
|
||||||
name = account.realName;
|
display-name = account.realName;
|
||||||
default = account.primary;
|
default = account.primary;
|
||||||
|
|
||||||
mailboxes = {
|
mailboxes = {
|
||||||
|
@ -20,30 +20,46 @@ let
|
||||||
draft = account.folders.drafts;
|
draft = account.folders.drafts;
|
||||||
# NOTE: himalaya does not support configuring the name of the trash folder
|
# 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
|
# FIXME: does not support disabling TLS altogether
|
||||||
# NOTE: does not accept sequence of strings for password commands
|
# NOTE: does not accept sequence of strings for password commands
|
||||||
|
backend = account.himalaya.backend;
|
||||||
imap-login = account.userName;
|
imap-login = account.userName;
|
||||||
imap-passwd-cmd = lib.escapeShellArgs account.passwordCommand;
|
imap-passwd-cmd = lib.escapeShellArgs account.passwordCommand;
|
||||||
imap-host = account.imap.host;
|
imap-host = account.imap.host;
|
||||||
imap-port = account.imap.port;
|
imap-port = account.imap.port;
|
||||||
imap-starttls = account.imap.tls.useStartTls;
|
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-login = account.userName;
|
||||||
smtp-passwd-cmd = lib.escapeShellArgs account.passwordCommand;
|
smtp-passwd-cmd = lib.escapeShellArgs account.passwordCommand;
|
||||||
smtp-host = account.smtp.host;
|
smtp-host = account.smtp.host;
|
||||||
smtp-port = account.smtp.port;
|
smtp-port = account.smtp.port;
|
||||||
smtp-starttls = account.smtp.tls.useStartTls;
|
smtp-starttls = account.smtp.tls.useStartTls;
|
||||||
} // (lib.optionalAttrs (account.signature.showSignature == "append") {
|
} else if account.himalaya.sender == "sendmail" then {
|
||||||
# FIXME: signature cannot be attached
|
sender = account.himalaya.sender;
|
||||||
signature = account.signature.text;
|
} else
|
||||||
}) // account.himalaya.settings;
|
throw "Unsupported sender: ${account.himalaya.sender}")
|
||||||
|
// account.himalaya.settings;
|
||||||
in {
|
in {
|
||||||
# NOTE: will not start without this configured, but each account overrides it
|
# NOTE: will not start without this configured, but each account overrides it
|
||||||
name = "";
|
display-name = "";
|
||||||
} // cfg.settings // (lib.mapAttrs (_: toHimalayaConfig) enabledAccounts);
|
} // cfg.settings // (lib.mapAttrs (_: toHimalayaConfig) enabledAccounts);
|
||||||
in {
|
in {
|
||||||
meta.maintainers = with lib.hm.maintainers; [ ambroisie ];
|
meta.maintainers = with lib.hm.maintainers; [ toastal ];
|
||||||
|
|
||||||
options = with lib; {
|
options = with lib; {
|
||||||
programs.himalaya = {
|
programs.himalaya = {
|
||||||
|
@ -63,7 +79,8 @@ in {
|
||||||
default = { };
|
default = { };
|
||||||
example = lib.literalExpression ''
|
example = lib.literalExpression ''
|
||||||
{
|
{
|
||||||
default-page-size = 50;
|
email-listing-page-size = 50;
|
||||||
|
watch-cmds = [ "mbsync -a" ]
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
description = ''
|
description = ''
|
||||||
|
@ -80,6 +97,22 @@ in {
|
||||||
the himalaya mail client for this account
|
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 {
|
settings = mkOption {
|
||||||
type = tomlFormat.type;
|
type = tomlFormat.type;
|
||||||
default = { };
|
default = { };
|
||||||
|
|
|
@ -185,10 +185,10 @@ in {
|
||||||
default = { };
|
default = { };
|
||||||
example = literalExpression ''
|
example = literalExpression ''
|
||||||
{
|
{
|
||||||
freenode = {
|
liberachat = {
|
||||||
nick = "hmuser";
|
nick = "hmuser";
|
||||||
server = {
|
server = {
|
||||||
address = "chat.freenode.net";
|
address = "irc.libera.chat";
|
||||||
port = 6697;
|
port = 6697;
|
||||||
autoConnect = true;
|
autoConnect = true;
|
||||||
};
|
};
|
||||||
|
|
|
@ -36,11 +36,6 @@ in {
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
home.packages = [ cfg.package ];
|
home.packages = [ cfg.package ];
|
||||||
|
|
||||||
home.sessionVariables = {
|
home.sessionVariables.JAVA_HOME = cfg.package.home;
|
||||||
JAVA_HOME = fileContents (pkgs.runCommandLocal "java-home" { } ''
|
|
||||||
source "${cfg.package}/nix-support/setup-hook"
|
|
||||||
echo "$JAVA_HOME" > $out
|
|
||||||
'');
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,44 +9,14 @@ let
|
||||||
in {
|
in {
|
||||||
meta.maintainers = [ hm.maintainers.maximsmol ];
|
meta.maintainers = [ hm.maintainers.maximsmol ];
|
||||||
|
|
||||||
options.programs.just = {
|
imports = let
|
||||||
enable = mkEnableOption
|
msg = ''
|
||||||
"just, a handy way to save and run project-specific commands";
|
'program.just' is deprecated, simply add 'pkgs.just' to 'home.packages' instead.
|
||||||
|
See https://github.com/nix-community/home-manager/issues/3449#issuecomment-1329823502'';
|
||||||
package = mkOption {
|
in [
|
||||||
type = types.package;
|
(mkRemovedOptionModule [ "programs" "just" "enable" ] msg)
|
||||||
default = pkgs.just;
|
(mkRemovedOptionModule [ "programs" "just" "enableBashIntegration" ] msg)
|
||||||
defaultText = literalExpression "pkgs.just";
|
(mkRemovedOptionModule [ "programs" "just" "enableZshIntegration" ] msg)
|
||||||
description = "Package providing the <command>just</command> tool.";
|
(mkRemovedOptionModule [ "programs" "just" "enableFishIntegration" ] msg)
|
||||||
};
|
];
|
||||||
|
|
||||||
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
|
|
||||||
'';
|
|
||||||
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -240,6 +240,17 @@ in {
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
extraLuaConfig = mkOption {
|
||||||
|
type = types.lines;
|
||||||
|
default = "";
|
||||||
|
example = ''
|
||||||
|
vim.opt.nobackup = true
|
||||||
|
'';
|
||||||
|
description = ''
|
||||||
|
Custom lua lines.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
extraPackages = mkOption {
|
extraPackages = mkOption {
|
||||||
type = with types; listOf package;
|
type = with types; listOf package;
|
||||||
default = [ ];
|
default = [ ];
|
||||||
|
@ -373,6 +384,7 @@ in {
|
||||||
luaRcContent =
|
luaRcContent =
|
||||||
lib.optionalString (neovimConfig.neovimRcContent != "")
|
lib.optionalString (neovimConfig.neovimRcContent != "")
|
||||||
"vim.cmd [[source ${config.xdg.configHome}/nvim/init-home-manager.vim]]"
|
"vim.cmd [[source ${config.xdg.configHome}/nvim/init-home-manager.vim]]"
|
||||||
|
+ config.programs.neovim.extraLuaConfig
|
||||||
+ lib.optionalString hasLuaConfig
|
+ lib.optionalString hasLuaConfig
|
||||||
config.programs.neovim.generatedConfigs.lua;
|
config.programs.neovim.generatedConfigs.lua;
|
||||||
in mkIf (luaRcContent != "") { text = luaRcContent; };
|
in mkIf (luaRcContent != "") { text = luaRcContent; };
|
||||||
|
|
|
@ -6,14 +6,17 @@ let
|
||||||
|
|
||||||
cfg = config.programs.nushell;
|
cfg = config.programs.nushell;
|
||||||
|
|
||||||
tomlFormat = pkgs.formats.toml { };
|
|
||||||
|
|
||||||
linesOrSource = name:
|
linesOrSource = name:
|
||||||
types.submodule ({ config, ... }: {
|
types.submodule ({ config, ... }: {
|
||||||
options = {
|
options = {
|
||||||
text = mkOption {
|
text = mkOption {
|
||||||
type = types.lines;
|
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 = ''
|
description = ''
|
||||||
Text of the nushell <filename>${name}</filename> file.
|
Text of the nushell <filename>${name}</filename> file.
|
||||||
If unset then the source option will be preferred.
|
If unset then the source option will be preferred.
|
||||||
|
@ -22,18 +25,14 @@ let
|
||||||
|
|
||||||
source = mkOption {
|
source = mkOption {
|
||||||
type = types.nullOr types.path;
|
type = types.nullOr types.path;
|
||||||
default = pkgs.writeTextFile {
|
default = null;
|
||||||
inherit (config) text;
|
|
||||||
name = hm.strings.storeFileName name;
|
|
||||||
};
|
|
||||||
defaultText = literalExpression "file containing text";
|
|
||||||
description = ''
|
description = ''
|
||||||
Path of the nushell <filename>${name}</filename> file to use.
|
Path of the nushell <filename>${name}</filename> file to use.
|
||||||
|
If the text option is set, it will be preferred.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
in {
|
in {
|
||||||
meta.maintainers = [ maintainers.Philipp-M ];
|
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.
|
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 {
|
config = mkIf cfg.enable {
|
||||||
home.packages = [ cfg.package ];
|
home.packages = [ cfg.package ];
|
||||||
|
|
||||||
xdg.configFile = mkMerge [
|
xdg.configFile = mkMerge [
|
||||||
(mkIf (cfg.configFile != null) { "nushell/config.nu" = cfg.configFile; })
|
(mkIf (cfg.configFile != null || cfg.extraConfig != "") {
|
||||||
(mkIf (cfg.envFile != null) { "nushell/env.nu" = cfg.envFile; })
|
"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 {
|
else {
|
||||||
General = cfg.settings;
|
General = cfg.settings;
|
||||||
});
|
});
|
||||||
"pet/snippet.toml".source =
|
"pet/snippet.toml" = mkIf (cfg.snippets != [ ]) {
|
||||||
format.generate "snippet.toml" { snippets = cfg.snippets; };
|
source = format.generate "snippet.toml" { snippets = cfg.snippets; };
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -58,36 +58,24 @@ in {
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
enableBashIntegration = mkOption {
|
enableBashIntegration = mkEnableOption "Bash integration" // {
|
||||||
default = true;
|
default = true;
|
||||||
type = types.bool;
|
|
||||||
description = ''
|
|
||||||
Whether to enable Bash integration.
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
|
|
||||||
enableZshIntegration = mkOption {
|
enableZshIntegration = mkEnableOption "Zsh integration" // {
|
||||||
default = true;
|
default = true;
|
||||||
type = types.bool;
|
|
||||||
description = ''
|
|
||||||
Whether to enable Zsh integration.
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
|
|
||||||
enableFishIntegration = mkOption {
|
enableFishIntegration = mkEnableOption "Fish integration" // {
|
||||||
default = true;
|
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;
|
default = true;
|
||||||
type = types.bool;
|
|
||||||
description = ''
|
|
||||||
Whether to enable Ion integration.
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -121,5 +109,22 @@ in {
|
||||||
eval $(${starshipCmd} init ion)
|
eval $(${starshipCmd} init ion)
|
||||||
end
|
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 ]);
|
type = with types; attrsOf (oneOf [ bool int str ]);
|
||||||
default = { };
|
default = { };
|
||||||
example = literalExpression ''
|
example = literalExpression ''
|
||||||
|
{
|
||||||
embed-thumbnail = true;
|
embed-thumbnail = true;
|
||||||
embed-subs = true;
|
embed-subs = true;
|
||||||
sub-langs = "all";
|
sub-langs = "all";
|
||||||
downloader = "aria2c";
|
downloader = "aria2c";
|
||||||
downloader-args = "aria2c:'-c -x8 -s8 -k1M'";
|
downloader-args = "aria2c:'-c -x8 -s8 -k1M'";
|
||||||
|
}
|
||||||
'';
|
'';
|
||||||
description = ''
|
description = ''
|
||||||
Configuration written to
|
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>
|
<citerefentry>
|
||||||
<refentrytitle>fnott.ini</refentrytitle>
|
<refentrytitle>fnott.ini</refentrytitle>
|
||||||
<manvolnum>5</manvolnum>
|
<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"/>
|
xlink:href="https://codeberg.org/dnkl/fnott/src/branch/master/fnott.ini"/>
|
||||||
for an example configuration.
|
for an example configuration.
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -109,7 +109,7 @@ let
|
||||||
example =
|
example =
|
||||||
"[ \${pkg.sway}/bin/swaymsg workspace 1, move workspace to eDP-1 ]";
|
"[ \${pkg.sway}/bin/swaymsg workspace 1, move workspace to eDP-1 ]";
|
||||||
description = ''
|
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
|
Note that if you provide multiple commands, they will be
|
||||||
executed asynchronously with no guaranteed ordering.
|
executed asynchronously with no guaranteed ordering.
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -129,8 +129,8 @@ in {
|
||||||
type = types.nullOr types.str;
|
type = types.nullOr types.str;
|
||||||
description = ''
|
description = ''
|
||||||
Set margin of each edge specified in pixels. Specify single value to
|
Set margin of each edge specified in pixels. Specify single value to
|
||||||
apply margin on all sides. Two comma-seperated values will set
|
apply margin on all sides. Two comma-separated values will set
|
||||||
vertical and horizontal edges seperately. Four comma-seperated will
|
vertical and horizontal edges separately. Four comma-seperated will
|
||||||
give each edge a seperate value.
|
give each edge a seperate value.
|
||||||
For example: 10,20,5 will set top margin to 10, left and right to 20
|
For example: 10,20,5 will set top margin to 10, left and right to 20
|
||||||
and bottom to five.
|
and bottom to five.
|
||||||
|
@ -142,8 +142,8 @@ in {
|
||||||
type = types.nullOr types.str;
|
type = types.nullOr types.str;
|
||||||
description = ''
|
description = ''
|
||||||
Set padding of each edge specified in pixels. Specify single value to
|
Set padding of each edge specified in pixels. Specify single value to
|
||||||
apply margin on all sides. Two comma-seperated values will set
|
apply margin on all sides. Two comma-separated values will set
|
||||||
vertical and horizontal edges seperately. Four comma-seperated will
|
vertical and horizontal edges separately. Four comma-seperated will
|
||||||
give each edge a seperate value.
|
give each edge a seperate value.
|
||||||
For example: 10,20,5 will set top margin to 10, left and right to 20
|
For example: 10,20,5 will set top margin to 10, left and right to 20
|
||||||
and bottom to five.
|
and bottom to five.
|
||||||
|
|
|
@ -46,7 +46,7 @@ in {
|
||||||
Description = "Discord Rich Presence for MPD";
|
Description = "Discord Rich Presence for MPD";
|
||||||
Documentation = "https://github.com/JakeStanger/mpd-discord-rpc";
|
Documentation = "https://github.com/JakeStanger/mpd-discord-rpc";
|
||||||
After = [ "graphical-session-pre.target" ];
|
After = [ "graphical-session-pre.target" ];
|
||||||
PartOf = [ "graphical-session.desktop" ];
|
PartOf = [ "graphical-session.target" ];
|
||||||
};
|
};
|
||||||
Service = {
|
Service = {
|
||||||
ExecStart = "${cfg.package}/bin/mpd-discord-rpc";
|
ExecStart = "${cfg.package}/bin/mpd-discord-rpc";
|
||||||
|
|
|
@ -198,10 +198,10 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
backend = mkOption {
|
backend = mkOption {
|
||||||
type = types.enum [ "glx" "xrender" "xr_glx_hybrid" ];
|
type = types.enum [ "egl" "glx" "xrender" "xr_glx_hybrid" ];
|
||||||
default = "xrender";
|
default = "xrender";
|
||||||
description = ''
|
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;
|
with lib;
|
||||||
|
|
||||||
let
|
let
|
||||||
|
|
||||||
cfg = config.services.polybar;
|
cfg = config.services.polybar;
|
||||||
|
opt = options.services.polybar;
|
||||||
|
|
||||||
eitherStrBoolIntList = with types;
|
eitherStrBoolIntList = with types;
|
||||||
either str (either bool (either int (listOf str)));
|
either str (either bool (either int (listOf str)));
|
||||||
|
@ -54,11 +55,17 @@ let
|
||||||
in "${key}=${value'}";
|
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 cfg.config}
|
||||||
${toPolybarIni (mapAttrs convertPolybarSection cfg.settings)}
|
${toPolybarIni (mapAttrs convertPolybarSection cfg.settings)}
|
||||||
${cfg.extraConfig}
|
${cfg.extraConfig}
|
||||||
'';
|
''
|
||||||
|
else
|
||||||
|
null;
|
||||||
|
|
||||||
in {
|
in {
|
||||||
options = {
|
options = {
|
||||||
|
@ -198,15 +205,17 @@ in {
|
||||||
lib.platforms.linux)
|
lib.platforms.linux)
|
||||||
];
|
];
|
||||||
|
|
||||||
|
meta.maintainers = with maintainers; [ h7x4 ];
|
||||||
|
|
||||||
home.packages = [ cfg.package ];
|
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 = {
|
systemd.user.services.polybar = {
|
||||||
Unit = {
|
Unit = {
|
||||||
Description = "Polybar status bar";
|
Description = "Polybar status bar";
|
||||||
PartOf = [ "tray.target" ];
|
PartOf = [ "tray.target" ];
|
||||||
X-Restart-Triggers =
|
X-Restart-Triggers = mkIf (configFile != null) "${configFile}";
|
||||||
[ "${config.xdg.configFile."polybar/config.ini".source}" ];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
Service = {
|
Service = {
|
||||||
|
|
|
@ -8,7 +8,7 @@ in {
|
||||||
meta.maintainers = [ maintainers.thibautmarty ];
|
meta.maintainers = [ maintainers.thibautmarty ];
|
||||||
|
|
||||||
options.services.poweralertd.enable =
|
options.services.poweralertd.enable =
|
||||||
mkEnableOption "the Upower-powered power alerterd";
|
mkEnableOption "the Upower-powered power alertd";
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
assertions = [
|
assertions = [
|
||||||
|
|
|
@ -39,7 +39,8 @@ in {
|
||||||
|
|
||||||
home.packages = [ cfg.package ];
|
home.packages = [ cfg.package ];
|
||||||
|
|
||||||
xdg.configFile."pueue/pueue.yml".source = configFile;
|
xdg.configFile =
|
||||||
|
mkIf (cfg.settings != { }) { "pueue/pueue.yml".source = configFile; };
|
||||||
|
|
||||||
systemd.user = {
|
systemd.user = {
|
||||||
services.pueued = {
|
services.pueued = {
|
||||||
|
|
|
@ -88,7 +88,7 @@ in {
|
||||||
{ event = "lock"; command = "lock"; }
|
{ event = "lock"; command = "lock"; }
|
||||||
]
|
]
|
||||||
'';
|
'';
|
||||||
description = "Run command on occurence of a event.";
|
description = "Run command on occurrence of a event.";
|
||||||
};
|
};
|
||||||
|
|
||||||
extraArgs = mkOption {
|
extraArgs = mkOption {
|
||||||
|
|
|
@ -193,7 +193,7 @@ let
|
||||||
# We have to make sure the wrapper does not start a dbus session
|
# We have to make sure the wrapper does not start a dbus session
|
||||||
export DBUS_SESSION_BUS_ADDRESS=1
|
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 || {
|
i3 -c ${configFile} -C -d all || {
|
||||||
echo "i3 configuration validation failed"
|
echo "i3 configuration validation failed"
|
||||||
echo "For a verbose log of the failure, run 'i3 -c ${configFile} -C -d all'"
|
echo "For a verbose log of the failure, run 'i3 -c ${configFile} -C -d all'"
|
||||||
|
|
|
@ -33,7 +33,7 @@ in {
|
||||||
<refentrytitle>swaynag</refentrytitle>
|
<refentrytitle>swaynag</refentrytitle>
|
||||||
<manvolnum>5</manvolnum>
|
<manvolnum>5</manvolnum>
|
||||||
</citerefentry>
|
</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>
|
Note, configurations declared under <literal><config></literal>
|
||||||
will override the default type values of swaynag.
|
will override the default type values of swaynag.
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -50,7 +50,7 @@ in {
|
||||||
AppleMetricUnits = mkNullableEnableOption "the metric system";
|
AppleMetricUnits = mkNullableEnableOption "the metric system";
|
||||||
|
|
||||||
NSAutomaticCapitalizationEnabled =
|
NSAutomaticCapitalizationEnabled =
|
||||||
mkNullableEnableOption "automatic captilization";
|
mkNullableEnableOption "automatic capitalization";
|
||||||
|
|
||||||
NSAutomaticDashSubstitutionEnabled =
|
NSAutomaticDashSubstitutionEnabled =
|
||||||
mkNullableEnableOption "smart dashes";
|
mkNullableEnableOption "smart dashes";
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
description = "NixOS configuration";
|
description = "Darwin configuration";
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
|
|
|
@ -166,6 +166,7 @@ import nmt {
|
||||||
./modules/programs/yt-dlp
|
./modules/programs/yt-dlp
|
||||||
./modules/services/barrier
|
./modules/services/barrier
|
||||||
./modules/services/borgmatic
|
./modules/services/borgmatic
|
||||||
|
./modules/services/cachix-agent
|
||||||
./modules/services/devilspie2
|
./modules/services/devilspie2
|
||||||
./modules/services/dropbox
|
./modules/services/dropbox
|
||||||
./modules/services/emacs
|
./modules/services/emacs
|
||||||
|
|
|
@ -1,9 +1,6 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ ... }:
|
||||||
|
|
||||||
with lib;
|
|
||||||
|
|
||||||
{
|
{
|
||||||
config = {
|
|
||||||
programs.broot = {
|
programs.broot = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings.modal = true;
|
settings.modal = true;
|
||||||
|
@ -12,7 +9,7 @@ with lib;
|
||||||
nmt.script = ''
|
nmt.script = ''
|
||||||
assertFileExists home-files/.config/broot/conf.toml
|
assertFileExists home-files/.config/broot/conf.toml
|
||||||
assertFileContent 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"}]
|
imports = ["verbs.hjson", {file = "dark-blue-skin.hjson", luma = ["dark", "unknown"]}, {file = "white-skin.hjson", luma = "light"}]
|
||||||
modal = true
|
modal = true
|
||||||
show_selection_mark = true
|
show_selection_mark = true
|
||||||
|
@ -22,5 +19,4 @@ with lib;
|
||||||
''
|
''
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,4 +23,3 @@
|
||||||
</p></DL>
|
</p></DL>
|
||||||
</p></DL>
|
</p></DL>
|
||||||
</p></DL>
|
</p></DL>
|
||||||
</p></DL>
|
|
||||||
|
|
|
@ -11,8 +11,8 @@
|
||||||
{
|
{
|
||||||
source = pkgs.fetchurl {
|
source = pkgs.fetchurl {
|
||||||
url =
|
url =
|
||||||
"https://keybase.io/rycee/pgp_keys.asc?fingerprint=36cacf52d098cc0e78fb0cb13573356c25c424d4";
|
"https://keys.openpgp.org/pks/lookup?op=get&options=mr&search=0x36cacf52d098cc0e78fb0cb13573356c25c424d4";
|
||||||
sha256 = "082mjy6llvrdry6i9r5gx97nw9d89blnam7bghza4ynsjk1mmx6c";
|
hash = "sha256-9Zjsb/TtOyiPzMO/Jg3CtJwSxuw7QmX0pcfZT2/1w5E=";
|
||||||
};
|
};
|
||||||
trust = 1; # "unknown"
|
trust = 1; # "unknown"
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
test.stubs.gnupg = { };
|
test.stubs.gnupg = { };
|
||||||
|
test.stubs.systemd = { }; # depends on gnupg.override
|
||||||
|
|
||||||
nmt.script = ''
|
nmt.script = ''
|
||||||
assertFileContains activate "export GNUPGHOME='/home/hm-user/.gnupg'"
|
assertFileContains activate "export GNUPGHOME='/home/hm-user/.gnupg'"
|
||||||
|
|
|
@ -8,7 +8,7 @@ S=irc.mzima.net
|
||||||
S=irc.prison.net
|
S=irc.prison.net
|
||||||
J=#computers
|
J=#computers
|
||||||
|
|
||||||
N=freenode
|
N=oftc
|
||||||
L=6
|
L=6
|
||||||
E=UTF-8 (Unicode)
|
E=UTF-8 (Unicode)
|
||||||
F=12
|
F=12
|
||||||
|
@ -17,8 +17,6 @@ i=user_
|
||||||
R=real_user
|
R=real_user
|
||||||
U=user
|
U=user
|
||||||
P=password
|
P=password
|
||||||
S=chat.freenode.net
|
S=irc.oftc.net
|
||||||
S=irc.freenode.net
|
|
||||||
J=#home-manager
|
J=#home-manager
|
||||||
J=#nixos
|
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
enable = true;
|
enable = true;
|
||||||
overwriteConfigFiles = true;
|
overwriteConfigFiles = true;
|
||||||
channels = {
|
channels = {
|
||||||
freenode = {
|
oftc = {
|
||||||
charset = "UTF-8 (Unicode)";
|
charset = "UTF-8 (Unicode)";
|
||||||
userName = "user";
|
userName = "user";
|
||||||
password = "password";
|
password = "password";
|
||||||
|
@ -18,8 +18,8 @@
|
||||||
autoconnect = true;
|
autoconnect = true;
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
};
|
};
|
||||||
servers = [ "chat.freenode.net" "irc.freenode.net" ];
|
servers = [ "irc.oftc.net" ];
|
||||||
autojoin = [ "#home-manager" "#nixos" ];
|
autojoin = [ "#home-manager" ];
|
||||||
};
|
};
|
||||||
efnet = {
|
efnet = {
|
||||||
options = { forceSSL = true; };
|
options = { forceSSL = true; };
|
||||||
|
|
|
@ -1,16 +1,18 @@
|
||||||
|
display-name = ""
|
||||||
downloads-dir = "/data/download"
|
downloads-dir = "/data/download"
|
||||||
name = ""
|
|
||||||
|
|
||||||
["hm@example.com"]
|
["hm@example.com"]
|
||||||
|
backend = "imap"
|
||||||
default = true
|
default = true
|
||||||
default-page-size = 50
|
display-name = "H. M. Test"
|
||||||
email = "hm@example.com"
|
email = "hm@example.com"
|
||||||
|
email-listing-page-size = 50
|
||||||
imap-host = "imap.example.com"
|
imap-host = "imap.example.com"
|
||||||
imap-login = "home.manager"
|
imap-login = "home.manager"
|
||||||
imap-passwd-cmd = "'password-command'"
|
imap-passwd-cmd = "'password-command'"
|
||||||
imap-port = 995
|
imap-port = 995
|
||||||
imap-starttls = false
|
imap-starttls = false
|
||||||
name = "H. M. Test"
|
sender = "smtp"
|
||||||
smtp-host = "smtp.example.com"
|
smtp-host = "smtp.example.com"
|
||||||
smtp-login = "home.manager"
|
smtp-login = "home.manager"
|
||||||
smtp-passwd-cmd = "'password-command'"
|
smtp-passwd-cmd = "'password-command'"
|
||||||
|
|
|
@ -10,7 +10,9 @@ with lib;
|
||||||
himalaya = {
|
himalaya = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
settings = { default-page-size = 50; };
|
backend = "imap";
|
||||||
|
sender = "smtp";
|
||||||
|
settings = { email-listing-page-size = 50; };
|
||||||
};
|
};
|
||||||
|
|
||||||
folders = {
|
folders = {
|
||||||
|
@ -38,4 +40,3 @@ with lib;
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -102,14 +102,14 @@ with lib;
|
||||||
icons = "awesome5"
|
icons = "awesome5"
|
||||||
theme = "gruvbox-dark"
|
theme = "gruvbox-dark"
|
||||||
[[block]]
|
[[block]]
|
||||||
alert = 10
|
alert = 10.0
|
||||||
alias = "/"
|
alias = "/"
|
||||||
block = "disk_space"
|
block = "disk_space"
|
||||||
info_type = "available"
|
info_type = "available"
|
||||||
interval = 60
|
interval = 60
|
||||||
path = "/"
|
path = "/"
|
||||||
unit = "GB"
|
unit = "GB"
|
||||||
warning = 20
|
warning = 20.0
|
||||||
|
|
||||||
[[block]]
|
[[block]]
|
||||||
block = "memory"
|
block = "memory"
|
||||||
|
|
|
@ -16,14 +16,14 @@ with lib;
|
||||||
icons = "none"
|
icons = "none"
|
||||||
theme = "plain"
|
theme = "plain"
|
||||||
[[block]]
|
[[block]]
|
||||||
alert = 10
|
alert = 10.0
|
||||||
alias = "/"
|
alias = "/"
|
||||||
block = "disk_space"
|
block = "disk_space"
|
||||||
info_type = "available"
|
info_type = "available"
|
||||||
interval = 60
|
interval = 60
|
||||||
path = "/"
|
path = "/"
|
||||||
unit = "GB"
|
unit = "GB"
|
||||||
warning = 20
|
warning = 20.0
|
||||||
|
|
||||||
[[block]]
|
[[block]]
|
||||||
block = "memory"
|
block = "memory"
|
||||||
|
|
|
@ -111,14 +111,14 @@ with lib;
|
||||||
pkgs.writeText "i3status-rust-expected-config" ''
|
pkgs.writeText "i3status-rust-expected-config" ''
|
||||||
icons = "awesome5"
|
icons = "awesome5"
|
||||||
[[block]]
|
[[block]]
|
||||||
alert = 10
|
alert = 10.0
|
||||||
alias = "/"
|
alias = "/"
|
||||||
block = "disk_space"
|
block = "disk_space"
|
||||||
info_type = "available"
|
info_type = "available"
|
||||||
interval = 60
|
interval = 60
|
||||||
path = "/"
|
path = "/"
|
||||||
unit = "GB"
|
unit = "GB"
|
||||||
warning = 20
|
warning = 20.0
|
||||||
|
|
||||||
[[block]]
|
[[block]]
|
||||||
block = "memory"
|
block = "memory"
|
||||||
|
|
|
@ -62,14 +62,14 @@ with lib;
|
||||||
icons = "none"
|
icons = "none"
|
||||||
theme = "plain"
|
theme = "plain"
|
||||||
[[block]]
|
[[block]]
|
||||||
alert = 10
|
alert = 10.0
|
||||||
alias = "/"
|
alias = "/"
|
||||||
block = "disk_space"
|
block = "disk_space"
|
||||||
info_type = "available"
|
info_type = "available"
|
||||||
interval = 60
|
interval = 60
|
||||||
path = "/"
|
path = "/"
|
||||||
unit = "GB"
|
unit = "GB"
|
||||||
warning = 20
|
warning = 20.0
|
||||||
|
|
||||||
[[block]]
|
[[block]]
|
||||||
block = "memory"
|
block = "memory"
|
||||||
|
|
|
@ -5,4 +5,5 @@
|
||||||
|
|
||||||
# waiting for a nixpkgs patch
|
# waiting for a nixpkgs patch
|
||||||
neovim-no-init = ./no-init.nix;
|
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 ]);
|
extraPython3Packages = (ps: with ps; [ jedi pynvim ]);
|
||||||
|
|
||||||
# plugins without associated config should not trigger the creation of init.vim
|
# 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 = ''
|
nmt.script = ''
|
||||||
nvimFolder="home-files/.config/nvim"
|
nvimFolder="home-files/.config/nvim"
|
||||||
|
|
|
@ -3,3 +3,4 @@ let $config = {
|
||||||
table_mode: rounded
|
table_mode: rounded
|
||||||
use_ls_colors: true
|
use_ls_colors: true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1 +1,2 @@
|
||||||
let-env FOO = 'BAR'
|
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;
|
programs.gpg.enable = true;
|
||||||
|
|
||||||
test.stubs.gnupg = { };
|
test.stubs.gnupg = { };
|
||||||
|
test.stubs.systemd = { }; # depends on gnupg.override
|
||||||
|
|
||||||
nmt.script = ''
|
nmt.script = ''
|
||||||
in="${config.systemd.user.sockets.gpg-agent.Socket.ListenStream}"
|
in="${config.systemd.user.sockets.gpg-agent.Socket.ListenStream}"
|
||||||
|
|
|
@ -12,6 +12,7 @@ with lib;
|
||||||
};
|
};
|
||||||
|
|
||||||
test.stubs.gnupg = { };
|
test.stubs.gnupg = { };
|
||||||
|
test.stubs.systemd = { }; # depends on gnupg.override
|
||||||
|
|
||||||
nmt.script = ''
|
nmt.script = ''
|
||||||
in="${config.systemd.user.sockets.gpg-agent.Socket.ListenStream}"
|
in="${config.systemd.user.sockets.gpg-agent.Socket.ListenStream}"
|
||||||
|
|
|
@ -47,7 +47,7 @@
|
||||||
serviceFile=home-files/.config/systemd/user/polybar.service
|
serviceFile=home-files/.config/systemd/user/polybar.service
|
||||||
|
|
||||||
assertFileExists $serviceFile
|
assertFileExists $serviceFile
|
||||||
assertFileRegex $serviceFile 'X-Restart-Triggers=.*polybar\.conf'
|
assertFileRegex $serviceFile 'X-Restart-Triggers=/nix/store/.*-polybar.conf$'
|
||||||
assertFileRegex $serviceFile 'ExecStart=.*/bin/polybar-start'
|
assertFileRegex $serviceFile 'ExecStart=.*/bin/polybar-start'
|
||||||
|
|
||||||
assertFileExists home-files/.config/polybar/config.ini
|
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