This commit is contained in:
Varris 2023-07-01 20:47:43 +02:00
parent 552358750f
commit 89be9dade3
20 changed files with 383 additions and 272 deletions

View File

@ -48,10 +48,10 @@
'';
};
# Set your time zone.
# Set your time zone.
time.timeZone = "Europe/Vienna";
# Select internationalisation properties.
# Select internationalisation properties.
i18n = {
defaultLocale = "en_US.UTF-8";
extraLocaleSettings = {
@ -68,13 +68,12 @@
keyMap = "us-acentos";
};
#chaotic.mesa-git.enable = true; # requires --impure for now
# chaotic.mesa-git.enable = true;
hardware.opengl = {
enable = true;
extraPackages = [ pkgs.libvdpau-va-gl ];
driSupport = true;
driSupport32Bit = true;
};
@ -88,7 +87,7 @@
extraBackends = [ pkgs.sane-airscan ];
};
# Enable sound.
# Enable sound.
sound.enable = true;
security = {
@ -123,8 +122,26 @@
environment = {
systemPackages = with pkgs; [
bc compsize distrobox fd file git htop links2 libsForQt5.dolphin
libsForQt5.kio-extras lm_sensors nvtop-amd openrgb p7zip pciutils ripgrep unrar unzip usbutils
bc
compsize
distrobox
fd
file
git
htop
kdiskmark
links2
libsForQt5.dolphin
libsForQt5.kio-extras
lm_sensors
nvtop-amd
openrgb
p7zip
pciutils
ripgrep
unrar
unzip
usbutils
];
};
@ -224,10 +241,12 @@
};
settings = {
auto-optimise-store = true;
substituters = [
"https://nyx.chaotic.cx"
"https://hyprland.cachix.org"
];
trusted-public-keys = [
"nyx.chaotic.cx-1:HfnXSw4pj95iI/n17rIDy40agHj12WfF+Gqk6SonIT8="
"chaotic-nyx.cachix.org-1:HfnXSw4pj95iI/n17rIDy40agHj12WfF+Gqk6SonIT8="

View File

@ -4,22 +4,60 @@
inputs = {
nixpkgs.url = "nixpkgs/nixpkgs-unstable";
home-manager.url = "github:nix-community/home-manager";
chaotic-nyx.url = "github:chaotic-cx/nyx/nyxpkgs-unstable";
nix-index-database = {
url = "github:Mic92/nix-index-database";
inputs.nixpkgs.follows = "nixpkgs";
};
hyprland = {
url = "github:hyprwm/hyprland";
inputs.nixpkgs.follows = "nixpkgs";
};
hyprland.url = "github:hyprwm/hyprland/v0.26.0";
hyprland-contrib.url = "github:hyprwm/contrib";
hyprpicker.url = "github:hyprwm/hyprpicker";
gruvbox-kvantum = { url = "github:thefallnn/Gruvbox-Kvantum"; flake = false; };
gruvbox-kvantum = {
url = "github:thefallnn/Gruvbox-Kvantum";
flake = false;
};
fish-plugin-bobthefish = { url = "github:oh-my-fish/theme-bobthefish"; flake = false; };
fish-plugin-gruvbox-theme = { url = "github:Jomik/fish-gruvbox"; flake = false; };
fish-plugin-bobthefish = {
url = "github:oh-my-fish/theme-bobthefish";
flake = false;
};
arrpc = { url = "github:notashelf/arrpc-flake"; inputs.nixpkgs.follows = "nixpkgs"; };
chaotic-nyx.url = "github:chaotic-cx/nyx/nyxpkgs-unstable";
grub2-themes = { url = "github:vinceliuice/grub2-themes"; inputs.nixpkgs.follows = "nixpkgs"; };
openmw-git = { url = "gitlab:OpenMW/openmw"; flake = false; };
waybar = { url = "github:alexays/waybar"; flake = false; };
xorg-git = { url = "gitlab:xorg/xserver?host=gitlab.freedesktop.org"; flake = false; };
fish-plugin-gruvbox-theme = {
url = "github:Jomik/fish-gruvbox";
flake = false;
};
grub2-themes = {
url = "github:vinceliuice/grub2-themes";
inputs.nixpkgs.follows = "nixpkgs";
};
nixd = {
url = "github:nix-community/nixd";
inputs.nixpkgs.follows = "nixpkgs";
};
openmw-git = {
url = "gitlab:OpenMW/openmw";
flake = false;
};
waybar = {
url = "github:alexays/waybar";
flake = false;
};
xorg-git = {
url = "gitlab:xorg/xserver?host=gitlab.freedesktop.org";
flake = false;
};
};
outputs = { self, nixpkgs, home-manager, ... }@inputs:
@ -39,6 +77,7 @@
inputs.chaotic-nyx.overlays.default
inputs.hyprland-contrib.overlays.default
inputs.hyprpicker.overlays.default
inputs.nixd.overlays.default
];
};
in
@ -57,8 +96,7 @@
nix.registry.nixpkgs.flake = nixpkgs;
}
./configuration.nix
home-manager.nixosModules.home-manager
{
home-manager.nixosModules.home-manager {
home-manager = {
useUserPackages = true;
users.manuel = import ./user/home.nix;
@ -73,4 +111,3 @@
};
};
}

