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

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

  users.extraUsers = {
    bitcoin = {
      name = "bitcoin";
      description = "user for bitcoin stuff";
      home = "/home/bitcoin";
      useDefaultShell = true;
      createHome = true;
      packages = [ pkgs.electrum ];
      isNormalUser = true;
    };
    monero = {
      name = "monero";
      description = "user for monero stuff";
      home = "/home/monero";
      useDefaultShell = true;
      createHome = true;
      packages = [
        pkgs.monero
        pkgs.monero-gui
      ];
      isNormalUser = true;
    };
  };
  security.sudo.extraConfig = ''
    ${mainUser.name} ALL=(bitcoin) ALL
    ${mainUser.name} ALL=(monero) ALL
  '';
}