Managing extensions declaritively.

This commit is contained in:
Joseph Hanson 2024-07-21 17:28:13 -05:00
parent 24d0e69914
commit 62574acb26
Signed by: jahanson
SSH key fingerprint: SHA256:vy6dKBECV522aPAwklFM3ReKAVB086rT3oWwiuiFG7o
3 changed files with 44 additions and 7 deletions

View file

@ -2,14 +2,15 @@
with lib;
{
imports = [
./system
./programs
./services
./de
./hardware
./containers
./de
./editor
./hardware
./lib.nix
./programs
./security
./services
./system
];
options.mySystem.persistentFolder = mkOption {

View file

@ -0,0 +1,35 @@
{ lib, config, pkgs, ... }:
with lib;
let
cfg = config.mySystem.editor.vscode;
in
{
options.mySystem.editor.vscode.enable = mkEnableOption "vscode";
config = mkIf cfg.enable {
# Enable vscode & addons
environment.systemPackages = with pkgs; [
(vscode-with-extensions.override {
vscode = unstable.vscode;
vscodeExtensions = with vscode-extensions;
[
dracula-theme.theme-dracula
yzhang.markdown-all-in-one
signageos.signageos-vscode-sops
redhat.ansible
ms-azuretools.vscode-docker
mikestead.dotenv
tamasfe.even-better-toml
pkief.material-icon-theme
jnoortheen.nix-ide
ms-vscode-remote.remote-ssh
ms-vscode-remote.remote-ssh-edit
# ms-vscode.remote-explorer
redhat.vscode-yaml
continue.continue
];
})
];
};
}

View file

@ -8,6 +8,7 @@ with config;
mySystem = {
de.gnome.enable = true;
shell.fish.enable = true;
editor.vscode.enable = true;
system.resticBackup.local.enable = false;
system.resticBackup.remote.enable = false;
@ -47,7 +48,6 @@ with config;
lm_sensors
cpufrequtils
cpupower-gui
unstable.vscode
vivaldi
gparted
];
@ -65,4 +65,5 @@ with config;
enable = true;
binfmt = true;
};
}
};
}