nixpkgs/nixos/modules/virtualisation/multipass.nix
stuebinm 6afb255d97 nixos: remove all uses of lib.mdDoc
these changes were generated with nixq 0.0.2, by running

  nixq ">> lib.mdDoc[remove] Argument[keep]" --batchmode nixos/**.nix
  nixq ">> mdDoc[remove] Argument[keep]" --batchmode nixos/**.nix
  nixq ">> Inherit >> mdDoc[remove]" --batchmode nixos/**.nix

two mentions of the mdDoc function remain in nixos/, both of which
are inside of comments.

Since lib.mdDoc is already defined as just id, this commit is a no-op as
far as Nix (and the built manual) is concerned.
2024-04-13 10:07:35 -07:00

62 lines
1.5 KiB
Nix

{ config
, lib
, pkgs
, ...
}:
let
cfg = config.virtualisation.multipass;
in
{
options = {
virtualisation.multipass = {
enable = lib.mkEnableOption ''
Multipass, a simple manager for virtualised Ubuntu instances.
'';
logLevel = lib.mkOption {
type = lib.types.enum [ "error" "warning" "info" "debug" "trace" ];
default = "debug";
description = ''
The logging verbosity of the multipassd binary.
'';
};
package = lib.mkPackageOption pkgs "multipass" { };
};
};
config = lib.mkIf cfg.enable {
environment.systemPackages = [ cfg.package ];
systemd.services.multipass = {
description = "Multipass orchestrates virtual Ubuntu instances.";
wantedBy = [ "multi-user.target" ];
wants = [ "network-online.target" ];
after = [ "network-online.target" ];
environment = {
"XDG_DATA_HOME" = "/var/lib/multipass/data";
"XDG_CACHE_HOME" = "/var/lib/multipass/cache";
"XDG_CONFIG_HOME" = "/var/lib/multipass/config";
};
serviceConfig = {
ExecStart = "${cfg.package}/bin/multipassd --logger platform --verbosity ${cfg.logLevel}";
SyslogIdentifier = "multipassd";
Restart = "on-failure";
TimeoutStopSec = 300;
Type = "simple";
WorkingDirectory = "/var/lib/multipass";
StateDirectory = "multipass";
StateDirectoryMode = "0750";
CacheDirectory = "multipass";
CacheDirectoryMode = "0750";
};
};
};
}