Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/github_actions/cachix/install-nix…
Browse files Browse the repository at this point in the history
…-action-V28
  • Loading branch information
simonrw authored Sep 17, 2024
2 parents 454d0fa + ca75ff6 commit 12fd9ab
Show file tree
Hide file tree
Showing 35 changed files with 604 additions and 771 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/update-lock.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
- name: Update flake.lock
uses: DeterminateSystems/update-flake-lock@v23
uses: DeterminateSystems/update-flake-lock@v24
with:
pr-title: Update flake.lock
pr-labels: |
Expand Down
2 changes: 1 addition & 1 deletion bin/nvim-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ set -euo pipefail

NIXARCH="$(nixarch)"

nom build ".#homeConfigurations.${NIXARCH}.${USER}.config.programs.nixvim.finalPackage" $*
nom build ".#nixvim" $*
33 changes: 29 additions & 4 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,12 @@
home-manager.users.simon = {...}: {
imports = [
./home/home.nix
nixvim.homeManagerModules.nixvim
inputs.nix-index-database.hmModules.nix-index
];

home.packages = [
self.packages.${system}.nixvim
];
};
}
vscode-server.nixosModule
Expand Down Expand Up @@ -228,9 +231,12 @@
home-manager.users.simon = {...}: {
imports = [
./home/home.nix
nixvim.homeManagerModules.nixvim
inputs.nix-index-database.hmModules.nix-index
];

home.packages = [
self.packages.${system}.nixvim
];
};
}
];
Expand All @@ -254,8 +260,12 @@
inherit pkgs;
modules = [
./home/home.nix
nixvim.homeManagerModules.nixvim
inputs.nix-index-database.hmModules.nix-index
({ ... }: {
home.packages = [
self.packages.${system}.nixvim
];
})
];
# stop infinite recusion when trying to access
# pkgs.stdenv.is{Linux,Darwin} from within a module
Expand All @@ -269,7 +279,11 @@
inherit pkgs;
modules = [
./minimal/home.nix
nixvim.homeManagerModules.nixvim
({...}: {
home.packages = [
self.packages.${system}.nixvim
];
})
];
# stop infinite recusion when trying to access
# pkgs.stdenv.is{Linux,Darwin} from within a module
Expand All @@ -288,6 +302,17 @@
python310Packages.black
];
};

packages.nixvim = inputs.nixvim.legacyPackages.${system}.makeNixvimWithModule {
inherit pkgs;
module = {
imports = [
./home/nixvim/default.nix
];
};
extraSpecialArgs = {
};
};
}
);

Expand Down
12 changes: 0 additions & 12 deletions home/aws.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,5 @@ in {
home.packages = [
cfg.package
];
programs.fish.plugins = mkIf config.programs.fish.enable [
# my fork to stop printing on error when aws_completer cannot be found
{
name = "plugin-aws";
src = pkgs.fetchFromGitHub {
owner = "simonrw";
repo = "plugin-aws";
rev = "bdbf81a1260ace6bcafd129dcfef2c628a937925";
hash = "sha256-z6hFVk3H5vwxqwolIqWSO8/73hiCHClJeA4gNZw7B4Q=";
};
}
];
};
}
215 changes: 16 additions & 199 deletions home/colours.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
inputs,
...
}: let

cfg = config.me;

