mirror of
https://github.com/nix-community/home-manager
synced 2024-11-30 23:19:47 +01:00
services.eww: init
There is no point in making eww a program (as it is now) as it does nothing more that install eww package. Eww uses it's own configuration language, therefore it's not likely going to be configured via nix settings etc. Current `programs.eww.config` option seems to be broken as per: #4595 #4886 . Personally I think we should remove eww from programs. There was a packaging request: #4265 Perhaps `programs.eww` should be removed?
This commit is contained in:
parent
383296ffa4
commit
1c93b64d49
7 changed files with 77 additions and 0 deletions
|
@ -171,6 +171,12 @@
|
|||
github = "LucasWagler";
|
||||
githubId = 32136449;
|
||||
};
|
||||
madnat = {
|
||||
name = "Jakub Kopański";
|
||||
email = "nix@jakub.famisoft.pl";
|
||||
github = "jkopanski";
|
||||
githubId = 611423;
|
||||
};
|
||||
matrss = {
|
||||
name = "Matthias Riße";
|
||||
email = "matrss@users.noreply.github.com";
|
||||
|
|
|
@ -1443,6 +1443,13 @@ in {
|
|||
A new module is available: 'programs.joplin-desktop'.
|
||||
'';
|
||||
}
|
||||
|
||||
{
|
||||
time = "2024-03-13T17:04:13+00:00";
|
||||
message = ''
|
||||
A new module is available: 'services.eww'.
|
||||
'';
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -280,6 +280,7 @@ let
|
|||
./services/emacs.nix
|
||||
./services/etesync-dav.nix
|
||||
./services/espanso.nix
|
||||
./services/eww.nix
|
||||
./services/flameshot.nix
|
||||
./services/fluidsynth.nix
|
||||
./services/fnott.nix
|
||||
|
|
42
modules/services/eww.nix
Normal file
42
modules/services/eww.nix
Normal file
|
@ -0,0 +1,42 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let cfg = config.services.eww;
|
||||
|
||||
in {
|
||||
meta.maintainers = [ lib.hm.maintainers.madnat ];
|
||||
|
||||
options = {
|
||||
services.eww = {
|
||||
enable = lib.mkEnableOption "ElKowars wacky widgets daemon";
|
||||
|
||||
package = lib.mkPackageOption pkgs "eww" { };
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
assertions = [
|
||||
(lib.hm.assertions.assertPlatform "services.emacs" pkgs
|
||||
lib.platforms.linux)
|
||||
];
|
||||
|
||||
home.packages = [ cfg.package ];
|
||||
|
||||
systemd.user.services.eww = {
|
||||
Unit = {
|
||||
Description = "ElKowars wacky widgets daemon";
|
||||
After = [ "graphical-session.target" ];
|
||||
PartOf = [ "graphical-session.target" ];
|
||||
};
|
||||
|
||||
Service = let eww = lib.getExe cfg.package;
|
||||
in {
|
||||
Type = "simple";
|
||||
ExecStart = "${eww} daemon --no-daemonize";
|
||||
ExecStop = "${eww} kill";
|
||||
ExecReload = "${eww} reload";
|
||||
};
|
||||
|
||||
Install.WantedBy = [ "graphical-session.target" ];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -223,6 +223,7 @@ in import nmtSrc {
|
|||
./modules/services/dropbox
|
||||
./modules/services/emacs
|
||||
./modules/services/espanso
|
||||
./modules/services/eww
|
||||
./modules/services/flameshot
|
||||
./modules/services/fluidsynth
|
||||
./modules/services/fnott
|
||||
|
|
19
tests/modules/services/eww/basic-configuration.nix
Normal file
19
tests/modules/services/eww/basic-configuration.nix
Normal file
|
@ -0,0 +1,19 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
config = {
|
||||
services.eww = {
|
||||
enable = true;
|
||||
package = pkgs.writeScriptBin "dummy-eww" "";
|
||||
};
|
||||
|
||||
nmt.script = ''
|
||||
local serviceFile=home-files/.config/systemd/user/eww.service
|
||||
|
||||
assertFileExists $serviceFile
|
||||
assertFileRegex $serviceFile 'ExecStart=.*/bin/eww --no-daemonize'
|
||||
assertFileRegex $serviceFile 'ExecStop=.*/bin/eww kill'
|
||||
assertFileRegex $serviceFile 'ExecReload=.*/bin/eww reload'
|
||||
'';
|
||||
};
|
||||
}
|
1
tests/modules/services/eww/default.nix
Normal file
1
tests/modules/services/eww/default.nix
Normal file
|
@ -0,0 +1 @@
|
|||
{ eww-basic-configuration = ./basic-configuration.nix; }
|
Loading…
Reference in a new issue