home

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit d6e40cb1d985ae18d73b5b38bde729d5b6f57747
parent bb731773450d0c0a5f8cda19bd6d1a2f2cec7b16
Author: Vincent Demeester <vincent@sbr.pm>
Date:   Mon, 26 Nov 2018 09:25:25 +0100

vscode: replace programs.vscode to profiles.vscode…

- home-manager now has a `programs.vscode` module so it was
  conflicting with that one
- the profiles allow to define the extensions without defining it in
  the overlay

Signed-off-by: Vincent Demeester <vincent@sbr.pm>

Diffstat:
Mmachines/hokkaido.nix | 2+-
Mmachines/shikoku.nix | 2+-
Mmachines/wakasu.nix | 2+-
Mmodules/module-list.nix | 2+-
Amodules/profiles/vscode.nix | 167+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Dmodules/programs/vscode.nix | 22----------------------
Moverlays/sbr.nix | 151------------------------------------------------------------------------------
7 files changed, 171 insertions(+), 177 deletions(-)

diff --git a/machines/hokkaido.nix b/machines/hokkaido.nix @@ -11,10 +11,10 @@ java.enable = true; python.enable = true; rust.enable = true; + vscode.enable = true; }; profiles.containers.enable = true; profiles.media.enable = true; - programs.vscode.enable = true; home.packages = with pkgs; [ google-chrome ]; diff --git a/machines/shikoku.nix b/machines/shikoku.nix @@ -13,6 +13,7 @@ js.enable = true; python.enable = true; rust.enable = true; + vscode.enable = true; }; profiles.media.enable = true; profiles.cloud.google.enable = true; @@ -24,7 +25,6 @@ openshift = { enable = true; minishift.enable = true; }; }; programs = { - vscode.enable = true; google-chrome.enable = true; }; services.shairport-sync.enable = true; diff --git a/machines/wakasu.nix b/machines/wakasu.nix @@ -12,6 +12,7 @@ haskell.enable = true; python.enable = true; rust.enable = true; + vscode.enable = true; }; profiles.cloud.google.enable = true; profiles.containers = { @@ -22,7 +23,6 @@ }; profiles.media.enable = true; programs = { - vscode.enable = true; google-chrome.enable = true; podman.enable = true; }; diff --git a/modules/module-list.nix b/modules/module-list.nix @@ -25,9 +25,9 @@ ./profiles/openshift.nix ./profiles/ssh.nix ./profiles/tmux.nix + ./profiles/vscode.nix ./profiles/zsh.nix ./programs/podman.nix - ./programs/vscode.nix ./services/shairport-sync.nix ]; } diff --git a/modules/profiles/vscode.nix b/modules/profiles/vscode.nix @@ -0,0 +1,167 @@ +{ config, lib, pkgs, ... }: + +with lib; +let + cfg = config.profiles.dev.vscode; +in +{ + options = { + profiles.dev.vscode = { + enable = mkOption { + default = false; + description = "Enable VS Code profile"; + type = types.bool; + }; + }; + }; + config = mkIf cfg.enable { + programs.vscode = { + enable = true; + extensions = pkgs.vscode-utils.extensionsFromVscodeMarketplace [ + { + name = "EditorConfig"; + publisher = "EditorConfig"; + version = "0.12.4"; + sha256 = "067mxkzjmgz9lv5443ig7jc4dpgml4pz0dac0xmqrdmiwml6j4k4"; + } + { + name = "vsc-material-theme"; + publisher = "Equinusocio"; + version = "2.5.1"; + sha256 = "1qr7zk3qjsp98346r642k54s6jny8fkanac99v3aa7i2k6idpm6g"; + } + { + name = "material-icon-theme"; + publisher = "PKief"; + version = "3.6.0"; + sha256 = "0jphqqs41pkyv11mq1a3wzx14sl6pifcfyz3lw5wany003fv5s9s"; + } + { + name = "fish-vscode"; + publisher = "skyapps"; + version = "0.2.0"; + sha256 = "148r186y3h7n84fcyh6wa2qwl2q3pfi8aykwkc9dhfj3kwfcm5rb"; + } + { + name = "code-runner"; + publisher = "formulahendry"; + version = "0.9.4"; + sha256 = "08qq21gaa7igklv9si35qxhs79na893vyp96hf7rvyv7c4fn1pvw"; + } + { + name = "gitlens"; + publisher = "eamodio"; + version = "8.5.6"; + sha256 = "1vn6fvxn4g3759pg9rp8hqdc58pgyvcdma1ylfwmdnipga37xfd3"; + } + { + name = "vscode-direnv"; + publisher = "Rubymaniac"; + version = "0.0.2"; + sha256 = "1gml41bc77qlydnvk1rkaiv95rwprzqgj895kxllqy4ps8ly6nsd"; + } + { + name = "vscode-proto3"; + publisher = "zxh404"; + version = "0.2.1"; + sha256 = "12yf66a9ws5hlyj38nmn91y8a1jrq8696fnmgk60w9anyfalbn4q"; + } + { + name = "project-manager"; + publisher = "alefragnani"; + version = "9.0.1"; + sha256 = "0aqyavgpaqvv62q15h4dkxcgj4khsgr1rlzr3wi9aflyncg7addb"; + } + { + name = "tslint"; + publisher = "eg2"; + version = "1.0.39"; + sha256 = "1al61xzz7p6rqgk7rplg3njj4hyiipx7w89pqfn8634skw7r32rl"; + } + { + name = "vscode-npm-script"; + publisher = "eg2"; + version = "0.3.5"; + sha256 = "1v4081siab0fm0zfn6vlvqlc4vx131q8y6f3h3l46mvpndsa2rck"; + } + { + name = "vscode-pull-request-github"; + publisher = "GitHub"; + version = "0.1.6"; + sha256 = "08r0i265q4gk6kmz3ynxglhssdk5020bifagl9jr8spfs5sacnsx"; + } + { + name = "vscode-kubernetes-tools"; + publisher = "ms-kubernetes-tools"; + version = "0.1.14"; + sha256 = "0ixs1cydbz6qizf9cs0jdqpxwfg7gs74jdy9hp2v9h8q7vq6503l"; + } + # languages + { + name = "Go"; + publisher = "ms-vscode"; + version = "0.6.89"; + sha256 = "05mzw4bwsa9wxldnkdgk0b4n4xm8gzhmrbqy6j8lbk3p360wdg8z"; + } + { + name = "rust"; + publisher = "rust-lang"; + version = "0.4.10"; + sha256 = "1y7sb3585knv2pbq7vf2cjf3xy1fgzrqzn2h3fx2d2bj6ns6vpy3"; + } + { + name = "crates"; + publisher = "serayuzgur"; + version = "0.3.2"; + sha256 = "0xn24vghmcf8fi8cdgaa3f0npmkdr4fdn9y1g56l2fzrx2z4rw3q"; + } + { + name = "Kotlin"; + publisher = "mathiasfrohlich"; + version = "1.7.0"; + sha256 = "1d81rgfh1c1wkz4la0mmjj6k28if237f835diyk3z6n63cazapli"; + } + { + name = "java"; + publisher = "redhat"; + version = "0.31.0"; + sha256 = "1hzqiqkja4931k7rb4pmva6k80ss53nvyksiqvq6kxj25rg3kd1b"; + } + { + name = "vscode-java-debug"; + publisher = "vscjava"; + version = "0.13.0"; + sha256 = "11xvd1b0qsvrbm4yb0c7fm537p1gs6wz45xzl6v1a7k08dapi20i"; + } + { + name = "vscode-java-test"; + publisher = "vscjava"; + version = "0.9.0"; + sha256 = "0000v5qh100n3n529r1nzx79cawx83kvprrmhw6pb4j0m5b3p3p2"; + } + { + name = "gradle-language"; + publisher = "naco-siren"; + version = "0.2.3"; + sha256 = "15lzxvym0mkljjn57av1p4z6hqqwbsbn5idw2fn7nccgrl93aywf"; + } + { + name = "vscode-yaml"; + publisher = "redhat"; + version = "0.0.16"; + sha256 = "0v21qj65nrp850r0jmivmsm9y5i99ymxxm8ganzdia4vbv5hzx9r"; + } + { + name = "better-toml"; + publisher = "bungcip"; + version = "0.3.2"; + sha256 = "08lhzhrn6p0xwi0hcyp6lj9bvpfj87vr99klzsiy8ji7621dzql3"; + } + ] ++ [ + pkgs.vscode-extensions.bbenoist.Nix + pkgs.vscode-extensions.ms-python.python + # pkgs.vscodeliveshare + ]; + }; + }; +} diff --git a/modules/programs/vscode.nix b/modules/programs/vscode.nix @@ -1,22 +0,0 @@ -{ config, lib, pkgs, ... }: - -with lib; -let - cfg = config.programs.vscode; -in -{ - options = { - programs.vscode = { - enable = mkOption { - default = false; - description = "Enable VS Code profile"; - type = types.bool; - }; - }; - }; - config = mkIf cfg.enable { - home.packages = with pkgs; [ - vscode-with-extensions - ]; - }; -} diff --git a/overlays/sbr.nix b/overlays/sbr.nix @@ -51,155 +51,4 @@ self: super: vscodeliveshare = import ../pkgs/vscodeliveshare { inherit (self) stdenv vscode-utils autoPatchelfHook xorg gnome3 utillinux openssl icu zlib curl lttng-ust libsecret libkrb5 gcc libunwind binutils; }; - vscode-with-extensions = super.vscode-with-extensions.override { - # code --list-extensions --show-versions - # ls ~/.vscode/extensions - # find version at https://marketplace.visualstudio.com/items?itemName=ms-python.python -> version - vscodeExtensions = - super.vscode-utils.extensionsFromVscodeMarketplace [ - { - name = "EditorConfig"; - publisher = "EditorConfig"; - version = "0.12.4"; - sha256 = "067mxkzjmgz9lv5443ig7jc4dpgml4pz0dac0xmqrdmiwml6j4k4"; - } - { - name = "vsc-material-theme"; - publisher = "Equinusocio"; - version = "2.5.1"; - sha256 = "1qr7zk3qjsp98346r642k54s6jny8fkanac99v3aa7i2k6idpm6g"; - } - { - name = "material-icon-theme"; - publisher = "PKief"; - version = "3.6.0"; - sha256 = "0jphqqs41pkyv11mq1a3wzx14sl6pifcfyz3lw5wany003fv5s9s"; - } - { - name = "fish-vscode"; - publisher = "skyapps"; - version = "0.2.0"; - sha256 = "148r186y3h7n84fcyh6wa2qwl2q3pfi8aykwkc9dhfj3kwfcm5rb"; - } - { - name = "code-runner"; - publisher = "formulahendry"; - version = "0.9.4"; - sha256 = "08qq21gaa7igklv9si35qxhs79na893vyp96hf7rvyv7c4fn1pvw"; - } - { - name = "gitlens"; - publisher = "eamodio"; - version = "8.5.6"; - sha256 = "1vn6fvxn4g3759pg9rp8hqdc58pgyvcdma1ylfwmdnipga37xfd3"; - } - { - name = "vscode-direnv"; - publisher = "Rubymaniac"; - version = "0.0.2"; - sha256 = "1gml41bc77qlydnvk1rkaiv95rwprzqgj895kxllqy4ps8ly6nsd"; - } - { - name = "vscode-proto3"; - publisher = "zxh404"; - version = "0.2.1"; - sha256 = "12yf66a9ws5hlyj38nmn91y8a1jrq8696fnmgk60w9anyfalbn4q"; - } - { - name = "project-manager"; - publisher = "alefragnani"; - version = "9.0.1"; - sha256 = "0aqyavgpaqvv62q15h4dkxcgj4khsgr1rlzr3wi9aflyncg7addb"; - } - { - name = "tslint"; - publisher = "eg2"; - version = "1.0.39"; - sha256 = "1al61xzz7p6rqgk7rplg3njj4hyiipx7w89pqfn8634skw7r32rl"; - } - { - name = "vscode-npm-script"; - publisher = "eg2"; - version = "0.3.5"; - sha256 = "1v4081siab0fm0zfn6vlvqlc4vx131q8y6f3h3l46mvpndsa2rck"; - } - { - name = "vscode-pull-request-github"; - publisher = "GitHub"; - version = "0.1.6"; - sha256 = "08r0i265q4gk6kmz3ynxglhssdk5020bifagl9jr8spfs5sacnsx"; - } - { - name = "vscode-kubernetes-tools"; - publisher = "ms-kubernetes-tools"; - version = "0.1.14"; - sha256 = "0ixs1cydbz6qizf9cs0jdqpxwfg7gs74jdy9hp2v9h8q7vq6503l"; - } - # languages - { - name = "Go"; - publisher = "ms-vscode"; - version = "0.6.89"; - sha256 = "05mzw4bwsa9wxldnkdgk0b4n4xm8gzhmrbqy6j8lbk3p360wdg8z"; - } - { - name = "rust"; - publisher = "rust-lang"; - version = "0.4.10"; - sha256 = "1y7sb3585knv2pbq7vf2cjf3xy1fgzrqzn2h3fx2d2bj6ns6vpy3"; - } - { - name = "crates"; - publisher = "serayuzgur"; - version = "0.3.2"; - sha256 = "0xn24vghmcf8fi8cdgaa3f0npmkdr4fdn9y1g56l2fzrx2z4rw3q"; - } - { - name = "Kotlin"; - publisher = "mathiasfrohlich"; - version = "1.7.0"; - sha256 = "1d81rgfh1c1wkz4la0mmjj6k28if237f835diyk3z6n63cazapli"; - } - { - name = "java"; - publisher = "redhat"; - version = "0.31.0"; - sha256 = "1hzqiqkja4931k7rb4pmva6k80ss53nvyksiqvq6kxj25rg3kd1b"; - } - { - name = "vscode-java-debug"; - publisher = "vscjava"; - version = "0.13.0"; - sha256 = "11xvd1b0qsvrbm4yb0c7fm537p1gs6wz45xzl6v1a7k08dapi20i"; - } - { - name = "vscode-java-test"; - publisher = "vscjava"; - version = "0.9.0"; - sha256 = "0000v5qh100n3n529r1nzx79cawx83kvprrmhw6pb4j0m5b3p3p2"; - } - { - name = "gradle-language"; - publisher = "naco-siren"; - version = "0.2.3"; - sha256 = "15lzxvym0mkljjn57av1p4z6hqqwbsbn5idw2fn7nccgrl93aywf"; - } - { - name = "vscode-yaml"; - publisher = "redhat"; - version = "0.0.16"; - sha256 = "0v21qj65nrp850r0jmivmsm9y5i99ymxxm8ganzdia4vbv5hzx9r"; - } - { - name = "better-toml"; - publisher = "bungcip"; - version = "0.3.2"; - sha256 = "08lhzhrn6p0xwi0hcyp6lj9bvpfj87vr99klzsiy8ji7621dzql3"; - } - ] ++ [ - super.vscode-extensions.bbenoist.Nix - super.vscode-extensions.ms-python.python - # self.vscodeliveshare - ]; - }; }