Compare commits

...

36 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
70e2a7f007 feat: added temp hyprland config 2025-01-05 20:21:49 +01:00
c893411fb8 feat: readded stylix 2025-01-05 19:57:48 +01:00
4aab349158 BREAKING-CHANGE: modified structure, hm is now standalone 2025-01-05 19:49:53 +01:00
33 changed files with 1059 additions and 568 deletions

693
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";
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";
@@ -42,7 +42,7 @@
}; };
home-manager = { home-manager = {
url = "github:nix-community/home-manager"; url = "github:nix-community/home-manager/release-24.11";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
@@ -52,7 +52,7 @@
}; };
stylix = { stylix = {
url = "github:danth/stylix"; url = "github:danth/stylix/release-24.11";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
}; };
@@ -60,7 +60,6 @@
outputs = { outputs = {
self, self,
nixpkgs, nixpkgs,
unstable,
home-manager, home-manager,
... ...
} @ inputs: let } @ inputs: let
@@ -75,42 +74,76 @@
in { in {
# Your custom packages # Your custom packages
# Accessible through 'nix build', 'nix shell', etc # Accessible through 'nix build', 'nix shell', etc
# packages = forAllSystems (system: import ./pkgs nixpkgs.legacyPackages.${system}); packages = forAllSystems (system: import ./pkgs nixpkgs.legacyPackages.${system});
# Formatter for your nix files, available through 'nix fmt' # Formatter for your nix files, available through 'nix fmt'
# Other options beside 'alejandra' include 'nixpkgs-fmt' # Other options beside 'alejandra' include 'nixpkgs-fmt'
formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.alejandra); formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.alejandra);
# Your custom packages and modifications, exported as overlays # Your custom packages and modifications, exported as overlays
overlays = import ./overlays {inherit inputs;}; 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 # NixOS configuration entrypoint
# Available through 'nixos-rebuild --flake .#hostname' # Available through 'nixos-rebuild --flake .#your-hostname'
nixosConfigurations = { nixosConfigurations = {
zion = nixpkgs.lib.nixosSystem { zion = nixpkgs.lib.nixosSystem {
modules = [./hosts]; specialArgs = {inherit inputs outputs;};
specialArgs = { modules = [
inherit inputs outputs; # > Our main nixos configuration file <
username = "mike"; ./hosts/zion/configuration.nix
hostname = "zion"; ];
};
}; };
thor = nixpkgs.lib.nixosSystem { thor = nixpkgs.lib.nixosSystem {
modules = [./hosts]; specialArgs = {inherit inputs outputs;};
specialArgs = { modules = [
inherit inputs outputs; # > Our main nixos configuration file <
username = "mike"; ./hosts/thor/configuration.nix
hostname = "thor"; ];
};
}; };
server = nixpkgs.lib.nixosSystem { server = nixpkgs.lib.nixosSystem {
modules = [./hosts]; specialArgs = {inherit inputs outputs;};
specialArgs = { modules = [
inherit inputs outputs; # > Our main nixos configuration file <
username = "mike"; ./hosts/server/configuration.nix
hostname = "server"; ];
}; };
};
# Standalone home-manager configuration entrypoint
# Available through 'home-manager --flake .#your-username@your-hostname'
homeConfigurations = {
"mike@zion" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance
extraSpecialArgs = {inherit inputs outputs;};
modules = [
# > Our main home-manager configuration file <
./home-manager/home.nix
];
};
"mike@thor" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance
extraSpecialArgs = {inherit inputs outputs;};
modules = [
# > Our main home-manager configuration file <
./home-manager/home.nix
];
};
"mike@server" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance
extraSpecialArgs = {inherit inputs outputs;};
modules = [
# > Our main home-manager configuration file <
./home-manager/home.nix
];
}; };
}; };
}; };

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
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 # 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

