Compare commits

...
Author SHA1 Message Date
Austin HorstmanandGitHub d5f1f641b2 yazi: add main.lua support to plugins (#6394) (#7090)
Yazi is deprecating init.lua for main.lua usages. This adds support for
main.lua in plugins.

(cherry picked from commit 18fa9f323d)
2025-05-19 16:07:50 -05:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
e343c8dafd ci: bump DeterminateSystems/update-flake-lock from 24 to 25 (#7092)
Bumps [DeterminateSystems/update-flake-lock](https://github.com/determinatesystems/update-flake-lock) from 24 to 25.
- [Release notes](https://github.com/determinatesystems/update-flake-lock/releases)
- [Commits](https://github.com/determinatesystems/update-flake-lock/compare/v24...v25)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-19 16:07:30 -05:00
1eec32f0ef aerc-accounts: improve logic for parsing XOAUTH2 URL params (#6530) (#7068)
This commit fixes an issue in aerc-accounts that prevents oauth2
accounts from being generated from given parameters. It also allows
users to add XOAUTH2 credentials without having to add all four of
client_id, client_secret, token_endpoint, and scope. It further adds
tests for the XOAUTH2 config generation.

(cherry picked from commit 18e74c2e02)

Co-authored-by: eulalia <179992797+3ulalia@users.noreply.github.com>
2025-05-15 12:45:21 -05:00
Austin Horstman b4bbdc6fde flake-module: rename homeManagerModules to homeModules (#6406)
This reverts commit 066ba0c5cf. After
further discussion, we want to maintain this as the naming scheme going
forward to be similar to standards that have been trying to be
implemented in naming configurations and modules.

(cherry picked from commit 2c87a6475f)
2025-05-11 22:28:54 -05:00
isabelandAustin Horstman 304eb219e0 flake-module: use raw for homeConfgurations and deferredModule for modules (#6504)
(cherry picked from commit 0c0b0ac8af)
2025-05-11 22:28:54 -05:00
isabelandAustin Horstman 574e6ad23f flake-module: set _class (#6461)
This should *help* prevent bad imports.

(cherry picked from commit b15e9ec676)
2025-05-11 22:28:54 -05:00
isabelandAustin Horstman 0f1f1f62b3 flake-module: change type from lazyAttrsOf raw to lazyAttrsOf deferredModule (#6408)
(cherry picked from commit e5854b98cd)
2025-05-11 22:28:54 -05:00
Heitor AugustoandAustin Horstman 4f935631a3 flake-module: rename homeModules to homeManagerModules (#6392)
(cherry picked from commit 066ba0c5cf)
2025-05-11 22:28:54 -05:00
Robert HelgessonandAustin Horstman 48dadbde74 flake-module: fix naming
(cherry picked from commit a8159195bf)
2025-05-11 22:28:54 -05:00
Matt SturgeonandAustin Horstman ba926b8fb3 flake-module: add flake-parts module (#5229)
Add a flake-parts module, output as flakeModules.home-manager and flakeModules.default.

The module defines options for flake.homeModules and flake.homeConfigurations, based on the respective nixos equivalents; flake.nixosModules and flake.nixosConfigurations.

(cherry picked from commit a5e196d61f)
2025-05-11 22:28:54 -05:00
Robert Helgesson 50eee705bb ci: remove GitLab rycee/nur-expression update
This removes the automatic update of the Home Manager packaging in
<https://gitlab.com/rycee/nur-expressions/>. That setup is very old
and brittle, it should therefore not be used.

(cherry picked from commit 015f191310)
2025-05-02 09:41:22 +02:00
Robert Helgesson cd234af7e6 flake: bump nixpkgs 2025-05-02 09:03:44 +02:00
lordkekzandAustin Horstman dd26f75fb4 wayland: Make backwards compatibly by only settin tray target via mkDefault 2025-04-24 23:58:42 -05:00
Coutinho de SouzaandAustin Horstman 2cc9faab38 wayland: create tray.target if xsession is not enabled (#6332)
Create a internal/read-only trayTarget option for the xsession, which is
also used in wayland's config, if the former is not enabled.

Remove all other definitions of `systemd.user.targets.tray`, i. e, the
ones from the following modules: hyprland, sway, river and wayfire.
2025-04-24 23:58:42 -05:00
Thiago Kenji OkadaandAustin Horstman 5e7807ddb9 fnott: use config.wayland.systemd.target
Also add missing `ConditionEnvironment`.
2025-04-24 23:58:42 -05:00
Thiago Kenji OkadaandAustin Horstman fb4ede9afb clipman: use config.wayland.systemd.target
Also add `ConditionEnvironment`.
2025-04-24 23:58:42 -05:00
Thiago Kenji OkadaandAustin Horstman 649b33705f hypridle: use config.wayland.systemd.target 2025-04-24 23:58:42 -05:00
Thiago Kenji OkadaandAustin Horstman 437662aa13 hyprpaper: use config.wayland.systemd.target 2025-04-24 23:58:42 -05:00
Thiago Kenji OkadaandAustin Horstman d15116d7b9 avizo: use config.wayland.systemd.target 2025-04-24 23:58:42 -05:00
Thiago Kenji OkadaandAustin Horstman dd06754e42 wob: use config.wayland.systemd.target 2025-04-24 23:58:42 -05:00
Thiago Kenji OkadaandAustin Horstman 840affabc4 swayosd: use config.wayland.systemd.target 2025-04-24 23:58:42 -05:00
Thiago Kenji OkadaandAustin Horstman 64451ee998 swaync: use config.wayland.systemd.target 2025-04-24 23:58:42 -05:00
Thiago Kenji OkadaandAustin Horstman 16570f88c4 kanshi: use config.wayland.systemd.target
Also add `ConditionEnvironment`.
2025-04-24 23:58:42 -05:00
Thiago Kenji OkadaandAustin Horstman bf60c0be78 waybar: use config.wayland.systemd.target
Also add `ConditionEnvironment`.
2025-04-24 23:58:42 -05:00
Thiago Kenji OkadaandAustin Horstman b4de3da366 swayidle: use config.wayland.systemd.target
Also add `Unit.After`.
2025-04-24 23:58:42 -05:00
Thiago Kenji OkadaandAustin Horstman 34214fb508 wayland: add module 2025-04-24 23:58:42 -05:00
Graham ChristensenandGitHub c61bfe3ae6 home-manager: Feature test for flake support (#6825)
Feature testing flakes / nix-command is more robust over configuration
sniffing. Ultimately, the deciding factor should be if flakes work --
not if the config looks like they will / won't work.

This alternative test both asserts that the `nix` command is enabled,
and that flakes are enabled, without depending on whether or not
flakes are emitted as an experimental feature.

This is both repairing support for Determinate Nix 3, and prepares for
a potential future where Nix itself considers Flakes stable.

Closes #6702
2025-04-15 13:57:11 -05:00
Robin StummandAustin Horstman b4e98224ad broot: get rid of IFDs (backport of #6723)
(cherry picked from commit f4d9d1e2ad)
2025-04-08 06:07:32 -07:00
Thiago Kenji OkadaandAustin Horstman a9f8b3db21 news: add services.home-manager.autoExpire entry
(cherry picked from commit 5ee44bc7c2)
2025-04-04 16:20:13 -07:00
Thiago Kenji OkadaandAustin Horstman c8589e7fb1 home-manager-auto-expire: init
This commit introduces a new service that expires old Home-Manager
generations.

(cherry picked from commit 28242a60d3)
2025-04-04 16:20:13 -07:00
15c5f9d04f vscode: Support Cursor AI (#6417) (#6679)
Co-authored-by: HyunggyuJang <murasakipurplez5@gmail.com>
Co-authored-by: Hyunggyu Jang <hyunggyu.jang@42dot.ai>
2025-03-30 21:13:26 -05:00
Leandro Emmanuel Reina KipermanandGitHub 0948aeedc2 xdg-mime: Fix cross compilation (#6678) 2025-03-22 16:01:42 +01:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
f6af7280a3 ci: bump cachix/cachix-action from 15 to 16 (#6646)
Bumps [cachix/cachix-action](https://github.com/cachix/cachix-action) from 15 to 16.
- [Release notes](https://github.com/cachix/cachix-action/releases)
- [Commits](https://github.com/cachix/cachix-action/compare/v15...v16)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-17 13:05:39 -05:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
7fbde08ea2 ci: bump cachix/install-nix-action from 30 to 31 (#6645)
Bumps [cachix/install-nix-action](https://github.com/cachix/install-nix-action) from 30 to 31.
- [Release notes](https://github.com/cachix/install-nix-action/releases)
- [Commits](https://github.com/cachix/install-nix-action/compare/v30...v31)

---
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>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-17 13:05:24 -05:00
EmilyandGitHub 9d3d080aec nixos/common: fix options reference (#6477)
This was resolving to `lib.options.nix.enable.visible or true`,
which is always `true`, and therefore using `nix.enable` where it
shouldn’t be used. Oops…

(cherry picked from commit 25870c6600)
2025-02-16 20:04:09 -06:00
EmilyandGitHub 254d47082e nixos/common: forward nix.enable from the OS configuration (#6451)
This prevents problematic references to `nix.package` when Nix
management is disabled in the host OS.

(cherry picked from commit 9daae9a67a)
2025-02-14 16:09:59 -06:00
Sebastián EstrellaandRobert Helgesson bd65bc3cde ghostty: validate configuration on change
Runs `ghostty +validate-config` when the configuration file changes.

Co-authored-by: Heitor Augusto <IAm.HeitorALN@proton.me>
(cherry picked from commit 11ab08541e)
2025-01-08 22:58:59 +01:00
Heitor AugustoandRobert Helgesson d4b030780a ghostty: fix configuration for bat syntax
(cherry picked from commit a6f37e5785)
2025-01-08 22:58:58 +01:00
Heitor AugustoandRobert Helgesson e759746be4 ghostty: add module
Refs: 5f6aa268e4
2025-01-08 22:58:58 +01:00
Matthieu CoudronandRobert Helgesson 511143d3fa gpg: fix hash of test (#6200)
would fail on tests

(cherry picked from commit 15151bb5e7)
2025-01-08 22:49:36 +01:00
Robert Helgesson 64e7de90ee treewide: change pacien to euxane
To match a recent change in Nixpkgs.

(cherry picked from commit 35b98d20ca)
2025-01-08 21:02:54 +01:00
EmmChrissandRobert Helgesson 613691f285 pqiv: fix condition for writing pqivrc file
Specifically, write the configuration if either settings or
extraConfig are set.

(cherry picked from commit b7a7cd5dd1)
2024-12-28 01:04:50 +01:00
Simone RagusaandRobert Helgesson 80b0fdf483 docs: fix typo in 24.11 release notes
(cherry picked from commit 83ecd50915)
2024-12-16 17:23:14 +01:00
1318c3f3b0 [24.11 backport] isync/mbsync: update module for 1.5.0 changes (#6194)
* mbsync: Add NEWS entry about isync 1.5.0 changes

* mbsync: Place config file in $XDG_CONFIG_HOME

mbsync 1.5.0 supports placing isync's configuration file in
$XDG_CONFIG_HOME/isyncrc [1].

[1] https://sourceforge.net/projects/isync/files/isync/1.5.0/

* mbsync: Replace SSLType with TLSType

mbsync 1.5.0 replaced the name of the configuration option [1].

Also update SSLVersions to TLSVersions for the same reason. Inform the
user if the option was renamed.

[1] https://sourceforge.net/projects/isync/files/isync/1.5.0/

* mbsync: Replace SSLVersions with TLSVerisons

* mbsync: Update extraConfig.account example with SSL->TLS changes

Co-authored-by: Karl H <34152449+KarlJoad@users.noreply.github.com>
2024-12-11 22:12:16 +01:00
Robert Helgesson c7ffc9727d nix: simplify tests
(cherry picked from commit d00c6f6d0a)
2024-12-07 12:59:49 +01:00
Robert Helgesson 9afd809a3c xresources: simplify tests
(cherry picked from commit 63eb786e04)
2024-12-07 12:59:49 +01:00
Robert Helgesson f79a81d300 cmus: reduce test closure
(cherry picked from commit 0b42cc1b1c)
2024-12-07 12:59:49 +01:00
Robert Helgesson 901bce8b37 fcitx5: fix package reference in test
(cherry picked from commit 953521f759)
2024-12-07 12:59:49 +01:00
Ken MicklasandRobert Helgesson 176a1078a5 lorri: fix ReadWritePaths for new gcroots behavior
(cherry picked from commit 819f682269)
2024-12-07 12:23:47 +01:00
Igor RzegockiandRobert Helgesson e38d3dd1d3 kubecolor: add module
(cherry picked from commit 8632735050)
2024-12-06 11:57:44 +01:00
Robert Helgesson 62d5362558 docs: set manual title 2024-12-01 11:49:21 +01:00
Robert Helgesson f46891fc0a home-manager: prepare 24.11 release
(cherry picked from commit 4964f3c6fc)
2024-12-01 11:45:40 +01:00
Sebastián Zavala VillagómezandRobert Helgesson f3111f62a2 hypridle: fix service when no config file
The systemd user service depends on

  config.xdg.configFile."hypr/hypridle.conf".source

for `X-Restart-Triggers`. When `cfg.settings` is the default `{}`,
this causes failure since

  config.xdg.configFile."hypr/hypridle.conf".source

will not exist.

Making the addition conditional on `cfg.settings` actually having
content, which would mean `xdg.configFile."hypr/hypridle.conf"` does
exist, avoids the error.

(cherry picked from commit 5e2f47c5a5)
2024-11-24 17:43:39 +01:00
Sebastián Zavala VillagómezandRobert Helgesson 2777de38dd hyprpaper: fix service when no config file
The systemd user service depends on

  config.xdg.configFile."hypr/hyprpaper.conf".source

for `X-Restart-Triggers`. When `cfg.settings` is the default `{}`,
this causes failure since

  config.xdg.configFile."hypr/hyprpaper.conf".source

will not exist.

Making the addition conditional on `cfg.settings` actually having
content, which would mean `xdg.configFile."hypr/hyprpaper.conf"` does
exist, avoids the error.

(cherry picked from commit bd58a1132e)
2024-11-24 14:06:48 +01:00
chayleafandRobert Helgesson f8831cc700 librewolf: hide bookmarks option
(cherry picked from commit 0bd5e9c76c)
2024-11-23 00:45:36 +01:00
chayleafandRobert Helgesson bef567c229 librewolf: use mkFirefoxModule
(cherry picked from commit 18462998b1)
2024-11-23 00:45:36 +01:00
Ilham AMandRobert Helgesson 30a16c91a4 zsh-abbr: update source path (#6084)
(cherry picked from commit f3a2ff6958)
2024-11-23 00:45:36 +01:00
Robert Helgesson 7145facdc6 espanso: fix test failure
(cherry picked from commit a46e702093)
2024-11-22 23:38:29 +01:00
Robert Helgesson 2d63276f05 tests: fix integration test
(cherry picked from commit 8cf9cb2ee7)
2024-11-22 23:12:19 +01:00
wadsaekandRobert Helgesson d47cc14f28 Translate using Weblate (Ukrainian)
Currently translated at 100.0% (37 of 37 strings)

Co-authored-by: wadsaek <wadsaek@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/home-manager/cli/uk/
Translation: Home Manager/Home Manager CLI
(cherry picked from commit 705cf3763a)
2024-11-22 23:12:05 +01:00
Lorenzo BevilacquaandRobert Helgesson 457715d0c0 Translate using Weblate (Italian)
Currently translated at 100.0% (37 of 37 strings)

Co-authored-by: Lorenzo Bevilacqua <lorenzobevilacqua02@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/home-manager/cli/it/
Translation: Home Manager/Home Manager CLI
(cherry picked from commit 094265fca0)
2024-11-22 23:12:05 +01:00
Robert Helgesson c36861027d ci: make dependabot consider release-24.11
(cherry picked from commit 0918bb0238)
2024-11-22 23:11:45 +01:00
Robert Helgesson c9b8488c92 home-manager: switch upstream references to 24.11 2024-11-22 23:09:22 +01:00
Robert Helgesson 3a1bd31376 home-manager: mark as release branch 2024-11-22 22:43:49 +01:00
118 changed files with 1176 additions and 350 deletions
+8
View File
@@ -15,3 +15,11 @@ updates:
interval: "weekly"
commit-message:
prefix: "ci:"
- package-ecosystem: "github-actions"
directory: "/"
target-branch: "release-24.11"
schedule:
interval: "weekly"
commit-message:
prefix: "ci:"
+2 -2
View File
@@ -11,10 +11,10 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v30
- uses: cachix/install-nix-action@v31
with:
nix_path: nixpkgs=channel:nixos-unstable
- uses: cachix/cachix-action@v15
- uses: cachix/cachix-action@v16
with:
name: nix-community
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
+2 -2
View File
@@ -12,9 +12,9 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v30
- uses: cachix/install-nix-action@v31
with:
nix_path: nixpkgs=channel:nixos-unstable
nix_path: nixpkgs=channel:nixos-24.11
- run: |
if grep -R --exclude stdlib-extended.nix literalExample modules ; then
echo "Error: literalExample should be replaced by literalExpression" > /dev/stderr
+2 -2
View File
@@ -12,9 +12,9 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Nix
uses: cachix/install-nix-action@v30
uses: cachix/install-nix-action@v31
- name: Update flake.lock
uses: DeterminateSystems/update-flake-lock@v24
uses: DeterminateSystems/update-flake-lock@v25
with:
token: ${{ secrets.GH_TOKEN_FOR_UPDATES }}
pr-labels: dependencies
-12
View File
@@ -18,15 +18,3 @@ pages:
rules:
- if: $CI_COMMIT_BRANCH == "master"
when: always
Deploy NUR:
stage: deploy
variables:
HM_BRANCH: $CI_COMMIT_REF_NAME
HM_COMMIT_SHA: $CI_COMMIT_SHA
trigger:
project: rycee/nur-expressions
branch: master
rules:
- if: $CI_COMMIT_BRANCH == "master" || $CI_COMMIT_BRANCH =~ /^release-/
when: always
+1 -1
View File
@@ -1,5 +1,5 @@
.PHONY: all all-tests test test-install format
NIXPKGS_REV := nixpkgs-unstable
NIXPKGS_REV := nixos-24.11
NIX_PATH := nixpkgs=https://github.com/NixOS/nixpkgs/archive/${NIXPKGS_REV}.tar.gz
all: all-tests test-install
+2 -2
View File
@@ -28,7 +28,7 @@ Releases
Home Manager is developed against `nixpkgs-unstable` branch, which often causes
it to contain tweaks for changes/packages not yet released in stable [NixOS][].
To avoid breaking users' configurations, Home Manager is released in branches
corresponding to NixOS releases (e.g. `release-24.05`). These branches get
corresponding to NixOS releases (e.g. `release-24.11`). These branches get
fixes, but usually not new modules. If you need a module to be backported, then
feel free to open an issue.
@@ -49,7 +49,7 @@ dconf store and cannot tell whether a configuration that it is about to be
overwritten was from a previous Home Manager generation or from manual
configuration.
Home Manager targets [NixOS][] unstable and NixOS version 24.05 (the current
Home Manager targets [NixOS][] unstable and NixOS version 24.11 (the current
stable version), it may or may not work on other Linux distributions and NixOS
versions.
+3 -3
View File
@@ -15,10 +15,10 @@ $ nix-channel --add https://github.com/nix-community/home-manager/archive/master
$ nix-channel --update
```
and if you follow a Nixpkgs version 24.05 channel, you can run
and if you follow a Nixpkgs version 24.11 channel, you can run
``` shell
$ nix-channel --add https://github.com/nix-community/home-manager/archive/release-24.05.tar.gz home-manager
$ nix-channel --add https://github.com/nix-community/home-manager/archive/release-24.11.tar.gz home-manager
$ nix-channel --update
```
@@ -45,7 +45,7 @@ home-manager.users.eve = { pkgs, ... }: {
# The state version is required and should stay at the version you
# originally installed.
home.stateVersion = "24.05";
home.stateVersion = "24.11";
};
```
+3 -3
View File
@@ -17,10 +17,10 @@ $ sudo nix-channel --add https://github.com/nix-community/home-manager/archive/m
$ sudo nix-channel --update
```
and if you follow a Nixpkgs version 24.05 channel, you can run
and if you follow a Nixpkgs version 24.11 channel, you can run
``` shell
$ sudo nix-channel --add https://github.com/nix-community/home-manager/archive/release-24.05.tar.gz home-manager
$ sudo nix-channel --add https://github.com/nix-community/home-manager/archive/release-24.11.tar.gz home-manager
$ sudo nix-channel --update
```
@@ -44,7 +44,7 @@ home-manager.users.eve = { pkgs, ... }: {
# The state version is required and should stay at the version you
# originally installed.
home.stateVersion = "24.05";
home.stateVersion = "24.11";
};
```
+2 -2
View File
@@ -19,10 +19,10 @@
$ nix-channel --update
```
and if you follow a Nixpkgs version 24.05 channel you can run
and if you follow a Nixpkgs version 24.11 channel you can run
``` shell
$ nix-channel --add https://github.com/nix-community/home-manager/archive/release-24.05.tar.gz home-manager
$ nix-channel --add https://github.com/nix-community/home-manager/archive/release-24.11.tar.gz home-manager
$ nix-channel --update
```
+1 -1
View File
@@ -1,6 +1,6 @@
# Home Manager Manual {#home-manager-manual}
## Version 24.05 (unstable)
## Version 24.11 (stable)
```{=include=} preface
+1
View File
@@ -30,6 +30,7 @@ nix-flakes/prerequisites.md
nix-flakes/standalone.md
nix-flakes/nixos.md
nix-flakes/nix-darwin.md
nix-flakes/flake-parts.md
```
+39
View File
@@ -0,0 +1,39 @@
# flake-parts module {#sec-flakes-flake-parts-module}
When using [flake-parts](https://flake.parts)
you may wish to import Home Manager's flake module,
`flakeModules.home-manager`.
``` nix
{
description = "flake-parts configuration";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
flake-parts.url = "github:hercules-ci/flake-parts";
};
outputs = inputs@{ flake-parts, ... }:
flake-parts.lib.mkFlake { inherit inputs; } {
imports = [
# Import home-manager's flake module
inputs.home-manager.flakeModules.home-manager
];
flake = {
# Define `homeModules`, `homeConfigurations`,
# `nixosConfigurations`, etc here
};
# See flake.parts for more features, such as `perSystem`
};
}
```
The flake module defines the `flake.homeModules` and `flake.homeConfigurations`
options, allowing them to be properly merged if they are defined in multiple
modules.
If you are only defining `homeModules` and/or `homeConfigurations` once in a
single module, flake-parts should work fine without importing
`flakeModules.home-manager`.
+3 -3
View File
@@ -11,10 +11,10 @@ then to generate and activate a basic configuration run the command
$ nix run home-manager/master -- init --switch
```
For Nixpkgs or NixOS version 24.05 run
For Nixpkgs or NixOS version 24.11 run
``` shell
$ nix run home-manager/release-24.05 -- init --switch
$ nix run home-manager/release-24.11 -- init --switch
```
This will generate a `flake.nix` and a `home.nix` file in
@@ -30,7 +30,7 @@ $ # Edit files in ~/.config/home-manager
$ nix run home-manager/$branch -- init --switch
```
Where `$branch` is one of `master` or `release-24.05`.
Where `$branch` is one of `master` or `release-24.11`.
After the initial activation has completed successfully then building
and activating your flake-based configuration is as simple as
+2 -2
View File
@@ -20,7 +20,7 @@ A fresh install of Home Manager will generate a minimal
# You can update Home Manager without changing this value. See
# the Home Manager release notes for a list of state version
# changes in each release.
home.stateVersion = "24.05";
home.stateVersion = "24.11";
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;
@@ -65,7 +65,7 @@ follows:
# You can update Home Manager without changing this value. See
# the Home Manager release notes for a list of state version
# changes in each release.
home.stateVersion = "24.05";
home.stateVersion = "24.11";
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;
+2 -3
View File
@@ -1,7 +1,6 @@
# Release 24.11 {#sec-release-24.11}
This is the current unstable branch and the information in this section
is therefore not final.
The 24.11 release branch became stable in November, 2024.
## Highlights {#sec-release-24.11-highlights}
@@ -29,4 +28,4 @@ The state version in this release includes the changes below. These
changes are only active if the `home.stateVersion` option is set to
\"24.11\" or later.
- No changes.
- There was no state version change in this release.
+33
View File
@@ -0,0 +1,33 @@
{ lib, flake-parts-lib, moduleLocation, ... }:
let inherit (lib) toString mapAttrs mkOption types;
in {
options = {
flake = flake-parts-lib.mkSubmoduleOptions {
homeConfigurations = mkOption {
type = types.lazyAttrsOf types.raw;
default = { };
description = ''
Instantiated Home Manager configurations.
`homeConfigurations` is for specific installations. If you want to expose
reusable configurations, add them to `homeModules` in the form of modules, so
that you can reference them in this or another flake's `homeConfigurations`.
'';
};
homeModules = mkOption {
type = types.lazyAttrsOf types.deferredModule;
default = { };
apply = mapAttrs (k: v: {
_class = "homeManager";
_file = "${toString moduleLocation}#homeModules.${k}";
imports = [ v ];
});
description = ''
Home Manager modules.
You may use this for reusable pieces of configuration, service modules, etc.
'';
};
};
};
}
Generated
+4 -4
View File
@@ -2,16 +2,16 @@
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1731139594,
"narHash": "sha256-IigrKK3vYRpUu+HEjPL/phrfh7Ox881er1UEsZvw9Q4=",
"lastModified": 1746055187,
"narHash": "sha256-3dqArYSMP9hM7Qpy5YWhnSjiqniSaT2uc5h2Po7tmg0=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "76612b17c0ce71689921ca12d9ffdc9c23ce40b2",
"rev": "3e362ce63e16b9572d8c2297c04f7c19ab6725a5",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"ref": "nixos-24.11",
"repo": "nixpkgs",
"type": "github"
}
+6 -1
View File
@@ -1,7 +1,7 @@
{
description = "Home Manager for Nix";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
outputs = { self, nixpkgs, ... }:
{
@@ -19,6 +19,11 @@
# unofficial; deprecated in Nix 2.8
darwinModule = self.darwinModules.default;
flakeModules = rec {
home-manager = import ./flake-module.nix;
default = home-manager;
};
templates = {
standalone = {
path = ./templates/standalone;
+6 -10
View File
@@ -43,13 +43,9 @@ function setWorkDir() {
fi
}
# Checks whether the 'flakes' and 'nix-command' Nix options are enabled.
# Check to see if flakes are functionally available.
function hasFlakeSupport() {
type -p nix > /dev/null \
&& nix show-config 2> /dev/null \
| grep experimental-features \
| grep flakes \
| grep -q nix-command
nix eval --expr 'builtins.getFlake' > /dev/null 2>&1
}
# Attempts to set the HOME_MANAGER_CONFIG global variable.
@@ -268,8 +264,8 @@ function doInit() {
withFlake=1
fi
local homeManagerUrl="github:nix-community/home-manager"
local nixpkgsUrl="github:nixos/nixpkgs/nixos-unstable"
local homeManagerUrl="github:nix-community/home-manager/release-24.11"
local nixpkgsUrl="github:nixos/nixpkgs/nixos-24.11"
while (( $# > 0 )); do
local opt="$1"
@@ -359,7 +355,7 @@ $xdgVars
# You should not change this value, even if you update Home Manager. If you do
# want to update the value, then make sure to first check the Home Manager
# release notes.
home.stateVersion = "24.05"; # Please read the comment before changing.
home.stateVersion = "24.11"; # Please read the comment before changing.
# The home.packages option allows you to install Nix packages into your
# environment.
@@ -857,7 +853,7 @@ function doUninstall() {
uninstall = true;
home.username = "$USER";
home.homeDirectory = "$HOME";
home.stateVersion = "24.05";
home.stateVersion = "24.11";
}
EOF
# shellcheck disable=2064
+4 -4
View File
@@ -8,8 +8,8 @@ msgstr ""
"Project-Id-Version: Home Manager\n"
"Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n"
"POT-Creation-Date: 2024-04-17 23:19+0200\n"
"PO-Revision-Date: 2024-02-29 10:10+0000\n"
"Last-Translator: FedFer98123 <fede.ferrari123@gmail.com>\n"
"PO-Revision-Date: 2024-11-18 15:00+0000\n"
"Last-Translator: Lorenzo Bevilacqua <lorenzobevilacqua02@gmail.com>\n"
"Language-Team: Italian <https://hosted.weblate.org/projects/home-manager/cli/"
"it/>\n"
"Language: it\n"
@@ -17,12 +17,12 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 5.5-dev\n"
"X-Generator: Weblate 5.9-dev\n"
#. translators: For example: "home-manager: missing argument for --cores"
#: home-manager/home-manager:16
msgid "%s: missing argument for %s"
msgstr ""
msgstr "%s: argomento mancante per %s"
#: home-manager/home-manager:64
msgid "No configuration file found at %s"
+4 -4
View File
@@ -8,8 +8,8 @@ msgstr ""
"Project-Id-Version: Home Manager\n"
"Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n"
"POT-Creation-Date: 2024-04-17 23:19+0200\n"
"PO-Revision-Date: 2024-02-18 14:02+0000\n"
"Last-Translator: Сергій <sergiy.goncharuk.1@gmail.com>\n"
"PO-Revision-Date: 2024-11-18 15:00+0000\n"
"Last-Translator: wadsaek <wadsaek@gmail.com>\n"
"Language-Team: Ukrainian <https://hosted.weblate.org/projects/home-manager/"
"cli/uk/>\n"
"Language: uk\n"
@@ -18,12 +18,12 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && "
"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
"X-Generator: Weblate 5.4\n"
"X-Generator: Weblate 5.9-dev\n"
#. translators: For example: "home-manager: missing argument for --cores"
#: home-manager/home-manager:16
msgid "%s: missing argument for %s"
msgstr ""
msgstr "%s: відсутній аргумент для %s"
#: home-manager/home-manager:64
msgid "No configuration file found at %s"
+61
View File
@@ -1827,6 +1827,67 @@ in {
as systemd services.
'';
}
{
time = "2024-12-06T10:03:58+00:00";
message = ''
A new module is available: 'programs.kubecolor'.
Kubecolor is a kubectl wrapper used to add colors to your kubectl
output.
'';
}
{
time = "2024-12-08T17:22:13+00:00";
condition = let
usingMbsync = any (a: a.mbsync.enable)
(attrValues config.accounts.email.accounts);
in usingMbsync;
message = ''
isync/mbsync 1.5.0 has changed several things.
isync gained support for using $XDG_CONFIG_HOME, and now places
its config file in '$XDG_CONFIG_HOME/isyncrc'.
isync changed the configuration options SSLType and SSLVersion to
TLSType and TLSVersion respectively.
All instances of
'accounts.email.accounts.<account-name>.mbsync.extraConfig.account'
that use 'SSLType' or 'SSLVersion' should be replaced with 'TLSType'
or 'TLSVersion', respectively.
TLSType options are unchanged.
TLSVersions has a new syntax, requiring a change to the Nix syntax.
Old Syntax: SSLVersions = [ "TLSv1.3" "TLSv1.2" ];
New Syntax: TLSVersions = [ "+1.3" "+1.2" "-1.1" ];
NOTE: The minus symbol means to NOT use that particular TLS version.
'';
}
{
time = "2025-01-01T23:16:35+00:00";
message = ''
A new module is available: 'programs.ghostty'.
Ghostty is a terminal emulator that differentiates itself by being
fast, feature-rich, and native. While there are many excellent
terminal emulators available, they all force you to choose between
speed, features, or native UIs. Ghostty provides all three.
'';
}
{
time = "2025-04-02T00:00:00+00:00";
message = ''
A new service is available: 'services.home-manager.autoExpire'.
A service that allow to automatically expire (and optionally clean-up
Nix's store) old Home-Manager generations.
'';
}
];
};
}
+1 -1
View File
@@ -21,7 +21,7 @@ in {
config = mkIf config.uninstall {
home.packages = lib.mkForce [ ];
home.file = lib.mkForce { };
home.stateVersion = lib.mkForce "24.05";
home.stateVersion = lib.mkForce "24.11";
home.enableNixpkgsReleaseCheck = lib.mkForce false;
manual.manpages.enable = lib.mkForce false;
news.display = lib.mkForce "silent";
+1 -1
View File
@@ -10,7 +10,7 @@ let
coercedTo (either (listOf str) str) toList (listOf str);
in {
meta.maintainers = with maintainers; [ pacien ];
meta.maintainers = with maintainers; [ euxane ];
options.xdg.mimeApps = {
enable = mkOption {
+9 -5
View File
@@ -63,15 +63,19 @@ in {
if [[ -w $out/share/mime && -w $out/share/mime/packages && -d $out/share/mime/packages ]]; then
XDG_DATA_DIRS=$out/share \
PKGSYSTEM_ENABLE_FSYNC=0 \
${getExe cfg.sharedMimeInfoPackage} \
-V $out/share/mime > /dev/null
${
getExe
(cfg.sharedMimeInfoPackage.__spliced.buildHost or cfg.sharedMimeInfoPackage)
} -V $out/share/mime > /dev/null
fi
if [[ -w $out/share/applications ]]; then
${getExe' cfg.desktopFileUtilsPackage "update-desktop-database"} \
$out/share/applications
${
getExe'
(cfg.desktopFileUtilsPackage.__spliced.buildHost or cfg.desktopFileUtilsPackage)
"update-desktop-database"
} $out/share/applications
fi
'';
};
}
+1 -1
View File
@@ -7,7 +7,7 @@ let
cfg = config.xdg.userDirs;
in {
meta.maintainers = with maintainers; [ pacien ];
meta.maintainers = with maintainers; [ euxane ];
imports = [
(mkRenamedOptionModule [ "xdg" "userDirs" "publishShare" ] [
+4
View File
@@ -103,6 +103,7 @@ let
./programs/getmail.nix
./programs/gh.nix
./programs/gh-dash.nix
./programs/ghostty.nix
./programs/git-cliff.nix
./programs/git-credential-oauth.nix
./programs/git.nix
@@ -143,6 +144,7 @@ let
./programs/khard.nix
./programs/kitty.nix
./programs/kodi.nix
./programs/kubecolor.nix
./programs/lazygit.nix
./programs/ledger.nix
./programs/less.nix
@@ -313,6 +315,7 @@ let
./services/gpg-agent.nix
./services/grobi.nix
./services/gromit-mpx.nix
./services/home-manager-auto-expire.nix
./services/home-manager-auto-upgrade.nix
./services/hound.nix
./services/hypridle.nix
@@ -412,6 +415,7 @@ let
./systemd.nix
./targets/darwin
./targets/generic-linux.nix
./wayland.nix
./xresources.nix
./xsession.nix
./misc/nix.nix
+3 -2
View File
@@ -134,8 +134,9 @@ in {
oauthParams = { auth, params }:
if useOauth auth && params != null && params != { } then
"?" + builtins.concatStringsSep "&" lib.attrsets.mapAttrsToList
(k: v: k + "=" + lib.strings.escapeURL v) params
"?" + builtins.concatStringsSep "&"
(lib.attrsets.mapAttrsToList (k: v: k + "=" + lib.strings.escapeURL v)
(lib.attrsets.filterAttrs (k: v: v != null) params))
else
"";
+15 -20
View File
@@ -6,10 +6,10 @@ let
cfg = config.programs.broot;
tomlFormat = pkgs.formats.toml { };
jsonFormat = pkgs.formats.json { };
settingsModule = {
freeformType = tomlFormat.type;
freeformType = jsonFormat.type;
options = {
modal = mkEnableOption "modal (vim) mode";
@@ -203,7 +203,7 @@ in {
config = mkIf cfg.enable {
home.packages = [ cfg.package ];
xdg.configFile."broot" = {
xdg.configFile.broot = {
recursive = true;
source = pkgs.symlinkJoin {
name = "xdg.configFile.broot";
@@ -214,31 +214,26 @@ in {
# Dummy file to prevent broot from trying to reinstall itself
(pkgs.writeTextDir "launcher/installed-v1" "")
];
postBuild = ''
ln -s ${
tomlFormat.generate "broot-config" cfg.settings
} $out/conf.toml
# Remove conf.hjson, whose content has been merged into programs.broot.settings
rm $out/conf.hjson
${getExe pkgs.jq} --slurp add > $out/conf.hjson \
<(${
getExe pkgs.hjson-go
} -c ${cfg.package.src}/resources/default-conf/conf.hjson) \
${jsonFormat.generate "broot-config.json" cfg.settings}
'';
};
};
programs.broot.settings = builtins.fromJSON (builtins.readFile
(pkgs.runCommand "default-conf.json" {
nativeBuildInputs = [ pkgs.hjson ];
}
"hjson -c ${cfg.package.src}/resources/default-conf/conf.hjson > $out"));
programs = {
bash.initExtra = mkIf cfg.enableBashIntegration (shellInit "bash");
programs.bash.initExtra = mkIf cfg.enableBashIntegration (shellInit "bash");
zsh.initExtra = mkIf cfg.enableZshIntegration (shellInit "zsh");
programs.zsh.initExtra = mkIf cfg.enableZshIntegration (shellInit "zsh");
fish.shellInit = mkIf cfg.enableFishIntegration (shellInit "fish");
programs.fish.shellInit = mkIf cfg.enableFishIntegration (shellInit "fish");
programs.nushell.extraConfig =
mkIf cfg.enableNushellIntegration (shellInit "nushell");
nushell.extraConfig =
mkIf cfg.enableNushellIntegration (shellInit "nushell");
};
};
}
+3 -1
View File
@@ -1,5 +1,6 @@
{ modulePath, name, description ? null, wrappedPackageName ? null
, unwrappedPackageName ? null, platforms, visible ? false }:
, unwrappedPackageName ? null, platforms, visible ? false
, enableBookmarks ? true }:
{ config, lib, pkgs, ... }:
@@ -435,6 +436,7 @@ in {
};
bookmarks = mkOption {
internal = !enableBookmarks;
type = let
bookmarkSubmodule = types.submodule ({ config, name, ... }: {
options = {
+175
View File
@@ -0,0 +1,175 @@
{ config, lib, pkgs, ... }:
let
cfg = config.programs.ghostty;
keyValueSettings = {
listsAsDuplicateKeys = true;
mkKeyValue = lib.generators.mkKeyValueDefault { } " = ";
};
keyValue = pkgs.formats.keyValue keyValueSettings;
in {
meta.maintainers = [ lib.maintainers.HeitorAugustoLN ];
options.programs.ghostty = {
enable = lib.mkEnableOption "Ghostty";
package = lib.mkPackageOption pkgs "ghostty" { };
settings = lib.mkOption {
inherit (keyValue) type;
default = { };
example = lib.literalExpression ''
{
theme = "catppuccin-mocha";
font-size = 10;
}
'';
description = ''
Configuration written to {file}`$XDG_CONFIG_HOME/ghostty/config`.
See <https://ghostty.org/docs/config/reference> for more information.
'';
};
themes = lib.mkOption {
type = lib.types.attrsOf keyValue.type;
default = { };
example = {
catppuccin-mocha = {
palette = [
"0=#45475a"
"1=#f38ba8"
"2=#a6e3a1"
"3=#f9e2af"
"4=#89b4fa"
"5=#f5c2e7"
"6=#94e2d5"
"7=#bac2de"
"8=#585b70"
"9=#f38ba8"
"10=#a6e3a1"
"11=#f9e2af"
"12=#89b4fa"
"13=#f5c2e7"
"14=#94e2d5"
"15=#a6adc8"
];
background = "1e1e2e";
foreground = "cdd6f4";
cursor-color = "f5e0dc";
selection-background = "353749";
selection-foreground = "cdd6f4";
};
};
description = ''
Custom themes written to {file}`$XDG_CONFIG_HOME/ghostty/themes`.
See <https://ghostty.org/docs/features/theme#authoring-a-custom-theme> for more information.
'';
};
clearDefaultKeybinds = lib.mkEnableOption "" // {
description = "Whether to clear default keybinds.";
};
installVimSyntax =
lib.mkEnableOption "installation of Ghostty configuration syntax for Vim";
installBatSyntax =
lib.mkEnableOption "installation of Ghostty configuration syntax for bat"
// {
default = true;
};
enableBashIntegration = lib.mkEnableOption ''
bash shell integration.
This is ensures that shell integration works in more scenarios, such as switching shells within Ghostty.
But it is not needed to have shell integration.
See <https://ghostty.org/docs/features/shell-integration#manual-shell-integration-setup> for more information
'';
enableFishIntegration = lib.mkEnableOption ''
fish shell integration.
This is ensures that shell integration works in more scenarios, such as switching shells within Ghostty.
But it is not needed to have shell integration.
See <https://ghostty.org/docs/features/shell-integration#manual-shell-integration-setup> for more information
'';
enableZshIntegration = lib.mkEnableOption ''
zsh shell integration.
This is ensures that shell integration works in more scenarios, such as switching shells within Ghostty.
But it is not needed to have shell integration.
See <https://ghostty.org/docs/features/shell-integration#manual-shell-integration-setup> for more information
'';
};
config = lib.mkIf cfg.enable (lib.mkMerge [
{
home.packages = [ cfg.package ];
programs.ghostty.settings = lib.mkIf cfg.clearDefaultKeybinds {
keybind = lib.mkBefore [ "clear" ];
};
# MacOS also supports XDG configuration directory, so we use it for both
# Linux and macOS to reduce complexity
xdg.configFile = lib.mkMerge [
{
"ghostty/config" = lib.mkIf (cfg.settings != { }) {
source = keyValue.generate "ghostty-config" cfg.settings;
onChange = "${lib.getExe cfg.package} +validate-config";
};
}
(lib.mkIf (cfg.themes != { }) (lib.mapAttrs' (name: value: {
name = "ghostty/themes/${name}";
value.source = keyValue.generate "ghostty-${name}-theme" value;
}) cfg.themes))
];
}
(lib.mkIf cfg.installVimSyntax {
programs.vim.plugins = [ cfg.package.vim ];
})
(lib.mkIf cfg.installBatSyntax {
programs.bat = {
syntaxes.ghostty = {
src = cfg.package;
file = "share/bat/syntaxes/ghostty.sublime-syntax";
};
config.map-syntax =
[ "${config.xdg.configHome}/ghostty/config:Ghostty Config" ];
};
})
(lib.mkIf cfg.enableBashIntegration {
# Make order 101 to be placed exactly after bash completions, as Ghostty
# documentation suggests sourcing the script as soon as possible
programs.bash.initExtra = lib.mkOrder 101 ''
if [[ -n "''${GHOSTTY_RESOURCES_DIR}" ]]; then
builtin source "''${GHOSTTY_RESOURCES_DIR}/shell-integration/bash/ghostty.bash"
fi
'';
})
(lib.mkIf cfg.enableFishIntegration {
programs.fish.shellInit = ''
if set -q GHOSTTY_RESOURCES_DIR
source "$GHOSTTY_RESOURCES_DIR/shell-integration/fish/vendor_conf.d/ghostty-shell-integration.fish"
end
'';
})
(lib.mkIf cfg.enableZshIntegration {
programs.zsh.initExtra = ''
if [[ -n $GHOSTTY_RESOURCES_DIR ]]; then
source "$GHOSTTY_RESOURCES_DIR"/shell-integration/zsh/ghostty-integration
fi
'';
})
]);
}
+87
View File
@@ -0,0 +1,87 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.programs.kubecolor;
yamlFormat = pkgs.formats.yaml { };
inherit (pkgs.stdenv.hostPlatform) isDarwin;
in {
meta.maintainers = with maintainers; [ ajgon ];
options.programs.kubecolor = {
enable = mkEnableOption "kubecolor - Colorize your kubectl output";
package = mkPackageOption pkgs "kubecolor" { };
enableAlias = mkOption {
type = types.bool;
default = false;
description = ''
When set to true, it will create an alias for kubectl pointing to
kubecolor, thus making kubecolor the default kubectl client.
'';
};
settings = mkOption {
type = yamlFormat.type;
default = { };
example = literalExpression ''
kubectl = lib.getExe pkgs.kubectl
preset = "dark";
paging = "auto";
'';
description = ''
Configuration written to {file}`~/.kube/color.yaml` (Linux)
or {file}`Library/Application Support/kube/color.yaml` (Darwin).
See <https://kubecolor.github.io/reference/config/> for supported
values.
'';
};
};
config = let
preferXdgDirectories = config.home.preferXdgDirectories
&& (!isDarwin || config.xdg.enable);
# https://github.com/kubecolor/kubecolor/pull/145
configPathSuffix = if cfg.package.pname == "kubecolor"
&& lib.strings.toInt (lib.versions.major cfg.package.version) == 0
&& lib.strings.toInt (lib.versions.minor cfg.package.version) < 4 then
"kube/"
else
"kube/color.yaml";
in mkIf cfg.enable {
home.packages = [ cfg.package ];
home.sessionVariables = if preferXdgDirectories then {
KUBECOLOR_CONFIG = "${config.xdg.configHome}/${configPathSuffix}";
} else if isDarwin then {
KUBECOLOR_CONFIG =
"${config.home.homeDirectory}/Library/Application Support/${configPathSuffix}";
} else
{ };
xdg.configFile = mkIf preferXdgDirectories {
"kube/color.yaml" = mkIf (cfg.settings != { }) {
source = yamlFormat.generate "kubecolor-settings" cfg.settings;
};
};
home.file = mkIf (!preferXdgDirectories) {
"Library/Application Support/kube/color.yaml" =
mkIf (isDarwin && cfg.settings != { }) {
source = yamlFormat.generate "kubecolor-settings" cfg.settings;
};
".kube/color.yaml" = mkIf (!isDarwin && cfg.settings != { }) {
source = yamlFormat.generate "kubecolor-settings" cfg.settings;
};
};
home.shellAliases =
lib.mkIf cfg.enableAlias { kubectl = lib.getExe cfg.package; };
};
}
+29 -16
View File
@@ -14,20 +14,35 @@ let
'') prefs)}
'';
modulePath = [ "programs" "librewolf" ];
mkFirefoxModule = import ./firefox/mkFirefoxModule.nix;
in {
meta.maintainers = [ maintainers.onny ];
meta.maintainers = [ maintainers.chayleaf maintainers.onny ];
imports = [
(mkFirefoxModule {
inherit modulePath;
name = "LibreWolf";
description = "LibreWolf is a privacy enhanced Firefox fork.";
wrappedPackageName = "librewolf";
unwrappedPackageName = "librewolf-unwrapped";
platforms.linux = {
vendorPath = ".librewolf";
configPath = ".librewolf";
};
platforms.darwin = {
vendorPath = "Library/Application Support/LibreWolf";
configPath = "Library/Application Support/LibreWolf";
};
enableBookmarks = false;
})
];
options.programs.librewolf = {
enable =
mkEnableOption "Librewolf browser, a privacy enhanced Firefox fork";
package = mkOption {
type = types.package;
default = pkgs.librewolf;
defaultText = literalExpression "pkgs.librewolf";
description = "The LibreWolf package to use.";
};
settings = mkOption {
type = with types; attrsOf (either bool (either int str));
default = { };
@@ -38,7 +53,7 @@ in {
}
'';
description = ''
Attribute set of LibreWolf settings and overrides. Refer to
Attribute set of global LibreWolf settings and overrides. Refer to
<https://librewolf.net/docs/settings/>
for details on supported values.
'';
@@ -51,9 +66,7 @@ in {
lib.platforms.linux)
];
home.packages = [ cfg.package ];
home.file.".librewolf/librewolf.overrides.cfg".text =
mkOverridesFile cfg.settings;
home.file.".librewolf/librewolf.overrides.cfg" =
lib.mkIf (cfg.settings != { }) { text = mkOverridesFile cfg.settings; };
};
}
+2
View File
@@ -225,6 +225,8 @@ in {
default = { };
example = literalExpression ''
{
TLSType = "IMAP";
TLSVersions = [ "+1.3" "+1.2" "-1.1" ];
PipelineDepth = 10;
Timeout = 60;
};
+2 -2
View File
@@ -30,7 +30,7 @@ let
genTlsConfig = tls:
{
SSLType = if !tls.enable then
TLSType = if !tls.enable then
"None"
else if tls.useStartTls then
"STARTTLS"
@@ -267,7 +267,7 @@ in {
programs.notmuch.new.ignore = [ ".uidvalidity" ".mbsyncstate" ];
home.file.".mbsyncrc".text = let
xdg.configFile."isyncrc".text = let
accountsConfig = map genAccountConfig mbsyncAccounts;
# Only generate this kind of Group configuration if there are ANY accounts
# that do NOT have a per-account groups/channels option(s) specified.
+1 -1
View File
@@ -7,7 +7,7 @@ let
cfg = config.programs.password-store;
in {
meta.maintainers = with maintainers; [ pacien ];
meta.maintainers = with maintainers; [ euxane ];
options.programs.password-store = {
enable = mkEnableOption "Password store";
+1 -1
View File
@@ -65,7 +65,7 @@ in {
home.packages = [ cfg.package ];
xdg.configFile."pqivrc" =
mkIf (cfg.settings != { } && cfg.extraConfig != "") {
mkIf (cfg.settings != { } || cfg.extraConfig != "") {
text = lib.concatLines [
(generators.toINI {
mkKeyValue = key: value:
+2
View File
@@ -16,6 +16,7 @@ let
"vscode-insiders" = "Code - Insiders";
"vscodium" = "VSCodium";
"openvscode-server" = "OpenVSCode Server";
"cursor" = "Cursor";
}.${vscodePname};
extensionDir = {
@@ -23,6 +24,7 @@ let
"vscode-insiders" = "vscode-insiders";
"vscodium" = "vscode-oss";
"openvscode-server" = "openvscode-server";
"cursor" = "cursor";
}.${vscodePname};
userDir = if pkgs.stdenv.hostPlatform.isDarwin then
+11 -4
View File
@@ -2,7 +2,8 @@
let
inherit (lib)
all filterAttrs hasAttr isStorePath literalExpression optionalAttrs types;
all filterAttrs hasAttr isStorePath literalExpression optionalAttrs optional
types;
inherit (lib.options) mkEnableOption mkOption;
inherit (lib.modules) mkIf mkMerge;
@@ -198,7 +199,8 @@ in {
systemd.target = mkOption {
type = str;
default = "graphical-session.target";
default = config.wayland.systemd.target;
defaultText = literalExpression "config.wayland.systemd.target";
example = "sway-session.target";
description = ''
The systemd target that will automatically start the Waybar service.
@@ -308,8 +310,13 @@ in {
Description =
"Highly customizable Wayland bar for Sway and Wlroots based compositors.";
Documentation = "https://github.com/Alexays/Waybar/wiki";
PartOf = [ "graphical-session.target" ];
After = [ "graphical-session-pre.target" ];
PartOf = [ cfg.systemd.target ];
After = [ cfg.systemd.target ];
ConditionEnvironment = "WAYLAND_DISPLAY";
X-Restart-Triggers = optional (settings != [ ])
"${config.xdg.configFile."waybar/config".source}"
++ optional (cfg.style != null)
"${config.xdg.configFile."waybar/style.css".source}";
};
Service = {
+6 -2
View File
@@ -265,8 +265,12 @@ in {
toString missingFiles
}";
singularOpt = removeSuffix "s" opt;
isPluginValid = opt == "plugins"
&& (any (file: pathExists "${value}/${file}") requiredFiles);
isValid =
if opt == "plugins" then isPluginValid else missingFiles == [ ];
in {
assertion = isDir && missingFiles == [ ];
assertion = isDir && isValid;
message = ''
Value at `programs.yazi.${opt}.${name}` is not a valid yazi ${singularOpt}.
${msgNotDir}
@@ -281,6 +285,6 @@ in {
"preview.png"
"LICENSE"
"LICENSE-tmtheme"
]) ++ (mkAsserts "plugins" [ "init.lua" ]);
]) ++ (mkAsserts "plugins" [ "init.lua" "main.lua" ]);
};
}
+1 -1
View File
@@ -28,7 +28,7 @@ in {
programs.zsh.plugins = [{
name = "zsh-abbr";
src = pkgs.zsh-abbr;
file = "/share/zsh/zsh-abbr/abbr.plugin.zsh";
file = "share/zsh/zsh-abbr/zsh-abbr.plugin.zsh";
}];
xdg.configFile = {
+3 -3
View File
@@ -57,8 +57,8 @@ in {
services.avizo = {
Unit = {
Description = "Volume/backlight OSD indicator";
PartOf = [ "graphical-session.target" ];
After = [ "graphical-session.target" ];
PartOf = [ config.wayland.systemd.target ];
After = [ config.wayland.systemd.target ];
ConditionEnvironment = "WAYLAND_DISPLAY";
Documentation = "man:avizo(1)";
};
@@ -69,7 +69,7 @@ in {
Restart = "always";
};
Install = { WantedBy = [ "graphical-session.target" ]; };
Install = { WantedBy = [ config.wayland.systemd.target ]; };
};
};
};
+5 -3
View File
@@ -11,7 +11,8 @@ in {
systemdTarget = mkOption {
type = types.str;
default = "graphical-session.target";
default = config.wayland.systemd.target;
defaultText = literalExpression "config.wayland.systemd.target";
example = "sway-session.target";
description = ''
The systemd target that will automatically start the clipman service.
@@ -34,8 +35,9 @@ in {
systemd.user.services.clipman = {
Unit = {
Description = "Clipboard management daemon";
PartOf = [ "graphical-session.target" ];
After = [ "graphical-session.target" ];
PartOf = [ cfg.systemdTarget ];
After = [ cfg.systemdTarget ];
ConditionEnvironment = "WAYLAND_DISPLAY";
};
Service = {
+2 -2
View File
@@ -180,8 +180,8 @@ in {
systemd.user.services.dunst = {
Unit = {
Description = "Dunst notification daemon";
After = [ "graphical-session-pre.target" ];
PartOf = [ "graphical-session.target" ];
After = [ config.wayland.systemd.target ];
PartOf = [ config.wayland.systemd.target ];
};
Service = {
+3 -2
View File
@@ -88,8 +88,9 @@ in {
Unit = {
Description = "Fnott notification daemon";
Documentation = "man:fnott(1)";
After = [ "graphical-session-pre.target" ];
PartOf = [ "graphical-session.target" ];
After = [ config.wayland.systemd.target ];
PartOf = [ config.wayland.systemd.target ];
ConditionEnvironment = "WAYLAND_DISPLAY";
};
Service = {
@@ -0,0 +1,100 @@
{ config, lib, pkgs, ... }:
let
cfg = config.services.home-manager.autoExpire;
homeManagerPackage = pkgs.callPackage ../../home-manager {
path = config.programs.home-manager.path;
};
in {
meta.maintainers = [ lib.maintainers.thiagokokada ];
options = {
services.home-manager.autoExpire = {
enable = lib.mkEnableOption ''
the Home Manager expire service that periodically expire your
old Home Manager generations'';
timestamp = lib.mkOption {
type = lib.types.str;
default = "-30 days";
example = "-7 days";
description = ''
Remove generations older than `TIMESTAMP` where `TIMESTAMP` is
interpreted as in the -d argument of the date tool.
'';
};
frequency = lib.mkOption {
type = lib.types.str;
default = "monthly";
example = "weekly";
description = ''
The interval at which the Home Manager auto expire is run.
This value is passed to the systemd timer configuration
as the `OnCalendar` option.
The format is described in {manpage}`systemd.time(7)`.
'';
};
store = {
cleanup = lib.mkEnableOption ''
to cleanup Nix store when the Home Manager expire service runs.
It will use `nix-collect-garbage` to cleanup the store,
removing all unreachable store objects from the current user
(i.e.: not only the expired Home Manager generations).
This may not be what you want, this is why this option is disabled
by default'';
options = lib.mkOption {
type = lib.types.str;
description = ''
Options given to `nix-collection-garbage` when the service runs.
'';
default = "";
example = "--delete-older-than 30d";
};
};
};
};
config = lib.mkIf cfg.enable {
assertions = [
(lib.hm.assertions.assertPlatform "services.home-manager.autoExpire" pkgs
lib.platforms.linux)
];
systemd.user = {
timers.home-manager-auto-expire = {
Unit.Description = "Home Manager expire generations timer";
Install.WantedBy = [ "timers.target" ];
Timer = {
OnCalendar = cfg.frequency;
Unit = "home-manager-auto-expire.service";
Persistent = true;
};
};
services.home-manager-auto-expire = {
Unit.Description = "Home Manager expire generations";
Service.ExecStart = toString
(pkgs.writeShellScript "home-manager-auto-expire" (''
echo "Expire old Home Manager generations"
${homeManagerPackage}/bin/home-manager expire-generations '${cfg.timestamp}'
'' + lib.optionalString cfg.store.cleanup ''
echo "Clean-up Nix store"
${pkgs.nix}/bin/nix-collect-garbage ${cfg.store.options}
''));
};
};
};
}
+4 -4
View File
@@ -74,14 +74,14 @@ in {
};
systemd.user.services.hypridle = {
Install = { WantedBy = [ "graphical-session.target" ]; };
Install = { WantedBy = [ config.wayland.systemd.target ]; };
Unit = {
ConditionEnvironment = "WAYLAND_DISPLAY";
Description = "hypridle";
After = [ "graphical-session-pre.target" ];
PartOf = [ "graphical-session.target" ];
X-Restart-Triggers =
After = [ config.wayland.systemd.target ];
PartOf = [ config.wayland.systemd.target ];
X-Restart-Triggers = mkIf (cfg.settings != { })
[ "${config.xdg.configFile."hypr/hypridle.conf".source}" ];
};
+4 -4
View File
@@ -68,14 +68,14 @@ in {
};
systemd.user.services.hyprpaper = {
Install = { WantedBy = [ "graphical-session.target" ]; };
Install = { WantedBy = [ config.wayland.systemd.target ]; };
Unit = {
ConditionEnvironment = "WAYLAND_DISPLAY";
Description = "hyprpaper";
After = [ "graphical-session-pre.target" ];
PartOf = [ "graphical-session.target" ];
X-Restart-Triggers =
After = [ config.wayland.systemd.target ];
PartOf = [ config.wayland.systemd.target ];
X-Restart-Triggers = mkIf (cfg.settings != { })
[ "${config.xdg.configFile."hypr/hyprpaper.conf".source}" ];
};
+3 -1
View File
@@ -288,7 +288,8 @@ in {
systemdTarget = mkOption {
type = types.str;
default = "sway-session.target";
default = config.wayland.systemd.target;
defaultText = literalExpression "config.wayland.systemd.target";
description = ''
Systemd target to bind to.
'';
@@ -342,6 +343,7 @@ in {
Unit = {
Description = "Dynamic output configuration";
Documentation = "man:kanshi(1)";
ConditionEnvironment = "WAYLAND_DISPLAY";
PartOf = cfg.systemdTarget;
Requires = cfg.systemdTarget;
After = cfg.systemdTarget;
-1
View File
@@ -59,7 +59,6 @@ in {
"%C/lorri"
# Needs %C/nix/fetcher-cache-v1.sqlite
"%C/nix"
"/nix/var/nix/gcroots/per-user/%u"
];
CacheDirectory = [ "lorri" ];
Restart = "on-failure";
+1 -1
View File
@@ -126,7 +126,7 @@ let
};
in {
meta.maintainers = with maintainers; [ pacien ];
meta.maintainers = with maintainers; [ euxane ];
options.services.muchsync = {
remotes = mkOption {
+4 -2
View File
@@ -88,7 +88,8 @@ in {
systemdTarget = mkOption {
type = types.str;
default = "graphical-session.target";
default = config.wayland.systemd.target;
defaultText = literalExpression "config.wayland.systemd.target";
example = "sway-session.target";
description = ''
Systemd target to bind to.
@@ -107,7 +108,8 @@ in {
Description = "Idle manager for Wayland";
Documentation = "man:swayidle(1)";
ConditionEnvironment = "WAYLAND_DISPLAY";
PartOf = [ "graphical-session.target" ];
PartOf = [ cfg.systemdTarget ];
After = [ cfg.systemdTarget ];
};
Service = {
+3 -3
View File
@@ -95,8 +95,8 @@ in {
Unit = {
Description = "Swaync notification daemon";
Documentation = "https://github.com/ErikReider/SwayNotificationCenter";
PartOf = [ "graphical-session.target" ];
After = [ "graphical-session-pre.target" ];
PartOf = [ config.wayland.systemd.target ];
After = [ config.wayland.systemd.target ];
ConditionEnvironment = "WAYLAND_DISPLAY";
};
@@ -107,7 +107,7 @@ in {
Restart = "on-failure";
};
Install.WantedBy = [ "graphical-session.target" ];
Install.WantedBy = [ config.wayland.systemd.target ];
};
};
}
+3 -3
View File
@@ -56,8 +56,8 @@ in {
services.swayosd = {
Unit = {
Description = "Volume/backlight OSD indicator";
PartOf = [ "graphical-session.target" ];
After = [ "graphical-session.target" ];
PartOf = [ config.wayland.systemd.target ];
After = [ config.wayland.systemd.target ];
ConditionEnvironment = "WAYLAND_DISPLAY";
Documentation = "man:swayosd(1)";
StartLimitBurst = 5;
@@ -76,7 +76,7 @@ in {
RestartSec = "2s";
};
Install = { WantedBy = [ "graphical-session.target" ]; };
Install = { WantedBy = [ config.wayland.systemd.target ]; };
};
};
};
+1 -1
View File
@@ -7,7 +7,7 @@ let
cfg = config.services.taskwarrior-sync;
in {
meta.maintainers = with maintainers; [ minijackson pacien ];
meta.maintainers = with maintainers; [ euxane minijackson ];
options.services.taskwarrior-sync = {
enable = mkEnableOption "Taskwarrior periodic sync";
+1 -1
View File
@@ -72,7 +72,7 @@ let
cfg.pairs;
in {
meta.maintainers = with maintainers; [ pacien ];
meta.maintainers = with maintainers; [ euxane ];
options.services.unison = {
enable = mkEnableOption "Unison synchronisation";
@@ -277,12 +277,5 @@ in {
[ "xdg-desktop-autostart.target" ];
};
};
systemd.user.targets.tray = {
Unit = {
Description = "Home Manager System Tray";
Requires = [ "graphical-session-pre.target" ];
};
};
};
}
@@ -553,13 +553,6 @@ in {
optional cfg.systemd.xdgAutostart "xdg-desktop-autostart.target";
};
};
systemd.user.targets.tray = {
Unit = {
Description = "Home Manager System Tray";
Requires = [ "graphical-session-pre.target" ];
};
};
}
]);
}
@@ -201,12 +201,5 @@ in {
After = [ "graphical-session-pre.target" ];
};
};
systemd.user.targets.tray = {
Unit = {
Description = "Home Manager System Tray";
Requires = [ "graphical-session-pre.target" ];
};
};
};
}
+3 -3
View File
@@ -50,8 +50,8 @@ in {
Description =
"A lightweight overlay volume/backlight/progress/anything bar for Wayland";
Documentation = "man:wob(1)";
PartOf = "graphical-session.target";
After = "graphical-session.target";
PartOf = [ config.wayland.systemd.target ];
After = [ config.wayland.systemd.target ];
ConditionEnvironment = "WAYLAND_DISPLAY";
};
Service = {
@@ -59,7 +59,7 @@ in {
ExecStart = builtins.concatStringsSep " " ([ (getExe cfg.package) ]
++ optional (cfg.settings != { }) "--config ${configFile}");
};
Install.WantedBy = [ "graphical-session.target" ];
Install.WantedBy = [ config.wayland.systemd.target ];
};
sockets.wob = {
+28
View File
@@ -0,0 +1,28 @@
{ config, lib, ... }:
{
meta.maintainers = [ lib.maintainers.thiagokokada ];
options = {
wayland = {
systemd.target = lib.mkOption {
type = lib.types.str;
default = "graphical-session.target";
example = "sway-session.target";
description = ''
The systemd target that will automatically start the graphical Wayland services.
This option is a generalization of individual `systemd.target` or `systemdTarget`,
and affect all Wayland services by default.
When setting this value to `"sway-session.target"`,
make sure to also enable {option}`wayland.windowManager.sway.systemd.enable`,
otherwise the service may never be started.
'';
};
};
};
config = lib.mkIf (!config.xsession.enable) {
systemd.user.targets.tray = lib.mkDefault config.xsession.trayTarget;
};
}
+15 -6
View File
@@ -13,6 +13,20 @@ in {
xsession = {
enable = mkEnableOption "X Session";
trayTarget = mkOption {
readOnly = true;
internal = true;
visible = false;
description = "Common tray.target for both xsession and wayland";
type = types.attrs;
default = {
Unit = {
Description = "Home Manager System Tray";
Requires = [ "graphical-session-pre.target" ];
};
};
};
scriptPath = mkOption {
type = types.str;
default = ".xsession";
@@ -163,12 +177,7 @@ in {
};
};
tray = {
Unit = {
Description = "Home Manager System Tray";
Requires = [ "graphical-session-pre.target" ];
};
};
tray = cfg.trayTarget;
};
};
+9 -1
View File
@@ -1,7 +1,7 @@
# This module is the common base for the NixOS and nix-darwin modules.
# For OS-specific configuration, please edit nixos/default.nix or nix-darwin/default.nix instead.
{ config, lib, pkgs, ... }:
{ options, config, lib, pkgs, ... }:
with lib;
@@ -34,6 +34,14 @@ let
home.username = config.users.users.${name}.name;
home.homeDirectory = config.users.users.${name}.home;
# Forward `nix.enable` from the OS configuration. The
# conditional is to check whether nix-darwin is new enough
# to have the `nix.enable` option; it was previously a
# `mkRemovedOptionModule` error, which we can crudely detect
# by `visible` being set to `false`.
nix.enable =
mkIf (options.nix.enable.visible or true) config.nix.enable;
# Make activation script use same version of Nix as system as a whole.
# This avoids problems with Nix not being in PATH.
nix.package = config.nix.package;
+1 -1
View File
@@ -1,4 +1,4 @@
{
"release": "24.11",
"isReleaseBranch": false
"isReleaseBranch": true
}
+2 -2
View File
@@ -2,10 +2,10 @@
description = "Darwin configuration";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
darwin.url = "github:lnl7/nix-darwin";
darwin.inputs.nixpkgs.follows = "nixpkgs";
home-manager.url = "github:nix-community/home-manager";
home-manager.url = "github:nix-community/home-manager/release-24.11";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
};
+2 -2
View File
@@ -2,8 +2,8 @@
description = "NixOS configuration";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager.url = "github:nix-community/home-manager";
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
home-manager.url = "github:nix-community/home-manager/release-24.11";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
};
+2 -2
View File
@@ -3,9 +3,9 @@
inputs = {
# Specify the source of Home Manager and Nixpkgs.
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
home-manager = {
url = "github:nix-community/home-manager";
url = "github:nix-community/home-manager/release-24.11";
inputs.nixpkgs.follows = "nixpkgs";
};
};
+3
View File
@@ -79,6 +79,7 @@ in import nmtSrc {
./modules/programs/gallery-dl
./modules/programs/gh
./modules/programs/gh-dash
./modules/programs/ghostty
./modules/programs/git
./modules/programs/git-cliff
./modules/programs/git-credential-oauth
@@ -98,6 +99,7 @@ in import nmtSrc {
./modules/programs/khal
./modules/programs/khard
./modules/programs/kitty
./modules/programs/kubecolor
./modules/programs/ledger
./modules/programs/less
./modules/programs/lf
@@ -250,6 +252,7 @@ in import nmtSrc {
./modules/services/git-sync
./modules/services/glance
./modules/services/gromit-mpx
./modules/services/home-manager-auto-expire
./modules/services/home-manager-auto-upgrade
./modules/services/hypridle
./modules/services/hyprpaper
+3 -3
View File
@@ -17,7 +17,7 @@
};
home-manager.users.alice = { ... }: {
home.stateVersion = "24.05";
home.stateVersion = "24.11";
home.file.test.text = "testfile";
# Enable a light-weight systemd service.
services.pueue.enable = true;
@@ -49,7 +49,7 @@
start_all()
machine.wait_for_unit("home-manager-alice.service")
machine.wait_for_console_text("Finished Home Manager environment for alice.")
with subtest("Home Manager file"):
# The file should be linked with the expected content.
@@ -73,7 +73,7 @@
fail_as_alice("pueue status")
machine.systemctl("restart home-manager-alice.service")
machine.wait_for_unit("home-manager-alice.service")
machine.wait_for_console_text("Finished Home Manager environment for alice.")
actual = succeed_as_alice("pueue status")
expected = "running"
@@ -13,7 +13,7 @@
# You should not change this value, even if you update Home Manager. If you do
# want to update the value, then make sure to first check the Home Manager
# release notes.
home.stateVersion = "24.05"; # Please read the comment before changing.
home.stateVersion = "24.11"; # Please read the comment before changing.
# The home.packages option allows you to install Nix packages into your
# environment.
@@ -3,7 +3,7 @@
{
home.username = "alice";
home.homeDirectory = "/home/alice";
home.stateVersion = "24.05";
home.stateVersion = "24.11";
home.packages = [ pkgs.hello ];
home.file.test.text = "test";
home.sessionVariables.EDITOR = "emacs";
@@ -1,7 +1,7 @@
{ ... }: {
home.username = "alice";
home.homeDirectory = "/home/alice";
home.stateVersion = "24.05";
home.stateVersion = "24.11";
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;
@@ -2,7 +2,7 @@
home.username = "alice";
home.homeDirectory = "/home/alice";
home.stateVersion = "24.05"; # Please read the comment before changing.
home.stateVersion = "24.11"; # Please read the comment before changing.
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;
@@ -5,7 +5,7 @@
i18n.inputMethod = {
enabled = "fcitx5";
fcitx5.addons = with pkgs; [ fcitx5-chinese-addons ];
fcitx5.addons = [ pkgs.libsForQt5.fcitx5-chinese-addons ];
};
nmt.script = ''
+6 -10
View File
@@ -1,14 +1,10 @@
{ config, lib, pkgs, ... }:
with lib;
{ config, ... }:
{
config = {
nix = { package = config.lib.test.mkStubPackage { }; };
nix = { package = config.lib.test.mkStubPackage { }; };
nmt.script = ''
assertPathNotExists home-files/.config/nix
assertPathNotExists home-files/.nix-defexpr/50-home-manager
'';
};
nmt.script = ''
assertPathNotExists home-files/.config/nix
assertPathNotExists home-files/.nix-defexpr/50-home-manager
'';
}
+13 -15
View File
@@ -9,21 +9,19 @@ let
}
'';
in {
config = {
nix = {
package = config.lib.test.mkStubPackage {
version = lib.getVersion pkgs.nixVersions.stable;
};
channels.example = exampleChannel;
settings.use-xdg-base-directories = true;
nix = {
package = config.lib.test.mkStubPackage {
version = lib.getVersion pkgs.nixVersions.stable;
};
nmt.script = ''
assertFileContains home-path/etc/profile.d/hm-session-vars.sh \
'export NIX_PATH="/home/hm-user/.local/state/nix/defexpr/50-home-manager''${NIX_PATH:+:$NIX_PATH}"'
assertFileContent \
home-files/.local/state/nix/defexpr/50-home-manager/example/default.nix \
${exampleChannel}/default.nix
'';
channels.example = exampleChannel;
settings.use-xdg-base-directories = true;
};
nmt.script = ''
assertFileContains home-path/etc/profile.d/hm-session-vars.sh \
'export NIX_PATH="/home/hm-user/.local/state/nix/defexpr/50-home-manager''${NIX_PATH:+:$NIX_PATH}"'
assertFileContent \
home-files/.local/state/nix/defexpr/50-home-manager/example/default.nix \
${exampleChannel}/default.nix
'';
}
+11 -13
View File
@@ -9,18 +9,16 @@ let
}
'';
in {
config = {
nix = {
package = config.lib.test.mkStubPackage { };
channels.example = exampleChannel;
};
nmt.script = ''
assertFileContains home-path/etc/profile.d/hm-session-vars.sh \
'export NIX_PATH="/home/hm-user/.nix-defexpr/50-home-manager''${NIX_PATH:+:$NIX_PATH}"'
assertFileContent \
home-files/.nix-defexpr/50-home-manager/example/default.nix \
${exampleChannel}/default.nix
'';
nix = {
package = config.lib.test.mkStubPackage { };
channels.example = exampleChannel;
};
nmt.script = ''
assertFileContains home-path/etc/profile.d/hm-session-vars.sh \
'export NIX_PATH="/home/hm-user/.nix-defexpr/50-home-manager''${NIX_PATH:+:$NIX_PATH}"'
assertFileContent \
home-files/.nix-defexpr/50-home-manager/example/default.nix \
${exampleChannel}/default.nix
'';
}
+14 -18
View File
@@ -1,25 +1,21 @@
{ config, lib, pkgs, ... }:
with lib;
{ ... }:
{
config = {
nix = {
registry = {
nixpkgs = {
to = {
type = "github";
owner = "my-org";
repo = "my-nixpkgs";
};
nix = {
registry = {
nixpkgs = {
to = {
type = "github";
owner = "my-org";
repo = "my-nixpkgs";
};
};
};
nmt.script = ''
assertFileContent \
home-files/.config/nix/registry.json \
${./example-registry-expected.json}
'';
};
nmt.script = ''
assertFileContent \
home-files/.config/nix/registry.json \
${./example-registry-expected.json}
'';
}
+24 -28
View File
@@ -1,38 +1,34 @@
{ config, lib, pkgs, ... }:
with lib;
{
config = {
nix = {
package = config.lib.test.mkStubPackage {
version = lib.getVersion pkgs.nixVersions.stable;
buildScript = ''
target=$out/bin/nix
mkdir -p "$(dirname "$target")"
nix = {
package = config.lib.test.mkStubPackage {
version = lib.getVersion pkgs.nixVersions.stable;
buildScript = ''
target=$out/bin/nix
mkdir -p "$(dirname "$target")"
echo -n "true" > "$target"
echo -n "true" > "$target"
chmod +x "$target"
'';
};
nixPath = [ "/a" "/b/c" ];
settings = {
use-sandbox = true;
show-trace = true;
system-features = [ "big-parallel" "kvm" "recursive-nix" ];
};
chmod +x "$target"
'';
};
nmt.script = ''
assertFileContent \
home-files/.config/nix/nix.conf \
${./example-settings-expected.conf}
nixPath = [ "/a" "/b/c" ];
assertFileContains home-path/etc/profile.d/hm-session-vars.sh \
'export NIX_PATH="/a:/b/c''${NIX_PATH:+:$NIX_PATH}"'
'';
settings = {
use-sandbox = true;
show-trace = true;
system-features = [ "big-parallel" "kvm" "recursive-nix" ];
};
};
nmt.script = ''
assertFileContent \
home-files/.config/nix/nix.conf \
${./example-settings-expected.conf}
assertFileContains home-path/etc/profile.d/hm-session-vars.sh \
'export NIX_PATH="/a:/b/c''${NIX_PATH:+:$NIX_PATH}"'
'';
}
+9 -11
View File
@@ -1,16 +1,14 @@
{ config, ... }:
{
config = {
nix = {
package = config.lib.test.mkStubPackage { };
nixPath = [ "/a" "/b/c" ];
keepOldNixPath = false;
};
nmt.script = ''
assertFileContains home-path/etc/profile.d/hm-session-vars.sh \
'export NIX_PATH="/a:/b/c"'
'';
nix = {
package = config.lib.test.mkStubPackage { };
nixPath = [ "/a" "/b/c" ];
keepOldNixPath = false;
};
nmt.script = ''
assertFileContains home-path/etc/profile.d/hm-session-vars.sh \
'export NIX_PATH="/a:/b/c"'
'';
}
+1
View File
@@ -2,4 +2,5 @@
aerc-noSettings = ./noSettings.nix;
aerc-settings = ./settings.nix;
aerc-assertion = ./assertion.nix;
aerc-oauth = ./oauth.nix;
}
@@ -0,0 +1,9 @@
# Generated by Home Manager.
[basic]
copy-to = Sent
default = Inbox
from = Annie X. Hacker <anniex@mail.invalid>
outgoing = smtp+xoauth2://anniex@smtp.office365.com:587?client_id=9e5f94bc-e8a4-4e73-b8be-63364c29d753&token_endpoint=https%3A%2F%2Flogin.microsoftonline.com%2Fcommon%2Foauth2%2Fv2.0%2Ftoken
postpone = Drafts
source = imaps+xoauth2://anniex@outlook.office365.com:993?client_id=9e5f94bc-e8a4-4e73-b8be-63364c29d753&token_endpoint=https%3A%2F%2Flogin.microsoftonline.com%2Fcommon%2Foauth2%2Fv2.0%2Ftoken
+39
View File
@@ -0,0 +1,39 @@
{ config, pkgs, ... }: {
config = {
nmt.script = let
dir = if (pkgs.stdenv.isDarwin && !config.xdg.enable) then
"home-files/Library/Preferences/aerc"
else
"home-files/.config/aerc";
in ''
assertFileContent ${dir}/accounts.conf ${./oauth.expected}
'';
programs.aerc = {
enable = true;
extraConfig.general.unsafe-accounts-conf = true;
};
accounts.email.accounts = {
basic = {
realName = "Annie X. Hacker";
userName = "anniex";
address = "anniex@mail.invalid";
primary = true;
flavor = "outlook.office365.com";
aerc = rec {
enable = true;
imapAuth = "xoauth2";
smtpAuth = imapAuth;
imapOauth2Params = {
client_id = "9e5f94bc-e8a4-4e73-b8be-63364c29d753";
token_endpoint =
"https://login.microsoftonline.com/common/oauth2/v2.0/token";
};
smtpOauth2Params = imapOauth2Params;
};
};
};
};
}
+2 -2
View File
@@ -7,7 +7,7 @@
};
nmt.script = ''
assertFileExists home-files/.config/broot/conf.toml
assertFileContains home-files/.config/broot/conf.toml 'modal = true'
assertFileExists home-files/.config/broot/conf.hjson
assertFileContains home-files/.config/broot/conf.hjson '"modal": true'
'';
}
+2
View File
@@ -7,6 +7,8 @@
extraConfig = "test";
};
test.stubs.cmus = { };
nmt.script = ''
assertFileContent \
home-files/.config/cmus/rc \
@@ -0,0 +1,5 @@
{
ghostty-example-settings = ./example-settings.nix;
ghostty-empty-settings = ./empty-settings.nix;
ghostty-example-theme = ./example-theme.nix;
}
@@ -0,0 +1,7 @@
{
programs.ghostty.enable = true;
test.stubs.ghostty = { };
nmt.script = ''
assertPathNotExists home-files/.config/ghostty/config
'';
}
@@ -0,0 +1,2 @@
font-size = 10
theme = catppuccin-mocha
@@ -0,0 +1,17 @@
{ config, ... }: {
programs.ghostty = {
enable = true;
package = config.lib.test.mkStubPackage { };
settings = {
theme = "catppuccin-mocha";
font-size = 10;
};
};
nmt.script = ''
assertFileContent \
home-files/.config/ghostty/config \
${./example-config-expected}
'';
}
@@ -0,0 +1,21 @@
background = 1e1e2e
cursor-color = f5e0dc
foreground = cdd6f4
palette = 0=#45475a
palette = 1=#f38ba8
palette = 2=#a6e3a1
palette = 3=#f9e2af
palette = 4=#89b4fa
palette = 5=#f5c2e7
palette = 6=#94e2d5
palette = 7=#bac2de
palette = 8=#585b70
palette = 9=#f38ba8
palette = 10=#a6e3a1
palette = 11=#f9e2af
palette = 12=#89b4fa
palette = 13=#f5c2e7
palette = 14=#94e2d5
palette = 15=#a6adc8
selection-background = 353749
selection-foreground = cdd6f4
@@ -0,0 +1,40 @@
{ config, ... }: {
programs.ghostty = {
enable = true;
package = config.lib.test.mkStubPackage { };
themes = {
catppuccin-mocha = {
palette = [
"0=#45475a"
"1=#f38ba8"
"2=#a6e3a1"
"3=#f9e2af"
"4=#89b4fa"
"5=#f5c2e7"
"6=#94e2d5"
"7=#bac2de"
"8=#585b70"
"9=#f38ba8"
"10=#a6e3a1"
"11=#f9e2af"
"12=#89b4fa"
"13=#f5c2e7"
"14=#94e2d5"
"15=#a6adc8"
];
background = "1e1e2e";
foreground = "cdd6f4";
cursor-color = "f5e0dc";
selection-background = "353749";
selection-foreground = "cdd6f4";
};
};
};
nmt.script = ''
assertFileContent \
home-files/.config/ghostty/themes/catppuccin-mocha \
${./example-theme-expected}
'';
}
@@ -12,7 +12,7 @@
source = pkgs.fetchurl {
url =
"https://keys.openpgp.org/pks/lookup?op=get&options=mr&search=0x44CF42371ADF842E12F116EAA9D3F98FCCF5460B";
hash = "sha256-u01QTYEFSY1feJWX3JJjXB6thiVO4WOnrqNmzg6vIDs=";
hash = "sha256-bSluCZh6ijwppigk8iF2BwWKZgq1WDbIjyYQRK772dM=";
};
trust = 1; # "unknown"
}
@@ -0,0 +1,5 @@
{
kubecolor-empty-config = ./empty-config.nix;
kubecolor-example-config-default-paths = ./example-config-default-paths.nix;
kubecolor-example-config-xdg-paths = ./example-config-xdg-paths.nix;
}
@@ -0,0 +1,20 @@
{ pkgs, config, ... }:
let
configDir =
if pkgs.stdenv.isDarwin then "Library/Application Support" else ".config";
in {
programs.kubecolor = {
enable = true;
package = config.lib.test.mkStubPackage {
name = "kubecolor";
version = "0.4.0";
};
};
test.stubs.kubecolor = { };
nmt.script = ''
assertPathNotExists 'home-files/${configDir}/kube/color.yaml'
'';
}
@@ -0,0 +1,37 @@
{ pkgs, config, ... }:
let
configDir = if pkgs.stdenv.isDarwin then
"Library/Application Support/kube"
else
".kube";
in {
programs.kubecolor = {
enable = true;
package = config.lib.test.mkStubPackage {
name = "kubecolor";
version = "0.4.0";
};
settings = {
kubectl = "kubectl";
preset = "dark";
objFreshThreshold = 0;
paging = "auto";
pager = "less";
};
};
nmt.script = ''
assertFileExists 'home-files/${configDir}/color.yaml'
assertFileContent 'home-files/${configDir}/color.yaml' \
${
builtins.toFile "expected.yaml" ''
kubectl: kubectl
objFreshThreshold: 0
pager: less
paging: auto
preset: dark
''
}
'';
}
@@ -0,0 +1,36 @@
{ config, ... }:
{
xdg.enable = true;
home.preferXdgDirectories = true;
programs.kubecolor = {
enable = true;
package = config.lib.test.mkStubPackage {
name = "kubecolor";
version = "0.4.0";
};
settings = {
kubectl = "kubectl";
preset = "dark";
objFreshThreshold = 0;
paging = "auto";
pager = "less";
};
};
nmt.script = ''
assertFileExists 'home-files/.config/kube/color.yaml'
assertFileContent 'home-files/.config/kube/color.yaml' \
${
builtins.toFile "expected.yaml" ''
kubectl: kubectl
objFreshThreshold: 0
pager: less
paging: auto
preset: dark
''
}
'';
}
@@ -4,7 +4,7 @@ IMAPAccount hm-account
CertificateFile /etc/ssl/certs/ca-certificates.crt
Host imap.example.org
PassCmd "password-command 2"
SSLType IMAPS
TLSType IMAPS
User home.manager.jr
IMAPStore hm-account-remote
@@ -56,8 +56,8 @@ IMAPAccount hm@example.com
CertificateFile /etc/ssl/certs/ca-certificates.crt
Host imap.example.com
PassCmd password-command
SSLType IMAPS
SSLVersions TLSv1.3 TLSv1.2
TLSType IMAPS
TLSVersions +1.3 +1.2 -1.1
User home.manager
IMAPStore hm@example.com-remote
+3 -3
View File
@@ -21,7 +21,7 @@ with lib;
accounts.email.accounts = {
"hm@example.com".mbsync = {
enable = true;
extraConfig.account.SSLVersions = [ "TLSv1.3" "TLSv1.2" ];
extraConfig.account.TLSVersions = [ "+1.3" "+1.2" "-1.1" ];
groups.inboxes = {
channels = {
inbox1 = {
@@ -79,8 +79,8 @@ with lib;
test.stubs.isync = { };
nmt.script = ''
assertFileExists home-files/.mbsyncrc
assertFileContent home-files/.mbsyncrc ${./mbsync-expected.conf}
assertFileExists home-files/.config/isyncrc
assertFileContent home-files/.config/isyncrc ${./mbsync-expected.conf}
'';
};
}
@@ -1,6 +1,4 @@
{ config, lib, pkgs, ... }:
with lib;
{ config, ... }:
{
config = {

Some files were not shown because too many files have changed in this diff Show More