[feat] Add stuff

This commit is contained in:
Uttarayan Mondal
2024-03-03 00:57:19 +05:30
parent 07b07e11de
commit 6453f713a7
10 changed files with 165 additions and 124 deletions

View File

@@ -1,18 +1,15 @@
{ device, pkgs, ... }: { { device, pkgs, ... }: {
programs.firefox = { programs.firefox = {
enable = true; enable = device.isLinux;
# enable = device.isLinux;
profiles.default = { profiles.default = {
userChrome = userChrome = let
let
csshacks = pkgs.fetchFromGitHub { csshacks = pkgs.fetchFromGitHub {
owner = "MrOtherGuy"; owner = "MrOtherGuy";
repo = "firefox-csshacks"; repo = "firefox-csshacks";
rev = "master"; rev = "master";
sha256 = "sha256-r5CKOOcRWZQzYA9M6j7m2CAulOQItCuWsTSNGOYN87w="; sha256 = "sha256-r5CKOOcRWZQzYA9M6j7m2CAulOQItCuWsTSNGOYN87w=";
}; };
in in ''
''
@import url(${csshacks}/chrome/toolbars_below_content.css); @import url(${csshacks}/chrome/toolbars_below_content.css);
@import url(${csshacks}/chrome/scrollable_menupopups.css); @import url(${csshacks}/chrome/scrollable_menupopups.css);
@import url(${csshacks}/chrome/linux_gtk_window_control_patch.css); @import url(${csshacks}/chrome/linux_gtk_window_control_patch.css);
@@ -27,7 +24,8 @@
policies = { policies = {
ExtensionSettings = { ExtensionSettings = {
"uBlock0@raymondhill.net" = { "uBlock0@raymondhill.net" = {
install_url = "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi"; install_url =
"https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi";
installation_mode = "force_installed"; installation_mode = "force_installed";
}; };
}; };
@@ -37,10 +35,19 @@
FeatureRecommendations = false; FeatureRecommendations = false;
SkipOnboarding = true; SkipOnboarding = true;
Preferences = { Preferences = {
"toolkit.legacyUserProfileCustomizations.stylesheets" = { Value = true; Status = "default"; }; "toolkit.legacyUserProfileCustomizations.stylesheets" = {
Value = true;
Status = "default";
};
# "browser.compactmode.show" = { Value = true; Status = "default"; }; # "browser.compactmode.show" = { Value = true; Status = "default"; };
"browser.urlbar.suggest.calculator" = { Value = true; Status = "default"; }; "browser.urlbar.suggest.calculator" = {
"extensions.quarantinedDomains.enabled" = { Value = false; Status = "default"; }; Value = true;
Status = "default";
};
"extensions.quarantinedDomains.enabled" = {
Value = false;
Status = "default";
};
}; };
FirefoxHome = { FirefoxHome = {
"Search" = true; "Search" = true;

View File

@@ -3,7 +3,8 @@ let
start-tmux = (import ../scripts/start-tmux.nix) pkgs; start-tmux = (import ../scripts/start-tmux.nix) pkgs;
# https://mipmip.github.io/home-manager-option-search/ # https://mipmip.github.io/home-manager-option-search/
lazy = false; lazy = false;
in { in
{
imports = [ imports = [
# Include the results of the hardware scan. # Include the results of the hardware scan.
./tmux.nix ./tmux.nix
@@ -79,6 +80,22 @@ in {
# xdg.enable = true; # xdg.enable = true;
programs = { programs = {
helix = {
enable = true;
settings = {
theme = "base16";
editor = {
line-number = "relative";
lsp.display-messages = true;
};
keys.normal = {
space.space = "file_picker";
space.w = ":w";
space.q = ":q";
esc = [ "collapse_selection" "keep_primary_selection" ];
};
};
};
git = { git = {
enable = true; enable = true;
userName = "uttarayan21"; userName = "uttarayan21";
@@ -124,12 +141,14 @@ in {
enable = true; enable = true;
enableFishIntegration = true; enableFishIntegration = true;
enableNushellIntegration = true; enableNushellIntegration = true;
settings = let flavour = "mocha"; # Replace with your preferred palette settings =
let flavour = "mocha"; # Replace with your preferred palette
in { in {
# Other config here # Other config here
format = "$all"; # Remove this line to disable the default prompt format format = "$all"; # Remove this line to disable the default prompt format
palette = "catppuccin_${flavour}"; palette = "catppuccin_${flavour}";
} // builtins.fromTOML (builtins.readFile (pkgs.fetchFromGitHub { } // builtins.fromTOML (builtins.readFile (pkgs.fetchFromGitHub
{
owner = "catppuccin"; owner = "catppuccin";
repo = "starship"; repo = "starship";
rev = "main"; # Replace with the latest commit hash rev = "main"; # Replace with the latest commit hash
@@ -162,7 +181,8 @@ in {
enable = true; enable = true;
config = { theme = "catppuccin"; }; config = { theme = "catppuccin"; };
themes = { themes = {
catppuccin = let flavor = "mocha"; catppuccin =
let flavor = "mocha";
in { in {
src = pkgs.fetchFromGitHub { src = pkgs.fetchFromGitHub {
owner = "catppuccin"; owner = "catppuccin";
@@ -184,7 +204,8 @@ in {
# Home Manager needs a bit of information about you and the paths it should # Home Manager needs a bit of information about you and the paths it should
# manage. # manage.
username = device.user; username = device.user;
homeDirectory = if device.isMac then homeDirectory =
if device.isMac then
lib.mkForce "/Users/${device.user}" lib.mkForce "/Users/${device.user}"
else else
lib.mkForce "/home/${device.user}"; lib.mkForce "/home/${device.user}";

View File

@@ -103,23 +103,15 @@
}; };
extraPlugins = extraPlugins =
let
comfortable-motion = pkgs.fetchFromGitHub {
owner = "yuttie";
repo = "comfortable-motion.vim";
rev = "master";
sha256 = "sha256-S1LJXmShhpCJIg/FEPx3jFbmPpS/1U4MAQN2RY/nkI0";
};
in
[ [
comfortable-motion pkgs.vimPlugins.comfortable-motion
pkgs.vimPlugins.vim-abolish pkgs.vimPlugins.vim-abolish
pkgs.vimPlugins.telescope-nvim pkgs.vimPlugins.telescope-nvim
pkgs.vimPlugins.telescope-ui-select-nvim pkgs.vimPlugins.telescope-ui-select-nvim
pkgs.vimPlugins.telescope-fzf-native-nvim pkgs.vimPlugins.telescope-fzf-native-nvim
pkgs.vimPlugins.telescope-file-browser-nvim pkgs.vimPlugins.telescope-file-browser-nvim
pkgs.vimPlugins.telescope-dap-nvim pkgs.vimPlugins.telescope-dap-nvim
pkgs.vimPlugins.rustaceanvim # pkgs.vimPlugins.rustaceanvim
# lsp stuff # lsp stuff
pkgs.vimPlugins.nvim-cmp pkgs.vimPlugins.nvim-cmp
@@ -134,6 +126,7 @@
pkgs.vimPlugins.copilot-lua pkgs.vimPlugins.copilot-lua
pkgs.vimPlugins.lsp-zero-nvim pkgs.vimPlugins.lsp-zero-nvim
pkgs.vimPlugins.trouble-nvim pkgs.vimPlugins.trouble-nvim
pkgs.vimPlugins.nvim-web-devicons
pkgs.vimPlugins.rest-nvim pkgs.vimPlugins.rest-nvim

View File

@@ -19,6 +19,7 @@ require('telescope').load_extension("file_browser")
vim.g.rustaceanvim = { vim.g.rustaceanvim = {
server = { server = {
capabilities = require 'lsp-zero'.get_capabilities(),
on_attach = function(client, bufnr) on_attach = function(client, bufnr)
if client.server_capabilities.inlayHintProvider then if client.server_capabilities.inlayHintProvider then
vim.lsp.inlay_hint.enable(bufnr, true) vim.lsp.inlay_hint.enable(bufnr, true)

View File

@@ -19,7 +19,8 @@ let
tmux popup -d '#{pane_current_path}' -xC -yC -w$width -h$height -E "tmux attach -t scratch || tmux new -s scratch" tmux popup -d '#{pane_current_path}' -xC -yC -w$width -h$height -E "tmux attach -t scratch || tmux new -s scratch"
fi fi
''; '';
in { in
{
programs.tmux = { programs.tmux = {
enable = true; enable = true;
shell = "${pkgs.nushellFull}/bin/nu"; shell = "${pkgs.nushellFull}/bin/nu";
@@ -37,7 +38,7 @@ in {
plugin = tmuxPlugins.catppuccin; plugin = tmuxPlugins.catppuccin;
extraConfig = '' extraConfig = ''
set -g @catppuccin_flavour 'mocha' set -g @catppuccin_flavour 'mocha'
set -g @catppuccin_window_default_text "" set -g @catppuccin_window_default_text ''''''
''; '';
} }
{ {
@@ -53,6 +54,10 @@ in {
set -g allow-passthrough on set -g allow-passthrough on
set -ga update-environment TERM set -ga update-environment TERM
set -ga update-environment TERM_PROGRAM set -ga update-environment TERM_PROGRAM
set-option -sg escape-time 10
set-option -sa terminal-features ',xterm-256color:RGB'
bind h select-pane -L bind h select-pane -L
bind j select-pane -D bind j select-pane -D

View File

@@ -1,4 +1,4 @@
{ pkgs, ... }: { { pkgs, device, ... }: {
imports = [ ./yabai.nix ./skhd.nix ]; imports = [ ./yabai.nix ./skhd.nix ];
environment.systemPackages = with pkgs; [ nix neovim ]; environment.systemPackages = with pkgs; [ nix neovim ];

View File

@@ -1,10 +1,14 @@
{ devices, inputs, overlays, home-manager, nix-darwin, ... }: { devices, inputs, overlays, home-manager, nix-darwin, ... }:
builtins.listToAttrs (builtins.map (device: { builtins.listToAttrs (builtins.map
(device: {
name = device.name; name = device.name;
value = nix-darwin.lib.darwinSystem { value = nix-darwin.lib.darwinSystem {
system = device.system; system = device.system;
modules = [ modules = [
{ nixpkgs.overlays = overlays; } {
nixpkgs.overlays = overlays;
# nixpkgs.hostPlatform.config = device.system;
}
./configuration.nix ./configuration.nix
home-manager.darwinModules.home-manager home-manager.darwinModules.home-manager
{ {
@@ -21,4 +25,5 @@ builtins.listToAttrs (builtins.map (device: {
} }
]; ];
}; };
}) devices) })
devices)

60
config/nix/flake.lock generated
View File

@@ -102,11 +102,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1706473964, "lastModified": 1708794349,
"narHash": "sha256-Fq6xleee/TsX6NbtoRuI96bBuDHMU57PrcK9z1QEKbk=", "narHash": "sha256-jX+B1VGHT0ruHHL5RwS8L21R6miBn4B6s9iVyUJsJJY=",
"owner": "ipetkov", "owner": "ipetkov",
"repo": "crane", "repo": "crane",
"rev": "c798790eabec3e3da48190ae3698ac227aab770c", "rev": "2c94ff9a6fbeb9f3ea0107f28688edbe9c81deaa",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -527,11 +527,11 @@
"rust-overlay": "rust-overlay_3" "rust-overlay": "rust-overlay_3"
}, },
"locked": { "locked": {
"lastModified": 1709065223, "lastModified": 1709290301,
"narHash": "sha256-7zuh1ait7C6OAVfhl5fVloxrAc0WJBxEOu1XqPhlwI0=", "narHash": "sha256-0dpic4xWnPHqZrsRTVGrjw+5J1XjgHl/+Dw9XjvDC0o=",
"owner": "JakeStanger", "owner": "JakeStanger",
"repo": "ironbar", "repo": "ironbar",
"rev": "149b57a73701af9d430ddf97252c6cc72074b2d2", "rev": "3df01ea93a27ba80e2be8c3fe832903c3e7871d2",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -553,11 +553,11 @@
"rust-overlay": "rust-overlay_4" "rust-overlay": "rust-overlay_4"
}, },
"locked": { "locked": {
"lastModified": 1709051793, "lastModified": 1709332019,
"narHash": "sha256-4FXFBq5mN1IwN18Fd2OEF1iCZV5PC40gP2L64oyq3xQ=", "narHash": "sha256-kJAoPvpVRO3WR1dCZQKJpUMYoyA/6u9iUDX9gGEkjGI=",
"owner": "nix-community", "owner": "nix-community",
"repo": "lanzaboote", "repo": "lanzaboote",
"rev": "e761c7ee47b64debc687d8bff7599d702c893dcc", "rev": "eeb45682dd4b2a921a3cab286f13101c9750d6bb",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -640,11 +640,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1709112925, "lastModified": 1709348262,
"narHash": "sha256-5y8Dhw1HYdc+BWv+qQjJUIwc+ByoudtoGaHEcrXYlXw=", "narHash": "sha256-eYTA1uZtYGFKrDOKiAz1wlE6aIC9WSdBNF8bSS818zM=",
"owner": "LnL7", "owner": "LnL7",
"repo": "nix-darwin", "repo": "nix-darwin",
"rev": "283d59778e6b8c41cac4bdeac5b2512d6de51150", "rev": "8a15cb36fffa0b5fbe31ef16ede0a479bef4b365",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -727,11 +727,11 @@
"nmt": "nmt" "nmt": "nmt"
}, },
"locked": { "locked": {
"lastModified": 1709216523, "lastModified": 1709294841,
"narHash": "sha256-8BaqUeMgwDBsXVpyE+AYVW7QBjR0DnsGnY0qZHdi9Ew=", "narHash": "sha256-jJTiD0nOk1p+QNJq+v4dUMx3cb/RQ/dm+Q0vNLr8Qvs=",
"owner": "nixneovim", "owner": "nixneovim",
"repo": "nixneovim", "repo": "nixneovim",
"rev": "eebce182253d8c665a8a19e0b056f6cfaf97872c", "rev": "1f5b2c9613674c8400d764d16823e0add12b6970",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -775,11 +775,11 @@
"poetry2nix": "poetry2nix_2" "poetry2nix": "poetry2nix_2"
}, },
"locked": { "locked": {
"lastModified": 1709216547, "lastModified": 1709240484,
"narHash": "sha256-BZcxoobO6CaJ4Y2CdEiiY1381G/LdUr82mjKXEftGow=", "narHash": "sha256-e7Azz4vD3ogyDbpfEbMunYjPOytBxvcwKblwkIu+Q+M=",
"owner": "NixNeovim", "owner": "NixNeovim",
"repo": "NixNeovimPlugins", "repo": "NixNeovimPlugins",
"rev": "acad18539f283314a9c5cd4dee8eb70dd782c663", "rev": "27a92496c702a58705b02193462811b00793ed3c",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -856,11 +856,11 @@
}, },
"nixpkgs_3": { "nixpkgs_3": {
"locked": { "locked": {
"lastModified": 1706683685, "lastModified": 1709200309,
"narHash": "sha256-FtPPshEpxH/ewBOsdKBNhlsL2MLEFv1hEnQ19f/bFsQ=", "narHash": "sha256-lKdtMbhnBNU1lr978T+wEYet3sfIXXgyiDZNEgx8CV8=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "5ad9903c16126a7d949101687af0aa589b1d7d3d", "rev": "ebe6e807793e7c9cc59cf81225fdee1a03413811",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -885,11 +885,11 @@
}, },
"nixpkgs_5": { "nixpkgs_5": {
"locked": { "locked": {
"lastModified": 1709150264, "lastModified": 1709237383,
"narHash": "sha256-HofykKuisObPUfj0E9CJVfaMhawXkYx3G8UIFR/XQ38=", "narHash": "sha256-cy6ArO4k5qTx+l5o+0mL9f5fa86tYUX3ozE1S+Txlds=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "9099616b93301d5cf84274b184a3a5ec69e94e08", "rev": "1536926ef5621b09bba54035ae2bb6d806d72ac8",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -934,11 +934,11 @@
}, },
"nur": { "nur": {
"locked": { "locked": {
"lastModified": 1709238329, "lastModified": 1709366185,
"narHash": "sha256-c3GRGuMceCIMt8JiVics4PWzoxnJO1fhThhGBesqRG0=", "narHash": "sha256-K8CZc7mWQ2p2UiCzi9WVuzuUgG4nZe+BwTb3S6AYAsg=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nur", "repo": "nur",
"rev": "04faed2bbb45869890824deb06ab315228ffe7b1", "rev": "a539b9e38cd2604dae50937d80f181cca533a462",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -1097,11 +1097,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1706667075, "lastModified": 1709172595,
"narHash": "sha256-KBI5jcOWh9nsOFWj2SRq7vj+fPDf8Do8ceL582kFA70=", "narHash": "sha256-0oYeE5VkhnPA7YBl+0Utq2cYoHcfsEhSGwraCa27Vs8=",
"owner": "oxalica", "owner": "oxalica",
"repo": "rust-overlay", "repo": "rust-overlay",
"rev": "2c993daf3136c6955fd13bfe215d0d4faf6090f1", "rev": "72fa0217f76020ad3aeb2dd9dd72490905b23b6f",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@@ -142,20 +142,28 @@
inputs.anyrun-nixos-options.packages.${prev.system}.default; inputs.anyrun-nixos-options.packages.${prev.system}.default;
anyrun-rink = inputs.anyrun-rink.packages.${prev.system}.default; anyrun-rink = inputs.anyrun-rink.packages.${prev.system}.default;
}; };
# postman-overlay = final: prev: {
# postman = prev.postman.overrideAttrs (old: rec { vimPlugins = final: prev: {
# version = "20230716100528"; vimPlugins =
# src = final.fetchurl { prev.vimPlugins
# url = //
# "https://dl.pstmn.io/download/latest/osx_arm64"; {
# sha256 = "sha256-P7x06KKH0e1Yro93SCEJyiWS/Uv25tWU8A85vxv85hI="; comfortable-motion = final.pkgs.vimUtils.buildVimPlugin {
# name = "${old.pname}-${version}.tar.gz"; name = "comfortable-motion";
# }; src = final.pkgs.fetchFromGitHub {
# }); owner = "yuttie";
# }; repo = "comfortable-motion.vim";
rev = "master";
sha256 = "sha256-S1LJXmShhpCJIg/FEPx3jFbmPpS/1U4MAQN2RY/nkI0";
};
};
};
};
overlays = [ overlays = [
inputs.neovim-nightly-overlay.overlay inputs.neovim-nightly-overlay.overlay
anyrun-overlay anyrun-overlay
vimPlugins
inputs.nixneovim.overlays.default inputs.nixneovim.overlays.default
inputs.nixneovimplugins.overlays.default inputs.nixneovimplugins.overlays.default
nur.overlay nur.overlay

View File

@@ -98,7 +98,8 @@
fish fish
nushellFull nushellFull
(pkgs.wrapFirefox (pkgs.wrapFirefox
(pkgs.firefox-unwrapped.override { pipewireSupport = true; }) { }) (pkgs.firefox-unwrapped.override { pipewireSupport = true; })
{ })
gnumake gnumake
python3 python3
(nerdfonts.override { fonts = [ "FiraCode" "Hasklig" ]; }) (nerdfonts.override { fonts = [ "FiraCode" "Hasklig" ]; })