summaryrefslogtreecommitdiff
path: root/configuration.nix
blob: d832560a2895d2c89ef391cfce0ec12b21500647 (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
{ config, pkgs, pkgs-personal, hostname, ... }:
{
  imports = [
    ./user/common.nix
    (./host + ("/" + hostname + ".nix"))
  ];

  console.keyMap = "de";

  i18n = {
    defaultLocale = "en_US.UTF-8";
    supportedLocales = [
      "en_US.UTF-8/UTF-8"
      "de_DE.UTF-8/UTF-8"
    ];
  };

  time.timeZone = "Europe/Berlin";

  nixpkgs.config.allowUnfree = true;

  nix = {
    package = pkgs.nixVersions.latest;

    settings = {
      allowed-users = [ "common" ];
      trusted-users = [ "root" "common" ];
    };

    extraOptions = ''
      experimental-features = nix-command flakes
    '';
  };

  networking.nameservers = [
    "1.1.1.1"
    "2606:4700:4700::1111"
  ];

  programs = {
    fish.enable = true;
    bash.enableCompletion = true;
    gnupg.agent = {
      enable = true;
      enableSSHSupport = true;
    };
  };

  services.openssh = {
    enable = true;
    settings = {
      PasswordAuthentication = false;
      PermitRootLogin = "no";
      X11Forwarding = true;
    };
  };

  environment = {
    systemPackages = with pkgs; [
      psmisc
      htop
      git
      p7zip
      silver-searcher
      renameutils
      pkgs-personal.custom-neovim
    ];

    variables = {
      EDITOR = "vim";
    };

    shellAliases = {
      "ls"  = "ls --color=auto --group-directories-first";
      "qmv" = "qmv --format=destination-only";
    };

    shellInit = ''
      export LC_NUMERIC=de_DE.UTF8
      export LC_TIME=de_DE.UTF8
      export LC_MONETARY=de_DE.UTF8
      export LC_MEASUREMENT=de_DE.UTF8
    '';
  };
}