add scripts for vscode server
This commit is contained in:
@@ -175,7 +175,8 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.services.nas-mounts = {
|
systemd.services = {
|
||||||
|
nas-mounts = {
|
||||||
path = [ pkgs.zfs pkgs.bash ];
|
path = [ pkgs.zfs pkgs.bash ];
|
||||||
script = ''
|
script = ''
|
||||||
if test -d /mnt/ssd/ssd_app_data; then
|
if test -d /mnt/ssd/ssd_app_data; then
|
||||||
@@ -192,6 +193,16 @@ in
|
|||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
glances-server = {
|
||||||
|
path = [ pkgs.bash pkgs.glances ];
|
||||||
|
script = ''
|
||||||
|
#!/user/bin/env bash
|
||||||
|
glances -w
|
||||||
|
'';
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
# Networking configs enp7s0
|
# Networking configs enp7s0
|
||||||
networking = {
|
networking = {
|
||||||
hostName = hostname;
|
hostName = hostname;
|
||||||
@@ -230,6 +241,11 @@ in
|
|||||||
vulkan-tools
|
vulkan-tools
|
||||||
clinfo
|
clinfo
|
||||||
glances
|
glances
|
||||||
|
python3
|
||||||
|
nix-ld
|
||||||
|
binutils
|
||||||
|
gcc
|
||||||
|
nodejs-18_x
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -245,6 +261,10 @@ in
|
|||||||
config = {
|
config = {
|
||||||
# Enable non free
|
# Enable non free
|
||||||
allowUnfree = true;
|
allowUnfree = true;
|
||||||
|
|
||||||
|
permittedInsecurePackages = [
|
||||||
|
# ...
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -260,6 +280,12 @@ in
|
|||||||
extraGroups = [ "wheel" "networkmanager" "docker" "podman" "libvirtd" "nas-apps" "jallen-nas" ]; # Enable ‘sudo’ for the user.
|
extraGroups = [ "wheel" "networkmanager" "docker" "podman" "libvirtd" "nas-apps" "jallen-nas" ]; # Enable ‘sudo’ for the user.
|
||||||
initialHashedPassword = password;
|
initialHashedPassword = password;
|
||||||
shell = pkgs.fish;
|
shell = pkgs.fish;
|
||||||
|
openssh.authorizedKeys.keys = [
|
||||||
|
# macBook
|
||||||
|
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCw9zq8DLGByI5v2gAn95hKNyOsm3g61a2buxu2BBMFysQJgmZPCCLUqRJKhSM5Vm/JOgsAmdpRBRZQoHD+6S844CJHb4v4VIbjkyQgYCuM7Rst2IOZ5QybvsA2/D0nwytZ+HXQqDj2AagUYDbz0gyyIHkDQ5YGBMkvkWz/h1Vci6aoBM7VihEDM4KlWoTVuPeASGM8r5IZ2FS83Djbqo4ov6AYvLMrKB9Z7hmFgH6R3LE0gxOkzbGVXtSuvJyrjvgytoT22UhATjjxSQ9D+YJXXkQoB3lUdg8OoIquUPjMZpl4mR8ffvseWPfcvD1XlD5t+TOHFqKpESO547tlOBYhdpew+NSgAXpamCU6oyV8tDCywLQu2ucxHRn78u6WXzWHkDtffdhzmk6TZaPhWqVHuTGjR4higBgGqUfSaKOMszt+FDRZAr3HtuQ2+zJ8bowK9fW5OqilTtK2HtQqroD9ApegDNbqOz6kGy5IycSXvqPURy/M4lxZxbtBPuemcJs= mattjallen@MacBook-Pro.local"
|
||||||
|
# desktop windows
|
||||||
|
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDZ2PYPjZddOzR8OJj16G88KcUhCDLkvrEmpUQP0wKHDUuA27HQQ2ORo66asadwGHY3k1VDZ1ei9l9H++SIIeKOaaUr5yZdktvj4POUNtbd9ZhcS7sZU7BSF+NMDM+h3tImh6z0S7mWvRQOUv3ZM+ZER+5xTWJVG1OOJEpb1drxJk6Qz0wbZKSR7TPNFBLLXlVy7hkNYf07RtDyhCCxNB3hJfa8c+oztnWumwDhDQWLqiUXWIU2QH6iRLGl/WYnujtNvVVaV/Hn3JJkS6MM9dnV3cpoIO0+J7+WfsN9rZ0wXt5yY3GhiGXwmcO5eYVli8lHlLWtK7aYSETyry6CBsLbojzOQO5rSqhpwfF2njAAFAQU0UjLc8PahisIuFKCwHH4iyXXOagiv5K1Mc/0Ak+WhhMPee6vV2p7NTyNpXRvouDbWy5cSRH31WgQ9fK5mIGe5v8nGGqtEhUubUkiOgP+H3UbT2V/nTv/TFKdJcKw+WmizvTrxBmaMjWALlkYl+s= mattl@Jallen-PC"
|
||||||
|
];
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
neofetch
|
neofetch
|
||||||
git
|
git
|
||||||
|
|||||||
12
scripts/fix-vscode-node
Executable file
12
scripts/fix-vscode-node
Executable file
@@ -0,0 +1,12 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
# fix-vscode-server-node.sh
|
||||||
|
# https://github.com/microsoft/vscode-remote-release/issues/648#issuecomment-503148523
|
||||||
|
cd ~/.vscode-server/bin/*
|
||||||
|
if ! ./node -e "require('process').exit(0)"
|
||||||
|
then
|
||||||
|
echo patching node binary $(readlink -f node)
|
||||||
|
rm node
|
||||||
|
ln -s $(which node)
|
||||||
|
else
|
||||||
|
echo node is working $(readlink -f node)
|
||||||
|
fi
|
||||||
18
scripts/nix-vscode-server
Executable file
18
scripts/nix-vscode-server
Executable file
@@ -0,0 +1,18 @@
|
|||||||
|
#! /usr/bin/env nix-shell
|
||||||
|
#! nix-shell --pure -i runghc -p "haskellPackages.ghcWithPackages (pkgs: [ pkgs.turtle ])"
|
||||||
|
|
||||||
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
|
import Turtle
|
||||||
|
|
||||||
|
main = sh $ do
|
||||||
|
homedir <- home
|
||||||
|
subdir <- ls $ homedir </> ".vscode-server/bin/"
|
||||||
|
let nodepath = subdir </> "node"
|
||||||
|
badnode <- isNotSymbolicLink nodepath
|
||||||
|
if badnode
|
||||||
|
then do
|
||||||
|
mv nodepath (subdir </> "node_backup")
|
||||||
|
symlink "/run/current-system/sw/bin/node" nodepath
|
||||||
|
echo ("Fixed " <> repr subdir)
|
||||||
|
else do
|
||||||
|
echo ("Already fixed " <> repr subdir)
|
||||||
Reference in New Issue
Block a user