mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 13:40:28 +03:00
virtlyst: remove
This commit is contained in:
parent
eea6b34bf7
commit
72d98311e9
7 changed files with 8 additions and 129 deletions
|
@ -1,73 +0,0 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
|
||||
cfg = config.services.virtlyst;
|
||||
stateDir = "/var/lib/virtlyst";
|
||||
|
||||
ini = pkgs.writeText "virtlyst-config.ini" ''
|
||||
[wsgi]
|
||||
master = true
|
||||
threads = auto
|
||||
http-socket = ${cfg.httpSocket}
|
||||
application = ${pkgs.virtlyst}/lib/libVirtlyst.so
|
||||
chdir2 = ${stateDir}
|
||||
static-map = /static=${pkgs.virtlyst}/root/static
|
||||
|
||||
[Cutelyst]
|
||||
production = true
|
||||
DatabasePath = virtlyst.sqlite
|
||||
TemplatePath = ${pkgs.virtlyst}/root/src
|
||||
|
||||
[Rules]
|
||||
cutelyst.* = true
|
||||
virtlyst.* = true
|
||||
'';
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
|
||||
options.services.virtlyst = {
|
||||
enable = mkEnableOption "Virtlyst libvirt web interface";
|
||||
|
||||
adminPassword = mkOption {
|
||||
type = types.str;
|
||||
description = lib.mdDoc ''
|
||||
Initial admin password with which the database will be seeded.
|
||||
'';
|
||||
};
|
||||
|
||||
httpSocket = mkOption {
|
||||
type = types.str;
|
||||
default = "localhost:3000";
|
||||
description = lib.mdDoc ''
|
||||
IP and/or port to which to bind the http socket.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
users.users.virtlyst = {
|
||||
home = stateDir;
|
||||
createHome = true;
|
||||
group = mkIf config.virtualisation.libvirtd.enable "libvirtd";
|
||||
isSystemUser = true;
|
||||
};
|
||||
|
||||
systemd.services.virtlyst = {
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
environment = {
|
||||
VIRTLYST_ADMIN_PASSWORD = cfg.adminPassword;
|
||||
};
|
||||
serviceConfig = {
|
||||
ExecStart = "${pkgs.cutelyst}/bin/cutelyst-wsgi2 --ini ${ini}";
|
||||
User = "virtlyst";
|
||||
WorkingDirectory = stateDir;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue