Compare commits

...

33 Commits

Author SHA1 Message Date
9b18c146ca chore: system update 2025-03-12 22:52:15 +01:00
7028adda9f feat: aliases, dwm bump, and system upgrade 2025-02-21 14:02:32 +01:00
716eaa17d4 feat: dwm and system update 2025-02-21 11:08:07 +01:00
c6e3be2b21 feat: microsoft fonts 2025-02-18 23:47:18 +01:00
b41556e49e feat: docuement viewer 2025-02-17 23:38:39 +01:00
d3de11cb35 feat: added tex formatter 2025-02-14 12:03:42 +01:00
99daf9c58a chore: system update 2025-02-11 15:23:48 +01:00
e82bd4f4dc feat: less browsers 2025-02-04 19:43:27 +01:00
c093d8ee00 feat: more browsers 2025-01-30 14:21:38 +01:00
ca979091dc fix: more xset rules 2025-01-26 21:04:29 +01:00
bbb753d81d fix: disabled xset 2025-01-26 19:42:44 +01:00
228f91da74 chore: zen upgrade 2025-01-23 20:04:52 +01:00
a23e1dbe3c fix: accidental merge 2025-01-23 20:02:15 +01:00
4b125c5802 feat: socket file for xidlehook 2025-01-23 12:33:06 +01:00
3a8fa615f9 chore: system upgrade 2025-01-22 19:15:07 +01:00
8a5f705a96 fix: revert archivebox 2025-01-22 12:48:53 +01:00
a6a5876a23 feat: added archivebox 2025-01-19 20:18:19 +01:00
a1241fd833 Merge branch 'main' of github.com:eRgo35/nixos 2025-01-12 18:38:53 +01:00
b1da20e832 feat: added java and nix dev pkgs 2025-01-12 18:38:46 +01:00
9fa2da65f3 fix: modified nvidia to nvidia-open 2025-01-12 18:38:33 +01:00
3aa43f8a07 hyprland commented out 2025-01-11 12:39:40 +01:00
edc6aecb09 fix: merged xidlehook rules 2025-01-11 12:25:35 +01:00
38c84946c5 feat: changed xset to xidlehook 2025-01-11 12:16:07 +01:00
11d3b28513 chore: system update 2025-01-10 21:47:12 +01:00
e375c19c7d fix: reformatted config 2025-01-09 10:38:46 +01:00
e2886da8d6 fix: added commented out modules for easier cmp 2025-01-09 10:38:15 +01:00
1d68abb4c5 feat: free vscode and better xorg powersave 2025-01-09 10:34:03 +01:00
6189e52e4d feat: expanded bar for laptop utils 2025-01-09 10:14:03 +01:00
c57a67a6d0 chore: system upgrade 2025-01-08 16:58:12 +01:00
b7d8c84b4b fix: laptop typos adjustments 2025-01-08 16:58:00 +01:00
3b2cbc6e04 chore: bumped dwm version hash 2025-01-07 11:55:56 +01:00
7c030a594b fix: fixed cpu utilization 2025-01-07 11:48:48 +01:00
6be617f26a fix: added modeset to nvidia 2025-01-07 11:21:08 +01:00
17 changed files with 626 additions and 325 deletions

652
flake.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -2,8 +2,8 @@
description = "Mike's Flake"; description = "Mike's Flake";
inputs = { inputs = {
nixpkgs.url = "nixpkgs/nixos-24.11"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
nixpkgs-unstable.url = "nixpkgs/nixos-unstable"; nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
chaotic.url = "github:chaotic-cx/nyx/nyxpkgs-unstable"; chaotic.url = "github:chaotic-cx/nyx/nyxpkgs-unstable";
nur.url = "github:nix-community/NUR"; nur.url = "github:nix-community/NUR";
nix-alien.url = "github:thiagokokada/nix-alien"; nix-alien.url = "github:thiagokokada/nix-alien";

View File

@@ -58,5 +58,8 @@
gp = "git pull"; gp = "git pull";
gs = "git status"; gs = "git status";
gd = "git diff"; gd = "git diff";
vim = "nvim";
vi = "nvim";
}; };
} }

View File

@@ -68,10 +68,48 @@ setxkbmap pl &
# xset s on & # xset s on &
# xset -dpms & # xset -dpms &
# xset s 900 & # xset s 900 &
xset +dpms & # Host-specific rules
xset dpms 1200 1800 2100 & if [ "$(hostname)" = "zion" ]; then
xset s on & # Zion rules (Desktop)
xset s 900 & # Enable DPMS and set longer timeouts for desktop
# xset +dpms
# xset dpms 1200 2400 3600 # Standby: 20 min, Suspend: 40 min, Off: 60 min
# Enable screen blanking and set timeout to 20 minutes
# xset s on
xset s off
xset s noblank
xset -dpms
# xset s 1200
xidlehook \
--socket /tmp/xidlehook.sock \
--not-when-fullscreen \
--not-when-audio \
--timer 600 "xset dpms force standby" "" \
--timer 1800 "xset dpms force suspend" "" \
--timer 3600 "xset dpms force off" "" &
elif [ "$(hostname)" = "thor" ]; then
# Thor rules (Laptop)
# Enable DPMS and set shorter timeouts for laptop
# xset +dpms
# xset dpms 300 600 900 # Standby: 5 min, Suspend: 10 min, Off: 15 min
# Enable screen blanking and set timeout to 10 minutes
# xset s on
# xset s 600
# Laptop-specific xidlehook rules
xidlehook \
--socket /tmp/xidlehook.sock
--not-when-fullscreen \
--not-when-audio \
--timer 450 "brightnessctl -s set 5%" "brightnessctl -s set 100%" \
--timer 600 "loginctl lock-session" "" \
--timer 750 "xset dpms force standby" "" \
--timer 900 "systemctl suspend" "" &
fi
# auths # auths
# /usr/lib/mate-polkit/polkit-mate-authentication-agent-1 & # /usr/lib/mate-polkit/polkit-mate-authentication-agent-1 &

View File

@@ -22,8 +22,10 @@ HIGHLIGHT_HIGH=#524f67
# Function to get CPU usage # Function to get CPU usage
get_cpu_usage() { get_cpu_usage() {
cpu_usage=$(grep 'cpu ' /proc/stat | awk '{usage=($2+$4)*100/($2+$4+$5)} END {printf "%.0f%%\n", usage}') cpu_usage=$(awk '{u=$2+$4; t=$2+$4+$5; if (NR==1){u1=u; t1=t;} else print int(($2+$4-u1) * 100 / (t-t1)); }' \
echo "^c$FOAM^CPU: $cpu_usage" <(grep 'cpu ' /proc/stat) <(sleep 1; grep 'cpu ' /proc/stat))
echo "^c$FOAM^CPU: $cpu_usage%"
} }
# Function to get memory usage # Function to get memory usage
@@ -66,16 +68,65 @@ get_volume() {
echo "^c$PINE^VOL: $volume MIC: $mic_level" echo "^c$PINE^VOL: $volume MIC: $mic_level"
} }
# Function to get brightness percentage
get_brightness() {
# Get the current brightness level (adjust path if needed)
brightness=$(cat /sys/class/backlight/intel_backlight/brightness)
max_brightness=$(cat /sys/class/backlight/intel_backlight/max_brightness)
# Calculate brightness percentage
brightness_percent=$(awk "BEGIN {printf \"%.0f%%\", ($brightness / $max_brightness) * 100}")
# Output the result with color
echo "^c$ROSE^BRT: $brightness_percent"
}
# Function to get weighted average battery level
get_battery_level() {
# Get battery levels (adjust paths if needed)
battery0_level=$(cat /sys/class/power_supply/BAT0/capacity)
battery1_level=$(cat /sys/class/power_supply/BAT1/capacity)
battery0_energy_full=$(cat /sys/class/power_supply/BAT0/energy_full)
battery1_energy_full=$(cat /sys/class/power_supply/BAT1/energy_full)
# Calculate weights based on energy capacity
weight0=$(awk "BEGIN {printf \"%.2f\", $battery0_energy_full / ($battery0_energy_full + $battery1_energy_full)}")
weight1=$(awk "BEGIN {printf \"%.2f\", $battery1_energy_full / ($battery0_energy_full + $battery1_energy_full)}")
# Calculate weighted average
weighted_avg=$(awk "BEGIN {printf \"%.0f%%\", ($battery0_level * $weight0 + $battery1_level * $weight1)}")
# Output the result with color
echo "^c$LOVE^BAT: $weighted_avg"
}
# Function to get date and time in American 12-hour format # Function to get date and time in American 12-hour format
get_datetime() { get_datetime() {
datetime=$(date +"%a %d %b %I:%M %p") datetime=$(date +"%a %d %b %I:%M %p")
echo "^c$GOLD^$datetime" echo "^c$GOLD^$datetime"
} }
# Function to detect if the system is a laptop
is_laptop() {
# Check if battery and brightness files exist
if [ -d /sys/class/power_supply/BAT0 ] && [ -d /sys/class/backlight/intel_backlight ]; then
return 0 # Laptop
else
return 1 # PC
fi
}
# Main loop to update xsetroot # Main loop to update xsetroot
while true; do while true; do
# Combine all status components # Combine all status components
if is_laptop; then
# Include battery and brightness for laptops
status="$(get_volume) ^c$TEXT^| $(get_cpu_usage) ^c$TEXT^| $(get_memory_usage) ^c$TEXT^| $(get_brightness) ^c$TEXT^| $(get_battery_level) ^c$TEXT^| $(get_datetime)"
else
# Exclude battery and brightness for PCs
status="$(get_volume) ^c$TEXT^| $(get_cpu_usage) ^c$TEXT^| $(get_memory_usage) ^c$TEXT^| $(get_datetime)" status="$(get_volume) ^c$TEXT^| $(get_cpu_usage) ^c$TEXT^| $(get_memory_usage) ^c$TEXT^| $(get_datetime)"
fi
# Update the root window name with a darker background # Update the root window name with a darker background
xsetroot -name "$status" xsetroot -name "$status"

View File

@@ -33,6 +33,9 @@
xorg.xinit xorg.xinit
xorg.xinput xorg.xinput
brightnessctl brightnessctl
playerctl
qt6ct
xautolock
xclip xclip
# gnome.gnome-keyring # gnome.gnome-keyring
feh feh
@@ -64,6 +67,7 @@
virt-manager virt-manager
xfce.thunar xfce.thunar
dconf dconf
xidlehook
]; ];
home.file = { home.file = {

View File

@@ -39,8 +39,8 @@
# ./configs/keys.nix # ./configs/keys.nix
./system/dunst.nix ./system/dunst.nix
./system/hypr.nix # ./system/hypr.nix
./system/hyprland.nix # ./system/hyprland.nix
./system/rofi.nix ./system/rofi.nix
./system/stylix.nix ./system/stylix.nix
./system/theme.nix ./system/theme.nix

View File

@@ -50,18 +50,23 @@
okular okular
# > desktop < # # > desktop < #
# firefox firefox
httrack
# whatsapp-for-linux # whatsapp-for-linux
telegram-desktop # telegram-desktop
google-chrome kotatogram-desktop
chromium # google-chrome
# chromium
brave
evolution evolution
obsidian obsidian
foliate foliate
helio-workstation helio-workstation
# vesktop # vesktop
equibop equibop
inputs.zen-browser.packages."${system}".default # inputs.zen-browser.packages."${system}".default
papers
# > gaming < # # > gaming < #
prismlauncher prismlauncher

View File

@@ -13,62 +13,62 @@
] ]
); );
extensions = with pkgs.vscode-extensions; [ # extensions = with pkgs.vscode-extensions; [
ms-python.python # ms-python.python
ms-python.debugpy # ms-python.debugpy
jnoortheen.nix-ide # jnoortheen.nix-ide
mkhl.direnv # mkhl.direnv
arrterian.nix-env-selector # arrterian.nix-env-selector
mvllow.rose-pine # mvllow.rose-pine
github.copilot # github.copilot
# github.copilot-chat # # github.copilot-chat
ms-vsliveshare.vsliveshare # ms-vsliveshare.vsliveshare
rust-lang.rust-analyzer # rust-lang.rust-analyzer
]; # ];
#
userSettings = { # userSettings = {
"editor.fontSize" = 16; # "editor.fontSize" = 16;
"editor.fontFamily" = "FiraCode Nerd Font"; # "editor.fontFamily" = "FiraCode Nerd Font";
"explorer.confirmDelete" = false; # "explorer.confirmDelete" = false;
"disable-hardware-acceleration" = true; # "disable-hardware-acceleration" = true;
"explorer.confirmDragAndDrop" = true; # "explorer.confirmDragAndDrop" = true;
"git.openRepositoryInParentFolders" = "never"; # "git.openRepositoryInParentFolders" = "never";
#
"[python]" = { # "[python]" = {
"editor.defaultFormatter" = "ms-python.black-formatter"; # "editor.defaultFormatter" = "ms-python.black-formatter";
"editor.formatOnSave" = true; # "editor.formatOnSave" = true;
}; # };
#
"nix.enableLanguageServer" = true; # "nix.enableLanguageServer" = true;
"nix.serverPath" = "${pkgs.nixd}/bin/nixd"; # "nix.serverPath" = "${pkgs.nixd}/bin/nixd";
"nix.serverSettings" = { # "nix.serverSettings" = {
"nixd" = { # "nixd" = {
"formatting" = { # "formatting" = {
"command" = ["${pkgs.nixpkgs-fmt}/bin/nixpkgs-fmt"]; # "command" = ["${pkgs.nixpkgs-fmt}/bin/nixpkgs-fmt"];
}; # };
"nixpkgs" = { # "nixpkgs" = {
"expr" = "import <nixpkgs> { }"; # "expr" = "import <nixpkgs> { }";
"options" = { # "options" = {
"nixos" = { # "nixos" = {
"expr" = ''(builtins.getFlake "/home/mike/.files").nixosConfigurations.zion.options''; # "expr" = ''(builtins.getFlake "/home/mike/.files").nixosConfigurations.zion.options'';
}; # };
}; # };
}; # };
}; # };
}; # };
#
"editor.formatOnSave" = true; # "editor.formatOnSave" = true;
#
"editor.fontLigatures" = true; # "editor.fontLigatures" = true;
"editor.formatOnPaste" = true; # "editor.formatOnPaste" = true;
"editor.minimap.enabled" = false; # "editor.minimap.enabled" = false;
#
# "symbols.hidesExplorerArrows" = false; # # "symbols.hidesExplorerArrows" = false;
#
"workbench.iconTheme" = "rose-pine-icons"; # "workbench.iconTheme" = "rose-pine-icons";
"workbench.colorTheme" = "Rosé Pine"; # "workbench.colorTheme" = "Rosé Pine";
"workbench.preferredDarkColorTheme" = "Rosé Pine"; # "workbench.preferredDarkColorTheme" = "Rosé Pine";
"workbench.preferredHighContrastColorTheme" = "Rosé Pine"; # "workbench.preferredHighContrastColorTheme" = "Rosé Pine";
}; # };
}; };
} }

