From 4ebca41452630699fe3d59577acc6204c91db824 Mon Sep 17 00:00:00 2001 From: Daylin Morgan Date: Mon, 29 Jan 2024 09:24:41 -0600 Subject: [PATCH] must be a desktop to install vscode --- hosts/algiz/default.nix | 10 +++++++++- modules/editors/vscode.nix | 10 ++++++++-- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/hosts/algiz/default.nix b/hosts/algiz/default.nix index 0f9fce9..b1d4ee5 100644 --- a/hosts/algiz/default.nix +++ b/hosts/algiz/default.nix @@ -2,7 +2,13 @@ inputs, pkgs, ... -}: { +}: let + gitea-shim = pkgs.writeShellScriptBin "gitea" '' + #!/bin/sh + ssh -p 2222 -o StrictHostKeyChecking=no git@127.0.0.1 "SSH_ORIGINAL_COMMAND=\"$SSH_ORIGINAL_COMMAND\" $0 $@" + ''; + +in { imports = with inputs.self.nixosModules; [ docker ]; @@ -15,6 +21,8 @@ environment.systemPackages = with pkgs; [ rclone + + gitea-shim ]; # https://francis.begyn.be/blog/nixos-restic-backups diff --git a/modules/editors/vscode.nix b/modules/editors/vscode.nix index 5d27e2d..f09e9a8 100644 --- a/modules/editors/vscode.nix +++ b/modules/editors/vscode.nix @@ -1,10 +1,16 @@ { - input, pkgs, + lib, + config, ... -}: { +}: let + inherit (lib) mkIf; + cfg = config.desktop; +in { + config = mkIf cfg.enable { environment.systemPackages = with pkgs; [ # vscode vscode-fhs ]; +}; }