-
-
Notifications
You must be signed in to change notification settings - Fork 78
/
flake.nix
37 lines (35 loc) · 1.17 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
{
description = "NixOS VSCode server";
inputs = {
flake-utils.url = "github:numtide/flake-utils";
};
outputs = {
self,
nixpkgs,
flake-utils,
}:
{
nixosModule = self.nixosModules.default; # Deprecrated, but perhaps still in use.
nixosModules.default = import ./modules/vscode-server;
nixosModules.home = self.homeModules.default; # Backwards compatiblity.
homeModules.default = import ./modules/vscode-server/home.nix; # Consistent with homeConfigurations.
}
// (let
inherit (flake-utils.lib) defaultSystems eachSystem;
in
eachSystem defaultSystems (system: let
pkgs = nixpkgs.legacyPackages.${system};
inherit (pkgs.lib) hasSuffix optionalAttrs;
auto-fix-vscode-server = pkgs.callPackage ./pkgs/auto-fix-vscode-server.nix { };
in
# The package depends on `inotify-tools` which is only available on Linux.
optionalAttrs (hasSuffix "-linux" system) {
packages = {
inherit auto-fix-vscode-server;
default = auto-fix-vscode-server;
};
checks = {
inherit auto-fix-vscode-server;
};
}));
}