From 58b9a395d79af02136495f2b8c54ac0a434bdc57 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Wed, 13 Dec 2023 11:55:20 -0700 Subject: [PATCH] [NixOS] Use home manager for vscode support --- nixos/flake.nix | 4 ++-- nixos/vscode.nix | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/nixos/flake.nix b/nixos/flake.nix index 195bf6ec..d937cfc9 100644 --- a/nixos/flake.nix +++ b/nixos/flake.nix @@ -144,7 +144,7 @@ mkConfig = args@ { system ? "x86_64-linux" - , baseModules ? [inputs.vscode-server.nixosModules.default] + , baseModules ? [] , modules ? [] , specialArgs ? {} , ... @@ -156,7 +156,7 @@ inherit inputs machineNames; makeEnable = (import ./make-enable.nix) nixpkgs.lib; mapValueToKeys = keys: value: builtins.listToAttrs (map (name: { inherit name value; }) keys); - realUsers = [ "root" "imalison" "kat" "dean" "alex" "will" ]; + realUsers = [ "root" "imalison" "kat" "dean" "alex" "will" "mike" ]; forEachUser = mapValueToKeys realUsers; keys = (import ./keys.nix); } // specialArgs; diff --git a/nixos/vscode.nix b/nixos/vscode.nix index 90a17f99..64a6c748 100644 --- a/nixos/vscode.nix +++ b/nixos/vscode.nix @@ -1,4 +1,7 @@ -{ config, makeEnable, ... }: +{ inputs, config, makeEnable, forEachUser, ... }: makeEnable config "modules.vscode" true { - services.vscode-server.enable = true; + imports = [inputs.vscode-server.homeModules.default]; + home-manager.users = forEachUser { + services.vscode-server.enable = true; + }; }