formatting
This commit is contained in:
parent
bc3f697cff
commit
805508b5ff
3 changed files with 67 additions and 54 deletions
|
|
@ -98,7 +98,7 @@
|
|||
# Export your module system for use in other flakes
|
||||
nixosModules = {
|
||||
default = ./modules/nixos;
|
||||
osbm = ./modules/nixos; # Alias with your name
|
||||
osbm = ./modules/nixos; # Alias with your name
|
||||
};
|
||||
|
||||
# If you also want to export home-manager modules
|
||||
|
|
|
|||
|
|
@ -5,52 +5,54 @@
|
|||
...
|
||||
}:
|
||||
{
|
||||
config = (lib.mkIf config.osbmModules.services.vscode-server.enable {
|
||||
services.code-server = {
|
||||
# only true if the machine is not pochita
|
||||
enable = config.networking.hostName != "pochita";
|
||||
port = 4444;
|
||||
disableTelemetry = true;
|
||||
disableUpdateCheck = true;
|
||||
user = "osbm";
|
||||
group = "users";
|
||||
# auth = "none";
|
||||
host = "${config.networking.hostName}.curl-boga.ts.net";
|
||||
hashedPassword = "$argon2i$v=19$m=4096,t=3,p=1$dGc0TStGMDNzSS9JRkJYUFp3d091Q2p0bXlzPQ$zvdE9BkclkJmyFaenzPy2E99SEqsyDMt4IQNZfcfFFQ";
|
||||
package = pkgs.vscode-with-extensions.override {
|
||||
vscode = pkgs.code-server;
|
||||
vscodeExtensions =
|
||||
with pkgs.vscode-extensions;
|
||||
[
|
||||
bbenoist.nix
|
||||
catppuccin.catppuccin-vsc
|
||||
catppuccin.catppuccin-vsc-icons
|
||||
charliermarsh.ruff
|
||||
davidanson.vscode-markdownlint
|
||||
esbenp.prettier-vscode
|
||||
foxundermoon.shell-format
|
||||
github.copilot
|
||||
github.vscode-github-actions
|
||||
github.vscode-pull-request-github
|
||||
jnoortheen.nix-ide
|
||||
kamadorueda.alejandra
|
||||
ms-azuretools.vscode-docker
|
||||
ms-python.python
|
||||
# ms-vscode-remote.remote-ssh
|
||||
timonwong.shellcheck
|
||||
tyriar.sort-lines
|
||||
]
|
||||
++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [
|
||||
{
|
||||
# Available in nixpkgs, but outdated (0.4.0) at the time of adding
|
||||
name = "vscode-tailscale";
|
||||
publisher = "tailscale";
|
||||
sha256 = "sha256-MKiCZ4Vu+0HS2Kl5+60cWnOtb3udyEriwc+qb/7qgUg=";
|
||||
version = "1.0.0";
|
||||
}
|
||||
];
|
||||
config = (
|
||||
lib.mkIf config.osbmModules.services.vscode-server.enable {
|
||||
services.code-server = {
|
||||
# only true if the machine is not pochita
|
||||
enable = config.networking.hostName != "pochita";
|
||||
port = 4444;
|
||||
disableTelemetry = true;
|
||||
disableUpdateCheck = true;
|
||||
user = "osbm";
|
||||
group = "users";
|
||||
# auth = "none";
|
||||
host = "${config.networking.hostName}.curl-boga.ts.net";
|
||||
hashedPassword = "$argon2i$v=19$m=4096,t=3,p=1$dGc0TStGMDNzSS9JRkJYUFp3d091Q2p0bXlzPQ$zvdE9BkclkJmyFaenzPy2E99SEqsyDMt4IQNZfcfFFQ";
|
||||
package = pkgs.vscode-with-extensions.override {
|
||||
vscode = pkgs.code-server;
|
||||
vscodeExtensions =
|
||||
with pkgs.vscode-extensions;
|
||||
[
|
||||
bbenoist.nix
|
||||
catppuccin.catppuccin-vsc
|
||||
catppuccin.catppuccin-vsc-icons
|
||||
charliermarsh.ruff
|
||||
davidanson.vscode-markdownlint
|
||||
esbenp.prettier-vscode
|
||||
foxundermoon.shell-format
|
||||
github.copilot
|
||||
github.vscode-github-actions
|
||||
github.vscode-pull-request-github
|
||||
jnoortheen.nix-ide
|
||||
kamadorueda.alejandra
|
||||
ms-azuretools.vscode-docker
|
||||
ms-python.python
|
||||
# ms-vscode-remote.remote-ssh
|
||||
timonwong.shellcheck
|
||||
tyriar.sort-lines
|
||||
]
|
||||
++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [
|
||||
{
|
||||
# Available in nixpkgs, but outdated (0.4.0) at the time of adding
|
||||
name = "vscode-tailscale";
|
||||
publisher = "tailscale";
|
||||
sha256 = "sha256-MKiCZ4Vu+0HS2Kl5+60cWnOtb3udyEriwc+qb/7qgUg=";
|
||||
version = "1.0.0";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
networking.firewall.allowedTCPPorts = [ config.services.code-server.port ];
|
||||
});
|
||||
networking.firewall.allowedTCPPorts = [ config.services.code-server.port ];
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,15 +1,26 @@
|
|||
# impermanence
|
||||
{lib, inputs, config, ...}:
|
||||
# impermanence
|
||||
{
|
||||
lib,
|
||||
inputs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
# Filter out 'root' from the users list since it's a special system user
|
||||
regularUsers = builtins.filter (u: u != "root") config.osbmModules.users;
|
||||
|
||||
|
||||
# Generate user persistence configuration
|
||||
userPersistence = lib.genAttrs regularUsers (username: {
|
||||
directories = [
|
||||
"Documents"
|
||||
{ directory = ".gnupg"; mode = "0700"; }
|
||||
{ directory = ".ssh"; mode = "0700"; }
|
||||
{
|
||||
directory = ".gnupg";
|
||||
mode = "0700";
|
||||
}
|
||||
{
|
||||
directory = ".ssh";
|
||||
mode = "0700";
|
||||
}
|
||||
".local/share/direnv"
|
||||
];
|
||||
# files = [
|
||||
|
|
@ -40,4 +51,4 @@ in
|
|||
};
|
||||
})
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue