This commit is contained in:
cnst
2024-06-22 22:35:13 +02:00
parent bd872d5985
commit b2aec1af0d
5 changed files with 168 additions and 23 deletions

6
flake.lock generated
View File

@@ -351,11 +351,11 @@
"pre-commit-hooks": "pre-commit-hooks" "pre-commit-hooks": "pre-commit-hooks"
}, },
"locked": { "locked": {
"lastModified": 1719068614, "lastModified": 1719085595,
"narHash": "sha256-XTVc7z7HJiX1j4zVCm9+V3223f4FQuNt5lZKgOeMzNA=", "narHash": "sha256-Dvk+5eKgRwrTkx8FF6RceQP3+oEtQ+HYHNuM1MLtYcE=",
"owner": "cnsta", "owner": "cnsta",
"repo": "cnixvim", "repo": "cnixvim",
"rev": "ef0e10e815060ff243ba85d56f63e84f434d2717", "rev": "4a3f231c6e979b77ccdae4c6766e231b821a50b1",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@@ -10,9 +10,9 @@
url = "https://flakehub.com/f/Svenum/Solaar-Flake/*.tar.gz"; url = "https://flakehub.com/f/Svenum/Solaar-Flake/*.tar.gz";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
# Nixvim # Neovim Nightly
nixvim = { neovim-nightly-overlay = {
url = "github:cnsta/cnixvim"; url = "github:nix-community/neovim-nightly-overlay";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
# Home manager # Home manager

View File

@@ -9,11 +9,7 @@
}: { }: {
# You can import other home-manager modules here # You can import other home-manager modules here
imports = [ imports = [
# If you want to use home-manager modules from other flakes (such as nix-colors): ./neovim
# inputs.nix-colors.homeManagerModule
# You can also split up your configuration and import pieces of it here:
# ./nvim.nix
]; ];
nixpkgs = { nixpkgs = {
@@ -58,7 +54,7 @@
xfce.thunar xfce.thunar
xfce.thunar-volman xfce.thunar-volman
xfce.thunar-archive-plugin xfce.thunar-archive-plugin
xarchiver gnome.file-roller
gvfs gvfs
swaybg swaybg
wireguard-tools wireguard-tools
@@ -77,10 +73,6 @@
fastfetch fastfetch
waybar waybar
nwg-look nwg-look
lxappearance
orchis-theme
gruvbox-plus-icons
gruvbox-gtk-theme
mullvad-vpn mullvad-vpn
thefuck thefuck
calcurse calcurse
@@ -91,27 +83,40 @@
# programs.waybar.enable = true; # programs.waybar.enable = true;
wayland.windowManager.hyprland = { wayland.windowManager.hyprland = {
# Whether to enable Hyprland wayland compositor
enable = true; enable = true;
# The hyprland package to use
package = pkgs.hyprland; package = pkgs.hyprland;
# Whether to enable XWayland
xwayland.enable = true; xwayland.enable = true;
extraConfig = '' extraConfig = ''
${builtins.readFile ./hypr/hyprland.conf} ${builtins.readFile ./hypr/hyprland.conf}
''; '';
# Optional
# Whether to enable hyprland-session.target on hyprland startup
systemd.enable = true; systemd.enable = true;
}; };
xdg.portal.extraPortals = [pkgs.xdg-desktop-portal-gtk];
home.sessionVariables = { home.sessionVariables = {
MOZ_ENABLE_WAYLAND = 1; MOZ_ENABLE_WAYLAND = 1;
NIXOS_OZONE_WL = 1;
SDL_VIDEODRIVER = "wayland";
QT_QPA_PLATFORM = "wayland"; QT_QPA_PLATFORM = "wayland";
GTK_THEME = "Orchis-Grey-Dark"; QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
}; };
xdg.portal.extraPortals = [pkgs.xdg-desktop-portal-wlr]; gtk = {
enable = true;
theme = {
package = pkgs.orchis-theme;
name = "Orchis-Grey-Dark-Compact";
};
iconTheme = {
package = pkgs.gruvbox-plus-icons;
name = "Gruvbox-Plus-Dark";
};
font = {
name = "FiraCode Nerd Font Light";
size = 11;
};
};
programs = { programs = {
home-manager.enable = true; home-manager.enable = true;

View File

@@ -0,0 +1,131 @@
{ pkgs, ... }:
with pkgs;
let
tools = [
fswatch # File watcher utility, replacing libuv.fs_event for neovim 10.0
fzf
git
sqlite
tree-sitter
];
c = [
clang
clang-tools
cmake
gcc
gnumake
];
gamedev = [
# parser, linter and formatter for GDScript
gdtoolkit_3
gdtoolkit_4
];
golang = [
delve # debugger
go
gofumpt
goimports-reviser
golines
gopls
gotools
];
haskell = [
haskell-language-server
ghc
];
lua = [
lua-language-server
stylua
];
markup = [
cbfmt # format codeblocks
codespell
markdownlint-cli
mdformat
typst-lsp
];
nix = [
alejandra
nixd
nixfmt-rfc-style
nixpkgs-fmt
statix
];
python = [
black
isort
python311Packages.jedi-language-server
ruff
ruff-lsp
];
rust = [
rustToolchain
bacon # background code check
];
rustToolchain = pkgs.fenix.stable.withComponents [
"cargo"
"clippy"
"rust-src"
"rustc"
"rustfmt"
"rust-analyzer"
];
shell = [
nodePackages.bash-language-server
shellcheck
shfmt
];
web = [
deno
nodePackages.sql-formatter
nodePackages.typescript-language-server
nodejs
prettierd # multi-language formatters
vscode-langservers-extracted
yarn
];
extraPackages =
tools
++ c
++ gamedev
++ golang
++ haskell
++ lua
++ markup
++ nix
++ python
++ rust
++ shell
++ web;
in
{
# for quick development
home.packages = rust;
programs.neovim = {
enable = true;
defaultEditor = true;
package = pkgs.neovim-unwrapped;
plugins = with pkgs.vimPlugins; [ telescope-cheat-nvim ];
inherit extraPackages;
};
programs.helix = {
enable = true;
inherit extraPackages;
};
}

View File

@@ -89,6 +89,9 @@
pkgs.python312Packages.oauth2 pkgs.python312Packages.oauth2
pkgs.python312Packages.httplib2 pkgs.python312Packages.httplib2
pkgs.killall pkgs.killall
pkgs.alejandra
pkgs.tree-sitter
pkgs.lazygit
]; ];
localBinInPath = true; localBinInPath = true;
}; };
@@ -129,6 +132,12 @@
programs = { programs = {
solaar.enable = true; solaar.enable = true;
nix-ld.enable = true;
adb.enable = true;
neovim = {
enable = true;
defaultEditor = true;
};
hyprland = { hyprland = {
enable = true; enable = true;
xwayland.enable = true; xwayland.enable = true;