@@ -1,74 +1,95 @@
{hostname, ...}: { # This is your home-manager configuration file
imports = # Use this to configure your home environment (it replaces ~/.config/nixpkgs/home.nix)
if hostname == "zion" {
then [ inputs,
./programs/btop.nix outputs,
./programs/fastfetch.nix lib,
# ./programs/foot.nix config,
./programs/git.nix pkgs,
./programs/gpg.nix ...
./programs/helix.nix }: {
./programs/kitty.nix # You can import other home-manager modules here
./programs/neovide.nix imports = [
./programs/neovim.nix # If you want to use modules your own flake exports (from modules/home-manager):
./programs/packages.nix # outputs.homeManagerModules.example
./programs/shell.nix
./programs/tmux.nix
./programs/vscodium.nix
./dwm # Or modules exported from other flakes (such as nix-colors):
# ./programs/yazi.nix # inputs.nix-colors.homeManagerModules.default
# ./programs/zathura.nix
# ./configs/keys.nix # You can also split up your configuration and import pieces of it here:
# ./nvim.nix
./programs/btop.nix
./programs/fastfetch.nix
# ./programs/foot.nix
./programs/git.nix
./programs/gpg.nix
./programs/helix.nix
./programs/kitty.nix
./programs/neovide.nix
./programs/neovim.nix
./programs/packages.nix
./programs/shell.nix
./programs/tmux.nix
./programs/vscodium.nix
./system/dunst.nix ./dwm
./system/hypr.nix # ./programs/yazi.nix
./system/hyprland.nix # ./programs/zathura.nix
./system/rofi.nix
./system/stylix.nix
./system/theme.nix
./system/waybar.nix
./system/wlsunset.nix
./system/wofi.nix
]
else if hostname == "thor"
then [
./programs/btop.nix
./programs/fastfetch.nix
# ./programs/foot.nix
./programs/git.nix
./programs/gpg.nix
./programs/helix.nix
./programs/kitty.nix
./programs/neovide.nix
./programs/neovim.nix
./programs/packages.nix
./programs/shell.nix
./programs/tmux.nix
./programs/vscodium.nix
# ./programs/yazi.nix
# ./programs/zathura.nix
# ./configs/keys.nix # ./configs/keys.nix
./system/dunst.nix ./system/dunst.nix
./system/hyprland.nix # ./system/hypr.nix
./system/rofi.nix # ./system/hyprland.nix
./system/stylix.nix ./system/rofi.nix
./system/theme.nix ./system/stylix.nix
./system/waybar.nix ./system/theme.nix
./system/wlsunset.nix ./system/waybar.nix
./system/wofi.nix ./system/wlsunset.nix
] ./system/wofi.nix
else if hostname == "server" ];
then [
./programs/git.nix nixpkgs = {
./programs/btop.nix # You can add overlays here
./programs/yazi.nix overlays = [
./programs/shell.nix # Add overlays your own flake exports (from overlays and pkgs dir):
./programs/helix.nix outputs.overlays.additions
./programs/fastfetch.nix outputs.overlays.modifications
] outputs.overlays.unstable-packages
else [];
# 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;
};
};
home = {
username = "mike";
homeDirectory = "/home/mike";
};
# Add stuff for your user as you see fit:
# programs.neovim.enable = true;
# home.packages = with pkgs; [ steam ];
# Enable home-manager and git
programs.home-manager.enable = true;
programs.git.enable = true;
# Nicely reload system units when changing configs
systemd.user.startServices = "sd-switch";
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
home.stateVersion = "24.11";
} }

View File

