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; with lib;
{ {
imports = [ imports = [
./system
./programs
./services
./de
./hardware
./containers ./containers
./de
./editor
./hardware
./lib.nix ./lib.nix
./programs
./security ./security
./services
./system
]; ];
options.mySystem.persistentFolder = mkOption { 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 = { mySystem = {
de.gnome.enable = true; de.gnome.enable = true;
shell.fish.enable = true; shell.fish.enable = true;
editor.vscode.enable = true;
system.resticBackup.local.enable = false; system.resticBackup.local.enable = false;
system.resticBackup.remote.enable = false; system.resticBackup.remote.enable = false;
@ -47,7 +48,6 @@ with config;
lm_sensors lm_sensors
cpufrequtils cpufrequtils
cpupower-gui cpupower-gui
unstable.vscode
vivaldi vivaldi
gparted gparted
]; ];
@ -65,4 +65,5 @@ with config;
enable = true; enable = true;
binfmt = true; binfmt = true;
}; };
};
} }