1193
flake.lock
generated
147
flake.nix
@@ -2,121 +2,74 @@
|
||||
description = "Mike's Flake";
|
||||
|
||||
inputs = {
|
||||
# Nixpkgs
|
||||
nixpkgs.url = "nixpkgs/nixos-23.11";
|
||||
# You can access packages and modules from different nixpkgs revs
|
||||
# at the same time. Here's an working example:
|
||||
nixpkgs-unstable.url = "nixpkgs/nixos-unstable";
|
||||
# Also see the 'unstable-packages' overlay at 'overlays/default.nix'.
|
||||
nixpkgs.url = "nixpkgs/nixos-unstable";
|
||||
chaotic.url = "github:chaotic-cx/nyx/nyxpkgs-unstable";
|
||||
|
||||
# Home manager
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager/release-23.11";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
# TODO: Add any other flake you might need
|
||||
# hardware.url = "github:nixos/nixos-hardware";
|
||||
|
||||
# Shameless plug: looking for a way to nixify your themes and make
|
||||
# everything match nicely? Try nix-colors!
|
||||
nix-colors.url = "github:misterio77/nix-colors";
|
||||
|
||||
neovim-nightly-overlay.url = "github:nix-community/neovim-nightly-overlay";
|
||||
|
||||
nvim-flake = {
|
||||
url = "github:Gerg-L/nvim-flake";
|
||||
};
|
||||
hyprsunset.url = "github:hyprwm/hyprsunset";
|
||||
hyprsysteminfo.url = "github:/hyprwm/hyprsysteminfo";
|
||||
hyprpolkitagent.url = "github:hyprwm/hyprpolkitagent";
|
||||
|
||||
hyprland = {
|
||||
url = "github:hyprwm/hyprland";
|
||||
type = "git";
|
||||
url = "https://github.com/hyprwm/Hyprland";
|
||||
submodules = true;
|
||||
};
|
||||
|
||||
split-monitor-workspaces = {
|
||||
url = "github:Duckonaut/split-monitor-workspaces";
|
||||
inputs.hyprland.follows = "hyprland"; # <- make sure this line is present for the plugin to work as intended
|
||||
};
|
||||
|
||||
lanzaboote = {
|
||||
url = "github:nix-community/lanzaboote/v0.4.1";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
inputs.pre-commit-hooks-nix.follows = "";
|
||||
};
|
||||
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
hyprwm-contrib = {
|
||||
url = "github:hyprwm/contrib";
|
||||
spicetify-nix = {
|
||||
url = "github:Gerg-L/spicetify-nix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
hyprland-plugins = {
|
||||
url = "github:hyprwm/hyprland-plugins";
|
||||
inputs.hyprland.follows = "hyprland";
|
||||
stylix = {
|
||||
url = "github:danth/stylix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs = {
|
||||
self,
|
||||
nixpkgs,
|
||||
nixpkgs-unstable,
|
||||
home-manager,
|
||||
...
|
||||
} @ inputs: let
|
||||
inherit (self) outputs;
|
||||
# Supported systems for your flake packages, shell, etc.
|
||||
systems = [
|
||||
"aarch64-linux"
|
||||
"i686-linux"
|
||||
"x86_64-linux"
|
||||
"aarch64-darwin"
|
||||
"x86_64-darwin"
|
||||
];
|
||||
# This is a function that generates an attribute by calling a function you
|
||||
# pass to it, with each system as an argument
|
||||
forAllSystems = nixpkgs.lib.genAttrs systems;
|
||||
in {
|
||||
# Your custom packages
|
||||
# Accessible through 'nix build', 'nix shell', etc
|
||||
# packages = forAllSystems (system: import ./pkgs nixpkgs.legacyPackages.${system});
|
||||
# Formatter for your nix files, available through 'nix fmt'
|
||||
# Other options beside 'alejandra' include 'nixpkgs-fmt'
|
||||
formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.alejandra);
|
||||
outputs = { nixpkgs, ... } @inputs: {
|
||||
|
||||
# Your custom packages and modifications, exported as overlays
|
||||
overlays = import ./overlays {inherit inputs;};
|
||||
# Reusable nixos modules you might want to export
|
||||
# These are usually stuff you would upstream into nixpkgs
|
||||
nixosModules = import ./modules/nixos;
|
||||
# Reusable home-manager modules you might want to export
|
||||
# These are usually stuff you would upstream into home-manager
|
||||
homeManagerModules = import ./modules/home-manager;
|
||||
|
||||
# NixOS configuration entrypoint
|
||||
# Available through 'nixos-rebuild --flake .#hostname'
|
||||
nixosConfigurations = {
|
||||
zion = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {inherit inputs outputs;};
|
||||
modules = [
|
||||
# > Main NixOS configuration file <
|
||||
./hosts/zion/configuration.nix
|
||||
];
|
||||
modules = [ ./hosts ];
|
||||
specialArgs = {
|
||||
inherit inputs;
|
||||
username = "mike";
|
||||
hostname = "zion";
|
||||
};
|
||||
};
|
||||
thor = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {inherit inputs outputs;};
|
||||
modules = [
|
||||
# > Main NixOS configuration file <
|
||||
./hosts/thor/configuration.nix
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
# Standalone home-manager configuration entrypoint
|
||||
# Available through 'home-manager --flake .#username@hostname'
|
||||
homeConfigurations = {
|
||||
"mike@zion" = home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = nixpkgs.legacyPackages.x86_64-linux; # home-manager requires 'pkgs' instance
|
||||
extraSpecialArgs = {inherit inputs outputs;};
|
||||
modules = [
|
||||
# > Main home-manager configuration file <
|
||||
./home-manager/home.nix
|
||||
];
|
||||
thor = nixpkgs.lib.nixosSystem {
|
||||
modules = [ ./hosts ];
|
||||
specialArgs = {
|
||||
inherit inputs;
|
||||
username = "mike";
|
||||
hostname = "thor";
|
||||
};
|
||||
};
|
||||
"mike@thor" = home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = nixpkgs.legacyPackages.x86_64-linux; # home-manager requires 'pkgs' instance
|
||||
extraSpecialArgs = {inherit inputs outputs;};
|
||||
modules = [
|
||||
# > Main home-manager configuration file <
|
||||
./home-manager/home.nix
|
||||
];
|
||||
|
||||
server = nixpkgs.lib.nixosSystem {
|
||||
modules = [ ./hosts ];
|
||||
specialArgs = {
|
||||
inherit inputs;
|
||||
username = "mike";
|
||||
hostname = "server";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
{
|
||||
myAliases = {
|
||||
".." = "cd ..";
|
||||
"cd.." = "cd ..";
|
||||
|
||||
ls = "command eza";
|
||||
grep = "grep --color=auto";
|
||||
fgrep = "fgrep --color=auto";
|
||||
egrep = "egrep --color=auto";
|
||||
|
||||
l = "eza -G --icons";
|
||||
ll = "eza -l --icons";
|
||||
lg = "eza -lG";
|
||||
lall = "eza -lahF --icons --git";
|
||||
lalg = "eza -laGhF --icons --git";
|
||||
latree = "eza -laGghHT --git --icons";
|
||||
la = "eza --git --icons -la";
|
||||
lsd = "eza -laD";
|
||||
|
||||
cls = "clear";
|
||||
# df="df -ahiT --total";
|
||||
userlist = "cut -d: -f1 /etc/passwd";
|
||||
free = "free -mt";
|
||||
du = "du -ach | sort -h";
|
||||
ps = "ps auxf";
|
||||
|
||||
sudo = "sudo ";
|
||||
reload = "exec $SHELL -l";
|
||||
|
||||
xclip = "xclip -selection c";
|
||||
|
||||
mkdir = "mkdir -pv";
|
||||
psmem = "ps -e -orss=,args= | sort -b -k1 -nr";
|
||||
psmem10 = "ps -e -orss=,args= | sort -b -k1 -nr | head -10";
|
||||
pscpu = "ps -e -o pcpu,cpu,nice,state,cputime,args|sort -k1,1n -nr";
|
||||
pscpu10 = "ps -e -o pcpu,cpu,nice,state,cputime,args|sort -k1,1n -nr | head -10";
|
||||
|
||||
gua = "git remote | xargs -L1 git push --all";
|
||||
};
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
let
|
||||
cli = import ./aliases.nix;
|
||||
in {
|
||||
programs.bash = {
|
||||
enable = true;
|
||||
shellAliases = cli.myAliases;
|
||||
};
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
{pkgs, ...}: {
|
||||
imports = [
|
||||
./bash.nix
|
||||
./git.nix
|
||||
./zsh
|
||||
./gpg.nix
|
||||
];
|
||||
home.packages = with pkgs; [
|
||||
killall
|
||||
comma
|
||||
distrobox
|
||||
bc
|
||||
bottom
|
||||
ncdu
|
||||
ltex-ls
|
||||
nil
|
||||
alejandra
|
||||
timer
|
||||
jq
|
||||
diffsitter
|
||||
];
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
{
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userName = "Michał Czyż";
|
||||
userEmail = "mike@c2yz.com";
|
||||
signing = {
|
||||
key = "78D4829A477DAB25";
|
||||
signByDefault = true;
|
||||
};
|
||||
extraConfig = {
|
||||
push = {
|
||||
default = "simple";
|
||||
};
|
||||
rerere = {
|
||||
enable = true;
|
||||
};
|
||||
column = {
|
||||
ui = "auto";
|
||||
};
|
||||
branch = {
|
||||
sort = "-committerdate";
|
||||
};
|
||||
init = {
|
||||
defaultBranch = "main";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
{
|
||||
services.gpg-agent = {
|
||||
enable = true;
|
||||
defaultCacheTtl = 1800;
|
||||
enableSshSupport = true;
|
||||
};
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
cli = import ../aliases.nix;
|
||||
in {
|
||||
home.packages = with pkgs; [
|
||||
];
|
||||
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
enableCompletion = true;
|
||||
|
||||
history.size = 10000000;
|
||||
history.path = "${config.xdg.dataHome}/zsh/history";
|
||||
|
||||
shellAliases = cli.myAliases;
|
||||
|
||||
plugins = [
|
||||
{
|
||||
name = "powerlevel10k";
|
||||
src = pkgs.zsh-powerlevel10k;
|
||||
file = "share/zsh-powerlevel10k/powerlevel10k.zsh-theme";
|
||||
}
|
||||
];
|
||||
|
||||
enableAutosuggestions = true;
|
||||
|
||||
syntaxHighlighting = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
historySubstringSearch = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
initExtra = ''
|
||||
[[ ! -f ${./p10k.zsh} ]] || source ${./p10k.zsh}
|
||||
eval "$(zoxide init --cmd cd zsh)"
|
||||
if [ -x "$(command -v tmux)" ] && [ -n "$DISPLAY" ] && [ -z "$TMUX" ]; then
|
||||
# exec tmux new-session -A -s $USER >/dev/null 2>&1
|
||||
exec tmux new-session -t $USER >/dev/null 2>&1 | tmux new-session -A -s $USER >/dev/null 2>&1
|
||||
fi
|
||||
'';
|
||||
};
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
];
|
||||
|
||||
# dconf.settings."org/gnome/desktop/interface".color-scheme =
|
||||
# if config.colorscheme.variant == "dark"
|
||||
# then "prefer-dark"
|
||||
# else if config.colorscheme.variant == "light"
|
||||
# then "prefer-light"
|
||||
# else "default";
|
||||
|
||||
# xdg.portal.enable = true;
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
{pkgs, ...}: {
|
||||
imports = [];
|
||||
|
||||
xdg.mimeApps.enable = true;
|
||||
home.packages = with pkgs; [
|
||||
grim
|
||||
gtk3
|
||||
imv
|
||||
mimeo
|
||||
# primary-xwayland
|
||||
pulseaudio
|
||||
slurp
|
||||
waypipe
|
||||
wf-recorder
|
||||
wl-clipboard
|
||||
wl-mirror
|
||||
# wl-mirror-pick
|
||||
xdg-utils
|
||||
ydotool
|
||||
];
|
||||
|
||||
home.sessionVariables = {
|
||||
MOZ_ENABLE_WAYLAND = 1;
|
||||
QT_QPA_PLATFORM = "wayland";
|
||||
LIBSEAT_BACKEND = "logind";
|
||||
};
|
||||
|
||||
# xdg.portal.extraPortals = [pkgs.xdg-desktop-portal-wlr];
|
||||
}
|
||||
@@ -1,143 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# screenlayout setup for odin
|
||||
autorandr -c
|
||||
|
||||
# start some nice programs
|
||||
# if [ -d /etc/X11/xinit/xinitrc.d ] ; then
|
||||
# for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
|
||||
# # shellcheck source=/dev/null
|
||||
# [ -x "$f" ] && . "$f"
|
||||
# done
|
||||
# unset f
|
||||
# fi
|
||||
|
||||
xset -b # disable bell
|
||||
|
||||
export SSH_AUTH_SOCK;
|
||||
# export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/ssh-agent.socket"
|
||||
# ssh-agent -d &
|
||||
|
||||
|
||||
# ssh agent setup
|
||||
#eval `/usr/bin/ssh-agent`
|
||||
#
|
||||
#if test -f /usr/lib/openssh/x11-ssh-askpass # Archlinux
|
||||
#then
|
||||
# SSH_ASKPASS=/usr/lib/openssh/x11-ssh-askpass ssh-add < /dev/null
|
||||
#fi
|
||||
#
|
||||
#if test -f /usr/lib/ssh/x11-ssh-askpass # Debian
|
||||
#then
|
||||
# SSH_ASKPASS=/usr/lib/ssh/x11-ssh-askpass ssh-add < /dev/null
|
||||
#fi
|
||||
|
||||
# theming
|
||||
export QT_QPA_PLATFORMTHEME=qt5ct
|
||||
export DESKTOP_SESSION=plasma
|
||||
export XDG_CURRENT_DESKTOP=dwm
|
||||
|
||||
# IMF configuration (fcitx5)
|
||||
export GTK_IM_MODULE=fcitx
|
||||
export QT_IM_MODULE=fcitx
|
||||
export XMODIFIERS=@im=fcitx
|
||||
export GLFW_IM_MODULE=ibus
|
||||
|
||||
# compositor
|
||||
picom -b --vsync &
|
||||
|
||||
# fix android studio interface
|
||||
export _JAVA_AWT_WM_NONREPARENTING=1 &
|
||||
|
||||
# set keyboard layout
|
||||
setxkbmap pl &
|
||||
# IMF daemon
|
||||
# fcitx5 -d &
|
||||
|
||||
# enable local fonts in .fonts directory
|
||||
# xset +fp /usr/share/fonts/local &
|
||||
# xset +fp /usr/share/fonts/misc &
|
||||
# xset +fp ~/.fonts &
|
||||
# xset fp rehash &
|
||||
# fc-cache -fv &
|
||||
|
||||
# powersaving options
|
||||
# xset s off &
|
||||
# xset s noblank &
|
||||
# xset s noexpose &
|
||||
# xset s on &
|
||||
# xset -dpms &
|
||||
# xset s 900 &
|
||||
xset +dpms &
|
||||
xset dpms 1200 1800 2100 &
|
||||
xset s on &
|
||||
xset s 900 &
|
||||
|
||||
# auths
|
||||
# /usr/lib/mate-polkit/polkit-mate-authentication-agent-1 &
|
||||
# gnome-keyring-daemon &
|
||||
# source /etc/X11/xinit/xinitrc.d/50-systemd-user.sh
|
||||
|
||||
## Map super key to trigger rofi when used alone
|
||||
# xcape -e 'Super_L=Super_L|Shift_L|space' &
|
||||
|
||||
# wallpaper engine and theming
|
||||
# nitrogen --restore &
|
||||
# wal --backend colorz -i $HOME/.dots/nitrogen/.config/nitrogen/pexels-engin-akyurt-1435752.jpg &
|
||||
. ~/.fehbg &
|
||||
|
||||
## Set screen locker
|
||||
xss-lock -v -- betterlockscreen -l --time-format '%I:%M %p' &
|
||||
|
||||
## Desktop portal
|
||||
/usr/lib/xdg-desktop-portal-gtk &
|
||||
|
||||
# notification daemon
|
||||
dunst &
|
||||
|
||||
## Screenshot daemon
|
||||
flameshot &
|
||||
|
||||
# Easyeffects daemon
|
||||
# easyeffects --gapplication-service &
|
||||
|
||||
## Telegram daemon
|
||||
# telegram-desktop -startintray &
|
||||
|
||||
## Caffeine-ng
|
||||
# caffeine >/dev/null 2>&1 &
|
||||
|
||||
## Ulauncher
|
||||
# ulauncher --hide-window --no-window-shadow >/dev/null 2>&1 &
|
||||
|
||||
# Emacs Server
|
||||
# emacs --daemon &
|
||||
|
||||
# Theme changing service
|
||||
# xsettingsd &
|
||||
|
||||
# Theming service
|
||||
# dusk &
|
||||
|
||||
# Alacritty config
|
||||
# $HOME/.config/alacritty/theme-patcher.sh &
|
||||
|
||||
## THINKPAD-SPECIFIC
|
||||
#hash dockd && dockd --daemon &
|
||||
|
||||
# status bar
|
||||
bash bar.sh & disown
|
||||
|
||||
dbus-update-activation-environment --systemd DBUS_SESSION_BUS_ADDRESS DISPLAY XAUTHORITY
|
||||
|
||||
# . /etc/X11/Xsession
|
||||
|
||||
# redshift &
|
||||
|
||||
# some merges
|
||||
# xrdb merge .Xresources &
|
||||
# xsetroot -cursor_name left_ptr &
|
||||
|
||||
# start dwm
|
||||
exec dwm
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
if [ "$(tty)" = "/dev/tty1" ];then
|
||||
exec startx
|
||||
fi
|
||||
@@ -1,181 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
function lighten_color() {
|
||||
offset=20
|
||||
|
||||
hex_color=$1
|
||||
hex_color=${hex_color:1}
|
||||
|
||||
red=${hex_color:0:2}
|
||||
green=${hex_color:2:2}
|
||||
blue=${hex_color:4:2}
|
||||
|
||||
red_dec=$(printf "%d" 0x$red)
|
||||
green_dec=$(printf "%d" 0x$green)
|
||||
blue_dec=$(printf "%d" 0x$blue)
|
||||
|
||||
if [[ $red_dec -lt 128 ]]; then
|
||||
red_dec_l=$((red_dec+offset))
|
||||
green_dec_l=$((green_dec+offset))
|
||||
blue_dec_l=$((blue_dec+offset))
|
||||
else
|
||||
red_dec_l=$((red_dec-offset))
|
||||
green_dec_l=$((green_dec-offset))
|
||||
blue_dec_l=$((blue_dec-offset))
|
||||
fi
|
||||
|
||||
red=$(printf "%02X" $red_dec_l)
|
||||
green=$(printf "%02X" $green_dec_l)
|
||||
blue=$(printf "%02X" $blue_dec_l)
|
||||
|
||||
echo "#$red$green$blue"
|
||||
}
|
||||
|
||||
# ^c$var^ = fg color
|
||||
# ^b$var^ = bg color
|
||||
|
||||
interval=0
|
||||
|
||||
# load colors
|
||||
# . ~/.config/bar_themes/onedark
|
||||
|
||||
# colors
|
||||
|
||||
rosewater=#f4dbd6
|
||||
flamingo=#f0c6c6
|
||||
pink=#f5bde6
|
||||
mauve=#c6a0f6
|
||||
red=#fb4934
|
||||
maroon=#ee99a0
|
||||
peach=#f5a97f
|
||||
yellow=#eed49f
|
||||
green=#b8bb26
|
||||
teal=#8bd5ca
|
||||
sky=#91d7e3
|
||||
sapphire=#7dc4e4
|
||||
blue=#8aadf4
|
||||
lavender=#b7bdf8
|
||||
text=#cad3f5
|
||||
subtext1=#b8c0e0
|
||||
subtext0=#a5adcb
|
||||
overlay2=#939ab7
|
||||
overlay1=#8087a2
|
||||
overlay0=#6e738d
|
||||
surface2=#5b6078
|
||||
surface1=#494d64
|
||||
surface0=#363a4f
|
||||
base=#24273a
|
||||
mantle=#1e2030
|
||||
crust=#181926
|
||||
|
||||
# Special
|
||||
background=#282828
|
||||
foreground=#ebdbb2
|
||||
cursor=#ebdbb2
|
||||
|
||||
# Colors
|
||||
color0=#05090e
|
||||
color1=#425965
|
||||
color2=#016b86
|
||||
color3=#1f7284
|
||||
color4=#48717a
|
||||
color5=#358292
|
||||
color6=#79796b
|
||||
color7=#828486
|
||||
color8=#43464a
|
||||
color9=#597787
|
||||
color10=#028FB3
|
||||
color11=#2A99B1
|
||||
color12=#6097A3
|
||||
color13=#47AEC3
|
||||
color14=#A2A28F
|
||||
color15=#c0c1c2
|
||||
|
||||
background0=$(lighten_color $background)
|
||||
background1=$(lighten_color $background0)
|
||||
background2=$(lighten_color $background1)
|
||||
|
||||
pulse () {
|
||||
VOL=$(pamixer --get-volume)
|
||||
STATE=$(pamixer --get-mute)
|
||||
|
||||
printf "%s" "$SEP1"
|
||||
if [ "$STATE" = "true" ] || [ "$VOL" -eq 0 ]; then
|
||||
printf "AMUT%%"
|
||||
elif [ "$VOL" -gt 0 ] && [ "$VOL" -le 33 ]; then
|
||||
printf "A%s%%" "$VOL"
|
||||
elif [ "$VOL" -gt 33 ] && [ "$VOL" -le 66 ]; then
|
||||
printf "A%s%%" "$VOL"
|
||||
else
|
||||
printf "A%s%%" "$VOL"
|
||||
fi
|
||||
printf "%s\n" "$SEP2"
|
||||
}
|
||||
|
||||
cpu() {
|
||||
cpu_val=$(grep -o "^[^ ]*" /proc/loadavg)
|
||||
|
||||
printf "^c$background^ ^b$yellow^ "
|
||||
printf "^c$background^ ^b$yellow^$cpu_val"
|
||||
}
|
||||
|
||||
battery() {
|
||||
capacity_0="$(cat /sys/class/power_supply/BAT0/capacity)"
|
||||
capacity_1="$(cat /sys/class/power_supply/BAT1/capacity)"
|
||||
|
||||
capacity="$capacity_0+$capacity_1"
|
||||
# capacity=$(((capacity_0 + capacity_1) / 2))
|
||||
|
||||
printf " B$capacity%% "
|
||||
}
|
||||
|
||||
brightness() {
|
||||
value=$(cat /sys/class/backlight/*/brightness)
|
||||
percentage=$(echo "scale=2; $value / 8.54" | bc)
|
||||
printf "L%.0f%%" "$percentage"
|
||||
}
|
||||
|
||||
mem() {
|
||||
printf "^c$background^^b$green^ "
|
||||
printf "^c$background^^b$green^ $(free -h | awk '/^Mem/ { print $3 }' | sed s/i//g)"
|
||||
}
|
||||
|
||||
wlan() {
|
||||
case "$(cat /sys/class/net/wl*/operstate 2>/dev/null)" in
|
||||
up) printf "^c$background^ ^b$blue^ ^c$background^ ^b$blue^Connected" ;;
|
||||
down) printf "^c$background^ ^b$blue^ ^c$background^ ^b$blue^Disconnected" ;;
|
||||
esac
|
||||
}
|
||||
|
||||
clock() {
|
||||
printf " $(date '+%I:%M %P') "
|
||||
}
|
||||
|
||||
today() {
|
||||
printf " $(date '+%b %e') "
|
||||
}
|
||||
|
||||
net() {
|
||||
if nc -zw1 c2yz.com 443; then
|
||||
printf "^c$background^^b$green^ i "
|
||||
else
|
||||
printf "^c$background^^b$red^ ! "
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
while true; do
|
||||
|
||||
# [ $interval = 0 ] || [ $(($interval % 3600)) = 0 ] && updates=$(pkg_updates)
|
||||
# interval=$((interval + 1))
|
||||
|
||||
# sleep 1 && xsetroot -name "$updates $(battery) $(brightness) $(cpu) $(mem) $(wlan) $(clock)"
|
||||
# sleep 1 && xsetroot -name "$(battery) $(brightness) $(cpu) $(mem) $(wlan) $(clock)"
|
||||
# if hash dockd 2>/dev/null; then
|
||||
# sleep 1 && xsetroot -name "^c$foreground^^b$background1^ $(brightness) ^b$background0^ $(battery) $(net)^c$foreground^^b$background0^ $(today) ^b$background1^ $(clock) ^b$background2^ $(pulse) "
|
||||
# else
|
||||
sleep 1 && xsetroot -name "^c$foreground^$(net)^c$foreground^^b$background0^ $(today) ^b$background1^ $(clock) ^b$background2^ $(pulse) "
|
||||
xsetroot -cursor_name left_ptr
|
||||
# fi
|
||||
|
||||
done
|
||||
@@ -1,6 +0,0 @@
|
||||
{pkgs, ...}: {
|
||||
services.betterlockscreen = {
|
||||
enable = true;
|
||||
package = pkgs.unstable.betterlockscreen;
|
||||
};
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
#version 330
|
||||
in vec2 texcoord;
|
||||
uniform float opacity;
|
||||
uniform bool invert_color;
|
||||
uniform sampler2D tex;
|
||||
|
||||
vec4 window_shader() {
|
||||
vec4 c = texelFetch(tex, ivec2(texcoord), 0);
|
||||
{
|
||||
// Change vec4(1.0, 1.0, 1.0, 1.0) to your desired color
|
||||
vec4 vdiff = abs(vec4(0.0, 0.0, 0.0, 1.0) - c);
|
||||
float diff = max(max(max(vdiff.r, vdiff.g), vdiff.b), vdiff.a);
|
||||
// Change 0.8 to your desired opacity
|
||||
if (diff < 0.001)
|
||||
c *= 0;
|
||||
}
|
||||
if (invert_color)
|
||||
c = vec4(vec3(c.a, c.a, c.a) - vec3(c), c.a);
|
||||
c *= opacity;
|
||||
// vec4 default_post_processing(vec4 c);
|
||||
return c;
|
||||
}
|
||||
@@ -1,93 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
./picom.nix
|
||||
./rofi.nix
|
||||
./flameshot.nix
|
||||
./betterlockscreen.nix
|
||||
./easyeffects.nix
|
||||
./theming.nix
|
||||
];
|
||||
|
||||
home.packages = with pkgs; [
|
||||
dmenu
|
||||
st
|
||||
dunst
|
||||
xss-lock
|
||||
xdg-desktop-portal-gtk
|
||||
xorg.xrdb
|
||||
xorg.xrandr
|
||||
xorg.xset
|
||||
xorg.xsetroot
|
||||
xorg.setxkbmap
|
||||
xorg.xbacklight
|
||||
xorg.libX11
|
||||
xorg.libX11.dev
|
||||
xorg.libxcb
|
||||
xorg.libXft
|
||||
xorg.libXinerama
|
||||
xorg.xinit
|
||||
xorg.xinput
|
||||
brightnessctl
|
||||
xclip
|
||||
# gnome.gnome-keyring
|
||||
feh
|
||||
alsaUtils
|
||||
cinnamon.nemo
|
||||
pulseaudioFull
|
||||
arandr
|
||||
neomutt
|
||||
ncmpcpp
|
||||
ncspot
|
||||
ncpamixer
|
||||
lf
|
||||
pamixer
|
||||
w3m
|
||||
bat
|
||||
efibootmgr
|
||||
eww
|
||||
fontconfig
|
||||
freetype
|
||||
fuse-common
|
||||
gimp
|
||||
gnugrep
|
||||
gnumake
|
||||
gparted
|
||||
nfs-utils
|
||||
ninja
|
||||
nodejs
|
||||
openssl
|
||||
nerdfonts
|
||||
polkit_gnome
|
||||
qemu
|
||||
ripgrep
|
||||
stdenv
|
||||
tldr
|
||||
variety
|
||||
virt-manager
|
||||
xfce.thunar
|
||||
dconf
|
||||
];
|
||||
|
||||
home.file = {
|
||||
".xinitrc" = {
|
||||
source = ./.xinitrc;
|
||||
};
|
||||
".zprofile" = {
|
||||
source = ./.zprofile;
|
||||
};
|
||||
".config/picom/black_to_transparent.frag" = {
|
||||
source = ./black_to_transparent.frag;
|
||||
};
|
||||
# ".Xresources" = {
|
||||
# text = ''
|
||||
# Xcursor.theme: "Bibata-Modern-Classic"
|
||||
# Xcursor.size: 18
|
||||
# '';
|
||||
# };
|
||||
};
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
{pkgs, ...}: {
|
||||
services.easyeffects = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
{pkgs, ...}: {
|
||||
services.flameshot = {
|
||||
enable = true;
|
||||
settings = {
|
||||
General = {
|
||||
showStartupLaunchMessage = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,99 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
services.picom = {
|
||||
enable = true;
|
||||
package = pkgs.unstable.picom;
|
||||
backend = "glx";
|
||||
|
||||
shadow = true;
|
||||
shadowOpacity = 0.2;
|
||||
shadowOffsets = [1 1];
|
||||
|
||||
shadowExclude = [
|
||||
"name = 'Notification'"
|
||||
"class_g = 'Conky'"
|
||||
"_GTK_FRAME_EXTENTS@:c"
|
||||
"override_redirect = 1 && !WM_CLASS@:s"
|
||||
"class_g ?= 'Dmenu'"
|
||||
"class_g ?= 'Dunst'"
|
||||
"_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'"
|
||||
"_GTK_FRAME_EXTENTS@:c"
|
||||
"_NET_WM_STATE@:32a *= '_NET_WM_STATE_STICKY'"
|
||||
"class_g ?= 'i3-frame'"
|
||||
"class_g = 'Rofi'"
|
||||
];
|
||||
|
||||
fade = true;
|
||||
fadeSteps = [0.08 0.05];
|
||||
|
||||
vSync = true;
|
||||
|
||||
settings = {
|
||||
shadow = {
|
||||
radius = 3;
|
||||
};
|
||||
|
||||
corner-radius = 9;
|
||||
rounder-corners-exclude = [
|
||||
"window_type = 'dock'"
|
||||
"window_type = 'desktop'"
|
||||
"class_g = 'Dunst'"
|
||||
];
|
||||
|
||||
blur = {
|
||||
method = "dual_kawase";
|
||||
strength = 10;
|
||||
background = false;
|
||||
background-frame = false;
|
||||
background-fixed = false;
|
||||
};
|
||||
|
||||
blur-kern = "3x3box";
|
||||
|
||||
# xprop | grep -i 'class'
|
||||
opacity-rule = [
|
||||
"90:class_g = 'neovide'"
|
||||
"90:class_g = 'code-oss'"
|
||||
"90:class_g = 'discord'"
|
||||
"90:class_g = 'Emacs'"
|
||||
"90:class_g = 'TelegramDesktop'"
|
||||
"90:class_g = 'Spotify'"
|
||||
"90:class_g = 'easyeffects'"
|
||||
"90:class_g = 'kitty'"
|
||||
"90:class_g = 'Nemo'"
|
||||
"97:class_g = 'firefox'"
|
||||
];
|
||||
|
||||
# Exclude conditions for background blur.
|
||||
# blur-background-exclude = []
|
||||
blur-background-exclude = [
|
||||
"window_type = 'dock'"
|
||||
"window_type = 'desktop'"
|
||||
"_GTK_FRAME_EXTENTS@:c"
|
||||
];
|
||||
|
||||
mark-wmwin-focused = true;
|
||||
mark-ovredir-focused = true;
|
||||
detect-rounded-corners = true;
|
||||
detect-client-opacity = true;
|
||||
unredir-if-possible = false;
|
||||
detect-transient = true;
|
||||
detect-client-leader = true;
|
||||
use-damage = true;
|
||||
|
||||
window-shader-fg-rule = [
|
||||
# "black_to_transparent.frag:class_g = 'stalonetray'",
|
||||
# "black_to_transparent.frag:class_g = 'Minecraft 1.7.10'",
|
||||
# "black_to_transparent.frag:class_g = 'i3lock'"
|
||||
# "black_to_transparent.frag:focused = true",
|
||||
# "black_to_transparent.frag:focused != true",
|
||||
#"sphere.glsl:focused != true"
|
||||
#"nordify.glsl:class_g = 'miru'"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
programs.rofi = {
|
||||
enable = true;
|
||||
plugins = with pkgs; [
|
||||
rofi-calc
|
||||
];
|
||||
location = "center";
|
||||
theme = "gruvbox-dark-soft";
|
||||
};
|
||||
}
|
||||
@@ -1,54 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
# enable gtk
|
||||
gtk = {
|
||||
enable = true;
|
||||
cursorTheme = {
|
||||
name = "Bibata-Modern-Classic";
|
||||
package = pkgs.bibata-cursors;
|
||||
};
|
||||
theme = {
|
||||
name = "gruvbox-dark";
|
||||
package = pkgs.gruvbox-dark-gtk;
|
||||
};
|
||||
iconTheme = {
|
||||
name = "oomox-gruvbox-dark";
|
||||
package = pkgs.gruvbox-dark-icons-gtk;
|
||||
};
|
||||
};
|
||||
|
||||
# enable qt
|
||||
qt = {
|
||||
enable = true;
|
||||
platformTheme = "qtct";
|
||||
style = {
|
||||
name = "kvantum";
|
||||
};
|
||||
};
|
||||
|
||||
xdg.configFile = {
|
||||
"Kvantum/kvantum.kvconfig".text = ''
|
||||
[General]
|
||||
theme=GraphiteNordDark
|
||||
'';
|
||||
|
||||
"Kvantum/GraphiteNord".source = "${pkgs.graphite-kde-theme}/share/Kvantum/GraphiteNord";
|
||||
};
|
||||
|
||||
home.pointerCursor = {
|
||||
gtk.enable = true;
|
||||
x11.enable = true;
|
||||
package = pkgs.bibata-cursors;
|
||||
name = "Bibata-Modern-Classic";
|
||||
size = 18;
|
||||
};
|
||||
|
||||
xsession.pointerCursor = {
|
||||
name = "Bibata-Modern-Classic";
|
||||
size = 18;
|
||||
};
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
{imports = [../common];}
|
||||
@@ -1,99 +0,0 @@
|
||||
{lib, ...}: {
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
bindm = [
|
||||
"SUPER,mouse:272,movewindow"
|
||||
"SUPER,mouse:273,resizewindow"
|
||||
];
|
||||
|
||||
bind = let
|
||||
workspaces = [
|
||||
"0"
|
||||
"1"
|
||||
"2"
|
||||
"3"
|
||||
"4"
|
||||
"5"
|
||||
"6"
|
||||
"7"
|
||||
"8"
|
||||
"9"
|
||||
"F1"
|
||||
"F2"
|
||||
"F3"
|
||||
"F4"
|
||||
"F5"
|
||||
"F6"
|
||||
"F7"
|
||||
"F8"
|
||||
"F9"
|
||||
"F10"
|
||||
"F11"
|
||||
"F12"
|
||||
];
|
||||
# Map keys (arrows and hjkl) to hyprland directions (l, r, u, d)
|
||||
directions = rec {
|
||||
left = "l";
|
||||
right = "r";
|
||||
up = "u";
|
||||
down = "d";
|
||||
h = left;
|
||||
l = right;
|
||||
k = up;
|
||||
j = down;
|
||||
};
|
||||
in
|
||||
[
|
||||
"SUPERSHIFT,q,killactive"
|
||||
"SUPERSHIFT,e,exit"
|
||||
|
||||
"SUPER,s,togglesplit"
|
||||
"SUPER,f,fullscreen,1"
|
||||
"SUPERSHIFT,f,fullscreen,0"
|
||||
"SUPERSHIFT,space,togglefloating"
|
||||
|
||||
"SUPER,minus,splitratio,-0.25"
|
||||
"SUPERSHIFT,minus,splitratio,-0.3333333"
|
||||
|
||||
"SUPER,equal,splitratio,0.25"
|
||||
"SUPERSHIFT,equal,splitratio,0.3333333"
|
||||
|
||||
"SUPER,g,togglegroup"
|
||||
"SUPER,t,lockactivegroup,toggle"
|
||||
"SUPER,tab,changegroupactive,f"
|
||||
"SUPERSHIFT,tab,changegroupactive,b"
|
||||
|
||||
"SUPER,apostrophe,workspace,previous"
|
||||
|
||||
"SUPER,u,togglespecialworkspace"
|
||||
"SUPERSHIFT,u,movetoworkspacesilent,special"
|
||||
"SUPER,i,pseudo"
|
||||
]
|
||||
++
|
||||
# Change workspace
|
||||
(map (n: "SUPER,${n},workspace,name:${n}") workspaces)
|
||||
++
|
||||
# Move window to workspace
|
||||
(map (n: "SUPERSHIFT,${n},movetoworkspacesilent,name:${n}") workspaces)
|
||||
++
|
||||
# Move focus
|
||||
(lib.mapAttrsToList (key: direction: "SUPER,${key},movefocus,${direction}") directions)
|
||||
++
|
||||
# Swap windows
|
||||
(lib.mapAttrsToList (key: direction: "SUPERSHIFT,${key},swapwindow,${direction}") directions)
|
||||
++
|
||||
# Move windows
|
||||
(lib.mapAttrsToList (
|
||||
key: direction: "SUPERCONTROL,${key},movewindoworgroup,${direction}"
|
||||
)
|
||||
directions)
|
||||
++
|
||||
# Move monitor focus
|
||||
(lib.mapAttrsToList (key: direction: "SUPERALT,${key},focusmonitor,${direction}") directions)
|
||||
++
|
||||
# Move workspace to other monitor
|
||||
(lib.mapAttrsToList (
|
||||
key: direction: "SUPERALTSHIFT,${key},movecurrentworkspacetomonitor,${direction}"
|
||||
)
|
||||
directions);
|
||||
};
|
||||
}
|
||||
@@ -1,43 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
# hyprland = pkgs.inputs.hyprland.hyprland.override {wrapRuntimeDeps = false;};
|
||||
# xdhp = pkgs.inputs.hyprland.xdg-desktop-portal-hyprland.override {inherit hyprland;};
|
||||
in {
|
||||
imports = [
|
||||
../common
|
||||
../common/wayland-wm
|
||||
];
|
||||
|
||||
# xdg.portal = {
|
||||
# extraPortals = [xdhp];
|
||||
# configPackages = [hyprland];
|
||||
# };
|
||||
|
||||
home.packages = with pkgs; [
|
||||
# inputs.hyprwm-contrib.grimblast
|
||||
# hyprslurp
|
||||
hyprpicker
|
||||
hyprpaper
|
||||
waybar
|
||||
xdg-desktop-portal-hyprland
|
||||
];
|
||||
|
||||
# wayland.windowManger.hyprland = {
|
||||
# enable = true;
|
||||
# # package = hyprland;
|
||||
# systemd = {
|
||||
# enable = true;
|
||||
# # Same as default but stop graphical-session too
|
||||
# extraCommands = lib.mkBefore [
|
||||
# "systemctl --user stop graphical-session.target"
|
||||
# "systemctl --user start hyprland-session.target"
|
||||
# ];
|
||||
# };
|
||||
#
|
||||
# #TODO: Add hyprland config
|
||||
# };
|
||||
}
|
||||
@@ -1,58 +0,0 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
hyprbars =
|
||||
(pkgs.inputs.hyprland-plugins.hyprbars.override {
|
||||
# Make sure it's using the same hyprland package as we are
|
||||
hyprland = config.wayland.windowManager.hyprland.package;
|
||||
})
|
||||
.overrideAttrs
|
||||
(old: {
|
||||
# Yeet the initialization notification (I hate it)
|
||||
postPatch =
|
||||
(old.postPatch or "")
|
||||
+ ''
|
||||
${lib.getExe pkgs.gnused} -i '/Initialized successfully/d' main.cpp
|
||||
'';
|
||||
});
|
||||
in {
|
||||
wayland.windowManager.hyprland = {
|
||||
plugins = [hyprbars];
|
||||
settings = {
|
||||
"plugin:hyprbars" = {
|
||||
bar_height = 25;
|
||||
#bar_color = "0xdd${config.colorscheme.colors.base00}";
|
||||
#"col.text" = "0xee${config.colorscheme.colors.base05}";
|
||||
#bar_text_font = config.fontProfiles.regular.family;
|
||||
bar_text_size = 12;
|
||||
bar_part_of_window = true;
|
||||
hyprbars-button = let
|
||||
closeAction = "hyprctl dispatch killactive";
|
||||
|
||||
isOnSpecial = ''hyprctl activewindow -j | jq -re 'select(.workspace.name == "special")' >/dev/null'';
|
||||
moveToSpecial = "hyprctl dispatch movetoworkspacesilent special";
|
||||
moveToActive = "hyprctl dispatch movetoworkspacesilent name:$(hyprctl -j activeworkspace | jq -re '.name')";
|
||||
minimizeAction = "${isOnSpecial} && ${moveToActive} || ${moveToSpecial}";
|
||||
|
||||
maximizeAction = "hyprctl dispatch togglefloating";
|
||||
in [
|
||||
# Red close button
|
||||
#"rgb(${config.colorscheme.colors.base08}),12,,${closeAction}"
|
||||
# Yellow "minimize" (send to special workspace) button
|
||||
#"rgb(${config.colorscheme.colors.base0A}),12,,${minimizeAction}"
|
||||
# Green "maximize" (togglefloating) button
|
||||
#"rgb(${config.colorscheme.colors.base0B}),12,,${maximizeAction}"
|
||||
];
|
||||
};
|
||||
bind = let
|
||||
barsEnabled = "hyprctl -j getoption plugin:hyprbars:bar_height | ${lib.getExe pkgs.jq} -re '.int != 0'";
|
||||
setBarHeight = height: "hyprctl keyword plugin:hyprbars:bar_height ${toString height}";
|
||||
toggleOn = setBarHeight config.wayland.windowManager.hyprland.settings."plugin:hyprbars".bar_height;
|
||||
toggleOff = setBarHeight 0;
|
||||
in ["SUPER,m,exec,${barsEnabled} && ${toggleOff} || ${toggleOn}"];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
{pkgs, ...}: {
|
||||
programs.emacs = {
|
||||
enable = true;
|
||||
package = pkgs.unstable.emacs;
|
||||
};
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
{ pkgs, ... }: {
|
||||
programs.helix = {
|
||||
enable = true;
|
||||
settings = {
|
||||
theme = "gruvbox_dark_soft";
|
||||
editor.cursor-shape = {
|
||||
normal = "block";
|
||||
insert = "bar";
|
||||
select = "underline";
|
||||
};
|
||||
};
|
||||
languages.language = [{
|
||||
name = "nix";
|
||||
auto-format = true;
|
||||
formatter.command = "${pkgs.nixfmt}/bin/nixfmt";
|
||||
}];
|
||||
};
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
{
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
font = {
|
||||
name = "FiraCode Nerd Font";
|
||||
size = 12;
|
||||
};
|
||||
|
||||
theme = "Gruvbox Dark";
|
||||
|
||||
settings = {
|
||||
confirm_os_window_close = 0;
|
||||
detect_urls = true;
|
||||
enable_audio_bell = false;
|
||||
resize_in_steps = true;
|
||||
# window_padding_width = 16;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
{pkgs, ...}: {
|
||||
home.packages = with pkgs; [
|
||||
neovide
|
||||
];
|
||||
|
||||
home.file = {
|
||||
".config/neovide/config.toml" = {
|
||||
text = ''
|
||||
vsync = true
|
||||
|
||||
[font]
|
||||
normal = ["FiraCode Nerd Font"]
|
||||
size = 14
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
{
|
||||
inputs,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
nixpkgs.overlays = [
|
||||
inputs.neovim-nightly-overlay.overlay
|
||||
];
|
||||
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
package = pkgs.neovim-nightly;
|
||||
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
vimdiffAlias = true;
|
||||
|
||||
defaultEditor = true;
|
||||
};
|
||||
}
|
||||
@@ -1,49 +0,0 @@
|
||||
{pkgs, ...}: {
|
||||
programs.tmux = {
|
||||
enable = true;
|
||||
mouse = true;
|
||||
prefix = "C-Space";
|
||||
keyMode = "vi";
|
||||
terminal = "screen-256color";
|
||||
baseIndex = 1;
|
||||
plugins = with pkgs.tmuxPlugins; [
|
||||
sensible
|
||||
vim-tmux-navigator
|
||||
gruvbox
|
||||
yank
|
||||
];
|
||||
extraConfig = ''
|
||||
# history limit
|
||||
set -g history-limit 5000
|
||||
|
||||
# increase repeat time
|
||||
set -g repeat-time 1000
|
||||
|
||||
# decrese command delay
|
||||
set -sg escape-time 1
|
||||
|
||||
# faster key repetition
|
||||
set -s escape-time 0
|
||||
|
||||
setw -g aggressive-resize on
|
||||
|
||||
# reload tmux while using tmux
|
||||
bind r source-file ~/.config/tmux/tmux.conf \; display "Reloaded!"
|
||||
|
||||
# Shift Alt vim keys to switch windows
|
||||
bind -n M-H previous-window
|
||||
bind -n M-L next-window
|
||||
|
||||
# Vim like yank
|
||||
bind-key -T copy-mode-vi v send-keys -X begin-selection
|
||||
bind-key -T copy-mode-vi C-v send-keys -X rectangle-toggle
|
||||
bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel
|
||||
|
||||
# Open panes in current directory
|
||||
bind '"' split-window -v -c "#{pane_current_path}"
|
||||
bind % split-window -h -c "#{pane_current_path}"
|
||||
|
||||
|
||||
'';
|
||||
};
|
||||
}
|
||||
@@ -1,180 +0,0 @@
|
||||
# This is your home-manager configuration file
|
||||
# Use this to configure your home environment (it replaces ~/.config/nixpkgs/home.nix)
|
||||
{ inputs, outputs, pkgs, ... }: {
|
||||
# You can import other home-manager modules here
|
||||
imports = [
|
||||
# If you want to use modules your own flake exports (from modules/home-manager):
|
||||
# outputs.homeManagerModules.example
|
||||
|
||||
# Or modules exported from other flakes (such as nix-colors):
|
||||
inputs.nix-colors.homeManagerModules.default
|
||||
|
||||
# You can also split up your configuration and import pieces of it here:
|
||||
# ./nvim.nix
|
||||
./features/cli
|
||||
./features/desktop/dwm
|
||||
./features/kitty.nix
|
||||
./features/neovim.nix
|
||||
./features/tmux.nix
|
||||
./features/neovide.nix
|
||||
./features/emacs.nix
|
||||
./features/helix.nix
|
||||
];
|
||||
|
||||
colorScheme = inputs.nix-colors.colorSchemes.gruvbox-dark-medium;
|
||||
|
||||
nixpkgs = {
|
||||
# You can add overlays here
|
||||
overlays = [
|
||||
# Add overlays your own flake exports (from overlays and pkgs dir):
|
||||
outputs.overlays.additions
|
||||
outputs.overlays.modifications
|
||||
outputs.overlays.unstable-packages
|
||||
|
||||
# You can also add overlays exported from other flakes:
|
||||
# neovim-nightly-overlay.overlays.default
|
||||
|
||||
# Or define it inline, for example:
|
||||
# (final: prev: {
|
||||
# hi = final.hello.overrideAttrs (oldAttrs: {
|
||||
# patches = [ ./change-hello-to-hi.patch ];
|
||||
# });
|
||||
# })
|
||||
];
|
||||
# Configure your nixpkgs instance
|
||||
config = {
|
||||
# Disable if you don't want unfree packages
|
||||
allowUnfree = true;
|
||||
# Workaround for https://github.com/nix-community/home-manager/issues/2942
|
||||
allowUnfreePredicate = _: true;
|
||||
};
|
||||
};
|
||||
|
||||
# Username to manage
|
||||
home = {
|
||||
username = "mike";
|
||||
homeDirectory = "/home/mike";
|
||||
file = {
|
||||
# Building this configuration will create a copy of 'dotfiles/screenrc' in
|
||||
# the Nix store. Activating the configuration will then make '~/.screenrc' a
|
||||
# symlink to the Nix store copy.
|
||||
# ".screenrc".source = dotfiles/screenrc;
|
||||
|
||||
# You can also set the file content immediately.
|
||||
# ".gradle/gradle.properties".text = ''
|
||||
# org.gradle.console=verbose
|
||||
# org.gradle.daemon.idletimeout=3600000
|
||||
# '';
|
||||
};
|
||||
};
|
||||
|
||||
# The home.packages option allows you to install Nix packages into your
|
||||
# environment.
|
||||
home.packages = with pkgs; [
|
||||
# > graphics <
|
||||
tuxpaint
|
||||
krita
|
||||
|
||||
# > terminal <
|
||||
kitty
|
||||
kitty-themes
|
||||
|
||||
# > tools <
|
||||
git
|
||||
wget
|
||||
eza
|
||||
yt-dlp
|
||||
ffmpeg
|
||||
# texliveFull
|
||||
texlive.combined.scheme-full
|
||||
pgf-umlcd
|
||||
fastfetch
|
||||
pgf-umlsd
|
||||
zoxide
|
||||
neofetch
|
||||
pavucontrol
|
||||
htop
|
||||
woeusb
|
||||
steam-run
|
||||
unzip
|
||||
gnome.adwaita-icon-theme
|
||||
R
|
||||
openvpn
|
||||
wol
|
||||
direnv
|
||||
p7zip
|
||||
czkawka
|
||||
insomnia
|
||||
|
||||
# > media <
|
||||
spotify
|
||||
vlc
|
||||
mpv
|
||||
obs-studio
|
||||
okular
|
||||
|
||||
# > desktop <
|
||||
firefox
|
||||
discord
|
||||
telegram-desktop
|
||||
libreoffice-fresh
|
||||
# vscodium
|
||||
unstable.vscode
|
||||
google-chrome
|
||||
lunarvim
|
||||
unstable.evolution
|
||||
rstudio
|
||||
unstable.obsidian
|
||||
foliate
|
||||
helio-workstation
|
||||
|
||||
# > gaming <
|
||||
prismlauncher
|
||||
classicube
|
||||
steam
|
||||
|
||||
# > development <
|
||||
docker
|
||||
docker-compose
|
||||
gnome.seahorse
|
||||
lmstudio
|
||||
unstable.arduino-ide
|
||||
iwgtk
|
||||
kwallet-pam
|
||||
kwalletcli
|
||||
kwalletmanager
|
||||
];
|
||||
|
||||
services.gnome-keyring = {
|
||||
enable = true;
|
||||
components = [ "ssh" "secrets" "pkcs11" ];
|
||||
};
|
||||
|
||||
# programs.keychain = {
|
||||
# enable = true;
|
||||
# enableZshIntegration = true;
|
||||
# keys = [
|
||||
# "id_rsa"
|
||||
# ];
|
||||
# enableXsessionIntegration = true;
|
||||
# };
|
||||
|
||||
# systemd.user.sessionVariables.SSH_AUTH_SOCK = "/run/user/1000/keyring/ssh";
|
||||
|
||||
home.sessionVariables = { EDITOR = "nvim"; };
|
||||
|
||||
# Let Home Manager install and manage itself.
|
||||
programs.home-manager.enable = true;
|
||||
|
||||
# Nicely reload system units when changing configs
|
||||
systemd.user.startServices = "sd-switch";
|
||||
|
||||
# This value determines the Home Manager release that your configuration is
|
||||
# compatible with. This helps avoid breakage when a new Home Manager release
|
||||
# introduces backwards incompatible changes.
|
||||
#
|
||||
# You should not change this value, even if you update Home Manager. If you do
|
||||
# want to update the value, then make sure to first check the Home Manager
|
||||
# release notes.
|
||||
home.stateVersion = "23.11"; # Please read the comment before changing.
|
||||
}
|
||||
37
home/home.nix
Normal file
@@ -0,0 +1,37 @@
|
||||
{ hostname, ... }:
|
||||
{
|
||||
imports =
|
||||
if hostname == "zion" then
|
||||
[
|
||||
./programs/git.nix
|
||||
./programs/btop.nix
|
||||
# ./programs/yazi.nix
|
||||
# ./programs/foot.nix
|
||||
./programs/shell.nix
|
||||
# ./programs/helix.nix
|
||||
# ./programs/zathura.nix
|
||||
./programs/packages.nix
|
||||
# ./programs/vscodium.nix
|
||||
./programs/vscode.nix
|
||||
./programs/kitty.nix
|
||||
./programs/fastfetch.nix
|
||||
|
||||
./system/tofi.nix
|
||||
./system/wofi.nix
|
||||
./system/dunst.nix
|
||||
./system/stylix.nix
|
||||
./system/waybar.nix
|
||||
./system/wlsunset.nix
|
||||
./system/hyprland.nix
|
||||
]
|
||||
else if hostname == "server" then
|
||||
[
|
||||
./programs/git.nix
|
||||
./programs/btop.nix
|
||||
./programs/yazi.nix
|
||||
./programs/shell.nix
|
||||
./programs/helix.nix
|
||||
./programs/fastfetch.nix
|
||||
]
|
||||
else [ ];
|
||||
}
|
||||
11
home/programs/btop.nix
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
programs.btop = {
|
||||
enable = true;
|
||||
settings = {
|
||||
update_ms = 1000;
|
||||
rounded_corners = false;
|
||||
proc_sorting = "memory";
|
||||
shown_boxes = "proc cpu ";
|
||||
};
|
||||
};
|
||||
}
|
||||
122
home/programs/fastfetch.nix
Normal file
@@ -0,0 +1,122 @@
|
||||
{
|
||||
programs.fastfetch = {
|
||||
enable = true;
|
||||
settings = {
|
||||
|
||||
"$schema" = "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json";
|
||||
|
||||
logo = {
|
||||
type = "kitty";
|
||||
height = 20;
|
||||
padding = {
|
||||
top = 0;
|
||||
right = 2;
|
||||
};
|
||||
};
|
||||
|
||||
display = {
|
||||
separator = " ➜ ";
|
||||
};
|
||||
|
||||
modules = [
|
||||
"break"
|
||||
{
|
||||
type = "os";
|
||||
key = "OS ";
|
||||
keyColor = "31";
|
||||
format = "{2} {8}";
|
||||
}
|
||||
{
|
||||
type = "kernel";
|
||||
key = " ├ ";
|
||||
keyColor = "31";
|
||||
format = "{2}";
|
||||
}
|
||||
{
|
||||
type = "packages";
|
||||
format = "{} (nixpkgs)";
|
||||
key = " ├ ";
|
||||
keyColor = "31";
|
||||
}
|
||||
{
|
||||
type = "shell";
|
||||
key = " └ ";
|
||||
keyColor = "31";
|
||||
}
|
||||
"break"
|
||||
{
|
||||
type = "wm";
|
||||
key = "WM ";
|
||||
keyColor = "32";
|
||||
format = "{2}";
|
||||
}
|
||||
{
|
||||
type = "wmtheme";
|
||||
key = " ├ ";
|
||||
keyColor = "32";
|
||||
}
|
||||
{
|
||||
type = "icons";
|
||||
key = " ├ ";
|
||||
keyColor = "32";
|
||||
}
|
||||
{
|
||||
type = "cursor";
|
||||
key = " ├ ";
|
||||
keyColor = "32";
|
||||
}
|
||||
{
|
||||
type = "terminal";
|
||||
key = " ├ ";
|
||||
keyColor = "32";
|
||||
}
|
||||
{
|
||||
type = "terminalfont";
|
||||
key = " └ ";
|
||||
keyColor = "32";
|
||||
}
|
||||
"break"
|
||||
{
|
||||
type = "host";
|
||||
format = "{5} {1}";
|
||||
key = "PC ";
|
||||
keyColor = "33";
|
||||
}
|
||||
{
|
||||
type = "cpu";
|
||||
format = "AMD Ryzen 7 8845HS";
|
||||
key = " ├ ";
|
||||
keyColor = "33";
|
||||
}
|
||||
{
|
||||
type = "gpu";
|
||||
format = "AMD Radeon 780M";
|
||||
key = " ├ ";
|
||||
keyColor = "33";
|
||||
}
|
||||
{
|
||||
type = "memory";
|
||||
key = " ├ ";
|
||||
keyColor = "33";
|
||||
}
|
||||
{
|
||||
type = "swap";
|
||||
key = " ├ ";
|
||||
keyColor = "33";
|
||||
}
|
||||
{
|
||||
type = "disk";
|
||||
key = " ├ ";
|
||||
keyColor = "33";
|
||||
}
|
||||
{
|
||||
type = "monitor";
|
||||
key = " └ ";
|
||||
keyColor = "33";
|
||||
format = "{2}x{3} px";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
41
home/programs/foot.nix
Normal file
@@ -0,0 +1,41 @@
|
||||
{
|
||||
programs.foot = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
main = {
|
||||
pad = "5x0";
|
||||
dpi-aware = "yes";
|
||||
};
|
||||
|
||||
mouse = {
|
||||
hide-when-typing = "yes";
|
||||
};
|
||||
|
||||
tweak = {
|
||||
font-monospace-warn = "no";
|
||||
};
|
||||
|
||||
colors = {
|
||||
foreground = "cdd6f4";
|
||||
background = "1e1e2e";
|
||||
regular0 = "1e1e2e"; # black
|
||||
regular1 = "f38ba8"; # red
|
||||
regular2 = "a6e3a1"; # green
|
||||
regular3 = "f9e2af"; # yellow
|
||||
regular4 = "89b4fa"; # blue
|
||||
regular5 = "cba6f7"; # magenta
|
||||
regular6 = "94e2d5"; # cyan
|
||||
regular7 = "cdd6f4"; # white
|
||||
bright0 = "45475a"; # bright black
|
||||
bright1 = "f38ba8"; # bright red
|
||||
bright2 = "a6e3a1"; # bright green
|
||||
bright3 = "f9e2af"; # bright yellow
|
||||
bright4 = "89b4fa"; # bright blue
|
||||
bright5 = "cba6f7"; # bright magenta
|
||||
bright6 = "94e2d5"; # bright cyan
|
||||
bright7 = "b4befe"; # bright white
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
26
home/programs/freetube.nix
Normal file
@@ -0,0 +1,26 @@
|
||||
{
|
||||
programs.freetube = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
allowDashAv1Formats = true;
|
||||
defaultQuality = "1080";
|
||||
useSponsorBlock = true;
|
||||
|
||||
backendFallback = true;
|
||||
|
||||
autoplayPlaylists = false;
|
||||
autoplayVideos = false;
|
||||
expandSideBar = false;
|
||||
hideLabelsSideBar = true;
|
||||
|
||||
checkForBlogPosts = false;
|
||||
checkForUpdates = false;
|
||||
|
||||
mainColor = "CatppuccinMochaMauve";
|
||||
secColor = "CatppuccinMochaPink";
|
||||
baseTheme = "catppuccinMocha";
|
||||
barColor = false;
|
||||
};
|
||||
};
|
||||
}
|
||||
13
home/programs/git.nix
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
programs.git = {
|
||||
enable = true;
|
||||
|
||||
userName = "Michał Czyż";
|
||||
userEmail = "mike@c2yz.com";
|
||||
|
||||
extraConfig = {
|
||||
init.defaultBranch = "main";
|
||||
push.autoSetupRemote = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
176
home/programs/helix.nix
Normal file
@@ -0,0 +1,176 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs.helix = {
|
||||
enable = true;
|
||||
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
# languages Configuration
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
languages = {
|
||||
language = [
|
||||
|
||||
{
|
||||
name = "nix";
|
||||
auto-format = true;
|
||||
language-servers = [ "nixd" "nil" ];
|
||||
formatter = {
|
||||
command = "${pkgs.nixpkgs-fmt}/bin/nixpkgs-fmt";
|
||||
# command = "${pkgs.nixfmt-rfc-style}/bin/nixfmt";
|
||||
# command = "${pkgs.alejandra}/bin/alejandra";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
name = "bash";
|
||||
auto-format = true;
|
||||
language-servers = [ "bash-language-server" ];
|
||||
formatter = {
|
||||
command = "${pkgs.shfmt}/bin/shfmt";
|
||||
args = [ "-i" "2" "-ci" ];
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
name = "python";
|
||||
auto-format = true;
|
||||
language-servers = [ "pyright" ];
|
||||
formatter = {
|
||||
command = "${pkgs.black}/bin/black";
|
||||
args = [ "--quiet" "-" ];
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
name = "rust";
|
||||
auto-format = false;
|
||||
file-types = [ "rs" ];
|
||||
language-servers = [ "rust-analyzer" ];
|
||||
formatter = { command = "${pkgs.rustfmt}/bin/rustfmt"; };
|
||||
}
|
||||
|
||||
{
|
||||
name = "zig";
|
||||
auto-format = true;
|
||||
language-servers = [ "zsl" ];
|
||||
formatter = { command = "${pkgs.zig}/bin/zig"; };
|
||||
}
|
||||
|
||||
{
|
||||
name = "html";
|
||||
auto-format = true;
|
||||
language-servers = [ "vscode-langservers-extracted" ];
|
||||
}
|
||||
|
||||
{
|
||||
name = "javascript";
|
||||
auto-format = true;
|
||||
language-servers = [ "typescript-language-server" ];
|
||||
}
|
||||
];
|
||||
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
# Language Server Protocol Configuration
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
language-servers = {
|
||||
|
||||
nil = { command = "${pkgs.nixd}/bin/nixd"; };
|
||||
|
||||
rust-analyzer = {
|
||||
config = {
|
||||
check = { command = "${pkgs.clippy}/bin/cargo-clippy"; };
|
||||
# cargo.features = "all";
|
||||
checkOnSave.command = "${pkgs.clippy}/bin/cargo-clippy";
|
||||
completion.autoimport.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
typescript-language-server = {
|
||||
command = "${pkgs.nodePackages_latest.typescript-language-server}/bin/typescript-language-server";
|
||||
args = [ "--stdio" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
# Needed Packages
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
extraPackages = with pkgs; [
|
||||
# DEBUG
|
||||
lldb_18
|
||||
|
||||
# lldb-vscode :
|
||||
# c
|
||||
# cpp
|
||||
|
||||
# = < NIX > =
|
||||
# = Language Server Protocol =
|
||||
nil
|
||||
nixd
|
||||
# = DAP =
|
||||
|
||||
# = Formatter =
|
||||
# nixfmt
|
||||
nixfmt-rfc-style
|
||||
# alejandra
|
||||
|
||||
# = < Bash > =
|
||||
# = Language Server Protocol =
|
||||
nodePackages.bash-language-server
|
||||
# = DAP =
|
||||
# = Formatter =
|
||||
shfmt
|
||||
|
||||
# = < Python > =
|
||||
# = Language Server Protocol =
|
||||
pyright
|
||||
# = DAP =
|
||||
# = Formatter =
|
||||
black
|
||||
|
||||
# = < Rust > =
|
||||
# = Language Server Protocol =
|
||||
rust-analyzer
|
||||
# = DAP =
|
||||
lldb
|
||||
# = Formatter =
|
||||
# rust-fmt
|
||||
clippy # Good place ?
|
||||
|
||||
# = < lua > =
|
||||
# = Language Server Protocol =
|
||||
lua-language-server
|
||||
# = DAP =
|
||||
# = Formatter =
|
||||
|
||||
# = < Zig > =
|
||||
# = Language Server Protocol =
|
||||
zls
|
||||
# = DAP =
|
||||
# lldb (commented because already called)
|
||||
# = Formatter =
|
||||
zig
|
||||
|
||||
# = < HTML > =
|
||||
# = Language Server Protocol =
|
||||
# vscode-html-language-server
|
||||
vscode-langservers-extracted
|
||||
# = DAP =
|
||||
# = Formatter =
|
||||
|
||||
# = < CSS > =
|
||||
# = Language Server Protocol =
|
||||
nodePackages_latest.typescript-language-server
|
||||
# = DAP =
|
||||
# = Formatter =
|
||||
|
||||
# = Language Server Protocol =
|
||||
docker-compose-language-service
|
||||
dockerfile-language-server-nodejs
|
||||
yaml-language-server
|
||||
ansible-language-server
|
||||
];
|
||||
};
|
||||
}
|
||||
13
home/programs/kitty.nix
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
confirm_os_window_close = 0;
|
||||
window_padding_width = 10;
|
||||
scrollback_lines = 10000;
|
||||
enable_audio_bell = false;
|
||||
mouse_hide_wait = 60;
|
||||
};
|
||||
};
|
||||
}
|
||||
10
home/programs/librewolf.nix
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
programs.librewolf = {
|
||||
enable = true;
|
||||
settings = {
|
||||
"browser.sessionstore.resume_from_crash" = false;
|
||||
"DisableSystemAddonUpdate" = true;
|
||||
"DisableSetDesktopBackground" = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
37
home/programs/packages.nix
Normal file
@@ -0,0 +1,37 @@
|
||||
{ pkgs, inputs, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
# DEV
|
||||
python3
|
||||
# MEDIA
|
||||
mpv
|
||||
imv
|
||||
pwvucontrol
|
||||
|
||||
# CONNECTIONS
|
||||
overskride
|
||||
protonvpn-cli_2
|
||||
networkmanagerapplet
|
||||
|
||||
# APPS
|
||||
floorp
|
||||
spotube
|
||||
vesktop
|
||||
nautilus
|
||||
keepassxc
|
||||
whatsapp-for-linux
|
||||
|
||||
libreoffice
|
||||
qalculate-gtk
|
||||
|
||||
# Utilities
|
||||
ventoy-full
|
||||
file-roller
|
||||
vim
|
||||
firefox
|
||||
rofi
|
||||
nixfmt
|
||||
nemo
|
||||
neovim
|
||||
];
|
||||
}
|
||||
62
home/programs/qutebrowser.nix
Normal file
@@ -0,0 +1,62 @@
|
||||
{
|
||||
programs.qutebrowser = {
|
||||
enable = false;
|
||||
|
||||
searchEngines = {
|
||||
"DEFAULT" = "https://priv.au/search?q={}";
|
||||
"d" = "https://duckduckgo.com/?q={}&ia=web";
|
||||
|
||||
"n" = "https://mynixos.com/search?q={}";
|
||||
"nixo" = "https://search.nixos.org/options?channel=unstable&query={}";
|
||||
"nixp" = "https://search.nixos.org/packages?channel=unstable&query={}";
|
||||
"gt" = "https://github.com/search?q={}&type=repositories";
|
||||
};
|
||||
|
||||
quickmarks = {
|
||||
nwiki = "https://wiki.nixos.org/wiki/NixOS_Wiki";
|
||||
nflake = "https://nixos-and-flakes.thiscute.world/introduction/";
|
||||
nixy = "https://github.com/anotherhadi/nixy?tab=readme-ov-file";
|
||||
nca = "https://github.com/nix-community/awesome-nix";
|
||||
nc = "https://github.com/nix-community";
|
||||
|
||||
yb = "https://youatb.unibocconi.it/";
|
||||
bk = "https://blackboard.unibocconi.it/ultra/stream";
|
||||
pz = "https://piazza.com/class/m0nl57y6g4z1wh";
|
||||
|
||||
om = "https://outlook.office.com/mail/";
|
||||
pm = "https://mail.proton.me/u/0/inbox";
|
||||
tm = "https://app.tuta.com/mail/";
|
||||
|
||||
mai = "https://chat.mistral.ai/chat";
|
||||
cai = "https://claude.ai/new";
|
||||
|
||||
chess = "https://www.chess.com/home";
|
||||
lichess = "https://lichess.org/";
|
||||
|
||||
git = "https://github.com/dashboard";
|
||||
berg = "https://codeberg.org/PyNEL/Dotfiles";
|
||||
|
||||
box = "http://192.168.1.254/#";
|
||||
};
|
||||
|
||||
settings = {
|
||||
|
||||
content = {
|
||||
autoplay = false;
|
||||
javascript.clipboard = "access";
|
||||
prefers_reduced_motion = true;
|
||||
cookies.accept = "no-3rdparty";
|
||||
pdfjs = true;
|
||||
};
|
||||
|
||||
qt = {
|
||||
highdpi = true;
|
||||
};
|
||||
|
||||
scrolling = {
|
||||
bar = "never";
|
||||
smooth = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
58
home/programs/shell.nix
Normal file
@@ -0,0 +1,58 @@
|
||||
{
|
||||
programs = {
|
||||
zoxide.enable = true;
|
||||
|
||||
eza = {
|
||||
enable = true;
|
||||
icons = "auto";
|
||||
extraOptions = [
|
||||
"--group-directories-first"
|
||||
"--header"
|
||||
"--icons"
|
||||
];
|
||||
};
|
||||
|
||||
starship = {
|
||||
enable = true;
|
||||
settings = {
|
||||
add_newline = true;
|
||||
};
|
||||
};
|
||||
|
||||
zellij = {
|
||||
enable = true;
|
||||
settings = {
|
||||
ui = {
|
||||
pane_frames.hide_session_name = true;
|
||||
pane_borderless = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
bash = {
|
||||
enable = true;
|
||||
enableCompletion = true;
|
||||
shellAliases = {
|
||||
fetch = "fastfetch";
|
||||
rebuild = "nh os switch";
|
||||
update = "nh os switch --update";
|
||||
garbage = "nh clean all && sudo bootctl cleanup ";
|
||||
|
||||
hxd = "hx ~/.files/";
|
||||
hxc = "hx ~/code/";
|
||||
|
||||
ls = "eza";
|
||||
la = "eza -a";
|
||||
ll = "eza -l";
|
||||
lr = "eza -R";
|
||||
tree = "eza -T";
|
||||
|
||||
".." = "cd ..";
|
||||
|
||||
grep = "grep --color=auto";
|
||||
|
||||
startupctl = "systemctl list-unit-files --type=service | grep enabled";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
18
home/programs/spicetify.nix
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
inputs,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
imports = [inputs.spicetify-nix.homeManagerModules.default];
|
||||
|
||||
programs.spicetify = {
|
||||
enable = true;
|
||||
#theme = spicePkgs.themes.catppuccin;
|
||||
#colorScheme = "mocha";
|
||||
enabledExtensions = with inputs.spicetify-nix.legacyPackages.${pkgs.system}.extensions; [
|
||||
fullAppDisplay
|
||||
shuffle
|
||||
hidePodcasts
|
||||
];
|
||||
};
|
||||
}
|
||||
58
home/programs/vscode.nix
Normal file
@@ -0,0 +1,58 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs.vscode = {
|
||||
enable = true;
|
||||
|
||||
extensions = with pkgs.vscode-extensions; [
|
||||
ms-python.python
|
||||
ms-python.debugpy
|
||||
jnoortheen.nix-ide
|
||||
mvllow.rose-pine
|
||||
];
|
||||
|
||||
userSettings = {
|
||||
|
||||
"editor.fontSize" = 18;
|
||||
"explorer.confirmDelete" = false;
|
||||
"explorer.confirmDragAndDrop" = true;
|
||||
"git.openRepositoryInParentFolders" = "never";
|
||||
|
||||
"[python]" = {
|
||||
"editor.defaultFormatter" = "ms-python.black-formatter";
|
||||
"editor.formatOnSave" = true;
|
||||
};
|
||||
|
||||
"nix.enableLanguageServer" = true;
|
||||
"nix.serverPath" = "${pkgs.nixd}/bin/nixd";
|
||||
"nix.serverSettings" = {
|
||||
"nixd" = {
|
||||
"formatting" = {
|
||||
"command" = [ "${pkgs.nixpkgs-fmt}/bin/nixpkgs-fmt" ];
|
||||
};
|
||||
"nixpkgs" = {
|
||||
"expr" = "import <nixpkgs> { }";
|
||||
"options" = {
|
||||
"nixos" = {
|
||||
"expr" = "(builtins.getFlake \"/home/mike/.files\").nixosConfigurations.zion.options";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
"editor.formatOnSave" = true;
|
||||
|
||||
"editor.fontLigatures" = true;
|
||||
"editor.formatOnPaste" = true;
|
||||
"editor.minimap.enabled" = false;
|
||||
|
||||
"symbols.hidesExplorerArrows" = false;
|
||||
|
||||
"workbench.iconTheme" = "vs-minimal";
|
||||
"workbench.colorTheme" = "Rose Pine";
|
||||
"workbench.preferredDarkColorTheme" = "Rose Pine";
|
||||
"workbench.preferredHighContrastColorTheme" = "Rose Pine";
|
||||
|
||||
};
|
||||
};
|
||||
}
|
||||
60
home/programs/vscodium.nix
Normal file
@@ -0,0 +1,60 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs.vscode = {
|
||||
enable = true;
|
||||
package = pkgs.vscodium;
|
||||
|
||||
extensions = with pkgs.vscode-extensions; [
|
||||
ms-python.python
|
||||
ms-python.debugpy
|
||||
jnoortheen.nix-ide
|
||||
catppuccin.catppuccin-vsc
|
||||
];
|
||||
|
||||
userSettings = {
|
||||
|
||||
"editor.fontSize" = 18;
|
||||
"explorer.confirmDelete" = false;
|
||||
"explorer.confirmDragAndDrop" = true;
|
||||
"git.openRepositoryInParentFolders" = "never";
|
||||
|
||||
"[python]" = {
|
||||
"editor.defaultFormatter" = "ms-python.black-formatter";
|
||||
"editor.formatOnSave" = true;
|
||||
};
|
||||
|
||||
"nix.enableLanguageServer" = true;
|
||||
"nix.serverPath" = "${pkgs.nixd}/bin/nixd";
|
||||
"nix.serverSettings" = {
|
||||
"nixd" = {
|
||||
"formatting" = {
|
||||
"command" = [ "${pkgs.nixpkgs-fmt}/bin/nixpkgs-fmt" ];
|
||||
};
|
||||
"nixpkgs" = {
|
||||
"expr" = "import <nixpkgs> { }";
|
||||
"options" = {
|
||||
"nixos" = {
|
||||
"expr" = "(builtins.getFlake \"/home/nel/Dotfiles\").nixosConfigurations.laptop.options";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
"editor.formatOnSave" = true;
|
||||
|
||||
"editor.fontLigatures" = true;
|
||||
"editor.formatOnPaste" = true;
|
||||
"editor.minimap.enabled" = false;
|
||||
|
||||
"symbols.hidesExplorerArrows" = false;
|
||||
|
||||
"catppuccin.accentColor" = "blue";
|
||||
"workbench.iconTheme" = "vs-minimal";
|
||||
"workbench.colorTheme" = "Catppuccin Mocha";
|
||||
"workbench.preferredDarkColorTheme" = "Catppuccin Mocha";
|
||||
"workbench.preferredHighContrastColorTheme" = "Catppuccin Mocha";
|
||||
|
||||
};
|
||||
};
|
||||
}
|
||||
12
home/programs/yazi.nix
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
programs.yazi = {
|
||||
enable = true;
|
||||
settings = {
|
||||
manager = {
|
||||
sort_by = "alphabetical";
|
||||
show_hidden = true;
|
||||
show_symlink = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
14
home/programs/zathura.nix
Normal file
@@ -0,0 +1,14 @@
|
||||
# Zathura is a PDF viewer
|
||||
{
|
||||
programs.zathura = {
|
||||
enable = true;
|
||||
|
||||
options = {
|
||||
guioptions = "v";
|
||||
adjust-open = "width";
|
||||
statusbar-basename = true;
|
||||
render-loading = false;
|
||||
scroll-step = 120;
|
||||
};
|
||||
};
|
||||
}
|
||||
25
home/system/dunst.nix
Normal file
@@ -0,0 +1,25 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [ libnotify ];
|
||||
|
||||
services.dunst = {
|
||||
enable = true;
|
||||
package = pkgs.dunst;
|
||||
|
||||
settings = {
|
||||
global = {
|
||||
follow = "mouse";
|
||||
|
||||
width = "0 , 600";
|
||||
height = "400";
|
||||
|
||||
origin = "top-center";
|
||||
offset = "0x10";
|
||||
};
|
||||
|
||||
fullscreen_delay_everything = {
|
||||
fullscreen = "delay";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
724
home/system/hyprland.nix
Normal file
@@ -0,0 +1,724 @@
|
||||
{ pkgs, inputs, ... }:
|
||||
{
|
||||
# ------------------------------------------------
|
||||
# Needed Packages
|
||||
# ------------------------------------------------
|
||||
|
||||
home.packages = with pkgs; [
|
||||
qt6ct
|
||||
qt6.qtwayland
|
||||
|
||||
hyprshot
|
||||
hyprshade
|
||||
hyprpicker
|
||||
|
||||
inputs.hyprsunset.packages."${pkgs.system}".hyprsunset
|
||||
inputs.hyprsysteminfo.packages."${pkgs.system}".hyprsysteminfo
|
||||
inputs.hyprpolkitagent.packages."${pkgs.system}".hyprpolkitagent
|
||||
|
||||
xdg-desktop-portal-hyprland
|
||||
|
||||
wev
|
||||
wlr-randr
|
||||
wdisplays
|
||||
# wf-recorder
|
||||
# wl-screenrec
|
||||
|
||||
playerctl
|
||||
brightnessctl
|
||||
];
|
||||
|
||||
# ------------------------------------------------
|
||||
# Hyprland Config
|
||||
# ------------------------------------------------
|
||||
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
systemd.enable = true;
|
||||
xwayland.enable = true;
|
||||
package = inputs.hyprland.packages."${pkgs.system}".hyprland;
|
||||
|
||||
plugins = [
|
||||
inputs.split-monitor-workspaces.packages."${pkgs.system}".split-monitor-workspaces
|
||||
];
|
||||
|
||||
# ------------------------------------------------
|
||||
# Configuration
|
||||
# ------------------------------------------------
|
||||
|
||||
# settings = {
|
||||
|
||||
# "$mod" = "SUPER";
|
||||
# "$shiftMod" = "SUPER_SHIFT";
|
||||
# "$Alt_L" = "ALT";
|
||||
|
||||
# # App
|
||||
# "$terminal" = "kitty";
|
||||
# "$browser" = "firefox";
|
||||
# "$launcher" = "rofi -show drun";
|
||||
# "$file-manager" = "nemo";
|
||||
# "$Tfile-manager" = "$terminal -e yazi";
|
||||
# "$audio-manager" = "com.saivert.pwvucontrol";
|
||||
# "$password-manager" = "org.keepassxc.KeePassXC";
|
||||
# "$bluetooth-manager" = "io.github.kaii_lb.Overskride";
|
||||
|
||||
# # ------------------------------------------------
|
||||
# # Envirronement variables
|
||||
# # ------------------------------------------------
|
||||
|
||||
# env = [
|
||||
# "XDG_SESSION_TYPE,wayland"
|
||||
# "XDG_CURRENT_DESKTOP,Hyprland"
|
||||
# "XDG_SESSION_DESKTOP,Hyprland"
|
||||
|
||||
# "DISABLE_QT5_COMPAT,1"
|
||||
# "QT_QPA_PLATFORM,wayland"
|
||||
# "QT_AUTO_SCREEN_SCALE_FACTOR,1"
|
||||
# "QT_WAYLAND_DISABLE_WINDOWDECORATION,1"
|
||||
|
||||
# "NIXOS_OZONE_WL,1"
|
||||
# "ELECTRON_OZONE_PLATFORM_HINT,auto"
|
||||
|
||||
# "GTK_WAYLAND_DISABLE_WINDOWDECORATION,1"
|
||||
# ];
|
||||
|
||||
# # ------------------------------------------------
|
||||
# # Startup
|
||||
# # ------------------------------------------------
|
||||
|
||||
# exec-once = [
|
||||
# "waybar"
|
||||
# # "systemctl --user start hyprpolkitagent"
|
||||
# ];
|
||||
|
||||
# # ------------------------------------------------
|
||||
# # Monitors
|
||||
# # ------------------------------------------------
|
||||
|
||||
# monitor = [
|
||||
# "HDMI-A-1, preferred, 0x360, 1"
|
||||
# "DP-1, highrr, 4480x0, 1"
|
||||
# "DP-2, highrr, 1920x0, 1"
|
||||
# ];
|
||||
|
||||
# # ------------------------------------------------
|
||||
# # Window Rules
|
||||
# # ------------------------------------------------
|
||||
|
||||
# windowrule = [
|
||||
# "float, ^($terminal)$"
|
||||
# "size 45% 45%,^($terminal)$"
|
||||
|
||||
# "float, ^($password-manager)$"
|
||||
# "size 50% 40%,^($password-manager)$"
|
||||
|
||||
# "float, ^($bluetooth-manager)$"
|
||||
# "size 50% 60%,^($bluetooth-manager)$"
|
||||
|
||||
# "float, ^($audio-manager)$"
|
||||
# "size 50% 30%,^($audio-manager)$"
|
||||
|
||||
# "noblur, class:^(steam)"
|
||||
# "forcergbx, class:^(steam)"
|
||||
# ];
|
||||
|
||||
# # ------------------------------------------------
|
||||
# # Keybidings
|
||||
# # ------------------------------------------------
|
||||
|
||||
# bind = [
|
||||
# # Apps
|
||||
# "ALT, code:10, exec, $browser"
|
||||
# "ALT, code:11, exec, $file-manager"
|
||||
# "ALT, code:12, exec, $Tfile-manager"
|
||||
|
||||
# # System
|
||||
# "SUPER, RETURN, exec, $terminal"
|
||||
# "SUPER, X, exec, powermenu"
|
||||
# "SUPER, R, exec, $launcher"
|
||||
|
||||
# "SUPER, Q, killactive"
|
||||
# "SUPER, F, fullscreen"
|
||||
# "SUPER, T, togglefloating"
|
||||
|
||||
# # Screenshot
|
||||
# "ALT, S , exec , hyprshot -m region --clipboard-only"
|
||||
# "CONTROL&ALT , S , exec , hyprshot -m region "
|
||||
# "CONTROL&ALT&SHIFT_L , S , exec , hyprshot -m output"
|
||||
|
||||
# # Window Focus
|
||||
# "SUPER, h, movefocus, l"
|
||||
# "SUPER, l, movefocus, r"
|
||||
# "SUPER, k, movefocus, u"
|
||||
# "SUPER, j, movefocus, d"
|
||||
|
||||
# # Switch workspaces with mainMod + [0-9]
|
||||
# "SUPER, code:10, workspace, 1"
|
||||
# "SUPER, code:11, workspace, 2"
|
||||
# "SUPER, code:12, workspace, 3"
|
||||
# "SUPER, code:13, workspace, 4"
|
||||
# "SUPER, code:14, workspace, 5"
|
||||
# "SUPER, code:15, workspace, 6"
|
||||
# "SUPER, code:16, workspace, 7"
|
||||
# "SUPER, code:17, workspace, 8"
|
||||
# "SUPER, code:18, workspace, 9"
|
||||
# "SUPER, code:19, workspace, 10"
|
||||
|
||||
# # Move active window to a workspace with mainMod + SHIFT + [0-9]
|
||||
# "SUPER SHIFT, code:10, movetoworkspace, 1"
|
||||
# "SUPER SHIFT, code:11, movetoworkspace, 2"
|
||||
# "SUPER SHIFT, code:12, movetoworkspace, 3"
|
||||
# "SUPER SHIFT, code:13, movetoworkspace, 4"
|
||||
# "SUPER SHIFT, code:14, movetoworkspace, 5"
|
||||
# "SUPER SHIFT, code:15, movetoworkspace, 6"
|
||||
# "SUPER SHIFT, code:16, movetoworkspace, 7"
|
||||
# "SUPER SHIFT, code:17, movetoworkspace, 8"
|
||||
# "SUPER SHIFT, code:18, movetoworkspace, 9"
|
||||
# "SUPER SHIFT, code:19, movetoworkspace, 10"
|
||||
# ];
|
||||
|
||||
# bindm = [
|
||||
# "SUPER, mouse:272, movewindow"
|
||||
# "SUPER, mouse:273, resizewindow"
|
||||
# ];
|
||||
|
||||
# bindl = [
|
||||
# ",XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
|
||||
# ",switch:Lid Switch, exec, pidof hyprlock || hyprlock"
|
||||
# ];
|
||||
|
||||
# bindle = [
|
||||
# ", XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 2%+ -l 1"
|
||||
# ", XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 2%-"
|
||||
|
||||
# ", XF86AudioPlay , exec , playerctl play-pause"
|
||||
# ", XF86AudioStop , exec , playerctl pause"
|
||||
# ", XF86AudioPrev , exec , playerctl previous"
|
||||
# ", XF86AudioNext , exec , playerctl next"
|
||||
|
||||
# ", XF86MonBrightnessUp, exec, brightnessctl -q s 5%+"
|
||||
# ", XF86MonBrightnessDown, exec, brightnessctl -q s 5%-"
|
||||
# ];
|
||||
|
||||
# # ------------------------------------------------
|
||||
# # Sections
|
||||
# # ------------------------------------------------
|
||||
|
||||
# xwayland = { enabled = false; };
|
||||
# opengl = { force_introspection = 1; };
|
||||
|
||||
# animations = { enabled = false; };
|
||||
# decoration = { drop_shadow = false; blur = { enabled = false; }; };
|
||||
|
||||
# general = {
|
||||
# gaps_in = 4;
|
||||
# gaps_out = 0;
|
||||
# border_size = 2;
|
||||
# "col.active_border" = "rgb(F5A97F) rgb(ED8796) rgb(C6A0F6) rgb(8AADF4) rgb(A6DA95) rgb(EED49F)";
|
||||
|
||||
# layout = "dwindle";
|
||||
# };
|
||||
|
||||
# misc = {
|
||||
# vfr = true;
|
||||
# vrr = 1;
|
||||
|
||||
# focus_on_activate = true;
|
||||
|
||||
# disable_autoreload = true;
|
||||
# disable_hyprland_logo = true;
|
||||
# disable_splash_rendering = true;
|
||||
# };
|
||||
|
||||
# input = {
|
||||
# kb_layout = "us";
|
||||
# kb_variant = "";
|
||||
|
||||
# follow_mouse = 1;
|
||||
# accel_profile = "flat";
|
||||
# sensitivity = 0.4;
|
||||
# repeat_delay = 300;
|
||||
# repeat_rate = 50;
|
||||
|
||||
# touchpad = {
|
||||
# natural_scroll = true;
|
||||
# clickfinger_behavior = true;
|
||||
# disable_while_typing = true;
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
extraConfig = ''
|
||||
# This is an example Hyprland config file.
|
||||
# Refer to the wiki for more information.
|
||||
# https://wiki.hyprland.org/Configuring/Configuring-Hyprland/
|
||||
|
||||
# Please note not all available settings / options are set here.
|
||||
# For a full list, see the wiki
|
||||
|
||||
# You can split this configuration into multiple files
|
||||
# Create your files separately and then link them to this file like this:
|
||||
# source = ~/.config/hypr/myColors.conf
|
||||
|
||||
|
||||
################
|
||||
### MONITORS ###
|
||||
################
|
||||
|
||||
# See https://wiki.hyprland.org/Configuring/Monitors/
|
||||
monitor=HDMI-A-1, preferred, 0x360, 1
|
||||
monitor=DP-1, highrr, 4480x0, 1
|
||||
monitor=DP-2, highrr, 1920x0, 1
|
||||
|
||||
|
||||
###################
|
||||
### MY PROGRAMS ###
|
||||
###################
|
||||
|
||||
# See https://wiki.hyprland.org/Configuring/Keywords/
|
||||
|
||||
# Set programs that you use
|
||||
$terminal = kitty
|
||||
$fileManager = nemo
|
||||
$menu = rofi -show drun
|
||||
$lock = $HOME/.config/hypr/lock.sh
|
||||
$editor = zed
|
||||
$browser = firefox
|
||||
$picker = hyprpicker -a -f hex
|
||||
|
||||
#################
|
||||
### AUTOSTART ###
|
||||
#################
|
||||
|
||||
# Autostart necessary processes (like notifications daemons, status bars, etc.)
|
||||
|
||||
# exec-once = hyprpm reload -n
|
||||
exec-once = hypridle
|
||||
exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
|
||||
# exec-once=zsh $HOME/.config/hypr/autostart.sh
|
||||
exec-once = waybar
|
||||
|
||||
#############################
|
||||
### ENVIRONMENT VARIABLES ###
|
||||
#############################
|
||||
|
||||
# See https://wiki.hyprland.org/Configuring/Environment-variables/
|
||||
|
||||
env = XCURSOR_SIZE,24
|
||||
env = XCURSOR_THEME,/usr/share/icons/Gruvbox-Dark/index.theme
|
||||
env = HYPRCURSOR_SIZE,24
|
||||
env = HYPRCURSOR_THEME,/usr/share/icons/Gruvbox-Dark/index.theme
|
||||
|
||||
env = CLUTTER_BACKEND,wayland
|
||||
env = GDK_BACKEND,wayland,x11
|
||||
env = QT_AUTO_SCREEN_SCALE_FACTOR,1
|
||||
env = QT_QPA_PLATFORMTHEME,qt5ct
|
||||
env = QT_QPA_PLATFORMTHEME,qt6ct
|
||||
env = QT_SCALE_FACTOR,1
|
||||
env = QT_WAYLAND_DISABLE_WINDOWDECORATION,1
|
||||
|
||||
# Nvidia
|
||||
env = LIBVA_DRIVER_NAME,nvidia
|
||||
env = XDG_SESSION_TYPE,wayland
|
||||
env = GBM_BACKEND,nvidia-drm
|
||||
env = __GLX_VENDOR_LIBRARY_NAME,nvidia
|
||||
env = WLR_NO_HARDWARE_CURSORS,1
|
||||
env = __NV_PRIME_RENDER_OFFLOAD,1
|
||||
env = __VK_LAYER_NV_optimus,NVIDIA_only
|
||||
env = __GL_THREADED_OPTIMIZATIONS=0
|
||||
|
||||
# Wayland enforce
|
||||
env = QT_QPA_PLATFORM,wayland
|
||||
env = ELECTRON_OZONE_PLATFORM_HINT,wayland
|
||||
env = XDG_CURRENT_DESKTOP,Hyprland
|
||||
env = XDG_SESSION_DESKTOP,Hyprland
|
||||
|
||||
# Java
|
||||
env = _JAVA_AWT_WM_NONREPARENTING,1
|
||||
env = _JAVA_OPTIONS,-Dawt.useSystemAAFontSettings=on
|
||||
|
||||
# Firefox
|
||||
env = MOZ_ENABLE_WAYLAND,1
|
||||
env = MOZ_DISABLE_RDD_SANDBOX,1
|
||||
env = EGL_PLATFORM,wayland
|
||||
|
||||
# Electron
|
||||
env = ELECTRON_OZONE_PLATFORM_HINT,auto
|
||||
|
||||
# Input
|
||||
env = QT_IM_MODULE,fcitx
|
||||
env = XMODIFIERS=@im=fcitx
|
||||
env = GLFW_IM_MODULE,ibus
|
||||
|
||||
# SSH Agents
|
||||
env = SSH_AUTH_SOCK,$XDG_RUNTIME_DIR/ssh-agent.socket
|
||||
|
||||
#####################
|
||||
### LOOK AND FEEL ###
|
||||
#####################
|
||||
|
||||
# Refer to https://wiki.hyprland.org/Configuring/Variables/
|
||||
|
||||
# https://wiki.hyprland.org/Configuring/Variables/#general
|
||||
general {
|
||||
gaps_in = 10
|
||||
gaps_out = 20
|
||||
|
||||
border_size = 1
|
||||
|
||||
# https://wiki.hyprland.org/Configuring/Variables/#variable-types for info about colors
|
||||
col.active_border = rgba(fabd2fee) rgba(fe8019ee) 45deg
|
||||
col.inactive_border = rgba(928374aa)
|
||||
|
||||
# Set to true enable resizing windows by clicking and dragging on borders and gaps
|
||||
resize_on_border = false
|
||||
|
||||
# Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on
|
||||
allow_tearing = false
|
||||
|
||||
layout = dwindle
|
||||
}
|
||||
|
||||
# https://wiki.hyprland.org/Configuring/Variables/#decoration
|
||||
decoration {
|
||||
rounding = 10
|
||||
|
||||
# Change transparency of focused and unfocused windows
|
||||
active_opacity = 0.98
|
||||
inactive_opacity = 0.95
|
||||
|
||||
drop_shadow = true
|
||||
shadow_range = 5
|
||||
shadow_render_power = 3
|
||||
col.shadow = rgba(1a1a1aee)
|
||||
|
||||
# https://wiki.hyprland.org/Configuring/Variables/#blur
|
||||
blur {
|
||||
enabled = true
|
||||
size = 4
|
||||
passes = 3
|
||||
|
||||
vibrancy = 0.1696
|
||||
}
|
||||
}
|
||||
|
||||
cursor {
|
||||
no_hardware_cursors = true
|
||||
}
|
||||
|
||||
# https://wiki.hyprland.org/Configuring/Variables/#animations
|
||||
animations {
|
||||
enabled = true
|
||||
|
||||
# Default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more
|
||||
|
||||
bezier = myBezier, 0.05, 0.9, 0.1, 1.05
|
||||
|
||||
animation = windows, 1, 7, myBezier
|
||||
animation = windowsOut, 1, 7, default, popin 80%
|
||||
animation = border, 1, 10, default
|
||||
animation = borderangle, 1, 8, default
|
||||
animation = fade, 1, 7, default
|
||||
animation = workspaces, 1, 6, default
|
||||
}
|
||||
|
||||
# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
|
||||
dwindle {
|
||||
pseudotile = true # Master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
|
||||
preserve_split = true # You probably want this
|
||||
}
|
||||
|
||||
# See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
|
||||
master {
|
||||
new_status = master
|
||||
}
|
||||
|
||||
# https://wiki.hyprland.org/Configuring/Variables/#misc
|
||||
misc {
|
||||
force_default_wallpaper = -1 # Set to 0 or 1 to disable the anime mascot wallpapers
|
||||
disable_hyprland_logo = false # If true disables the random hyprland logo / anime girl background. :(
|
||||
}
|
||||
|
||||
|
||||
#############
|
||||
### INPUT ###
|
||||
#############
|
||||
|
||||
# https://wiki.hyprland.org/Configuring/Variables/#input
|
||||
input {
|
||||
kb_layout = pl
|
||||
kb_variant =
|
||||
kb_model =
|
||||
kb_options =
|
||||
kb_rules =
|
||||
|
||||
numlock_by_default = true
|
||||
|
||||
follow_mouse = 1
|
||||
|
||||
sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
|
||||
|
||||
touchpad {
|
||||
natural_scroll = true
|
||||
}
|
||||
}
|
||||
|
||||
# https://wiki.hyprland.org/Configuring/Variables/#gestures
|
||||
gestures {
|
||||
workspace_swipe = false
|
||||
}
|
||||
|
||||
# Example per-device config
|
||||
# See https://wiki.hyprland.org/Configuring/Keywords/#per-device-input-configs for more
|
||||
# device {
|
||||
# name = epic-mouse-v1
|
||||
# sensitivity = -0.5
|
||||
# }
|
||||
|
||||
###############
|
||||
### PLUGINS ###
|
||||
###############
|
||||
|
||||
plugin {
|
||||
split-monitor-workspaces {
|
||||
count = 10
|
||||
keep_focused = 1
|
||||
enable_notifications = 0
|
||||
}
|
||||
}
|
||||
|
||||
##############
|
||||
### RENDER ###
|
||||
##############
|
||||
|
||||
render {
|
||||
explicit_sync = 1
|
||||
}
|
||||
|
||||
xwayland {
|
||||
force_zero_scaling = true
|
||||
}
|
||||
|
||||
####################
|
||||
### KEYBINDINGSS ###
|
||||
####################
|
||||
|
||||
# See https://wiki.hyprland.org/Configuring/Keywords/
|
||||
$mainMod = SUPER # Sets "Windows" key as main modifier
|
||||
|
||||
# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
|
||||
bind = $mainMod SHIFT, RETURN, exec, $terminal
|
||||
bind = $mainMod, Q, killactive,
|
||||
bind = $mainMod SHIFT, Q, exit
|
||||
bind = $mainMod, N, exec, $fileManager
|
||||
bind = $mainMod, W, exec, $editor
|
||||
bind = $mainMod, Z, exec, $terminal
|
||||
bind = $mainMod, B, exec, $browser
|
||||
bind = $mainMod SHIFT, L, exec, $lock
|
||||
bind = $mainMod, V, togglefloating,
|
||||
bind = $mainMod, R, exec, $menu
|
||||
bind = $mainMod, SPACE, exec, $menu
|
||||
bind = $mainMod SHIFT, C, exec, $picker
|
||||
bind = $mainMod, P, pseudo, # dwindle
|
||||
bind = $mainMod, J, togglesplit, # dwindle
|
||||
bind = $mainMod, F, fullscreen, 1
|
||||
bind = $mainMod SHIFT, F, fullscreen, 0
|
||||
bind = $mainMod, T, togglefloating
|
||||
bind = $mainMod, mouse:274, togglefloating
|
||||
|
||||
# Move focus with mainMod + vim keys
|
||||
bind = $mainMod, H, movefocus, l
|
||||
bind = $mainMod, L, movefocus, r
|
||||
bind = $mainMod, K, movefocus, u
|
||||
bind = $mainMod, J, movefocus, d
|
||||
|
||||
# Switch workspaces with mainMod + [0-9]
|
||||
bind = $mainMod, 1, split-workspace, 1
|
||||
bind = $mainMod, 2, split-workspace, 2
|
||||
bind = $mainMod, 3, split-workspace, 3
|
||||
bind = $mainMod, 4, split-workspace, 4
|
||||
bind = $mainMod, 5, split-workspace, 5
|
||||
bind = $mainMod, 6, split-workspace, 6
|
||||
bind = $mainMod, 7, split-workspace, 7
|
||||
bind = $mainMod, 8, split-workspace, 8
|
||||
bind = $mainMod, 9, split-workspace, 9
|
||||
bind = $mainMod, 0, split-workspace, 10
|
||||
|
||||
# Move active window to a workspace with mainMod + SHIFT + [0-9]
|
||||
bind = $mainMod SHIFT, 1, split-movetoworkspacesilent, 1
|
||||
bind = $mainMod SHIFT, 2, split-movetoworkspacesilent, 2
|
||||
bind = $mainMod SHIFT, 3, split-movetoworkspacesilent, 3
|
||||
bind = $mainMod SHIFT, 4, split-movetoworkspacesilent, 4
|
||||
bind = $mainMod SHIFT, 5, split-movetoworkspacesilent, 5
|
||||
bind = $mainMod SHIFT, 6, split-movetoworkspacesilent, 6
|
||||
bind = $mainMod SHIFT, 7, split-movetoworkspacesilent, 7
|
||||
bind = $mainMod SHIFT, 8, split-movetoworkspacesilent, 8
|
||||
bind = $mainMod SHIFT, 9, split-movetoworkspacesilent, 9
|
||||
bind = $mainMod SHIFT, 0, split-movetoworkspacesilent, 10
|
||||
|
||||
# Example special workspace (scratchpad)
|
||||
bind = $mainMod, D, togglespecialworkspace, magic
|
||||
bind = $mainMod SHIFT, D, movetoworkspace, special:magic
|
||||
|
||||
# Move between monitors
|
||||
bind = $mainMod, code:60, focusmonitor, -1 # code 60 is a dot (.)
|
||||
bind = $mainMod, code:59, focusmonitor, +1 # code 59 is a comma (,)
|
||||
# bind = $mainMod SHIFT, BackSpace, movewindow, mon:+1,
|
||||
# bind = $mainMod SHIFT, code:59, changemonitorsilent, e-1
|
||||
# bind = $mainMod SHIFT, code:60, changemonitorsilent, e+1
|
||||
|
||||
# Scroll through existing workspaces with mainMod + scroll
|
||||
bind = $mainMod, mouse_down, workspace, e+1
|
||||
bind = $mainMod, mouse_up, workspace, e-1
|
||||
|
||||
# Move/resize windows with mainMod + LMB/RMB and dragging
|
||||
bindm = $mainMod, mouse:272, movewindow
|
||||
bindm = $mainMod, mouse:273, resizewindow
|
||||
|
||||
bind = ,XF86AudioMicMute, exec, amixer set Capture toggle
|
||||
bind = ,XF86AudioMute, exec, amixer set Master toggle
|
||||
bind = ,XF86AudioRaiseVolume, exec, amixer set Master playback 2%+
|
||||
bind = ,XF86AudioLowerVolume, exec, amixer set Master playback 2%-
|
||||
bind = ,XF86MonBrightnessUp, exec, brightnessctl set 5%+
|
||||
bind = ,XF86MonBrightnessDown, exec, brightnessctl set 5%-
|
||||
# bind =CTRL,XF86Launch2, exec, hyprctl keyword monitor "eDP-1,1920x1080@60,0x0,1"
|
||||
# bind = SHIFT,XF86Launch2, exec, hyprctl keyword monitor "eDP-1,1920x1080@60,0x0,1.5"
|
||||
bind = SHIFT, XF86MonBrightnessDown, exec, brightnessctl set 1%
|
||||
bind = SHIFT, XF86MonBrightnessUp, exec, brightnessctl set 100%
|
||||
|
||||
# Screenshot a window
|
||||
bind = $mainMod, PRINT, exec, hyprshot -m window
|
||||
# Screenshot a monitor
|
||||
bind = , PRINT, exec, hyprshot -m output
|
||||
# Screenshot a region
|
||||
bind = $mainMod SHIFT, S, exec, hyprshot -m region
|
||||
|
||||
##############################
|
||||
### WINDOWS AND WORKSPACES ###
|
||||
##############################
|
||||
|
||||
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
|
||||
# See https://wiki.hyprland.org/Configuring/Workspace-Rules/ for workspace rules
|
||||
|
||||
# Example windowrule v1
|
||||
# windowrule = float, ^(kitty)$
|
||||
|
||||
windowrule=opacity 1.0 override 1.0, ^(firefox)$
|
||||
|
||||
# Example windowrule v2
|
||||
# windowrulev2 = float,class:^(kitty)$,title:^(kitty)$
|
||||
|
||||
windowrulev2 = suppressevent maximize, class:.* # You'll probably like this.
|
||||
|
||||
windowrule=fullscreen, flameshot
|
||||
windowrule=float,flameshot
|
||||
windowrule=monitor 0,flameshot
|
||||
windowrule=move 0 0,flameshot
|
||||
windowrule=workspace 0,flameshot
|
||||
windowrule=stayfocused,flameshot
|
||||
|
||||
windowrulev2=move 0 -195,class:^(flameshot)$
|
||||
|
||||
windowrulev2 = opacity 0.0 override,class:^(xwaylandvideobridge)$
|
||||
windowrulev2 = noanim,class:^(xwaylandvideobridge)$
|
||||
windowrulev2 = noinitialfocus,class:^(xwaylandvideobridge)$
|
||||
windowrulev2 = maxsize 1 1,class:^(xwaylandvideobridge)$
|
||||
windowrulev2 = noblur,class:^(xwaylandvideobridge)$
|
||||
'';
|
||||
|
||||
};
|
||||
|
||||
|
||||
#################################
|
||||
# Hyprpaper
|
||||
#################################
|
||||
services.hyprpaper = {
|
||||
enable = true;
|
||||
settings = {
|
||||
ipc = "off";
|
||||
splash = false;
|
||||
preload = [ "~/Dotfiles/home/wallpapers/nixppuccin.png" ];
|
||||
wallpaper = [ ",~/Dotfiles/home/wallpapers/nixppuccin.png" ];
|
||||
};
|
||||
};
|
||||
|
||||
#################################
|
||||
# Hypridle
|
||||
#################################
|
||||
services.hypridle = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
general = {
|
||||
lock_cmd = "pidof hyprlock || hyprlock";
|
||||
after_sleep_cmd = "hyprctl dispatch dpms on";
|
||||
};
|
||||
|
||||
listener = [
|
||||
|
||||
{
|
||||
timeout = 60;
|
||||
on-timeout = "brightnessctl -sd asus::kbd_backlight set 0";
|
||||
on-resume = "brightnessctl -rd asus::kbd_backlight";
|
||||
}
|
||||
|
||||
{
|
||||
timeout = 80;
|
||||
on-timeout = "brightnessctl -s set 0";
|
||||
on-resume = "brightnessctl -r";
|
||||
}
|
||||
|
||||
{
|
||||
timeout = 100;
|
||||
on-timeout = "hyprctl dispatch dpms off ";
|
||||
on-resume = "hyprctl dispatch dpms on";
|
||||
}
|
||||
|
||||
{
|
||||
timeout = 150;
|
||||
on-timeout = "systemctl suspend";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
#################################
|
||||
# Hyprlock
|
||||
#################################
|
||||
programs.hyprlock = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
|
||||
general = {
|
||||
grace = 5;
|
||||
no_fade_in = true;
|
||||
no_fade_out = true;
|
||||
disable_loading_bar = false;
|
||||
};
|
||||
|
||||
background = {
|
||||
monitor = "";
|
||||
path = "~/Dotfiles/home/wallpapers/lock.jpg";
|
||||
};
|
||||
|
||||
input-field = [
|
||||
{
|
||||
monitor = "";
|
||||
size = "200 , 50";
|
||||
outline_thickness = 7;
|
||||
|
||||
dots_size = 0.2;
|
||||
dots_spacing = 0.2;
|
||||
dots_center = true;
|
||||
|
||||
fade_on_empty = true;
|
||||
fade_timeout = "1000";
|
||||
|
||||
position = "0, -20";
|
||||
halign = "center";
|
||||
valign = "center";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
78
home/system/stylix.nix
Normal file
@@ -0,0 +1,78 @@
|
||||
{ inputs, pkgs, ... }:
|
||||
{
|
||||
imports = [ inputs.stylix.homeManagerModules.stylix ];
|
||||
|
||||
qt = {
|
||||
enable = false;
|
||||
style.name = "gtk2";
|
||||
platformTheme.name = "gtk";
|
||||
};
|
||||
|
||||
gtk.iconTheme = {
|
||||
name = "Papirus-Dark";
|
||||
package = pkgs.papirus-icon-theme;
|
||||
};
|
||||
|
||||
stylix = {
|
||||
enable = true;
|
||||
autoEnable = true;
|
||||
|
||||
targets = {
|
||||
foot.enable = false;
|
||||
wofi.enable = false;
|
||||
tofi.enable = false;
|
||||
vscode.enable = false;
|
||||
waybar.enable = false;
|
||||
hyprland.enable = false;
|
||||
};
|
||||
|
||||
image = ../wallpapers/nixppuccin.png;
|
||||
|
||||
override = {
|
||||
base00 = "1e1e2e"; # base
|
||||
base01 = "181825"; # mantle
|
||||
base02 = "313244"; # surface0
|
||||
base03 = "45475a"; # surface1
|
||||
base04 = "585b70"; # surface2
|
||||
base05 = "cdd6f4"; # text
|
||||
base06 = "f5e0dc"; # rosewater
|
||||
base07 = "b4befe"; # lavender
|
||||
base08 = "f38ba8"; # red
|
||||
base09 = "fab387"; # peach
|
||||
base0A = "f9e2af"; # yellow
|
||||
base0B = "a6e3a1"; # green
|
||||
base0C = "94e2d5"; # teal
|
||||
base0D = "89b4fa"; # blue
|
||||
base0E = "cba6f7"; # mauve
|
||||
base0F = "f2cdcd"; # flamingo
|
||||
};
|
||||
|
||||
cursor = {
|
||||
size = 24;
|
||||
name = "Bibata-Modern-Ice";
|
||||
package = pkgs.bibata-cursors;
|
||||
};
|
||||
|
||||
fonts = {
|
||||
emoji = {
|
||||
package = pkgs.noto-fonts-emoji;
|
||||
name = "noto-fonts-color-emoji";
|
||||
};
|
||||
|
||||
monospace = {
|
||||
package = pkgs.nerdfonts.override { fonts = [ "DroidSansMono" ]; };
|
||||
name = "DroidSansMono";
|
||||
};
|
||||
|
||||
sansSerif = {
|
||||
package = pkgs.nerdfonts.override { fonts = [ "DroidSansMono" ]; };
|
||||
name = "DroidSansMono";
|
||||
};
|
||||
|
||||
serif = {
|
||||
package = pkgs.nerdfonts.override { fonts = [ "DroidSansMono" ]; };
|
||||
name = "DroidSansMono";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
36
home/system/tofi.nix
Normal file
@@ -0,0 +1,36 @@
|
||||
{
|
||||
programs.tofi = {
|
||||
enable = true;
|
||||
settings = {
|
||||
# font
|
||||
font-size = 12;
|
||||
|
||||
# Window Style
|
||||
horizontal = true;
|
||||
anchor = "top";
|
||||
width = "100%";
|
||||
height = "15%";
|
||||
|
||||
result-spacing = 25;
|
||||
min-input-width = 120;
|
||||
|
||||
# Style
|
||||
padding-top = 0;
|
||||
padding-bottom = 0;
|
||||
padding-left = 0;
|
||||
padding-right = 0;
|
||||
|
||||
outline-width = 0;
|
||||
border-width = 0;
|
||||
|
||||
prompt-text = " ❯ ";
|
||||
num-results = 7;
|
||||
|
||||
text-color = "#cdd6f4";
|
||||
prompt-color = "#f38ba8";
|
||||
selection-color = "#f9e2af";
|
||||
background-color = "#1a1b26";
|
||||
|
||||
};
|
||||
};
|
||||
}
|
||||
550
home/system/waybar.nix
Normal file
@@ -0,0 +1,550 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
package = pkgs.waybar.overrideAttrs (oa: { mesonFlags = (oa.mesonFlags or [ ]) ++ [ "-Dexperimental=true" ]; });
|
||||
|
||||
settings.mainBar = {
|
||||
layer = "top"; # Waybar at top layer
|
||||
height = 32; # Waybar height (to be removed for auto height)
|
||||
spacing = 0; # Gaps between modules (4px)
|
||||
position = "top";
|
||||
margin = "10 20 0";
|
||||
# Choose the order of the modules
|
||||
modules-left = [
|
||||
"hyprland/workspaces"
|
||||
"custom/media"
|
||||
];
|
||||
modules-center = ["hyprland/window"];
|
||||
modules-right = [
|
||||
"mpris"
|
||||
# "idle_inhibitor",
|
||||
"pulseaudio"
|
||||
# "network",
|
||||
"cpu"
|
||||
"memory"
|
||||
# "temperature",
|
||||
"backlight"
|
||||
# "keyboard-state",
|
||||
"battery"
|
||||
"clock"
|
||||
"tray"
|
||||
];
|
||||
# Modules configuration
|
||||
# "sway/workspaces = {
|
||||
# "disable-scroll = true,
|
||||
# "all-outputs = true,
|
||||
# "warp-on-scroll = false,
|
||||
# "format = "{name}: {icon}",
|
||||
# "format-icons = {
|
||||
# "1 = "",
|
||||
# "2 = "",
|
||||
# "3 = "",
|
||||
# "4 = "",
|
||||
# "5 = "",
|
||||
# "urgent = "",
|
||||
# "focused = "",
|
||||
# "default = ""
|
||||
# }
|
||||
# },
|
||||
"hyprland/workspaces" = {
|
||||
active-only = false;
|
||||
format = "{icon}";
|
||||
# format-icons = {
|
||||
# 1 = "一";
|
||||
# 2 = "二";
|
||||
# 3 = "三";
|
||||
# 4 = "四";
|
||||
# 5 = "五";
|
||||
# 6 = "六";
|
||||
# 7 = "七";
|
||||
# 8 = "八";
|
||||
# 9 = "九";
|
||||
# 10 = "十";
|
||||
# 11 = "一";
|
||||
# 12 = "二";
|
||||
# 13 = "三";
|
||||
# 14 = "四";
|
||||
# 15 = "五";
|
||||
# 16 = "六";
|
||||
# 17 = "七";
|
||||
# 18 = "八";
|
||||
# 19 = "九";
|
||||
# 20 = "十";
|
||||
# 21 = "一";
|
||||
# 22 = "二";
|
||||
# 23 = "三";
|
||||
# 24 = "四";
|
||||
# 25 = "五";
|
||||
# 26 = "六";
|
||||
# 27 = "七";
|
||||
# 28 = "八";
|
||||
# 29 = "九";
|
||||
# 30 = "十";
|
||||
# };
|
||||
on-scroll-up = "hyprctl dispatch workspace e+1";
|
||||
on-scroll-down = "hyprctl dispatch workspace e-1";
|
||||
persistent-workspaces = {
|
||||
HDMI-A-1 = [1 2 3 4 5 6 7 8 9 10];
|
||||
DP-1 = [11 12 13 14 15 16 17 18 19 20];
|
||||
DP-2 = [21 22 23 24 25 26 27 28 29 30];
|
||||
};
|
||||
};
|
||||
keyboard-state = {
|
||||
numlock = false;
|
||||
capslock = true;
|
||||
format = "{name} {icon}";
|
||||
format-icons = {
|
||||
locked = "";
|
||||
unlocked = "";
|
||||
};
|
||||
};
|
||||
"sway/mode" = {
|
||||
format = "<span style=\"italic\">{}</span>";
|
||||
};
|
||||
"sway/scratchpad" = {
|
||||
format = "{icon} {count}";
|
||||
show-empty = false;
|
||||
format-icons = ["" ""];
|
||||
tooltip = true;
|
||||
tooltip-format = "{app}: {title}";
|
||||
};
|
||||
mpris = {
|
||||
interval = 1;
|
||||
format = "{player_icon} {status_icon}";
|
||||
format-paused = "{player_icon} {status_icon}";
|
||||
tooltip-format = "{player_icon} {dynamic}";
|
||||
tooltip-format-paused = "{player_icon} {dynamic}";
|
||||
player-icons = {
|
||||
default = "";
|
||||
mpv = "";
|
||||
vlc = "";
|
||||
spotify = "";
|
||||
};
|
||||
status-icons = {
|
||||
playing = "";
|
||||
paused = "";
|
||||
stopped = "";
|
||||
};
|
||||
# "ignored-players = ["firefox"]
|
||||
};
|
||||
mpd = {
|
||||
format = "{stateIcon} {consumeIcon}{randomIcon}{repeatIcon}{singleIcon}{artist} - {album} - {title} ({elapsedTime:%M:%S}/{totalTime:%M:%S}) ⸨{songPosition}|{queueLength}⸩ {volume}% ";
|
||||
format-disconnected = "Disconnected ";
|
||||
format-stopped = "{consumeIcon}{randomIcon}{repeatIcon}{singleIcon}Stopped ";
|
||||
unknown-tag = "N/A";
|
||||
interval = 2;
|
||||
consume-icons = {
|
||||
on = " ";
|
||||
};
|
||||
random-icons = {
|
||||
off = "<span color=\"#f53c3c\"></span> ";
|
||||
on = " ";
|
||||
};
|
||||
repeat-icons = {
|
||||
on = " ";
|
||||
};
|
||||
single-icons = {
|
||||
on = "1 ";
|
||||
};
|
||||
state-icons = {
|
||||
paused = "";
|
||||
playing = "";
|
||||
};
|
||||
tooltip-format = "MPD (connected)";
|
||||
tooltip-format-disconnected = "MPD (disconnected)";
|
||||
};
|
||||
idle_inhibitor = {
|
||||
format = "{icon}";
|
||||
format-icons = {
|
||||
activated = "";
|
||||
deactivated = "";
|
||||
};
|
||||
};
|
||||
tray = {
|
||||
# "icon-size = 21,
|
||||
spacing = 10;
|
||||
show-passive-items = true;
|
||||
};
|
||||
clock = {
|
||||
format = "{:%b %d %I:%M %p}";
|
||||
tooltip-format = "<big>{:%d %B %Y}</big>\n<tt><small>{calendar}</small></tt>";
|
||||
format-alt = "{:%Y-%m-%d %I:%M %p}";
|
||||
};
|
||||
cpu = {
|
||||
format = "{usage}% ";
|
||||
tooltip = false;
|
||||
};
|
||||
memory = {
|
||||
format = "{}% ";
|
||||
};
|
||||
temperature = {
|
||||
# "thermal-zone = 2,
|
||||
# "hwmon-path = "/sys/class/hwmon/hwmon2/temp1_input",
|
||||
critical-threshold = 80;
|
||||
# "format-critical = "{temperatureC}°C {icon}",
|
||||
format = "{temperatureC}°C {icon}";
|
||||
format-icons = ["" "" " "];
|
||||
};
|
||||
backlight = {
|
||||
# "device = "acpi_video1",
|
||||
format = "{percent}% {icon}";
|
||||
format-icons = ["" "" "" "" "" "" "" "" ""];
|
||||
};
|
||||
battery = {
|
||||
bat = "BAT0";
|
||||
states = {
|
||||
# good = 95,
|
||||
warning = 30;
|
||||
critical = 15;
|
||||
};
|
||||
format = "{capacity}% {icon}";
|
||||
format-charging = "{capacity}% ";
|
||||
format-plugged = "{capacity}% ";
|
||||
format-alt = "{time} {icon}";
|
||||
# "format-good = "", # An empty format will hide the module
|
||||
# "format-full = "",
|
||||
format-icons = ["" "" "" "" ""];
|
||||
};
|
||||
network = {
|
||||
# "interface = "wlp2*", # (Optional) To force the use of this interface
|
||||
format-wifi = "{essid} ({signalStrength}%) ";
|
||||
format-ethernet = "{ipaddr}/{cidr} ";
|
||||
tooltip-format = "{ifname} via {gwaddr} ";
|
||||
format-linked = "{ifname} (No IP) ";
|
||||
format-disconnected = "Disconnected ⚠";
|
||||
format-alt = "{ifname}: {ipaddr}/{cidr}";
|
||||
on-click-right = "kitty nmtui";
|
||||
};
|
||||
pulseaudio = {
|
||||
# "scroll-step = 1, # %, can be a float
|
||||
format = "{volume}% {icon} {format_source}";
|
||||
format-bluetooth = "{volume}% {icon} {format_source}";
|
||||
format-bluetooth-muted = " {icon} {format_source}";
|
||||
format-muted = " {format_source}";
|
||||
format-source = " {volume}% ";
|
||||
format-source-muted = " ";
|
||||
format-icons = {
|
||||
headphone = "";
|
||||
hands-free = "";
|
||||
headset = "";
|
||||
phone = "";
|
||||
portable = "";
|
||||
car = "";
|
||||
default = ["" "" ""];
|
||||
};
|
||||
on-click = "pavucontrol";
|
||||
};
|
||||
"custom/media" = {
|
||||
format = "{icon} {}";
|
||||
return-type = "json";
|
||||
max-length = 40;
|
||||
format-icons = {
|
||||
spotify = "";
|
||||
default = "🎜";
|
||||
};
|
||||
escape = true;
|
||||
exec = "$HOME/.config/waybar/mediaplayer.py 2> /dev/null"; # Script in resources folder
|
||||
# exec = "$HOME/.config/waybar/mediaplayer.py --player spotify 2> /dev/null" # Filter player based on name
|
||||
};
|
||||
"custom/archicon" = {
|
||||
format = "";
|
||||
# "on-click":"nwg-menu -d -fm nemo -cmd-lock gtklock -va top",
|
||||
on-click = "jgmenu_run";
|
||||
tooltip = false;
|
||||
};
|
||||
};
|
||||
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
# CSS Styling
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
style = ''
|
||||
* {
|
||||
font-family: "JetBrainsMono Nerd Font", FontAwesome, Roboto, Helvetica,
|
||||
Arial, sans-serif;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
background-color: @background-hard-contrast;
|
||||
color: @foreground;
|
||||
transition-property: background-color;
|
||||
transition-duration: 0.5s;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
window#waybar.hidden {
|
||||
opacity: 0.2;
|
||||
}
|
||||
|
||||
/*
|
||||
window#waybar.empty {
|
||||
background-color: transparent;
|
||||
}
|
||||
window#waybar.solo {
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
*/
|
||||
|
||||
/*window#waybar.termite {
|
||||
background-color: #3F3F3F;
|
||||
}
|
||||
window#waybar.chromium {
|
||||
background-color: #000000;
|
||||
border: none;
|
||||
}*/
|
||||
|
||||
#workspaces button {
|
||||
box-shadow: inset 0 -3px transparent;
|
||||
padding: 0 8px;
|
||||
background-color: @background;
|
||||
color: @foreground;
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
#workspaces button:first-child {
|
||||
border-radius: 10px 0 0 10px;
|
||||
}
|
||||
|
||||
#workspaces button:last-child {
|
||||
border-radius: 0 10px 10px 0;
|
||||
}
|
||||
|
||||
/* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */
|
||||
#workspaces button:hover {
|
||||
background: rgba(0, 0, 0, 0.2);
|
||||
background-color: @background-soft-contrast;
|
||||
/* box-shadow: inset 0 -100px 0 -97px @bright-yellow; */
|
||||
}
|
||||
|
||||
#workspaces button.empty {
|
||||
color: @foreground-soft-contrast;
|
||||
box-shadow: inherit;
|
||||
text-shadow: inherit;
|
||||
}
|
||||
|
||||
#workspaces button.active {
|
||||
color: @yellow;
|
||||
box-shadow: inset 0 -100px 0 -97px @bright-yellow;
|
||||
text-shadow: inherit;
|
||||
}
|
||||
|
||||
#workspaces button.focused {
|
||||
background-color: @background-soft-contrast;
|
||||
color: @foreground;
|
||||
/* box-shadow: inset 0 -100px 0 -97px @bright-yellow; */
|
||||
}
|
||||
|
||||
#workspaces button.urgent {
|
||||
background-color: @bright-red;
|
||||
color: @background;
|
||||
}
|
||||
|
||||
#mode {
|
||||
background-color: @background-soft-contrast;
|
||||
border-bottom: 3px solid @yellow;
|
||||
}
|
||||
|
||||
#cava,
|
||||
#clock,
|
||||
#battery,
|
||||
#cpu,
|
||||
#memory,
|
||||
#disk,
|
||||
#temperature,
|
||||
#backlight,
|
||||
#network,
|
||||
#pulseaudio,
|
||||
#pulseaudio.muted,
|
||||
#pulseaudio.bluetooth,
|
||||
#wireplumber,
|
||||
#custom-media,
|
||||
#tray,
|
||||
#mpris,
|
||||
#keyboard-state,
|
||||
#mode,
|
||||
#battery,
|
||||
#idle_inhibitor,
|
||||
#scratchpad,
|
||||
#mpd {
|
||||
padding: 0 10px;
|
||||
color: @foreground;
|
||||
}
|
||||
|
||||
#window,
|
||||
#workspaces {
|
||||
margin: 0 4px;
|
||||
padding-top: 0px;
|
||||
}
|
||||
|
||||
.modules-right {
|
||||
background-color: @background-soft-contrast;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
/* If workspaces is the leftmost module, omit left margin */
|
||||
.modules-left > widget:first-child > #workspaces {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
/* If workspaces is the rightmost module, omit right margin */
|
||||
.modules-right > widget:last-child > #workspaces {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
#mpris {
|
||||
color: @yellow;
|
||||
}
|
||||
|
||||
#clock {
|
||||
color: @yellow;
|
||||
}
|
||||
|
||||
#battery {
|
||||
color: @blue;
|
||||
}
|
||||
|
||||
#battery.charging,
|
||||
#battery.plugged {
|
||||
color: #d3869b;
|
||||
}
|
||||
|
||||
@keyframes blink {
|
||||
to {
|
||||
background-color: #fbf1c7;
|
||||
color: #df3f71;
|
||||
}
|
||||
}
|
||||
|
||||
#battery.critical:not(.charging) {
|
||||
background-color: #282828;
|
||||
color: #d3869b;
|
||||
animation-name: blink;
|
||||
animation-duration: 0.5s;
|
||||
animation-timing-function: linear;
|
||||
animation-iteration-count: infinite;
|
||||
animation-direction: alternate;
|
||||
}
|
||||
|
||||
label:focus {
|
||||
background-color: #000000;
|
||||
}
|
||||
|
||||
#backlight {
|
||||
color: #458588;
|
||||
}
|
||||
|
||||
#temperature {
|
||||
color: #fabd2f;
|
||||
}
|
||||
|
||||
#temperature.critical {
|
||||
background-color: #fbf1c7;
|
||||
color: #b57614;
|
||||
}
|
||||
|
||||
#cpu {
|
||||
color: @blue;
|
||||
}
|
||||
|
||||
#memory {
|
||||
color: @magenta;
|
||||
}
|
||||
|
||||
#network {
|
||||
color: @blue;
|
||||
}
|
||||
|
||||
#network.disconnected {
|
||||
background-color: @bright-red;
|
||||
color: @background;
|
||||
}
|
||||
|
||||
/*#disk {
|
||||
background-color: #964B00;
|
||||
}*/
|
||||
|
||||
#pulseaudio,
|
||||
#pulseaudio.muted,
|
||||
#pulseaudio.bluetooth {
|
||||
color: @cyan;
|
||||
}
|
||||
|
||||
#tray {
|
||||
}
|
||||
|
||||
#tray > .needs-attention {
|
||||
background-color: @bright-red;
|
||||
color: @background;
|
||||
}
|
||||
|
||||
#idle_inhibitor {
|
||||
background-color: #282828;
|
||||
color: #ebdbb2;
|
||||
}
|
||||
|
||||
#idle_inhibitor.activated {
|
||||
background-color: #fbf1c7;
|
||||
color: #3c3836;
|
||||
}
|
||||
|
||||
#custom-media {
|
||||
background-color: #66cc99;
|
||||
color: #2a5c45;
|
||||
min-width: 100px;
|
||||
}
|
||||
|
||||
#custom-media.custom-spotify {
|
||||
background-color: #66cc99;
|
||||
}
|
||||
|
||||
#custom-media.custom-vlc {
|
||||
background-color: #ffa000;
|
||||
}
|
||||
|
||||
#mpd {
|
||||
background-color: #66cc99;
|
||||
color: #2a5c45;
|
||||
}
|
||||
|
||||
#mpd.disconnected {
|
||||
background-color: #f53c3c;
|
||||
}
|
||||
|
||||
#mpd.stopped {
|
||||
background-color: #90b1b1;
|
||||
}
|
||||
|
||||
#mpd.paused {
|
||||
background-color: #51a37a;
|
||||
}
|
||||
|
||||
#language {
|
||||
background: #00b093;
|
||||
color: #740864;
|
||||
padding: 0 5px;
|
||||
margin: 0 5px;
|
||||
min-width: 16px;
|
||||
}
|
||||
|
||||
#keyboard-state {
|
||||
background: #97e1ad;
|
||||
color: #000000;
|
||||
padding: 0 0px;
|
||||
margin: 0 5px;
|
||||
min-width: 16px;
|
||||
}
|
||||
|
||||
#keyboard-state > label {
|
||||
padding: 0 5px;
|
||||
}
|
||||
|
||||
#keyboard-state > label.locked {
|
||||
background: rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
'';
|
||||
};
|
||||
}
|
||||
11
home/system/wlsunset.nix
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
services.wlsunset = {
|
||||
enable = true;
|
||||
gamma = 0.8;
|
||||
|
||||
sunrise = "7:00";
|
||||
sunset = "19:00";
|
||||
|
||||
temperature.night = 4000;
|
||||
};
|
||||
}
|
||||
102
home/system/wofi.nix
Normal file
@@ -0,0 +1,102 @@
|
||||
{
|
||||
programs.wofi = {
|
||||
enable = true;
|
||||
settings = {
|
||||
allow_markup = true;
|
||||
width = 450;
|
||||
terminal = "foot";
|
||||
height = "305px";
|
||||
orientation = "vertical";
|
||||
halign = "fill";
|
||||
show = "drun";
|
||||
prompt = "Apps";
|
||||
normal_window = true;
|
||||
layer = "top";
|
||||
gtk_dark = true;
|
||||
line_wrap = "off";
|
||||
dynamic_lines = false;
|
||||
allow_images = true;
|
||||
image_size = 24;
|
||||
exec_search = false;
|
||||
hide_search = false;
|
||||
parse_search = false;
|
||||
insensitive = true;
|
||||
hide_scroll = true;
|
||||
no_actions = true;
|
||||
sort_order = "default";
|
||||
filter_rate = 100;
|
||||
key_expand = "Tab";
|
||||
key_exit = "Escape";
|
||||
};
|
||||
|
||||
style = ''
|
||||
/** ********** Fonts ********** **/
|
||||
|
||||
* {
|
||||
font-size: 14px;
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
#window {
|
||||
background-color: @theme_base_color;
|
||||
color: @theme_text_color;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
#outer-box {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
#input {
|
||||
background-color: #181825;
|
||||
border: #313244;
|
||||
padding: 8px 12px;
|
||||
}
|
||||
|
||||
#scroll {
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
#inner-box {}
|
||||
|
||||
#img {
|
||||
padding-right: 8px;
|
||||
}
|
||||
|
||||
#text {
|
||||
color: #cdd6f4;
|
||||
}
|
||||
|
||||
#text:selected {
|
||||
color: #f5e0dc;
|
||||
}
|
||||
|
||||
#entry {
|
||||
padding: 6px;
|
||||
}
|
||||
|
||||
#entry:selected {
|
||||
background-image: linear-gradient(
|
||||
to right,
|
||||
#F5A97F,
|
||||
#ED8796,
|
||||
#C6A0F6,
|
||||
#8AADF4,
|
||||
#A6DA95,
|
||||
#EED49F
|
||||
);
|
||||
color: #cdd6f4;
|
||||
}
|
||||
|
||||
#unselected {}
|
||||
|
||||
#selected {}
|
||||
|
||||
#input,
|
||||
#entry:selected {
|
||||
border-radius: 20px;
|
||||
}
|
||||
|
||||
'';
|
||||
};
|
||||
}
|
||||
BIN
home/wallpapers/Nixos.png
Executable file
|
After Width: | Height: | Size: 840 KiB |
BIN
home/wallpapers/lock.jpg
Normal file
|
After Width: | Height: | Size: 69 KiB |
BIN
home/wallpapers/nix-black-4k.png
Executable file
|
After Width: | Height: | Size: 50 KiB |
BIN
home/wallpapers/nix-magenta-blue-1920x1080.png
Normal file
|
After Width: | Height: | Size: 54 KiB |
BIN
home/wallpapers/nix-magenta-pink-1920x1080.png
Normal file
|
After Width: | Height: | Size: 47 KiB |
BIN
home/wallpapers/nixos-catpuchin.png
Executable file
|
After Width: | Height: | Size: 376 KiB |
BIN
home/wallpapers/nixppuccin.png
Normal file
|
After Width: | Height: | Size: 190 KiB |
BIN
home/wallpapers/rog.jpg
Normal file
|
After Width: | Height: | Size: 5.6 MiB |
@@ -1,89 +0,0 @@
|
||||
{
|
||||
inputs,
|
||||
outputs,
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
./locale.nix
|
||||
./packages.nix
|
||||
./services.nix
|
||||
./users.nix
|
||||
./docker.nix
|
||||
./x.nix
|
||||
];
|
||||
|
||||
nixpkgs = {
|
||||
# You can add overlays here
|
||||
overlays = [
|
||||
# Add overlays your own flake exports (from overlays and pkgs dir):
|
||||
outputs.overlays.additions
|
||||
outputs.overlays.modifications
|
||||
outputs.overlays.unstable-packages
|
||||
|
||||
# You can also add overlays exported from other flakes:
|
||||
# neovim-nightly-overlay.overlays.default
|
||||
|
||||
# Or define it inline, for example:
|
||||
# (final: prev: {
|
||||
# hi = final.hello.overrideAttrs (oldAttrs: {
|
||||
# patches = [ ./change-hello-to-hi.patch ];
|
||||
# });
|
||||
# })
|
||||
];
|
||||
# Configure your nixpkgs instance
|
||||
config = {
|
||||
# I'm sorry Richard Stallman
|
||||
allowUnfree = true;
|
||||
};
|
||||
};
|
||||
|
||||
# This will add each flake input as a registry
|
||||
# To make nix3 commands consistent with your flake
|
||||
nix.registry = (lib.mapAttrs (_: flake: {inherit flake;})) ((lib.filterAttrs (_: lib.isType "flake")) inputs);
|
||||
|
||||
# This will additionally add your inputs to the system's legacy channels
|
||||
# Making legacy nix commands consistent as well, awesome!
|
||||
nix.nixPath = ["/etc/nix/path"];
|
||||
environment.etc =
|
||||
lib.mapAttrs'
|
||||
(name: value: {
|
||||
name = "nix/path/${name}";
|
||||
value.source = value.flake;
|
||||
})
|
||||
config.nix.registry;
|
||||
|
||||
nix.settings = {
|
||||
# Enable flakes and new 'nix' command
|
||||
experimental-features = "nix-command flakes";
|
||||
# Deduplicate and optimize nix store
|
||||
auto-optimise-store = true;
|
||||
# Use cache servers for packages
|
||||
substituters = [
|
||||
"https://nix-community.cachix.org"
|
||||
"https://cache.nixos.org/"
|
||||
];
|
||||
trusted-public-keys = [
|
||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||
];
|
||||
};
|
||||
|
||||
# Bootloader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
# Enables wireless support via wpa_supplicant
|
||||
# networking.wireless.enable = true;
|
||||
|
||||
# Configure network proxy if necessary
|
||||
# networking.proxy.default = "http://user:password@proxy:port/";
|
||||
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||||
|
||||
# Enable networking
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
# Set your time zone
|
||||
time.timeZone = "Europe/Warsaw";
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
{
|
||||
virtualisation.docker = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
{
|
||||
inputs,
|
||||
outputs,
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
# Select internationalisation properties
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "pl_PL.UTF-8";
|
||||
LC_IDENTIFICATION = "pl_PL.UTF-8";
|
||||
LC_MEASUREMENT = "pl_PL.UTF-8";
|
||||
LC_MONETARY = "pl_PL.UTF-8";
|
||||
LC_NAME = "pl_PL.UTF-8";
|
||||
LC_NUMERIC = "en_US.UTF-8";
|
||||
LC_PAPER = "pl_PL.UTF-8";
|
||||
LC_TELEPHONE = "pl_PL.UTF-8";
|
||||
LC_TIME = "en_US.UTF-8";
|
||||
};
|
||||
}
|
||||
@@ -1,56 +0,0 @@
|
||||
{
|
||||
inputs,
|
||||
outputs,
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
# Auto-upgrade in the background
|
||||
system.autoUpgrade = {
|
||||
enable = true;
|
||||
flake = inputs.self.outPath;
|
||||
flags = [
|
||||
"--update-input"
|
||||
"nixpkgs"
|
||||
"-L"
|
||||
];
|
||||
dates = "12:00";
|
||||
randomizedDelaySec = "45min";
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
|
||||
# wget
|
||||
ntfs3g
|
||||
dosfstools
|
||||
unstable.nh
|
||||
nix-output-monitor
|
||||
nvd
|
||||
];
|
||||
|
||||
fonts.packages = with pkgs; [
|
||||
nerdfonts
|
||||
noto-fonts
|
||||
noto-fonts-cjk
|
||||
noto-fonts-emoji
|
||||
font-awesome
|
||||
source-han-sans
|
||||
source-han-sans-japanese
|
||||
source-han-serif-japanese
|
||||
];
|
||||
|
||||
environment.sessionVariables = {
|
||||
FLAKE = "/home/mike/.dots";
|
||||
};
|
||||
|
||||
programs.nix-ld = {
|
||||
enable = true;
|
||||
libraries = with pkgs; [
|
||||
# Add any missing dynamic libraries for unpackaged
|
||||
# programs here, NOT in environment.systemPackages
|
||||
];
|
||||
};
|
||||
|
||||
programs.dconf.enable = true;
|
||||
}
|
||||
@@ -1,87 +0,0 @@
|
||||
{
|
||||
inputs,
|
||||
outputs,
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
# I use zsh btw
|
||||
environment.shells = with pkgs; [bash zsh];
|
||||
users.defaultUserShell = pkgs.zsh;
|
||||
programs.zsh.enable = true;
|
||||
|
||||
|
||||
# Configure console keymap
|
||||
console.keyMap = "pl2";
|
||||
|
||||
services.gnome.gnome-keyring.enable = true;
|
||||
|
||||
# Enable CUPS to print documents.
|
||||
services.printing.enable = true;
|
||||
|
||||
# Enable sound with pipewire.
|
||||
sound.enable = true;
|
||||
hardware.pulseaudio.enable = false;
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
# If you want to use JACK applications, uncomment this
|
||||
#jack.enable = true;
|
||||
|
||||
# use the example session manager (no others are packaged yet so this is enabled by default,
|
||||
# no need to redefine it in your config for now)
|
||||
#media-session.enable = true;
|
||||
};
|
||||
|
||||
# Enable touchpad support (enabled default in most desktopManager).
|
||||
# services.xserver.libinput.enable = true;
|
||||
|
||||
# Some programs need SUID wrappers, can be configured further or are
|
||||
# started in user sessions.
|
||||
programs.mtr.enable = true;
|
||||
programs.gnupg.agent = {
|
||||
enable = true;
|
||||
enableSSHSupport = true;
|
||||
pinentryFlavor = "curses";
|
||||
settings = {
|
||||
max-cache-ttl = 60480000;
|
||||
default-cache-ttl = 60480000;
|
||||
# default-cache-ttl-ssh = 60480000;
|
||||
# max-cache-ttl-ssl = 60480000;
|
||||
};
|
||||
};
|
||||
|
||||
# This setups a SSH server. Very important if you're setting up a headless system.
|
||||
# Feel free to remove if you don't need it.
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
settings = {
|
||||
# Forbid root login through SSH.
|
||||
PermitRootLogin = "no";
|
||||
# Use keys only. Remove if you want to SSH using password (not recommended)
|
||||
PasswordAuthentication = true;
|
||||
X11Forwarding = true;
|
||||
};
|
||||
};
|
||||
|
||||
# security.pam.services.kwallet = {
|
||||
# name = "kwallet";
|
||||
# enableKwallet = true;
|
||||
# };
|
||||
|
||||
programs.ssh = {
|
||||
# startAgent = true;
|
||||
# forwardX11 = true;
|
||||
# enableAskPassword = true;
|
||||
};
|
||||
|
||||
# Open ports in the firewall.
|
||||
# networking.firewall.allowedTCPPorts = [ ... ];
|
||||
# networking.firewall.allowedUDPPorts = [ ... ];
|
||||
# Or disable the firewall altogether.
|
||||
# networking.firewall.enable = false;
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
{
|
||||
inputs,
|
||||
outputs,
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
users.users = {
|
||||
mike = {
|
||||
isNormalUser = true;
|
||||
description = "Mike";
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDfqPj+a2gmoUl3TuGSZxf0zRBabVWvXRrjLF7sFlqjMbfkx428F3L7C8OC3Z9XDT4ysbpgWcPuVKNtK5kkKGjSLHAgB2CgvD15K11Q+ag1+uyePaiOypZYJewvv1hhqU5IrVcxUbTsbREH/IsdQSlNSuyNFIr3oFnrff5iKEKEwEvSDeiqpqRh56pAkF6Kb15aYqZO7X9rbfoa8Sgj3VJXN0181lXMjXkNsYVa3gDmKv89C6qutg+KOpHlXgn4AfIRcCw8ik6OGBEfi/gUeb3SYpD+7undNLyloxCbGwHQ40IdoqPatyhTNS4jm9kb+Tno4hj0pbLHZSUdXgGaSfGx1W0MVVY0mm0Hu7EmYDBHUTfmPmPxnolWh8UH+XdkNPnwZfyZlyBcVVkVzog1ZCs1i9Y6oS1ZIbzuz+WxBPPDIHMRdmxv6+PMc5kZyrpuX1PgFb7Xt5cRNAL5/wywoi9Z45SS7qP9zNSb443UaaXzUatqnlawZ0GS0qXJh3ljwJ8= mike@odin"
|
||||
];
|
||||
extraGroups = ["networkmanager" "wheel" "docker" "libvirtd"];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
{
|
||||
inputs,
|
||||
outputs,
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
services.udisks2.enable = true;
|
||||
security.polkit.enable = true;
|
||||
services.upower.enable = config.powerManagement.enable;
|
||||
services.gvfs.enable = true;
|
||||
|
||||
services.autorandr = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
autorandr
|
||||
xorg.xrandr
|
||||
xorg.libX11
|
||||
xorg.libX11.dev
|
||||
xorg.libXft
|
||||
xorg.libXinerama
|
||||
xorg.xbacklight
|
||||
pulseaudioFull
|
||||
brightnessctl
|
||||
];
|
||||
}
|
||||
56
hosts/default.nix
Normal file
@@ -0,0 +1,56 @@
|
||||
{ hostname, ... }:
|
||||
{
|
||||
imports =
|
||||
if hostname == "zion" then [
|
||||
./zion.nix
|
||||
|
||||
./modules/nh.nix
|
||||
./modules/boot.nix
|
||||
./modules/users.nix
|
||||
./modules/greetd.nix
|
||||
./modules/fstrim.nix
|
||||
./modules/nvidia.nix
|
||||
./modules/network.nix
|
||||
./modules/security.nix
|
||||
./modules/pipewire.nix
|
||||
./modules/gsettings.nix
|
||||
./modules/bluetooth.nix
|
||||
./modules/packages.nix
|
||||
# ./modules/lanzaboot.nix
|
||||
./modules/configuration.nix
|
||||
]
|
||||
else if hostname == "thor" then [
|
||||
./thor.nix
|
||||
|
||||
./modules/nh.nix
|
||||
./modules/tlp.nix
|
||||
./modules/boot.nix
|
||||
./modules/users.nix
|
||||
./modules/greetd.nix
|
||||
./modules/fstrim.nix
|
||||
./modules/network.nix
|
||||
./modules/security.nix
|
||||
./modules/pipewire.nix
|
||||
./modules/gsettings.nix
|
||||
./modules/bluetooth.nix
|
||||
./modules/lanzaboot.nix
|
||||
./modules/configuration.nix
|
||||
]
|
||||
else if hostname == "server" then [
|
||||
./server.nix
|
||||
|
||||
./modules/nh.nix
|
||||
./modules/tlp.nix
|
||||
./modules/ssh.nix
|
||||
./modules/boot.nix
|
||||
./modules/users.nix
|
||||
./modules/nvidia.nix
|
||||
./modules/ollama.nix
|
||||
./modules/fstrim.nix
|
||||
./modules/system.nix
|
||||
./modules/network.nix
|
||||
./modules/configuration.nix
|
||||
#./modules/lanzaboot.nix
|
||||
]
|
||||
else [ ];
|
||||
}
|
||||
8
hosts/modules/adb.nix
Normal file
@@ -0,0 +1,8 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs.adb.enable = true;
|
||||
environment.systemPackages = [
|
||||
pkgs.android-tools
|
||||
pkgs.universal-android-debloater
|
||||
];
|
||||
}
|
||||
8
hosts/modules/ananicy.nix
Normal file
@@ -0,0 +1,8 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
services.ananicy = {
|
||||
enable = true;
|
||||
package = pkgs.ananicy-cpp;
|
||||
rulesProvider = pkgs.ananicy-rules-cachyos;
|
||||
};
|
||||
}
|
||||
8
hosts/modules/bluetooth.nix
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
services.blueman.enable = false;
|
||||
|
||||
hardware.bluetooth = {
|
||||
enable = true;
|
||||
powerOnBoot = false;
|
||||
};
|
||||
}
|
||||
24
hosts/modules/boot.nix
Normal file
@@ -0,0 +1,24 @@
|
||||
{ pkgs, hostname, inputs, ... }:
|
||||
{
|
||||
imports = if hostname == "zion" then [ inputs.chaotic.nixosModules.default ] else [ ];
|
||||
|
||||
boot = {
|
||||
tmp.cleanOnBoot = true;
|
||||
|
||||
loader = {
|
||||
timeout = 1;
|
||||
efi.canTouchEfiVariables = true;
|
||||
|
||||
systemd-boot = {
|
||||
enable = true;
|
||||
configurationLimit = 10;
|
||||
};
|
||||
};
|
||||
|
||||
kernelPackages =
|
||||
if hostname == "zion" then pkgs.linuxPackages #linuxPackages_zen #linuxPackages #linuxPackages_latest #linuxPackages_xanmod_latest
|
||||
else if hostname == "thor" then pkgs.linuxPackages
|
||||
else if hostname == "server" then pkgs.linuxPackages
|
||||
else pkgs.linuxPackages_zen;
|
||||
};
|
||||
}
|
||||
66
hosts/modules/configuration.nix
Normal file
@@ -0,0 +1,66 @@
|
||||
{ hostname, inputs, ... }:
|
||||
{
|
||||
time.timeZone = "Europe/Warsaw";
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
enable32Bit = true;
|
||||
};
|
||||
|
||||
services = {
|
||||
logind = {
|
||||
lidSwitch = "ignore";
|
||||
lidSwitchExternalPower = if hostname == "server" then "ignore" else "suspend-then-hibernate";
|
||||
};
|
||||
};
|
||||
|
||||
system = {
|
||||
stateVersion = "24.05";
|
||||
switch = {
|
||||
enable = false;
|
||||
enableNg = true;
|
||||
};
|
||||
};
|
||||
|
||||
nixpkgs = { config = { allowUnfree = true; }; };
|
||||
|
||||
documentation = {
|
||||
enable = false;
|
||||
doc.enable = false;
|
||||
man.enable = false;
|
||||
dev.enable = false;
|
||||
info.enable = false;
|
||||
nixos.enable = false;
|
||||
};
|
||||
|
||||
nix = {
|
||||
daemonCPUSchedPolicy = "batch";
|
||||
channel.enable = false;
|
||||
nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
|
||||
|
||||
optimise = {
|
||||
automatic = true;
|
||||
dates = [ "daily" ];
|
||||
};
|
||||
|
||||
settings = {
|
||||
auto-optimise-store = true;
|
||||
experimental-features = [ "nix-command" "flakes" ];
|
||||
|
||||
substituters = [
|
||||
"https://cache.nixos.org"
|
||||
"https://hyprland.cachix.org"
|
||||
"https://nix-community.cachix.org"
|
||||
"https://cuda-maintainers.cachix.org"
|
||||
];
|
||||
|
||||
trusted-public-keys = [
|
||||
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
|
||||
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
|
||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||
"cuda-maintainers.cachix.org-1:0dq3bujKpuEPMCX6U4WylrUDZ9JyUG0VpVZa7CNfq5E="
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
6
hosts/modules/fstrim.nix
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
services.fstrim = {
|
||||
enable = true;
|
||||
interval = "daily";
|
||||
};
|
||||
}
|
||||
28
hosts/modules/gaming.nix
Executable file
@@ -0,0 +1,28 @@
|
||||
{ pkgs, username, ... }:
|
||||
{
|
||||
users.users.${username}.packages = with pkgs; [ heroic ];
|
||||
hardware.steam-hardware.enable = true;
|
||||
|
||||
programs = {
|
||||
steam = {
|
||||
enable = true;
|
||||
gamescopeSession.enable = true;
|
||||
extraCompatPackages = with pkgs; [ proton-ge-bin ];
|
||||
};
|
||||
|
||||
gamemode = {
|
||||
enable = false;
|
||||
enableRenice = false;
|
||||
settings = { };
|
||||
};
|
||||
|
||||
gamescope = {
|
||||
enable = false;
|
||||
args = [
|
||||
"-w 1920 -h 1080"
|
||||
"-F nis"
|
||||
"f"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
32
hosts/modules/greetd.nix
Normal file
@@ -0,0 +1,32 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
services.greetd = {
|
||||
enable = true;
|
||||
settings = {
|
||||
default_session = {
|
||||
command = "${pkgs.greetd.tuigreet}/bin/tuigreet --remember --asterisks --container-padding 2 --time --time-format '%I:%M %p | %a • %h | %F' --cmd Hyprland";
|
||||
user = "greeter";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# this is a life saver.
|
||||
# literally no documentation about this anywhere.
|
||||
# might be good to write about this...
|
||||
# https://www.reddit.com/r/NixOS/comments/u0cdpi/tuigreet_with_xmonad_how/
|
||||
|
||||
systemd = {
|
||||
# To prevent getting stuck at shutdown
|
||||
extraConfig = "DefaultTimeoutStopSec=10s";
|
||||
services.greetd.serviceConfig = {
|
||||
Type = "idle";
|
||||
StandardInput = "tty";
|
||||
StandardOutput = "tty";
|
||||
StandardError = "journal"; # Without this errors will spam on screen
|
||||
# Without these bootlogs will spam on screen
|
||||
TTYReset = true;
|
||||
TTYVHangup = true;
|
||||
TTYVTDisallocate = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
4
hosts/modules/gsettings.nix
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
programs.dconf.enable = true;
|
||||
services.gvfs.enable = true;
|
||||
}
|
||||
6
hosts/modules/kde.nix
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
services.desktopManager = {
|
||||
plasma6.enable = true;
|
||||
enableQt5Integration = false;
|
||||
};
|
||||
}
|
||||
14
hosts/modules/lanzaboot.nix
Normal file
@@ -0,0 +1,14 @@
|
||||
{ lib, pkgs, inputs, ... }:
|
||||
{
|
||||
imports = [ inputs.lanzaboote.nixosModules.lanzaboote ];
|
||||
|
||||
environment.systemPackages = [ pkgs.sbctl ];
|
||||
|
||||
boot = {
|
||||
loader.systemd-boot.enable = lib.mkForce false;
|
||||
lanzaboote = {
|
||||
enable = true;
|
||||
pkiBundle = "/etc/secureboot";
|
||||
};
|
||||
};
|
||||
}
|
||||
20
hosts/modules/network.nix
Normal file
@@ -0,0 +1,20 @@
|
||||
{ hostname, ... }:
|
||||
{
|
||||
boot.initrd.systemd.network.wait-online.enable = false;
|
||||
systemd.services.NetworkManager-wait-online.enable = false;
|
||||
|
||||
networking = {
|
||||
hostName = "${hostname}";
|
||||
firewall.enable = true;
|
||||
|
||||
wireless = {
|
||||
enable = false;
|
||||
iwd.enable = false;
|
||||
};
|
||||
|
||||
networkmanager = {
|
||||
enable = true;
|
||||
wifi.backend = "wpa_supplicant";
|
||||
};
|
||||
};
|
||||
}
|
||||
12
hosts/modules/nh.nix
Normal file
@@ -0,0 +1,12 @@
|
||||
{ username, ... }:
|
||||
{
|
||||
programs.nh = {
|
||||
enable = true;
|
||||
flake = "/home/${username}/.files";
|
||||
clean = {
|
||||
enable = true;
|
||||
dates = "weekly";
|
||||
extraArgs = "--keep-since 3d --keep 3";
|
||||
};
|
||||
};
|
||||
}
|
||||
56
hosts/modules/nvidia.nix
Executable file
@@ -0,0 +1,56 @@
|
||||
{ config, ... }:
|
||||
{
|
||||
nixpkgs.config.nvidia.acceptLicense = true;
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
|
||||
hardware = {
|
||||
graphics = {
|
||||
enable = true;
|
||||
enable32Bit = true;
|
||||
};
|
||||
|
||||
nvidia = {
|
||||
package = config.boot.kernelPackages.nvidiaPackages.beta;
|
||||
open = false;
|
||||
|
||||
nvidiaSettings = true;
|
||||
modesetting.enable = true;
|
||||
# dynamicBoost.enable = true;
|
||||
|
||||
powerManagement = {
|
||||
enable = false;
|
||||
finegrained = false;
|
||||
};
|
||||
|
||||
# prime = {
|
||||
# amdgpuBusId = "PCI:05:00:0";
|
||||
# nvidiaBusId = "PCI:01:00:0";
|
||||
# #sync.enable = true;
|
||||
# offload = {
|
||||
# enable = true;
|
||||
# enableOffloadCmd = true;
|
||||
# };
|
||||
# };
|
||||
};
|
||||
};
|
||||
|
||||
# specialisation = {
|
||||
# Battery.configuration = {
|
||||
# system.nixos.tags = [ "Battery" ];
|
||||
|
||||
# boot.extraModprobeConfig = ''blacklist nouveau options nouveau modeset=0'';
|
||||
# boot.blacklistedKernelModules = [ "nouveau" "nvidia" "nvidia_drm" "nvidia_modeset" ];
|
||||
|
||||
# services.udev.extraRules = ''
|
||||
# # Remove NVIDIA USB xHCI Host Controller devices, if present
|
||||
# ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x0c0330", ATTR{power/control}="auto", ATTR{remove}="1"
|
||||
# # Remove NVIDIA USB Type-C UCSI devices, if present
|
||||
# ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x0c8000", ATTR{power/control}="auto", ATTR{remove}="1"
|
||||
# # Remove NVIDIA Audio devices, if present
|
||||
# ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x040300", ATTR{power/control}="auto", ATTR{remove}="1"
|
||||
# # Remove NVIDIA VGA/3D controller devices
|
||||
# ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x03[0-9]*", ATTR{power/control}="auto", ATTR{remove}="1"
|
||||
# '';
|
||||
# };
|
||||
# };
|
||||
}
|
||||
14
hosts/modules/ollama.nix
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
nixpkgs.config.cudaSupport = true;
|
||||
|
||||
services.ollama = {
|
||||
enable = true;
|
||||
acceleration = "cuda";
|
||||
};
|
||||
|
||||
services.open-webui = {
|
||||
enable = false;
|
||||
host = "0.0.0.0";
|
||||
openFirewall = true;
|
||||
};
|
||||
}
|
||||
30
hosts/modules/packages.nix
Normal file
@@ -0,0 +1,30 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
vim
|
||||
ntfs3g
|
||||
dosfstools
|
||||
nix-output-monitor
|
||||
nvd
|
||||
];
|
||||
|
||||
fonts.packages = with pkgs; [
|
||||
nerdfonts
|
||||
noto-fonts
|
||||
noto-fonts-cjk-sans
|
||||
noto-fonts-emoji
|
||||
font-awesome
|
||||
source-han-sans
|
||||
source-han-sans-japanese
|
||||
source-han-serif-japanese
|
||||
];
|
||||
|
||||
# Some programs need SUID wrappers, can be configured further or are
|
||||
# started in user sessions.
|
||||
programs.mtr.enable = true;
|
||||
programs.gnupg.agent = {
|
||||
enable = true;
|
||||
enableSSHSupport = true;
|
||||
};
|
||||
|
||||
}
|
||||
23
hosts/modules/pipewire.nix
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
|
||||
jack.enable = true;
|
||||
pulse.enable = true;
|
||||
|
||||
alsa = {
|
||||
enable = true;
|
||||
support32Bit = true;
|
||||
};
|
||||
|
||||
wireplumber.extraConfig = {
|
||||
"10-disable-camera" = {
|
||||
"wireplumber.profiles" = {
|
||||
main = {
|
||||
"monitor.libcamera" = "disabled";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
28
hosts/modules/qtile.nix
Executable file
@@ -0,0 +1,28 @@
|
||||
# Enable Qtile
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
# --------------------------------------
|
||||
# Enable QTILE
|
||||
# --------------------------------------
|
||||
services.xserver.windowManager.qtile = {
|
||||
enable = true;
|
||||
configFile = /home/nel/dotfiles/qtile/config.py;
|
||||
extraPackages = python3Packages: with python3Packages; [ qtile-extras ];
|
||||
};
|
||||
|
||||
# --------------------------------------
|
||||
# Necessary things
|
||||
# --------------------------------------
|
||||
environment.sessionVariables = {
|
||||
NIXOS_OZONE_WL = "1";
|
||||
};
|
||||
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
config.common.default = "*";
|
||||
extraPortals = with pkgs; [
|
||||
xdg-desktop-portal-wlr
|
||||
xdg-desktop-portal-gtk
|
||||
];
|
||||
};
|
||||
}
|
||||
7
hosts/modules/security.nix
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
security = {
|
||||
sudo.enable = true;
|
||||
rtkit.enable = true;
|
||||
polkit.enable = true;
|
||||
};
|
||||
}
|
||||
13
hosts/modules/ssh.nix
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
networking.firewall.allowedTCPPorts = [ 22 ];
|
||||
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
ports = [ 22 ];
|
||||
|
||||
settings = {
|
||||
PasswordAuthentication = true;
|
||||
UseDns = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
10
hosts/modules/thunar.nix
Normal file
@@ -0,0 +1,10 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs.thunar = {
|
||||
enable = true;
|
||||
plugins = with pkgs.xfce; [
|
||||
thunar-archive-plugin
|
||||
thunar-volman
|
||||
];
|
||||
};
|
||||
}
|
||||
50
hosts/modules/tlp.nix
Normal file
@@ -0,0 +1,50 @@
|
||||
{ config, hostname, ... }:
|
||||
{
|
||||
boot = {
|
||||
kernelModules = [ "acpi_call" ];
|
||||
extraModulePackages = with config.boot.kernelPackages; [ acpi_call ];
|
||||
};
|
||||
|
||||
services.tlp = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
|
||||
TLP_DEFAULT_MODE =
|
||||
if hostname == "laptop"
|
||||
then "BAT"
|
||||
else "AC";
|
||||
|
||||
TLP_PERSISTENT_DEFAULT =
|
||||
if hostname == "laptop"
|
||||
then 0
|
||||
else 1;
|
||||
|
||||
CPU_BOOST_ON_AC = 1;
|
||||
CPU_BOOST_ON_BAT = 0;
|
||||
CPU_HWP_DYN_BOOST_ON_AC = 1;
|
||||
CPU_HWP_DYN_BOOST_ON_BAT = 0;
|
||||
CPU_SCALING_GOVERNOR_ON_AC = "performance";
|
||||
CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
|
||||
CPU_ENERGY_PERF_POLICY_ON_AC = "performance";
|
||||
CPU_ENERGY_PERF_POLICY_ON_BAT = "balance_power";
|
||||
|
||||
RADEON_DPM_PERF_LEVEL_ON_AC = "auto";
|
||||
RADEON_DPM_PERF_LEVEL_ON_BAT = "low";
|
||||
RADEON_DPM_STATE_ON_AC = "performance";
|
||||
RADEON_DPM_STATE_ON_BAT = "battery";
|
||||
RADEON_POWER_PROFILE_ON_AC = "default";
|
||||
RADEON_POWER_PROFILE_ON_BAT = "low";
|
||||
|
||||
PLATFORM_PROFILE_ON_AC = "performance";
|
||||
PLATFORM_PROFILE_ON_BAT = "low-power";
|
||||
|
||||
START_CHARGE_THRESH_BAT0 = 40;
|
||||
STOP_CHARGE_THRESH_BAT0 = 60;
|
||||
|
||||
WOL_DISABLE = "Y";
|
||||
|
||||
USB_AUTOSUSPEND = 1;
|
||||
};
|
||||
};
|
||||
}
|
||||
26
hosts/modules/users.nix
Normal file
@@ -0,0 +1,26 @@
|
||||
{ inputs, username, hostname, ... }:
|
||||
{
|
||||
imports = [ inputs.home-manager.nixosModules.home-manager ];
|
||||
|
||||
users.users.${username} = {
|
||||
isNormalUser = true;
|
||||
description = "${username}";
|
||||
extraGroups = [ "networkmanager" "wheel" ];
|
||||
};
|
||||
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
extraSpecialArgs = { inherit inputs username hostname; };
|
||||
|
||||
users.${username} = {
|
||||
imports = [ ../../home/home.nix ];
|
||||
programs.home-manager.enable = true;
|
||||
home = {
|
||||
stateVersion = "24.05";
|
||||
username = "${username}";
|
||||
homeDirectory = "/home/${username}";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
31
hosts/modules/vm.nix
Normal file
@@ -0,0 +1,31 @@
|
||||
{ pkgs, username, ... }:
|
||||
{
|
||||
users.users.${username}.extraGroups = [ "libvirtd" ];
|
||||
boot.kernel.sysctl = { "vm.max_map_count" = 2147483642; };
|
||||
|
||||
# Install necessary packages
|
||||
environment.systemPackages = with pkgs; [
|
||||
virt-manager
|
||||
virt-viewer
|
||||
spice
|
||||
spice-gtk
|
||||
spice-protocol
|
||||
win-virtio
|
||||
win-spice
|
||||
adwaita-icon-theme
|
||||
];
|
||||
|
||||
services.spice-vdagentd.enable = true;
|
||||
|
||||
virtualisation = {
|
||||
spiceUSBRedirection.enable = true;
|
||||
libvirtd = {
|
||||
enable = true;
|
||||
qemu = {
|
||||
swtpm.enable = true;
|
||||
ovmf.enable = true;
|
||||
ovmf.packages = [ pkgs.OVMFFull.fd ];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
9
hosts/modules/xserver.nix
Normal file
@@ -0,0 +1,9 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
xkb.layout = "fr";
|
||||
xkb.variant = "";
|
||||
excludePackages = [ pkgs.xterm ];
|
||||
};
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
{
|
||||
inputs,
|
||||
outputs,
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
hardware.bluetooth = {
|
||||
enable = true;
|
||||
powerOnBoot = true;
|
||||
settings = {
|
||||
General = {
|
||||
Experimental = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services.blueman.enable = true;
|
||||
|
||||
environment.systemPackages = with pkgs; [bluez];
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
# Edit this configuration file to define what should be installed on
|
||||
# your system. Help is available in the configuration.nix(5) man page
|
||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||
{
|
||||
inputs,
|
||||
outputs,
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
# You can import other NixOS modules here
|
||||
imports = [
|
||||
# If you want to use modules your own flake exports (from modules/nixos):
|
||||
# outputs.nixosModules.example
|
||||
|
||||
# Or modules from other flakes (such as nixos-hardware):
|
||||
# inputs.hardware.nixosModules.common-cpu-amd
|
||||
# inputs.hardware.nixosModules.common-ssd
|
||||
|
||||
# You can also split up your configuration and import pieces of it here:
|
||||
# ./users.nix
|
||||
../common
|
||||
./gui.nix
|
||||
./bluetooth.nix
|
||||
./networking.nix
|
||||
|
||||
# Import your generated (nixos-generate-config) hardware configuration
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
# Hostname
|
||||
networking.hostName = "thor";
|
||||
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||
# this value at the release version of the first install of this system.
|
||||
# Before changing this value read the documentation for this option
|
||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||
system.stateVersion = "23.11"; # Did you read the comment?
|
||||
}
|
||||