28 Commits

Author SHA1 Message Date
97ed5eb33b switch from homebrew to firefox overlay for macos 2022-11-23 15:46:30 -07:00
d672a77ddb fix alt-e in fish for kitty 2022-11-23 14:37:57 -07:00
52f9057ee5 unused n8n setup 2022-11-21 01:04:38 +00:00
7ddd9d9aa4 add discord to macos dock 2022-11-20 12:12:18 -07:00
b9ddaf095c replace alacritty with kitty in macos dock 2022-11-20 12:09:03 -07:00
f304392d58 fix: victormono italic glitch on macos 2022-11-20 11:55:11 -07:00
3beacf9f3c adjust k9s toggleterm keybind 2022-11-20 11:52:33 -07:00
44c4084b57 fix: tfvars recognized as terraform 2022-11-20 11:51:46 -07:00
42237eab13 fix: aerc doesn't recognize config file 2022-11-20 11:38:10 -07:00
2848ae9424 switch kitty to victormono font 2022-11-19 19:40:04 -07:00
a6f9b985fc Revert "force neovim fish shell in toggleterm"
This reverts commit d1f12671b0.
2022-11-19 19:12:04 -07:00
d1f12671b0 force neovim fish shell in toggleterm 2022-11-19 19:12:01 -07:00
30f9f869a7 force fish shell for kitty 2022-11-19 19:11:26 -07:00
e1fc3317b5 adjust aws package layout 2022-11-18 22:35:00 -05:00
07b5f855a6 disable firefox autofill 2022-11-16 15:52:24 -05:00
5178c9f458 fix colorscheme for macbook 2022-11-16 15:52:00 -05:00
2ab37d3298 move noisetorch to linux audio 2022-11-14 10:35:36 -05:00
0176b14350 move qr to nautilusg 2022-11-14 10:35:16 -05:00
8342746b69 fix wsl with new theme 2022-11-10 04:26:38 +00:00
2340b862e5 add noisetorch for mic noise suppression 2022-11-07 20:54:01 -05:00
b04c442c87 replace rnix lsp with nil 2022-11-07 08:04:29 -05:00
5bbba2be39 set back to dark mode default 2022-11-05 19:38:43 -04:00
c871f59791 fixes for light mode 2022-11-05 13:41:09 -04:00
4ea56b0aab fix: remove bell sounds from kitty 2022-11-03 21:20:29 -04:00
7ae0649456 nixpkgs shortcut registries 2022-11-03 11:26:31 -04:00
660ea997df fix standalone home-manager on macos 2022-11-03 11:25:58 -04:00
15f4116178 fixes for kitty on macos 2022-11-03 11:25:36 -04:00
9386008fa2 fix: identity file wrong path on macos 2022-11-03 11:24:03 -04:00
27 changed files with 205 additions and 101 deletions

41
flake.lock generated
View File

