summary refs log tree commit diff
path: root/modules/common.nix
diff options
context:
space:
mode:
Diffstat (limited to 'modules/common.nix')
-rw-r--r--modules/common.nix72
1 files changed, 72 insertions, 0 deletions
diff --git a/modules/common.nix b/modules/common.nix
new file mode 100644
index 0000000..e36d4e9
--- /dev/null
+++ b/modules/common.nix
@@ -0,0 +1,72 @@
+{
+  me,
+  pkgs,
+  ...
+}:
+
+{
+  imports = [
+    ./packages.nix
+    ./nix.nix
+    ./user.nix
+    ./locale.nix
+    ./vim.nix
+    ./tmux.nix
+    ./nix-ld.nix
+  ];
+
+  services.envfs.enable = true;
+
+  virtualisation = {
+    libvirtd.enable = true;
+    docker.enable = true;
+  };
+
+  # fish enables this by default,
+  # it makes every nixos rebuild very slow.
+  documentation.man.generateCaches = false;
+  documentation = {
+    info.enable = true;
+    doc.enable = true;
+    dev.enable = true;
+    nixos = {
+      enable = true;
+      includeAllModules = true;
+    };
+  };
+
+  networking.hostName = me.name;
+  # use corsac dns server
+  networking.nameservers =
+    let
+      corsacTailnet = "100.64.100.100";
+    in
+    [ corsacTailnet ];
+
+  services.resolved.enable = true;
+
+  services = {
+    acpid.enable = true;
+    sysprof.enable = true;
+    tailscale = {
+      enable = true;
+      useRoutingFeatures = "both";
+      extraUpFlags = [ "--ssh" ];
+    };
+
+    # sometimes needed for gnupg
+    pcscd.enable = true;
+  };
+
+  programs = {
+    fish.enable = true;
+    git.enable = true;
+
+    gnupg.agent = {
+      enable = true;
+      enableSSHSupport = true;
+    };
+  };
+
+  environment.etc.openvpn.source = "${pkgs.update-resolv-conf}/libexec/openvpn";
+}