View File

@ -5,7 +5,8 @@
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
[
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "amdgpu" "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
@ -14,23 +15,27 @@
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/33112a66-7f9a-482c-b14c-91490f2212c2";
{
device = "/dev/disk/by-uuid/33112a66-7f9a-482c-b14c-91490f2212c2";
fsType = "btrfs";
options = [ "subvol=@nixos" "compress=zstd" ];
};
fileSystems."/mnt/hdd" =
{ device = "/dev/disk/by-uuid/ecbbfb05-ada8-4044-81a6-9a280f93802f";
{
device = "/dev/disk/by-uuid/ecbbfb05-ada8-4044-81a6-9a280f93802f";
fsType = "xfs";
};
fileSystems."/home" =
{ device = "/dev/disk/by-uuid/4dd7a8ea-311a-458b-8839-1d92c7abab1f";
{
device = "/dev/disk/by-uuid/4dd7a8ea-311a-458b-8839-1d92c7abab1f";
fsType = "xfs";
};
fileSystems."/boot/efi" =
{ device = "/dev/disk/by-uuid/D56E-61DC";
{
device = "/dev/disk/by-uuid/D56E-61DC";
fsType = "vfat";
};

View File

@ -4,7 +4,7 @@
arrpc = inputs.arrpc.packages.${prev.system}.arrpc;
gruvbox-plus-icon-pack = prev.callPackage ./pkgs/gruvbox-plus-icon-pack {};
gruvbox-plus-icon-pack = prev.callPackage ./pkgs/gruvbox-plus-icon-pack { };
ncmpcpp = prev.ncmpcpp.override {
visualizerSupport = true;
@ -20,7 +20,7 @@
buildInputs = old.buildInputs ++ [ prev.libyamlcpp prev.luajit ];
patches = [];
patches = [ ];
dontWrapQtApps = false;
});
@ -46,14 +46,5 @@
"-Dcava=disabled"
];
});
xwayland = prev.xwayland.overrideAttrs (old: {
version = "9999";
src = inputs.xorg-git;
buildInputs = old.buildInputs ++ [
prev.udev
prev.xorg.libpciaccess
];
});
};
}

View File

