mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-17 19:21:04 +00:00
nixos/services.mame: remove with lib;
This commit is contained in:
parent
a11ac85d65
commit
68fd69371f
|
@ -1,7 +1,4 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.services.mame;
|
||||
mame = "mame${lib.optionalString pkgs.stdenv.is64bit "64"}";
|
||||
|
@ -9,29 +6,29 @@ in
|
|||
{
|
||||
options = {
|
||||
services.mame = {
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Whether to setup TUN/TAP Ethernet interface for MAME emulator.
|
||||
'';
|
||||
};
|
||||
user = mkOption {
|
||||
type = types.str;
|
||||
user = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = ''
|
||||
User from which you run MAME binary.
|
||||
'';
|
||||
};
|
||||
hostAddr = mkOption {
|
||||
type = types.str;
|
||||
hostAddr = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = ''
|
||||
IP address of the host system. Usually an address of the main network
|
||||
adapter or the adapter through which you get an internet connection.
|
||||
'';
|
||||
example = "192.168.31.156";
|
||||
};
|
||||
emuAddr = mkOption {
|
||||
type = types.str;
|
||||
emuAddr = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = ''
|
||||
IP address of the guest system. The same you set inside guest OS under
|
||||
MAME. Should be on the same subnet as {option}`services.mame.hostAddr`.
|
||||
|
@ -41,7 +38,7 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment.systemPackages = [ pkgs.mame ];
|
||||
|
||||
security.wrappers."${mame}" = {
|
||||
|
|
Loading…
Reference in a new issue