From 7078610410f4d14a734c3d1ef8db99910e257148 Mon Sep 17 00:00:00 2001 From: Dmitriy Kholkin Date: Tue, 7 Sep 2021 09:50:47 +0300 Subject: [PATCH] move vscode to home-manager --- modules/applications/packages.nix | 2 +- modules/applications/vscode.nix | 66 ++++++++++++------------------- modules/overlay.nix | 19 +++++++-- 3 files changed, 43 insertions(+), 44 deletions(-) diff --git a/modules/applications/packages.nix b/modules/applications/packages.nix index 34cef3a..6c163af 100644 --- a/modules/applications/packages.nix +++ b/modules/applications/packages.nix @@ -79,7 +79,6 @@ with config.deviceSpecific; { spotifywm system-config-printer tdesktop - vscode xarchiver xfce4-14.thunar xfce4-14.xfce4-taskmanager @@ -90,6 +89,7 @@ with config.deviceSpecific; { # i3status-rust ] ++ lib.optionals (!(isVM || isISO)) [ # rust-stable + # rust-nightly libreoffice ] ++ lib.optionals isGaming [ lutris diff --git a/modules/applications/vscode.nix b/modules/applications/vscode.nix index eb031b3..7b09bde 100644 --- a/modules/applications/vscode.nix +++ b/modules/applications/vscode.nix @@ -4,48 +4,34 @@ let thm = config.lib.base16.theme; in { - # home-manager.users.alukard.home.file."tests/vscode/themes/thm.base16.json".source = - # thmFile { name = "vscode"; }; + home-manager.users.alukard = { + programs.vscode.enable = true; + # programs.vscode.package = pkgs.vscode-fhsWithPackages (ps: with ps; [ glibc ]); + programs.vscode.package = pkgs.vscode; + + home.file.".cache/wal/colors".text = '' + #${thm.base00-hex} + #${thm.base08-hex} + #${thm.base0B-hex} + #${thm.base0A-hex} + #${thm.base0D-hex} + #${thm.base0E-hex} + #${thm.base0C-hex} + #${thm.base05-hex} + #${thm.base03-hex} + #${thm.base08-hex} + #${thm.base0B-hex} + #${thm.base0A-hex} + #${thm.base0D-hex} + #${thm.base0E-hex} + #${thm.base0C-hex} + #${thm.base07-hex} + ''; + }; - # Support Wal color theme - # home-manager.users.alukard.home.file.".cache/wal/colors".text = '' - # #${thm.base00-hex} - # #${thm.base08-hex} - # #${thm.base0B-hex} - # #${thm.base0A-hex} - # #${thm.base0D-hex} - # #${thm.base0E-hex} - # #${thm.base0C-hex} - # #${thm.base05-hex} - # #${thm.base03-hex} - # #${thm.base09-hex} - # #${thm.base01-hex} - # #${thm.base02-hex} - # #${thm.base04-hex} - # #${thm.base06-hex} - # #${thm.base0F-hex} - # #${thm.base07-hex} - # ''; defaultApplications.editor = { cmd = "${pkgs.vscode}/bin/code"; + # cmd = "${pkgs.vscode-fhs}/bin/code"; desktop = "code"; }; - home-manager.users.alukard.home.file.".cache/wal/colors".text = '' - #${thm.base00-hex} - #${thm.base08-hex} - #${thm.base0B-hex} - #${thm.base0A-hex} - #${thm.base0D-hex} - #${thm.base0E-hex} - #${thm.base0C-hex} - #${thm.base05-hex} - #${thm.base03-hex} - #${thm.base08-hex} - #${thm.base0B-hex} - #${thm.base0A-hex} - #${thm.base0D-hex} - #${thm.base0E-hex} - #${thm.base0C-hex} - #${thm.base07-hex} - ''; -} \ No newline at end of file +} diff --git a/modules/overlay.nix b/modules/overlay.nix index 029f680..fe63c87 100644 --- a/modules/overlay.nix +++ b/modules/overlay.nix @@ -29,6 +29,7 @@ in bibata-cursors = pkgs.callPackage ./packages/bibata-cursors.nix { }; foliate = pkgs.callPackage ./packages/foliate.nix { }; vscode = master.vscode; + vscode-fhs = master.vscode-fhs; vivaldi = master.vivaldi; multimc = super.multimc.overrideAttrs (stable: rec { version = "unstable-cracked"; @@ -63,6 +64,13 @@ in "rustfmt-preview" ]; }; + rust-nightly = pkgs.latest.rustChannels.nightly.rust.override { + extensions = [ + "rls-preview" + "clippy-preview" + "rustfmt-preview" + ]; + }; # material-icons = pkgs.callPackage ./packages/material-icons-inline.nix { }; # wpgtk = super.wpgtk.overrideAttrs (stable: rec { # propagatedBuildInputs = with pkgs; [ @@ -79,7 +87,12 @@ in android_sdk.accept_license = true; }; - home-manager.users.alukard.xdg.configFile."nixpkgs/config.nix".text = '' - { allowUnfree = true; } - ''; + home-manager.users.alukard = { + nixpkgs.config = { + allowUnfree = true; + }; + xdg.configFile."nixpkgs/config.nix".text = '' + { allowUnfree = true; } + ''; + }; }