diff --git a/flake.lock b/flake.lock index 1c041dc..ae85ee5 100644 --- a/flake.lock +++ b/flake.lock @@ -287,20 +287,17 @@ } }, "nixos-vscode-server": { - "inputs": { - "nixpkgs": "nixpkgs_6" - }, + "flake": false, "locked": { - "lastModified": 1621309617, - "narHash": "sha256-wVraqnUMkDzVRoicKB9hwd16u53lls8gDN2Df6CmoK8=", - "owner": "iosmanthus", + "lastModified": 1648830510, + "narHash": "sha256-U+UGKbZajc2NqDvBL7hCYshAiaXgiBv5rNFIqLl0X7M=", + "owner": "msteen", "repo": "nixos-vscode-server", - "rev": "b7d30b8afb614ea9da284ca8e9687689ae8fcfbd", + "rev": "d2343b5eb47b811856085f3eff4d899a32b2c136", "type": "github" }, "original": { - "owner": "iosmanthus", - "ref": "add-flake", + "owner": "msteen", "repo": "nixos-vscode-server", "type": "github" } @@ -381,22 +378,6 @@ } }, "nixpkgs_6": { - "locked": { - "lastModified": 1621073999, - "narHash": "sha256-Cp99YreSFedcWovxNmO8g8qFYltQQJPRLfuot6Z7iGE=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "83d907fd760d9ee4f49b4b7e4b1c6682f137b573", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_7": { "locked": { "lastModified": 1651726670, "narHash": "sha256-dSGdzB49SEvdOJvrQWfQYkAefewXraHIV08Vz6iDXWQ=", @@ -444,7 +425,7 @@ "nixos-hardware": "nixos-hardware", "nixos-shell": "nixos-shell", "nixos-vscode-server": "nixos-vscode-server", - "nixpkgs": "nixpkgs_7", + "nixpkgs": "nixpkgs_6", "vim-eldar": "vim-eldar", "zk-nvim": "zk-nvim" } diff --git a/flake.nix b/flake.nix index 3e7b774..e17ff9f 100644 --- a/flake.nix +++ b/flake.nix @@ -11,7 +11,8 @@ nixos-hardware.url = github:NixOS/nixos-hardware/master; home-manager.url = "github:nix-community/home-manager"; home-manager.inputs.nixpkgs.follows = "nixpkgs"; - nixos-vscode-server.url = "github:iosmanthus/nixos-vscode-server/add-flake"; + nixos-vscode-server.url = "github:msteen/nixos-vscode-server"; + nixos-vscode-server.flake = false; hercules-ci-agent.url = "github:hercules-ci/hercules-ci-agent/master"; nixos-shell.url = "github:Mic92/nixos-shell"; @@ -65,6 +66,7 @@ ./home/starship.nix ./home/terminal.nix ./home/direnv.nix + ./home/vscode-server.nix ]; programs.bash = { @@ -87,7 +89,6 @@ [ ./systems/hetzner/ax101.nix ./nixos/server/harden.nix - ./nixos/server/devserver.nix ./nixos/hercules.nix ]; # This is run in qemu only. diff --git a/home/vscode-server.nix b/home/vscode-server.nix new file mode 100644 index 0000000..e101c95 --- /dev/null +++ b/home/vscode-server.nix @@ -0,0 +1,8 @@ +{ pkgs, inputs, ... }: +{ + imports = [ + "${inputs.nixos-vscode-server}/modules/vscode-server/home.nix" + ]; + + services.vscode-server.enable = true; +} diff --git a/nixos/server/devserver.nix b/nixos/server/devserver.nix deleted file mode 100644 index b3b208b..0000000 --- a/nixos/server/devserver.nix +++ /dev/null @@ -1,27 +0,0 @@ -# A server for (remote) development purposes. -{ pkgs, inputs, ... }: { - imports = [ - inputs.nixos-vscode-server.nixosModules.system - ]; - environment.systemPackages = [ - # https://old.reddit.com/r/NixOS/comments/uoklud/nix_development_container/i8hn64w/?context=2 - (pkgs.writeShellApplication { - name = "fix-vscode-server"; - text = '' - if [[ -d "$HOME/.vscode-server/bin" ]]; then - for versiondir in "$HOME"/.vscode-server/bin/*; do - echo "!! Fixing $versiondir/node" - ln -sf "${pkgs.nodejs-16_x}/bin/node" "$versiondir/node" - done - fi - ''; - }) - ]; - # FIXME: This doesn't seem to work; hence the fix-vscode-server above. - services.auto-fix-vscode-server.enable = true; - - # https://code.visualstudio.com/docs/setup/linux#_visual-studio-code-is-unable-to-watch-for-file-changes-in-this-large-workspace-error-enospc - boot.kernel.sysctl = { - "fs.inotify.max_user_watches" = "524288"; - }; -} diff --git a/systems/hetzner/ax101.nix b/systems/hetzner/ax101.nix index d814812..a04959c 100644 --- a/systems/hetzner/ax101.nix +++ b/systems/hetzner/ax101.nix @@ -53,6 +53,11 @@ # available there. boot.initrd.services.swraid.mdadmConf = config.environment.etc."mdadm.conf".text; + # https://code.visualstudio.com/docs/setup/linux#_visual-studio-code-is-unable-to-watch-for-file-changes-in-this-large-workspace-error-enospc + boot.kernel.sysctl = { + "fs.inotify.max_user_watches" = "524288"; + }; + # Network (Hetzner uses static IP assignments, and we don't use DHCP here) networking.useDHCP = false;