update. Added zellij config

This commit is contained in:
Varris 2023-04-05 11:36:45 +02:00
parent b68db96e9c
commit 4714b31176
8 changed files with 254 additions and 238 deletions

View File

@ -40,6 +40,11 @@
flake = false; flake = false;
}; };
ncmpcpp-git = {
url = "github:ncmpcpp/ncmpcpp";
flake = false;
};
grub2-themes = { grub2-themes = {
url = "github:vinceliuice/grub2-themes"; url = "github:vinceliuice/grub2-themes";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";

View File

@ -4,9 +4,9 @@
{ config, pkgs, lib, inputs, ... }: { config, pkgs, lib, inputs, ... }:
{ {
imports = [ imports = [
# Include the results of the hardware scan. # Include the results of the hardware scan.
./hardware-configuration.nix ./hardware-configuration.nix
inputs.hyprland.nixosModules.default inputs.hyprland.nixosModules.default
]; ];
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
@ -16,10 +16,16 @@
boot = { boot = {
kernelParams = kernelParams =
[ [
"amdgpu.ppfeaturemask=0xffffffff" "amdgpu.ppfeaturemask=0xffffffff"
"drm.edid_firmware=DP-1:edid/edid-EX2780Q.bin" "drm.edid_firmware=DP-1:edid/edid-EX2780Q.bin"
"net.ifnames=0"
]; ];
extraModprobeConfig = ''
options iwlmvm power_scheme=1
options iwlwifi power_save=0
'';
loader = { loader = {
efi = { efi = {
canTouchEfiVariables = true; canTouchEfiVariables = true;
@ -40,7 +46,7 @@
}; };
}; };
# initrd.availableKernelModules=sd [ "amdgpu" ]; # initrd.availableKernelModules=sd [ "amdgpu" ];
kernelPackages = pkgs.linuxPackages_zen; kernelPackages = pkgs.linuxPackages_zen;
kernelModules = [ "i2c-dev" "i2c-piix4" ]; kernelModules = [ "i2c-dev" "i2c-piix4" ];
}; };
@ -49,15 +55,18 @@
networking = { networking = {
hostName = "terra"; # Define your hostname. hostName = "terra"; # Define your hostname.
enableIPv6 = false; enableIPv6 = false;
networkmanager = { wireless = {
enable = true; enable = true;
wifi = { #FORMAT:
powersave = false; #PSK_HOME = password
environmentFile = "/etc/nixos/wifi_secrets.conf";
networks."TP-Link_EDB8" = {
psk = "@PSK_HOME@";
}; };
}; };
firewall.checkReversePath = false;
firewall.enable = false; firewall.enable = false;
extraHosts = '' extraHosts = ''
@ -66,10 +75,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 = {
@ -104,51 +113,23 @@
extraBackends = [ pkgs.sane-airscan ]; extraBackends = [ pkgs.sane-airscan ];
}; };
# Enable sound. # Enable sound.
sound.enable = true; sound.enable = true;
security.rtkit.enable = true;
security.audit.enable = false;
security.auditd.enable = false;
security.pam.loginLimits = [{
domain = "*";
type = "soft";
item = "nofile";
value = "262144";
}];
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
services.blueman.enable = true;
services.gvfs.enable = true;
services.flatpak.enable = true;
services.locate = {
enable = true;
locate = pkgs.plocate;
localuser = null;
prunePaths = lib.mkOptionDefault [ ];
interval = "hourly";
};
services.fstrim = {
enable = true;
interval = "weekly";
};
services.udisks2.enable = true;
security = { security = {
audit.enable = false;
auditd.enable = false;
polkit.enable = true;
rtkit.enable = true;
sudo.enable = false; sudo.enable = false;
pam.loginLimits = [{
domain = "*";
type = "soft";
item = "nofile";
value = "262144";
}];
doas = { doas = {
enable = true; enable = true;
extraRules = [{ extraRules = [{
@ -157,130 +138,125 @@
persist = true; persist = true;
}]; }];
}; };
polkit.enable = true;
}; };
programs.fish.enable = true; # Define a user account. Don't forget to set a password with passwd.
programs.ccache = {
enable = true;
packageNames = [
];
};
programs.hyprland.enable = true;
# Define a user account. Don't forget to set a password with passwd.
users.users.manuel = { users.users.manuel = {
isNormalUser = true; isNormalUser = true;
extraGroups = [ extraGroups = [ "audio" "games" "input" "scanner" "lp" "users" "video" "wheel" ];
"audio"
"games"
"geoclue"
"input"
"networkmanager"
"nm-openvpn"
"scanner"
"lp"
"users"
"video"
"wheel"
];
shell = pkgs.fish; shell = pkgs.fish;
}; };
# List packages installed in system profile. To search, run: # List packages installed in system profile. To search, run:
# $ nix search wget # $ nix search wget
environment = { environment = {
systemPackages = [ systemPackages = [
pkgs.git pkgs.git
pkgs.links2 pkgs.links2
pkgs.ripgrep pkgs.ripgrep
pkgs.file pkgs.file
pkgs.fd pkgs.fd
pkgs.htop pkgs.htop
pkgs.openrgb pkgs.openrgb
pkgs.unzip pkgs.unzip
pkgs.unrar pkgs.unrar
pkgs.p7zip pkgs.p7zip
]; ];
binsh = "${pkgs.dash}/bin/dash"; binsh = "${pkgs.dash}/bin/dash";
}; };
# List services that you want to enable: # List services that you want to enable:
services.udev.packages = [ pkgs.openrgb ]; programs = {
dconf.enable = true;
programs.dconf.enable = true; fish.enable = true;
hyprland.enable = true;
programs.kdeconnect.enable = true; kdeconnect.enable = true;
ssh.startAgent = true;
services.geoclue2 = {
enable = true;
appConfig."gammastep" = {
isAllowed = true;
isSystem = false;
};
}; };
services.gnome.gnome-keyring.enable = true; services = {
blueman.enable = true;
flatpak.enable = true;
fwupd.enable = true;
gnome.gnome-keyring.enable = true;
gvfs.enable = true;
openssh.enable = true;
udev.packages = [ pkgs.openrgb ];
udisks2.enable = true;
printing = {
enable = true;
drivers = [ pkgs.cnijfilter2 ];
};
avahi = {
enable = true;
nssmdns = true;
};
mullvad-vpn = {
enable = true;
package = pkgs.mullvad-vpn;
};
transmission = {
enable = true;
user = "manuel";
openFirewall = true;
};
pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
locate = {
enable = true;
locate = pkgs.plocate;
localuser = null;
prunePaths = lib.mkOptionDefault [ ];
interval = "hourly";
};
fstrim = {
enable = true;
interval = "weekly";
};
};
xdg.portal = { xdg.portal = {
enable = true; enable = true;
xdgOpenUsePortal = true; xdgOpenUsePortal = true;
wlr.enable = false; #conflict with XDPH if enabled wlr.enable = false; #conflict with XDPH if enabled
extraPortals = [ extraPortals = [
pkgs.xdg-desktop-portal-gtk pkgs.xdg-desktop-portal-gtk
]; ];
}; };
programs.ssh = {
startAgent = true;
};
services.openssh = {
enable = true;
};
services.printing = {
enable = true;
drivers = [ pkgs.cnijfilter2 ];
};
services.avahi = {
enable = true;
nssmdns = true;
};
services.transmission = {
enable = true;
user = "manuel";
openFirewall = true;
};
services.fwupd.enable = true;
#: services.getty.autologinUser = " manuel ";
systemd.extraConfig = '' systemd.extraConfig = ''
DefaultTimeoutStopSec=10s DefaultTimeoutStopSec=10s
''; '';
systemd.user.extraConfig = '' systemd.user.extraConfig = ''
# needed for xdg-open to find the default browser # needed for xdg-open to find the default browser
DefaultEnvironment="PATH=/etc/profiles/per-user/manuel/bin:/run/current/system/sw/bin" DefaultEnvironment="PATH=/etc/profiles/per-user/manuel/bin:/run/current/system/sw/bin"
DefaultTimeoutStopSec=10s DefaultTimeoutStopSec=10s
''; '';
nix = { nix = {
extraOptions = '' extraOptions = ''
experimental-features = nix-command flakes experimental-features = nix-command flakes
warn-dirty = false warn-dirty = false
''; '';
gc = { gc = {
persistent = true; persistent = true;
automatic = true; automatic = true;
dates = "weekly"; dates = "weekly";
options = "--delete-older-than 14d"; options = "--delete-older-than 7d";
}; };
settings.auto-optimise-store = true; settings.auto-optimise-store = true;
}; };

View File

@ -50,6 +50,7 @@
programs.ncmpcpp = { programs.ncmpcpp = {
enable = true; enable = true;
settings = { settings = {
visualizer_data_source = "/tmp/mpd.fifo"; visualizer_data_source = "/tmp/mpd.fifo";
visualizer_output_name = "my_fifo"; visualizer_output_name = "my_fifo";

View File

@ -11,7 +11,7 @@ in
enable = true; enable = true;
globals = { globals = {
mapleader = " "; #Space key mapleader = ",";
}; };
colorschemes.gruvbox = { colorschemes.gruvbox = {
@ -25,10 +25,21 @@ in
pattern = [ "*" ]; pattern = [ "*" ];
command = "hi! Normal ctermbg=NONE guibg=NONE"; command = "hi! Normal ctermbg=NONE guibg=NONE";
} }
{
event = [ "BufWinLeave" ] ;
pattern = [ "*" ];
command = "silent! mkview";
}
{
event = [ "BufWinEnter" ] ;
pattern = [ "*" ];
command = "silent! loadview";
}
]; ];
options = { options = {
number = true; number = true;
relativenumber = true;
ignorecase = true; ignorecase = true;
smartcase = true; smartcase = true;
tabstop = 2; tabstop = 2;
@ -143,18 +154,6 @@ in
indent = true; indent = true;
}; };
bufferline = {
enable = true;
separatorStyle = "slant";
numbers = "buffer_id";
highlights = {
fill = {
guibg = "#3C3836";
};
};
};
}; };
maps = { maps = {
@ -162,6 +161,10 @@ in
silent = true; silent = true;
action = "<cmd>NeoTreeFocusToggle<CR>"; action = "<cmd>NeoTreeFocusToggle<CR>";
}; };
normal."<mapleader><Space>" = {
silent = true;
action = "<cmd>nohlsearch<CR>";
};
}; };
}; };

View File

@ -41,10 +41,13 @@ let
''; '';
xwaylandSetPrimary = pkgs.writeShellScriptBin "xwayland-setprimary.sh" '' xwaylandSetPrimary = pkgs.writeShellScriptBin "xwayland-setprimary.sh" ''
DSP=$(${pkgs.xorg.xrandr}/bin/xrandr | awk '/2560x1440/ {print $1}' | head -n 1) while true; do
DSP=$(${pkgs.xorg.xrandr}/bin/xrandr | awk '/2560x1440/ {print $1}' | head -n 1)
${pkgs.xorg.xrandr}/bin/xrandr --output "$DSP" --primary if [[ ! -z DSP ]]; then
echo "Xwayland: $DSP - Primary monitor set" ${pkgs.xorg.xrandr}/bin/xrandr --output "$DSP" --primary
fi
sleep 10
done
''; '';
killprocess = pkgs.writeShellScriptBin "killprocess.sh" '' killprocess = pkgs.writeShellScriptBin "killprocess.sh" ''
@ -116,9 +119,6 @@ in
col.shadow = rgba(${colors.base00}99) col.shadow = rgba(${colors.base00}99)
} }
blurls = waybar
blurls = notifications
animations { animations {
enabled = yes enabled = yes
@ -133,8 +133,8 @@ in
exec-once = ${pkgs.swaybg}/bin/swaybg -i ${wallpaper} -m fill exec-once = ${pkgs.swaybg}/bin/swaybg -i ${wallpaper} -m fill
exec-once = ${pkgs.openrgb}/bin/openrgb --startminimized --profile autorun.orp exec-once = ${pkgs.openrgb}/bin/openrgb --startminimized --profile autorun.orp
exec-once = ${pkgs.networkmanagerapplet}/bin/nm-applet --indicator
exec-once = ${pkgs.blueman}/bin/blueman-applet exec-once = ${pkgs.blueman}/bin/blueman-applet
exec-once = ${pkgs.mullvad-vpn}/bin/mullvad-gui
exec = ${wob-voldaemon}/bin/wob-volumeindicator.sh; exec = ${wob-voldaemon}/bin/wob-volumeindicator.sh;
exec = ${xwaylandSetPrimary}/bin/xwayland-setprimary.sh exec = ${xwaylandSetPrimary}/bin/xwayland-setprimary.sh
@ -198,10 +198,13 @@ in
bind = ${modKey} SHIFT, C, exec, hyprctl reload bind = ${modKey} SHIFT, C, exec, hyprctl reload
layerrule = blur, waybar
layerrule = blur, notifications
windowrulev2 = fullscreen, class:^(hl2_linux)$ windowrulev2 = fullscreen, class:^(hl2_linux)$
''; '';
}; };
home.packages = [ pkgs.wl-clipboard pkgs.wl-clipboard-x11 ]; home.packages = [ pkgs.wl-clipboard pkgs.wl-clipboard-x11 pkgs.hyprpicker pkgs.hyprpaper ];
} }

