summaryrefslogtreecommitdiffstats
path: root/modules/lass/browsers-lass.nix
blob: 8c27de7b42967efe7c6b66dca22b22baf018a142 (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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
{ config, pkgs, ... }:

{

  nixpkgs.config.packageOverrides = pkgs : {
    chromium = pkgs.chromium.override {
      pulseSupport = true;
    };
  };

  environment.systemPackages = with pkgs; [
    firefox
    chromium
  ];

  users.extraUsers = {
    firefox = {
      name = "firefox";
      description = "user for running firefox";
      home = "/home/firefox";
      useDefaultShell = true;
      extraGroups = [ "audio" ];
      createHome = true;
    };
    chromium = {
      name = "chromium";
      description = "user for running chromium";
      home = "/home/chromium";
      useDefaultShell = true;
      extraGroups = [ "audio" ];
      createHome = true;
    };
    facebook = {
      name = "facebook";
      description = "user for running facebook in chromium";
      home = "/home/facebook";
      useDefaultShell = true;
      extraGroups = [ "audio" ];
      createHome = true;
    };
    google = {
      name = "google";
      description = "user for running google+/gmail in chromium";
      home = "/home/google";
      useDefaultShell = true;
      createHome = true;
    };
    flash = {
      name = "flash";
      description = "user for running flash stuff";
      home = "/home/flash";
      useDefaultShell = true;
      extraGroups = [ "audio" ];
      createHome = true;
    };
  };

  security.sudo.extraConfig = ''
    lass ALL=(firefox) NOPASSWD: ALL
    lass ALL=(chromium) NOPASSWD: ALL
    lass ALL=(facebook) NOPASSWD: ALL
    lass ALL=(google) NOPASSWD: ALL
    lass ALL=(flash) NOPASSWD: ALL
  '';
}