Add firewall and kanata configuration
Signed-off-by: George Kaklamanos <gkaklas@gkaklas.gr>
This commit is contained in:
parent
22548339a9
commit
e0e32ffc84
3 changed files with 123 additions and 0 deletions
|
@ -12,6 +12,9 @@
|
||||||
sha256 = "sha256:1d03a0wb710by1m2c3rx758vy67f8r71gnv2h3qn4jj1bx10sdg4";
|
sha256 = "sha256:1d03a0wb710by1m2c3rx758vy67f8r71gnv2h3qn4jj1bx10sdg4";
|
||||||
}}/module.nix"
|
}}/module.nix"
|
||||||
./disko.nix
|
./disko.nix
|
||||||
|
|
||||||
|
./firewall.nix
|
||||||
|
./kanata.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.loader.systemd-boot.enable = true;
|
boot.loader.systemd-boot.enable = true;
|
||||||
|
|
40
nixos/firewall.nix
Normal file
40
nixos/firewall.nix
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
networking.firewall = {
|
||||||
|
enable = true;
|
||||||
|
# https://docs.syncthing.net/users/firewall.html
|
||||||
|
allowedTCPPorts = [
|
||||||
|
# Syncthing
|
||||||
|
8384
|
||||||
|
22000
|
||||||
|
];
|
||||||
|
allowedUDPPorts = [
|
||||||
|
# Syncthing
|
||||||
|
22000
|
||||||
|
21027
|
||||||
|
];
|
||||||
|
allowedTCPPortRanges = [
|
||||||
|
# KDE Connect
|
||||||
|
{
|
||||||
|
from = 1714;
|
||||||
|
to = 1764;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
allowedUDPPortRanges = [
|
||||||
|
# KDE Connect
|
||||||
|
{
|
||||||
|
from = 1714;
|
||||||
|
to = 1764;
|
||||||
|
}
|
||||||
|
# Mosh
|
||||||
|
{
|
||||||
|
from = 60000;
|
||||||
|
to = 61000;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
80
nixos/kanata.nix
Normal file
80
nixos/kanata.nix
Normal file
|
@ -0,0 +1,80 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
services.kanata.enable = true;
|
||||||
|
services.kanata.keyboards.mykbd.config = ''
|
||||||
|
|
||||||
|
(defsrc
|
||||||
|
;; grv 1 2 3 4 5 6 7 8 9 0 - = bspc
|
||||||
|
tab q w f p b j l u y ' [ ]
|
||||||
|
caps a r s t g m n e i o
|
||||||
|
lsft z x c d v k h , . /
|
||||||
|
lctl lmet lalt spc ret ;
|
||||||
|
)
|
||||||
|
|
||||||
|
(deflayer default
|
||||||
|
;;tab q w f d b j l u y ' [ ]
|
||||||
|
_ _ _ _ _ _ _ _ _ _ _ _ _
|
||||||
|
;;caps a r s t g m n e i o
|
||||||
|
_ _ _ @chs @cht _ _ _ _ _ _
|
||||||
|
;;lsft z x c d v k h , . /
|
||||||
|
_ _ _ _ _ _ _ _ _ _ _
|
||||||
|
;;lctl lmet lalt spc ret ;
|
||||||
|
_ _ _ @chspc @chret _
|
||||||
|
)
|
||||||
|
|
||||||
|
(deflayer arrows
|
||||||
|
;;tab q w f p b j l u y ' [ ]
|
||||||
|
XX XX XX XX XX XX XX XX XX XX XX XX XX
|
||||||
|
;;caps a r s t g m n e i o
|
||||||
|
XX XX XX XX XX XX left down up rght XX
|
||||||
|
;;lsft z x c d v k h , . /
|
||||||
|
XX XX XX XX XX XX XX XX XX XX XX
|
||||||
|
;;lctl lmet lalt spc ret ;
|
||||||
|
XX XX XX XX XX XX
|
||||||
|
)
|
||||||
|
|
||||||
|
(deflayer num
|
||||||
|
;;tab q w f p b j l u y ' [ ]
|
||||||
|
XX XX XX XX XX XX XX 7 8 9 XX XX XX
|
||||||
|
;;caps a r s t g m n e i o
|
||||||
|
XX XX XX XX XX XX XX 4 5 6 XX
|
||||||
|
;;lsft z x c d v k h , . /
|
||||||
|
XX XX XX XX XX XX XX 1 2 3 XX
|
||||||
|
;;lctl lmet lalt spc ret ;
|
||||||
|
XX XX XX XX XX 0
|
||||||
|
)
|
||||||
|
|
||||||
|
(deflayer misc
|
||||||
|
;;tab q w f p b j l u y ' [ ]
|
||||||
|
XX S-1 S-2 S-3 S-4 S-5 S-6 S-7 S-8 S-9 XX XX XX
|
||||||
|
;;caps a r s t g m n e i o
|
||||||
|
XX XX XX XX XX XX XX [ S-[ XX XX
|
||||||
|
;;lsft z x c d v k h , . /
|
||||||
|
XX XX XX XX XX XX XX ] S-] XX XX
|
||||||
|
;;lctl lmet lalt spc ret ;
|
||||||
|
XX XX XX XX XX XX
|
||||||
|
)
|
||||||
|
(defalias
|
||||||
|
num (layer-while-held num)
|
||||||
|
arrows (layer-while-held arrows)
|
||||||
|
misc (layer-while-held misc)
|
||||||
|
cht (chord example t)
|
||||||
|
chs (chord example s)
|
||||||
|
chspc (chord example spc)
|
||||||
|
chret (chord example ret)
|
||||||
|
)
|
||||||
|
(defchords example 500
|
||||||
|
(t) t
|
||||||
|
(s) s
|
||||||
|
(spc) spc
|
||||||
|
(ret) ret
|
||||||
|
(spc s) @num
|
||||||
|
(spc t) @arrows
|
||||||
|
(spc ret) @misc
|
||||||
|
)
|
||||||
|
'';
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue