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

View File

@ -4,22 +4,60 @@
inputs = { inputs = {
nixpkgs.url = "nixpkgs/nixpkgs-unstable"; nixpkgs.url = "nixpkgs/nixpkgs-unstable";
home-manager.url = "github:nix-community/home-manager"; 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"; hyprland-contrib.url = "github:hyprwm/contrib";
hyprpicker.url = "github:hyprwm/hyprpicker"; 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-bobthefish = {
fish-plugin-gruvbox-theme = { url = "github:Jomik/fish-gruvbox"; flake = false; }; url = "github:oh-my-fish/theme-bobthefish";
flake = false;
};
arrpc = { url = "github:notashelf/arrpc-flake"; inputs.nixpkgs.follows = "nixpkgs"; }; fish-plugin-gruvbox-theme = {
chaotic-nyx.url = "github:chaotic-cx/nyx/nyxpkgs-unstable"; url = "github:Jomik/fish-gruvbox";
grub2-themes = { url = "github:vinceliuice/grub2-themes"; inputs.nixpkgs.follows = "nixpkgs"; }; flake = false;
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; }; 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: outputs = { self, nixpkgs, home-manager, ... }@inputs:
@ -39,6 +77,7 @@
inputs.chaotic-nyx.overlays.default inputs.chaotic-nyx.overlays.default
inputs.hyprland-contrib.overlays.default inputs.hyprland-contrib.overlays.default
inputs.hyprpicker.overlays.default inputs.hyprpicker.overlays.default
inputs.nixd.overlays.default
]; ];
}; };
in in
@ -57,8 +96,7 @@
nix.registry.nixpkgs.flake = nixpkgs; nix.registry.nixpkgs.flake = nixpkgs;
} }
./configuration.nix ./configuration.nix
home-manager.nixosModules.home-manager home-manager.nixosModules.home-manager {
{
home-manager = { home-manager = {
useUserPackages = true; useUserPackages = true;
users.manuel = import ./user/home.nix; users.manuel = import ./user/home.nix;
@ -73,4 +111,3 @@
}; };
}; };
} }

View File

@ -5,7 +5,8 @@
{ {
imports = 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" ]; boot.initrd.availableKernelModules = [ "amdgpu" "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
@ -14,23 +15,27 @@
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
fileSystems."/" = fileSystems."/" =
{ device = "/dev/disk/by-uuid/33112a66-7f9a-482c-b14c-91490f2212c2"; {
device = "/dev/disk/by-uuid/33112a66-7f9a-482c-b14c-91490f2212c2";
fsType = "btrfs"; fsType = "btrfs";
options = [ "subvol=@nixos" "compress=zstd" ]; options = [ "subvol=@nixos" "compress=zstd" ];
}; };
fileSystems."/mnt/hdd" = 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"; fsType = "xfs";
}; };
fileSystems."/home" = fileSystems."/home" =
{ device = "/dev/disk/by-uuid/4dd7a8ea-311a-458b-8839-1d92c7abab1f"; {
device = "/dev/disk/by-uuid/4dd7a8ea-311a-458b-8839-1d92c7abab1f";
fsType = "xfs"; fsType = "xfs";
}; };
fileSystems."/boot/efi" = fileSystems."/boot/efi" =
{ device = "/dev/disk/by-uuid/D56E-61DC"; {
device = "/dev/disk/by-uuid/D56E-61DC";
fsType = "vfat"; fsType = "vfat";
}; };

View File

@ -4,7 +4,7 @@
arrpc = inputs.arrpc.packages.${prev.system}.arrpc; 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 { ncmpcpp = prev.ncmpcpp.override {
visualizerSupport = true; visualizerSupport = true;
@ -20,7 +20,7 @@
buildInputs = old.buildInputs ++ [ prev.libyamlcpp prev.luajit ]; buildInputs = old.buildInputs ++ [ prev.libyamlcpp prev.luajit ];
patches = []; patches = [ ];
dontWrapQtApps = false; dontWrapQtApps = false;
}); });
@ -46,14 +46,5 @@
"-Dcava=disabled" "-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 mkdir -p $out/share/icons/GruvboxPlus
cp -r * $out/share/icons/GruvboxPlus cp -r * $out/share/icons/GruvboxPlus
for theme in $out/share/icons/*; do gtk-update-icon-cache $out/share/icons/GruvboxPlus
gtk-update-icon-cache $theme
done
''; '';
dontDropIconThemeCache = true; dontDropIconThemeCache = true;

View File

@ -1,10 +1,5 @@
{ config, pkgs, inputs, ... }: { config, pkgs, inputs, ... }:
{ {
programs.exa = {
enable = true;
enableAliases = true;
};
programs.fish = { programs.fish = {
enable = true; enable = true;
@ -49,8 +44,10 @@
''; '';
}; };
shellAliases = { shellAliases = {
nf = "${pkgs.neofetch}/bin/neofetch";
e = "nvim"; 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 = "buffer" },
{ name = "path" }, { name = "path" },
{ name = "nvim_lsp" }, { name = "nvim_lsp" },
{ name = "nvim_lsp_signature_help"},
{ name = "luasnip" }, { name = "luasnip" },
}), }),

View File

@ -1,5 +1,5 @@
require("gruvbox").setup({ require("gruvbox").setup({
--transparent_mode = true transparent_mode = true
}) })
vim.cmd("colorscheme gruvbox") 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.autopairs")
require("plugins.bufferline")
require("plugins.cmp")
require("plugins.colorizer")
require("plugins.colorscheme")
require("plugins.comment") require("plugins.comment")
require("plugins.dressing")
require("plugins.lspconfig")
require("plugins.lualine")
require("plugins.smartsplits") require("plugins.smartsplits")
require("plugins.telescope")
require("plugins.treesitter")
require("plugins.trouble") require("plugins.trouble")
require("plugins.which-key") require("plugins.which-key")

View File

@ -1,9 +1,24 @@
local capabilities = require('cmp_nvim_lsp').default_capabilities() local capabilities = require('cmp_nvim_lsp').default_capabilities()
capabilities.textDocument.completion.completionItem.snippetSupport = true capabilities.textDocument.completion.completionItem.snippetSupport = true
capabilities.textDocument.foldingRange = {
dynamicRegistration = false,
lineFoldingOnly = true,
}
local lspconfig = require("lspconfig") 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 { lspconfig.lua_ls.setup {
capabilities = capabilities, 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 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 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-h>", "<cmd>BufferLineCyclePrev<CR>", { desc = "Prev buffer" })
map( "n", "<S-l>", "<cmd>BufferLineCycleNext<CR>", { desc = "Next 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>ff", telescope_builtin.find_files, { desc = "Find Files" })
map( "n", "<Leader>fb", telescope_builtin.buffers, { desc = "List Buffers" }) map( "n", "<Leader>fb", telescope_builtin.buffers, { desc = "List Buffers" })
map( "n", "<Leader>fh", telescope_builtin.help_tags, { desc = "Help Tags" }) 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>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", "<C-n>", "<cmd>NeoTreeFocusToggle<CR>", { desc = "Open NeoTree" })
map( {"n", "x"}, "ga", ":EasyAlign", { desc = "Align text" }) 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.background = "dark"
vim.o.clipboard = "unnamedplus" vim.o.clipboard = "unnamedplus"
vim.o.mouse = ""
vim.o.termguicolors = true vim.o.termguicolors = true
vim.o.ignorecase = true vim.o.ignorecase = true
vim.o.smartcase = 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.undodir = os.getenv("HOME") .. "/.local/share/nvim/undodir"
vim.o.undofile = true vim.o.undofile = true
vim.o.scrolloff = 8
vim.wo.number = true vim.wo.number = true
vim.wo.relativenumber = true vim.wo.relativenumber = true

View File

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

View File

@ -103,8 +103,8 @@ in
misc { misc {
vfr = true vfr = true
vrr = 2 vrr = 2
enable_swallow = true # enable_swallow = true
swallow_regex = ^(foot)$ # swallow_regex = ^(foot)$
} }
decoration { decoration {
@ -133,7 +133,7 @@ in
exec-once = ${pkgs.openrgb}/bin/openrgb --startminimized --profile autorun.orp exec-once = ${pkgs.openrgb}/bin/openrgb --startminimized --profile autorun.orp
exec-once = ${pkgs.blueman}/bin/blueman-applet exec-once = ${pkgs.blueman}/bin/blueman-applet
exec-once = ${pkgs.networkmanagerapplet}/bin/nm-applet --indicator 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 = ${xwaylandSetPrimary}/bin/xwayland-setprimary.sh
exec-once = ${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1 exec-once = ${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1
exec-once = ${pkgs.swww}/bin/swww-daemon exec-once = ${pkgs.swww}/bin/swww-daemon
@ -142,9 +142,9 @@ in
exec = ${wob-voldaemon}/bin/wob-volumeindicator.sh; exec = ${wob-voldaemon}/bin/wob-volumeindicator.sh;
exec = pkill waybar; ${pkgs.waybar_hyprland}/bin/waybar exec = pkill waybar; ${pkgs.waybar_hyprland}/bin/waybar
#Set cursor #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 #keybinds
bind = ${modKey}, 1, workspace, 1 bind = ${modKey}, 1, workspace, 1

View File

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