about summary refs log tree commit diff
path: root/machines/profpatsch/base-workstation.nix
blob: 9e3220603790e87ccd2505fe47088396047852d3 (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
# A base configuration that still assumes a workstation
{ pkgs, lib, ... }:
let
  myPkgs = import ./pkgs.nix { inherit pkgs lib myLib; };
  myLib  = import ./lib.nix  { inherit pkgs lib; };

  philip = myLib.philip;

in {

  imports = [
    ./base.nix
  ];

  config = {

    boot.loader = {
      grub.enable = true;
      grub.version = 2;
    };

    networking = {
      firewall.enable = false;
    };

    i18n = {
      consoleFont = "lat9w-16";
      consoleKeyMap = "neo";
      defaultLocale = "en_US.UTF-8";
    };

    programs.ssh.startAgent = false;

    ###########
    # Packages

    environment.sessionVariables = { EDITOR = "${myPkgs.vim}/bin/vim"; };

    environment.systemPackages = with pkgs;
    let
      # of utmost necessity for me to function
      basePkgs = [
        silver-searcher   # file content searcher, > ack > grep
        dos2unix          # text file conversion
        manpages          # system manpages (not included by default)
        mkpasswd          # UNIX password creator
        smartmontools     # check disk state
        stow              # dotfile management
        traceroute        # trace ip routes
        wirelesstools     # iwlist (wifi scan)
      ];
    in basePkgs;

    # friendly user shell
   programs.fish.enable = true;

    ###########
    # Services

    services.openssh.enable = true;

    time.timeZone = "Europe/Berlin";

    # bounded journal size
    services.journald.extraConfig = "SystemMaxUse=50M";

    # services.xserver = {
      # libinput = {
      #   enable = true;
      #   naturalScrolling = true;
      #   accelSpeed = "0.01";
      # };

      # # TODO: modify libinput module so that you can do libinput."trackpoint".scrollMethod = "button";
      # # and maybe a convenience option for thinkpads (maybe in the hardware repo?).
      # config = ''
      #   Section "InputClass"
      #     Identifier     "Enable libinput for TrackPoint"
      #     MatchIsPointer "on"
      #     Driver         "libinput"
      #     Option         "ScrollMethod" "button"
      #     Option         "ScrollButton" "8"
      #   EndSection
      # '';
    # };

    ########
    # Users

    users.users = { inherit philip; };

  };
}