@ -21,6 +21,24 @@
"type": "github" "type": "github"
} }
}, },
"firefox-darwin": {
"inputs": {
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1668992358,
"narHash": "sha256-24iH+wIbE1bKCFmqslwOpfrDypJ40mk1uGIqRUxDXxY=",
"owner": "bandithedoge",
"repo": "nixpkgs-firefox-darwin",
"rev": "066d4fd658acd075b45405eda9e3bca6a71a47b1",
"type": "github"
},
"original": {
"owner": "bandithedoge",
"repo": "nixpkgs-firefox-darwin",
"type": "github"
}
},
"flake-compat": { "flake-compat": {
"flake": false, "flake": false,
"locked": { "locked": {
@ -111,6 +129,22 @@
} }
}, },
"nixpkgs": { "nixpkgs": {
"locked": {
"lastModified": 1639237670,
"narHash": "sha256-RTdL4rEQcgaZGpvtDgkp3oK/V+1LM3I53n0ACPSroAQ=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "edfb969386ebe6c3cf8f878775a7975cd88f926d",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "master",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1666959691, "lastModified": 1666959691,
"narHash": "sha256-TRpWA3t8ata79HOGtFd5dDCl1kJQmIE16PDF53/Hcxo=", "narHash": "sha256-TRpWA3t8ata79HOGtFd5dDCl1kJQmIE16PDF53/Hcxo=",
@ -126,7 +160,7 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_2": { "nixpkgs_3": {
"locked": { "locked": {
"lastModified": 1660318005, "lastModified": 1660318005,
"narHash": "sha256-g9WCa9lVUmOV6dYRbEPjv/TLOR5hamjeCcKExVGS3OQ=", "narHash": "sha256-g9WCa9lVUmOV6dYRbEPjv/TLOR5hamjeCcKExVGS3OQ=",
@ -159,9 +193,10 @@
"root": { "root": {
"inputs": { "inputs": {
"darwin": "darwin", "darwin": "darwin",
"firefox-darwin": "firefox-darwin",
"home-manager": "home-manager", "home-manager": "home-manager",
"nixos-generators": "nixos-generators", "nixos-generators": "nixos-generators",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs_2",
"nur": "nur", "nur": "nur",
"wallpapers": "wallpapers", "wallpapers": "wallpapers",
"wsl": "wsl" "wsl": "wsl"
@ -202,7 +237,7 @@
"inputs": { "inputs": {
"flake-compat": "flake-compat", "flake-compat": "flake-compat",
"flake-utils": "flake-utils", "flake-utils": "flake-utils",
"nixpkgs": "nixpkgs_2" "nixpkgs": "nixpkgs_3"
}, },
"locked": { "locked": {
"lastModified": 1666720338, "lastModified": 1666720338,

View File

@ -26,6 +26,9 @@
# Community packages; used for Firefox extensions # Community packages; used for Firefox extensions
nur.url = "github:nix-community/nur"; nur.url = "github:nix-community/nur";
# Use official Firefox binary for macOS
firefox-darwin.url = "github:bandithedoge/nixpkgs-firefox-darwin";
# Wallpapers # Wallpapers
wallpapers = { wallpapers = {
url = "gitlab:exorcist365/wallpapers"; url = "gitlab:exorcist365/wallpapers";
@ -83,12 +86,10 @@
}; };
# Package servers into images with a generator # Package servers into images with a generator
packages.x86_64-linux = with inputs; { packages.aws = nixpkgs.lib.genAttrs [ "x86_64-linux" "aarch64-linux" ]
aws = import ./hosts/aws { (system: {
inherit inputs globals; "${system}" = import ./hosts/aws { inherit inputs globals system; };
system = "x86_64-linux"; });
};
};
apps = forAllSystems (system: apps = forAllSystems (system:
let pkgs = import nixpkgs { inherit system; }; let pkgs = import nixpkgs { inherit system; };

View File

@ -37,7 +37,7 @@ nixpkgs.lib.nixosSystem {
../../modules/applications/discord.nix ../../modules/applications/discord.nix
../../modules/applications/nautilus.nix ../../modules/applications/nautilus.nix
../../modules/applications/obsidian.nix ../../modules/applications/obsidian.nix
../../modules/mail/default.nix ../../modules/mail
../../modules/gaming/steam.nix ../../modules/gaming/steam.nix
../../modules/gaming/legendary.nix ../../modules/gaming/legendary.nix
../../modules/repositories/notes.nix ../../modules/repositories/notes.nix

View File

@ -14,12 +14,15 @@ darwin.lib.darwinSystem {
}) })
home-manager.darwinModules.home-manager home-manager.darwinModules.home-manager
{ {
identityFile = "/home/${globals.user}/.ssh/id_ed25519"; identityFile = "/Users/Noah.Masur/.ssh/id_ed25519";
gui.enable = true; gui.enable = true;
colorscheme = (import ../../modules/colorscheme/gruvbox); theme = {
colors = (import ../../modules/colorscheme/gruvbox).dark;
dark = true;
};
mailUser = globals.user; mailUser = globals.user;
networking.hostName = "noah-masur-mac"; networking.hostName = "noah-masur-mac";
nixpkgs.overlays = [ nur.overlay ]; nixpkgs.overlays = [ nur.overlay firefox-darwin.overlay ];
# Set registry to flake packages, used for nix X commands # Set registry to flake packages, used for nix X commands
nix.registry.nixpkgs.flake = nixpkgs; nix.registry.nixpkgs.flake = nixpkgs;
} }
@ -29,6 +32,7 @@ darwin.lib.darwinSystem {
../../modules/applications/alacritty.nix ../../modules/applications/alacritty.nix
../../modules/applications/kitty.nix ../../modules/applications/kitty.nix
../../modules/applications/discord.nix ../../modules/applications/discord.nix
../../modules/applications/firefox.nix
../../modules/repositories/notes.nix ../../modules/repositories/notes.nix
../../modules/programming/nix.nix ../../modules/programming/nix.nix
../../modules/programming/terraform.nix ../../modules/programming/terraform.nix

View File

@ -16,7 +16,10 @@ nixpkgs.lib.nixosSystem {
nix.registry.nixpkgs.flake = nixpkgs; nix.registry.nixpkgs.flake = nixpkgs;
identityFile = "/home/${globals.user}/.ssh/id_ed25519"; identityFile = "/home/${globals.user}/.ssh/id_ed25519";
gui.enable = false; gui.enable = false;
colorscheme = (import ../../modules/colorscheme/gruvbox); theme = {
colors = (import ../../modules/colorscheme/gruvbox).dark;
dark = true;
};
passwordHash = nixpkgs.lib.fileContents ../../private/password.sha512; passwordHash = nixpkgs.lib.fileContents ../../private/password.sha512;
wsl = { wsl = {
enable = true; enable = true;
@ -31,7 +34,7 @@ nixpkgs.lib.nixosSystem {
../common.nix ../common.nix
../../modules/wsl ../../modules/wsl
../../modules/nixos ../../modules/nixos
../../modules/mail/himalaya.nix ../../modules/mail
../../modules/repositories/notes.nix ../../modules/repositories/notes.nix
../../modules/programming/nix.nix ../../modules/programming/nix.nix
../../modules/programming/lua.nix ../../modules/programming/lua.nix

View File

@ -9,6 +9,7 @@
programs.firefox = { programs.firefox = {
enable = true; enable = true;
package = lib.mkIf pkgs.stdenv.isDarwin pkgs.firefox-bin;
extensions = with pkgs.nur.repos.rycee.firefox-addons; [ extensions = with pkgs.nur.repos.rycee.firefox-addons; [
ublock-origin ublock-origin
vimium vimium
@ -38,6 +39,7 @@
"browser.toolbars.bookmarks.visibility" = "newtab"; "browser.toolbars.bookmarks.visibility" = "newtab";
"browser.startup.page" = 3; # Restore previous session "browser.startup.page" = 3; # Restore previous session
"browser.newtabpage.enabled" = false; # Make new tabs blank "browser.newtabpage.enabled" = false; # Make new tabs blank
"dom.forms.autocomplete.formautofill" = false; # Disable autofill
"general.autoScroll" = true; # Drag middle-mouse to scroll "general.autoScroll" = true; # Drag middle-mouse to scroll
"services.sync.prefs.sync.general.autoScroll" = "services.sync.prefs.sync.general.autoScroll" =
false; # Prevent disabling autoscroll false; # Prevent disabling autoscroll
@ -45,6 +47,8 @@
"toolkit.legacyUserProfileCustomizations.stylesheets" = "toolkit.legacyUserProfileCustomizations.stylesheets" =
true; # Allow userChrome.css true; # Allow userChrome.css
"layout.css.color-mix.enabled" = true; "layout.css.color-mix.enabled" = true;
"ui.systemUsesDarkTheme" =
if config.theme.dark == true then 1 else 0;
}; };
userChrome = '' userChrome = ''
:root { :root {

View File

@ -69,6 +69,9 @@
tab_bar_edge = "top"; tab_bar_edge = "top";
tab_bar_style = "slant"; tab_bar_style = "slant";
# Audio
enable_audio_bell = false;
}; };
}; };
}; };

View File

@ -7,6 +7,13 @@
gnome.nautilus gnome.nautilus
gnome.sushi # Quick preview with spacebar gnome.sushi # Quick preview with spacebar
]; ];
programs.fish.functions = {
qr = {
body =
"${pkgs.qrencode}/bin/qrencode $argv[1] -o /tmp/qr.png | ${pkgs.gnome.sushi}/bin/sushi /tmp/qr.png";
};
};
}; };
}; };

View File

@ -20,6 +20,7 @@
base0E = "#d3869b"; # purple base0E = "#d3869b"; # purple
base0F = "#d65d0e"; # brown base0F = "#d65d0e"; # brown
neovimConfig = ./neovim.lua; neovimConfig = ./neovim.lua;
batTheme = "gruvbox-dark";
}; };
light = { light = {
base00 = "#fbf1c7"; # ---- base00 = "#fbf1c7"; # ----
@ -38,6 +39,7 @@
base0D = "#076678"; # blue base0D = "#076678"; # blue
base0E = "#8f3f71"; # purple base0E = "#8f3f71"; # purple
base0F = "#d65d0e"; # brown base0F = "#d65d0e"; # brown
neovimConfig = ./neovim-light.lua; neovimConfig = ./neovim.lua;
batTheme = "gruvbox-light";
}; };
} }

View File

@ -6,7 +6,6 @@ M.packer = function(use)
config = function() config = function()
vim.g.gruvbox_italicize_strings = 0 vim.g.gruvbox_italicize_strings = 0
vim.cmd("colorscheme gruvbox8") vim.cmd("colorscheme gruvbox8")
vim.cmd("set background=dark")
end, end,
}) })
end end

