feat: wireguard meshnet in server

This commit is contained in:
DACHXY 2025-03-26 13:20:28 +08:00
parent fc0035fb15
commit 43e206bd6d
13 changed files with 356 additions and 73 deletions

32
home/server-default.nix Normal file
View file

@ -0,0 +1,32 @@
{
nix-version,
username,
lib,
...
}:
{
imports = [
./user/bin.nix
./user/config.nix
./user/direnv.nix
./user/environment.nix
./user/git.nix
# ./user/gtk.nix
# ./user/hyprland.nix
./user/nvim.nix
# ./user/programs.nix
./user/shell.nix
# ./user/swaync.nix
# ./user/virtualization.nix
];
home = {
inherit username;
homeDirectory = "/home/${username}";
stateVersion = nix-version;
};
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;
programs.vscode.enable = lib.mkForce false;
}

View file

@ -1,27 +0,0 @@
{ inputs, ... }:
{
imports = [
./git.nix
./gtk.nix
./shell.nix
./config.nix
# ./packages.nix
./programs.nix
./environment.nix
./virtualization.nix
./hyprland.nix
./swaync.nix
./nvim.nix
./bin.nix
./desktops.nix
./direnv.nix
inputs.hyprland.homeManagerModules.default
];
nixpkgs = {
config = {
allowUnfree = true;
allowUnfreePredicate = _: true;
};
};
}

View file

@ -18,4 +18,8 @@
setWin = "sudo bootctl set-oneshot auto-windows";
goWin = "sudo bootctl set-oneshot auto-windows && reboot";
goBios = "sudo bootctl set-oneshot auto-reboot-to-firmware-setup && reboot";
# TTY
hideTTY = ''sudo sh -c "echo 0 > /sys/class/graphics/fb0/blank"'';
showTTY = ''sudo sh -c "echo 1 > /sys/class/graphics/fb0/blank"'';
}