View File

@@ -62,9 +62,18 @@
cachix cachix
lorri lorri
niv niv
nixd
nixfmt-classic nixfmt-classic
statix statix
vulnix
haskellPackages.dhall-nix haskellPackages.dhall-nix
# java
jdk
jdk8
jdk17
maven
gradle
tex-fmt
]; ];
} }

View File

@@ -7,8 +7,8 @@
services.xserver.videoDrivers = ["nvidia"]; services.xserver.videoDrivers = ["nvidia"];
boot = { boot = {
kernelModules = ["nvidia-uvm"]; kernelModules = ["nvidia" "nvidia-uvm"];
kernelParams = ["nvidia-drm.fbdev=1"]; kernelParams = ["nvidia-drm.fbdev=1" "nvidia-drm.modeset=1"];
}; };
hardware = { hardware = {
@@ -24,8 +24,8 @@
}; };
nvidia = { nvidia = {
package = config.boot.kernelPackages.nvidiaPackages.stable; package = config.boot.kernelPackages.nvidiaPackages.beta;
open = false; open = true;
nvidiaSettings = true; nvidiaSettings = true;

View File

@@ -118,6 +118,8 @@
source-han-sans source-han-sans
source-han-sans-japanese source-han-sans-japanese
source-han-serif-japanese source-han-serif-japanese
vistafonts
corefonts
]; ];
# Some programs need SUID wrappers, can be configured further or are # Some programs need SUID wrappers, can be configured further or are

