Compare commits
2 Commits
f94278e96d
...
dc28b9a112
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dc28b9a112
|
||
|
|
d8d466e737
|
@@ -5,59 +5,21 @@
|
|||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
{
|
let
|
||||||
imports = [ ];
|
extensions_to_install =
|
||||||
|
final:
|
||||||
options.me = {
|
with final.vscode-extensions;
|
||||||
vscode.enable = lib.mkOption {
|
let
|
||||||
type = lib.types.bool;
|
common = [
|
||||||
default = false;
|
|
||||||
example = true;
|
|
||||||
description = "Whether we want to install vscode.";
|
|
||||||
};
|
|
||||||
|
|
||||||
vscode.enable_work_profile = lib.mkOption {
|
|
||||||
type = lib.types.bool;
|
|
||||||
default = false;
|
|
||||||
example = true;
|
|
||||||
description = "Whether we want to install the remote tunnels vscode extension.";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf (config.me.vscode.enable && config.me.graphical) {
|
|
||||||
allowedUnfree = [
|
|
||||||
"vscode"
|
|
||||||
"vscode-x86_64-unknown-linux-gnu-with-extensions"
|
|
||||||
"vscode-with-extensions"
|
|
||||||
"vscode-extension-ms-vscode-remote-remote-ssh"
|
|
||||||
"vscode-extension-MS-python-vscode-pylance"
|
|
||||||
];
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
(vscode-with-extensions.override {
|
|
||||||
vscodeExtensions =
|
|
||||||
with vscode-extensions;
|
|
||||||
(
|
|
||||||
[
|
|
||||||
bbenoist.nix
|
bbenoist.nix
|
||||||
ms-azuretools.vscode-docker
|
ms-azuretools.vscode-docker
|
||||||
ms-vscode-remote.remote-ssh
|
ms-vscode-remote.remote-ssh
|
||||||
esbenp.prettier-vscode
|
esbenp.prettier-vscode
|
||||||
]
|
];
|
||||||
++ (
|
work_specific = [
|
||||||
if config.me.vscode.enable_work_profile then
|
|
||||||
[
|
|
||||||
# ms-python.vscode-pylance
|
# ms-python.vscode-pylance
|
||||||
]
|
]
|
||||||
else
|
++ (pkgs.vscode-utils.extensionsFromVscodeMarketplace [
|
||||||
[
|
|
||||||
ms-python.python
|
|
||||||
ms-python.debugpy
|
|
||||||
]
|
|
||||||
)
|
|
||||||
++ (pkgs.vscode-utils.extensionsFromVscodeMarketplace (
|
|
||||||
if config.me.vscode.enable_work_profile then
|
|
||||||
[
|
|
||||||
{
|
{
|
||||||
name = "remote-server";
|
name = "remote-server";
|
||||||
publisher = "ms-vscode";
|
publisher = "ms-vscode";
|
||||||
@@ -88,12 +50,47 @@
|
|||||||
version = "2025.18.0";
|
version = "2025.18.0";
|
||||||
sha256 = "6auzfS1DmOuaqV2rDHSCC9BlrcON4xUrdJZ0N0wYCs4=";
|
sha256 = "6auzfS1DmOuaqV2rDHSCC9BlrcON4xUrdJZ0N0wYCs4=";
|
||||||
}
|
}
|
||||||
]
|
]);
|
||||||
|
personal_specific = [
|
||||||
|
ms-python.python
|
||||||
|
ms-python.debugpy
|
||||||
|
];
|
||||||
|
in
|
||||||
|
if config.me.vscode.enable_work_profile then
|
||||||
|
common ++ work_specific
|
||||||
else
|
else
|
||||||
[ ]
|
common ++ personal_specific;
|
||||||
))
|
in
|
||||||
);
|
{
|
||||||
})
|
imports = [ ];
|
||||||
|
|
||||||
|
options.me = {
|
||||||
|
vscode.enable = lib.mkOption {
|
||||||
|
type = lib.types.bool;
|
||||||
|
default = false;
|
||||||
|
example = true;
|
||||||
|
description = "Whether we want to install vscode.";
|
||||||
|
};
|
||||||
|
|
||||||
|
vscode.enable_work_profile = lib.mkOption {
|
||||||
|
type = lib.types.bool;
|
||||||
|
default = false;
|
||||||
|
example = true;
|
||||||
|
description = "Whether we want to install the remote tunnels vscode extension.";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf (config.me.vscode.enable && config.me.graphical) {
|
||||||
|
allowedUnfree = [
|
||||||
|
"vscode"
|
||||||
|
"vscode-x86_64-unknown-linux-gnu-with-extensions"
|
||||||
|
"vscode-with-extensions"
|
||||||
|
"vscode-extension-ms-vscode-remote-remote-ssh"
|
||||||
|
"vscode-extension-MS-python-vscode-pylance"
|
||||||
|
];
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
vscode-with-extensions
|
||||||
];
|
];
|
||||||
|
|
||||||
me.install.user.talexander.file = {
|
me.install.user.talexander.file = {
|
||||||
@@ -156,5 +153,25 @@
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
nixpkgs.overlays = [
|
||||||
|
(final: prev: {
|
||||||
|
vscode-with-extensions = (
|
||||||
|
prev.vscode-with-extensions.override {
|
||||||
|
vscodeExtensions = (extensions_to_install final);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
})
|
||||||
|
(final: prev: {
|
||||||
|
vscode-with-extensions = pkgs.symlinkJoin {
|
||||||
|
name = prev.vscode-with-extensions.name;
|
||||||
|
paths = [ prev.vscode-with-extensions ];
|
||||||
|
buildInputs = [ pkgs.makeWrapper ];
|
||||||
|
postBuild = ''
|
||||||
|
wrapProgram $out/bin/code --add-flags --password-store=gnome-libsecret
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
})
|
||||||
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
24
nix/steam_deck/configuration/flake.lock
generated
24
nix/steam_deck/configuration/flake.lock
generated
@@ -25,11 +25,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1757698511,
|
"lastModified": 1764998300,
|
||||||
"narHash": "sha256-UqHHGydF/q3jfYXCpvYLA0TWtvByOp1NwOKCUjhYmPs=",
|
"narHash": "sha256-fZatn/KLfHLDXnF0wy7JxXqGaZmGDTVufT4o/AOlj44=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "a3fcc92180c7462082cd849498369591dfb20855",
|
"rev": "27a6182347ccae90a88231ae0dc5dfa7d15815bb",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -61,11 +61,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1752054764,
|
"lastModified": 1762090880,
|
||||||
"narHash": "sha256-Ob/HuUhANoDs+nvYqyTKrkcPXf4ZgXoqMTQoCK0RFgQ=",
|
"narHash": "sha256-fbRQzIGPkjZa83MowjbD2ALaJf9y6KMDdJBQMKFeY/8=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nixGL",
|
"repo": "nixGL",
|
||||||
"rev": "a8e1ce7d49a149ed70df676785b07f63288f53c5",
|
"rev": "b6105297e6f0cd041670c3e8628394d4ee247ed5",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -76,16 +76,16 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1757746433,
|
"lastModified": 1763966396,
|
||||||
"narHash": "sha256-fEvTiU4s9lWgW7mYEU/1QUPirgkn+odUBTaindgiziY=",
|
"narHash": "sha256-6eeL1YPcY1MV3DDStIDIdy/zZCDKgHdkCmsrLJFiZf0=",
|
||||||
"owner": "nixos",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "6d7ec06d6868ac6d94c371458fc2391ded9ff13d",
|
"rev": "5ae3b07d8d6527c42f17c876e404993199144b6a",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nixos",
|
"owner": "NixOS",
|
||||||
"ref": "nixpkgs-unstable",
|
"ref": "nixos-unstable",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,6 +30,7 @@
|
|||||||
pkgs = import nixpkgs {
|
pkgs = import nixpkgs {
|
||||||
inherit system;
|
inherit system;
|
||||||
overlays = [ nixgl.overlay ];
|
overlays = [ nixgl.overlay ];
|
||||||
|
# Cannot set arch/tune with stand-alone home manager: https://github.com/nix-community/home-manager/issues/2954#issuecomment-1765433433
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
# pkgs = nixpkgs.legacyPackages.${system};
|
# pkgs = nixpkgs.legacyPackages.${system};
|
||||||
|
|||||||
Reference in New Issue
Block a user