mirror of
https://github.com/nix-community/home-manager.git
synced 2026-01-11 09:29:41 +08:00
Compare commits
64 Commits
9afe77a70b
...
release-24
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d5f1f641b2 | ||
|
|
e343c8dafd | ||
|
|
1eec32f0ef | ||
|
|
b4bbdc6fde | ||
|
|
304eb219e0 | ||
|
|
574e6ad23f | ||
|
|
0f1f1f62b3 | ||
|
|
4f935631a3 | ||
|
|
48dadbde74 | ||
|
|
ba926b8fb3 | ||
|
|
50eee705bb | ||
|
|
cd234af7e6 | ||
|
|
dd26f75fb4 | ||
|
|
2cc9faab38 | ||
|
|
5e7807ddb9 | ||
|
|
fb4ede9afb | ||
|
|
649b33705f | ||
|
|
437662aa13 | ||
|
|
d15116d7b9 | ||
|
|
dd06754e42 | ||
|
|
840affabc4 | ||
|
|
64451ee998 | ||
|
|
16570f88c4 | ||
|
|
bf60c0be78 | ||
|
|
b4de3da366 | ||
|
|
34214fb508 | ||
|
|
c61bfe3ae6 | ||
|
|
b4e98224ad | ||
|
|
a9f8b3db21 | ||
|
|
c8589e7fb1 | ||
|
|
15c5f9d04f | ||
|
|
0948aeedc2 | ||
|
|
f6af7280a3 | ||
|
|
7fbde08ea2 | ||
|
|
9d3d080aec | ||
|
|
254d47082e | ||
|
|
bd65bc3cde | ||
|
|
d4b030780a | ||
|
|
e759746be4 | ||
|
|
511143d3fa | ||
|
|
64e7de90ee | ||
|
|
613691f285 | ||
|
|
80b0fdf483 | ||
|
|
1318c3f3b0 | ||
|
|
c7ffc9727d | ||
|
|
9afd809a3c | ||
|
|
f79a81d300 | ||
|
|
901bce8b37 | ||
|
|
176a1078a5 | ||
|
|
e38d3dd1d3 | ||
|
|
62d5362558 | ||
|
|
f46891fc0a | ||
|
|
f3111f62a2 | ||
|
|
2777de38dd | ||
|
|
f8831cc700 | ||
|
|
bef567c229 | ||
|
|
30a16c91a4 | ||
|
|
7145facdc6 | ||
|
|
2d63276f05 | ||
|
|
d47cc14f28 | ||
|
|
457715d0c0 | ||
|
|
c36861027d | ||
|
|
c9b8488c92 | ||
|
|
3a1bd31376 |
8
.github/dependabot.yml
vendored
8
.github/dependabot.yml
vendored
@@ -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:"
|
||||
|
||||
4
.github/workflows/github_pages.yml
vendored
4
.github/workflows/github_pages.yml
vendored
@@ -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 }}'
|
||||
|
||||
4
.github/workflows/test.yml
vendored
4
.github/workflows/test.yml
vendored
@@ -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
|
||||
|
||||
4
.github/workflows/update-flake.yml
vendored
4
.github/workflows/update-flake.yml
vendored
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
2
Makefile
2
Makefile
@@ -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
|
||||
|
||||
@@ -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.
|
||||
|
||||
|
||||
@@ -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";
|
||||
};
|
||||
```
|
||||
|
||||
|
||||
@@ -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";
|
||||
};
|
||||
```
|
||||
|
||||
|
||||
@@ -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,6 +1,6 @@
|
||||
# Home Manager Manual {#home-manager-manual}
|
||||
|
||||
## Version 24.05 (unstable)
|
||||
## Version 24.11 (stable)
|
||||
|
||||
|
||||
```{=include=} preface
|
||||
|
||||
@@ -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
docs/manual/nix-flakes/flake-parts.md
Normal file
39
docs/manual/nix-flakes/flake-parts.md
Normal 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`.
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
flake-module.nix
Normal file
33
flake-module.nix
Normal 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.
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
8
flake.lock
generated
8
flake.lock
generated
@@ -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"
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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.
|
||||
'';
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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
|
||||
'';
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -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" ] [
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
"";
|
||||
|
||||
|
||||
@@ -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");
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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
modules/programs/ghostty.nix
Normal file
175
modules/programs/ghostty.nix
Normal 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
modules/programs/kubecolor.nix
Normal file
87
modules/programs/kubecolor.nix
Normal file
@@ -0,0 +1,87 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
|
||||
cfg = config.programs.kubecolor;
|
||||
yamlFormat = pkgs.formats.yaml { };
|
||||
inherit (pkgs.stdenv.hostPlatform) isDarwin;
|
||||
|
||||
in {
|
||||
meta.maintainers = with maintainers; [ ajgon ];
|
||||
|
||||
options.programs.kubecolor = {
|
||||
enable = mkEnableOption "kubecolor - Colorize your kubectl output";
|
||||
|
||||
package = mkPackageOption pkgs "kubecolor" { };
|
||||
|
||||
enableAlias = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
When set to true, it will create an alias for kubectl pointing to
|
||||
kubecolor, thus making kubecolor the default kubectl client.
|
||||
'';
|
||||
};
|
||||
|
||||
settings = mkOption {
|
||||
type = yamlFormat.type;
|
||||
default = { };
|
||||
example = literalExpression ''
|
||||
kubectl = lib.getExe pkgs.kubectl
|
||||
preset = "dark";
|
||||
paging = "auto";
|
||||
'';
|
||||
description = ''
|
||||
Configuration written to {file}`~/.kube/color.yaml` (Linux)
|
||||
or {file}`Library/Application Support/kube/color.yaml` (Darwin).
|
||||
See <https://kubecolor.github.io/reference/config/> for supported
|
||||
values.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = let
|
||||
preferXdgDirectories = config.home.preferXdgDirectories
|
||||
&& (!isDarwin || config.xdg.enable);
|
||||
|
||||
# https://github.com/kubecolor/kubecolor/pull/145
|
||||
configPathSuffix = if cfg.package.pname == "kubecolor"
|
||||
&& lib.strings.toInt (lib.versions.major cfg.package.version) == 0
|
||||
&& lib.strings.toInt (lib.versions.minor cfg.package.version) < 4 then
|
||||
"kube/"
|
||||
else
|
||||
"kube/color.yaml";
|
||||
|
||||
in mkIf cfg.enable {
|
||||
home.packages = [ cfg.package ];
|
||||
|
||||
home.sessionVariables = if preferXdgDirectories then {
|
||||
KUBECOLOR_CONFIG = "${config.xdg.configHome}/${configPathSuffix}";
|
||||
} else if isDarwin then {
|
||||
KUBECOLOR_CONFIG =
|
||||
"${config.home.homeDirectory}/Library/Application Support/${configPathSuffix}";
|
||||
} else
|
||||
{ };
|
||||
|
||||
xdg.configFile = mkIf preferXdgDirectories {
|
||||
"kube/color.yaml" = mkIf (cfg.settings != { }) {
|
||||
source = yamlFormat.generate "kubecolor-settings" cfg.settings;
|
||||
};
|
||||
};
|
||||
|
||||
home.file = mkIf (!preferXdgDirectories) {
|
||||
"Library/Application Support/kube/color.yaml" =
|
||||
mkIf (isDarwin && cfg.settings != { }) {
|
||||
source = yamlFormat.generate "kubecolor-settings" cfg.settings;
|
||||
};
|
||||
".kube/color.yaml" = mkIf (!isDarwin && cfg.settings != { }) {
|
||||
source = yamlFormat.generate "kubecolor-settings" cfg.settings;
|
||||
};
|
||||
};
|
||||
|
||||
home.shellAliases =
|
||||
lib.mkIf cfg.enableAlias { kubectl = lib.getExe cfg.package; };
|
||||
};
|
||||
}
|
||||
@@ -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; };
|
||||
};
|
||||
}
|
||||
|
||||
@@ -225,6 +225,8 @@ in {
|
||||
default = { };
|
||||
example = literalExpression ''
|
||||
{
|
||||
TLSType = "IMAP";
|
||||
TLSVersions = [ "+1.3" "+1.2" "-1.1" ];
|
||||
PipelineDepth = 10;
|
||||
Timeout = 60;
|
||||
};
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
@@ -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" ]);
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
@@ -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 ]; };
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
100
modules/services/home-manager-auto-expire.nix
Normal file
100
modules/services/home-manager-auto-expire.nix
Normal file
@@ -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}
|
||||
''));
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -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}" ];
|
||||
};
|
||||
|
||||
|
||||
@@ -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}" ];
|
||||
};
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -126,7 +126,7 @@ let
|
||||
};
|
||||
|
||||
in {
|
||||
meta.maintainers = with maintainers; [ pacien ];
|
||||
meta.maintainers = with maintainers; [ euxane ];
|
||||
|
||||
options.services.muchsync = {
|
||||
remotes = mkOption {
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
@@ -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 ];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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 ]; };
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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
modules/wayland.nix
Normal file
28
modules/wayland.nix
Normal 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;
|
||||
};
|
||||
}
|
||||
@@ -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;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -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,4 +1,4 @@
|
||||
{
|
||||
"release": "24.11",
|
||||
"isReleaseBranch": false
|
||||
"isReleaseBranch": true
|
||||
}
|
||||
|
||||
@@ -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,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";
|
||||
};
|
||||
|
||||
|
||||
@@ -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";
|
||||
};
|
||||
};
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 = ''
|
||||
|
||||
@@ -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
|
||||
'';
|
||||
}
|
||||
|
||||
@@ -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
|
||||
'';
|
||||
}
|
||||
|
||||
@@ -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
|
||||
'';
|
||||
}
|
||||
|
||||
@@ -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}
|
||||
'';
|
||||
}
|
||||
|
||||
@@ -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}"'
|
||||
'';
|
||||
}
|
||||
|
||||
@@ -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"'
|
||||
'';
|
||||
}
|
||||
|
||||
@@ -2,4 +2,5 @@
|
||||
aerc-noSettings = ./noSettings.nix;
|
||||
aerc-settings = ./settings.nix;
|
||||
aerc-assertion = ./assertion.nix;
|
||||
aerc-oauth = ./oauth.nix;
|
||||
}
|
||||
|
||||
9
tests/modules/programs/aerc/oauth.expected
Normal file
9
tests/modules/programs/aerc/oauth.expected
Normal file
@@ -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
tests/modules/programs/aerc/oauth.nix
Normal file
39
tests/modules/programs/aerc/oauth.nix
Normal 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;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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'
|
||||
'';
|
||||
}
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
extraConfig = "test";
|
||||
};
|
||||
|
||||
test.stubs.cmus = { };
|
||||
|
||||
nmt.script = ''
|
||||
assertFileContent \
|
||||
home-files/.config/cmus/rc \
|
||||
|
||||
5
tests/modules/programs/ghostty/default.nix
Normal file
5
tests/modules/programs/ghostty/default.nix
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
ghostty-example-settings = ./example-settings.nix;
|
||||
ghostty-empty-settings = ./empty-settings.nix;
|
||||
ghostty-example-theme = ./example-theme.nix;
|
||||
}
|
||||
7
tests/modules/programs/ghostty/empty-settings.nix
Normal file
7
tests/modules/programs/ghostty/empty-settings.nix
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
programs.ghostty.enable = true;
|
||||
test.stubs.ghostty = { };
|
||||
nmt.script = ''
|
||||
assertPathNotExists home-files/.config/ghostty/config
|
||||
'';
|
||||
}
|
||||
2
tests/modules/programs/ghostty/example-config-expected
Normal file
2
tests/modules/programs/ghostty/example-config-expected
Normal file
@@ -0,0 +1,2 @@
|
||||
font-size = 10
|
||||
theme = catppuccin-mocha
|
||||
17
tests/modules/programs/ghostty/example-settings.nix
Normal file
17
tests/modules/programs/ghostty/example-settings.nix
Normal file
@@ -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}
|
||||
'';
|
||||
}
|
||||
21
tests/modules/programs/ghostty/example-theme-expected
Normal file
21
tests/modules/programs/ghostty/example-theme-expected
Normal file
@@ -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
|
||||
40
tests/modules/programs/ghostty/example-theme.nix
Normal file
40
tests/modules/programs/ghostty/example-theme.nix
Normal file
@@ -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"
|
||||
}
|
||||
|
||||
5
tests/modules/programs/kubecolor/default.nix
Normal file
5
tests/modules/programs/kubecolor/default.nix
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
kubecolor-empty-config = ./empty-config.nix;
|
||||
kubecolor-example-config-default-paths = ./example-config-default-paths.nix;
|
||||
kubecolor-example-config-xdg-paths = ./example-config-xdg-paths.nix;
|
||||
}
|
||||
20
tests/modules/programs/kubecolor/empty-config.nix
Normal file
20
tests/modules/programs/kubecolor/empty-config.nix
Normal file
@@ -0,0 +1,20 @@
|
||||
{ pkgs, config, ... }:
|
||||
|
||||
let
|
||||
configDir =
|
||||
if pkgs.stdenv.isDarwin then "Library/Application Support" else ".config";
|
||||
in {
|
||||
programs.kubecolor = {
|
||||
enable = true;
|
||||
package = config.lib.test.mkStubPackage {
|
||||
name = "kubecolor";
|
||||
version = "0.4.0";
|
||||
};
|
||||
};
|
||||
|
||||
test.stubs.kubecolor = { };
|
||||
|
||||
nmt.script = ''
|
||||
assertPathNotExists 'home-files/${configDir}/kube/color.yaml'
|
||||
'';
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
{ pkgs, config, ... }:
|
||||
|
||||
let
|
||||
configDir = if pkgs.stdenv.isDarwin then
|
||||
"Library/Application Support/kube"
|
||||
else
|
||||
".kube";
|
||||
in {
|
||||
programs.kubecolor = {
|
||||
enable = true;
|
||||
package = config.lib.test.mkStubPackage {
|
||||
name = "kubecolor";
|
||||
version = "0.4.0";
|
||||
};
|
||||
settings = {
|
||||
kubectl = "kubectl";
|
||||
preset = "dark";
|
||||
objFreshThreshold = 0;
|
||||
paging = "auto";
|
||||
pager = "less";
|
||||
};
|
||||
};
|
||||
|
||||
nmt.script = ''
|
||||
assertFileExists 'home-files/${configDir}/color.yaml'
|
||||
assertFileContent 'home-files/${configDir}/color.yaml' \
|
||||
${
|
||||
builtins.toFile "expected.yaml" ''
|
||||
kubectl: kubectl
|
||||
objFreshThreshold: 0
|
||||
pager: less
|
||||
paging: auto
|
||||
preset: dark
|
||||
''
|
||||
}
|
||||
'';
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
{ config, ... }:
|
||||
|
||||
{
|
||||
xdg.enable = true;
|
||||
home.preferXdgDirectories = true;
|
||||
|
||||
programs.kubecolor = {
|
||||
enable = true;
|
||||
package = config.lib.test.mkStubPackage {
|
||||
name = "kubecolor";
|
||||
version = "0.4.0";
|
||||
};
|
||||
settings = {
|
||||
kubectl = "kubectl";
|
||||
preset = "dark";
|
||||
objFreshThreshold = 0;
|
||||
paging = "auto";
|
||||
pager = "less";
|
||||
};
|
||||
};
|
||||
|
||||
nmt.script = ''
|
||||
assertFileExists 'home-files/.config/kube/color.yaml'
|
||||
assertFileContent 'home-files/.config/kube/color.yaml' \
|
||||
${
|
||||
builtins.toFile "expected.yaml" ''
|
||||
kubectl: kubectl
|
||||
objFreshThreshold: 0
|
||||
pager: less
|
||||
paging: auto
|
||||
preset: dark
|
||||
''
|
||||
}
|
||||
'';
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
Reference in New Issue
Block a user