View File

@ -24,7 +24,7 @@ let
else else
echo "{\"class\":\"not_connected\",\"text\":\"\"}" echo "{\"class\":\"not_connected\",\"text\":\"\"}"
fi fi
sleep 1 sleep 60
done done
''; '';
in in

View File

@ -0,0 +1,4 @@
{ pkgs, lib, ... }:
{
}

View File

@ -1,64 +1,67 @@
{ config, pkgs, inputs, nix-colors, ... }: { config, pkgs, inputs, nix-colors, ... }:
let
colors = config.colorScheme.colors;
in
{ {
imports = [ imports = [
nix-colors.homeManagerModule nix-colors.homeManagerModule
./configs/beets ./configs/beets
./configs/cava ./configs/cava
./configs/wayland/hyprland.nix ./configs/wayland/hyprland.nix
#./configs/wayland/sway.nix #./configs/wayland/sway.nix
./configs/fish ./configs/fish
./configs/mpd ./configs/mpd
./configs/mpv ./configs/mpv
./configs/neovim ./configs/neovim
./configs/firefox ./configs/firefox
./configs/dircolors.nix ./configs/dircolors.nix
./configs/xdg-mime.nix ./configs/xdg-mime.nix
]; ];
# Home Manager needs a bit of information about you and the # Home Manager needs a bit of information about you and the
# paths it should manage. # paths it should manage.
home.username = "manuel"; home.username = "manuel";
home.homeDirectory = "/home/manuel"; home.homeDirectory = "/home/manuel";
home.packages = with pkgs; [ home.packages = with pkgs; [
appimage-run appimage-run
bottom qt5ct
calcurse bc
fastfetch bottom
gamescope calcurse
gimp fastfetch
gnome.file-roller gamescope
gnome.seahorse gimp
gnome.simple-scan gnome.file-roller
gnome.gvfs gnome.gvfs
hyprpaper gnome.seahorse
hyprpicker gnome.simple-scan
lutris lutris
mesa-demos mesa-demos
mesa-demos nerdfonts
nerdfonts noto-fonts-cjk-sans
noto-fonts-cjk-sans noto-fonts-cjk-serif
noto-fonts-cjk-serif obs-studio
obs-studio pavucontrol
pavucontrol protontricks
protontricks sc-im
sc-im signal-desktop
signal-desktop sshfs
sshfs steam
steam steam-run
steam-run steamtinkerlaunch
steamtinkerlaunch sxiv
sxiv thunderbird
thunderbird tldr
twemoji-color-font twemoji-color-font
vimv vimv
vulkan-tools vulkan-tools
vulkan-validation-layers vulkan-validation-layers
webcord webcord
wineWowPackages.stagingFull wineWowPackages.stagingFull
wxedid wxedid
xdg-utils xdg-utils
xivlauncher xivlauncher
]; ];
home.sessionVariables = { home.sessionVariables = {
EDITOR = "nvim"; EDITOR = "nvim";
@ -78,7 +81,7 @@
enableFishIntegration = true; enableFishIntegration = true;
}; };
services.gpg-agent = { enable = true; }; services.gpg-agent.enable = true;
services.udiskie.enable = true; services.udiskie.enable = true;
@ -116,34 +119,55 @@
}; };
}; };
programs = {
aria2.enable = true;
password-store.enable = true;
command-not-found.enable = false;
programs.git = { fzf = {
enable = true; enable = true;
lfs.enable = true; enableFishIntegration = true;
userName = "Varris"; };
userEmail = "varris@posteo.net";
};
programs.fzf = { git = {
enable = true; enable = true;
enableFishIntegration = true; lfs.enable = true;
}; userName = "Varris";
userEmail = "varris@posteo.net";
};
programs.command-not-found.enable = false; nix-index = {
programs.nix-index = { enable = true;
enable = true; enableFishIntegration = true;
enableFishIntegration = true; };
zellij = {
enable = true;
settings = {
theme = "gruvbox-dark";
themes.gruvbox-dark = {
fg = "#${colors.base05}";
bg = "#${colors.base00}";
black = "#${colors.base01}";
red = "#${colors.base08}";
green = "#${colors.base0B}";
yellow = "#${colors.base0A}";
blue = "#${colors.base0D}";
magenta = "#${colors.base0E}";
cyan = "#${colors.base0C}";
white = "#${colors.base07}";
orange = "#${colors.base0F}";
};
};
};
}; };
services.gnome-keyring.enable = true; services.gnome-keyring.enable = true;
services.easyeffects = { services.easyeffects = {
enable = true; enable = false;
preset = "custom"; preset = "custom";
}; };
programs.aria2.enable = true;
programs.password-store.enable = true;
xdg.userDirs = { xdg.userDirs = {
enable = true; enable = true;
@ -152,14 +176,14 @@
music = "/mnt/hdd/Music"; music = "/mnt/hdd/Music";
download = "/mnt/hdd/Downloads"; download = "/mnt/hdd/Downloads";
}; };
# This value determines the Home Manager release that your # This value determines the Home Manager release that your
# configuration is compatible with. This helps avoid breakage # configuration is compatible with. This helps avoid breakage
# when a new Home Manager release introduces backwards # when a new Home Manager release introduces backwards
# incompatible changes. # incompatible changes.
# #
# You can update Home Manager without changing this value. See # You can update Home Manager without changing this value. See
# the Home Manager release notes for a list of state version # the Home Manager release notes for a list of state version
# changes in each release. # changes in each release.
home.stateVersion = "22.05"; home.stateVersion = "22.05";
} }