- Removed the Stylix configuration from configuration.nix and created a new stylix.nix file for better organization.

- Enhanced ncli.nix to include generation information during NixOS rebuild and update commands.
- Updated niri.nix to include the new stylix module.
- Adjusted aliases to ensure correct path referencing.
- And some minor changes
This commit is contained in:
2025-11-26 11:14:22 +01:00
parent 74aa841812
commit a8a718a5ce
12 changed files with 700 additions and 56 deletions

View File

@ -12,34 +12,6 @@
{ inputs, config, pkgs, lib, username, host, version, system, ... }:
{
stylix = {
enable = false;
image = ../other/wallpaper2.png;
#autoEnable = true; #Auto generate theme based on wallpaper
base16Scheme = "${pkgs.base16-schemes}/share/themes/tokyo-night-moon.yaml";
opacity = {
desktop = 0.5;
terminal = 0.9;
};
fonts = {
monospace = {
package = pkgs.nerd-fonts.jetbrains-mono;
name = "JetBrainsMono Nerd Font";
};
sansSerif = {
package = pkgs.inter;
name = "Inter";
};
serif = {
package = pkgs.noto-fonts;
name = "Noto Serif";
};
};
targets.grub.enable = false;
};
# in configuration.nix
#Assign Swap to the PC
#swapDevices = [{
@ -52,7 +24,6 @@
inputs.home-manager.nixosModules.home-manager
inputs.grub2-themes.nixosModules.default
inputs.nix-flatpak.nixosModules.nix-flatpak
inputs.stylix.nixosModules.stylix
./hardware-configuration.nix
./firefox.nix

View File

@ -9,9 +9,9 @@
#./packages.nix
#./hardware-configuration.nix
../plasma/plasma.nix
../hyprland/hyprland.nix
../niri/niri.nix
#../plasma/plasma.nix
#../hyprland/hyprland.nix
#../niri/niri.nix
];
specialisation = {

View File

@ -35,9 +35,9 @@
enable = true;
settings = {
#Disabled Because of stylix
background_opacity = "0.2"; #The higher the value, the darker the console
background_opacity = lib.mkForce "0.2"; #The higher the value, the darker the console
background_blur = 10;
background_blur = lib.mkForce 10;
};
};

View File

@ -125,7 +125,8 @@ in
;;
rebuild)
handle_backups
echo "Starting NixOS rebuild for current host: $HOST"
geno=$(sudo nix-env --list-generations --profile /nix/var/nix/profiles/system | grep current | awk '{print $1}')
echo "Starting NixOS rebuild for current host: $HOST on generation: $geno"
cd "$HOME/$PROJECT" || { echo "Error: Could not change to $HOME/$PROJECT"; exit 1; }
current=""
@ -133,14 +134,17 @@ in
current=$(cat /etc/nixos-tags)
fi
if sudo nixos-rebuild switch --flake ".#$HOST"; then
if sudo nixos-rebuild switch --flake .; then
echo " Rebuild finished successfully for $HOST"
if [ -n "$current" ]; then
sudo /run/current-system/specialisation/$current/bin/switch-to-configuration switch
sudo /run/current-system/specialisation/$current/bin/switch-to-configuration test
else
echo "No specialization tag found, staying on default system."
fi
genn=$(sudo nix-env --list-generations --profile /nix/var/nix/profiles/system | grep current | awk '{print $1}')
echo "Running on new generation: $geno -> $genn"
else
echo " Rebuild failed for $HOST" >&2
@ -149,7 +153,8 @@ in
;;
update)
handle_backups
echo "Updating flake and rebuilding system for current host: $HOST"
geno=$(sudo nix-env --list-generations --profile /nix/var/nix/profiles/system | grep current | awk '{print $1}')
echo "Updating flake and rebuilding system for current host: $HOST on generation: $geno"
cd "$HOME/$PROJECT" || { echo "Error: Could not change to $HOME/$PROJECT"; exit 1; }
echo "Updating flake..."
@ -172,7 +177,7 @@ in
echo "Rebuilding system... Staying on current specialization"
fi
if sudo nixos-rebuild switch --flake ".#$HOST"; then
if sudo nixos-rebuild switch --flake .; then
echo " Update and rebuild finished successfully for $HOST"
if [ -n "$current" ]; then
@ -181,6 +186,9 @@ in
echo "No specialization tag found, staying on default system."
fi
genn=$(sudo nix-env --list-generations --profile /nix/var/nix/profiles/system | grep current | awk '{print $1}')
echo "Running on new generation: $geno -> $genn"
else
echo " Update and rebuild failed for $HOST" >&2
exit 1

View File

@ -34,6 +34,7 @@
plymouth
mesa
fprintd
nh
#Programming
#jetbrains.pycharm-community #The PyCharm IDE to edit Python code
@ -79,7 +80,6 @@
kdePackages.bluez-qt
moonlight-qt
kitty
tdrop
wmctrl #To Force windows into fullscreen
kdePackages.dolphin
persepolis #Download Manager

36
modules/stylix.nix Normal file
View File

@ -0,0 +1,36 @@
{ pkgs, inputs, ... }:
{
imports =
[
inputs.stylix.nixosModules.stylix
];
stylix = {
enable = true;
image = ../other/wallpaper2.png;
#autoEnable = true; #Auto generate theme based on wallpaper
base16Scheme = "${pkgs.base16-schemes}/share/themes/tokyo-night-moon.yaml";
opacity = {
desktop = 0.5;
terminal = 0.9;
};
fonts = {
monospace = {
package = pkgs.nerd-fonts.jetbrains-mono;
name = "JetBrainsMono Nerd Font";
};
sansSerif = {
package = pkgs.inter;
name = "Inter";
};
serif = {
package = pkgs.noto-fonts;
name = "Noto Serif";
};
};
targets.grub.enable = false;
};
}