@@ -5,7 +5,7 @@
}: { }: {
programs.direnv.enable = true; programs.direnv.enable = true;
programs.direnv.nix-direnv.enable = true; programs.direnv.nix-direnv.enable = true;
home.packages = with pkgs; [ home.packages = with pkgs; [
# > graphics < # # > graphics < #
tuxpaint tuxpaint
@@ -50,18 +50,23 @@
okular okular
# > desktop < # # > desktop < #
# firefox firefox
whatsapp-for-linux httrack
telegram-desktop # whatsapp-for-linux
google-chrome # telegram-desktop
chromium kotatogram-desktop
# 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

@@ -2,9 +2,11 @@
lib, lib,
pkgs, pkgs,
inputs, inputs,
hostname, config,
... ...
}: { }: let
hostname = "zion";
in {
# ------------------------------------------------ # ------------------------------------------------
# Needed Packages # Needed Packages
# ------------------------------------------------ # ------------------------------------------------

View File

@@ -66,19 +66,19 @@
monospace = { monospace = {
# package = pkgs.nerd-fonts.droid-sans-mono; # package = pkgs.nerd-fonts.droid-sans-mono;
package = pkgs.nerdfonts.override { fonts = [ "DroidSansMono" ]; }; package = pkgs.nerdfonts.override {fonts = ["DroidSansMono"];};
name = "DroidSansMono"; name = "DroidSansMono";
}; };
sansSerif = { sansSerif = {
# package = pkgs.nerd-fonts.droid-sans-mono; # package = pkgs.nerd-fonts.droid-sans-mono;
package = pkgs.nerdfonts.override { fonts = [ "DroidSansMono" ]; }; package = pkgs.nerdfonts.override {fonts = ["DroidSansMono"];};
name = "DroidSansMono"; name = "DroidSansMono";
}; };
serif = { serif = {
# package = pkgs.nerd-fonts.droid-sans-mono; # package = pkgs.nerd-fonts.droid-sans-mono;
package = pkgs.nerdfonts.override { fonts = [ "DroidSansMono" ]; }; package = pkgs.nerdfonts.override {fonts = ["DroidSansMono"];};
name = "DroidSansMono"; name = "DroidSansMono";
}; };
}; };

View File

@@ -1,82 +0,0 @@
{hostname, ...}: {
imports =
if hostname == "zion"
then [
./zion.nix
./modules/adb.nix
./modules/ananicy.nix
# ./modules/bluetooth.nix
./modules/boot.nix
./modules/configuration.nix
./modules/development.nix
./modules/fstrim.nix
./modules/gaming.nix
# ./modules/greetd.nix
./modules/gsettings.nix
# ./modules/kde.nix
# ./modules/lanzaboot.nix
./modules/network.nix
./modules/nh.nix
./modules/nvidia.nix
./modules/ollama.nix
./modules/packages.nix
./modules/pipewire.nix
./modules/printing.nix
./modules/remote-builder.nix
./modules/security.nix
./modules/ssh.nix
./modules/steam.nix
./modules/users.nix
./modules/vm.nix
./modules/xserver.nix
]
else if hostname == "thor"
then [
./thor.nix
./modules/adb.nix
./modules/ananicy.nix
./modules/bluetooth.nix
./modules/boot.nix
./modules/configuration.nix
./modules/development.nix
./modules/distributed-builds.nix
./modules/fstrim.nix
./modules/gaming.nix
./modules/greetd.nix
./modules/gsettings.nix
# ./modules/kde.nix
# ./modules/lanzaboot.nix
./modules/network.nix
./modules/nh.nix
# ./modules/nvidia.nix
./modules/ollama.nix
./modules/packages.nix
./modules/pipewire.nix
./modules/printing.nix
./modules/security.nix
./modules/ssh.nix
./modules/tlp.nix
./modules/users.nix
./modules/vm.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 [];
}

View File

@@ -1,14 +1,8 @@
{ {
pkgs, pkgs,
hostname,
inputs, inputs,
... ...
}: { }: {
imports =
if hostname == "zion"
then [inputs.chaotic.nixosModules.default]
else [];
boot = { boot = {
tmp.cleanOnBoot = true; tmp.cleanOnBoot = true;
@@ -22,13 +16,6 @@
}; };
}; };
kernelPackages = kernelPackages = pkgs.linuxPackages_zen;
if hostname == "zion"
then pkgs.linuxPackages_zen #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;
}; };
} }

View File

