Merge branch 'main' of ssh://git.trivernis.net:22321/Trivernis/dotfiles-silo

main
trivernis 9 months ago
commit ea84a03206
Signed by: Trivernis
GPG Key ID: 7E6D18B61C8D2F4B

@ -6,9 +6,13 @@ args = ["lsp-proxy"]
command = "roc_lang_server" command = "roc_lang_server"
args = [] args = []
[language-server.graphql-language-service]
command = "graphql-lsp"
args = ["server", "-m", "stream"]
[[language]] [[language]]
name = "typescript" name = "typescript"
language-servers = ["typescript-language-server", "biome"] language-servers = ["typescript-language-server", "biome", "graphql-language-service"]
auto-format = true auto-format = true
formatter = { command = "biome" , args = ["format", "--stdin-file-path=file.ts"] } formatter = { command = "biome" , args = ["format", "--stdin-file-path=file.ts"] }

@ -0,0 +1,62 @@
{ config, pkgs, ... }: {
home.username = "{{ctx.username}}";
home.homeDirectory = "{{dirs.home}}";
home.stateVersion = "23.11";
home.packages = with pkgs; [
# core cli tools
nushell
starship
wezterm
helix
zellij
broot
bottom
thefuck
hyperfine
most
direnv
htop
neofetch
# common tools
librewolf
spotify
# other dev tools
insomnia
# fonts
fontconfig
(nerdfonts.override {
fonts = ["FiraCode"];
})
lexend
joypixels
# nodejs packages
nodejs
yarn
biome
nodePackages.typescript-language-server
nodePackages.get-graphql-schema
# java packages
jdk
kotlin
kotlin-language-server
jdt-language-server
gradle
# rust packages
rustup
cargo-edit
cargo-release
cargo-lambda
];
fonts.fontconfig.enable = true;
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;
}

@ -0,0 +1,4 @@
{
allowUnfree = true;
joypixels.acceptLicense = true;
}

@ -1,4 +0,0 @@
{pkgs, ... }: {
targets.genericLinux.enable = true;
home.packages = [ pkgs.jdk8 ];
}

@ -12,7 +12,7 @@ alias fuck = with-env {TF_ALIAS: "fuck", PYTHONIOENCODING: "utf-8"} {
{{#if flags.unix}} {{#if flags.unix}}
alias `shx` = sudo -E helix -c '{{dirs.config}}/helix/config.toml' alias `shx` = sudo -E helix -c '{{dirs.config}}/helix/config.toml'
{{/if}} {{/if}}
{{#if-installed nix}}
export def `silo cd` [] { alias devshell = nix develop -c $env.SHELL
silo repo | cd $in {{/if-installed}}
} def `silo cd` [] { silo repo | cd $in }

@ -187,8 +187,14 @@ $env.config = {
}] }]
env_change: { env_change: {
PWD: [{|before, after| PWD: [{|before, after|
null # replace with source code to run if the PWD environment is different since the last repl input {{#if-installed direnv}}
}] if (which direnv | is-empty) {
return
}
direnv export json | from json | default {} | load-env
{{/if-installed}}
}]
} }
} }
menus: [ menus: [

@ -0,0 +1,29 @@
# if running bash
if [ -n "$BASH_VERSION" ]; then
# include .bashrc if it exists
if [ -f "$HOME/.bashrc" ]; then
. "$HOME/.bashrc"
fi
fi
# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
PATH="$HOME/bin:$PATH"
fi
# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/.local/bin" ] ; then
PATH="$HOME/.local/bin:$PATH"
fi
. "$HOME/.cargo/env"
# Nix
if [ -e '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh' ]; then
. '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh'
fi
if [ -e '$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh' ]; then
. '$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh'
fi
export XDG_DATA_DIRS=$HOME/.nix-profile/share:$HOME/.share:"${XDG_DATA_DIRS:-/usr/local/share/:/usr/share/}"
# End Nix

@ -0,0 +1,29 @@
def after_apply_all [] {
if not ('~/.nix-profile/bin/home-manager' | path exists) {
print $"(ansi red)home-manager is not installed(ansi reset)"
return
}
if (ha-chksum) == $env.SILO_HA_CHKSUM? {
print $"(ansi green)home-manager configuration unchanged(ansi reset)"
return;
}
print "Updating with home-manager"
( home-manager switch )
print "Expiring old home manager configurations"
( home-manager expire-generations -1 days )
print "Cleaning nix store"
( nix-store --gc )
ignore
}
def --env before_apply_all [] {
$env.SILO_HA_CHKSUM = (ha-chksum)
}
def ha-chksum [] {
shasum ~/.config/home-manager/home.nix
}
Loading…
Cancel
Save