dark-themes = [
Expand Down Expand Up @@ -989,151 +988,6 @@
};
};
};
neovim-theme-blocks = {
poimandres = ''
require('poimandres').setup({})
vim.cmd("colorscheme poimandres")
'';
papercolor = ''
vim.cmd.highlight({ "TreesitterContext", "guibg=#f6f6ff" })
vim.cmd [[set background=light]]
vim.cmd [[colorscheme PaperColorSlim]]
'';
nord = ''
vim.g.nord_disable_background = true
vim.g.nord_italic = false
vim.cmd [[colorscheme nord]]
vim.cmd.highlight({ "@comment", "guifg=#d08770" })
vim.cmd.highlight({ "TreesitterContext", "guibg=#363c4a" })
-- markdown colours
vim.cmd.highlight({ "@markup.raw", "guifg=${current-theme.normal.yellow}" })
'';
github-light = ''
vim.cmd [[set background=light]]
vim.cmd [[colorscheme github_light]]
vim.cmd.highlight({ "DiagnosticError", "guifg=Red" })
vim.cmd.highlight({ "DiagnosticHint", "guifg=Orange" })
vim.cmd.highlight({ "DiagnosticWarn", "guifg=Orange" })
vim.cmd.highlight({ "DiagnosticInfo", "guifg=LightBlue" })
vim.cmd.highlight({ "DiagnosticFloatingError", "guifg=Red" })
vim.cmd.highlight({ "DiagnosticFloatingHint", "guifg=Orange" })
vim.cmd.highlight({ "DiagnosticFloatingInfo", "guifg=LightBlue" })
vim.cmd.highlight({ "DiagnosticFloatingWarn", "guifg=Orange" })
vim.cmd.highlight({ "DiagnosticVirtualTextError", "guifg=Red" })
vim.cmd.highlight({ "DiagnosticVirtualTextHint", "guifg=Orange" })
vim.cmd.highlight({ "DiagnosticVirtualTextInfo", "guifg=LightBlue" })
vim.cmd.highlight({ "DiagnosticVirtualTextWarn", "guifg=Orange" })
vim.cmd.highlight({ "Comment", "guifg=#e69340" })
vim.cmd.highlight({ "TreesitterContext", "guibg=#eeeeee" })
'';
# TODO: migrate these to nixvim
one-dark = ''
colorscheme onedark
'';
catppuccin-macchiato = ''
-- remove underline from bottom of highlight section
vim.cmd([[
set background=dark
colorscheme catppuccin-macchiato
]])
vim.cmd.highlight({ 'TreesitterContextBottom', 'gui=none' })
'';
catppuccin-mocha = ''
vim.cmd([[
set background=dark
colorscheme catppuccin-mocha
]])
'';
catppuccin-frappe = ''
vim.cmd([[
set background=dark
colorscheme catppuccin-frappe
]])
'';
dracula = ''
set background=dark
colorscheme dracula
'';
solarized-light = ''
set background=light
let g:solarized_disable_background = v:true
let g:solarized_italic_comments = v:false
let g:solarized_italic_keywords = v:false
let g:solarized_italic_functions = v:true
let g:solarized_italic_variables = v:false
let g:solarized_contrast = v:false
let g:solarized_borders = v:true
colorscheme solarized
highlight Cursor guifg=${current-theme.cursor.cursor} guibg=${current-theme.cursor.text}
highlight TreesitterContext guibg=${current-theme.normal.white}
'';
github = ''
vim.opt.background = "dark"
-- overrides
vim.cmd.highlight({ "Comment", "guifg=#e69340" })
vim.cmd.highlight({ "TSComment", "guifg=#e69340" })
vim.cmd.highlight({ "Normal", "guibg=none" })
vim.cmd.highlight({ "NormalNC", "guibg=none" })
-- set background colour
vim.cmd "colorscheme github_dark"
'';
gruvbox = ''
set background=dark
let g:gruvbox_contrast_dark = "hard"
colorscheme gruvbox
highlight Comment guifg=#e69340 " brighten comments
highlight TSComment guifg=#e69340 " brighten comments
'';
monochrome = ''
set background=dark
colorscheme fogbell
hi Normal guibg=none
'';
srw = ''
vim.cmd([[
set background=dark
colorscheme srw256
hi Normal guibg=none
let g:linenr_background = 'none'
execute 'highlight TelescopeNormal guibg=' . g:linenr_background
execute 'highlight LineNr guibg=' . g:linenr_background
execute 'highlight SignColumn guibg=' . g:linenr_background
highlight TabLine guibg=none
highlight TabLineSel guibg=none
highlight TabLineFill guibg=none
execute 'highlight DiagnosticSignError ctermfg=1 guifg=Red guibg=' . g:linenr_background
execute 'highlight DiagnosticSignHint ctermfg=7 guifg=LightGrey guibg=' . g:linenr_background
execute 'highlight DiagnosticSignInfo ctermfg=4 guifg=LightBlue guibg=' . g:linenr_background
execute 'highlight DiagnosticSignWarn ctermfg=3 guifg=Orange guibg=' . g:linenr_background
highlight DiagnosticUnderlineHint guifg=Grey guisp=Grey
]])
'';
catppuccin-latte = ''
vim.cmd([[
set background=light
colorscheme catppuccin-latte
]])
'';
monokai-pro = ''
vim.cmd([[
set background=dark
let g:sonokai_style = "shusia"
let g:sonokai_disable_italic_comment = 1
let g:sonokai_transparent_background = 2
colorscheme sonokai
" highlight Comment guifg=#e69340 " brighten comments
" highlight TSComment guifg=#e69340 " brighten comments
" highlight NormalFloat guibg=#343136
" highlight TabLine gui=none guibg=none guifg=${themes.monokai-pro.normal.yellow}
" highlight TabLineSel gui=none guibg=none guifg=${themes.monokai-pro.normal.white}
" highlight TabLineFill gui=none guibg=none
]])
'';
};

