diff --git a/home-manager/home.nix b/home-manager/home.nix index f0e599f..52d2d22 100644 --- a/home-manager/home.nix +++ b/home-manager/home.nix @@ -1,9 +1,10 @@ # vim: set expandtab tabstop=2 softtabstop=2 shiftwidth=2: -{ config, pkgs, ... }: +{ config, pkgs, lib, ... }: let unstable = import { config = { allowUnfree = true; }; }; + mypkgs = import ../mypkgs/default.nix; in { nixpkgs.config.allowUnfree = true; # Home Manager needs a bit of information about you and the paths it should @@ -19,7 +20,12 @@ in { # plain files is through 'home.file'. home.file = { ".profile" = { - source = ../.profile; + text = '' + export GTK_THEME=Adwaita:dark + export MOZ_USE_XINPUT2=1 + export XDG_DATA_DIRS=$XDG_DATA_DIRS:/usr/share:/var/lib/flatpak/exports/share:$HOME/.local/share/flatpak/exports/share + export QT_QPA_PLATFORM_PLUGIN_PATH="${pkgs.libsForQt5.qt5.qtbase.bin}/lib/qt-${pkgs.libsForQt5.qt5.qtbase.version}/plugins"; + ''; }; ".gitconfig" = { text = '' @@ -33,6 +39,9 @@ in { }; xdg.configFile = { + "starship.toml" = { + source = ../starship.toml; + }; "tmux/plugins/tpm" = { source = builtins.fetchGit { url = "https://github.com/tmux-plugins/tpm.git"; @@ -146,6 +155,7 @@ in { unstable._1password unstable._1password-gui pkgs.nix-index + pkgs.dua # Pwn pkgs.nmap @@ -195,7 +205,7 @@ in { pkgs.fastfetch pkgs.onefetch pkgs.lf # Terminal file manager - # pkgs.smassh # Typing test + pkgs.smassh # Typing test pkgs.you-get # YouTube video downloader pkgs.asciinema # Record terminal sessions pkgs.ulauncher # application launcher @@ -208,7 +218,11 @@ in { pkgs.adwaita-qt pkgs.adwaita-qt6 pkgs.firefox-devedition + mypkgs.thorium pkgs.wiki-tui + pkgs.asciiquarium + pkgs.starship + pkgs.patchelf # My version of BerkeleyMono NF is incomplete. Should add some fallback fonts. (pkgs.nerdfonts.override { fonts = [ @@ -347,6 +361,17 @@ in { programs.nushell = { enable = true; + configFile.source = ../nushell/config.nu; + envFile.source = ../nushell/env.nu; + extraConfig = '' + ''; + }; + + programs.direnv = { + enable = true; + enableZshIntegration = true; + enableNushellIntegration = true; + nix-direnv.enable = true; }; services.mpris-proxy.enable = true; diff --git a/mypkgs/default.nix b/mypkgs/default.nix new file mode 100644 index 0000000..a1c66ad --- /dev/null +++ b/mypkgs/default.nix @@ -0,0 +1,3 @@ +{ + thorium = import ./thorium/default.nix; +} diff --git a/mypkgs/thorium/default.nix b/mypkgs/thorium/default.nix new file mode 100644 index 0000000..7ac2b92 --- /dev/null +++ b/mypkgs/thorium/default.nix @@ -0,0 +1,65 @@ +with import {}; +pkgs.stdenv.mkDerivation rec { + name = "thorium-${version}"; + version = "124.0.6367.218"; + + src = pkgs.fetchurl { + url = "https://github.com/Alex313031/thorium/releases/download/M${version}/thorium-browser_${version}_AVX2.deb"; + hash = "sha256-nXz5ocZYDBWLIaARk8lN9LhP+7p8bEx+Kk+JAT2tG5c="; + }; + sourceRoot = "."; + unpackPhase = "dpkg-deb --fsys-tarfile ${src} | tar -x --no-same-owner"; + + nativeBuildInputs = [ + pkgs.dpkg + pkgs.autoPatchelfHook + pkgs.qt5.wrapQtAppsHook + pkgs.wrapGAppsHook + ]; + + buildInputs = with pkgs; [ + glib + libgcc + qt5.full + qt6.full + qt5.qtbase + cairo + at-spi2-atk + pango + cups + libGL + ]; + + dontConfigure = true; + dontBuild = true; + + installPhase= '' + runHook preInstall + + mkdir -p $out/bin + mkdir -p $out/share + cp -R usr/bin $out/ + cp -R usr/share $out/ + cp -R opt $out/ + substituteInPlace $out/share/applications/thorium-browser.desktop --replace /usr/bin/ $out/bin/ + substituteInPlace $out/share/applications/thorium-shell.desktop --replace /usr/bin/ $out/bin/ + substituteInPlace $out/share/applications/thorium-shell.desktop --replace /opt/ $out/opt/ + substituteInPlace $out/bin/thorium-shell --replace /opt/ $out/opt/ + + patchelf $out/opt/chromium.org/thorium/thorium --add-needed libGL.so.1 + + ln -fs $out/opt/chromium.org/thorium/thorium-browser $out/bin/thorium-browser + + runHook postInstall + ''; + + # preFixup = '' + # makeWrapperArgs+=("''${qtWrapperArgs[@]}") + # ''; + + meta = with lib; { + homepage = "https://thorium.rocks"; + description = "Web Browser"; + platforms = platforms.linux; + }; +} diff --git a/nushell/config.nu b/nushell/config.nu new file mode 100644 index 0000000..4b16c52 --- /dev/null +++ b/nushell/config.nu @@ -0,0 +1,3 @@ +use ~/.cache/starship/init.nu + +alias la = ls -la diff --git a/nushell/env.nu b/nushell/env.nu new file mode 100644 index 0000000..3937ca3 --- /dev/null +++ b/nushell/env.nu @@ -0,0 +1,2 @@ +mkdir ~/.cache/starship +starship init nu | save -f ~/.cache/starship/init.nu diff --git a/nvim/lua/config.lua b/nvim/lua/config.lua index e8170e8..a3280d9 100644 --- a/nvim/lua/config.lua +++ b/nvim/lua/config.lua @@ -473,6 +473,7 @@ local plugins = { { 'echasnovski/mini.trailspace', version = '*' }, { url = 'https://git.sr.ht/~whynothugo/lsp_lines.nvim' }, { 'glacambre/firenvim', build = ":call firenvim#install(0)" }, + { 'nushell/tree-sitter-nu' }, } require("lazy").setup(plugins, {}) @@ -671,6 +672,7 @@ lspconfig.nil_ls.setup { capabilities = capabilities } lspconfig.mojo.setup {} +lspconfig.nushell.setup {} capabilities.workspace = { didChangeWatchedFiles = { @@ -737,7 +739,7 @@ vim.keymap.set('i', '', 'ddi') vim.keymap.set('i', '', '^i') vim.keymap.set('i', '', 'ggVG') vim.keymap.set('n', '', 'ggVG') -vim.keymap.set('n', '`', 'splitterminali') +vim.keymap.set('n', '`', 'splitterminal bashi') vim.keymap.set('n', 'n', 'tabnew') vim.keymap.set('n', '', 'tabnext') vim.keymap.set('t', '', '', {noremap=true}) @@ -924,7 +926,7 @@ vim.keymap.set({ "n", "x", "o" }, "T", ts_repeat_move.builtin_T_expr, { expr = t vim.api.nvim_create_user_command('Backup', '!git add . && git commit -S -m "backup" && git push', {}) -vim.api.nvim_create_user_command('Config', 'e ~/.config/nvim', {}) +vim.api.nvim_create_user_command('Config', 'e ~/dotfiles/nvim', {}) require('Comment').setup() local str = require("cmp.utils.str") diff --git a/starship.toml b/starship.toml new file mode 100644 index 0000000..1ff9704 --- /dev/null +++ b/starship.toml @@ -0,0 +1,4 @@ +format = ''' +┌─[\[Ariel\]](bold purple)─[\[$directory\]](grey)─\[$cmd_duration\]─┤ +└─$symbol ''' +