@ -19,9 +19,7 @@ stdenvNoCC.mkDerivation rec {
mkdir -p $out/share/icons/GruvboxPlus
cp -r * $out/share/icons/GruvboxPlus
for theme in $out/share/icons/*; do
gtk-update-icon-cache $theme
done
gtk-update-icon-cache $out/share/icons/GruvboxPlus
'';
dontDropIconThemeCache = true;

View File

@ -1,10 +1,5 @@
{ config, pkgs, inputs, ... }:
{
programs.exa = {
enable = true;
enableAliases = true;
};
programs.fish = {
enable = true;
@ -49,8 +44,10 @@
'';
};
shellAliases = {
nf = "${pkgs.neofetch}/bin/neofetch";
e = "nvim";
ls = "${pkgs.exa}/bin/exa --icons";
ll = "${pkgs.exa}/bin/exa --icons -l";
nf = "${pkgs.neofetch}/bin/neofetch";
};
};
}

View File

@ -63,7 +63,6 @@ cmp.setup({
{ name = "buffer" },
{ name = "path" },
{ name = "nvim_lsp" },
{ name = "nvim_lsp_signature_help"},
{ name = "luasnip" },
}),

View File

@ -1,5 +1,5 @@
require("gruvbox").setup({
--transparent_mode = true
transparent_mode = true
})
vim.cmd("colorscheme gruvbox")

View File

@ -1,14 +1,14 @@
require("plugins.colorscheme")
require("plugins.lualine")
require("plugins.bufferline")
require("plugins.treesitter")
require("plugins.lspconfig")
require("plugins.cmp")
require("plugins.telescope")
require("plugins.colorizer")
require("plugins.dressing")
require("plugins.autopairs")
require("plugins.bufferline")
require("plugins.cmp")
require("plugins.colorizer")
require("plugins.colorscheme")
require("plugins.comment")
require("plugins.dressing")
require("plugins.lspconfig")
require("plugins.lualine")
require("plugins.smartsplits")
require("plugins.telescope")
require("plugins.treesitter")
require("plugins.trouble")
require("plugins.which-key")

View File

@ -1,9 +1,24 @@
local capabilities = require('cmp_nvim_lsp').default_capabilities()
capabilities.textDocument.completion.completionItem.snippetSupport = true
capabilities.textDocument.foldingRange = {
dynamicRegistration = false,
lineFoldingOnly = true,
}
local lspconfig = require("lspconfig")
lspconfig.rnix.setup { capabilities = capabilities }
local null_ls = require("null-ls")
local null_ls_formatting = null_ls.builtins.formatting
null_ls.setup({
sources = {
null_ls_formatting.prettier,
null_ls_formatting.nixpkgs_fmt,
},
})
lspconfig.nixd.setup { capabilities = capabilities }
lspconfig.lua_ls.setup {
capabilities = capabilities,

View File

@ -1 +1,8 @@
require("smart-splits").setup()
require("smart-splits").setup({
ignored_filetypes = {
"neo-tree",
"nofile",
"quickfix",
"prompt",
}
})

View File

@ -1,3 +1,7 @@
vim.o.timeoutlen = 100
require("which-key").setup()
require("which-key").setup({
window = {
padding = { 1, 5, 1, 5}
},
})

View File

@ -1,12 +1,37 @@
local telescope_builtin = require("telescope.builtin")
local map = vim.keymap.set
local telescope_builtin = require("telescope.builtin")
local smart_splits = require("smart-splits")
map( "n", "<S-h>", "<cmd>BufferLineCyclePrev<CR>", { desc = "Prev buffer" })
map( "n", "<S-l>", "<cmd>BufferLineCycleNext<CR>", { desc = "Next buffer" })
map( {"n", "i" }, "<ESC>", "<cmd>noh<CR><ESC>",{ desc = "Escape and clear hlsearch"})
map( { "n", "i" }, "<ESC>", "<cmd>noh<CR><ESC>",{ desc = "Escape and clear hlsearch"})
map( "n", "<Leader>ff", telescope_builtin.find_files, { desc = "Find Files" })
map( "n", "<Leader>fb", telescope_builtin.buffers, { desc = "List Buffers" })
map( "n", "<Leader>fh", telescope_builtin.help_tags, { desc = "Help Tags" })
map( "n", "<Leader>fp", telescope_builtin.git_files, { desc = "Find Files (Git)" })
map( "n", "<Leader>fc", function()
telescope_builtin.git_files({ cwd = "~/.dotfiles"})
end, { desc = "Edit Dotfiles" })
map( "n", "<C-n>", "<cmd>NeoTreeFocusToggle<CR>", { desc = "Open NeoTree" })
map( {"n", "x"}, "ga", ":EasyAlign", { desc = "Align text" })
-- resizing splits
map('n', '<A-h>', smart_splits.resize_left)
map('n', '<A-j>', smart_splits.resize_down)
map('n', '<A-k>', smart_splits.resize_up)
map('n', '<A-l>', smart_splits.resize_right)
-- moving between splits
map('n', '<C-h>', smart_splits.move_cursor_left)
map('n', '<C-j>', smart_splits.move_cursor_down)
map('n', '<C-k>', smart_splits.move_cursor_up)
map('n', '<C-l>', smart_splits.move_cursor_right)
-- swapping buffers between windows
map('n', '<leader><leader>h', smart_splits.swap_buf_left)
map('n', '<leader><leader>j', smart_splits.swap_buf_down)
map('n', '<leader><leader>k', smart_splits.swap_buf_up)
map('n', '<leader><leader>l', smart_splits.swap_buf_right)
-- null-ls
map( 'n', "<Leader>lf", vim.lsp.buf.format, { desc = "Format file"})

View File

@ -8,6 +8,7 @@ vim.o.smartindent = true
vim.o.background = "dark"
vim.o.clipboard = "unnamedplus"
vim.o.mouse = ""
vim.o.termguicolors = true
vim.o.ignorecase = true
vim.o.smartcase = true
@ -20,5 +21,7 @@ vim.o.backup = false
vim.o.undodir = os.getenv("HOME") .. "/.local/share/nvim/undodir"
vim.o.undofile = true
vim.o.scrolloff = 8
vim.wo.number = true
vim.wo.relativenumber = true

View File

@ -18,8 +18,8 @@
nvim-web-devicons
which-key-nvim
smart-splits-nvim
legendary-nvim
vim-easy-align
mini-nvim
vim-fugitive
@ -28,6 +28,7 @@
telescope-ui-select-nvim
telescope-undo-nvim
null-ls-nvim
nvim-lspconfig
nvim-treesitter.withAllGrammars
trouble-nvim
@ -36,9 +37,9 @@
cmp-buffer
cmp-cmdline
cmp-nvim-lsp
cmp-nvim-lsp-signature-help
cmp-path
cmp_luasnip
cmp-nvim-lsp-signature-help
friendly-snippets
lspkind-nvim
];
@ -48,8 +49,10 @@
clang-tools
lua-language-server
python3Packages.jedi-language-server
rnix-lsp
nixpkgs-fmt
nixd
rust-analyzer
stylua
nodePackages.vscode-css-languageserver-bin
zls
];
@ -60,4 +63,3 @@
recursive = true;
};
}

View File

@ -103,8 +103,8 @@ in
misc {
vfr = true
vrr = 2
enable_swallow = true
swallow_regex = ^(foot)$
# enable_swallow = true
# swallow_regex = ^(foot)$
}
decoration {
@ -133,7 +133,7 @@ in
exec-once = ${pkgs.openrgb}/bin/openrgb --startminimized --profile autorun.orp
exec-once = ${pkgs.blueman}/bin/blueman-applet
exec-once = ${pkgs.networkmanagerapplet}/bin/nm-applet --indicator
exec-once = ${pkgs.mullvad-vpn}/bin/mullvad-gui
# exec-once = ${pkgs.mullvad-vpn}/bin/mullvad-gui
exec-once = ${xwaylandSetPrimary}/bin/xwayland-setprimary.sh
exec-once = ${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1
exec-once = ${pkgs.swww}/bin/swww-daemon
@ -142,9 +142,9 @@ in
exec = ${wob-voldaemon}/bin/wob-volumeindicator.sh;
exec = pkill waybar; ${pkgs.waybar_hyprland}/bin/waybar
#Set cursor
exec = ${pkgs.hyprland}/bin/hyprctl setcursor "${config.gtk.cursorTheme.name}" 32 &> /dev/null
exec = ${pkgs.hyprland}/bin/hyprctl setcursor "${config.gtk.cursorTheme.name}" ${builtins.toString config.gtk.cursorTheme.size} &> /dev/null
env = XCURSOR_SIZE,32
env = XCURSOR_SIZE,${builtins.toString config.gtk.cursorTheme.size}
#keybinds
bind = ${modKey}, 1, workspace, 1

View File

@ -14,6 +14,7 @@
./configs/xdg-mime.nix
./configs/kvantum
./configs/tmux
inputs.nix-index-database.hmModules.nix-index
];
home.username = "manuel";
@ -21,6 +22,7 @@
home.packages = with pkgs; [
appimage-run
bc
bottles
bottom
calcurse
gimp
@ -29,9 +31,11 @@
gnome.gvfs
gnome.seahorse
gnome.simple-scan
heroic
libsForQt5.dolphin
libsForQt5.dolphin-plugins
lutris
mangohud
mesa-demos
nerdfonts
noto-fonts-cjk-sans
@ -66,11 +70,15 @@
RADV_PERFTEST = "gpl";
WINEDLLOVERRIDES = "winemenubuilder.exe=d";
XDG_SCREENSHOTS_DIR = "~/Screenshots";
WLR_NO_HARDWARE_CURSORS = "1";
# WLR_NO_HARDWARE_CURSORS = "1";
};
fonts.fontconfig.enable = true;
programs.exa = {
enable = true;
};
programs.keychain = {
enable = true;
enableFishIntegration = true;
@ -138,6 +146,7 @@
enable = true;
enableFishIntegration = true;
};
nix-index-database.comma.enable = true;
};
services.gnome-keyring.enable = true;