stuff
This commit is contained in:
108
hosts/mac.nix
108
hosts/mac.nix
@@ -4,6 +4,7 @@ myobs = pkgs.wrapOBS {
|
||||
plugins = with pkgs.obs-studio-plugins; [
|
||||
obs-ndi
|
||||
obs-teleport
|
||||
droidcam-obs
|
||||
];
|
||||
};
|
||||
|
||||
@@ -24,7 +25,7 @@ in {
|
||||
services.tailscale.enable = true;
|
||||
programs.nix-ld.enable = true;
|
||||
|
||||
services.pid-fan-controller.enable = true;
|
||||
#services.pid-fan-controller.enable = true;
|
||||
|
||||
networking.hostName = "mac";
|
||||
networking.firewall.enable = false;
|
||||
@@ -60,6 +61,19 @@ in {
|
||||
48899 # GoodWe inverter discovery
|
||||
4410 # lan-mouse
|
||||
];
|
||||
|
||||
##### Netbird Configuration
|
||||
services.netbird.clients.ppc = {
|
||||
#login = {
|
||||
#enable = true;
|
||||
#setupKeyFile = "${secretsDir}/netbird-setup-key";
|
||||
#};
|
||||
port = 51821;
|
||||
ui.enable = false;
|
||||
openFirewall = true;
|
||||
#openInternalFirewall = true;
|
||||
};
|
||||
|
||||
|
||||
swapDevices = [ { device = "/swapfile"; } ];
|
||||
|
||||
@@ -88,8 +102,32 @@ in {
|
||||
set timeout=2
|
||||
'';
|
||||
};
|
||||
|
||||
# fix bluetooth-3-0-keyboard not reporting left and right cmd seperately (and remapping the other things the way i want them)
|
||||
services.udev.extraHwdb = ''
|
||||
evdev:input:b0005v05AC*
|
||||
KEYBOARD_KEY_700e3=leftctrl
|
||||
KEYBOARD_KEY_700e7=rightalt
|
||||
KEYBOARD_KEY_700e2=leftmeta
|
||||
KEYBOARD_KEY_700e0=leftalt
|
||||
'';
|
||||
|
||||
# fan speed fix
|
||||
systemd.services.my-fan-speed-fix = {
|
||||
description = "Set applesmc fan values";
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
ExecStart = ''
|
||||
/bin/sh -c 'echo 1 > /sys/devices/platform/applesmc.768/fan2_manual; echo 1000 > /sys/devices/platform/applesmc.768/fan2_output'
|
||||
'';
|
||||
};
|
||||
#startAt = "*:0/3"; # Runs every 3 minutes
|
||||
wantedBy = [ "multi-user.target" "suspend.target" "hibernate.target" "hybrid-sleep.target" ];
|
||||
after = [ "suspend.target" "hibernate.target" "hybrid-sleep.target" ];
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
myobs
|
||||
lm_sensors
|
||||
linuxPackages.usbip
|
||||
helvum
|
||||
@@ -112,20 +150,7 @@ in {
|
||||
};
|
||||
|
||||
networking = {
|
||||
#usePredictableInterfaceNames = false;
|
||||
defaultGateway = {
|
||||
address = "192.168.1.1";
|
||||
interface = "enp2s0";
|
||||
};
|
||||
nameservers = [ "1.1.1.1" "8.8.8.8" ];
|
||||
interfaces = {
|
||||
"enp2s0" = {
|
||||
name = "enp2s0";
|
||||
ipv4.addresses = [
|
||||
{ address = "192.168.1.33"; prefixLength = 24;}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services.openssh = {
|
||||
@@ -142,12 +167,12 @@ in {
|
||||
'';
|
||||
};
|
||||
|
||||
home-manager.users.me.home.file.".config/sway/config".text = ''
|
||||
exec ${pkgs.wayvnc}/bin/wayvnc 0.0.0.0 6666
|
||||
#home-manager.users.me.home.file.".config/sway/config".text = ''
|
||||
#exec ${pkgs.wayvnc}/bin/wayvnc 0.0.0.0 6666
|
||||
#exec 'wl-paste -w ${pkgs.netcat-openbsd}/bin/nc 192.168.1.11 4405'
|
||||
#exec 'sh -c "while true; do ${pkgs.netcat-openbsd}/bin/nc -l 4405 | wl-copy; done"'
|
||||
#exec 'sh -c "while true; do cat ~/clipboard | wl-paste; done"'
|
||||
'';
|
||||
#'';
|
||||
|
||||
home-manager.users.me.programs.lan-mouse = {
|
||||
enable = true;
|
||||
@@ -160,10 +185,8 @@ in {
|
||||
position = "left";
|
||||
hostname = "main";
|
||||
activate_on_startup = true;
|
||||
ips = [ "192.168.1.11" ];
|
||||
ips = [ "192.168.4.2" "100.71.47.106" ];
|
||||
port = 4410;
|
||||
#enter_hook = "${pkgs.wl-clipboard}/bin/wl-paste | ${pkgs.netcat-openbsd}/bin/nc 192.168.1.11 4405";
|
||||
enter_hook = "/run/current-system/sw/bin/cat /home/me/.cache/clipboard | ${pkgs.netcat-openbsd}/bin/nc 192.168.1.11 4405 -N";
|
||||
}
|
||||
];
|
||||
};
|
||||
@@ -175,7 +198,6 @@ in {
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPgKLRF9iYRH3Y8hPjLX1ZY6GyavruqcQ0Q0Y8bnmpv9 me@tab"
|
||||
];
|
||||
|
||||
|
||||
services.greetd = lib.mkForce {
|
||||
enable = true;
|
||||
settings = rec {
|
||||
@@ -350,6 +372,21 @@ in {
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
networking.networkmanager.profiles = {
|
||||
home = {
|
||||
connection = {
|
||||
id = "home";
|
||||
uuid = "a02273d9-ad12-395e-8372-f61129635b6f";
|
||||
type = "ethernet";
|
||||
autoconnect-priority = "300";
|
||||
interface-name = "enp2s0";
|
||||
};
|
||||
ipv4 = {
|
||||
address2 = "192.168.4.3/24";
|
||||
dns = "1.1.1.1;";
|
||||
method = "manual";
|
||||
};
|
||||
};
|
||||
|
||||
pw = {
|
||||
connection = {
|
||||
id = "pw";
|
||||
@@ -377,6 +414,33 @@ in {
|
||||
};
|
||||
};
|
||||
|
||||
gw = {
|
||||
connection = {
|
||||
id = "gw";
|
||||
uuid = "de655c52-1af2-4b46-b7b2-8ddad9edb52f";
|
||||
type = "wifi";
|
||||
interface-name = "wlp3s0";
|
||||
autoconnect-priority = "300";
|
||||
};
|
||||
|
||||
wifi = {
|
||||
hidden = "true";
|
||||
mode = "infrastructure";
|
||||
ssid = builtins.readFile "${secretsDir}/gw-ssid";
|
||||
};
|
||||
|
||||
wifi-security = {
|
||||
key-mgmt = "wpa-psk";
|
||||
psk = builtins.readFile "${secretsDir}/gw-password";
|
||||
};
|
||||
|
||||
ipv4 = {
|
||||
#address1 = "192.168.20.11/24";
|
||||
dns = "1.1.1.1;8.8.8.8;";
|
||||
method = "auto";
|
||||
};
|
||||
};
|
||||
|
||||
hot = {
|
||||
connection = {
|
||||
id = "hot";
|
||||
@@ -429,7 +493,7 @@ in {
|
||||
id = "dhcp";
|
||||
uuid = "c006389a-1697-4f77-91c3-95b466f85f13";
|
||||
type = "ethernet";
|
||||
autoconnect = true;
|
||||
autoconnect = false;
|
||||
autoconnect-priority = "200";
|
||||
interface-name = "enp2s0";
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user