fix formatting

This commit is contained in:
2023-11-28 00:30:21 +01:00
parent 9cb2787aab
commit 08f821f8e0
20 changed files with 465 additions and 2042 deletions

View File

@@ -1,9 +1,11 @@
# Home Manager Configuration # Home Manager Configuration
Rebuild the configuration Rebuild the configuration
```sh ```sh
home-manager switch --flake ~/.config/home-manager home-manager switch --flake ~/.config/home-manager
``` ```
**Make sure new files are added to git** **Make sure new files are added to git**
## Initial Setup on a new machine ## Initial Setup on a new machine
@@ -11,6 +13,7 @@ home-manager switch --flake ~/.config/home-manager
Enable flakes Enable flakes
`configuration.nix` `configuration.nix`
```nix ```nix
nix.settings.experimental-features = [ "nix-command" "flakes" ]; nix.settings.experimental-features = [ "nix-command" "flakes" ];
``` ```
@@ -20,4 +23,5 @@ git clone git@github.com:Theaninova/home-manager-config.git ~/.config/home-manag
nix build '.#homeConfigurations.theaninova.activationPackage' nix build '.#homeConfigurations.theaninova.activationPackage'
./result/activate ./result/activate
``` ```
After that reload the shell
After that reload the shell

View File

@@ -7,7 +7,10 @@
size = 12; size = 12;
}; };
window = { window = {
padding = { x = 16; y = 16; }; padding = {
x = 16;
y = 16;
};
opacity = 0.8; opacity = 0.8;
}; };
}; };

View File

@@ -1,5 +1,8 @@
{ config, pkgs, ... }:
{ {
config,
pkgs,
...
}: {
wayland.windowManager.hyprland = { wayland.windowManager.hyprland = {
enable = true; enable = true;
enableNvidiaPatches = true; enableNvidiaPatches = true;
@@ -151,7 +154,7 @@
}; };
programs.fuzzel = import ./fuzzel.nix; programs.fuzzel = import ./fuzzel.nix;
# programs.alacritty = import ./alacritty.nix; # programs.alacritty = import ./alacritty.nix;
programs.kitty = import ./kitty.nix { inherit pkgs; }; programs.kitty = import ./kitty.nix {inherit pkgs;};
programs.wofi = import ./wofi.nix; programs.wofi = import ./wofi.nix;
programs.swaylock = import ./swaylock.nix; programs.swaylock = import ./swaylock.nix;
@@ -170,13 +173,15 @@
wl-clipboard wl-clipboard
polkit_gnome polkit_gnome
xdg-desktop-portal-gtk xdg-desktop-portal-gtk
/* TODO: (flameshot.overrideAttrs(prev: { /*
TODO: (flameshot.overrideAttrs(prev: {
nativeBuildInputs = prev.nativeBuildInputs ++ [ git grim ]; nativeBuildInputs = prev.nativeBuildInputs ++ [ git grim ];
cmakeFlags = [ cmakeFlags = [
"-DUSE_WAYLAND_CLIPBOARD=1" "-DUSE_WAYLAND_CLIPBOARD=1"
"-DUSE_WAYLAND_GRIM=true" "-DUSE_WAYLAND_GRIM=true"
]; ];
}))*/ }))
*/
swww swww
# ags # ags
glib glib
@@ -232,12 +237,16 @@
file.profile = { file.profile = {
enable = true; enable = true;
target = ".zprofile"; # change to .profile if you're not using zsh target = ".zprofile"; # change to .profile if you're not using zsh
text = /* sh */ '' text =
Hyprland && echo "goodbye" && exit 0 \ /*
|| echo "$? couldn't launch Hyprland" && tty | grep tty1 \ sh
&& echo "refusing to autologin without Hyprland on tty1" && exit 0 \ */
|| echo "not on tty1, letting in" ''
''; Hyprland && echo "goodbye" && exit 0 \
|| echo "$? couldn't launch Hyprland" && tty | grep tty1 \
&& echo "refusing to autologin without Hyprland on tty1" && exit 0 \
|| echo "not on tty1, letting in"
'';
}; };
file.".config/hypr/shaders" = { file.".config/hypr/shaders" = {
@@ -246,4 +255,3 @@
}; };
}; };
} }

View File