helix-theme =
{
github-light = "github_light";
Expand Down Expand Up @@ -1178,18 +1032,23 @@
hash = "sha256-m/+Xsbve1fuzNEKpSK6Eddoi7gKcj04o1kSFy/H/m9w=";
};
};
git-config = {
catppuccin-macchiato = if cfg.delta.diff-so-fancy then {
delta.options.diff-so-fancy = true;
} else {
includes = [
{
path = "${inputs.catppuccin-delta}/catppuccin.gitconfig";
git-config =
{
catppuccin-macchiato =
if cfg.delta.diff-so-fancy
then {
delta.options.diff-so-fancy = true;
}
];
delta.options.features = "catppuccin-macchiato";
};
}.${cfg.theme};
else {
includes = [
{
path = "${inputs.catppuccin-delta}/catppuccin.gitconfig";
}
];
delta.options.features = "catppuccin-macchiato";
};
}
.${cfg.theme};

zellij-theme =
{
Expand Down Expand Up @@ -1234,48 +1093,6 @@ in
"vi_mode_cursor"
"raw-colours"
];
programs.nixvim.extraConfigLuaPost = neovim-theme-blocks.${cfg.theme};
programs.nixvim.extraPlugins = with pkgs.vimPlugins;
{
poimandres = [
poimandres-nvim
];
papercolor = [
papercolor-theme-slim
];
github-light = [
github-nvim-theme
];
gruvbox = [
gruvbox
];
monokai-pro = [
sonokai
];
nord = [
nord-nvim
];
dracula = [
dracula-nvim
];
catppuccin-macchiato = [
catppuccin-nvim
];
catppuccin-mocha = [
catppuccin-nvim
];
catppuccin-latte = [
catppuccin-nvim
];
catppuccin-frappe = [
catppuccin-nvim
];
solarized-light = [
solarized-nvim
];
}
.${cfg.theme}
or [];
programs.tmux.extraConfig = ''
fg_colour="${tmux-primary-colour}"
bg_colour="${tmux-background-colour}"
Expand Down
2 changes: 1 addition & 1 deletion home/hammerspoon/config/applications.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ local applications = {
name = "Alacritty",
},
browser = {
name = "Brave Browser",
name = "Arc",
},
email = {
name = "Mail",
Expand Down
22 changes: 15 additions & 7 deletions home/helix.nix
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
{
config,
lib,
pkgs,
...
}: {
programs.helix = {
enable = true;
settings = {
editor = {
auto-completion = true;
# instant completion
completion-timeout = 5;
auto-pairs = false;
true-color = true;
line-number = "relative";
Expand Down Expand Up @@ -38,11 +39,18 @@
};
};
languages = {
language-server.pyright = {
command = "${pkgs.pyright}/bin/pyright-langserver";
args = [
"--stdio"
];
language-server = {
pyright = {
command = "${pkgs.pyright}/bin/pyright-langserver";
args = [
"--stdio"
];
};
typescript-language-server = {
command = "${pkgs.typescript-language-server}/bin/typescript-language-server";
args = ["--stdio"];
config.hostInfo = "helix";
};
};
# language-server.rnix = {
# command = "${lib.getExe pkgs.rnix-lsp}";
Expand Down
Loading

0 comments on commit 12fd9ab

Please sign in to comment.