View File

@ -3,15 +3,13 @@
home-manager.users.${config.user} = { home-manager.users.${config.user} = {
home.packages = with pkgs; home.packages = with pkgs;
[ (nerdfonts.override { fonts = [ "FiraCode" ]; }) ]; [ (nerdfonts.override { fonts = [ "VictorMono" ]; }) ];
programs.alacritty.settings = { programs.alacritty.settings = { font.normal.family = "VictorMono"; };
font.normal.family = "FiraCode Nerd Font Mono";
};
programs.kitty.font = { programs.kitty.font = {
package = pkgs.nerdfonts; package = (pkgs.nerdfonts.override { fonts = [ "VictorMono" ]; });
name = "FiraCode"; name = "VictorMono Nerd Font Mono";
}; };
}; };

View File

@ -9,24 +9,25 @@ WORK_RIGHT_MONITOR = "DELL U2415 (1)"
LAPTOP_MONITOR = "Built-in Retina Display" LAPTOP_MONITOR = "Built-in Retina Display"
-- Used to find out the name of the monitor in Hammerspoon -- Used to find out the name of the monitor in Hammerspoon
function dump(o) -- local function dump(o)
if type(o) == "table" then -- if type(o) == "table" then
local s = "{ " -- local s = "{ "
for k, v in pairs(o) do -- for k, v in pairs(o) do
if type(k) ~= "number" then -- if type(k) ~= "number" then
k = '"' .. k .. '"' -- k = '"' .. k .. '"'
end -- end
s = s .. "[" .. k .. "] = " .. dump(v) .. "," -- s = s .. "[" .. k .. "] = " .. dump(v) .. ","
end -- end
return s .. "} " -- return s .. "} "
else -- else
return tostring(o) -- return tostring(o)
end -- end
end -- end
-- Turn on when looking for the monitor name -- Turn on when looking for the monitor name
-- print(dump(hs.screen.allScreens())) -- print(dump(hs.screen.allScreens()))
function concat(...) local function concat(...)
local res = {} local res = {}
for _, tab in ipairs({ ... }) do for _, tab in ipairs({ ... }) do
for _, elem in ipairs(tab) do for _, elem in ipairs(tab) do
@ -36,12 +37,12 @@ function concat(...)
return res return res
end end
function worklayout() local function worklayout()
hs.hotkey.bind({ "alt", "ctrl", "cmd" }, "l", function() hs.hotkey.bind({ "alt", "ctrl", "cmd" }, "l", function()
local u = hs.geometry.unitrect local u = hs.geometry.unitrect
-- set the layout -- set the layout
local left = { local left = {
-- { "Alacritty", nil, WORK_LEFT_MONITOR, u(0, 0, 1, 1), nil, nil, visible = true }, { "kitty", nil, WORK_LEFT_MONITOR, u(0, 0, 1, 1), nil, nil, visible = true },
} }
local right = { local right = {
{ "Slack", nil, WORK_RIGHT_MONITOR, u(0, 0, 1, 1), nil, nil, visible = true }, { "Slack", nil, WORK_RIGHT_MONITOR, u(0, 0, 1, 1), nil, nil, visible = true },

View File

@ -32,7 +32,6 @@
"openjdk" # Required by Apache Directory Studio "openjdk" # Required by Apache Directory Studio
]; ];
casks = [ casks = [
"firefox" # Firefox packaging on Nix is broken for macOS
"1password" # 1Password packaging on Nix is broken for macOS "1password" # 1Password packaging on Nix is broken for macOS
"scroll-reverser" # Different scroll style for mouse vs. trackpad "scroll-reverser" # Different scroll style for mouse vs. trackpad
"meetingbar" # Show meetings in menu bar "meetingbar" # Show meetings in menu bar

View File

@ -6,9 +6,11 @@
darwinLaunchOptions = [ "--start-as=fullscreen" ]; darwinLaunchOptions = [ "--start-as=fullscreen" ];
font.size = lib.mkForce 20; font.size = lib.mkForce 20;
settings = { settings = {
shell = "${pkgs.fish}/bin/fish"; shell = "/run/current-system/sw/bin/fish";
macos_traditional_fullscreen = true; macos_traditional_fullscreen = true;
macos_quit_when_last_window_closed = true; macos_quit_when_last_window_closed = true;
disable_ligatures = "always";
macos_option_as_alt = true;
}; };
}; };
}; };

