Compare commits
3 commits
7f97fdd050
...
d7eb08fa98
Author | SHA1 | Date | |
---|---|---|---|
Patrick | d7eb08fa98 | ||
Patrick | f190614f61 | ||
Patrick | 2c12cd8c74 |
|
@ -222,7 +222,7 @@ in
|
||||||
systems.oauth2.netbird = {
|
systems.oauth2.netbird = {
|
||||||
public = true;
|
public = true;
|
||||||
displayName = "Netbird";
|
displayName = "Netbird";
|
||||||
originUrl = "https://netbird.${config.secrets.secrets.global.domains.web}/";
|
originUrl = "https://netbird.${config.secrets.secrets.global.domains.web}/#callback";
|
||||||
originLanding = "https://netbird.${config.secrets.secrets.global.domains.web}/";
|
originLanding = "https://netbird.${config.secrets.secrets.global.domains.web}/";
|
||||||
preferShortUsername = true;
|
preferShortUsername = true;
|
||||||
enableLocalhostRedirects = true;
|
enableLocalhostRedirects = true;
|
||||||
|
|
|
@ -20,6 +20,11 @@
|
||||||
owner = "turnserver";
|
owner = "turnserver";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
age.secrets.relaySecret = {
|
||||||
|
generator.script = "alnum";
|
||||||
|
owner = "turnserver";
|
||||||
|
};
|
||||||
|
|
||||||
age.secrets.dataEnc = {
|
age.secrets.dataEnc = {
|
||||||
generator.script =
|
generator.script =
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
|
@ -42,6 +47,8 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
relay.authSecretFile = config.age.secrets.relaySecret.path;
|
||||||
|
|
||||||
coturn = {
|
coturn = {
|
||||||
enable = true;
|
enable = true;
|
||||||
passwordFile = config.age.secrets.coturnPassword.path;
|
passwordFile = config.age.secrets.coturnPassword.path;
|
||||||
|
|
BIN
hosts/elisabeth/secrets/netbird/generated/relaySecret.age
Normal file
BIN
hosts/elisabeth/secrets/netbird/generated/relaySecret.age
Normal file
Binary file not shown.
|
@ -334,7 +334,7 @@ index 0000000000000..998ddbad212cf
|
||||||
+}
|
+}
|
||||||
diff --git a/nixos/modules/services/networking/netbird/relay.nix b/nixos/modules/services/networking/netbird/relay.nix
|
diff --git a/nixos/modules/services/networking/netbird/relay.nix b/nixos/modules/services/networking/netbird/relay.nix
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 0000000000000..45650d15358a0
|
index 0000000000000..38af7fb1b2865
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/nixos/modules/services/networking/netbird/relay.nix
|
+++ b/nixos/modules/services/networking/netbird/relay.nix
|
||||||
@@ -0,0 +1,124 @@
|
@@ -0,0 +1,124 @@
|
||||||
|
@ -403,7 +403,7 @@ index 0000000000000..45650d15358a0
|
||||||
+ An attribute set that will be set as the environment for the process.
|
+ An attribute set that will be set as the environment for the process.
|
||||||
+ Used for runtime configuration.
|
+ Used for runtime configuration.
|
||||||
+ The exact values sadly aren't documented anywhere.
|
+ The exact values sadly aren't documented anywhere.
|
||||||
+ A starting point when searching for valid values is this [source file](https://github.com/netbirdio/netbird/blob/v${cfg.packag.version}/relay/cmd/root.go)
|
+ A starting point when searching for valid values is this [source file](https://github.com/netbirdio/netbird/blob/main/relay/cmd/root.go)
|
||||||
+ '';
|
+ '';
|
||||||
+ };
|
+ };
|
||||||
+
|
+
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
_final: prev: {
|
_final: prev: {
|
||||||
scripts = {
|
scripts = {
|
||||||
clone-term = prev.callPackage ./clone-term.nix { };
|
clone-term = prev.callPackage ./clone-term.nix { };
|
||||||
impermanence-o = prev.callPackage ./impermanence-orphan.nix { };
|
|
||||||
deploy = prev.writeShellApplication {
|
deploy = prev.writeShellApplication {
|
||||||
name = "deploy";
|
name = "deploy";
|
||||||
runtimeInputs = [ prev.nvd ];
|
runtimeInputs = [ prev.nvd ];
|
||||||
|
|
|
@ -1,17 +0,0 @@
|
||||||
{ writers }:
|
|
||||||
writers.writePython3Bin "find-orphaned" { } ''
|
|
||||||
import sys
|
|
||||||
import os
|
|
||||||
if len(sys.argv) != 2:
|
|
||||||
print("Please give a singular argument containing the folder to prune")
|
|
||||||
exit(1)
|
|
||||||
mountpoint = sys.argv[1]
|
|
||||||
if !os.path.exists(mountpoint)):
|
|
||||||
print("Argument has to exist")
|
|
||||||
exit(1)
|
|
||||||
with open("/proc/mounts", "r") as f:
|
|
||||||
mounts = [line.split() for line in f.readlines()]
|
|
||||||
toplevel =
|
|
||||||
current = [mountpoint]
|
|
||||||
print(os.listdir(mountpoint))
|
|
||||||
''
|
|
|
@ -1,14 +1,60 @@
|
||||||
{ pkgs, ... }:
|
|
||||||
{
|
{
|
||||||
home.packages = [
|
pkgs,
|
||||||
|
lib,
|
||||||
|
minimal,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
lib.optionalAttrs (!minimal) {
|
||||||
|
hm.home.packages = [
|
||||||
pkgs.xclip
|
pkgs.xclip
|
||||||
pkgs.xdragon
|
pkgs.xdragon
|
||||||
];
|
];
|
||||||
imports = [
|
imports = [
|
||||||
../.
|
|
||||||
./rofi.nix
|
./rofi.nix
|
||||||
./i3.nix
|
./i3.nix
|
||||||
];
|
];
|
||||||
#xsession.wallpapers.enable = true;
|
#xsession.wallpapers.enable = true;
|
||||||
home.file.".xinitrc".source = ./xinitrc;
|
hm.home.file.".xinitrc".source = ./xinitrc;
|
||||||
|
|
||||||
|
# Configure keymap in X11
|
||||||
|
services.xserver = {
|
||||||
|
enable = true;
|
||||||
|
displayManager.startx.enable = true;
|
||||||
|
autoRepeatDelay = 235;
|
||||||
|
autoRepeatInterval = 60;
|
||||||
|
videoDrivers = [ "modesetting" ];
|
||||||
|
};
|
||||||
|
services.libinput = {
|
||||||
|
enable = true;
|
||||||
|
mouse = {
|
||||||
|
accelSpeed = "0.5";
|
||||||
|
accelProfile = "flat";
|
||||||
|
middleEmulation = false;
|
||||||
|
};
|
||||||
|
touchpad = {
|
||||||
|
accelProfile = "flat";
|
||||||
|
accelSpeed = "1";
|
||||||
|
naturalScrolling = true;
|
||||||
|
disableWhileTyping = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
services.udev.extraRules =
|
||||||
|
let
|
||||||
|
exe = pkgs.writeShellScript "set-key-repeat" ''
|
||||||
|
if [ -d "/tmp/.X11-unix" ]; then
|
||||||
|
for D in /tmp/.X11-unix/*; do
|
||||||
|
file=$(${pkgs.coreutils}/bin/basename $D)
|
||||||
|
export DISPLAY=":''${file:1}"
|
||||||
|
user=$(${pkgs.coreutils}/bin/stat -c '%U' "$D")
|
||||||
|
# sleep to give X time to access the keyboard
|
||||||
|
(sleep 0.2; ${pkgs.util-linux}/bin/runuser -u "$user" -- ${pkgs.xorg.xset}/bin/xset r rate \
|
||||||
|
${toString config.services.xserver.autoRepeatDelay} ${toString config.services.xserver.autoRepeatInterval})&
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
in
|
||||||
|
''
|
||||||
|
ACTION=="add", SUBSYSTEM=="input", ATTRS{bInterfaceClass}=="03", RUN+="${exe}"
|
||||||
|
'';
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,17 +1,19 @@
|
||||||
{
|
{
|
||||||
config,
|
|
||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
# import shared sway config
|
# import shared sway config
|
||||||
imports = [ ../sway3.nix ];
|
imports = [ ./sway3.nix ];
|
||||||
|
|
||||||
|
hm =
|
||||||
|
{ config, ... }:
|
||||||
|
{
|
||||||
systemd.user.services = {
|
systemd.user.services = {
|
||||||
flameshot.Install.WantedBy = lib.mkForce [ "i3-session.target" ];
|
flameshot.Install.WantedBy = lib.mkForce [ "i3-session.target" ];
|
||||||
};
|
};
|
||||||
stylix.targets.i3.enable = true;
|
stylix.targets.i3.enable = true;
|
||||||
|
|
||||||
xsession.windowManager.i3 = {
|
xsession.windowManager.i3 = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableSystemdTarget = true;
|
enableSystemdTarget = true;
|
||||||
|
@ -100,4 +102,5 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
stylix.targets.rofi.enable = true;
|
hm.stylix.targets.rofi.enable = true;
|
||||||
programs.rofi = {
|
hm.programs.rofi = {
|
||||||
enable = true;
|
enable = true;
|
||||||
extraConfig = {
|
extraConfig = {
|
||||||
matching = "fuzzy";
|
matching = "fuzzy";
|
||||||
|
|
|
@ -113,14 +113,6 @@ in
|
||||||
"x"
|
"x"
|
||||||
"p"
|
"p"
|
||||||
];
|
];
|
||||||
"gojo" = output "eDP-1" [
|
|
||||||
"1"
|
|
||||||
"2"
|
|
||||||
"3"
|
|
||||||
"4"
|
|
||||||
"5"
|
|
||||||
"6"
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
.${nixConfig.node.name} or [ ];
|
.${nixConfig.node.name} or [ ];
|
||||||
|
|
||||||
|
|
|
@ -1,49 +0,0 @@
|
||||||
{
|
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
minimal,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
lib.optionalAttrs (!minimal) {
|
|
||||||
# Configure keymap in X11
|
|
||||||
services.xserver = {
|
|
||||||
enable = true;
|
|
||||||
displayManager.startx.enable = true;
|
|
||||||
autoRepeatDelay = 235;
|
|
||||||
autoRepeatInterval = 60;
|
|
||||||
videoDrivers = [ "modesetting" ];
|
|
||||||
};
|
|
||||||
services.libinput = {
|
|
||||||
enable = true;
|
|
||||||
mouse = {
|
|
||||||
accelSpeed = "0.5";
|
|
||||||
accelProfile = "flat";
|
|
||||||
middleEmulation = false;
|
|
||||||
};
|
|
||||||
touchpad = {
|
|
||||||
accelProfile = "flat";
|
|
||||||
accelSpeed = "1";
|
|
||||||
naturalScrolling = true;
|
|
||||||
disableWhileTyping = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
services.udev.extraRules =
|
|
||||||
let
|
|
||||||
exe = pkgs.writeShellScript "set-key-repeat" ''
|
|
||||||
if [ -d "/tmp/.X11-unix" ]; then
|
|
||||||
for D in /tmp/.X11-unix/*; do
|
|
||||||
file=$(${pkgs.coreutils}/bin/basename $D)
|
|
||||||
export DISPLAY=":''${file:1}"
|
|
||||||
user=$(${pkgs.coreutils}/bin/stat -c '%U' "$D")
|
|
||||||
# sleep to give X time to access the keyboard
|
|
||||||
(sleep 0.2; ${pkgs.util-linux}/bin/runuser -u "$user" -- ${pkgs.xorg.xset}/bin/xset r rate \
|
|
||||||
${toString config.services.xserver.autoRepeatDelay} ${toString config.services.xserver.autoRepeatInterval})&
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
'';
|
|
||||||
in
|
|
||||||
''
|
|
||||||
ACTION=="add", SUBSYSTEM=="input", ATTRS{bInterfaceClass}=="03", RUN+="${exe}"
|
|
||||||
'';
|
|
||||||
}
|
|
|
@ -55,6 +55,7 @@ lib.optionalAttrs (!minimal) {
|
||||||
./theme.nix
|
./theme.nix
|
||||||
|
|
||||||
./wayland
|
./wayland
|
||||||
|
./Xorg
|
||||||
|
|
||||||
./programs/bottles.nix
|
./programs/bottles.nix
|
||||||
./programs/direnv.nix
|
./programs/direnv.nix
|
||||||
|
|
|
@ -213,13 +213,13 @@ in
|
||||||
xwayland.force_zero_scaling = true;
|
xwayland.force_zero_scaling = true;
|
||||||
windowrulev2 = [
|
windowrulev2 = [
|
||||||
# fix these once nvidia gets their shit together
|
# fix these once nvidia gets their shit together
|
||||||
#"immediate, class:^(cs2)$"
|
"immediate, class:^(cs2)$"
|
||||||
# apex legends
|
# apex legends
|
||||||
"immediate, class:^(steam_app_1172470)$"
|
"immediate, class:^(steam_app_1172470)$"
|
||||||
#???
|
#???
|
||||||
"immediate, class:^(steam_app_238960)$"
|
"immediate, class:^(steam_app_238960)$"
|
||||||
#baldur
|
#baldur
|
||||||
#"immediate, class:^(steam_app_1086940)$"
|
"immediate, class:^(steam_app_1086940)$"
|
||||||
"float, class:^(steam)$, title:^(Friends List)"
|
"float, class:^(steam)$, title:^(Friends List)"
|
||||||
"float, class:^(steam)$, title:(Chat)"
|
"float, class:^(steam)$, title:(Chat)"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue