mirror of
https://github.com/materusPL/nixos-config
synced 2026-06-18 16:37:21 +02:00
Compare commits
5 Commits
71710a3aa0
...
76b54b8800
| Author | SHA1 | Date | |
|---|---|---|---|
| 76b54b8800 | |||
| 33dcdb8c61 | |||
| 640907f9e1 | |||
| 5440b8aaf2 | |||
| 65f9c1bb9d |
3
config/shell/zsh/.zprofile
Normal file
3
config/shell/zsh/.zprofile
Normal file
@ -0,0 +1,3 @@
|
||||
__HOME_ZPROFILE_SOURCED=1
|
||||
[[ -f "/etc/profile" ]] && emulate sh -c "source /etc/profile"
|
||||
[[ -f "~/.profile" ]] && emulate sh -c "source ~/.profile"
|
||||
@ -1,3 +1,5 @@
|
||||
__HOME_ZSHRC_SOURCED=1
|
||||
|
||||
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
|
||||
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
|
||||
fi
|
||||
@ -7,8 +9,8 @@ if [ -n "$EAT_SHELL_INTEGRATION_DIR" ]; then
|
||||
source "$EAT_SHELL_INTEGRATION_DIR/zsh";
|
||||
fi
|
||||
|
||||
export ZSH_DATA_DIR="${XDG_CONFIG_HOME:-"$HOME/.config"}/zsh/data"
|
||||
export ZSH_CONFIG_DIR="${XDG_CONFIG_HOME:-"$HOME/.config"}/zsh/cfg"
|
||||
ZSH_DATA_DIR="${XDG_CONFIG_HOME:-"$HOME/.config"}/zsh/data"
|
||||
ZSH_CONFIG_DIR="${XDG_CONFIG_HOME:-"$HOME/.config"}/zsh/cfg"
|
||||
|
||||
#Check if terminal is fullcolor
|
||||
if zmodload zsh/terminfo && (( "$terminfo[colors]" >= "256" )); then
|
||||
@ -19,7 +21,7 @@ fi
|
||||
#MSYS
|
||||
if [[ "$(uname -s)" =~ ^MSYS_NT.* ]]; then
|
||||
#Use windows symlink instead copy
|
||||
export MSYS=winsymlinks:nativestrict
|
||||
MSYS=winsymlinks:nativestrict
|
||||
fi
|
||||
|
||||
|
||||
@ -125,6 +127,15 @@ if [[ $(whence -p "nvim") ]]; then
|
||||
alias vi="nvim"
|
||||
alias vimdiff="nvim -d"
|
||||
fi
|
||||
if [[ $(whence -p "eza") ]]; then
|
||||
alias l="eza -lahg --color=auto --hyperlink"
|
||||
alias ll="eza -alF --color=auto --hyperlink"
|
||||
alias ls="eza --color=auto"
|
||||
else
|
||||
alias l="ls -lah --color=auto --hyperlink"
|
||||
alias ll="ls -alF --color=auto --hyperlink"
|
||||
alias ls="ls --color=auto"
|
||||
fi
|
||||
|
||||
#endregion
|
||||
|
||||
@ -1 +1,5 @@
|
||||
__MATERUS_HM_ZSH=1
|
||||
#TODO: Set ZDOTDIR based on MKK_CONFIG_PATH
|
||||
|
||||
__HOME_ZSHENV_SOURCED=1
|
||||
ZDOTDIR=${XDG_CONFIG_HOME:-"$HOME/.config"}/zsh/cfg
|
||||
setopt no_global_rcs
|
||||
7
config/terminal/wezterm/wezterm.lua
Normal file
7
config/terminal/wezterm/wezterm.lua
Normal file
@ -0,0 +1,7 @@
|
||||
local wezterm = require 'wezterm'
|
||||
local config = wezterm.config_builder()
|
||||
|
||||
|
||||
|
||||
|
||||
return config
|
||||
10
config/tmux/tmux.conf
Normal file
10
config/tmux/tmux.conf
Normal file
@ -0,0 +1,10 @@
|
||||
set -g history-limit 50000
|
||||
set -g display-time 4000
|
||||
set -g status-interval 5
|
||||
set -g default-terminal "screen-256color"
|
||||
set -g status-keys emacs
|
||||
set -g focus-events on
|
||||
setw -g aggressive-resize on
|
||||
setw -g mouse on
|
||||
setw -g clock-mode-style 24
|
||||
|
||||
@ -14,11 +14,13 @@
|
||||
|
||||
|
||||
home.file = {
|
||||
".zshrc".source = "${config.xdg.configFile."zsh/cfg".source}/zshrc";
|
||||
".zshenv".source = "${config.xdg.configFile."zsh/cfg".source}/zshenv";
|
||||
".tmux.conf".source = "${config.mkk.dir}/config/tmux/tmux.conf";
|
||||
};
|
||||
|
||||
xdg.enable = true;
|
||||
xdg.configFile."wezterm".source = "${config.mkk.dir}/config/terminal/wezterm";
|
||||
|
||||
xdg.configFile."zsh/cfg".source =
|
||||
"${config.mkk.dir}/config/shell/zsh";
|
||||
xdg.configFile."zsh/data/plugins/powerlevel10k".source =
|
||||
|
||||
@ -279,7 +279,7 @@ in
|
||||
enable = true;
|
||||
enableGlobalCompInit = false;
|
||||
interactiveShellInit = ''
|
||||
if [[ ''${__MATERUS_HM_ZSH:-0} == 0 ]]; then
|
||||
if [[ ''${__HOME_ZSHRC_SOURCED:-0} == 0 ]]; then
|
||||
source ${pkgs.grml-zsh-config}/etc/zsh/zshrc
|
||||
fi
|
||||
'';
|
||||
|
||||
@ -24,6 +24,8 @@
|
||||
boot.loader.grub = {
|
||||
enable = true;
|
||||
efiSupport = true;
|
||||
gfxmodeEfi = "1920x1080";
|
||||
gfxmodeBios = "1920x1080";
|
||||
device = "nodev";
|
||||
useOSProber = true;
|
||||
memtest86.enable = true;
|
||||
@ -31,6 +33,7 @@
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
hardware.nvidia = {
|
||||
modesetting.enable = true;
|
||||
powerManagement.enable = true;
|
||||
open = true;
|
||||
nvidiaSettings = true;
|
||||
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||
@ -38,6 +41,14 @@
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
extraPackages = with pkgs; [
|
||||
libva-vdpau-driver
|
||||
nvidia-vaapi-driver
|
||||
libvdpau-va-gl
|
||||
];
|
||||
extraPackages32 = with pkgs; [
|
||||
libva-vdpau-driver
|
||||
nvidia-vaapi-driver
|
||||
libvdpau-va-gl
|
||||
];
|
||||
};
|
||||
# Use latest kernel.
|
||||
@ -59,6 +70,14 @@
|
||||
networking.networkmanager.enable = true;
|
||||
programs.firefox.enable = true;
|
||||
programs.java.enable = true;
|
||||
services.flatpak.enable = true;
|
||||
hardware.bluetooth.enable = true;
|
||||
services.gvfs.enable = true;
|
||||
programs.kdeconnect.enable = true;
|
||||
services.fstrim = {
|
||||
enable = true;
|
||||
interval = "weekly";
|
||||
};
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
remotePlay.openFirewall = true;
|
||||
@ -233,6 +252,15 @@
|
||||
};
|
||||
services.desktopManager.plasma6.enable = true;
|
||||
services.desktopManager.plasma6.enableQt5Integration = true;
|
||||
xdg.portal.enable = true;
|
||||
xdg.portal.wlr.enable = true;
|
||||
xdg.portal.xdgOpenUsePortal = true;
|
||||
xdg.portal.extraPortals = [ pkgs.kdePackages.xdg-desktop-portal-kde ];
|
||||
environment.plasma6.excludePackages = with pkgs.kdePackages; [
|
||||
kwallet
|
||||
kwalletmanager
|
||||
kwallet-pam
|
||||
];
|
||||
|
||||
programs.ssh.startAgent = true;
|
||||
|
||||
@ -252,6 +280,7 @@
|
||||
# Enable sound.
|
||||
# services.pulseaudio.enable = true;
|
||||
# OR
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
audio.enable = true;
|
||||
@ -261,6 +290,51 @@
|
||||
systemWide = true;
|
||||
jack.enable = true;
|
||||
};
|
||||
virtualisation.podman = {
|
||||
enable = true;
|
||||
dockerCompat = true;
|
||||
dockerSocket.enable = true;
|
||||
};
|
||||
virtualisation.libvirtd = {
|
||||
enable = true;
|
||||
onBoot = "ignore";
|
||||
onShutdown = "shutdown";
|
||||
qemu.runAsRoot = true;
|
||||
qemu.swtpm.enable = true;
|
||||
qemu.package = pkgs.qemu_full;
|
||||
};
|
||||
environment.sessionVariables = rec {
|
||||
XDG_CACHE_HOME = "\${HOME}/.cache";
|
||||
XDG_CONFIG_HOME = "\${HOME}/.config";
|
||||
XDG_BIN_HOME = "\${HOME}/.local/bin";
|
||||
XDG_DATA_HOME = "\${HOME}/.local/share";
|
||||
|
||||
#SSH_ASKPASS_REQUIRE = "prefer";
|
||||
|
||||
STEAM_EXTRA_COMPAT_TOOLS_PATHS = "\${HOME}/.steam/root/compatibilitytools.d";
|
||||
|
||||
MOZ_USE_XINPUT2 = "1";
|
||||
PATH = [ "\${XDG_BIN_HOME}" ];
|
||||
};
|
||||
|
||||
environment.shellInit = ''
|
||||
if ! [ -z "$DISPLAY" ]; then ${pkgs.xhost}/bin/xhost +si:localuser:root &> /dev/null; fi;
|
||||
if ! [ -z "$DISPLAY" ]; then ${pkgs.xhost}/bin/xhost +si:localuser:$USER &> /dev/null; fi;
|
||||
'';
|
||||
security.sudo = {
|
||||
enable = true;
|
||||
extraConfig = ''
|
||||
Defaults pwfeedback
|
||||
'';
|
||||
};
|
||||
i18n.inputMethod.enable = true;
|
||||
i18n.inputMethod.type = "fcitx5";
|
||||
i18n.inputMethod.fcitx5.addons = [
|
||||
pkgs.qt6Packages.fcitx5-configtool
|
||||
pkgs.fcitx5-lua
|
||||
pkgs.fcitx5-mozc
|
||||
pkgs.kdePackages.fcitx5-qt
|
||||
];
|
||||
|
||||
# Enable touchpad support (enabled default in most desktopManager).
|
||||
services.libinput.enable = true;
|
||||
@ -292,7 +366,6 @@
|
||||
# };
|
||||
|
||||
# List services that you want to enable:
|
||||
|
||||
# Enable the OpenSSH daemon.
|
||||
# services.openssh.enable = true;
|
||||
|
||||
@ -301,6 +374,27 @@
|
||||
# networking.firewall.allowedUDPPorts = [ ... ];
|
||||
# Or disable the firewall altogether.
|
||||
networking.firewall.enable = true;
|
||||
networking.firewall.allowedTCPPorts = [
|
||||
24800
|
||||
5900
|
||||
5357
|
||||
4656
|
||||
#region Syncthing
|
||||
22000
|
||||
config.services.syncthing.relay.statusPort
|
||||
config.services.syncthing.relay.port
|
||||
#endregion
|
||||
];
|
||||
networking.firewall.allowedUDPPorts = [
|
||||
24800
|
||||
5900
|
||||
3702
|
||||
4656
|
||||
#region Syncthing
|
||||
22000
|
||||
21027
|
||||
#endregion
|
||||
];
|
||||
|
||||
# Copy the NixOS configuration file and link it from the resulting system
|
||||
# (/run/current-system/configuration.nix). This is useful in case you
|
||||
@ -326,7 +420,6 @@
|
||||
hardware.uinput.enable = true;
|
||||
hardware.steam-hardware.enable = true;
|
||||
|
||||
|
||||
sops.templates."networkmanager.env".content = ''
|
||||
WIREGUARD_PRIVATEKEY="${config.sops.placeholder.wg-key}"
|
||||
'';
|
||||
@ -362,7 +455,6 @@
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
|
||||
system.stateVersion = "26.05"; # Did you read the comment?
|
||||
|
||||
|
||||
@ -25,6 +25,7 @@
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
boot.supportedFilesystems = [ "ntfs" ];
|
||||
|
||||
boot.initrd.systemd.enable = true;
|
||||
boot.initrd.luks.devices."DECRYPTED_ROOT".device =
|
||||
@ -90,6 +91,11 @@
|
||||
swapDevices = [
|
||||
{ device = "/dev/disk/by-uuid/9a5795a9-8ddb-4be0-b8f7-e59270ba8db9"; }
|
||||
];
|
||||
zramSwap = {
|
||||
enable = true;
|
||||
memoryPercent = 50;
|
||||
priority = 10;
|
||||
};
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
|
||||
@ -1,12 +1,14 @@
|
||||
{ pkgs, ... }:
|
||||
{ pkgs, config, ... }:
|
||||
{
|
||||
home.stateVersion = "26.05";
|
||||
mkk.neovim.enable = true;
|
||||
mkk.dir = config.lib.file.mkOutOfStoreSymlink "/mkk/config";
|
||||
|
||||
mkk.neovim.enable = true;
|
||||
home.packages = with pkgs; [
|
||||
neovide
|
||||
obsidian
|
||||
git-crypt
|
||||
tmux
|
||||
|
||||
telegram-desktop
|
||||
discord
|
||||
@ -16,6 +18,9 @@
|
||||
mesa-demos
|
||||
vulkan-tools
|
||||
nixfmt
|
||||
nixd
|
||||
|
||||
eza
|
||||
|
||||
curl
|
||||
wget
|
||||
@ -23,7 +28,7 @@
|
||||
|
||||
packwiz
|
||||
ani-cli
|
||||
mpv
|
||||
|
||||
kitty
|
||||
keepassxc
|
||||
moonlight-qt
|
||||
@ -31,6 +36,21 @@
|
||||
|
||||
(vivaldi.override { proprietaryCodecs = true; })
|
||||
];
|
||||
programs.mpv = {
|
||||
enable = true;
|
||||
config = {
|
||||
ytdl-format = "bestvideo+bestaudio";
|
||||
slang = "pl,pol,Polish,Polski,en,eng,English";
|
||||
alang = "ja,jp,jpn,Japanese,pl,pol,Polski,en,eng,English";
|
||||
demuxer-max-bytes = "500MiB";
|
||||
demuxer-max-back-bytes = "150MiB";
|
||||
cache = "yes";
|
||||
cache-pause-wait = "10";
|
||||
cache-pause-initial = "yes";
|
||||
keep-open = "yes";
|
||||
};
|
||||
};
|
||||
|
||||
programs.vscode = {
|
||||
enable = true;
|
||||
mutableExtensionsDir = true;
|
||||
@ -43,9 +63,16 @@
|
||||
user.name = "materus";
|
||||
commit.gpgsign = true;
|
||||
gpg.format = "ssh";
|
||||
|
||||
};
|
||||
|
||||
signing.signByDefault = true;
|
||||
signing.key = "/mkk/config/extra-files/ssh/materus.pub";
|
||||
};
|
||||
programs.delta = {
|
||||
enable = true;
|
||||
enableGitIntegration = true;
|
||||
};
|
||||
programs.gitui.enable = true;
|
||||
programs.yt-dlp.enable = true;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user