summary refs log tree commit diff
path: root/mixins
diff options
context:
space:
mode:
authortzlil <tzlils@protonmail.com>2022-12-13 02:15:50 +0200
committertzlil <tzlils@protonmail.com>2022-12-13 02:15:50 +0200
commit24637dfdfdd6dc8d116542f16a07d808c9e43c36 (patch)
tree369b5fb04e408604d481984b35aa02523217dbfd /mixins
first commit
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