@@ -3,7 +3,7 @@
"SUPER,T,exec,kitty" "SUPER,T,exec,kitty"
"SUPER,C,togglespecialworkspace,calc" "SUPER,C,togglespecialworkspace,calc"
"SUPER_SHIFT,C,exec,hyprpicker" "SUPER_SHIFT,C,exec,hyprpicker"
",PRINT,exec,slurp | grim -g - - | wl-copy" "SUPER_SHIFT,V,exec,slurp | grim -g - - | wl-copy"
"SUPER,P,pseudo," "SUPER,P,pseudo,"
"SUPER_SHIFT,up,movewindow,u" "SUPER_SHIFT,up,movewindow,u"
@@ -11,8 +11,8 @@
"SUPER_SHIFT,left,movewindow,l" "SUPER_SHIFT,left,movewindow,l"
"SUPER_SHIFT,right,movewindow,r" "SUPER_SHIFT,right,movewindow,r"
"SUPER_SHIFT,S,movetoworkspace,special" "SUPER_SHIFT,S,movetoworkspace,special:terminal"
"SUPER,S,togglespecialworkspace,special" "SUPER,S,togglespecialworkspace,terminal"
"SUPER,up,movefocus,u" "SUPER,up,movefocus,u"
"SUPER,down,movefocus,d" "SUPER,down,movefocus,d"

View File

@@ -1,5 +1,4 @@
{ pkgs }: {pkgs}: {
{
enable = true; enable = true;
shellIntegration.enableFishIntegration = true; shellIntegration.enableFishIntegration = true;
font = { font = {
@@ -8,9 +7,9 @@
size = 12; size = 12;
}; };
extraConfig = '' extraConfig = ''
symbol_map U+23FB-U+23FE,U+2665,U+26A1,U+2B58,U+E000-U+E00A,U+E0A0-U+E0A3,U+E0B0-U+E0D4,U+E200-U+E2A9,U+E300-U+E3E3,U+E5FA-U+E6AA,U+E700-U+E7C5,U+EA60-U+EBEB,U+F000-U+F2E0,U+F300-U+F32F,U+F400-U+F4A9,U+F500-U+F8FF,U+F0001-U+F1AF0 Symbols Nerd Font Mono symbol_map U+23FB-U+23FE,U+2665,U+26A1,U+2B58,U+E000-U+E00A,U+E0A0-U+E0A3,U+E0B0-U+E0D4,U+E200-U+E2A9,U+E300-U+E3E3,U+E5FA-U+E6AA,U+E700-U+E7C5,U+EA60-U+EBEB,U+F000-U+F2E0,U+F300-U+F32F,U+F400-U+F4A9,U+F500-U+F8FF,U+F0001-U+F1AF0 Symbols Nerd Font Mono
include ./current-theme.conf include ./current-theme.conf
''; '';
settings = { settings = {
background_opacity = "0.8"; background_opacity = "0.8";

View File

@@ -1,3 +0,0 @@
{
enable = true;
}

View File

@@ -6,9 +6,9 @@
position = "top"; position = "top";
height = 48; height = 48;
output = "HDMI-A-1"; output = "HDMI-A-1";
modules-left = [ "wlr/workspaces" ]; modules-left = ["wlr/workspaces"];
modules-center = [ "wlr/taskbar" ]; modules-center = ["wlr/taskbar"];
modules-right = [ "custom/weather" "clock" ]; modules-right = ["custom/weather" "clock"];
"wlr/taskbar" = { "wlr/taskbar" = {
all-outputs = true; all-outputs = true;

View File

@@ -17,32 +17,40 @@
}; };
}; };
outputs = {nixpkgs, home-manager, ags, nixvim, ...}: outputs = {
let nixpkgs,
username = "theaninova"; home-manager,
system = "x86_64-linux"; ags,
stateVersion = "23.11"; nixvim,
...
pkgs = import nixpkgs { }: let
inherit system; username = "theaninova";
config.allowUnfree = true; system = "x86_64-linux";
}; stateVersion = "23.11";
homeDirPrefix = if pkgs.stdenv.hostPlatform.isDarwin then "/Users" else "/home";
homeDirectory = "${homeDirPrefix}/${username}";
home = (import ./home.nix {
inherit homeDirectory pkgs stateVersion system username;
});
in {
homeConfigurations.theaninova = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules = [ pkgs = import nixpkgs {
ags.homeManagerModules.default inherit system;
home config.allowUnfree = true;
nixvim.homeManagerModules.nixvim
];
};
}; };
homeDirPrefix =
if pkgs.stdenv.hostPlatform.isDarwin
then "/Users"
else "/home";
homeDirectory = "${homeDirPrefix}/${username}";
home = import ./home.nix {
inherit homeDirectory pkgs stateVersion system username;
};
in {
homeConfigurations.theaninova = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules = [
ags.homeManagerModules.default
home
nixvim.homeManagerModules.nixvim
];
};
};
} }

