Update configuration.nix
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
############################################################
|
############################################################
|
||||||
# BOOTLOADER – GRUB (HYBRID BIOS + UEFI, REMOVABLE) test
|
# BOOTLOADER – GRUB (HYBRID BIOS + UEFI, REMOVABLE)
|
||||||
############################################################
|
############################################################
|
||||||
|
|
||||||
boot.loader.grub = {
|
boot.loader.grub = {
|
||||||
@@ -41,17 +41,12 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
############################################################
|
############################################################
|
||||||
# FIRMWARE – EQUIVALENT TO DEBIAN firmware-*
|
# FIRMWARE – FULL HARDWARE SUPPORT
|
||||||
############################################################
|
############################################################
|
||||||
|
|
||||||
# This replaces ALL of:
|
|
||||||
# firmware-linux, firmware-iwlwifi, firmware-realtek,
|
|
||||||
# firmware-amd-graphics, firmware-intel-sound, etc.
|
|
||||||
|
|
||||||
hardware.enableAllFirmware = true;
|
hardware.enableAllFirmware = true;
|
||||||
hardware.enableRedistributableFirmware = true;
|
hardware.enableRedistributableFirmware = true;
|
||||||
|
|
||||||
# CPU microcode (safe for USB systems)
|
|
||||||
hardware.cpu.intel.updateMicrocode = true;
|
hardware.cpu.intel.updateMicrocode = true;
|
||||||
hardware.cpu.amd.updateMicrocode = true;
|
hardware.cpu.amd.updateMicrocode = true;
|
||||||
|
|
||||||
@@ -70,7 +65,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
############################################################
|
############################################################
|
||||||
# NETWORKING / WIFI (DEBIAN NetworkManager EQUIVALENT)
|
# NETWORKING / LOCALE
|
||||||
############################################################
|
############################################################
|
||||||
|
|
||||||
networking.networkmanager.enable = true;
|
networking.networkmanager.enable = true;
|
||||||
@@ -80,7 +75,7 @@
|
|||||||
console.keyMap = "de";
|
console.keyMap = "de";
|
||||||
|
|
||||||
############################################################
|
############################################################
|
||||||
# BLUETOOTH (OPTIONAL BUT COMMON)
|
# BLUETOOTH
|
||||||
############################################################
|
############################################################
|
||||||
|
|
||||||
hardware.bluetooth.enable = true;
|
hardware.bluetooth.enable = true;
|
||||||
@@ -93,6 +88,7 @@
|
|||||||
services.xserver.enable = true;
|
services.xserver.enable = true;
|
||||||
services.xserver.displayManager.gdm.enable = true;
|
services.xserver.displayManager.gdm.enable = true;
|
||||||
services.xserver.desktopManager.gnome.enable = true;
|
services.xserver.desktopManager.gnome.enable = true;
|
||||||
|
|
||||||
services.xserver.xkb.layout = "de";
|
services.xserver.xkb.layout = "de";
|
||||||
services.xserver.libinput.enable = true;
|
services.xserver.libinput.enable = true;
|
||||||
|
|
||||||
@@ -159,20 +155,23 @@
|
|||||||
environment.etc."update-nixos-config.sh".text = ''
|
environment.etc."update-nixos-config.sh".text = ''
|
||||||
#!/run/current-system/sw/bin/bash
|
#!/run/current-system/sw/bin/bash
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
PATH="/run/current-system/sw/bin"
|
PATH="/run/current-system/sw/bin"
|
||||||
|
|
||||||
DIR="/var/lib/nixos-config"
|
DIR="/var/lib/nixos-config"
|
||||||
REPO="https://git.skarockoi.de/ska/nixos-production.git"
|
REPO="https://git.skarockoi.de/ska/nixos-production.git"
|
||||||
|
|
||||||
if [ ! -d "$DIR/.git" ]; then
|
if [ ! -d "$DIR/.git" ]; then
|
||||||
mkdir -p "$DIR"
|
mkdir -p "$DIR"
|
||||||
git clone "$REPO" "$DIR"
|
git clone "$REPO" "$DIR"
|
||||||
else
|
fi
|
||||||
|
|
||||||
cd "$DIR"
|
cd "$DIR"
|
||||||
git fetch origin
|
git fetch origin
|
||||||
|
|
||||||
if [ "$(git rev-parse HEAD)" != "$(git rev-parse origin/main)" ]; then
|
if [ "$(git rev-parse HEAD)" != "$(git rev-parse origin/main)" ]; then
|
||||||
git reset --hard origin/main
|
git reset --hard origin/main
|
||||||
nixos-rebuild switch || true
|
nixos-rebuild switch
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user