Merge branch 'master' of https://github.com/nix-community/home-manager
Some checks failed
GitHub Pages / publish (ubuntu-latest) (push) Has been cancelled

This commit is contained in:
Grimmauld 2025-01-15 12:45:58 +01:00
commit 1ffbc5166c
No known key found for this signature in database
53 changed files with 691 additions and 92 deletions

View file

@ -2,11 +2,11 @@
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1735471104,
"narHash": "sha256-0q9NGQySwDQc7RhAV2ukfnu7Gxa5/ybJ2ANT8DQrQrs=",
"lastModified": 1736012469,
"narHash": "sha256-/qlNWm/IEVVH7GfgAIyP6EsVZI6zjAx1cV5zNyrs+rI=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "88195a94f390381c6afcdaa933c2f6ff93959cb4",
"rev": "8f3e1f807051e32d8c95cd12b9b421623850a34d",
"type": "github"
},
"original": {

View file

@ -191,7 +191,7 @@ function setFlakeAttribute() {
fi
if [[ -v configFlake ]]; then
FLAKE_ARG="path:$(dirname "$(readlink -f "$configFlake")")"
FLAKE_ARG="$(dirname "$(readlink -f "$configFlake")")"
fi
fi

View file

@ -8,8 +8,8 @@ msgstr ""
"Project-Id-Version: Home Manager\n"
"Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n"
"POT-Creation-Date: 2025-01-03 09:09+0100\n"
"PO-Revision-Date: 2024-04-29 18:07+0000\n"
"Last-Translator: Michael Thomas <michaelhthomas@outlook.com>\n"
"PO-Revision-Date: 2025-01-05 15:00+0000\n"
"Last-Translator: Dorian Burgun <docdoomduck@protonmail.com>\n"
"Language-Team: French <https://hosted.weblate.org/projects/home-manager/cli/"
"fr/>\n"
"Language: fr\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.2\n"
"X-Generator: Weblate 5.10-dev\n"
#. translators: For example: "home-manager: missing argument for --cores"
#: home-manager/home-manager:16
msgid "%s: missing argument for %s"
msgstr "%s: argument manquant pour %s"
msgstr "%s: argument manquant pour %s"
#: home-manager/home-manager:69
msgid "No configuration file found at %s"

View file

@ -478,6 +478,12 @@
github = "mainrs";
githubId = 5113257;
};
mikilio = {
name = "mikilio";
email = "official.mikilio+dev@gmail.com";
github = "mikilio";
githubId = 86004375;
};
kmaasrud = {
name = "Knut Magnus Aasrud";
email = "km@aasrud.com";

View file

@ -1861,7 +1861,6 @@ in {
Some plugins require this to be set to 'false' to function correctly.
'';
}
{
time = "2024-12-08T17:22:13+00:00";
condition = let
@ -1947,6 +1946,20 @@ in {
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.
'';
}
];
};
}

View file

@ -246,6 +246,7 @@ let
./programs/tmate.nix
./programs/tmux.nix
./programs/tofi.nix
./programs/todoman.nix
./programs/topgrade.nix
./programs/translate-shell.nix
./programs/urxvt.nix
@ -345,6 +346,7 @@ let
./services/nextcloud-client.nix
./services/nix-gc.nix
./services/notify-osd.nix
./services/ollama.nix
./services/opensnitch-ui.nix
./services/osmscout-server.nix
./services/owncloud-client.nix
@ -405,6 +407,7 @@ let
./services/window-managers/i3-sway/swaynag.nix
./services/window-managers/river.nix
./services/window-managers/spectrwm.nix
./services/window-managers/wayfire.nix
./services/window-managers/xmonad.nix
./services/wlsunset.nix
./services/wob.nix

View file

