mirror of
https://github.com/eRgo35/nix-config.git
synced 2026-02-04 22:46:12 +01:00
Compare commits
36 Commits
e0d676b63d
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 9b18c146ca | |||
| 7028adda9f | |||
| 716eaa17d4 | |||
| c6e3be2b21 | |||
| b41556e49e | |||
| d3de11cb35 | |||
| 99daf9c58a | |||
| e82bd4f4dc | |||
| c093d8ee00 | |||
| ca979091dc | |||
| bbb753d81d | |||
| 228f91da74 | |||
| a23e1dbe3c | |||
| 4b125c5802 | |||
| 3a8fa615f9 | |||
| 8a5f705a96 | |||
| a6a5876a23 | |||
| a1241fd833 | |||
| b1da20e832 | |||
| 9fa2da65f3 | |||
| 3aa43f8a07 | |||
| edc6aecb09 | |||
| 38c84946c5 | |||
| 11d3b28513 | |||
| e375c19c7d | |||
| e2886da8d6 | |||
| 1d68abb4c5 | |||
| 6189e52e4d | |||
| c57a67a6d0 | |||
| b7d8c84b4b | |||
| 3b2cbc6e04 | |||
| 7c030a594b | |||
| 6be617f26a | |||
| 70e2a7f007 | |||
| c893411fb8 | |||
| 4aab349158 |
693
flake.lock
generated
693
flake.lock
generated
File diff suppressed because it is too large
Load Diff
83
flake.nix
83
flake.nix
@@ -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
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -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";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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 &
|
||||||
|
|||||||
@@ -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"
|
||||||
|
|||||||
@@ -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 = {
|
||||||
|
|||||||
@@ -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";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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";
|
||||||
};
|
# };
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,9 +2,11 @@
|
|||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
inputs,
|
inputs,
|
||||||
hostname,
|
config,
|
||||||
...
|
...
|
||||||
}: {
|
}: let
|
||||||
|
hostname = "zion";
|
||||||
|
in {
|
||||||
# ------------------------------------------------
|
# ------------------------------------------------
|
||||||
# Needed Packages
|
# Needed Packages
|
||||||
# ------------------------------------------------
|
# ------------------------------------------------
|
||||||
|
|||||||
@@ -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";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -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 [];
|
|
||||||
}
|
|
||||||
@@ -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;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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"
|
||||||
@@ -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
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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 = {
|
||||||
|
|||||||
@@ -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 = {
|
||||||
|
|||||||
@@ -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";
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
@@ -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}";
|
||||||
};
|
# };
|
||||||
};
|
# };
|
||||||
};
|
# };
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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=";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
43
hosts/server/configuration.nix
Normal file
43
hosts/server/configuration.nix
Normal 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";
|
||||||
|
}
|
||||||
59
hosts/thor/configuration.nix
Normal file
59
hosts/thor/configuration.nix
Normal 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";
|
||||||
|
}
|
||||||
59
hosts/zion/configuration.nix
Normal file
59
hosts/zion/configuration.nix
Normal 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";
|
||||||
|
}
|
||||||
6
modules/home-manager/default.nix
Normal file
6
modules/home-manager/default.nix
Normal 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;
|
||||||
|
}
|
||||||
6
modules/nixos/default.nix
Normal file
6
modules/nixos/default.nix
Normal 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;
|
||||||
|
}
|
||||||
@@ -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
5
pkgs/default.nix
Normal 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 { };
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user