Compare commits

...

3 commits

Author SHA1 Message Date
8f6650bbd1
overlays: improve mkVersion
Add dash to mkVersionInput
Add mkVersionSrc for normal src.
2023-03-02 09:15:09 +01:00
05631f016d
nvim: add json formatter 2023-03-02 09:14:27 +01:00
e2d4143c2a
nvim: add neovide 2023-03-02 09:13:46 +01:00
4 changed files with 96 additions and 67 deletions

View file

@ -137,12 +137,13 @@ in
# Emacs
windowrulev2 = opaque, class:^emacs$
# Fullscreen Applications
# ${mkRules ["opaque" "noblur" "noborder" "noshadow" "forceinput"] ["fullscreen:1"]}
${mkRules ["opaque" "noblur" "noborder" "noshadow" "forceinput"] ["fullscreen:1"]}
${mkRules ["opaque" "noblur" "noshadow"] ["class:^jetbrains-pycharm$"]}
${mkRules ["tile" "opaque"] ["class:^neovide$"]}
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
$mainMod = SUPER
$windowMod = ALT

View file

@ -19,7 +19,16 @@ in
};
config = mkIf cfg.enable {
home-manager.users.moritz.programs.neovim = {
home-manager.users.moritz = {
home.packages = with pkgs; [
(
if config.my.programs.hyprland.enable
then neovide-hyprland
else neovide
)
];
programs.neovim = {
enable = true;
package = pkgs.neovim-nightly;
vimAlias = true;
@ -31,6 +40,7 @@ in
alejandra
black
isort
jq
nil
nixpkgs-fmt
rustfmt
@ -81,4 +91,5 @@ in
];
};
};
};
}

View file

@ -12,7 +12,6 @@ vim.opt.backupdir = { vim.fn.stdpath("state") .. "/nvim/backup//" } -- don't sto
vim.opt.clipboard = "unnamedplus" -- sync with system clipboard
vim.opt.conceallevel = 2
vim.opt.expandtab = true -- spaces instead of tabs
vim.opt.guifont = "Fira Code Nerd Font:h1"
vim.opt.ignorecase = true
vim.opt.mouse = "a" -- mouse for all modes
vim.opt.number = true
@ -33,6 +32,11 @@ vim.opt.updatetime = 300
vim.opt_local.spell = true
vim.opt_local.spelllang = { "en", "de_20" } -- all English regions and new German spelling
if vim.g.neovide then
vim.opt.guifont = "Fira Code Nerd Font:h10"
vim.g.neovide_scale_factor = 0.7
end
require("catppuccin").setup({
compile_path = vim.fn.stdpath("cache") .. "/catppuccin", -- fix issue of writing to nix store
integrations = {
@ -189,11 +193,10 @@ require("formatter").setup({
log_level = vim.log.levels.WARN,
-- All formatter configurations are opt-in
filetype = {
-- Formatter configurations for filetype "lua" go here
-- and will be executed in order
json = {
require("formatter.filetypes.json").jq,
},
lua = {
-- "formatter.filetypes.lua" defines default configurations for the
-- "lua" filetype
require("formatter.filetypes.lua").stylua,
},
nix = {

View file

@ -5,7 +5,8 @@ let
(builtins.substring 4 2 longDate)
(builtins.substring 6 2 longDate)
]);
mkVersionInput = input: "unstable" + mkDate (input.lastModifiedDate or "19700101") + "_" + (input.shortRev or "dirty");
mkVersionSrc = src: "unstable-" + builtins.substring 0 7 src.rev;
mkVersionInput = input: "unstable-" + mkDate (input.lastModifiedDate or "19700101") + "_" + (input.shortRev or "dirty");
in
{
agenix = inputs.agenix.packages.${prev.system}.default;
@ -56,6 +57,19 @@ in
});
};
neovide-hyprland = final.symlinkJoin {
name = "neovide-hyprland-${final.neovide.version}";
paths = [ final.neovide ];
nativeBuildInputs = [ final.makeWrapper ];
postBuild = ''
rm $out/bin/neovide
makeWrapper ${final.neovide}/bin/neovide $out/bin/neovide --set WINIT_UNIX_BACKEND x11
'';
meta = final.neovide.meta // {
mainProgram = "neovide";
};
};
master = import inputs.master {
inherit (prev) system;
config.allowUnfree = true;