@@ -1,7 +1,9 @@
{ {
hostname, lib,
inputs, inputs,
outputs,
pkgs, pkgs,
config,
... ...
}: { }: {
time.timeZone = "Europe/Warsaw"; time.timeZone = "Europe/Warsaw";
@@ -33,10 +35,10 @@
libinput = { libinput = {
enable = true; enable = true;
mouse = { # mouse = {
accelProfile = "flat"; # accelProfile = "flat";
accelSpeed = "0.0"; # accelSpeed = "0.0";
}; # };
}; };
}; };
@@ -58,6 +60,24 @@
}; };
nixpkgs = { 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 ];
# });
# })
];
config = { config = {
# I'm sorry Richard Stallman # I'm sorry Richard Stallman
allowUnfree = true; allowUnfree = true;
@@ -73,19 +93,27 @@
nixos.enable = true; nixos.enable = true;
}; };
nix = { nix = let
flakeInputs = lib.filterAttrs (_: lib.isType "flake") inputs;
in {
daemonCPUSchedPolicy = "batch"; daemonCPUSchedPolicy = "batch";
channel.enable = false; channel.enable = false;
nixPath = ["nixpkgs=${inputs.nixpkgs}"]; # nixPath = ["nixpkgs=${inputs.nixpkgs}"];
optimise = { optimise = {
automatic = true; automatic = true;
dates = ["daily"]; dates = ["daily"];
}; };
# Opinionated: make flake registry and nix path match flake inputs
registry = lib.mapAttrs (_: flake: {inherit flake;}) flakeInputs;
nixPath = lib.mapAttrsToList (n: _: "${n}=flake:${n}") flakeInputs;
settings = { settings = {
auto-optimise-store = true; auto-optimise-store = true;
experimental-features = ["nix-command" "flakes"]; experimental-features = ["nix-command" "flakes"];
flake-registry = "";
nix-path = config.nix.nixPath;
substituters = [ substituters = [
"https://cache.nixos.org" "https://cache.nixos.org"

View File

@@ -4,7 +4,7 @@
rust-overlay, rust-overlay,
... ...
}: { }: {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs.unstable; [
# general # general
docker docker
docker-compose docker-compose
@@ -33,6 +33,7 @@
# # python # # python
# python311 # python311
# python311Packages.pip # python311Packages.pip
uv
# python311Packages.venvShellHook # python311Packages.venvShellHook
# cpp # cpp
@@ -61,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

@@ -1,9 +1,5 @@
{ {pkgs, ...}: {
pkgs, users.users.mike.packages = with pkgs; [heroic];
username,
...
}: {
users.users.${username}.packages = with pkgs; [heroic];
hardware.steam-hardware.enable = true; hardware.steam-hardware.enable = true;
programs = { programs = {

View File

@@ -1,9 +1,8 @@
{hostname, ...}: { {
boot.initrd.systemd.network.wait-online.enable = false; boot.initrd.systemd.network.wait-online.enable = false;
systemd.services.NetworkManager-wait-online.enable = false; systemd.services.NetworkManager-wait-online.enable = false;
networking = { networking = {
hostName = "${hostname}";
firewall.enable = true; firewall.enable = true;
stevenblack = { stevenblack = {

View File

@@ -1,7 +1,7 @@
{username, ...}: { {
programs.nh = { programs.nh = {
enable = true; enable = true;
flake = "/home/${username}/.files"; flake = "/home/mike/.files";
clean = { clean = {
enable = true; enable = true;
dates = "weekly"; dates = "weekly";

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

@@ -1,17 +1,15 @@
{ {
inputs, inputs,
username,
hostname,
pkgs, pkgs,
... ...
}: { }: {
imports = [inputs.home-manager.nixosModules.home-manager]; # imports = [inputs.home-manager.nixosModules.home-manager];
users.defaultUserShell = pkgs.zsh; users.defaultUserShell = pkgs.zsh;
users.users.${username} = { users.users.mike = {
isNormalUser = true; isNormalUser = true;
description = "${username}"; description = "mike";
extraGroups = [ extraGroups = [
"networkmanager" "networkmanager"
"wheel" "wheel"
@@ -22,19 +20,19 @@
]; ];
}; };
home-manager = { # home-manager = {
useGlobalPkgs = true; # useGlobalPkgs = true;
useUserPackages = true; # useUserPackages = true;
extraSpecialArgs = {inherit inputs username hostname;}; # extraSpecialArgs = {inherit inputs username hostname;};
#
users.${username} = { # users.${username} = {
imports = [../../home-manager/home.nix]; # imports = [../../home-manager/home.nix];
programs.home-manager.enable = true; # programs.home-manager.enable = true;
home = { # home = {
stateVersion = "24.05"; # stateVersion = "24.05";
username = "${username}"; # username = "${username}";
homeDirectory = "/home/${username}"; # homeDirectory = "/home/${username}";
}; # };
}; # };
}; # };
} }

View File

@@ -1,9 +1,4 @@
{ {pkgs, ...}: {
pkgs,
username,
...
}: {
users.users.${username}.extraGroups = ["libvirtd"];
boot.kernel.sysctl = {"vm.max_map_count" = 2147483642;}; boot.kernel.sysctl = {"vm.max_map_count" = 2147483642;};
# Install necessary packages # Install necessary packages

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

@@ -0,0 +1,43 @@
# This is your system's configuration file.
# Use this to configure your system environment (it replaces /etc/nixos/configuration.nix)
{
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
# Import your generated (nixos-generate-config) hardware configuration
./hardware-configuration.nix
../modules/common.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
];
networking.hostName = "server";
}

View File

@@ -0,0 +1,59 @@
# This is your system's configuration file.
# Use this to configure your system environment (it replaces /etc/nixos/configuration.nix)
{
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
# Import your generated (nixos-generate-config) hardware configuration
./hardware-configuration.nix
../modules/common.nix
../modules/adb.nix
../modules/ananicy.nix
../modules/bluetooth.nix
../modules/boot.nix
../modules/common.nix
../modules/development.nix
../modules/distributed-builds.nix
../modules/fstrim.nix
../modules/gaming.nix
# ../modules/greetd.nix
../modules/gsettings.nix
# ../modules/kde.nix
# ../modules/lanzaboot.nix
../modules/network.nix
../modules/nh.nix
# ../modules/nvidia.nix
../modules/ollama.nix
../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

@@ -0,0 +1,59 @@
# This is your system's configuration file.
# Use this to configure your system environment (it replaces /etc/nixos/configuration.nix)
{
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
# Import your generated (nixos-generate-config) hardware configuration
./hardware-configuration.nix
../modules/common.nix
../modules/adb.nix
../modules/ananicy.nix
# ../modules/bluetooth.nix
../modules/boot.nix
../modules/common.nix
../modules/development.nix
# ../modules/distributed-builds.nix
../modules/fstrim.nix
../modules/gaming.nix
# ../modules/greetd.nix
../modules/gsettings.nix
# ../modules/kde.nix
# ../modules/lanzaboot.nix
../modules/network.nix
../modules/nh.nix
../modules/nvidia.nix
../modules/ollama.nix
../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 = "zion";
}

View File

@@ -0,0 +1,6 @@
# Add your reusable home-manager modules to this directory, on their own file (https://nixos.wiki/wiki/Module).
# These should be stuff you would like to share with others, not your personal configurations.
{
# List your module files here
# my-module = import ./my-module.nix;
}

View File

@@ -0,0 +1,6 @@
# Add your reusable NixOS modules to this directory, on their own file (https://nixos.wiki/wiki/Module).
# These should be stuff you would like to share with others, not your personal configurations.
{
# List your module files here
# my-module = import ./my-module.nix;
}

View File

@@ -1,8 +1,7 @@
# This file defines overlays # This file defines overlays
{inputs, ...}: { {inputs, ...}: {
# This one brings our custom packages from the 'pkgs' directory # This one brings our custom packages from the 'pkgs' directory
additions = final: _prev: additions = final: _prev: import ../pkgs final.pkgs;
import ../pkgs {pkgs = final;};
# This one contains whatever you want to overlay # This one contains whatever you want to overlay
# You can change versions, add patches, set compilation flags, anything really. # You can change versions, add patches, set compilation flags, anything really.
@@ -13,23 +12,6 @@
# }); # });
}; };
# For every flake input, aliases 'pkgs.inputs.${flake}' to
# 'inputs.${flake}.packages.${pkgs.system}' or
# 'inputs.${flake}.legacyPackages.${pkgs.system}'
flake-inputs = final: _: {
inputs =
builtins.mapAttrs (
_: flake: let
legacyPackages = (flake.legacyPackages or {}).${final.system} or {};
packages = (flake.packages or {}).${final.system} or {};
in
if legacyPackages != {}
then legacyPackages
else packages
)
inputs;
};
# When applied, the unstable nixpkgs set (declared in the flake inputs) will # When applied, the unstable nixpkgs set (declared in the flake inputs) will
# be accessible through 'pkgs.unstable' # be accessible through 'pkgs.unstable'
unstable-packages = final: _prev: { unstable-packages = final: _prev: {

5
pkgs/default.nix Normal file
View File

@@ -0,0 +1,5 @@
# Custom packages, that can be defined similarly to ones from nixpkgs
# You can build them using 'nix build .#example'
pkgs: {
# example = pkgs.callPackage ./example { };
}