Add vscode-server, open 8080,8090,4200 for dev

This commit is contained in:
Alexander Derevianko
2025-08-01 13:09:16 +02:00
parent 688ff22ca3
commit 8b8d356570
6 changed files with 116 additions and 3 deletions
Generated
+68 -1
View File
@@ -54,6 +54,24 @@
"type": "github" "type": "github"
} }
}, },
"flake-utils_2": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1681202837,
"narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "cfacdce06f30d2b68473a46042957675eebb3401",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"home-manager": { "home-manager": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@@ -158,6 +176,20 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_3": {
"locked": {
"lastModified": 1682134069,
"narHash": "sha256-TnI/ZXSmRxQDt2sjRYK/8j8iha4B4zP2cnQCZZ3vp7k=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "fd901ef4bf93499374c5af385b2943f5801c0833",
"type": "github"
},
"original": {
"id": "nixpkgs",
"type": "indirect"
}
},
"root": { "root": {
"inputs": { "inputs": {
"copyparty": "copyparty", "copyparty": "copyparty",
@@ -167,7 +199,8 @@
"nixos-hardware": "nixos-hardware", "nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs_2", "nixpkgs": "nixpkgs_2",
"sops-nix": "sops-nix", "sops-nix": "sops-nix",
"unstable": "unstable" "unstable": "unstable",
"vscode-server": "vscode-server"
} }
}, },
"sops-nix": { "sops-nix": {
@@ -190,6 +223,21 @@
"type": "github" "type": "github"
} }
}, },
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"unstable": { "unstable": {
"locked": { "locked": {
"lastModified": 1753694789, "lastModified": 1753694789,
@@ -205,6 +253,25 @@
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
},
"vscode-server": {
"inputs": {
"flake-utils": "flake-utils_2",
"nixpkgs": "nixpkgs_3"
},
"locked": {
"lastModified": 1753541826,
"narHash": "sha256-foGgZu8+bCNIGeuDqQ84jNbmKZpd+JvnrL2WlyU4tuU=",
"owner": "nix-community",
"repo": "nixos-vscode-server",
"rev": "6d5f074e4811d143d44169ba4af09b20ddb6937d",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixos-vscode-server",
"type": "github"
}
} }
}, },
"root": "root", "root": "root",
+5
View File
@@ -24,6 +24,8 @@
}; };
copyparty.url = "github:9001/copyparty"; copyparty.url = "github:9001/copyparty";
vscode-server.url = "github:nix-community/nixos-vscode-server";
}; };
outputs = { outputs = {
@@ -86,7 +88,10 @@
disko.nixosModules.disko disko.nixosModules.disko
home-manager.nixosModules.home-manager home-manager.nixosModules.home-manager
sops-nix.nixosModules.sops sops-nix.nixosModules.sops
# Applications
inputs.copyparty.nixosModules.default inputs.copyparty.nixosModules.default
inputs.vscode-server.nixosModules.default
./machines/izanagi ./machines/izanagi
./modules ./modules
+16 -2
View File
@@ -47,8 +47,16 @@ in {
useOSProber = true; useOSProber = true;
}; };
networking.hostName = username; networking = {
networking.networkmanager.enable = true; hostName = username;
networkmanager.enable = true;
firewall.allowedTCPPorts = [
8080
8090 # Mongo express port
4200 # Angular application port
];
};
# Set your time zone. # Set your time zone.
time.timeZone = "Europe/Warsaw"; time.timeZone = "Europe/Warsaw";
@@ -76,6 +84,7 @@ in {
hashedPassword = "$6$fgXNf1aUOgGn7QWQ$rOcVKUnBC7td/KVdyLzknQy4LjgQDETKPIxivi1yWd4boWbRgITr/.iYlekZOuRuC6m.WydgV9PviqlrioDF91"; hashedPassword = "$6$fgXNf1aUOgGn7QWQ$rOcVKUnBC7td/KVdyLzknQy4LjgQDETKPIxivi1yWd4boWbRgITr/.iYlekZOuRuC6m.WydgV9PviqlrioDF91";
extraGroups = [ "networkmanager" "wheel" ]; extraGroups = [ "networkmanager" "wheel" ];
packages = with pkgs; [ packages = with pkgs; [
git
]; ];
openssh.authorizedKeys.keys = [ openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBcGhVpjmWEw1GEw0y/ysJPa2v3+u/Rt/iES/Se2huH2 alexander0derevianko@gmail.com" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBcGhVpjmWEw1GEw0y/ysJPa2v3+u/Rt/iES/Se2huH2 alexander0derevianko@gmail.com"
@@ -88,6 +97,7 @@ in {
vim vim
wget wget
ripgrep ripgrep
direnv
]; ];
services.openssh = { services.openssh = {
@@ -135,6 +145,10 @@ in {
inherit username; inherit username;
}; };
}; };
development = {
vscode-server.enable = true;
};
}; };
# DO NOT CHANGE AT ANY POINT! # DO NOT CHANGE AT ANY POINT!
+1
View File
@@ -9,5 +9,6 @@
./samba ./samba
./searxng ./searxng
./auth ./auth
./development
]; ];
} }
+7
View File
@@ -0,0 +1,7 @@
{ config, lib, pkgs, ... }:
{
imports = [
./nix-vscode-server
];
}
@@ -0,0 +1,19 @@
{ config, lib, pkgs, inputs, ... }:
with lib;
let
cfg = config.dov.development.vscode-server;
in {
options.dov.development.vscode-server = {
enable = mkEnableOption "vscode server config";
};
config = mkIf cfg.enable {
services.vscode-server = {
enable = true;
enableFHS = true;
};
};
}