View File

@ -21,7 +21,7 @@
rebuild-home = lib.mkForce { rebuild-home = lib.mkForce {
body = '' body = ''
git -C ${config.dotfilesPath} add --intent-to-add --all git -C ${config.dotfilesPath} add --intent-to-add --all
commandline -r "${pkgs.home-manager}/bin/home-manager switch --flake ${config.dotfilesPath}#${config.networking.hostName}"; commandline -r "${pkgs.home-manager}/bin/home-manager switch --flake ${config.dotfilesPath}#macbook";
commandline --function execute commandline --function execute
''; '';
}; };

View File

@ -1,7 +1,9 @@
{ ... }: { { pkgs, ... }: {
services.nix-daemon.enable = true; services.nix-daemon.enable = true;
environment.shells = [ pkgs.fish ];
security.pam.enableSudoTouchIdAuth = true; security.pam.enableSudoTouchIdAuth = true;
system = { system = {
@ -130,6 +132,16 @@
defaults write com.apple.screensaver askForPassword -int 1 defaults write com.apple.screensaver askForPassword -int 1
defaults write com.apple.screensaver askForPasswordDelay -int 0 defaults write com.apple.screensaver askForPasswordDelay -int 0
echo "Allow apps from anywhere"
SPCTL=$(spctl --status)
if ! [ "$SPCTL" = "assessments disabled" ]; then
sudo spctl --master-disable
fi
'';
# User-level settings
activationScripts.postUserActivation.text = ''
echo "Show the ~/Library folder" echo "Show the ~/Library folder"
chflags nohidden ~/Library chflags nohidden ~/Library
@ -154,22 +166,17 @@
"$(__dock_item /Applications/1Password.app)" \ "$(__dock_item /Applications/1Password.app)" \
"$(__dock_item /Applications/Slack.app)" \ "$(__dock_item /Applications/Slack.app)" \
"$(__dock_item /System/Applications/Calendar.app)" \ "$(__dock_item /System/Applications/Calendar.app)" \
"$(__dock_item /Applications/Firefox.app)" \ "$(__dock_item ${pkgs.firefox-bin}/Applications/Firefox.app)" \
"$(__dock_item /System/Applications/Messages.app)" \ "$(__dock_item /System/Applications/Messages.app)" \
"$(__dock_item /System/Applications/Mail.app)" \ "$(__dock_item /System/Applications/Mail.app)" \
"$(__dock_item /Applications/Mimestream.app)" \ "$(__dock_item /Applications/Mimestream.app)" \
"$(__dock_item /Applications/zoom.us.app)" \ "$(__dock_item /Applications/zoom.us.app)" \
"$(__dock_item ${pkgs.discord}/Applications/Discord.app)" \
"$(__dock_item /Applications/Obsidian.app)" \ "$(__dock_item /Applications/Obsidian.app)" \
"$(__dock_item /Applications/Alacritty.app)" \ "$(__dock_item ${pkgs.kitty}/Applications/kitty.app)" \
"$(__dock_item /System/Applications/System\ Preferences.app)" "$(__dock_item /System/Applications/System\ Preferences.app)"
echo "Allow apps from anywhere"
SPCTL=$(spctl --status)
if ! [ "$SPCTL" = "assessments disabled" ]; then
sudo spctl --master-disable
fi
''; '';
}; };
} }

