about summary refs log tree commit diff
path: root/profiles/workstation.nix
blob: acc04c5c5b7f6fee8e92c6f24c68a13e173c92d8 (plain) (blame)
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
{ pkgs, config, lib, ... }:
{
  imports = [
    ./default.nix
    ./tailscale.nix
  ];

  virtualisation.docker.enable = false;
  virtualisation.podman.enable = true;
  virtualisation.podman.dockerCompat = true;

  services.dbus.enable = true;
  services.dbus.packages = with pkgs; [ gcr dconf gnome.sushi ];
  services.udev.packages = with pkgs; [ gnome3.gnome-settings-daemon ];

  services.gvfs.enable = true;

  programs.dconf.enable = true;

  services.avahi.enable = true;
  services.avahi.nssmdns = true;
  services.avahi.openFirewall = true;

  # for the yubikeys
  services.pcscd.enable = true;

  # Install tools related to the scanner (scanimage etc)
  hardware.sane.enable = true;

  # RealtimeKit is recommended
  security.rtkit.enable = true;

  # Sound configuration
  sound.enable = false;

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

  hardware.pulseaudio.enable = false;

  fonts = {
    enableDefaultFonts = true;
    fontDir.enable = true;
    fontconfig = {
      enable = true;
      defaultFonts = {
        serif = [ "Bitstream Vera Serif" ];
        sansSerif = [ "Bitstream Vera Sans" ];
        monospace = [ "Bitstream Vera Sans Mono" ];
      };
    };
    fonts = with pkgs; [
      dejavu_fonts
      ttf_bitstream_vera

      font-awesome_5

      noto-fonts
      noto-fonts-cjk # Chinese, Japanese, Korean
      noto-fonts-emoji
      noto-fonts-emoji
      noto-fonts-extra

      cantarell-fonts

      source-code-pro
      source-sans-pro
      source-serif-pro
    ];
  };

  # Misc packages useful on a workstation
  environment.systemPackages = with pkgs; [
    # sound related
    pulseaudio
    pavucontrol
    easyeffects
  ];

  hardware.opengl.enable = true;

  # Use systemd-resolved
  services.resolved.enable = true;
  services.resolved.dnssec = "false";

  xdg.portal = {
    enable = true;
    wlr.enable = true;
    extraPortals =
      [ pkgs.xdg-desktop-portal-gtk pkgs.xdg-desktop-portal-wlr ];
  };

  programs.sway = {
    enable = true;
    wrapperFeatures.gtk = true;
    extraPackages = with pkgs; [
      brightnessctl
      polkit_gnome
      xsettingsd
      swaylock
      swayidle
      wl-clipboard
    ];
    extraSessionCommands = ''
      export MOZ_ENABLE_WAYLAND=1
    '';
  };
}