@ -8,8 +8,8 @@ msgstr ""
"Project-Id-Version: Home Manager Modules\n"
"Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n"
"POT-Creation-Date: 2025-01-03 09:09+0100\n"
"PO-Revision-Date: 2024-10-15 21:37+0000\n"
"Last-Translator: Viktor Illmer <accounts@viktor.im>\n"
"PO-Revision-Date: 2025-01-05 15:00+0000\n"
"Last-Translator: programmerlexi <lexi@reyer.name>\n"
"Language-Team: German <https://hosted.weblate.org/projects/home-manager/"
"modules/de/>\n"
"Language: de\n"
@ -17,7 +17,7 @@ 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.8-rc\n"
"X-Generator: Weblate 5.10-dev\n"
#: modules/files.nix:188
msgid "Creating home file links in %s"
@ -29,11 +29,11 @@ msgstr "Bereinige verwaiste Links unter %s"
#: modules/home-environment.nix:591
msgid "Creating new profile generation"
msgstr ""
msgstr "Erstelle neue Profilgeneration"
#: modules/home-environment.nix:594
msgid "No change so reusing latest profile generation"
msgstr ""
msgstr "Keine Änderung, verwende letzte Profilgeneration"
#: modules/home-environment.nix:643
msgid ""
@ -80,11 +80,11 @@ msgstr ""
#: modules/lib-bash/activation-init.sh:106
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
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
msgid "Starting Home Manager activation"

View file

@ -8,8 +8,8 @@ msgstr ""
"Project-Id-Version: Home Manager Modules\n"
"Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n"
"POT-Creation-Date: 2025-01-03 09:09+0100\n"
"PO-Revision-Date: 2023-07-15 14:49+0000\n"
"Last-Translator: swaps <swapgs@users.noreply.hosted.weblate.org>\n"
"PO-Revision-Date: 2025-01-05 15:00+0000\n"
"Last-Translator: Dorian Burgun <docdoomduck@protonmail.com>\n"
"Language-Team: French <https://hosted.weblate.org/projects/home-manager/"
"modules/fr/>\n"
"Language: fr\n"
@ -17,7 +17,7 @@ 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.0-dev\n"
"X-Generator: Weblate 5.10-dev\n"
#: modules/files.nix:188
msgid "Creating home file links in %s"
@ -29,11 +29,11 @@ msgstr "Nettoyage des liens orphelins de %s"
#: modules/home-environment.nix:591
msgid "Creating new profile generation"
msgstr ""
msgstr "Création d'une nouvelle génération de profil"
#: modules/home-environment.nix:594
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
msgid ""

View file

@ -6,6 +6,8 @@ let
cfg = config.programs.go;
modeFileContent = "${cfg.telemetry.mode} ${cfg.telemetry.date}";
in {
meta.maintainers = [ maintainers.rvolosatovs ];
@ -71,6 +73,31 @@ in {
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 != [ ]) {
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;
};
})
]);
}

View file

@ -13,7 +13,7 @@ let
int = toString option;
float = int;
path = int;
bool = "false";
bool = "0"; # "on/off" opts are disabled with `=0`
string = option;
list = concatStringsSep "," (lists.forEach option (x: toString x));
}.${builtins.typeOf option};

View file

