From 72acec33daa8047c0f518d0df113c725d199f841 Mon Sep 17 00:00:00 2001 From: Sayuop Date: Wed, 19 Nov 2025 20:52:12 +0100 Subject: [PATCH] Fixed Hyprland config errors for installation --- bootstrap.sh | 2 +- configuration.nix | 14 +++++++++----- flake.nix | 4 ++-- hardware-configuration.nix | 7 ------- home/home.nix | 18 +++++++++++------- home/hyprland.nix | 7 +------ modules/hyprland.nix | 22 +++++++++------------- modules/system.nix | 12 +++++------- 8 files changed, 38 insertions(+), 48 deletions(-) diff --git a/bootstrap.sh b/bootstrap.sh index 268b003..bde98af 100644 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -12,7 +12,7 @@ echo "" # Configuration variables GIT_REPO="https://git.cribdev.com/crib/nixos-config.git" CONFIG_DIR="$HOME/.config/nixos" -HOSTNAME=$(hostname) +HOSTNAME=$(cribnix) # Colors RED='\033[0;31m' diff --git a/configuration.nix b/configuration.nix index b9d6ddc..685fd50 100644 --- a/configuration.nix +++ b/configuration.nix @@ -7,12 +7,16 @@ ./modules/hyprland.nix ]; - # Bootloader - boot.loader.systemd-boot.enable = true; - boot.loader.efi.canTouchEfiVariables = true; + # Bootloader - BIOS/Legacy (for Proxmox with legacy BIOS) + boot.loader.grub.enable = true; + boot.loader.grub.device = "/dev/sda"; + + # If you're using UEFI instead, comment out above and use: + # boot.loader.systemd-boot.enable = true; + # boot.loader.efi.canTouchEfiVariables = true; # Networking - networking.hostName = "myhost"; # Change this to your hostname + networking.hostName = "cribnix"; # Change this to your hostname networking.networkmanager.enable = true; # Time zone @@ -38,7 +42,7 @@ # User account users.users.crib = { isNormalUser = true; - description = "Your Name"; + description = "crib"; extraGroups = [ "networkmanager" "wheel" "video" "audio" ]; shell = pkgs.zsh; }; diff --git a/flake.nix b/flake.nix index 52de2b8..a850770 100644 --- a/flake.nix +++ b/flake.nix @@ -15,7 +15,7 @@ outputs = { self, nixpkgs, home-manager, hyprland, ... }@inputs: { nixosConfigurations = { # Replace 'myhost' with your hostname - cribnix = nixpkgs.lib.nixosSystem { + myhost = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; specialArgs = { inherit inputs; }; modules = [ @@ -32,4 +32,4 @@ }; }; }; -} \ No newline at end of file +} diff --git a/hardware-configuration.nix b/hardware-configuration.nix index 6e70b89..2b684a0 100644 --- a/hardware-configuration.nix +++ b/hardware-configuration.nix @@ -29,13 +29,6 @@ swapDevices = [ ]; - # Enable GPU support (uncomment what matches your hardware) - # hardware.opengl.extraPackages = with pkgs; [ - # intel-media-driver # For Intel GPUs - # vaapiIntel # For Intel GPUs - # vaapiVdpau # For AMD/NVIDIA - # ]; - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; } diff --git a/home/home.nix b/home/home.nix index 6df6afb..873ab32 100644 --- a/home/home.nix +++ b/home/home.nix @@ -2,8 +2,8 @@ { # Home Manager needs a bit of information about you and the paths it should manage - home.username = "yourusername"; - home.homeDirectory = "/home/yourusername"; + home.username = "crib"; + home.homeDirectory = "/home/crib"; # Packages to install for this user home.packages = with pkgs; [ @@ -34,11 +34,15 @@ ./waybar.nix ]; - # Git configuration + # Git configuration (updated API) programs.git = { enable = true; - userName = "crib"; - userEmail = "haugseth.martin@gmail.com"; + settings = { + user = { + name = "Your Name"; + email = "your.email@example.com"; + }; + }; }; # ZSH configuration @@ -63,10 +67,10 @@ }; }; - # Kitty terminal configuration + # Kitty terminal configuration (updated API) programs.kitty = { enable = true; - theme = "Tokyo Night"; + themeFile = "tokyo_night_night"; font.name = "JetBrainsMono Nerd Font"; font.size = 12; settings = { diff --git a/home/hyprland.nix b/home/hyprland.nix index 53db17b..5d59406 100644 --- a/home/hyprland.nix +++ b/home/hyprland.nix @@ -41,11 +41,8 @@ gaps_in = 5; gaps_out = 10; border_size = 2; - "col.active_border" = "rgba(33ccffee) rgba(00ff99ee) 45deg"; - "col.inactive_border" = "rgba(595959aa)"; layout = "dwindle"; - allow_tearing = false; }; @@ -57,13 +54,11 @@ enabled = true; size = 3; passes = 1; - vibrancy = 0.1696; }; drop_shadow = true; shadow_range = 4; shadow_render_power = 3; - "col.shadow" = "rgba(1a1a1aee)"; }; # Animations @@ -89,7 +84,7 @@ }; master = { - new_status = "master"; + new_is_master = true; }; # Gestures diff --git a/modules/hyprland.nix b/modules/hyprland.nix index 4152233..8cfbd29 100644 --- a/modules/hyprland.nix +++ b/modules/hyprland.nix @@ -30,7 +30,7 @@ wl-clipboard # Clipboard utilities # File manager - thunar + xfce.thunar # Image viewer imv @@ -52,18 +52,12 @@ socat # Socket tools wlogout # Logout menu nwg-look # GTK theme config - qt5ct # Qt5 config - qt6ct # Qt6 config + libsForQt5.qt5ct # Qt5 config + kdePackages.qt6ct # Qt6 config ]; - # Enable XDG Desktop Portal for Hyprland - xdg.portal = { - enable = true; - extraPortals = with pkgs; [ - xdg-desktop-portal-hyprland - xdg-desktop-portal-gtk - ]; - }; + # XDG Desktop Portal is configured by Hyprland module + # No need to configure it again here # Security - for screen locking security.pam.services.hyprlock = {}; @@ -71,9 +65,11 @@ # Fonts for better UI fonts.packages = with pkgs; [ noto-fonts - noto-fonts-cjk + noto-fonts-cjk-sans noto-fonts-emoji font-awesome - (nerdfonts.override { fonts = [ "JetBrainsMono" "FiraCode" "DroidSansMono" ]; }) + nerd-fonts.jetbrains-mono + nerd-fonts.fira-code + nerd-fonts.droid-sans-mono ]; } diff --git a/modules/system.nix b/modules/system.nix index 2604e2d..8c75bc5 100644 --- a/modules/system.nix +++ b/modules/system.nix @@ -46,9 +46,8 @@ tree ]; - # Enable sound - sound.enable = true; - hardware.pulseaudio.enable = false; + # Enable sound with PipeWire (removed deprecated sound.enable) + services.pulseaudio.enable = false; security.rtkit.enable = true; services.pipewire = { enable = true; @@ -61,11 +60,10 @@ # Enable CUPS for printing services.printing.enable = true; - # Enable OpenGL - hardware.opengl = { + # Enable graphics (updated from hardware.opengl) + hardware.graphics = { enable = true; - driSupport = true; - driSupport32Bit = true; + enable32Bit = true; }; # Enable Bluetooth