View File

@@ -1,8 +1,13 @@
{ homeDirectory, pkgs, stateVersion, system, username }: {
let homeDirectory,
packages = import ./packages.nix { inherit pkgs; }; pkgs,
stateVersion,
system,
username,
}: let
packages = import ./packages.nix {inherit pkgs;};
in { in {
imports = [ ./desktops/hyprland/hyprland.nix ]; imports = [./desktops/hyprland/hyprland.nix];
home = { home = {
inherit homeDirectory packages stateVersion username; inherit homeDirectory packages stateVersion username;
@@ -26,6 +31,6 @@ in {
}; };
}; };
programs = import ./programs.nix { inherit pkgs; }; programs = import ./programs.nix {inherit pkgs;};
services = import ./services.nix { inherit pkgs homeDirectory; }; services = import ./services.nix {inherit pkgs homeDirectory;};
} }

View File

@@ -1,16 +1,17 @@
{ pkgs }: with pkgs; [ {pkgs}:
with pkgs; [
# nix # nix
cachix cachix
lorri lorri
# fix for proton games not launching without any error message # fix for proton games not launching without any error message
libxcrypt libxcrypt
# browsers # browsers
firefox-wayland firefox-wayland
chromium chromium
brave brave
# media # media
jellyfin-media-player jellyfin-media-player
youtube-music youtube-music
@@ -21,30 +22,30 @@
bitwarden bitwarden
# chat apps # chat apps
(import ./packages/threema-desktop.nix { inherit pkgs; }) (import ./packages/threema-desktop.nix {inherit pkgs;})
(discord.override { (discord.override {
withOpenASAR = true; withOpenASAR = true;
withVencord = false; withVencord = false;
}) })
slack slack
# office # office
libreoffice libreoffice
apostrophe # markdown editor apostrophe # markdown editor
# creative # creative
gimp-with-plugins gimp-with-plugins
inkscape-with-extensions inkscape-with-extensions
audacity audacity
# friture TODO: broken # friture TODO: broken
blender blender
# development # development
(import ./packages/intellij.nix { inherit pkgs; }) (import ./packages/intellij.nix {inherit pkgs;})
jetbrains.rust-rover jetbrains.rust-rover
insomnia insomnia
avalonia-ilspy avalonia-ilspy
# gaming # gaming
steam steam
oversteer oversteer

View File

@@ -1,5 +1,9 @@
{ lib, stdenv, fetchFromGitHub, pkgs }: {
lib,
stdenv,
fetchFromGitHub,
pkgs,
}:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "firefox-gnome-theme"; name = "firefox-gnome-theme";
version = "116.0.0"; version = "116.0.0";

View File

@@ -1,5 +1,9 @@
{ lib, stdenv, fetchFromGitHub, pkgs }: {
lib,
stdenv,
fetchFromGitHub,
pkgs,
}:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "hid-fanatecff-tools"; pname = "hid-fanatecff-tools";
version = "0.1.0"; version = "0.1.0";

View File

@@ -1,7 +1,8 @@
{ pkgs }: pkgs.jetbrains.idea-ultimate.overrideAttrs(prev: { {pkgs}:
version = "233.11799.30"; pkgs.jetbrains.idea-ultimate.overrideAttrs (prev: {
version = "233.11799.67";
src = builtins.fetchurl { src = builtins.fetchurl {
url = "https://download.jetbrains.com/idea/ideaIU-233.11799.30.tar.gz"; url = "https://download.jetbrains.com/idea/ideaIU-233.11799.67.tar.gz";
sha256 = "c5db01f201660c9bd3427383f6ae9179293cbdeae7e54e2d708b4d70248d8427"; sha256 = "374153baecd8a633fef3fe75fb5fe47e57f3d136e9873f7bd7ce1166f942559e";
}; };
}) })

View File

@@ -1,17 +1,22 @@
# This file has been generated by node2nix 1.11.1. Do not edit! # This file has been generated by node2nix 1.11.1. Do not edit!
{
{pkgs ? import <nixpkgs> { pkgs ?
inherit system; import <nixpkgs> {
}, system ? builtins.currentSystem, nodejs ? pkgs."nodejs_14"}: inherit system;
},
let system ? builtins.currentSystem,
nodejs ? pkgs."nodejs_14",
}: let
nodeEnv = import ./node-env.nix { nodeEnv = import ./node-env.nix {
inherit (pkgs) stdenv lib python2 runCommand writeTextFile writeShellScript; inherit (pkgs) stdenv lib python2 runCommand writeTextFile writeShellScript;
inherit pkgs nodejs; inherit pkgs nodejs;
libtool = if pkgs.stdenv.isDarwin then pkgs.darwin.cctools else null; libtool =
if pkgs.stdenv.isDarwin
then pkgs.darwin.cctools
else null;
}; };
in in
import ./node-packages.nix { import ./node-packages.nix {
inherit (pkgs) fetchurl nix-gitignore stdenv lib fetchgit; inherit (pkgs) fetchurl nix-gitignore stdenv lib fetchgit;
inherit nodeEnv; inherit nodeEnv;
} }

View File

@@ -1,5 +1,8 @@
{ pkgs }: pkgs.threema-desktop.overrideAttrs(prev: { {pkgs}:
postFixup = prev.postFixup + '' pkgs.threema-desktop.overrideAttrs (prev: {
echo "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform=wayland --enable-features=WaylandWindowDecorations}}" >> $out/bin/threema postFixup =
''; prev.postFixup
+ ''
echo "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform=wayland --enable-features=WaylandWindowDecorations}}" >> $out/bin/threema
'';
}) })

View File

@@ -1,10 +1,9 @@
{ pkgs }: {pkgs}: {
{
home-manager.enable = true; home-manager.enable = true;
rbw = import ./programs/bitwarden.nix; rbw = import ./programs/bitwarden.nix;
git = import ./programs/git.nix; git = import ./programs/git.nix;
lazygit.enable = true; lazygit.enable = true;
nixvim = import ./programs/nixvim.nix { inherit pkgs; }; nixvim = import ./programs/nixvim.nix {inherit pkgs;};
fish = { fish = {
enable = true; enable = true;
interactiveShellInit = '' interactiveShellInit = ''

File diff suppressed because it is too large Load Diff

View File

@@ -1,7 +1,11 @@
{ pkgs }: {pkgs}: let
let angular-ls =
angular-ls = (import ../packages/node-packages { inherit pkgs; nodejs = pkgs.nodejs_18; })."@angular/language-server"; (import ../packages/node-packages {
nvim-treesitter-angular = (pkgs.vimUtils.buildVimPlugin { inherit pkgs;
nodejs = pkgs.nodejs_18;
})
."@angular/language-server";
nvim-treesitter-angular = pkgs.vimUtils.buildVimPlugin {
name = "nvim-treesitter-angular"; name = "nvim-treesitter-angular";
src = pkgs.fetchFromGitHub { src = pkgs.fetchFromGitHub {
owner = "dlvandenberg"; owner = "dlvandenberg";
@@ -9,8 +13,8 @@ let
rev = "7549872eb34934c5bc4f4df2ca71196755adfb1c"; rev = "7549872eb34934c5bc4f4df2ca71196755adfb1c";
hash = "sha256-fayRXogWBeV9jDmjXs/u6ULlbCziKIL26pKKh9QJzf8="; hash = "sha256-fayRXogWBeV9jDmjXs/u6ULlbCziKIL26pKKh9QJzf8=";
}; };
}); };
tree-sitter-angular = (pkgs.tree-sitter.buildGrammar { tree-sitter-angular = pkgs.tree-sitter.buildGrammar {
language = "angular"; language = "angular";
version = "624ff10"; version = "624ff10";
src = pkgs.fetchFromGitHub { src = pkgs.fetchFromGitHub {
@@ -19,8 +23,8 @@ let
rev = "e0d7582e1ebbcf6136cfcfb22a37e20f4562acba"; rev = "e0d7582e1ebbcf6136cfcfb22a37e20f4562acba";
hash = "sha256-ADOlhAUidmRKCpDxmo70ZYHgtUIwxrfy0ucACfjkhlQ="; hash = "sha256-ADOlhAUidmRKCpDxmo70ZYHgtUIwxrfy0ucACfjkhlQ=";
}; };
}); };
darkman = (pkgs.vimUtils.buildVimPlugin { darkman = pkgs.vimUtils.buildVimPlugin {
name = "darkman"; name = "darkman";
src = pkgs.buildGoModule rec { src = pkgs.buildGoModule rec {
pname = "darkman.nvim"; pname = "darkman.nvim";
@@ -33,76 +37,113 @@ let
sha256 = "sha256-ssEYdM460I1rufjgh63CEkLi4K+bEWbwku/6gQbytno="; sha256 = "sha256-ssEYdM460I1rufjgh63CEkLi4K+bEWbwku/6gQbytno=";
}; };
postInstall = '' postInstall = ''
cp -r lua $out cp -r lua $out
''; '';
}; };
}); };
in in {
{ enable = true;
enable = true; defaultEditor = true;
defaultEditor = true;
options = { options = {
number = true; number = true;
relativenumber = true; relativenumber = true;
tabstop = 2; tabstop = 2;
softtabstop = 2; softtabstop = 2;
shiftwidth = 2; shiftwidth = 2;
expandtab = true; expandtab = true;
smartindent = true; smartindent = true;
signcolumn = "yes"; signcolumn = "yes";
undodir = { __raw = /* lua */ "os.getenv('HOME') .. '/.config/nvim/undodir'"; }; undodir = {__raw = "os.getenv('HOME') .. '/.config/nvim/undodir'";};
undofile = true; undofile = true;
scrolloff = 8; scrolloff = 8;
termguicolors = true; termguicolors = true;
updatetime = 50; updatetime = 50;
fillchars.eob = " "; fillchars.eob = " ";
}; };
keymaps = [ keymaps = [
{ key = "<leader>u"; mode = "n"; action = "<cmd>:UndotreeToggle<CR>"; } {
{ key = "<leader>ft"; action = "<cmd>:Neotree toggle<CR>"; } key = "<leader>u";
{ key = "<leader>s"; action = "<cmd>:SymbolsOutline<CR>"; } mode = "n";
action = "<cmd>:UndotreeToggle<CR>";
}
{
key = "<leader>ft";
action = "<cmd>:Neotree toggle<CR>";
}
{
key = "<leader>s";
action = "<cmd>:SymbolsOutline<CR>";
}
{ key = "J"; mode = "v"; action = ":m '>+1<CR>gv=gv"; } {
{ key = "K"; mode = "v"; action = ":m '<-2<CR>gv=gv"; } key = "J";
mode = "v";
action = ":m '>+1<CR>gv=gv";
}
{
key = "K";
mode = "v";
action = ":m '<-2<CR>gv=gv";
}
{ key = "<C-d>"; mode = "n"; action = "<C-d>zz"; } {
{ key = "<C-u>"; mode = "n"; action = "<C-d>zz"; } key = "<C-d>";
mode = "n";
action = "<C-d>zz";
}
{
key = "<C-u>";
mode = "n";
action = "<C-d>zz";
}
{ key = "<leader>p"; mode = "x"; action = "\"_dP"; } {
{ key = "<leader>p"; mode = "n"; action = "\"_dP"; } key = "<leader>p";
{ key = "<leader>p"; mode = "v"; action = "\"_dP"; } mode = "x";
]; action = ''"_dP'';
}
{
key = "<leader>p";
mode = "n";
action = ''"_dP'';
}
{
key = "<leader>p";
mode = "v";
action = ''"_dP'';
}
];
globals = { globals = {
minimap_width = 10; minimap_width = 10;
minimap_auto_start = 1; minimap_auto_start = 1;
minimap_auto_start_win_enter = 1; minimap_auto_start_win_enter = 1;
minimap_close_buftypes = [ "nofile" ]; minimap_close_buftypes = ["nofile"];
minimap_block_filetypes = [ "NvimTree" ]; minimap_block_filetypes = ["NvimTree"];
catppuccin_debug = true; catppuccin_debug = true;
mapleader = ";"; mapleader = ";";
}; };
clipboard = { clipboard = {
register = "unnamedplus"; register = "unnamedplus";
providers.wl-copy.enable = true; providers.wl-copy.enable = true;
}; };
extraConfigVim = /* vim */ '' extraConfigVim = ''
hi Normal guibg=NONE ctermbg=NONE hi Normal guibg=NONE ctermbg=NONE
''; '';
extraConfigLua = /* lua */ '' extraConfigLua = ''
require("darkman").setup() require("darkman").setup()
local Terminal = require('toggleterm.terminal').Terminal local Terminal = require('toggleterm.terminal').Terminal
@@ -112,160 +153,222 @@ in
direction = "float", direction = "float",
on_open = function(term) on_open = function(term)
vim.cmd("startinsert!") vim.cmd("startinsert!")
vim.api.nvim_buf_set_keymap(term.bufnr, "n", "q", "<cmd>close<CR>", {noremap = true, silent = true}) vim.api.nvim_buf_set_keymap(term.bufnr, "n", "q", "<cmd>close<CR>", {noremap = true, silent = true})
end, end,
on_close = function(term) on_close = function(term)
vim.cmd("startinsert!") vim.cmd("startinsert!")
end, end,
}) })
function _lazygit_toggle() function _lazygit_toggle()
lazygit:toggle() lazygit:toggle()
end end
vim.api.nvim_set_keymap("n", "<leader>g", "<cmd>lua _lazygit_toggle()<CR>", {noremap = true, silent = true}) vim.api.nvim_set_keymap("n", "<leader>g", "<cmd>lua _lazygit_toggle()<CR>", {noremap = true, silent = true})
''; '';
colorschemes.catppuccin = { colorschemes.catppuccin = {
enable = true; enable = true;
transparentBackground = true; transparentBackground = true;
background = { background = {
dark = "frappe"; dark = "frappe";
light = "latte"; light = "latte";
};
}; };
};
plugins = { plugins = {
lualine = { lualine = {
enable = true; enable = true;
globalstatus = true; globalstatus = true;
sectionSeparators = { left = ""; right = ""; }; sectionSeparators = {
componentSeparators = { left = ""; right = ""; }; left = "";
sections = { right = "";
lualine_a = [ { name = "mode"; separator = { right = ""; left = ""; }; icon = ""; } ];
lualine_z = [ { name = "location"; separator = { right = ""; left = ""; }; } ];
};
}; };
auto-save = { componentSeparators = {
enable = true; left = "";
triggerEvents = [ "FocusLost" "CursorHold" "BufLeave" ]; right = "";
}; };
indent-blankline = { sections = {
enable = true; lualine_a = [
indent.char = "";
};
illuminate.enable = true;
nvim-autopairs.enable = true;
nvim-colorizer.enable = true;
copilot-vim.enable = true;
neo-tree = {
enable = true;
filesystem.filteredItems.visible = true;
eventHandlers = {
file_opened = /* lua */ ''
function()
require('neo-tree').close_all()
end
'';
};
};
undotree.enable = true;
toggleterm = {
enable = true;
openMapping = "<leader>t";
direction = "vertical";
size = 60;
};
telescope = {
enable = true;
keymaps = {
"<leader>ff" = "git_files";
"<leader>fa" = "find_files";
"<leader>fg" = "live_grep";
"<leader>fb" = "buffers";
"<leader>fh" = "help_tags";
};
};
treesitter = {
enable = true;
indent = true;
grammarPackages = pkgs.vimPlugins.nvim-treesitter.allGrammars ++ [tree-sitter-angular];
};
none-ls.enable = true;
lsp-format.enable = true;
lsp = {
enable = true;
keymaps = {
diagnostic = {
};
};
enabledServers = [
{ {
name = "angularls"; name = "mode";
extraOptions = { separator = {
cmd = ["${angular-ls}" "--stdio" "--tsProbeLocations" "${pkgs.nodePackages.typescript-language-server}" "--ngProbeLocations" "${angular-ls}"]; right = "";
left = "";
};
icon = "";
}
];
lualine_z = [
{
name = "location";
separator = {
right = "";
left = "";
}; };
} }
]; ];
servers = {
html.enable = true;
cssls.enable = true;
svelte.enable = true;
eslint.enable = true;
tsserver.enable = true;
yamlls.enable = true;
jsonls.enable = true;
taplo.enable = true;
rust-analyzer.enable = true;
pylsp.enable = true;
nixd.enable = true;
bashls.enable = true;
};
}; };
};
lspkind = { auto-save = {
enable = true; enable = true;
mode = "symbol"; triggerEvents = ["FocusLost" "BufLeave"];
cmp.after = /* lua */ '' };
function(entry, vim_item, kind) indent-blankline = {
kind.kind = kind.kind .. " "; enable = true;
return kind indent.char = "";
end };
illuminate.enable = true;
nvim-autopairs.enable = true;
nvim-colorizer.enable = true;
copilot-vim.enable = true;
neo-tree = {
enable = true;
filesystem.filteredItems.visible = true;
eventHandlers = {
file_opened = ''
function()
require('neo-tree').close_all()
end
''; '';
}; };
nvim-cmp = { };
enable = true; undotree.enable = true;
mapping = { toggleterm = {
"<C-n>" = /* lua */ "cmp.mapping.select_next_item({behavior = cmp.SelectBehavior.Select})"; enable = true;
"<C-p>" = /* lua */ "cmp.mapping.select_prev_item({behavior = cmp.SelectBehavior.Select})"; openMapping = "<leader>t";
"<C-Space>" = /* lua */ "cmp.mapping.confirm({select = true})"; direction = "vertical";
"<C-Enter>" = /* lua */ "cmp.mapping.complete()"; size = 60;
};
sources = [
{ name = "path"; }
{ name = "nvim_lsp"; }
{ name = "npm"; }
{ name = "treesitter"; }
];
formatting.fields = [ "kind" "abbr" "menu" ];
window.completion.border = "rounded";
};
nix.enable = true;
}; };
extraPackages = [ angular-ls pkgs.nodePackages.typescript-language-server ]; telescope = {
extraPlugins = with pkgs.vimPlugins; [ enable = true;
nvim-treesitter-angular keymaps = {
vim-startuptime "<leader>ff" = "git_files";
darkman "<leader>fa" = "find_files";
]; "<leader>fg" = "live_grep";
} "<leader>fb" = "buffers";
"<leader>fh" = "help_tags";
};
};
treesitter = {
enable = true;
indent = true;
grammarPackages =
pkgs.vimPlugins.nvim-treesitter.allGrammars
++ [tree-sitter-angular];
nixvimInjections = true;
};
none-ls = {
enable = true;
sources = {
code_actions = {
eslint.enable = true;
shellcheck.enable = true;
};
diagnostics = {
eslint.enable = true;
shellcheck.enable = true;
};
formatting = {
alejandra.enable = true;
prettier.enable = true;
rustfmt.enable = true;
shfmt.enable = true;
stylua.enable = true;
};
};
onAttach = ''
function(client, bufnr)
if client.supports_method("textDocument/formatting") then
vim.api.nvim_clear_autocmds({ group = augroup, buffer = bufnr })
vim.api.nvim_create_autocmd("BufWritePre", {
group = augroup,
buffer = bufnr,
callback = function()
vim.lsp.buf.format({async = false})
end,
})
end
end
'';
};
lsp = {
enable = true;
keymaps = {diagnostic = {};};
enabledServers = [
{
name = "angularls";
extraOptions = {
cmd = [
"${angular-ls}"
"--stdio"
"--tsProbeLocations"
"${pkgs.nodePackages.typescript-language-server}"
"--ngProbeLocations"
"${angular-ls}"
];
};
}
];
servers = {
html.enable = true;
cssls.enable = true;
svelte.enable = true;
tsserver.enable = true;
yamlls.enable = true;
jsonls.enable = true;
taplo.enable = true;
rust-analyzer.enable = true;
pylsp.enable = true;
nixd.enable = true;
lua-ls.enable = true;
bashls.enable = true;
};
};
lspkind = {
enable = true;
mode = "symbol";
cmp.after = ''
function(entry, vim_item, kind)
kind.kind = kind.kind .. " ";
return kind
end
'';
};
nvim-cmp = {
enable = true;
mapping = {
"<C-n>" = "cmp.mapping.select_next_item({behavior = cmp.SelectBehavior.Select})";
"<C-p>" = "cmp.mapping.select_prev_item({behavior = cmp.SelectBehavior.Select})";
"<C-Space>" = "cmp.mapping.confirm({select = true})";
"<C-Enter>" = "cmp.mapping.complete()";
};
sources = [
{name = "path";}
{name = "nvim_lsp";}
{name = "npm";}
{name = "treesitter";}
];
formatting.fields = ["kind" "abbr" "menu"];
window.completion.border = "rounded";
};
nix.enable = true;
};
extraPackages = [angular-ls pkgs.nodePackages.typescript-language-server];
extraPlugins = with pkgs.vimPlugins; [
nvim-treesitter-angular
vim-startuptime
darkman
];
}

