Setup WSL Host

This commit is contained in:
2025-01-21 04:32:14 +00:00
commit c7bcd25914
8 changed files with 183 additions and 0 deletions

13
nix/users/luca/git.nix Executable file
View File

@@ -0,0 +1,13 @@
{
enable = true;
userName = "rocketcamel";
userEmail = "luca_lise@icloud.com";
extraConfig = {
init = {
defaultBranch = "main";
};
commit.gpgsign = true;
gpg.format = "ssh";
user.signingkey = "~/.ssh/commits.id_rsa.pub";
};
}

53
nix/users/luca/helix.nix Executable file
View File

@@ -0,0 +1,53 @@
{ pkgs, ... }:
{
enable = true;
languages.language = [
{
name = "nix";
auto-format = true;
formatter.command = "${pkgs.nixfmt}/bin/nixfmt";
}
{
name = "typescript";
auto-format = true;
formatter = {
command = "${pkgs.nodePackages_latest.prettier}/bin/prettier";
args = [ "--parser" "typescript" ];
};
}
{
name = "tsx";
auto-format = true;
formatter = {
command = "${pkgs.nodePackages_latest.prettier}/bin/prettier";
args = [ "--parser" "typescript" ];
};
}
];
settings = {
theme = "rose_pine";
editor = {
true-color = true;
line-number = "relative";
lsp.display-messages = true;
cursor-shape = {
insert = "block";
normal = "block";
};
};
keys.normal = {
space.q = ":q";
w = [ "move_next_word_start" "move_char_right" "collapse_selection" ];
b = [ "move_prev_word_start" "collapse_selection" ];
i = [ "insert_mode" "collapse_selection" ];
a = [ "append_mode" "collapse_selection" ];
};
};
themes = {
rose_pine = {
inherits = "rose_pine";
"ui.background" = "transparent";
};
};
}

25
nix/users/luca/home.nix Executable file
View File

@@ -0,0 +1,25 @@
{ config, pkgs, ... }:
{
home.username = "luca";
home.homeDirectory = "/home/luca";
programs = {
git = import ./git.nix;
zsh = import ./zsh.nix;
tmux = import ./tmux.nix { inherit pkgs; };
helix = import ./helix.nix { inherit pkgs; };
};
home.packages = with pkgs; [
nodePackages_latest.typescript-language-server
nodejs_22
pnpm
gh
oh-my-posh
];
home.stateVersion = "24.11";
programs.home-manager.enable = true;
}

16
nix/users/luca/tmux.nix Executable file
View File

@@ -0,0 +1,16 @@
{ pkgs, ... }:
{
enable = true;
prefix = "C-Space";
mouse = true;
baseIndex = 1;
sensibleOnTop = true;
keyMode = "vi";
plugins = with pkgs; [{ plugin = tmuxPlugins.tokyo-night-tmux; }];
extraConfig = ''
bind -n M-H previous-window
bind -n M-L next-window
'';
escapeTime = 0;
}

9
nix/users/luca/zsh.nix Normal file
View File

@@ -0,0 +1,9 @@
{
enable = true;
enableCompletion = true;
autosuggestion.enable = true;
envExtra = ''
. "$HOME/.rokit/env"
eval "$(oh-my-posh init zsh -c ~/.config/ohmyposh/zen.toml)"
'';
}