Compare commits

...

47 commits

Author SHA1 Message Date
dependabot[bot] b372d7f8d5
ci: bump cachix/install-nix-action from 20 to 21
Bumps [cachix/install-nix-action](https://github.com/cachix/install-nix-action) from 20 to 21.
- [Release notes](https://github.com/cachix/install-nix-action/releases)
- [Commits](https://github.com/cachix/install-nix-action/compare/v20...v21)

---
updated-dependencies:
- dependency-name: cachix/install-nix-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-29 02:04:35 +00:00
dependabot[bot] f9edbedaf0
ci: bump DeterminateSystems/update-flake-lock from 18 to 19
Bumps [DeterminateSystems/update-flake-lock](https://github.com/DeterminateSystems/update-flake-lock) from 18 to 19.
- [Release notes](https://github.com/DeterminateSystems/update-flake-lock/releases)
- [Commits](https://github.com/DeterminateSystems/update-flake-lock/compare/v18...v19)

---
updated-dependencies:
- dependency-name: DeterminateSystems/update-flake-lock
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-10 02:03:13 +00:00
dependabot[bot] d6f3ba090e
ci: bump cachix/install-nix-action from 19 to 20
Bumps [cachix/install-nix-action](https://github.com/cachix/install-nix-action) from 19 to 20.
- [Release notes](https://github.com/cachix/install-nix-action/releases)
- [Commits](https://github.com/cachix/install-nix-action/compare/v19...v20)

---
updated-dependencies:
- dependency-name: cachix/install-nix-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-03 21:06:30 +00:00
dependabot[bot] dd73caf55c
ci: bump DeterminateSystems/update-flake-lock from 17 to 18
Bumps [DeterminateSystems/update-flake-lock](https://github.com/DeterminateSystems/update-flake-lock) from 17 to 18.
- [Release notes](https://github.com/DeterminateSystems/update-flake-lock/releases)
- [Commits](https://github.com/DeterminateSystems/update-flake-lock/compare/v17...v18)

---
updated-dependencies:
- dependency-name: DeterminateSystems/update-flake-lock
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-03 20:45:35 +00:00
Robert Helgesson 7da74ff66d
ci: use the right channel
Also revert bad backport of broot test.
2023-04-03 22:07:24 +02:00
Robert Helgesson 83110c2598
gpg: fix URL of key in test case
Fixes #3803

(cherry picked from commit a34aaad2ae)
2023-03-25 11:07:22 +01:00
Gaetan Lepage 97b452d868
gpg: update hash in test
(cherry picked from commit 054d9e3187)
2023-03-25 11:07:10 +01:00
Naïm Favier 9154cd519a
Revert "[backport 22.11] starship: condition nushell integration on nushell 0.73+" (#3779)
This reverts commit 68163d27e9.
2023-03-17 16:31:41 +01:00
Naïm Favier 68163d27e9
[backport 22.11] starship: condition nushell integration on nushell 0.73+ (#3777)
Older versions are not supported: https://starship.rs/#nushell

(cherry picked from commit a3b90e5762)
2023-03-17 14:11:37 +01:00
dependabot[bot] 74e0b590c0
ci: bump DeterminateSystems/update-flake-lock from 16 to 17
Bumps [DeterminateSystems/update-flake-lock](https://github.com/DeterminateSystems/update-flake-lock) from 16 to 17.
- [Release notes](https://github.com/DeterminateSystems/update-flake-lock/releases)
- [Commits](https://github.com/DeterminateSystems/update-flake-lock/compare/v16...v17)

---
updated-dependencies:
- dependency-name: DeterminateSystems/update-flake-lock
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-13 02:12:06 +00:00
Lord-Valen b0be47978d
[Backport release-22.11] starship: add nushell integration #3701 (#3697)
* starship: add nushell integration support

(cherry picked from commit 7ae7250df8)

* starship: fix nushell integration

Overwrite starship/init.nu if already exists, since this is a cache
file for sourcing in `init.nu`.

(cherry picked from commit 646ac0ad17)

* starship: re-add ion integration

which was apparently mistakenly removed in commit 7ae7250

(cherry picked from commit a62e4c88d7)

* starship: Use mkEnableOption (#3701)

---------

Co-authored-by: Philipp Mildenberger <philipp@mildenberger.me>
Co-authored-by: Aidan Gauland <aidalgol@users.noreply.github.com>
Co-authored-by: Marcel Transier <34482842+marceltransier@users.noreply.github.com>
2023-03-08 15:24:16 +01:00
Naïm Favier 07b0b43a92
[backport 22.11] modules/git: make options passed to less(1) for diff-so-fancy configurable (#3751)
The `-X` prevents that screen is cleared when showing a diff that's
larger than my screen.

I.e. when running `git diff` and press `q`, the last thing I want to see
is the prompt with `git diff` and *not* the part of the diff I browsed,
to be clear

    $ git diff
    $ <cursor>

Considering that this is somewhat opinionated, I decided to build an
option which allows you to pass arbitrary commands to the less
invocation.

(cherry picked from commit cccd7622bd)

Co-authored-by: Maximilian Bosch <maximilian@mbosch.me>
2023-03-08 15:01:04 +01:00
Naïm Favier 86bb69b0b1
[backport 22.11] gpg: allow unsigned tags (#3730)
(cherry picked from commit d331cceec7)

Co-authored-by: Sylvain Fankhauser <sephi@fhtagn.top>
2023-03-02 12:45:46 +01:00
Wael Nasreddine a7d3f51e9e
[backport #3639] programs.neovim: add extraLuaConfig (#3727)
Co-authored-by: Guillaume Desforges <guillaume.desforges.pro@gmail.com>
2023-03-01 14:52:37 -08:00
Wael Nasreddine 71c6073ee0
[backport #3720] .github: pin nix 2.13 in workflows (#3728)
Co-authored-by: Naïm Favier <n@monade.li>
2023-03-01 13:43:44 -08:00
Thiago Kenji Okada 550809881b
[Backport release-22.11] picom: add egl backend to options (#3452)
Mirrors: 2beff9375c

Co-authored-by: Leix b <abone9999@gmail.com>
2023-02-27 22:34:00 +01:00
Robert Helgesson 2928097823
Fix 22.11 tests (#3678)
* broot: update test to match upstream changes

Fixes #3527

(cherry picked from commit 18b56e3f7d)

* broot: simplify test slightly

(cherry picked from commit d7a3c26854)

* i3status-rust: fix tests

Nix 2.12.0 slightly changed the JSON output format. This updates the
i3status-rust test cases to match.

(cherry picked from commit 263f6e4523)
2023-02-25 01:27:04 +01:00
Naïm Favier 00efa2d4c2
[backport 22.11] tests: fix gnupg stub (#3702)
systemd now depends on `gnupg.override`, so we need a stub for systemd too.

(cherry picked from commit 7ff468105d)
2023-02-25 00:46:15 +01:00
dependabot[bot] 2cb27c7911
ci: bump cachix/install-nix-action from 18 to 19
Bumps [cachix/install-nix-action](https://github.com/cachix/install-nix-action) from 18 to 19.
- [Release notes](https://github.com/cachix/install-nix-action/releases)
- [Commits](https://github.com/cachix/install-nix-action/compare/v18...v19)

---
updated-dependencies:
- dependency-name: cachix/install-nix-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-13 02:59:14 +00:00
dependabot[bot] 65c47ced08
ci: bump DeterminateSystems/update-flake-lock from 15 to 16
Bumps [DeterminateSystems/update-flake-lock](https://github.com/DeterminateSystems/update-flake-lock) from 15 to 16.
- [Release notes](https://github.com/DeterminateSystems/update-flake-lock/releases)
- [Commits](https://github.com/DeterminateSystems/update-flake-lock/compare/v15...v16)

---
updated-dependencies:
- dependency-name: DeterminateSystems/update-flake-lock
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-23 02:28:53 +00:00
Anders Kaseorg 89a8ba0b5b
home-manager: pass -L/--print-build-logs to nix build
When building from a flake, `nix build` hides the build output by
default, with a `-L`/`--print-build-logs` option to show it. Pass this
option along from `home-manager` if the user provides it.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
(cherry picked from commit c55fa26ce0)
2022-12-28 17:21:08 +01:00
Robert Helgesson 6b8836ce6c
cachix-agent: add module
(cherry picked from commit 939731b8cb)
2022-12-28 17:21:05 +01:00
Robert Helgesson 2d5b55d23d
home-environment: explicitly use coreutils
Before we used dirname and readlink from the ambient environment,
which caused problems when they don't behave as expected.

Fixes #3516

(cherry picked from commit d7eee202e5)
2022-12-28 17:20:03 +01:00
Kamal Al Marhubi 2bfcc6be42
home-manager: refine flake URI lookup
Depending on DHCP settings you might end up with different output from
running `hostname`. Eg, your local hostname is `mylaptop`, and your
home router is configured with a local domain of `.hoome.arpa`. In
this case:

    $ hostname
    mylaptop.home.arpa
    $ hostname -s
    mylaptop

If you then go to cafe which has its router configured with `.lan` as
its local domain. Then, if your DHCP settings accept the local domain
from the router,

    $ hostname
    myalaptop.lan
    $ hostname -s
    mylaptop

With the pre-existing behaviour, if you had a
`"me@mylaptop.home.arpa"` entry in `outputs.homeConfigurations`,
running `home-manager switch` would fail:

    $ home-manager switch
    error: flake 'git+file:///home/me/.config/nixpkgs' does not provide
    attribute 'packages.aarch64-darwin.homeConfigurations."me".activationPackage',
    'legacyPackages.aarch64-darwin.homeConfigurations."me".activationPackage'
    or 'homeConfigurations."me".activationPackage'

After this commit, you can put configuration in a `"me@mylaptop"`
entry in `outputs.homeConfigurations`, and everything will work on
either network.

(cherry picked from commit e7eba9cc46)
2022-12-28 17:19:40 +01:00
Norbert Melzer d965d248aa
java: remove IFD
The previous variant used IFD to generate the `JAVA_HOME` variable and relied on internal hooks of the `java` package, this failed for a user cross compiling their configuration.

This PR changes that and uses the `home` attribute, as documented in the very last sentence of the https://nixos.org/manual/nixpkgs/stable/#sec-language-java chapter.

(cherry picked from commit b3565b3447)
2022-12-28 17:19:23 +01:00
Robert Helgesson d977182704
home-manager: use hostname from Nixpkgs
Before the home-manager tool got hostname from the system, which was
not declarative or reproducible.

(cherry picked from commit 2af0d07678)
2022-12-28 17:19:00 +01:00
Mario Rodas 0e8125916b
treewide: fix typos
(cherry picked from commit b5c083300b)
2022-12-05 16:10:03 +01:00
Robert Helgesson 06fbc3a480
emacs: add note about inhibit-startup-message
(cherry picked from commit c3060ab937)
2022-12-05 16:10:02 +01:00
Mario Rodas 7eee2b197a
treewide: use liberachat and OFTC in examples
Freenode was taken over by a wannabe bitcoin millionaire [1], which
prompted the migration of communities to Libera Chat and OFTC [2].

[1] https://blog.bofh.it/debian/id_461
[2] https://hackaday.com/2021/05/20/freenode-debacle-prompts-staff-exodus-new-network/

(cherry picked from commit 6ce326cef9)
2022-12-05 16:10:01 +01:00
Mario Rodas 9ad9dfe371
yt-dlp: fix settings example
The yt-dlp settings should be an attribute set.

(cherry picked from commit e3e2abaef5)
2022-12-05 16:10:00 +01:00
James Chen-Smith 44ca0df409
flake: correct nix-darwin flake description
Corrects copy/paste mistake in the nix-darwin flake description.

(cherry picked from commit 90b0e5f440)
2022-12-05 16:09:59 +01:00
Robert Helgesson 50cee5be70
firefox: fix expected bookmarks in test
(cherry picked from commit 7bfe3cd9b0)
2022-12-05 16:09:41 +01:00
dependabot[bot] 3cd5c21b80
ci: bump DeterminateSystems/update-flake-lock from 14 to 15
Bumps [DeterminateSystems/update-flake-lock](https://github.com/DeterminateSystems/update-flake-lock) from 14 to 15.
- [Release notes](https://github.com/DeterminateSystems/update-flake-lock/releases)
- [Commits](https://github.com/DeterminateSystems/update-flake-lock/compare/v14...v15)

---
updated-dependencies:
- dependency-name: DeterminateSystems/update-flake-lock
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-05 12:43:36 +00:00
Robert Helgesson e704ef9ec7
neovim: avoid aliased package
(cherry picked from commit 848ae0d6bb)
2022-12-04 13:15:15 +01:00
Loïc Reynier 3c3af4bbff
pet: don't create file without snippets
(cherry picked from commit 15d94f3058)
2022-12-04 13:15:14 +01:00
Robert Helgesson 32c336c767
polybar: fix restart trigger
The old trigger would actually never cause a restart since the path
doesn't change. With this change the trigger is now using the actual
configuration path in the Nix store, which depends on the content.

(cherry picked from commit 65700a4fd1)
2022-12-04 13:15:03 +01:00
h7x4 6ee09246d9
polybar: don't generate config if no options are set (#3383)
* polybar: don't generate config if no options are set

* polybar: add h7x4 as maintainer

(cherry picked from commit 64f7a77517)
2022-12-04 13:14:55 +01:00
toastal 3bf287ef12
himalaya: 0.6.x config updates
Some properties were renamed. Big changes however include `backend` and
`sender` enum options.

(cherry picked from commit 9fb1bb9794)
2022-12-04 09:48:56 +01:00
toastal c4c5ef1fa8
email: add signature delimiter
While this is created to match `himalaya`’s configuration API, this
could easly be reused for other programs that consume the email module
by concatination the strings.

(cherry picked from commit 05d71f517b)
2022-12-04 09:48:55 +01:00
toastal e006495c15
maintainers: add toastal
I wish there there were a contribution option outside of the proprietary
closed-source, Microsoft GitHub platform :(

(cherry picked from commit 9e266ca2a7)
2022-12-04 09:48:54 +01:00
Kylie McClain e66194675f
mpd-discord-rpc: fix typo
(cherry picked from commit 518dca61c0)
2022-12-04 08:45:36 +01:00
maximsmol 6b71989c0d
just: deprecate module
The module is no longer necessary since completions work out of the
box now.

(cherry picked from commit eb3598cf44)
2022-12-03 10:26:42 +01:00
Mario Rodas 6d3912c6db
direnv: fix direnv configuration path
Direnv >=2.21.0 uses [1] $XDG_CONFIG_HOME/direnv/config.toml as
configuration path.

[1] 54cb3c5a91

(cherry picked from commit e38ce0ae16)
2022-12-02 18:29:49 +01:00
Robert Helgesson 8f26dec249
home-manager: update stable version to 22.11
(cherry picked from commit 71fa4cdf9c)
2022-12-02 15:52:14 +01:00
li 9cbe8a2888
pueue: fix for empty settings
PR #3230

(cherry picked from commit 63cef13e49)
2022-12-02 15:52:07 +01:00
Nick Cao e891b060e7
dbus: fix dbus-run-session command
Specifically, inform the command about the absolute path of
dbus-daemon. Otherwise it will try running dbus-daemon from PATH,
which may not always work.

PR #3405

(cherry picked from commit 02c0546033)
2022-11-29 13:27:42 +01:00
Philipp Mildenberger 73dbcfbca6
nushell: add options 'extraConfig' and 'extraEnv'
(cherry picked from commit 4a12f304e0)
2022-11-29 13:27:31 +01:00
78 changed files with 559 additions and 243 deletions

7
.github/CODEOWNERS vendored
View file

@ -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

View file

@ -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:

View file

@ -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

View file

@ -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

View file

@ -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.

View file

@ -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]

View file

@ -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>

View file

@ -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";

View file

@ -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;

View file

@ -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" )

View file

@ -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"

View file

@ -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:()' \

View file

@ -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}' \

View file

@ -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.
fi 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 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
;; ;;
*) *)

View file

@ -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;

View file

@ -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;

View file

@ -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";

View file

@ -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.
''; '';
}; };

View file

@ -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"; }];
};
} }

View file

@ -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

View file

@ -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'.
'';
}
]; ];
}; };
} }

View file

@ -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>

View file

@ -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.";
}; };

View file

@ -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

View file

@ -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

View file

@ -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 = "";
}; };

View file

@ -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;
}; };

View file

@ -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.
''; '';
}; };

View 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;

View file

@ -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";
}; };

View file

@ -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 = { };

View file

@ -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;
}; };

View file

@ -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
'');
};
}; };
} }

View file

@ -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
'';
};
} }

View file

@ -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; };

View file

@ -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
];
})
]; ];
}; };
} }

View file

@ -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; };
};
}; };
}; };
} }

View file

@ -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
'';
};
}; };
} }

View file

@ -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-subs = true; embed-thumbnail = true;
sub-langs = "all"; embed-subs = true;
downloader = "aria2c"; sub-langs = "all";
downloader-args = "aria2c:'-c -x8 -s8 -k1M'"; downloader = "aria2c";
downloader-args = "aria2c:'-c -x8 -s8 -k1M'";
}
''; '';
description = '' description = ''
Configuration written to Configuration written to

View 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" ];
};
};
}

View file

@ -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.
''; '';

View file

@ -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.
''; '';

View file

@ -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.

View file

@ -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";

View file

@ -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>.
''; '';
}; };

View file

@ -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
${toPolybarIni cfg.config} isDeclarativeConfig = cfg.settings != opt.settings.default || cfg.config
${toPolybarIni (mapAttrs convertPolybarSection cfg.settings)} != opt.config.default || cfg.extraConfig != opt.extraConfig.default;
${cfg.extraConfig} in if isDeclarativeConfig then
''; pkgs.writeText "polybar.conf" ''
${toPolybarIni cfg.config}
${toPolybarIni (mapAttrs convertPolybarSection cfg.settings)}
${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 = {

View file

@ -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 = [

View file

@ -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 = {

View file

@ -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 {

View file

@ -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'"

View file

@ -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>&lt;config&gt;</literal> Note, configurations declared under <literal>&lt;config&gt;</literal>
will override the default type values of swaynag. will override the default type values of swaynag.
''; '';

View file

@ -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";

View file

@ -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";

View file

@ -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

View file

@ -1,26 +1,22 @@
{ config, lib, pkgs, ... }: { ... }:
with lib;
{ {
config = { programs.broot = {
programs.broot = { enable = true;
enable = true; settings.modal = true;
settings.modal = true;
};
nmt.script = ''
assertFileExists home-files/.config/broot/conf.toml
assertFileContent home-files/.config/broot/conf.toml ${
pkgs.writeText "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
verbs = []
[skin]
''
}
'';
}; };
nmt.script = ''
assertFileExists home-files/.config/broot/conf.toml
assertFileContent home-files/.config/broot/conf.toml ${
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
verbs = []
[skin]
''
}
'';
} }

View file

@ -17,10 +17,9 @@
<DT><A HREF="https://nixos.org/" ADD_DATE="0" LAST_MODIFIED="0">homepage</A> <DT><A HREF="https://nixos.org/" ADD_DATE="0" LAST_MODIFIED="0">homepage</A>
<DT><A HREF="https://nixos.wiki/" ADD_DATE="0" LAST_MODIFIED="0">wiki</A> <DT><A HREF="https://nixos.wiki/" ADD_DATE="0" LAST_MODIFIED="0">wiki</A>
<DT><H3>Nix sites</H3> <DT><H3>Nix sites</H3>
<DL><p> <DL><p>
<DT><A HREF="https://nixos.org/" ADD_DATE="0" LAST_MODIFIED="0">homepage</A> <DT><A HREF="https://nixos.org/" ADD_DATE="0" LAST_MODIFIED="0">homepage</A>
<DT><A HREF="https://nixos.wiki/" ADD_DATE="0" LAST_MODIFIED="0">wiki</A> <DT><A HREF="https://nixos.wiki/" ADD_DATE="0" LAST_MODIFIED="0">wiki</A>
</p></DL>
</p></DL> </p></DL>
</p></DL> </p></DL>
</p></DL> </p></DL>

View file

@ -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"
} }

View file

@ -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'"

View file

@ -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

View file

@ -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; };

View file

@ -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'"

View file

@ -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;
} }
''; '';
} }

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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;
} }

View 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
''
}
'';
};
}

View file

@ -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"

View file

@ -3,3 +3,4 @@ let $config = {
table_mode: rounded table_mode: rounded
use_ls_colors: true use_ls_colors: true
} }

View file

@ -1 +1,2 @@
let-env FOO = 'BAR' let-env FOO = 'BAR'

View 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
''
}
'';
}

View file

@ -0,0 +1 @@
{ cachix = ./basic-setup.nix; }

View file

@ -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}"

View file

@ -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}"

View file

@ -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

View file

@ -1 +1,4 @@
{ polybar-basic-configuration = ./basic-configuration.nix; } {
polybar-basic-configuration = ./basic-configuration.nix;
polybar-empty-configuration = ./empty-configuration.nix;
}

View 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
'';
};
}