View File

@ -4,6 +4,12 @@
# macOS user # macOS user
home = config.homePath; home = config.homePath;
shell = pkgs.fish; # Default shell shell = pkgs.fish; # Default shell
};
# Used for aerc
home-manager.users.${config.user} = {
home.sessionVariables = { XDG_CONFIG_HOME = "${config.homePath}/.config"; };
}; };
} }

View File

@ -39,6 +39,9 @@ in {
pulse.enable = true; pulse.enable = true;
}; };
# Provides audio source with background noise filtered
programs.noisetorch.enable = true;
# These aren't necessary, but helpful for the user # These aren't necessary, but helpful for the user
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
pamixer # Audio control pamixer # Audio control

View File

@ -19,9 +19,9 @@
}; };
"nvim/lua/packer/colors.lua".source = config.theme.colors.neovimConfig; "nvim/lua/packer/colors.lua".source = config.theme.colors.neovimConfig;
"nvim/lua/background.lua".text = '' "nvim/lua/background.lua".text = ''
vim.cmd("set background=${ vim.o.background = "${
if config.theme.dark == true then "dark" else "light" if config.theme.dark == true then "dark" else "light"
}") }"
''; '';
}; };

View File

@ -46,8 +46,8 @@ M.packer = function(use)
capabilities = capabilities, capabilities = capabilities,
}) })
end end
if on_path("rnix-lsp") then if on_path("nil") then
require("lspconfig").rnix.setup({ capabilities = capabilities }) require("lspconfig").nil_ls.setup({ capabilities = capabilities })
end end
vim.keymap.set("n", "gd", vim.lsp.buf.definition) vim.keymap.set("n", "gd", vim.lsp.buf.definition)

