summary refs log tree commit diff
path: root/modules/common.nix
diff options
context:
space:
mode:
authorMel <einebeere@gmail.com>2024-10-26 17:44:36 +0200
committerMel <einebeere@gmail.com>2024-10-26 17:44:36 +0200
commit1e0eca0bcbfc338a585842c65c4b48d62d79728d (patch)
tree9ab21421d798f0812c966532d8c10bb5c8384e81 /modules/common.nix
downloadnetwork-1e0eca0bcbfc338a585842c65c4b48d62d79728d.tar.zst
network-1e0eca0bcbfc338a585842c65c4b48d62d79728d.zip
Glued together corsac configuration
Signed-off-by: Mel <einebeere@gmail.com>
Diffstat (limited to 'modules/common.nix')
-rw-r--r--modules/common.nix74
1 files changed, 74 insertions, 0 deletions
diff --git a/modules/common.nix b/modules/common.nix
new file mode 100644
index 0000000..f035db5
--- /dev/null
+++ b/modules/common.nix
@@ -0,0 +1,74 @@
+{ me, config, lib, pkgs, ... }:
+
+{
+  imports = [
+    ./nix.nix
+    ./user.nix
+    ./locale.nix
+    ./nix-ld.nix
+  ];
+
+  boot.kernelPackages = pkgs.linuxPackages_latest;
+
+  networking.hostName = me;
+
+  services.envfs.enable = true;
+  virtualisation.libvirtd.enable = true;
+
+  services = {
+    openssh = {
+      enable = true;
+      settings = {
+        PasswordAuthentication = false;
+        KbdInteractiveAuthentication = false;
+        PermitRootLogin = "no";
+      };
+    };
+    tailscale = {
+      enable = true;
+      useRoutingFeatures = "both";
+      extraUpFlags = [ "--ssh" ];
+    };
+  
+    # sometimes needed for gnupg
+    pcscd.enable = true;
+  };
+ 
+  programs = {
+    vim = {
+      defaultEditor = true;
+      package = pkgs.vim_configurable.customize {
+        vimrcFile = ../configs/.vimrc;
+      };
+    };
+    fish.enable = true;
+    git.enable = true;
+    tmux.enable = true;
+
+    gnupg.agent = {
+      enable = true;
+      enableSSHSupport = true;
+      pinentryPackage = pkgs.pinentry-curses;
+    };
+  };
+
+  environment.systemPackages = (with pkgs; [
+    file unzip jq dig htop glances wget gnupg pinentry-curses
+    inetutils pciutils lshw inxi iw
+    tcpdump
+    ffmpeg_7-headless
+    qemu_full virtiofsd
+
+    openvpn openvpn3 update-resolv-conf
+    
+    ripgrep gnumake gdb gcc clang
+    go gopls delve go-task
+    meson cmake
+    nil direnv
+
+    wineWowPackages.stagingFull
+    borgbackup
+  ]);
+
+  environment.etc.openvpn.source = "${pkgs.update-resolv-conf}/libexec/openvpn";
+}