View File

@@ -1,8 +1,4 @@
{ {config, ...}: {
config,
hostname,
...
}: {
boot = { boot = {
kernelModules = ["acpi_call"]; kernelModules = ["acpi_call"];
extraModulePackages = with config.boot.kernelPackages; [acpi_call]; extraModulePackages = with config.boot.kernelPackages; [acpi_call];
@@ -12,15 +8,9 @@
enable = true; enable = true;
settings = { settings = {
TLP_DEFAULT_MODE = TLP_DEFAULT_MODE = "BAT";
if hostname == "laptop"
then "BAT"
else "AC";
TLP_PERSISTENT_DEFAULT = TLP_PERSISTENT_DEFAULT = 0;
if hostname == "laptop"
then 0
else 1;
CPU_BOOST_ON_AC = 1; CPU_BOOST_ON_AC = 1;
CPU_BOOST_ON_BAT = 0; CPU_BOOST_ON_BAT = 0;

View File

@@ -78,7 +78,7 @@
owner = "eRgo35"; owner = "eRgo35";
repo = "dwm"; repo = "dwm";
rev = "main"; rev = "main";
hash = "sha256-Fq6FhrUYzQ6yiAAVstZkTZV6/80xIToZirDtJTBDRHQ="; hash = "sha256-1syRNBc/i8uSbJ4Kp/4+m8xnh5xkyY1eQvFf1/RXi2U=";
}; };
}; };
}; };

View File

@@ -29,12 +29,12 @@
../modules/ananicy.nix ../modules/ananicy.nix
../modules/bluetooth.nix ../modules/bluetooth.nix
../modules/boot.nix ../modules/boot.nix
../modules/configuration.nix ../modules/common.nix
../modules/development.nix ../modules/development.nix
../modules/distributed-builds.nix ../modules/distributed-builds.nix
../modules/fstrim.nix ../modules/fstrim.nix
../modules/gaming.nix ../modules/gaming.nix
../modules/greetd.nix # ../modules/greetd.nix
../modules/gsettings.nix ../modules/gsettings.nix
# ../modules/kde.nix # ../modules/kde.nix
# ../modules/lanzaboot.nix # ../modules/lanzaboot.nix
@@ -45,11 +45,14 @@
../modules/packages.nix ../modules/packages.nix
../modules/pipewire.nix ../modules/pipewire.nix
../modules/printing.nix ../modules/printing.nix
# ../modules/remote-builder.nix
../modules/security.nix ../modules/security.nix
../modules/ssh.nix ../modules/ssh.nix
# ../modules/steam.nix
../modules/tlp.nix ../modules/tlp.nix
../modules/users.nix ../modules/users.nix
../modules/vm.nix ../modules/vm.nix
../modules/xserver.nix
]; ];
networking.hostName = "thor"; networking.hostName = "thor";

View File

@@ -31,6 +31,7 @@
../modules/boot.nix ../modules/boot.nix
../modules/common.nix ../modules/common.nix
../modules/development.nix ../modules/development.nix
# ../modules/distributed-builds.nix
../modules/fstrim.nix ../modules/fstrim.nix
../modules/gaming.nix ../modules/gaming.nix
# ../modules/greetd.nix # ../modules/greetd.nix
@@ -48,6 +49,7 @@
../modules/security.nix ../modules/security.nix
../modules/ssh.nix ../modules/ssh.nix
../modules/steam.nix ../modules/steam.nix
# ../modules/tlp.nix
../modules/users.nix ../modules/users.nix
../modules/vm.nix ../modules/vm.nix
../modules/xserver.nix ../modules/xserver.nix