Skip to content

Commit

Permalink
feat(NixOS)!: Upgrade to NixOS 24.05
Browse files Browse the repository at this point in the history
Some options renamed in configuration.nix. Also hyprland bug where you can't fullscreen on YouTube in Firefox or Firefox will break (hyprwm/Hyprland#6562)
  • Loading branch information
rsurasin committed Nov 11, 2024
1 parent 09aa9e1 commit 385b8b0
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 61 deletions.
100 changes: 50 additions & 50 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
description = "Rahul's NixOS config";

inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11";
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager/release-23.11";
url = "github:nix-community/home-manager/release-24.05";
inputs.nixpkgs.follows = "nixpkgs";
};
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
Expand Down Expand Up @@ -55,6 +55,7 @@
inherit user;
inherit pkgs;
inherit pkgs-unstable;
inherit inputs;
};
modules = [
./nixos/configuration.nix
Expand All @@ -68,6 +69,7 @@
inherit user;
inherit pkgs;
inherit pkgs-unstable;
inherit inputs;
};
home-manager.users.${user} = {
imports = [ ./nixos ];
Expand Down
24 changes: 15 additions & 9 deletions nixos/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).

{ config, pkgs, pkgs-unstable, user, ... }:
{ config, inputs, pkgs, pkgs-unstable, user, ... }:

{
imports =
Expand Down Expand Up @@ -86,22 +86,29 @@
enable = true;
wayland = true;
};
programs.hyprland.enable = true;
programs.hyprland = {
enable = true;
# Set the flake package
package = pkgs.hyprland;
# Set the portal package to make sure they are in sync - Screen Sharing
portalPackage = pkgs.xdg-desktop-portal-hyprland;
};
environment.sessionVariables.NIXOS_OZONE_WL = "1";
services.xserver.displayManager.defaultSession = "hyprland";
services.displayManager.defaultSession = "hyprland";

# Configure keymap in X11
services.xserver = {
services.xserver.xkb = {
layout = "us";
xkbVariant = "";
xkbOptions = "ctrl:nocaps"; # map caps to ctrl
variant = "";
options = "ctrl:nocaps"; # map caps to ctrl
};

# Intel GPU Settings
services.xserver.videoDrivers = [ "modesetting" ];
boot.blacklistedKernelModules = [ "nouveau" "nvidia" ];
hardware.opengl = {
enable = true;
#extraPackages = with inputs.hyprland.inputs.nixpkgs.legacyPackages.${pkgs.stdenv.hostPlatform.system}; [
extraPackages = with pkgs; [
intel-media-driver
vaapiVdpau
Expand Down Expand Up @@ -136,8 +143,8 @@
hardware.bluetooth.hsphfpd.enable = false;

# Enable touchpad support (enabled default in most desktopManager).
services.xserver.libinput.enable = true;
services.xserver.libinput.touchpad.naturalScrolling = true;
services.libinput.enable = true;
services.libinput.touchpad.naturalScrolling = true;

# Power Management - Framework Laptop
services.tlp.enable = true;
Expand Down Expand Up @@ -183,7 +190,6 @@
pkgs-unstable.wev # Wayland Event Viewer
pkgs-unstable.wl-clipboard # Copy/Paste Utilities
pkgs-unstable.wlr-randr # Output/Display Configuration Tool
pkgs-unstable.xdg-desktop-portal-hyprland # Screen Sharing
];

# Some programs need SUID wrappers, can be configured further or are
Expand Down

0 comments on commit 385b8b0

Please sign in to comment.