diff --git a/nixos/modules/nixos/default.nix b/nixos/modules/nixos/default.nix index fd62122..9e6779c 100644 --- a/nixos/modules/nixos/default.nix +++ b/nixos/modules/nixos/default.nix @@ -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 { diff --git a/nixos/modules/nixos/editor/default.nix b/nixos/modules/nixos/editor/default.nix new file mode 100644 index 0000000..ad2ca26 --- /dev/null +++ b/nixos/modules/nixos/editor/default.nix @@ -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 + ]; + }) + ]; + }; +} diff --git a/nixos/profiles/role-workstation.nix b/nixos/profiles/role-workstation.nix index f28d032..ab6b371 100644 --- a/nixos/profiles/role-workstation.nix +++ b/nixos/profiles/role-workstation.nix @@ -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; }; - } + }; +}