View File

@ -50,7 +50,7 @@ M.packer = function(use)
vim.keymap.set("n", "<Leader>t", TERM_TOGGLE) vim.keymap.set("n", "<Leader>t", TERM_TOGGLE)
vim.keymap.set("n", "<Leader>P", NIXPKGS_TOGGLE) vim.keymap.set("n", "<Leader>P", NIXPKGS_TOGGLE)
vim.keymap.set("n", "<Leader>gw", GITWATCH_TOGGLE) vim.keymap.set("n", "<Leader>gw", GITWATCH_TOGGLE)
vim.keymap.set("n", "<C-k>", K9S_TOGGLE) vim.keymap.set("n", "<Leader>9", K9S_TOGGLE)
end, end,
}) })

View File

@ -75,6 +75,11 @@ vim.api.nvim_exec(
false false
) )
vim.filetype.add({
pattern = {
[".*%.tfvars"] = "terraform",
},
})
vim.api.nvim_create_autocmd("FileType", { vim.api.nvim_create_autocmd("FileType", {
pattern = "*.eml", pattern = "*.eml",
callback = function() callback = function()

View File

@ -4,7 +4,7 @@
home.packages = with pkgs; [ home.packages = with pkgs; [
nixfmt # Nix file formatter nixfmt # Nix file formatter
rnix-lsp # Nix language server nil # Nix language server
]; ];
}; };

21
modules/services/n8n.nix Normal file
View File

@ -0,0 +1,21 @@
{ ... }: {
services.n8n = {
enable = true;
settings = {
n8n = {
listenAddress = "127.0.0.1";
port = 5678;
};
};
};
caddyRoutes = [{
match = [{ host = [ config.n8nServer ]; }];
handle = [{
handler = "reverse_proxy";
upstreams = [{ dial = "localhost:5678"; }];
}];
}];
}

View File

@ -14,7 +14,7 @@ bind -M insert \cp projects
bind -M default \cp projects bind -M default \cp projects
bind -M insert \x1F accept-autosuggestion bind -M insert \x1F accept-autosuggestion
bind -M default \x1F accept-autosuggestion bind -M default \x1F accept-autosuggestion
bind -M insert \cn 'commandline -r "nix run github:NixOS/nixpkgs/nixpkgs-unstable#"' bind -M insert \cn 'commandline -r "nix run nixpkgs#"'
bind -M default \cn 'commandline -r "nix run github:NixOS/nixpkgs/nixpkgs-unstable#"' bind -M default \cn 'commandline -r "nix run nixpkgs#"'
bind -M insert \x11F nix-fzf bind -M insert \x11F nix-fzf
bind -M default \x11F nix-fzf bind -M default \x11F nix-fzf

View File

@ -19,9 +19,9 @@
body = '' body = ''
set program $argv[1] set program $argv[1]
if test (count $argv) -ge 2 if test (count $argv) -ge 2
commandline -r "nix run github:NixOS/nixpkgs/nixpkgs-unstable#$program -- $argv[2..-1]" commandline -r "nix run nixpkgs#$program -- $argv[2..-1]"
else else
commandline -r "nix run github:NixOS/nixpkgs/nixpkgs-unstable#$program" commandline -r "nix run nixpkgs#$program"
end end
commandline -f execute commandline -f execute
''; '';

View File

@ -13,13 +13,14 @@ let
in { in {
config = {
home-manager.users.${config.user} = { home-manager.users.${config.user} = {
home.packages = with pkgs; [ home.packages = with pkgs; [
unzip # Extract zips unzip # Extract zips
rsync # Copy folders rsync # Copy folders
ripgrep # grep ripgrep # grep
bat # cat
fd # find fd # find
sd # sed sd # sed
jq # JSON manipulation jq # JSON manipulation
@ -31,7 +32,7 @@ in {
vimv-rs # Batch rename files vimv-rs # Batch rename files
dig # DNS lookup dig # DNS lookup
lf # File viewer lf # File viewer
# whois # Lookup IPs inetutils # Includes telnet, whois
age # Encryption age # Encryption
]; ];
@ -43,6 +44,11 @@ in {
".digrc".text = "+noall +answer"; # Cleaner dig commands ".digrc".text = "+noall +answer"; # Cleaner dig commands
}; };
programs.bat = {
enable = true; # cat replacement
config = { theme = config.theme.colors.batTheme; };
};
programs.fish.shellAbbrs = { programs.fish.shellAbbrs = {
cat = "bat"; # Swap cat with bat cat = "bat"; # Swap cat with bat
}; };
@ -53,10 +59,8 @@ in {
argumentNames = "target"; argumentNames = "target";
body = "${pkgs.prettyping}/bin/prettyping --nolegend $target"; body = "${pkgs.prettyping}/bin/prettyping --nolegend $target";
}; };
qr = {
body =
"${pkgs.qrencode}/bin/qrencode $argv[1] -o /tmp/qr.png | open /tmp/qr.png"; # Fix for non-macOS
}; };
}; };
}; };