summary refs log tree commit diff
path: root/mixins
diff options
context:
space:
mode:
Diffstat (limited to 'mixins')
-rw-r--r--mixins/cli.nix42
-rw-r--r--mixins/tailscale.nix11
2 files changed, 53 insertions, 0 deletions
diff --git a/mixins/cli.nix b/mixins/cli.nix
new file mode 100644
index 0000000..c5ff7b9
--- /dev/null
+++ b/mixins/cli.nix
@@ -0,0 +1,42 @@
+{
+  pkgs,
+  lib,
+  config,
+  inputs,
+  ...
+}: {
+  imports = [
+    inputs.home-manager.nixosModules."home-manager"
+    inputs.agenix.nixosModules
+  ];
+  config = {
+    home-manager.users.tzlil = {pkgs, ...}@hm: {
+      home = {
+        packages = with pkgs; [
+          rsync
+          curl
+          ripgrep
+        ];
+        programs = {
+          ssh.enable = true;
+          git = {
+            userName = "tzlil";
+            userEmail = "tzlils@protonmail.com";
+            enable = true;
+          };
+          fish = {
+            enable = true;
+            shellAliases = {
+              gc = "git clone";
+              l = "ls -alh";
+            };
+            functions = {
+              sb.body = "sudo nixos-rebuild build --flake ~/sources/nixcfg#(hostname)";
+              sw.body = "sudo nixos-rebuild switch --flake ~/sources/nixcfg#(hostname)";
+            };
+          };
+        };
+      };
+    };
+  };
+}
\ No newline at end of file
diff --git a/mixins/tailscale.nix b/mixins/tailscale.nix
new file mode 100644
index 0000000..8be3147
--- /dev/null
+++ b/mixins/tailscale.nix
@@ -0,0 +1,11 @@
+{ pkgs, config, ... }:
+
+{
+  config = {
+    services.tailscale.enable = true;
+    networking.firewall = {
+      trustedInterfaces = [ "tailscale0" ];
+      allowedUDPPorts = [41641];
+    };
+  };
+}
\ No newline at end of file