summaryrefslogtreecommitdiffstats
path: root/lass/2configs/wine.nix
blob: d60b1feea0fadf5fc09b0310846e500624d79434 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
{ config, pkgs, ... }:

let
  mainUser = config.users.extraUsers.mainUser;

in {
  users.users= {
    wine = {
      name = "wine";
      description = "user for running wine";
      home = "/home/wine";
      useDefaultShell = true;
      extraGroups = [
        "audio"
        "video"
      ];
      createHome = true;
      packages = [
        pkgs.wine
      ];
    };
    wine64 = {
      name = "wine64";
      description = "user for running wine in 64bit";
      home = "/home/wine64";
      useDefaultShell = true;
      extraGroups = [
        "audio"
        "video"
      ];
      createHome = true;
      packages = [
        (pkgs.wine.override { wineBuild = "wineWow"; })
      ];
    };
  };
  security.sudo.extraConfig = ''
    ${mainUser.name} ALL=(wine) NOPASSWD: ALL
    ${mainUser.name} ALL=(wine64) NOPASSWD: ALL
  '';
}