Things
- `wireguard` for `hs` - gnome keyring for VSCode to make Copilot work - uninstalled local `Hydra` on `pc` - VSCode -> VSCodeFHS - Emacs - typescript - solidity - envrc mode
This commit is contained in:
parent
3668e2d3d0
commit
0ee819715f
10 changed files with 127 additions and 47 deletions
|
@ -314,9 +314,54 @@
|
|||
allowedUDPPorts = [
|
||||
137 # samba
|
||||
138 # samba
|
||||
51820 # wireguard
|
||||
];
|
||||
};
|
||||
|
||||
networking.nat.enable = true;
|
||||
networking.nat.externalInterface = "enp0s10";
|
||||
networking.nat.internalInterfaces = [ "wg0" ];
|
||||
|
||||
networking.wireguard.interfaces = {
|
||||
# "wg0" is the network interface name. You can name the interface arbitrarily.
|
||||
wg0 = {
|
||||
# Determines the IP address and subnet of the server's end of the tunnel interface.
|
||||
ips = [ "10.100.0.1/24" ];
|
||||
|
||||
# The port that WireGuard listens to. Must be accessible by the client.
|
||||
listenPort = 51820;
|
||||
|
||||
# This allows the wireguard server to route your traffic to the internet and hence be like a VPN
|
||||
# For this to work you have to set the dnsserver IP of your router (or dnsserver of choice) in your clients
|
||||
postSetup = ''
|
||||
${pkgs.iptables}/bin/iptables -t nat -A POSTROUTING -s 10.100.0.0/24 -o enp0s10 -j MASQUERADE
|
||||
'';
|
||||
|
||||
# This undoes the above command
|
||||
postShutdown = ''
|
||||
${pkgs.iptables}/bin/iptables -t nat -D POSTROUTING -s 10.100.0.0/24 -o enp0s10 -j MASQUERADE
|
||||
'';
|
||||
|
||||
# Path to the private key file.
|
||||
#
|
||||
# Note: The private key can also be included inline via the privateKey option,
|
||||
# but this makes the private key world-readable; thus, using privateKeyFile is
|
||||
# recommended.
|
||||
privateKeyFile = "/home/ccr/wireguard-keys/private";
|
||||
|
||||
peers = [
|
||||
# List of allowed peers.
|
||||
{
|
||||
# Feel free to give a meaning full name
|
||||
# Public key of the peer (not a file path).
|
||||
publicKey = "fCwjd75CefC9A7WqO7s3xfOk2nRcoTKfnAzDT6Lc5AA=";
|
||||
# List of IPs assigned to this peer within the tunnel subnet. Used to configure routing.
|
||||
allowedIPs = [ "10.100.0.2/32" ];
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
security.acme = {
|
||||
acceptTerms = true;
|
||||
email = "andrea.ciceri@autistici.org";
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
system.stateVersion = "22.05";
|
||||
|
||||
services.gnome.gnome-keyring.enable = true; # test for VSCode, it works. TODO: move away from here
|
||||
|
||||
boot = {
|
||||
initrd.availableKernelModules = [ "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
|
||||
initrd.kernelModules = [ ];
|
||||
|
@ -76,14 +78,4 @@
|
|||
allowPing = true;
|
||||
};
|
||||
|
||||
|
||||
services.hydra = {
|
||||
enable = true;
|
||||
hydraURL = "http://localhost:3000"; # externally visible URL
|
||||
notificationSender = "hydra@localhost"; # e-mail of hydra service
|
||||
# a standalone hydra will require you to unset the buildMachinesFiles list to avoid using a nonexistant /etc/nix/machines
|
||||
buildMachinesFiles = [ ];
|
||||
# you will probably also want, otherwise *everything* will be built from scratch
|
||||
useSubstitutes = true;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -24,6 +24,7 @@ emacsWithPackages (
|
|||
evil-collection
|
||||
evil-tree-edit
|
||||
fira-code-mode
|
||||
flycheck-status-emoji
|
||||
git-auto-commit-mode
|
||||
go-translate
|
||||
good-scroll
|
||||
|
@ -54,6 +55,7 @@ emacsWithPackages (
|
|||
origami
|
||||
pkgs.emacs28Packages.tree-sitter-langs
|
||||
pkgs.emacs28Packages.tsc
|
||||
prettier
|
||||
projectile
|
||||
psc-ide
|
||||
psci
|
||||
|
@ -61,8 +63,10 @@ emacsWithPackages (
|
|||
rainbow-delimiters
|
||||
rainbow-identifiers
|
||||
scad-mode
|
||||
solidity-mode
|
||||
sudo-utils
|
||||
symex
|
||||
tide
|
||||
tree-edit
|
||||
tree-sitter
|
||||
treemacs
|
||||
|
@ -71,6 +75,7 @@ emacsWithPackages (
|
|||
treemacs-magit
|
||||
treemacs-persp
|
||||
treemacs-projectile
|
||||
typescript-mode
|
||||
use-package
|
||||
visual-fill-column
|
||||
which-key
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
home.packages = with pkgs; [
|
||||
ack
|
||||
fx
|
||||
ranger
|
||||
umoria
|
||||
droidcam
|
||||
|
@ -20,8 +21,6 @@
|
|||
gtk_engines
|
||||
gsettings-desktop-schemas
|
||||
lxappearance
|
||||
yarn
|
||||
yarn2nix
|
||||
python39Packages.poetry
|
||||
texlive.combined.scheme-full
|
||||
gphoto2
|
||||
|
|
|
@ -47,6 +47,9 @@
|
|||
poppler_utils
|
||||
python3Full
|
||||
rnix-lsp
|
||||
nodePackages.typescript-language-server
|
||||
nodePackages.eslint
|
||||
nodejs
|
||||
silver-searcher
|
||||
unzip
|
||||
(
|
||||
|
@ -60,7 +63,6 @@
|
|||
}
|
||||
)
|
||||
] ++ (if pkgs.system == "x86_64-linux" then [
|
||||
python-language-server
|
||||
] ++ (with easy-ps; [
|
||||
ffmpegthumbnailer
|
||||
]) else [ ]);
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
(envrc-global-mode)
|
||||
|
||||
(setq backup-directory-alist `(("." . "~/.saves"))
|
||||
backup-by-copying t
|
||||
delete-old-versions 6
|
||||
|
|
31
users/profiles/emacs/emacs.d/config/config-typescript.el
Normal file
31
users/profiles/emacs/emacs.d/config/config-typescript.el
Normal file
|
@ -0,0 +1,31 @@
|
|||
(use-package typescript-mode
|
||||
:mode "\\.ts\\'")
|
||||
|
||||
(defun setup-tide-mode ()
|
||||
(interactive)
|
||||
(tide-setup)
|
||||
(flycheck-mode +1)
|
||||
(flycheck-status-emoji-mode +1)
|
||||
|
||||
(setq
|
||||
flycheck-checker 'javascript-eslint
|
||||
flycheck-check-syntax-automatically '(save mode-enabled))
|
||||
(eldoc-mode +1)
|
||||
(tide-hl-identifier-mode +1)
|
||||
;; company is an optional dependency. You have to
|
||||
;; install it separately via package-install
|
||||
;; `M-x package-install [ret] company`
|
||||
(company-mode +1))
|
||||
|
||||
;; aligns annotation to the right hand side
|
||||
(setq company-tooltip-align-annotations t)
|
||||
|
||||
;; formats the buffer before saving
|
||||
;;(add-hook 'before-save-hook 'tide-format-before-save)
|
||||
|
||||
;; instead use prettier
|
||||
(add-hook 'typescript-mode-hook 'prettier-mode)
|
||||
|
||||
(add-hook 'typescript-mode-hook #'setup-tide-mode)
|
||||
|
||||
(provide 'config-typescript)
|
|
@ -17,7 +17,9 @@
|
|||
(require 'config-python)
|
||||
(require 'config-spelling)
|
||||
(require 'config-nix)
|
||||
(require 'config-typescript)
|
||||
(require 'config-purescript)
|
||||
(require 'config-solidity)
|
||||
(require 'config-scad)
|
||||
(require 'config-translate)
|
||||
(require 'config-lisp)
|
||||
|
|
|
@ -2,35 +2,37 @@
|
|||
{
|
||||
programs.vscode = {
|
||||
enable = true;
|
||||
package = pkgs.vscode-fhs;
|
||||
|
||||
userSettings = {
|
||||
"update.channel" = "none";
|
||||
"editor" = {
|
||||
"formatOnSave" = true;
|
||||
"fontFamily" = "Fira Code";
|
||||
"fontLigatures" = true;
|
||||
};
|
||||
"window"."menuBarVisibility" = "classic";
|
||||
"[nix]"."editor.tabSize" = 2;
|
||||
"nix"."enableLanguageServer" = true;
|
||||
"github.copilot.enable" = {
|
||||
"*" = true;
|
||||
};
|
||||
};
|
||||
extensions = with pkgs.vscode-extensions; [
|
||||
eamodio.gitlens
|
||||
jnoortheen.nix-ide
|
||||
haskell.haskell
|
||||
justusadam.language-haskell
|
||||
#ms-python.python
|
||||
];
|
||||
};
|
||||
# userSettings = {
|
||||
# "update.channel" = "none";
|
||||
# "editor" = {
|
||||
# "formatOnSave" = true;
|
||||
# "fontFamily" = "Fira Code";
|
||||
# "fontLigatures" = true;
|
||||
# };
|
||||
# "window"."menuBarVisibility" = "classic";
|
||||
# "[nix]"."editor.tabSize" = 2;
|
||||
# "nix"."enableLanguageServer" = true;
|
||||
# "github.copilot.enable" = {
|
||||
# "*" = true;
|
||||
# };
|
||||
# };
|
||||
# # extensions = with pkgs.vscode-extensions; [
|
||||
# # eamodio.gitlens
|
||||
# # jnoortheen.nix-ide
|
||||
# # haskell.haskell
|
||||
# # justusadam.language-haskell
|
||||
# # #ms-python.python
|
||||
# # ];
|
||||
# };
|
||||
|
||||
home.packages = with pkgs; [
|
||||
gnome.gnome-keyring
|
||||
stylish-haskell
|
||||
ghc
|
||||
] ++ (if pkgs.system == "x86_64-linux" then [
|
||||
haskell-language-server
|
||||
] else [ ]);
|
||||
# home.packages = with pkgs; [
|
||||
# gnome.gnome-keyring
|
||||
# stylish-haskell
|
||||
# ghc
|
||||
# ] ++ (if pkgs.system == "x86_64-linux" then [
|
||||
# haskell-language-server
|
||||
# ] else [ ]);
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue