diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 7369e521..c120bd92 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -202,6 +202,8 @@ /modules/services/pbgopy.nix @ivarwithoutbones /tests/modules/services/pbgopy @ivarwithoutbones +/modules/services/plan9port.nix @ehmry + /modules/services/pulseeffects.nix @jonringer /modules/services/random-background.nix @rycee diff --git a/modules/misc/news.nix b/modules/misc/news.nix index fa2c1839..338282ce 100644 --- a/modules/misc/news.nix +++ b/modules/misc/news.nix @@ -1804,7 +1804,15 @@ in https://github.com/nix-community/home-manager/issues/1691 for discussion. - ''; + ''; + } + + { + time = "2021-01-02T07:49:15+00:00"; + condition = hostPlatform.isLinux; + message = '' + A new module is available: 'services.plan9port'. + ''; } ]; }; diff --git a/modules/modules.nix b/modules/modules.nix index 38cd815e..74dce1e1 100644 --- a/modules/modules.nix +++ b/modules/modules.nix @@ -173,6 +173,7 @@ let (loadModule ./services/pasystray.nix { }) (loadModule ./services/pbgopy.nix { condition = hostPlatform.isLinux; }) (loadModule ./services/picom.nix { }) + (loadModule ./services/plan9port.nix { condition = hostPlatform.isLinux; }) (loadModule ./services/polybar.nix { }) (loadModule ./services/pulseeffects.nix { condition = hostPlatform.isLinux; }) (loadModule ./services/random-background.nix { }) diff --git a/modules/services/plan9port.nix b/modules/services/plan9port.nix new file mode 100644 index 00000000..0f5893f2 --- /dev/null +++ b/modules/services/plan9port.nix @@ -0,0 +1,35 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let + + cfg = config.services.plan9port; + +in { + meta.maintainers = [ maintainers.ehmry ]; + + options.services.plan9port = { + fontsrv.enable = + mkEnableOption "the Plan 9 file system access to host fonts"; + plumber.enable = + mkEnableOption "the Plan 9 file system for interprocess messaging"; + }; + + config = { + + systemd.user.services.fontsrv = mkIf cfg.fontsrv.enable { + Unit.Description = "the Plan 9 file system access to host fonts"; + Install.WantedBy = [ "default.target" ]; + Service.ExecStart = "${pkgs.plan9port}/bin/9 fontsrv"; + }; + + systemd.user.services.plumber = mkIf cfg.plumber.enable { + Unit.Description = "file system for interprocess messaging"; + Install.WantedBy = [ "default.target" ]; + Service.ExecStart = "${pkgs.plan9port}/bin/9 plumber -f"; + }; + + }; + +}