aboutsummaryrefslogtreecommitdiff
path: root/share/system/client-common.nix
blob: db26f4ee162287786d93c11f6120d9480604373a (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
66
67
68
69
70
71
72
73
74
75
76
77
78
# Common configuration options for client machines (i.e. not servers)
{ inputs, pkgs, ... }:
{
  imports = [ ./steam.nix ];
  nixpkgs.overlays = [ inputs.rust-overlay.overlays.default ];

  programs.hyprland.enable = true;
  boot.supportedFilesystems = [
    "ntfs"
    "bcachefs"
  ];

  nixpkgs.config.allowUnfree = true;
  nix.gc = {
    dates = "daily";
    automatic = true;
    persistent = true;
    randomizedDelaySec = "15min";
    options = ''--delete-older-than 7d'';
  };

  networking = {
    useNetworkd = true;
    firewall = {
      enable = true;
      allowedTCPPorts = [
        80
        443
        34197
      ];
    };
  };
  services.mullvad-vpn.enable = true;
  services.tailscale.enable = true;

  virtualisation.podman = {
    enable = true;
    dockerCompat = true;
    dockerSocket.enable = true;
    autoPrune.enable = true;
  };

  programs.gnupg.agent = {
    enable = true;
    enableSSHSupport = true;
    pinentryPackage = pkgs.pinentry-gnome3;
    settings = {
      default-cache-ttl = 1200;
    };
  };

  services.pipewire = {
    enable = true;
    alsa.enable = true;
    pulse.enable = true;
  };

  fonts.packages = with pkgs; [
    noto-fonts
    noto-fonts-cjk
    noto-fonts-emoji
    proggyfonts
    (nerdfonts.override {
      fonts = [
        "FiraCode"
        "CascadiaCode"
      ];
    })
    overpass
    inter
  ];

  services.earlyoom = {
    enable = true;
    freeMemThreshold = 5;
    extraArgs = [ "--prefer '(^|/)(firefox|chromium|signal|bitwarden|electron)$'" ];
  };
}