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";
inputs = {
nixpkgs.url = "nixpkgs/nixos-24.11";
nixpkgs-unstable.url = "nixpkgs/nixos-unstable";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
chaotic.url = "github:chaotic-cx/nyx/nyxpkgs-unstable";
nur.url = "github:nix-community/NUR";
nix-alien.url = "github:thiagokokada/nix-alien";

View File

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

View File

@@ -68,10 +68,48 @@ setxkbmap pl &
# xset s on &
# xset -dpms &
# xset s 900 &
xset +dpms &
xset dpms 1200 1800 2100 &
xset s on &
xset s 900 &
# Host-specific rules
if [ "$(hostname)" = "zion" ]; then
# Zion rules (Desktop)
# 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
# /usr/lib/mate-polkit/polkit-mate-authentication-agent-1 &

View File

@@ -22,8 +22,10 @@ HIGHLIGHT_HIGH=#524f67
# Function to 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}')
echo "^c$FOAM^CPU: $cpu_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)); }' \
<(grep 'cpu ' /proc/stat) <(sleep 1; grep 'cpu ' /proc/stat))
echo "^c$FOAM^CPU: $cpu_usage%"
}
# Function to get memory usage
@@ -66,16 +68,65 @@ get_volume() {
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
get_datetime() {
datetime=$(date +"%a %d %b %I:%M %p")
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
while true; do
# Combine all status components
status="$(get_volume) ^c$TEXT^| $(get_cpu_usage) ^c$TEXT^| $(get_memory_usage) ^c$TEXT^| $(get_datetime)"
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)"
fi
# Update the root window name with a darker background
xsetroot -name "$status"

View File

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

View File

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

View File

@@ -5,7 +5,7 @@
}: {
programs.direnv.enable = true;
programs.direnv.nix-direnv.enable = true;
home.packages = with pkgs; [
# > graphics < #
tuxpaint
@@ -50,18 +50,23 @@
okular
# > desktop < #
# firefox
firefox
httrack
# whatsapp-for-linux
telegram-desktop
google-chrome
chromium
# telegram-desktop
kotatogram-desktop
# google-chrome
# chromium
brave
evolution
obsidian
foliate
helio-workstation
# vesktop
equibop
inputs.zen-browser.packages."${system}".default
# inputs.zen-browser.packages."${system}".default
papers
# > gaming < #
prismlauncher

View File

@@ -13,62 +13,62 @@
]
);
extensions = with pkgs.vscode-extensions; [
ms-python.python
ms-python.debugpy
jnoortheen.nix-ide
mkhl.direnv
arrterian.nix-env-selector
mvllow.rose-pine
github.copilot
# github.copilot-chat
ms-vsliveshare.vsliveshare
rust-lang.rust-analyzer
];
userSettings = {
"editor.fontSize" = 16;
"editor.fontFamily" = "FiraCode Nerd Font";
"explorer.confirmDelete" = false;
"disable-hardware-acceleration" = true;
"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" = "rose-pine-icons";
"workbench.colorTheme" = "Rosé Pine";
"workbench.preferredDarkColorTheme" = "Rosé Pine";
"workbench.preferredHighContrastColorTheme" = "Rosé Pine";
};
# extensions = with pkgs.vscode-extensions; [
# ms-python.python
# ms-python.debugpy
# jnoortheen.nix-ide
# mkhl.direnv
# arrterian.nix-env-selector
# mvllow.rose-pine
# github.copilot
# # github.copilot-chat
# ms-vsliveshare.vsliveshare
# rust-lang.rust-analyzer
# ];
#
# userSettings = {
# "editor.fontSize" = 16;
# "editor.fontFamily" = "FiraCode Nerd Font";
# "explorer.confirmDelete" = false;
# "disable-hardware-acceleration" = true;
# "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" = "rose-pine-icons";
# "workbench.colorTheme" = "Rosé Pine";
# "workbench.preferredDarkColorTheme" = "Rosé Pine";
# "workbench.preferredHighContrastColorTheme" = "Rosé Pine";
# };
};
}

View File

@@ -6,7 +6,7 @@
...
}: let
hostname = "zion";
in {
in {
# ------------------------------------------------
# Needed Packages
# ------------------------------------------------

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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