aboutsummaryrefslogtreecommitdiff
path: root/fw/configuration.nix
blob: bc2cb11e3d2c5eabeadee5ccc874e94006e5de32 (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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
{ config, lib, pkgs, ... }:
{
  imports =
    [
      ../nixos
      ./hardware-configuration.nix
    ];

  config.nixos = {
    username = "stefan";
    hostname = "fw";
    yubikey.enable = true;
  };

  config = {
    nix.settings.experimental-features = [ "nix-command" "flakes" ];
    services.openssh.enable = true;

    programs.light.enable = true;
    services.xserver = {
      enable = true;
      displayManager.gdm.enable = true;
      desktopManager.gnome.enable = true;
    };

    services.kmonad = {
      enable = false;
      keyboards = {
        internal = {
          device = "/dev/input/by-path/platform-i8042-serio-0-event-kbd";
          defcfg.enable = true;
          config = builtins.readFile ../kmonad/miryoku.kbd;
        };
      };
    };

    users.users."stefan".extraGroups = [ "input" "uinput" "video" ]; # TODO: remove

    environment.gnome.excludePackages = with pkgs; [
      gnome-photos
      geary
      gnome-tour
      cheese
      gnome-music
      gedit
      epiphany
      gnome-characters
      tali
      iagno
      hitori
      atomix
      yelp
      gnome-contacts
      gnome-initial-setup
    ];
    programs.dconf.enable = true;

    # Configure network proxy if necessary
    # networking.proxy.default = "http://user:password@proxy:port/";
    # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";

    # Set your time zone.
    time.timeZone = "America/New_York";

    console.useXkbConfig = true;

    # Enable automatic login for the user.
    # services.getty.autologinUser = "stefan";
    
    # services.interception-tools = {
      # enable = true;
      # plugins = [ pkgs.interception ]
      # udevmonConfig = ''
      #    - JOB: "${pkgs.interception-tools}/bin/intercept -g $DEVNODE | ${pkgs.interception-tools-plugins.caps2esc}/bin/caps2esc | ${pkgs.interception-tools}/bin/uinput -d $DEVNODE"
      #      DEVICE:
      #        EVENTS:
      #          EV_KEY: [KEY_CAPSLOCK, KEY_ESC]
      # '';
    # };
    services.fwupd.enable = true;
    # systemd.services.fprintd = {
    #   wantedBy = [ "multi-user.target" ];
    #   serviceConfig.Type = "simple";
    # };
    # services.fprintd.enable = true;
    # services.fprintd.tod.enable = true;
    # services.fprintd.tod.driver = pkgs.libfprint-2-tod1-goodix;
    boot.initrd.systemd.enable = true;
    environment.systemPackages = [ pkgs.tpm2-tss ];
    system.stateVersion = "25.05";
  };
}