summaryrefslogtreecommitdiffstats
path: root/lass/2configs/bitcoin.nix
blob: a405addfc8572375456e91dbb8f5c069bb56f20b (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
{ config, pkgs, ... }:

let
  mainUser = config.users.extraUsers.mainUser;
in {

  krebs.per-user.bch.packages = [
    pkgs.electron-cash
  ];
  krebs.per-user.bitcoin.packages = [
    pkgs.electrum
  ];
  krebs.per-user.ethereum.packages = [
    pkgs.go-ethereum
  ];
  users.extraUsers = {
    bch = {
      name = "bch";
      description = "user for bch stuff";
      home = "/home/bch";
      useDefaultShell = true;
      createHome = true;
    };
    bitcoin = {
      name = "bitcoin";
      description = "user for bitcoin stuff";
      home = "/home/bitcoin";
      useDefaultShell = true;
      createHome = true;
    };
    ethereum = {
      name = "ethereum";
      description = "user for ethereum stuff";
      home = "/home/ethereum";
      useDefaultShell = true;
      createHome = true;
    };
  };
  security.sudo.extraConfig = ''
    ${mainUser.name} ALL=(bitcoin) NOPASSWD: ALL
    ${mainUser.name} ALL=(bch) NOPASSWD: ALL
  '';
}