@ -372,7 +372,12 @@ in {
sort = mkOption {
# allow users to choose any option from sortOptions, or any option prefixed with "reverse-"
type = types.enum
(sortOptions ++ (map (option: "reverse-" + option) sortOptions));
(builtins.concatMap (_pre: map (_opt: _pre + _opt) sortOptions) [
""
"reverse-"
"last-"
"reverse-last-"
]);
default = "threads";
description = "Sorting method on messages.";
};

View file

@ -142,7 +142,7 @@ in {
config = mkIf cfg.enable (mkMerge [
{
programs.ranger.finalPackage = cfg.package.overrideAttrs (oldAttrs: {
propagatedBuildInputs = oldAttrs.propagatedBuildInputs
propagatedBuildInputs = (oldAttrs.propagatedBuildInputs or [ ])
++ cfg.extraPackages;
});

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

View file

@ -671,7 +671,7 @@ in
''
${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: ''
if [[ -f "$HOME/${pluginsDir}/${plugin.name}/${plugin.file}" ]]; then

View file

@ -14,6 +14,8 @@ let
options = {
enable = mkEnableOption "prezto";
package = mkPackageOption pkgs "prezto" { default = "zsh-prezto"; };
caseSensitive = mkOption {
type = types.nullOr types.bool;
# See <https://github.com/nix-community/home-manager/issues/2255>.
@ -379,15 +381,15 @@ in {
};
config = mkIf cfg.enable (mkMerge [{
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 =
builtins.readFile "${pkgs.zsh-prezto}/share/zsh-prezto/runcoms/zlogin";
builtins.readFile "${cfg.package}/share/zsh-prezto/runcoms/zlogin";
home.file."${relToDotDir ".zlogout"}".text =
builtins.readFile "${pkgs.zsh-prezto}/share/zsh-prezto/runcoms/zlogout";
home.packages = with pkgs; [ zsh-prezto ];
builtins.readFile "${cfg.package}/share/zsh-prezto/runcoms/zlogout";
home.packages = [ cfg.package ];
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 = ''
# Generated by Nix
${optionalString (cfg.caseSensitive != null) ''

View file

@ -282,7 +282,7 @@ in {
++ [ cfg.extraConfig ]);
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)"
fi
'';

View file

@ -11,7 +11,7 @@ in {
options = {
services.network-manager-applet = {
enable = mkEnableOption "the Network Manager applet";
enable = mkEnableOption "the Network Manager applet (nm-applet)";
};
};

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

View file

@ -421,7 +421,13 @@ in {
};
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";
description = "Hide window borders adjacent to the screen edges.";
};

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

View file

@ -83,6 +83,7 @@ in import nmtSrc {
./modules/programs/git
./modules/programs/git-cliff
./modules/programs/git-credential-oauth
./modules/programs/go
./modules/programs/gpg
./modules/programs/gradle
./modules/programs/granted
@ -269,6 +270,7 @@ in import nmtSrc {
./modules/services/mpd-mpris
./modules/services/mpdris2
./modules/services/nix-gc
./modules/services/ollama
./modules/services/osmscout-server
./modules/services/pantalaimon
./modules/services/parcellite
@ -302,6 +304,7 @@ in import nmtSrc {
./modules/services/window-managers/river
./modules/services/window-managers/spectrwm
./modules/services/window-managers/sway
./modules/services/window-managers/wayfire
./modules/services/wlsunset
./modules/services/wob
./modules/services/xsettingsd

View file

@ -2,5 +2,5 @@
alacritty-example-settings = ./example-settings.nix;
alacritty-empty-settings = ./empty-settings.nix;
alacritty-merging-settings = ./settings-merging.nix;
alacritty-toml-config = ./toml_config.nix;
alacritty-toml-config = ./toml-config.nix;
}

View file

@ -20,6 +20,8 @@
};
};
test.stubs = { alacritty = { }; };
nmt.script = ''
assertFileContent \
home-files/.config/alacritty/alacritty.toml \

View file

@ -28,6 +28,8 @@
};
};
test.stubs = { alacritty = { }; };
nmt.script = ''
assertFileContent \
home-files/.config/alacritty/alacritty.toml \

View file

@ -25,6 +25,8 @@
};
};
test.stubs = { alacritty = { }; };
nmt.script = ''
assertFileContent \
home-files/.config/alacritty/alacritty.toml \

View file

@ -6,6 +6,11 @@
settings.modal = true;
};
tests.stubs = {
broot = { };
hjson = { };
};
nmt.script = ''
assertFileExists home-files/.config/broot/conf.toml
assertFileContains home-files/.config/broot/conf.toml 'modal = true'

View file

@ -0,0 +1 @@
{ go-telemetry = ./go-telemetry.nix; }

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

View file

@ -6,7 +6,7 @@ cpu_stats
cpu_temp
cpu_text=CPU
fps_limit=30,60
legacy_layout=false
legacy_layout=0
media_player_name=spotify
media_player_order=title,artist,album
output_folder=/home/user/Documents/mangohud

View file

@ -31,6 +31,8 @@
];
};
test.stubs = { ranger = { }; };
nmt.script = ''
assertFileExists home-files/.config/ranger/rc.conf
assertFileContent home-files/.config/ranger/rc.conf \

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

View file

@ -0,0 +1 @@
{ todoman-config = ./config.nix; }

View file

@ -0,0 +1,3 @@
path = "/home/hm-user/base/path/calendar/*/*"
date_format = "%d.%m.%Y"
default_list = "test"

View file

@ -1,4 +1,4 @@
{ config, pkgs, lib, xdg, ... }:
{ ... }:
{
programs.vim-vint = {
@ -19,6 +19,8 @@
};
};
test.stubs = { vim-vint = { }; };
nmt.script = ''
assertFileContent home-files/.config/.vintrc.yaml ${
./basic-configuration.yaml

View file

@ -1,9 +1,8 @@
{ config, lib, pkgs, ... }:
with lib;
{ ... }:
{
imports = [
./zsh-stubs.nix
({ ... }: { config.programs.zsh.history.ignorePatterns = [ "echo *" ]; })
({ ... }: { config.programs.zsh.history.ignorePatterns = [ "rm *" ]; })
];
@ -11,8 +10,6 @@ with lib;
config = {
programs.zsh.enable = true;
test.stubs.zsh = { };
nmt.script = ''
assertFileContains home-files/.zshrc "HISTORY_IGNORE='(echo *|rm *)'"
'';

View file

@ -1,8 +1,8 @@
{ config, lib, pkgs, ... }:
with lib;
{ ... }:
{
imports = [ ./zsh-stubs.nix ];
config = {
home.stateVersion = "20.03";
programs.zsh = {
@ -10,8 +10,6 @@ with lib;
history.path = "$HOME/some/directory/zsh_history";
};
test.stubs.zsh = { };
nmt.script = ''
assertFileRegex home-files/.zshrc '^HISTFILE="$HOME/some/directory/zsh_history"$'
'';

View file

@ -1,14 +1,12 @@
{ config, lib, pkgs, ... }:
with lib;
{ ... }:
{
imports = [ ./zsh-stubs.nix ];
config = {
home.stateVersion = "20.03";
programs.zsh.enable = true;
test.stubs.zsh = { };
nmt.script = ''
assertFileRegex home-files/.zshrc '^HISTFILE="$HOME/.zsh_history"$'
'';

View file

@ -1,8 +1,8 @@
{ config, lib, pkgs, ... }:
with lib;
{ ... }:
{
imports = [ ./zsh-stubs.nix ];
config = {
home.stateVersion = "19.09";
programs.zsh = {
@ -10,8 +10,6 @@ with lib;
history.path = "some/directory/zsh_history";
};
test.stubs.zsh = { };
nmt.script = ''
assertFileRegex home-files/.zshrc '^HISTFILE="$HOME/some/directory/zsh_history"$'
'';

View file

@ -1,14 +1,12 @@
{ config, lib, pkgs, ... }:
with lib;
{ ... }:
{
imports = [ ./zsh-stubs.nix ];
config = {
home.stateVersion = "19.03";
programs.zsh.enable = true;
test.stubs.zsh = { };
nmt.script = ''
assertFileRegex home-files/.zshrc '^HISTFILE="$HOME/.zsh_history"$'
'';

View file

@ -1,8 +1,8 @@
{ config, lib, pkgs, ... }:
with lib;
{ ... }:
{
imports = [ ./zsh-stubs.nix ];
config = {
programs.zsh = {
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
nmt.script = ''
assertFileRegex home-files/.zshrc "^bindkey \"\^\[\[B\" history-substring-search-down$"

View file

@ -1,20 +1,9 @@
{ config, lib, pkgs, ... }:
with lib;
{ ... }:
{
programs.zsh.prezto.enable = true;
imports = [ ./zsh-stubs.nix ];
test.stubs.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
'';
};
programs.zsh.prezto.enable = true;
nmt.script = ''
assertFileExists home-files/.zpreztorc

View file

@ -1,8 +1,8 @@
{ config, lib, pkgs, ... }:
with lib;
{ config, ... }:
{
imports = [ ./zsh-stubs.nix ];
config = {
programs.zsh = {
enable = true;
@ -13,8 +13,6 @@ with lib;
};
};
test.stubs.zsh = { };
nmt.script = ''
assertFileExists home-files/.zshenv
assertFileRegex home-files/.zshenv 'export V1="v1"'

View file

@ -1,8 +1,8 @@
{ config, lib, pkgs, ... }:
with lib;
{ pkgs, ... }:
{
imports = [ ./zsh-stubs.nix ];
config = {
programs.zsh = {
enable = true;
@ -15,8 +15,6 @@ with lib;
};
};
test.stubs.zsh = { };
nmt.script = ''
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)"

View file

@ -1,13 +1,13 @@
{ ... }:
{
imports = [ ./zsh-stubs.nix ];
programs.zsh.zsh-abbr = {
enable = true;
abbreviations = { ga = "git add"; };
};
test.stubs.zsh-abbr = { };
nmt.script = ''
abbreviations=home-files/.config/zsh-abbr/user-abbreviations

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

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

View file

@ -0,0 +1,4 @@
{
ollama-basic = ./basic.nix;
ollama-set-environment-variables = ./set-environment-variables.nix;
}

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

View file

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

View file

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

View file

@ -0,0 +1,4 @@
{
wayfire-configuration = ./configuration.nix;
wayfire-wf-shell = ./wf-shell.nix;
}

View file

@ -0,0 +1,3 @@
[panel]
autohide=true
widgets_left=menu spacing4 launchers window-list

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