Skip to content

Commit

Permalink
Enable VSCode server and add build workflow for hakase
Browse files Browse the repository at this point in the history
  • Loading branch information
yousiki committed Dec 1, 2024
1 parent 906a08c commit ed3ac8f
Show file tree
Hide file tree
Showing 6 changed files with 669 additions and 588 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/build-hakase.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: Build hakase
on:
- push
- pull_request
- workflow_dispatch
jobs:
call-workflow-passing-data:
uses: ./.github/workflows/build-nixos.yaml
with:
hostname: hakase
secrets: inherit
63 changes: 59 additions & 4 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@
inputs.nixpkgs.follows = "nixpkgs";
};

# VSCode server on NixOS
nixos-vscode-server = {
url = "github:nix-community/nixos-vscode-server";
inputs.nixpkgs.follows = "nixpkgs";
};

# Git hooks
pre-commit-hooks = {
url = "github:cachix/git-hooks.nix";
Expand Down Expand Up @@ -82,6 +88,7 @@
homes.modules = with inputs; [
catppuccin.homeManagerModules.catppuccin
nix-index-database.hmModules.nix-index
nixos-vscode-server.homeModules.default
sops-nix.homeManagerModules.sops
];

Expand All @@ -92,6 +99,7 @@
];
nixos = with inputs; [
nix-index-database.nixosModules.nix-index
nixos-vscode-server.nixosModules.default
sops-nix.nixosModules.sops
];
};
Expand Down
4 changes: 4 additions & 0 deletions modules/home/basic/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
lib,
config,
pkgs,
...
}: {
# Whether to enable Home Manager.
Expand All @@ -27,4 +28,7 @@
# TODO: remove after home-manager 25.05
enableNixpkgsReleaseCheck = false;
};

# Enable vscode server on NixOS
services.vscode-server.enable = pkgs.stdenv.isLinux;
}
3 changes: 3 additions & 0 deletions modules/nixos/basic/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@
openFirewall = true;
};

# Enable VSCode server.
services.vscode-server.enable = true;

# Set timezone.
time.timeZone = "Asia/Shanghai";
}
Loading

0 comments on commit ed3ac8f

Please sign in to comment.