Merge branch 'master' of https://github.com/nix-community/home-manager
Some checks failed
GitHub Pages / publish (ubuntu-latest) (push) Has been cancelled
Some checks failed
GitHub Pages / publish (ubuntu-latest) (push) Has been cancelled
This commit is contained in:
commit
1ffbc5166c
53 changed files with 691 additions and 92 deletions
|
@ -2,11 +2,11 @@
|
||||||
"nodes": {
|
"nodes": {
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1735471104,
|
"lastModified": 1736012469,
|
||||||
"narHash": "sha256-0q9NGQySwDQc7RhAV2ukfnu7Gxa5/ybJ2ANT8DQrQrs=",
|
"narHash": "sha256-/qlNWm/IEVVH7GfgAIyP6EsVZI6zjAx1cV5zNyrs+rI=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "88195a94f390381c6afcdaa933c2f6ff93959cb4",
|
"rev": "8f3e1f807051e32d8c95cd12b9b421623850a34d",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
@ -191,7 +191,7 @@ function setFlakeAttribute() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -v configFlake ]]; then
|
if [[ -v configFlake ]]; then
|
||||||
FLAKE_ARG="path:$(dirname "$(readlink -f "$configFlake")")"
|
FLAKE_ARG="$(dirname "$(readlink -f "$configFlake")")"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -8,8 +8,8 @@ msgstr ""
|
||||||
"Project-Id-Version: Home Manager\n"
|
"Project-Id-Version: Home Manager\n"
|
||||||
"Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n"
|
"Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n"
|
||||||
"POT-Creation-Date: 2025-01-03 09:09+0100\n"
|
"POT-Creation-Date: 2025-01-03 09:09+0100\n"
|
||||||
"PO-Revision-Date: 2024-04-29 18:07+0000\n"
|
"PO-Revision-Date: 2025-01-05 15:00+0000\n"
|
||||||
"Last-Translator: Michael Thomas <michaelhthomas@outlook.com>\n"
|
"Last-Translator: Dorian Burgun <docdoomduck@protonmail.com>\n"
|
||||||
"Language-Team: French <https://hosted.weblate.org/projects/home-manager/cli/"
|
"Language-Team: French <https://hosted.weblate.org/projects/home-manager/cli/"
|
||||||
"fr/>\n"
|
"fr/>\n"
|
||||||
"Language: fr\n"
|
"Language: fr\n"
|
||||||
|
@ -17,12 +17,12 @@ msgstr ""
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
"Plural-Forms: nplurals=2; plural=n > 1;\n"
|
"Plural-Forms: nplurals=2; plural=n > 1;\n"
|
||||||
"X-Generator: Weblate 5.5.2\n"
|
"X-Generator: Weblate 5.10-dev\n"
|
||||||
|
|
||||||
#. translators: For example: "home-manager: missing argument for --cores"
|
#. translators: For example: "home-manager: missing argument for --cores"
|
||||||
#: home-manager/home-manager:16
|
#: home-manager/home-manager:16
|
||||||
msgid "%s: missing argument for %s"
|
msgid "%s: missing argument for %s"
|
||||||
msgstr "%s : argument manquant pour %s"
|
msgstr "%s: argument manquant pour %s"
|
||||||
|
|
||||||
#: home-manager/home-manager:69
|
#: home-manager/home-manager:69
|
||||||
msgid "No configuration file found at %s"
|
msgid "No configuration file found at %s"
|
||||||
|
|
|
@ -478,6 +478,12 @@
|
||||||
github = "mainrs";
|
github = "mainrs";
|
||||||
githubId = 5113257;
|
githubId = 5113257;
|
||||||
};
|
};
|
||||||
|
mikilio = {
|
||||||
|
name = "mikilio";
|
||||||
|
email = "official.mikilio+dev@gmail.com";
|
||||||
|
github = "mikilio";
|
||||||
|
githubId = 86004375;
|
||||||
|
};
|
||||||
kmaasrud = {
|
kmaasrud = {
|
||||||
name = "Knut Magnus Aasrud";
|
name = "Knut Magnus Aasrud";
|
||||||
email = "km@aasrud.com";
|
email = "km@aasrud.com";
|
||||||
|
|
|
@ -1861,7 +1861,6 @@ in {
|
||||||
Some plugins require this to be set to 'false' to function correctly.
|
Some plugins require this to be set to 'false' to function correctly.
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
time = "2024-12-08T17:22:13+00:00";
|
time = "2024-12-08T17:22:13+00:00";
|
||||||
condition = let
|
condition = let
|
||||||
|
@ -1947,6 +1946,20 @@ in {
|
||||||
speed, features, or native UIs. Ghostty provides all three.
|
speed, features, or native UIs. Ghostty provides all three.
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
time = "2025-01-04T15:00:00+00:00";
|
||||||
|
condition = hostPlatform.isLinux;
|
||||||
|
message = ''
|
||||||
|
A new module is available: 'wayland.windowManager.wayfire'.
|
||||||
|
|
||||||
|
Wayfire is a 3D Wayland compositor, inspired by Compiz and based on
|
||||||
|
wlroots. It aims to create a customizable, extendable and lightweight
|
||||||
|
environment without sacrificing its appearance.
|
||||||
|
|
||||||
|
This Home Manager module allows you to configure both wayfire itself,
|
||||||
|
as well as wf-shell.
|
||||||
|
'';
|
||||||
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -246,6 +246,7 @@ let
|
||||||
./programs/tmate.nix
|
./programs/tmate.nix
|
||||||
./programs/tmux.nix
|
./programs/tmux.nix
|
||||||
./programs/tofi.nix
|
./programs/tofi.nix
|
||||||
|
./programs/todoman.nix
|
||||||
./programs/topgrade.nix
|
./programs/topgrade.nix
|
||||||
./programs/translate-shell.nix
|
./programs/translate-shell.nix
|
||||||
./programs/urxvt.nix
|
./programs/urxvt.nix
|
||||||
|
@ -345,6 +346,7 @@ let
|
||||||
./services/nextcloud-client.nix
|
./services/nextcloud-client.nix
|
||||||
./services/nix-gc.nix
|
./services/nix-gc.nix
|
||||||
./services/notify-osd.nix
|
./services/notify-osd.nix
|
||||||
|
./services/ollama.nix
|
||||||
./services/opensnitch-ui.nix
|
./services/opensnitch-ui.nix
|
||||||
./services/osmscout-server.nix
|
./services/osmscout-server.nix
|
||||||
./services/owncloud-client.nix
|
./services/owncloud-client.nix
|
||||||
|
@ -405,6 +407,7 @@ let
|
||||||
./services/window-managers/i3-sway/swaynag.nix
|
./services/window-managers/i3-sway/swaynag.nix
|
||||||
./services/window-managers/river.nix
|
./services/window-managers/river.nix
|
||||||
./services/window-managers/spectrwm.nix
|
./services/window-managers/spectrwm.nix
|
||||||
|
./services/window-managers/wayfire.nix
|
||||||
./services/window-managers/xmonad.nix
|
./services/window-managers/xmonad.nix
|
||||||
./services/wlsunset.nix
|
./services/wlsunset.nix
|
||||||
./services/wob.nix
|
./services/wob.nix
|
||||||
|
|
|
@ -8,8 +8,8 @@ msgstr ""
|
||||||
"Project-Id-Version: Home Manager Modules\n"
|
"Project-Id-Version: Home Manager Modules\n"
|
||||||
"Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n"
|
"Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n"
|
||||||
"POT-Creation-Date: 2025-01-03 09:09+0100\n"
|
"POT-Creation-Date: 2025-01-03 09:09+0100\n"
|
||||||
"PO-Revision-Date: 2024-10-15 21:37+0000\n"
|
"PO-Revision-Date: 2025-01-05 15:00+0000\n"
|
||||||
"Last-Translator: Viktor Illmer <accounts@viktor.im>\n"
|
"Last-Translator: programmerlexi <lexi@reyer.name>\n"
|
||||||
"Language-Team: German <https://hosted.weblate.org/projects/home-manager/"
|
"Language-Team: German <https://hosted.weblate.org/projects/home-manager/"
|
||||||
"modules/de/>\n"
|
"modules/de/>\n"
|
||||||
"Language: de\n"
|
"Language: de\n"
|
||||||
|
@ -17,7 +17,7 @@ msgstr ""
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||||
"X-Generator: Weblate 5.8-rc\n"
|
"X-Generator: Weblate 5.10-dev\n"
|
||||||
|
|
||||||
#: modules/files.nix:188
|
#: modules/files.nix:188
|
||||||
msgid "Creating home file links in %s"
|
msgid "Creating home file links in %s"
|
||||||
|
@ -29,11 +29,11 @@ msgstr "Bereinige verwaiste Links unter %s"
|
||||||
|
|
||||||
#: modules/home-environment.nix:591
|
#: modules/home-environment.nix:591
|
||||||
msgid "Creating new profile generation"
|
msgid "Creating new profile generation"
|
||||||
msgstr ""
|
msgstr "Erstelle neue Profilgeneration"
|
||||||
|
|
||||||
#: modules/home-environment.nix:594
|
#: modules/home-environment.nix:594
|
||||||
msgid "No change so reusing latest profile generation"
|
msgid "No change so reusing latest profile generation"
|
||||||
msgstr ""
|
msgstr "Keine Änderung, verwende letzte Profilgeneration"
|
||||||
|
|
||||||
#: modules/home-environment.nix:643
|
#: modules/home-environment.nix:643
|
||||||
msgid ""
|
msgid ""
|
||||||
|
@ -80,11 +80,11 @@ msgstr ""
|
||||||
|
|
||||||
#: modules/lib-bash/activation-init.sh:106
|
#: modules/lib-bash/activation-init.sh:106
|
||||||
msgid "Error: USER is set to \"%s\" but we expect \"%s\""
|
msgid "Error: USER is set to \"%s\" but we expect \"%s\""
|
||||||
msgstr "Fehler: USER ist auf \"%s\" gesetzt, aber wir erwarten \"%s\""
|
msgstr "Fehler: USER ist auf \"%s\" gesetzt, aber es wird \"%s\" erwartet"
|
||||||
|
|
||||||
#: modules/lib-bash/activation-init.sh:115
|
#: modules/lib-bash/activation-init.sh:115
|
||||||
msgid "Error: HOME is set to \"%s\" but we expect \"%s\""
|
msgid "Error: HOME is set to \"%s\" but we expect \"%s\""
|
||||||
msgstr "Fehler: HOME ist auf \"%s\" gesetzt, aber wir erwarten \"%s\""
|
msgstr "Fehler: HOME ist auf \"%s\" gesetzt, aber es wird \"%s\" erwartet"
|
||||||
|
|
||||||
#: modules/lib-bash/activation-init.sh:132
|
#: modules/lib-bash/activation-init.sh:132
|
||||||
msgid "Starting Home Manager activation"
|
msgid "Starting Home Manager activation"
|
||||||
|
|
|
@ -8,8 +8,8 @@ msgstr ""
|
||||||
"Project-Id-Version: Home Manager Modules\n"
|
"Project-Id-Version: Home Manager Modules\n"
|
||||||
"Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n"
|
"Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n"
|
||||||
"POT-Creation-Date: 2025-01-03 09:09+0100\n"
|
"POT-Creation-Date: 2025-01-03 09:09+0100\n"
|
||||||
"PO-Revision-Date: 2023-07-15 14:49+0000\n"
|
"PO-Revision-Date: 2025-01-05 15:00+0000\n"
|
||||||
"Last-Translator: swaps <swapgs@users.noreply.hosted.weblate.org>\n"
|
"Last-Translator: Dorian Burgun <docdoomduck@protonmail.com>\n"
|
||||||
"Language-Team: French <https://hosted.weblate.org/projects/home-manager/"
|
"Language-Team: French <https://hosted.weblate.org/projects/home-manager/"
|
||||||
"modules/fr/>\n"
|
"modules/fr/>\n"
|
||||||
"Language: fr\n"
|
"Language: fr\n"
|
||||||
|
@ -17,7 +17,7 @@ msgstr ""
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
"Plural-Forms: nplurals=2; plural=n > 1;\n"
|
"Plural-Forms: nplurals=2; plural=n > 1;\n"
|
||||||
"X-Generator: Weblate 5.0-dev\n"
|
"X-Generator: Weblate 5.10-dev\n"
|
||||||
|
|
||||||
#: modules/files.nix:188
|
#: modules/files.nix:188
|
||||||
msgid "Creating home file links in %s"
|
msgid "Creating home file links in %s"
|
||||||
|
@ -29,11 +29,11 @@ msgstr "Nettoyage des liens orphelins de %s"
|
||||||
|
|
||||||
#: modules/home-environment.nix:591
|
#: modules/home-environment.nix:591
|
||||||
msgid "Creating new profile generation"
|
msgid "Creating new profile generation"
|
||||||
msgstr ""
|
msgstr "Création d'une nouvelle génération de profil"
|
||||||
|
|
||||||
#: modules/home-environment.nix:594
|
#: modules/home-environment.nix:594
|
||||||
msgid "No change so reusing latest profile generation"
|
msgid "No change so reusing latest profile generation"
|
||||||
msgstr ""
|
msgstr "Aucun changement, donc réutilisation du dernier profil généré"
|
||||||
|
|
||||||
#: modules/home-environment.nix:643
|
#: modules/home-environment.nix:643
|
||||||
msgid ""
|
msgid ""
|
||||||
|
|
|
@ -6,6 +6,8 @@ let
|
||||||
|
|
||||||
cfg = config.programs.go;
|
cfg = config.programs.go;
|
||||||
|
|
||||||
|
modeFileContent = "${cfg.telemetry.mode} ${cfg.telemetry.date}";
|
||||||
|
|
||||||
in {
|
in {
|
||||||
meta.maintainers = [ maintainers.rvolosatovs ];
|
meta.maintainers = [ maintainers.rvolosatovs ];
|
||||||
|
|
||||||
|
@ -71,6 +73,31 @@ in {
|
||||||
or checksum database.
|
or checksum database.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
telemetry = mkOption {
|
||||||
|
type = types.submodule {
|
||||||
|
options = {
|
||||||
|
mode = mkOption {
|
||||||
|
type = with types; nullOr (enum [ "off" "local" "on" ]);
|
||||||
|
default = null;
|
||||||
|
description = "Go telemetry mode to be set.";
|
||||||
|
};
|
||||||
|
|
||||||
|
date = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "1970-01-01";
|
||||||
|
description = ''
|
||||||
|
The date indicating the date at which the modefile
|
||||||
|
was updated, in YYYY-MM-DD format. It's used to
|
||||||
|
reset the timeout before the next telemetry report
|
||||||
|
is uploaded when telemetry mode is set to "on".
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
default = { };
|
||||||
|
description = "Options to configure Go telemetry mode.";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -98,5 +125,17 @@ in {
|
||||||
(mkIf (cfg.goPrivate != [ ]) {
|
(mkIf (cfg.goPrivate != [ ]) {
|
||||||
home.sessionVariables.GOPRIVATE = concatStringsSep "," cfg.goPrivate;
|
home.sessionVariables.GOPRIVATE = concatStringsSep "," cfg.goPrivate;
|
||||||
})
|
})
|
||||||
|
|
||||||
|
(mkIf (cfg.telemetry.mode != null) {
|
||||||
|
home.file."Library/Application Support/go/telemetry/mode" = {
|
||||||
|
enable = pkgs.stdenv.hostPlatform.isDarwin;
|
||||||
|
text = modeFileContent;
|
||||||
|
};
|
||||||
|
|
||||||
|
xdg.configFile."go/telemetry/mode" = {
|
||||||
|
enable = !pkgs.stdenv.hostPlatform.isDarwin;
|
||||||
|
text = modeFileContent;
|
||||||
|
};
|
||||||
|
})
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,7 @@ let
|
||||||
int = toString option;
|
int = toString option;
|
||||||
float = int;
|
float = int;
|
||||||
path = int;
|
path = int;
|
||||||
bool = "false";
|
bool = "0"; # "on/off" opts are disabled with `=0`
|
||||||
string = option;
|
string = option;
|
||||||
list = concatStringsSep "," (lists.forEach option (x: toString x));
|
list = concatStringsSep "," (lists.forEach option (x: toString x));
|
||||||
}.${builtins.typeOf option};
|
}.${builtins.typeOf option};
|
||||||
|
|
|
@ -372,7 +372,12 @@ in {
|
||||||
sort = mkOption {
|
sort = mkOption {
|
||||||
# allow users to choose any option from sortOptions, or any option prefixed with "reverse-"
|
# allow users to choose any option from sortOptions, or any option prefixed with "reverse-"
|
||||||
type = types.enum
|
type = types.enum
|
||||||
(sortOptions ++ (map (option: "reverse-" + option) sortOptions));
|
(builtins.concatMap (_pre: map (_opt: _pre + _opt) sortOptions) [
|
||||||
|
""
|
||||||
|
"reverse-"
|
||||||
|
"last-"
|
||||||
|
"reverse-last-"
|
||||||
|
]);
|
||||||
default = "threads";
|
default = "threads";
|
||||||
description = "Sorting method on messages.";
|
description = "Sorting method on messages.";
|
||||||
};
|
};
|
||||||
|
|
|
@ -142,7 +142,7 @@ in {
|
||||||
config = mkIf cfg.enable (mkMerge [
|
config = mkIf cfg.enable (mkMerge [
|
||||||
{
|
{
|
||||||
programs.ranger.finalPackage = cfg.package.overrideAttrs (oldAttrs: {
|
programs.ranger.finalPackage = cfg.package.overrideAttrs (oldAttrs: {
|
||||||
propagatedBuildInputs = oldAttrs.propagatedBuildInputs
|
propagatedBuildInputs = (oldAttrs.propagatedBuildInputs or [ ])
|
||||||
++ cfg.extraPackages;
|
++ cfg.extraPackages;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
62
modules/programs/todoman.nix
Normal file
62
modules/programs/todoman.nix
Normal file
|
@ -0,0 +1,62 @@
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
|
||||||
|
cfg = config.programs.todoman;
|
||||||
|
|
||||||
|
format = pkgs.formats.keyValue { };
|
||||||
|
|
||||||
|
in {
|
||||||
|
|
||||||
|
meta.maintainers = [ hm.maintainers.mikilio ];
|
||||||
|
|
||||||
|
options.programs.todoman = {
|
||||||
|
enable = lib.mkEnableOption "todoman";
|
||||||
|
|
||||||
|
glob = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "*";
|
||||||
|
description = ''
|
||||||
|
The glob expansion which matches all directories relevant.
|
||||||
|
'';
|
||||||
|
example = "*/*";
|
||||||
|
};
|
||||||
|
|
||||||
|
extraConfig = mkOption {
|
||||||
|
type = types.lines;
|
||||||
|
default = "";
|
||||||
|
description = ''
|
||||||
|
Text for configuration of todoman.
|
||||||
|
The syntax is Python.
|
||||||
|
|
||||||
|
See [docs](`https://todoman.readthedocs.io/en/stable/man.html#id5`).
|
||||||
|
for the full list of options.
|
||||||
|
'';
|
||||||
|
example = ''
|
||||||
|
date_format = "%Y-%m-%d";
|
||||||
|
time_format = "%H:%M";
|
||||||
|
default_list = "Personal";
|
||||||
|
default_due = 48;
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
assertions = [{
|
||||||
|
assertion = config.accounts.calendar ? basePath;
|
||||||
|
message = ''
|
||||||
|
A base directory for calendars must be specified via
|
||||||
|
`accounts.calendar.basePath` to generate config for todoman
|
||||||
|
'';
|
||||||
|
}];
|
||||||
|
|
||||||
|
home.packages = [ pkgs.todoman ];
|
||||||
|
|
||||||
|
xdg.configFile."todoman/config.py".text = lib.concatLines [
|
||||||
|
''path = "${config.accounts.calendar.basePath}/${cfg.glob}"''
|
||||||
|
cfg.extraConfig
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
|
@ -671,7 +671,7 @@ in
|
||||||
|
|
||||||
''
|
''
|
||||||
${optionalString cfg.prezto.enable
|
${optionalString cfg.prezto.enable
|
||||||
(builtins.readFile "${pkgs.zsh-prezto}/share/zsh-prezto/runcoms/zshrc")}
|
(builtins.readFile "${cfg.prezto.package}/share/zsh-prezto/runcoms/zshrc")}
|
||||||
|
|
||||||
${concatStrings (map (plugin: ''
|
${concatStrings (map (plugin: ''
|
||||||
if [[ -f "$HOME/${pluginsDir}/${plugin.name}/${plugin.file}" ]]; then
|
if [[ -f "$HOME/${pluginsDir}/${plugin.name}/${plugin.file}" ]]; then
|
||||||
|
|
|
@ -14,6 +14,8 @@ let
|
||||||
options = {
|
options = {
|
||||||
enable = mkEnableOption "prezto";
|
enable = mkEnableOption "prezto";
|
||||||
|
|
||||||
|
package = mkPackageOption pkgs "prezto" { default = "zsh-prezto"; };
|
||||||
|
|
||||||
caseSensitive = mkOption {
|
caseSensitive = mkOption {
|
||||||
type = types.nullOr types.bool;
|
type = types.nullOr types.bool;
|
||||||
# See <https://github.com/nix-community/home-manager/issues/2255>.
|
# See <https://github.com/nix-community/home-manager/issues/2255>.
|
||||||
|
@ -379,15 +381,15 @@ in {
|
||||||
};
|
};
|
||||||
config = mkIf cfg.enable (mkMerge [{
|
config = mkIf cfg.enable (mkMerge [{
|
||||||
home.file."${relToDotDir ".zprofile"}".text =
|
home.file."${relToDotDir ".zprofile"}".text =
|
||||||
builtins.readFile "${pkgs.zsh-prezto}/share/zsh-prezto/runcoms/zprofile";
|
builtins.readFile "${cfg.package}/share/zsh-prezto/runcoms/zprofile";
|
||||||
home.file."${relToDotDir ".zlogin"}".text =
|
home.file."${relToDotDir ".zlogin"}".text =
|
||||||
builtins.readFile "${pkgs.zsh-prezto}/share/zsh-prezto/runcoms/zlogin";
|
builtins.readFile "${cfg.package}/share/zsh-prezto/runcoms/zlogin";
|
||||||
home.file."${relToDotDir ".zlogout"}".text =
|
home.file."${relToDotDir ".zlogout"}".text =
|
||||||
builtins.readFile "${pkgs.zsh-prezto}/share/zsh-prezto/runcoms/zlogout";
|
builtins.readFile "${cfg.package}/share/zsh-prezto/runcoms/zlogout";
|
||||||
home.packages = with pkgs; [ zsh-prezto ];
|
home.packages = [ cfg.package ];
|
||||||
|
|
||||||
home.file."${relToDotDir ".zshenv"}".text =
|
home.file."${relToDotDir ".zshenv"}".text =
|
||||||
builtins.readFile "${pkgs.zsh-prezto}/share/zsh-prezto/runcoms/zshenv";
|
builtins.readFile "${cfg.package}/share/zsh-prezto/runcoms/zshenv";
|
||||||
home.file."${relToDotDir ".zpreztorc"}".text = ''
|
home.file."${relToDotDir ".zpreztorc"}".text = ''
|
||||||
# Generated by Nix
|
# Generated by Nix
|
||||||
${optionalString (cfg.caseSensitive != null) ''
|
${optionalString (cfg.caseSensitive != null) ''
|
||||||
|
|
|
@ -282,7 +282,7 @@ in {
|
||||||
++ [ cfg.extraConfig ]);
|
++ [ cfg.extraConfig ]);
|
||||||
|
|
||||||
home.sessionVariablesExtra = optionalString cfg.enableSshSupport ''
|
home.sessionVariablesExtra = optionalString cfg.enableSshSupport ''
|
||||||
if [[ -z "$SSH_AUTH_SOCK" ]]; then
|
if [ -z "$SSH_AUTH_SOCK" ]; then
|
||||||
export SSH_AUTH_SOCK="$(${gpgPkg}/bin/gpgconf --list-dirs agent-ssh-socket)"
|
export SSH_AUTH_SOCK="$(${gpgPkg}/bin/gpgconf --list-dirs agent-ssh-socket)"
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -11,7 +11,7 @@ in {
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
services.network-manager-applet = {
|
services.network-manager-applet = {
|
||||||
enable = mkEnableOption "the Network Manager applet";
|
enable = mkEnableOption "the Network Manager applet (nm-applet)";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
97
modules/services/ollama.nix
Normal file
97
modules/services/ollama.nix
Normal file
|
@ -0,0 +1,97 @@
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
|
||||||
|
cfg = config.services.ollama;
|
||||||
|
|
||||||
|
ollamaPackage = if cfg.acceleration == null then
|
||||||
|
cfg.package
|
||||||
|
else
|
||||||
|
cfg.package.override { inherit (cfg) acceleration; };
|
||||||
|
|
||||||
|
in {
|
||||||
|
meta.maintainers = [ maintainers.terlar ];
|
||||||
|
|
||||||
|
options = {
|
||||||
|
services.ollama = {
|
||||||
|
enable = mkEnableOption "ollama server for local large language models";
|
||||||
|
|
||||||
|
package = mkPackageOption pkgs "ollama" { };
|
||||||
|
|
||||||
|
host = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "127.0.0.1";
|
||||||
|
example = "[::]";
|
||||||
|
description = ''
|
||||||
|
The host address which the ollama server HTTP interface listens to.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
port = mkOption {
|
||||||
|
type = types.port;
|
||||||
|
default = 11434;
|
||||||
|
example = 11111;
|
||||||
|
description = ''
|
||||||
|
Which port the ollama server listens to.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
acceleration = mkOption {
|
||||||
|
type = types.nullOr (types.enum [ false "rocm" "cuda" ]);
|
||||||
|
default = null;
|
||||||
|
example = "rocm";
|
||||||
|
description = ''
|
||||||
|
What interface to use for hardware acceleration.
|
||||||
|
|
||||||
|
- `null`: default behavior
|
||||||
|
- if `nixpkgs.config.rocmSupport` is enabled, uses `"rocm"`
|
||||||
|
- if `nixpkgs.config.cudaSupport` is enabled, uses `"cuda"`
|
||||||
|
- otherwise defaults to `false`
|
||||||
|
- `false`: disable GPU, only use CPU
|
||||||
|
- `"rocm"`: supported by most modern AMD GPUs
|
||||||
|
- may require overriding gpu type with `services.ollama.rocmOverrideGfx`
|
||||||
|
if rocm doesn't detect your AMD gpu
|
||||||
|
- `"cuda"`: supported by most modern NVIDIA GPUs
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
environmentVariables = mkOption {
|
||||||
|
type = types.attrsOf types.str;
|
||||||
|
default = { };
|
||||||
|
example = {
|
||||||
|
OLLAMA_LLM_LIBRARY = "cpu";
|
||||||
|
HIP_VISIBLE_DEVICES = "0,1";
|
||||||
|
};
|
||||||
|
description = ''
|
||||||
|
Set arbitrary environment variables for the ollama service.
|
||||||
|
|
||||||
|
Be aware that these are only seen by the ollama server (systemd service),
|
||||||
|
not normal invocations like `ollama run`.
|
||||||
|
Since `ollama run` is mostly a shell around the ollama server, this is usually sufficient.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
systemd.user.services.ollama = {
|
||||||
|
Unit = {
|
||||||
|
Description = "Server for local large language models";
|
||||||
|
After = [ "network.target" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
Service = {
|
||||||
|
ExecStart = "${getExe ollamaPackage} serve";
|
||||||
|
Environment =
|
||||||
|
(mapAttrsToList (n: v: "${n}=${v}") cfg.environmentVariables)
|
||||||
|
++ [ "OLLAMA_HOST=${cfg.host}:${toString cfg.port}" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
Install = { WantedBy = [ "default.target" ]; };
|
||||||
|
};
|
||||||
|
|
||||||
|
home.packages = [ ollamaPackage ];
|
||||||
|
};
|
||||||
|
}
|
|
@ -421,7 +421,13 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
hideEdgeBorders = mkOption {
|
hideEdgeBorders = mkOption {
|
||||||
type = types.enum [ "none" "vertical" "horizontal" "both" "smart" ];
|
type = let
|
||||||
|
i3Options = [ "none" "vertical" "horizontal" "both" "smart" ];
|
||||||
|
swayOptions = i3Options ++ [ "smart_no_gaps" ];
|
||||||
|
in if isI3 then
|
||||||
|
types.enum i3Options
|
||||||
|
else
|
||||||
|
types.enum (swayOptions ++ (map (e: "--i3 ${e}") swayOptions));
|
||||||
default = "none";
|
default = "none";
|
||||||
description = "Hide window borders adjacent to the screen edges.";
|
description = "Hide window borders adjacent to the screen edges.";
|
||||||
};
|
};
|
||||||
|
|
200
modules/services/window-managers/wayfire.nix
Normal file
200
modules/services/window-managers/wayfire.nix
Normal file
|
@ -0,0 +1,200 @@
|
||||||
|
{ lib, pkgs, config, ... }: {
|
||||||
|
meta.maintainers = [ lib.maintainers._0x5a4 ];
|
||||||
|
|
||||||
|
options.wayland.windowManager.wayfire = let
|
||||||
|
types = lib.types;
|
||||||
|
|
||||||
|
configIniType = with types;
|
||||||
|
let
|
||||||
|
primitiveType = either str (either bool number);
|
||||||
|
sectionType = attrsOf primitiveType;
|
||||||
|
in attrsOf sectionType;
|
||||||
|
in {
|
||||||
|
enable =
|
||||||
|
lib.mkEnableOption "Wayfire, a wayland compositor based on wlroots";
|
||||||
|
|
||||||
|
package = lib.mkPackageOption pkgs "wayfire" {
|
||||||
|
nullable = true;
|
||||||
|
extraDescription = ''
|
||||||
|
Set to `null` to not add any wayfire package to your path.
|
||||||
|
This should be done if you want to use the NixOS wayfire module to install wayfire.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
plugins = lib.mkOption {
|
||||||
|
type = lib.types.listOf lib.types.package;
|
||||||
|
default = with pkgs.wayfirePlugins; [ wf-shell ];
|
||||||
|
defaultText =
|
||||||
|
lib.literalExpression "with pkgs.wayfirePlugins; [ wf-shell ]";
|
||||||
|
example = lib.literalExpression ''
|
||||||
|
with pkgs.wayfirePlugins; [
|
||||||
|
wcm
|
||||||
|
wf-shell
|
||||||
|
wayfire-plugins-extra
|
||||||
|
];
|
||||||
|
'';
|
||||||
|
description = ''
|
||||||
|
Additional plugins to use with wayfire
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
xwayland.enable = lib.mkEnableOption "XWayland" // { default = true; };
|
||||||
|
|
||||||
|
settings = lib.mkOption {
|
||||||
|
type = types.submodule {
|
||||||
|
freeformType = configIniType;
|
||||||
|
|
||||||
|
options.core.plugins = lib.mkOption {
|
||||||
|
type = types.separatedString " ";
|
||||||
|
description = "Load the specified plugins";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
default = { };
|
||||||
|
description = ''
|
||||||
|
Wayfire configuration written in Nix.
|
||||||
|
|
||||||
|
See <https://github.com/WayfireWM/wayfire/wiki/Configuration>
|
||||||
|
'';
|
||||||
|
example = lib.literalExpression ''
|
||||||
|
{
|
||||||
|
core.plugins = "command expo cube";
|
||||||
|
command = {
|
||||||
|
binding_terminal = "alacritty";
|
||||||
|
command_terminal = "alacritty";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
wf-shell = {
|
||||||
|
enable = lib.mkEnableOption "Manage wf-shell Configuration";
|
||||||
|
|
||||||
|
package = lib.mkPackageOption pkgs.wayfirePlugins "wf-shell" { };
|
||||||
|
|
||||||
|
settings = lib.mkOption {
|
||||||
|
type = configIniType;
|
||||||
|
default = { };
|
||||||
|
description = ''
|
||||||
|
Wf-shell configuration written in Nix.
|
||||||
|
|
||||||
|
See <https://github.com/WayfireWM/wf-shell/blob/master/wf-shell.ini.example>
|
||||||
|
'';
|
||||||
|
example = lib.literalExpression ''
|
||||||
|
{
|
||||||
|
panel = {
|
||||||
|
widgets_left = "menu spacing4 launchers window-list";
|
||||||
|
autohide = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd = {
|
||||||
|
enable = lib.mkEnableOption null // {
|
||||||
|
default = true;
|
||||||
|
description = ''
|
||||||
|
Whether to enable {file}`wayfire-session.target` on
|
||||||
|
wayfire startup. This links to {file}`graphical-session.target`}.
|
||||||
|
Some important environment variables will be imported to systemd
|
||||||
|
and D-Bus user environment before reaching the target, including
|
||||||
|
- `DISPLAY`
|
||||||
|
- `WAYLAND_DISPLAY`
|
||||||
|
- `XDG_CURRENT_DESKTOP`
|
||||||
|
- `NIXOS_OZONE_WL`
|
||||||
|
- `XCURSOR_THEME`
|
||||||
|
- `XCURSOR_SIZE`
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
variables = lib.mkOption {
|
||||||
|
type = types.listOf types.str;
|
||||||
|
default = [
|
||||||
|
"DISPLAY"
|
||||||
|
"WAYLAND_DISPLAY"
|
||||||
|
"XDG_CURRENT_DESKTOP"
|
||||||
|
"NIXOS_OZONE_WL"
|
||||||
|
"XCURSOR_THEME"
|
||||||
|
"XCURSOR_SIZE"
|
||||||
|
];
|
||||||
|
example = [ "-all" ];
|
||||||
|
description = ''
|
||||||
|
Environment variables to be imported in the systemd & D-Bus user
|
||||||
|
environment.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
extraCommands = lib.mkOption {
|
||||||
|
type = types.listOf types.str;
|
||||||
|
default = [
|
||||||
|
"systemctl --user stop wayfire-session.target"
|
||||||
|
"systemctl --user start wayfire-session.target"
|
||||||
|
];
|
||||||
|
description = "Extra commands to be run after D-Bus activation.";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = let
|
||||||
|
cfg = config.wayland.windowManager.wayfire;
|
||||||
|
|
||||||
|
variables = builtins.concatStringsSep " " cfg.systemd.variables;
|
||||||
|
extraCommands = builtins.concatStringsSep " "
|
||||||
|
(map (f: "&& ${f}") cfg.systemd.extraCommands);
|
||||||
|
systemdActivation =
|
||||||
|
"${pkgs.dbus}/bin/dbus-update-activation-environment --systemd ${variables} ${extraCommands}";
|
||||||
|
|
||||||
|
finalPackage = pkgs.wayfire-with-plugins.override {
|
||||||
|
wayfire = cfg.package;
|
||||||
|
plugins = cfg.plugins;
|
||||||
|
};
|
||||||
|
in lib.mkIf cfg.enable {
|
||||||
|
assertions = [
|
||||||
|
(lib.hm.assertions.assertPlatform "wayland.windowManager.wayfire" pkgs
|
||||||
|
lib.platforms.linux)
|
||||||
|
];
|
||||||
|
|
||||||
|
home.packages = lib.mkIf (cfg.package != null) (lib.concatLists [
|
||||||
|
(lib.singleton finalPackage)
|
||||||
|
(lib.optional (cfg.xwayland.enable) pkgs.xwayland)
|
||||||
|
]);
|
||||||
|
|
||||||
|
wayland.windowManager.wayfire = {
|
||||||
|
settings = {
|
||||||
|
autostart = lib.mkIf cfg.systemd.enable { inherit systemdActivation; };
|
||||||
|
core = {
|
||||||
|
plugins = lib.concatStringsSep " " (lib.concatLists [
|
||||||
|
(lib.optional (cfg.systemd.enable) "autostart")
|
||||||
|
(lib.optional (cfg.wf-shell.enable) "wayfire-shell")
|
||||||
|
]);
|
||||||
|
xwayland = cfg.xwayland.enable;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
plugins = lib.optional cfg.wf-shell.enable cfg.wf-shell.package;
|
||||||
|
};
|
||||||
|
|
||||||
|
xdg.configFile."wayfire.ini".text = lib.generators.toINI { } cfg.settings;
|
||||||
|
|
||||||
|
xdg.configFile."wf-shell.ini" = lib.mkIf cfg.wf-shell.enable {
|
||||||
|
text = lib.generators.toINI { } cfg.wf-shell.settings;
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.user.targets.wayfire-session = lib.mkIf cfg.systemd.enable {
|
||||||
|
Unit = {
|
||||||
|
Description = "wayfire compositor session";
|
||||||
|
Documentation = [ "man:systemd.special(7)" ];
|
||||||
|
BindsTo = [ "graphical-session.target" ];
|
||||||
|
Wants = [ "graphical-session-pre.target" ];
|
||||||
|
After = [ "graphical-session-pre.target" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.user.targets.tray = {
|
||||||
|
Unit = {
|
||||||
|
Description = "Home Manager System Tray";
|
||||||
|
Requires = [ "graphical-session-pre.target" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -83,6 +83,7 @@ in import nmtSrc {
|
||||||
./modules/programs/git
|
./modules/programs/git
|
||||||
./modules/programs/git-cliff
|
./modules/programs/git-cliff
|
||||||
./modules/programs/git-credential-oauth
|
./modules/programs/git-credential-oauth
|
||||||
|
./modules/programs/go
|
||||||
./modules/programs/gpg
|
./modules/programs/gpg
|
||||||
./modules/programs/gradle
|
./modules/programs/gradle
|
||||||
./modules/programs/granted
|
./modules/programs/granted
|
||||||
|
@ -269,6 +270,7 @@ in import nmtSrc {
|
||||||
./modules/services/mpd-mpris
|
./modules/services/mpd-mpris
|
||||||
./modules/services/mpdris2
|
./modules/services/mpdris2
|
||||||
./modules/services/nix-gc
|
./modules/services/nix-gc
|
||||||
|
./modules/services/ollama
|
||||||
./modules/services/osmscout-server
|
./modules/services/osmscout-server
|
||||||
./modules/services/pantalaimon
|
./modules/services/pantalaimon
|
||||||
./modules/services/parcellite
|
./modules/services/parcellite
|
||||||
|
@ -302,6 +304,7 @@ in import nmtSrc {
|
||||||
./modules/services/window-managers/river
|
./modules/services/window-managers/river
|
||||||
./modules/services/window-managers/spectrwm
|
./modules/services/window-managers/spectrwm
|
||||||
./modules/services/window-managers/sway
|
./modules/services/window-managers/sway
|
||||||
|
./modules/services/window-managers/wayfire
|
||||||
./modules/services/wlsunset
|
./modules/services/wlsunset
|
||||||
./modules/services/wob
|
./modules/services/wob
|
||||||
./modules/services/xsettingsd
|
./modules/services/xsettingsd
|
||||||
|
|
|
@ -2,5 +2,5 @@
|
||||||
alacritty-example-settings = ./example-settings.nix;
|
alacritty-example-settings = ./example-settings.nix;
|
||||||
alacritty-empty-settings = ./empty-settings.nix;
|
alacritty-empty-settings = ./empty-settings.nix;
|
||||||
alacritty-merging-settings = ./settings-merging.nix;
|
alacritty-merging-settings = ./settings-merging.nix;
|
||||||
alacritty-toml-config = ./toml_config.nix;
|
alacritty-toml-config = ./toml-config.nix;
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,6 +20,8 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
test.stubs = { alacritty = { }; };
|
||||||
|
|
||||||
nmt.script = ''
|
nmt.script = ''
|
||||||
assertFileContent \
|
assertFileContent \
|
||||||
home-files/.config/alacritty/alacritty.toml \
|
home-files/.config/alacritty/alacritty.toml \
|
||||||
|
|
|
@ -28,6 +28,8 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
test.stubs = { alacritty = { }; };
|
||||||
|
|
||||||
nmt.script = ''
|
nmt.script = ''
|
||||||
assertFileContent \
|
assertFileContent \
|
||||||
home-files/.config/alacritty/alacritty.toml \
|
home-files/.config/alacritty/alacritty.toml \
|
||||||
|
|
|
@ -25,6 +25,8 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
test.stubs = { alacritty = { }; };
|
||||||
|
|
||||||
nmt.script = ''
|
nmt.script = ''
|
||||||
assertFileContent \
|
assertFileContent \
|
||||||
home-files/.config/alacritty/alacritty.toml \
|
home-files/.config/alacritty/alacritty.toml \
|
|
@ -6,6 +6,11 @@
|
||||||
settings.modal = true;
|
settings.modal = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
tests.stubs = {
|
||||||
|
broot = { };
|
||||||
|
hjson = { };
|
||||||
|
};
|
||||||
|
|
||||||
nmt.script = ''
|
nmt.script = ''
|
||||||
assertFileExists home-files/.config/broot/conf.toml
|
assertFileExists home-files/.config/broot/conf.toml
|
||||||
assertFileContains home-files/.config/broot/conf.toml 'modal = true'
|
assertFileContains home-files/.config/broot/conf.toml 'modal = true'
|
||||||
|
|
1
tests/modules/programs/go/default.nix
Normal file
1
tests/modules/programs/go/default.nix
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{ go-telemetry = ./go-telemetry.nix; }
|
25
tests/modules/programs/go/go-telemetry.nix
Normal file
25
tests/modules/programs/go/go-telemetry.nix
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
programs.go = {
|
||||||
|
enable = true;
|
||||||
|
telemetry = {
|
||||||
|
mode = "on";
|
||||||
|
date = "2006-01-02";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
test.stubs.go = { };
|
||||||
|
|
||||||
|
nm.script = let
|
||||||
|
modeFileDir = if !pkgs.stdenv.isDarwin then
|
||||||
|
".config/go/telemetry"
|
||||||
|
else
|
||||||
|
"Library/Application Support/go/telemetry";
|
||||||
|
in ''
|
||||||
|
assertFileExists "home-files/${modeFileDir}/mode"
|
||||||
|
assertFileContent \
|
||||||
|
"home-files/${modeFileDir}/mode" \
|
||||||
|
"on 2006-01-02"
|
||||||
|
'';
|
||||||
|
}
|
|
@ -6,7 +6,7 @@ cpu_stats
|
||||||
cpu_temp
|
cpu_temp
|
||||||
cpu_text=CPU
|
cpu_text=CPU
|
||||||
fps_limit=30,60
|
fps_limit=30,60
|
||||||
legacy_layout=false
|
legacy_layout=0
|
||||||
media_player_name=spotify
|
media_player_name=spotify
|
||||||
media_player_order=title,artist,album
|
media_player_order=title,artist,album
|
||||||
output_folder=/home/user/Documents/mangohud
|
output_folder=/home/user/Documents/mangohud
|
||||||
|
|
|
@ -31,6 +31,8 @@
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
test.stubs = { ranger = { }; };
|
||||||
|
|
||||||
nmt.script = ''
|
nmt.script = ''
|
||||||
assertFileExists home-files/.config/ranger/rc.conf
|
assertFileExists home-files/.config/ranger/rc.conf
|
||||||
assertFileContent home-files/.config/ranger/rc.conf \
|
assertFileContent home-files/.config/ranger/rc.conf \
|
||||||
|
|
21
tests/modules/programs/todoman/config.nix
Normal file
21
tests/modules/programs/todoman/config.nix
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
{
|
||||||
|
programs.todoman = {
|
||||||
|
enable = true;
|
||||||
|
glob = "*/*";
|
||||||
|
extraConfig = ''
|
||||||
|
date_format = "%d.%m.%Y"
|
||||||
|
default_list = "test"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
accounts.calendar.basePath = "base/path/calendar";
|
||||||
|
|
||||||
|
test.stubs = { todoman = { }; };
|
||||||
|
|
||||||
|
nmt.script = ''
|
||||||
|
configFile=home-files/.config/todoman/config.py
|
||||||
|
assertFileExists $configFile
|
||||||
|
assertFileContent $configFile ${./todoman-config-expected}
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
|
1
tests/modules/programs/todoman/default.nix
Normal file
1
tests/modules/programs/todoman/default.nix
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{ todoman-config = ./config.nix; }
|
3
tests/modules/programs/todoman/todoman-config-expected
Normal file
3
tests/modules/programs/todoman/todoman-config-expected
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
path = "/home/hm-user/base/path/calendar/*/*"
|
||||||
|
date_format = "%d.%m.%Y"
|
||||||
|
default_list = "test"
|
|
@ -1,4 +1,4 @@
|
||||||
{ config, pkgs, lib, xdg, ... }:
|
{ ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
programs.vim-vint = {
|
programs.vim-vint = {
|
||||||
|
@ -19,6 +19,8 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
test.stubs = { vim-vint = { }; };
|
||||||
|
|
||||||
nmt.script = ''
|
nmt.script = ''
|
||||||
assertFileContent home-files/.config/.vintrc.yaml ${
|
assertFileContent home-files/.config/.vintrc.yaml ${
|
||||||
./basic-configuration.yaml
|
./basic-configuration.yaml
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ ... }:
|
||||||
|
|
||||||
with lib;
|
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
|
./zsh-stubs.nix
|
||||||
({ ... }: { config.programs.zsh.history.ignorePatterns = [ "echo *" ]; })
|
({ ... }: { config.programs.zsh.history.ignorePatterns = [ "echo *" ]; })
|
||||||
({ ... }: { config.programs.zsh.history.ignorePatterns = [ "rm *" ]; })
|
({ ... }: { config.programs.zsh.history.ignorePatterns = [ "rm *" ]; })
|
||||||
];
|
];
|
||||||
|
@ -11,8 +10,6 @@ with lib;
|
||||||
config = {
|
config = {
|
||||||
programs.zsh.enable = true;
|
programs.zsh.enable = true;
|
||||||
|
|
||||||
test.stubs.zsh = { };
|
|
||||||
|
|
||||||
nmt.script = ''
|
nmt.script = ''
|
||||||
assertFileContains home-files/.zshrc "HISTORY_IGNORE='(echo *|rm *)'"
|
assertFileContains home-files/.zshrc "HISTORY_IGNORE='(echo *|rm *)'"
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ ... }:
|
||||||
|
|
||||||
with lib;
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
imports = [ ./zsh-stubs.nix ];
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
home.stateVersion = "20.03";
|
home.stateVersion = "20.03";
|
||||||
programs.zsh = {
|
programs.zsh = {
|
||||||
|
@ -10,8 +10,6 @@ with lib;
|
||||||
history.path = "$HOME/some/directory/zsh_history";
|
history.path = "$HOME/some/directory/zsh_history";
|
||||||
};
|
};
|
||||||
|
|
||||||
test.stubs.zsh = { };
|
|
||||||
|
|
||||||
nmt.script = ''
|
nmt.script = ''
|
||||||
assertFileRegex home-files/.zshrc '^HISTFILE="$HOME/some/directory/zsh_history"$'
|
assertFileRegex home-files/.zshrc '^HISTFILE="$HOME/some/directory/zsh_history"$'
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -1,14 +1,12 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ ... }:
|
||||||
|
|
||||||
with lib;
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
imports = [ ./zsh-stubs.nix ];
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
home.stateVersion = "20.03";
|
home.stateVersion = "20.03";
|
||||||
programs.zsh.enable = true;
|
programs.zsh.enable = true;
|
||||||
|
|
||||||
test.stubs.zsh = { };
|
|
||||||
|
|
||||||
nmt.script = ''
|
nmt.script = ''
|
||||||
assertFileRegex home-files/.zshrc '^HISTFILE="$HOME/.zsh_history"$'
|
assertFileRegex home-files/.zshrc '^HISTFILE="$HOME/.zsh_history"$'
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ ... }:
|
||||||
|
|
||||||
with lib;
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
imports = [ ./zsh-stubs.nix ];
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
home.stateVersion = "19.09";
|
home.stateVersion = "19.09";
|
||||||
programs.zsh = {
|
programs.zsh = {
|
||||||
|
@ -10,8 +10,6 @@ with lib;
|
||||||
history.path = "some/directory/zsh_history";
|
history.path = "some/directory/zsh_history";
|
||||||
};
|
};
|
||||||
|
|
||||||
test.stubs.zsh = { };
|
|
||||||
|
|
||||||
nmt.script = ''
|
nmt.script = ''
|
||||||
assertFileRegex home-files/.zshrc '^HISTFILE="$HOME/some/directory/zsh_history"$'
|
assertFileRegex home-files/.zshrc '^HISTFILE="$HOME/some/directory/zsh_history"$'
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -1,14 +1,12 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ ... }:
|
||||||
|
|
||||||
with lib;
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
imports = [ ./zsh-stubs.nix ];
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
home.stateVersion = "19.03";
|
home.stateVersion = "19.03";
|
||||||
programs.zsh.enable = true;
|
programs.zsh.enable = true;
|
||||||
|
|
||||||
test.stubs.zsh = { };
|
|
||||||
|
|
||||||
nmt.script = ''
|
nmt.script = ''
|
||||||
assertFileRegex home-files/.zshrc '^HISTFILE="$HOME/.zsh_history"$'
|
assertFileRegex home-files/.zshrc '^HISTFILE="$HOME/.zsh_history"$'
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ ... }:
|
||||||
|
|
||||||
with lib;
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
imports = [ ./zsh-stubs.nix ];
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
programs.zsh = {
|
programs.zsh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -13,8 +13,6 @@ with lib;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
test.stubs.zsh = { };
|
|
||||||
|
|
||||||
# Written with regex to ensure we don't end up missing newlines in the future
|
# Written with regex to ensure we don't end up missing newlines in the future
|
||||||
nmt.script = ''
|
nmt.script = ''
|
||||||
assertFileRegex home-files/.zshrc "^bindkey \"\^\[\[B\" history-substring-search-down$"
|
assertFileRegex home-files/.zshrc "^bindkey \"\^\[\[B\" history-substring-search-down$"
|
||||||
|
|
|
@ -1,20 +1,9 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ ... }:
|
||||||
|
|
||||||
with lib;
|
|
||||||
|
|
||||||
{
|
{
|
||||||
programs.zsh.prezto.enable = true;
|
imports = [ ./zsh-stubs.nix ];
|
||||||
|
|
||||||
test.stubs.zsh-prezto = {
|
programs.zsh.prezto.enable = true;
|
||||||
outPath = null;
|
|
||||||
buildScript = ''
|
|
||||||
mkdir -p $out/share/zsh-prezto/runcoms
|
|
||||||
echo '# zprofile' > $out/share/zsh-prezto/runcoms/zprofile
|
|
||||||
echo '# zlogin' > $out/share/zsh-prezto/runcoms/zlogin
|
|
||||||
echo '# zlogout' > $out/share/zsh-prezto/runcoms/zlogout
|
|
||||||
echo '# zshenv' > $out/share/zsh-prezto/runcoms/zshenv
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
nmt.script = ''
|
nmt.script = ''
|
||||||
assertFileExists home-files/.zpreztorc
|
assertFileExists home-files/.zpreztorc
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, ... }:
|
||||||
|
|
||||||
with lib;
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
imports = [ ./zsh-stubs.nix ];
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
programs.zsh = {
|
programs.zsh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -13,8 +13,6 @@ with lib;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
test.stubs.zsh = { };
|
|
||||||
|
|
||||||
nmt.script = ''
|
nmt.script = ''
|
||||||
assertFileExists home-files/.zshenv
|
assertFileExists home-files/.zshenv
|
||||||
assertFileRegex home-files/.zshenv 'export V1="v1"'
|
assertFileRegex home-files/.zshenv 'export V1="v1"'
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
|
|
||||||
with lib;
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
imports = [ ./zsh-stubs.nix ];
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
programs.zsh = {
|
programs.zsh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -15,8 +15,6 @@ with lib;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
test.stubs.zsh = { };
|
|
||||||
|
|
||||||
nmt.script = ''
|
nmt.script = ''
|
||||||
assertFileContains home-files/.zshrc "source ${pkgs.hello}/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh"
|
assertFileContains home-files/.zshrc "source ${pkgs.hello}/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh"
|
||||||
assertFileContains home-files/.zshrc "ZSH_HIGHLIGHT_HIGHLIGHTERS+=(brackets pattern cursor)"
|
assertFileContains home-files/.zshrc "ZSH_HIGHLIGHT_HIGHLIGHTERS+=(brackets pattern cursor)"
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
{ ... }:
|
{ ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
|
imports = [ ./zsh-stubs.nix ];
|
||||||
|
|
||||||
programs.zsh.zsh-abbr = {
|
programs.zsh.zsh-abbr = {
|
||||||
enable = true;
|
enable = true;
|
||||||
abbreviations = { ga = "git add"; };
|
abbreviations = { ga = "git add"; };
|
||||||
};
|
};
|
||||||
|
|
||||||
test.stubs.zsh-abbr = { };
|
|
||||||
|
|
||||||
nmt.script = ''
|
nmt.script = ''
|
||||||
abbreviations=home-files/.config/zsh-abbr/user-abbreviations
|
abbreviations=home-files/.config/zsh-abbr/user-abbreviations
|
||||||
|
|
||||||
|
|
22
tests/modules/programs/zsh/zsh-stubs.nix
Normal file
22
tests/modules/programs/zsh/zsh-stubs.nix
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
{ ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
test.stubs = {
|
||||||
|
hello = { };
|
||||||
|
nix-zsh-completions = { };
|
||||||
|
zsh = { };
|
||||||
|
zsh-abbr = { };
|
||||||
|
zsh-history-substring-search = { };
|
||||||
|
zsh-prezto = {
|
||||||
|
outPath = null;
|
||||||
|
buildScript = ''
|
||||||
|
mkdir -p $out/share/zsh-prezto/runcoms
|
||||||
|
echo '# zprofile' > $out/share/zsh-prezto/runcoms/zprofile
|
||||||
|
echo '# zlogin' > $out/share/zsh-prezto/runcoms/zlogin
|
||||||
|
echo '# zlogout' > $out/share/zsh-prezto/runcoms/zlogout
|
||||||
|
echo '# zshenv' > $out/share/zsh-prezto/runcoms/zshenv
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
zsh-syntax-highlighting = { };
|
||||||
|
};
|
||||||
|
}
|
13
tests/modules/services/ollama/basic.nix
Normal file
13
tests/modules/services/ollama/basic.nix
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
{
|
||||||
|
config = {
|
||||||
|
services.ollama.enable = true;
|
||||||
|
|
||||||
|
test.stubs.ollama = { };
|
||||||
|
|
||||||
|
nmt.script = ''
|
||||||
|
serviceFile="home-files/.config/systemd/user/ollama.service"
|
||||||
|
assertFileRegex "$serviceFile" 'After=network\.target'
|
||||||
|
assertFileRegex "$serviceFile" 'Environment=OLLAMA_HOST=127.0.0.1:11434'
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
4
tests/modules/services/ollama/default.nix
Normal file
4
tests/modules/services/ollama/default.nix
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
ollama-basic = ./basic.nix;
|
||||||
|
ollama-set-environment-variables = ./set-environment-variables.nix;
|
||||||
|
}
|
22
tests/modules/services/ollama/set-environment-variables.nix
Normal file
22
tests/modules/services/ollama/set-environment-variables.nix
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
{
|
||||||
|
config = {
|
||||||
|
services.ollama = {
|
||||||
|
enable = true;
|
||||||
|
host = "localhost";
|
||||||
|
port = 11111;
|
||||||
|
environmentVariables = {
|
||||||
|
OLLAMA_LLM_LIBRARY = "cpu";
|
||||||
|
HIP_VISIBLE_DEVICES = "0,1";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
test.stubs.ollama = { };
|
||||||
|
|
||||||
|
nmt.script = ''
|
||||||
|
serviceFile="home-files/.config/systemd/user/ollama.service"
|
||||||
|
assertFileRegex "$serviceFile" 'Environment=OLLAMA_HOST=localhost:11111'
|
||||||
|
assertFileRegex "$serviceFile" 'Environment=OLLAMA_LLM_LIBRARY=cpu'
|
||||||
|
assertFileRegex "$serviceFile" 'Environment=HIP_VISIBLE_DEVICES=0,1'
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
|
@ -0,0 +1,10 @@
|
||||||
|
[autostart]
|
||||||
|
systemdActivation=/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY XDG_CURRENT_DESKTOP NIXOS_OZONE_WL XCURSOR_THEME XCURSOR_SIZE && systemctl --user stop wayfire-session.target && systemctl --user start wayfire-session.target
|
||||||
|
|
||||||
|
[command]
|
||||||
|
binding_terminal=alacritty
|
||||||
|
command_terminal=alacritty
|
||||||
|
|
||||||
|
[core]
|
||||||
|
plugins=command expo cube autostart
|
||||||
|
xwayland=true
|
|
@ -0,0 +1,22 @@
|
||||||
|
{ ... }: {
|
||||||
|
wayland.windowManager.wayfire = {
|
||||||
|
enable = true;
|
||||||
|
package = null;
|
||||||
|
settings = {
|
||||||
|
core.plugins = "command expo cube";
|
||||||
|
command = {
|
||||||
|
binding_terminal = "alacritty";
|
||||||
|
command_terminal = "alacritty";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
nmt.script = ''
|
||||||
|
wayfireConfig=home-files/.config/wayfire.ini
|
||||||
|
|
||||||
|
assertFileExists "$wayfireConfig"
|
||||||
|
|
||||||
|
normalizedConfig=$(normalizeStorePaths "$wayfireConfig")
|
||||||
|
assertFileContent "$normalizedConfig" "${./configuration.ini}"
|
||||||
|
'';
|
||||||
|
}
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
wayfire-configuration = ./configuration.nix;
|
||||||
|
wayfire-wf-shell = ./wf-shell.nix;
|
||||||
|
}
|
|
@ -0,0 +1,3 @@
|
||||||
|
[panel]
|
||||||
|
autohide=true
|
||||||
|
widgets_left=menu spacing4 launchers window-list
|
25
tests/modules/services/window-managers/wayfire/wf-shell.nix
Normal file
25
tests/modules/services/window-managers/wayfire/wf-shell.nix
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
{ pkgs, ... }: {
|
||||||
|
wayland.windowManager.wayfire = {
|
||||||
|
enable = true;
|
||||||
|
package = null;
|
||||||
|
wf-shell = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.mkStubPackage { };
|
||||||
|
settings = {
|
||||||
|
panel = {
|
||||||
|
widgets_left = "menu spacing4 launchers window-list";
|
||||||
|
autohide = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
nmt.script = ''
|
||||||
|
wfShellConfig=home-files/.config/wf-shell.ini
|
||||||
|
|
||||||
|
assertFileExists "$wfShellConfig"
|
||||||
|
|
||||||
|
normalizedConfig=$(normalizeStorePaths "$wfShellConfig")
|
||||||
|
assertFileContent "$normalizedConfig" "${./wf-shell.ini}"
|
||||||
|
'';
|
||||||
|
}
|
Loading…
Reference in a new issue