Merge remote-tracking branch 'refs/remotes/origin/main'
This commit is contained in:
commit
474e76ba18
4 changed files with 52 additions and 86 deletions
35
flake.nix
35
flake.nix
|
@ -368,6 +368,41 @@
|
|||
];
|
||||
};
|
||||
|
||||
musicbox = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = with nixosModules; [
|
||||
{
|
||||
_module.args = {
|
||||
disks = ["/dev/sda"];
|
||||
# swapSize = "8G";
|
||||
};
|
||||
}
|
||||
outputs.diskoConfigurations.unencrypted
|
||||
hardware.nixosModules.common-pc-laptop-ssd
|
||||
|
||||
music-production
|
||||
common
|
||||
graphical-workstation
|
||||
wifi
|
||||
|
||||
# ./nixos/musicbox.nix
|
||||
|
||||
{
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
hardware.bluetooth.enable = true;
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
home-manager.users.daniel = {
|
||||
imports = with homeManagerModules; [
|
||||
firefox-no-tabs
|
||||
linux-desktop-environment-config
|
||||
];
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
rascal = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = with nixosModules; [
|
||||
|
|
|
@ -441,6 +441,13 @@
|
|||
end
|
||||
'';
|
||||
};
|
||||
lag = {
|
||||
wraps = "g";
|
||||
body = ''
|
||||
lA
|
||||
g $argv
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -1,85 +0,0 @@
|
|||
{pkgs, ...}: {
|
||||
home = {
|
||||
packages = [
|
||||
pkgs.gawk # used in prompt
|
||||
];
|
||||
};
|
||||
|
||||
programs.fish = {
|
||||
enable = true;
|
||||
# I load long scripts from files for a better editing experience
|
||||
shellInit = builtins.readFile ./fish/shellInit.fish;
|
||||
interactiveShellInit = builtins.readFile ./fish/interactiveShellInit.fish;
|
||||
loginShellInit = "";
|
||||
functions = {
|
||||
# TODO: I think these should be loaded from fish files too for better editor experience?
|
||||
d = ''
|
||||
# --wraps=cd --description "Quickly jump to NICE_HOME (or given relative or absolute path) and list files."
|
||||
if count $argv > /dev/null
|
||||
cd $argv
|
||||
else
|
||||
cd $NICE_HOME
|
||||
end
|
||||
la
|
||||
'';
|
||||
|
||||
c = ''
|
||||
if count $argv > /dev/null
|
||||
cd $NICE_HOME && d $argv
|
||||
else
|
||||
d $NICE_HOME
|
||||
end
|
||||
'';
|
||||
|
||||
ltl = ''
|
||||
set d $argv[1] .
|
||||
set -l l ""
|
||||
for f in $d[1]/*
|
||||
if test -z $l; set l $f; continue; end
|
||||
if command test $f -nt $l; and test ! -d $f
|
||||
set l $f
|
||||
end
|
||||
end
|
||||
echo $l
|
||||
'';
|
||||
|
||||
has_command = "command --quiet --search $argv[1]";
|
||||
};
|
||||
shellAbbrs = {};
|
||||
shellAliases = {
|
||||
ls = "eza --group-directories-first --classify";
|
||||
l = "ls";
|
||||
ll = "ls --long --group";
|
||||
la = "ll --all";
|
||||
lA = "la --all"; # --all twice to show . and ..
|
||||
tree = "ls --tree --level=3";
|
||||
lt = "ll --sort=modified";
|
||||
lat = "la --sort=modified";
|
||||
lc = "lt --sort=accessed";
|
||||
lT = "lt --reverse";
|
||||
lC = "lc --reverse";
|
||||
lD = "la --only-dirs";
|
||||
"cd.." = "d ..";
|
||||
"cdc" = "d $XDG_CONFIG_HOME";
|
||||
"cdn" = "d $NOTES_PATH";
|
||||
"cdl" = "d $XDG_DOWNLOAD_DIR";
|
||||
"cdg" = "d $XDG_GAMES_DIR";
|
||||
".." = "d ..";
|
||||
"..." = "d ../..";
|
||||
"...." = "d ../../..";
|
||||
"....." = "d ../../../..";
|
||||
"......" = "d ../../../../..";
|
||||
"......." = "d ../../../../../..";
|
||||
"........" = "d ../../../../../../..";
|
||||
"........." = "d ../../../../../../../..";
|
||||
p = "ping";
|
||||
dc = "docker compose";
|
||||
pc = "podman-compose";
|
||||
k = "kubectl";
|
||||
kg = "kubectl get";
|
||||
v = "$EDITOR";
|
||||
sv = "sudo $EDITOR";
|
||||
kssh = "kitty +kitten ssh";
|
||||
};
|
||||
};
|
||||
}
|
|
@ -35,6 +35,12 @@
|
|||
dragon = {
|
||||
ip = "192.168.0.10";
|
||||
};
|
||||
bald = {
|
||||
ip = "192.168.0.11";
|
||||
additionalHosts = [
|
||||
"ourcraft.lyte.dev"
|
||||
];
|
||||
};
|
||||
beefcake = {
|
||||
ip = "192.168.0.9";
|
||||
additionalHosts = [
|
||||
|
@ -175,6 +181,7 @@ in {
|
|||
tcp dport { 80, 443 } accept comment "Allow HTTP/HTTPS to server (see nat prerouting)"
|
||||
udp dport { 80, 443 } accept comment "Allow QUIC to server (see nat prerouting)"
|
||||
tcp dport { 22 } accept comment "Allow SSH to server (see nat prerouting)"
|
||||
tcp dport { 25565 } accept comment "Allow Minecraft server connections (see nat prerouting)"
|
||||
|
||||
iifname "${lan}" accept comment "Allow local network to access the router"
|
||||
iifname "tailscale0" accept comment "Allow local network to access the router"
|
||||
|
@ -214,7 +221,9 @@ in {
|
|||
iifname ${wan} tcp dport {22} dnat to ${hosts.beefcake.ip}
|
||||
iifname ${wan} tcp dport {80, 443} dnat to ${hosts.beefcake.ip}
|
||||
iifname ${wan} udp dport {80, 443} dnat to ${hosts.beefcake.ip}
|
||||
iifname ${wan} tcp dport {25565, 26966} dnat to ${hosts.beefcake.ip}
|
||||
iifname ${wan} tcp dport {26966} dnat to ${hosts.beefcake.ip}
|
||||
iifname ${wan} tcp dport {25565} dnat to ${hosts.bald.ip}
|
||||
iifname ${wan} udp dport {25565} dnat to ${hosts.bald.ip}
|
||||
}
|
||||
|
||||
chain postrouting {
|
||||
|
|
Loading…
Reference in a new issue