View File

@@ -1,5 +1,7 @@
{ pkgs, homeDirectory }:
{ {
pkgs,
homeDirectory,
}: {
gpg-agent = { gpg-agent = {
enable = true; enable = true;
enableSshSupport = true; enableSshSupport = true;
@@ -24,7 +26,7 @@
vendorHash = "sha256-xEPmNnaDwFU4l2G4cMvtNeQ9KneF5g9ViQSFrDkrafY="; vendorHash = "sha256-xEPmNnaDwFU4l2G4cMvtNeQ9KneF5g9ViQSFrDkrafY=";
nativeBuildInputs = [ pkgs.scdoc ]; nativeBuildInputs = [pkgs.scdoc];
postPatch = '' postPatch = ''
substituteInPlace darkman.service \ substituteInPlace darkman.service \
@@ -45,13 +47,13 @@
runHook preInstall runHook preInstall
make PREFIX=$out install make PREFIX=$out install
runHook postInstall runHook postInstall
''; '';
meta = with pkgs.lib; { meta = with pkgs.lib; {
description = "Framework for dark-mode and light-mode transitions on Linux desktop"; description = "Framework for dark-mode and light-mode transitions on Linux desktop";
homepage = "https://gitlab.com/WhyNotHugo/darkman"; homepage = "https://gitlab.com/WhyNotHugo/darkman";
license = licenses.isc; license = licenses.isc;
maintainers = [ maintainers.ajgrf ]; maintainers = [maintainers.ajgrf];
platforms = platforms.linux; platforms = platforms.linux;
mainProgram = "darkman"; mainProgram = "darkman";
}; };
@@ -61,25 +63,41 @@
lng = 13.405; lng = 13.405;
}; };
darkModeScripts = { darkModeScripts = {
gtk-theme = /* bash */ '' gtk-theme =
${pkgs.dconf}/bin/dconf write \ /*
/org/gnome/desktop/interface/color-scheme "'prefer-dark'" bash
''; */
kitty-theme = /* bash */ '' ''
${pkgs.kitty}/bin/kitty +kitten themes --reload-in=all --config-file-name ${homeDirectory}/.config/kitty/current-colors.conf Catppuccin-Frappe ${pkgs.dconf}/bin/dconf write \
''; /org/gnome/desktop/interface/color-scheme "'prefer-dark'"
'';
kitty-theme =
/*
bash
*/
''
${pkgs.kitty}/bin/kitty +kitten themes --reload-in=all --config-file-name ${homeDirectory}/.config/kitty/current-colors.conf Catppuccin-Frappe
'';
wallpaper = '' wallpaper = ''
${pkgs.swww}/bin/swww img ${./Lakeside-2/Lakeside-2-1.jpg} ${pkgs.swww}/bin/swww img ${./Lakeside-2/Lakeside-2-1.jpg}
''; '';
}; };
lightModeScripts = { lightModeScripts = {
gtk-theme = /* bash */ '' gtk-theme =
${pkgs.dconf}/bin/dconf write \ /*
/org/gnome/desktop/interface/color-scheme "'prefer-light'" bash
''; */
kitty-theme = /* bash */ '' ''
${pkgs.kitty}/bin/kitty +kitten themes --reload-in=all --config-file-name ${homeDirectory}/.config/kitty/current-colors.conf Catppuccin-Latte ${pkgs.dconf}/bin/dconf write \
''; /org/gnome/desktop/interface/color-scheme "'prefer-light'"
'';
kitty-theme =
/*
bash
*/
''
${pkgs.kitty}/bin/kitty +kitten themes --reload-in=all --config-file-name ${homeDirectory}/.config/kitty/current-colors.conf Catppuccin-Latte
'';
wallpaper = '' wallpaper = ''
${pkgs.swww}/bin/swww img ${./Lakeside-2/Lakeside-2-10.jpg} ${pkgs.swww}/bin/swww img ${./Lakeside-2/Lakeside-2-10.jpg}
''; '';

View File

@@ -4,7 +4,7 @@ info=$(curl --silent --fail --show-error "https://download.jetbrains.com/idea/id
checksum=$(echo $info | grep -oE '^[0-9a-f]{64}') checksum=$(echo $info | grep -oE '^[0-9a-f]{64}')
filename=$(echo $info | grep -oE '[^* ]+$') filename=$(echo $info | grep -oE '[^* ]+$')
if [ -z "${checksum}" ] || [ -z "${filename}" ]; then if [ -z "${checksum}" ] || [ -z "${filename}" ]; then
exit -1 exit -1
fi fi
echo "Filename: $filename" echo "Filename: $filename"
echo "Checksum: $checksum" echo "Checksum: $checksum"
@@ -15,4 +15,3 @@ sed -i "s|sha256\s*=.*|sha256 = \"$checksum\";|" "$nixFile"
echo "" echo ""
echo "IntelliJ updated to $1" echo "IntelliJ updated to $1"