From c62acaa77fabfc263a76c55ed0713d7b8cd13b65 Mon Sep 17 00:00:00 2001 From: marc Date: Tue, 3 Dec 2024 15:22:42 +0100 Subject: [PATCH] Upgrade nix to 24.11 --- config/alacritty/alacritty.toml | 1 + flake.lock | 149 +++++++++++++++++++++++++++----- flake.nix | 7 +- modules/common.nix | 4 +- modules/desktop/desktop.nix | 8 +- modules/desktop/hyprland.nix | 11 ++- modules/system/nvidia.nix | 22 +++-- 7 files changed, 160 insertions(+), 42 deletions(-) diff --git a/config/alacritty/alacritty.toml b/config/alacritty/alacritty.toml index a66d8f5..10dd01d 100644 --- a/config/alacritty/alacritty.toml +++ b/config/alacritty/alacritty.toml @@ -1,3 +1,4 @@ +[general] import = ["~/.config/alacritty/theme.toml"] [font] diff --git a/flake.lock b/flake.lock index 3b93647..6b22add 100644 --- a/flake.lock +++ b/flake.lock @@ -45,11 +45,11 @@ "nixpkgs-stable": "nixpkgs-stable" }, "locked": { - "lastModified": 1733043608, - "narHash": "sha256-00uyKJEgix+TuIvEwH18SCXYXU9VDhRh3Kjxf9xrWgA=", + "lastModified": 1733127808, + "narHash": "sha256-UJUFsa1jmYSgAhrii1HVEl//ggT3Nzaw6kDN6TnkGXM=", "owner": "nix-community", "repo": "emacs-overlay", - "rev": "4ebaf4d0b6b8ab9bacd57f5db199da2d76eea8da", + "rev": "51d6aafb5e3bbf10a29bd8ff417b617e35b14d0e", "type": "github" }, "original": { @@ -86,20 +86,62 @@ ] }, "locked": { - "lastModified": 1726989464, - "narHash": "sha256-Vl+WVTJwutXkimwGprnEtXc/s/s8sMuXzqXaspIGlwM=", + "lastModified": 1733050161, + "narHash": "sha256-lYnT+EYE47f5yY3KS/Kd4pJ6CO9fhCqumkYYkQ3TK20=", "owner": "nix-community", "repo": "home-manager", - "rev": "2f23fa308a7c067e52dfcc30a0758f47043ec176", + "rev": "62d536255879be574ebfe9b87c4ac194febf47c5", "type": "github" }, "original": { "owner": "nix-community", - "ref": "release-24.05", + "ref": "release-24.11", "repo": "home-manager", "type": "github" } }, + "hyprcursor-rose-pine": { + "inputs": { + "hyprlang": "hyprlang", + "nixpkgs": "nixpkgs_2", + "utils": "utils" + }, + "locked": { + "lastModified": 1718180692, + "narHash": "sha256-J5IYvKcdGRL/sBuST5WaoESEIl7KPv8aJK8aLY6C91E=", + "owner": "ndom91", + "repo": "rose-pine-hyprcursor", + "rev": "40ce26cb29206722ff73839ead0d871d94751e90", + "type": "github" + }, + "original": { + "owner": "ndom91", + "repo": "rose-pine-hyprcursor", + "type": "github" + } + }, + "hyprlang": { + "inputs": { + "nixpkgs": [ + "hyprcursor-rose-pine", + "nixpkgs" + ], + "systems": "systems_2" + }, + "locked": { + "lastModified": 1709914708, + "narHash": "sha256-bR4o3mynoTa1Wi4ZTjbnsZ6iqVcPGriXp56bZh5UFTk=", + "owner": "hyprwm", + "repo": "hyprlang", + "rev": "a685493fdbeec01ca8ccdf1f3655c044a8ce2fe2", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprlang", + "type": "github" + } + }, "nix-colors": { "inputs": { "base16-schemes": "base16-schemes", @@ -121,11 +163,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1732837521, - "narHash": "sha256-jNRNr49UiuIwaarqijgdTR2qLPifxsVhlJrKzQ8XUIE=", + "lastModified": 1733015953, + "narHash": "sha256-t4BBVpwG9B4hLgc6GUBuj3cjU7lP/PJfpTHuSqE+crk=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "970e93b9f82e2a0f3675757eb0bfc73297cc6370", + "rev": "ac35b104800bff9028425fec3b6e8a41de2bbfff", "type": "github" }, "original": { @@ -152,11 +194,11 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1732824227, - "narHash": "sha256-fYNXgpu1AEeLyd3fQt4Ym0tcVP7cdJ8wRoqJ+CtTRyY=", + "lastModified": 1732981179, + "narHash": "sha256-F7thesZPvAMSwjRu0K8uFshTk3ZZSNAsXTIFvXBT+34=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "c71ad5c34d51dcbda4c15f44ea4e4aa6bb6ac1e9", + "rev": "62c435d93bf046a5396f3016472e8f7c8e2aed65", "type": "github" }, "original": { @@ -168,27 +210,43 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1733016324, - "narHash": "sha256-8qwPSE2g1othR1u4uP86NXxm6i7E9nHPyJX3m3lx7Q4=", + "lastModified": 1710272261, + "narHash": "sha256-g0bDwXFmTE7uGDOs9HcJsfLFhH7fOsASbAuOzDC+fhQ=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "0ad13a6833440b8e238947e47bea7f11071dc2b2", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { + "locked": { + "lastModified": 1732981179, + "narHash": "sha256-F7thesZPvAMSwjRu0K8uFshTk3ZZSNAsXTIFvXBT+34=", "owner": "nixos", "repo": "nixpkgs", - "rev": "7e1ca67996afd8233d9033edd26e442836cc2ad6", + "rev": "62c435d93bf046a5396f3016472e8f7c8e2aed65", "type": "github" }, "original": { "owner": "nixos", - "ref": "nixos-24.05", + "ref": "nixos-24.11", "repo": "nixpkgs", "type": "github" } }, "nur": { "locked": { - "lastModified": 1733060776, - "narHash": "sha256-fMPYWzojb0rzplG3HnP2eS3fpquu5U58tcKAr2taZxQ=", + "lastModified": 1733136078, + "narHash": "sha256-F+gLv1YTOfP5BP0kHPEOLtrJWL1s3XGoaBhfwDsndNw=", "owner": "nix-community", "repo": "NUR", - "rev": "0cccbcb30ee67c0b28c67ae33486118031a82b09", + "rev": "aadc32a2305cd303d1866be1d500ad6f7b344b82", "type": "github" }, "original": { @@ -202,8 +260,9 @@ "agenix": "agenix", "emacs-overlay": "emacs-overlay", "home-manager": "home-manager_2", + "hyprcursor-rose-pine": "hyprcursor-rose-pine", "nix-colors": "nix-colors", - "nixpkgs": "nixpkgs_2", + "nixpkgs": "nixpkgs_3", "nur": "nur" } }, @@ -221,6 +280,54 @@ "repo": "default", "type": "github" } + }, + "systems_2": { + "locked": { + "lastModified": 1689347949, + "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", + "owner": "nix-systems", + "repo": "default-linux", + "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default-linux", + "type": "github" + } + }, + "systems_3": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "utils": { + "inputs": { + "systems": "systems_3" + }, + "locked": { + "lastModified": 1710146030, + "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index cd2adbc..8447a48 100644 --- a/flake.nix +++ b/flake.nix @@ -4,10 +4,10 @@ inputs = { # - Nixpkgs ---------------------------------- - nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05"; + nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11"; # - Home Manager ----------------------------- - home-manager.url = "github:nix-community/home-manager/release-24.05"; + home-manager.url = "github:nix-community/home-manager/release-24.11"; home-manager.inputs.nixpkgs.follows = "nixpkgs"; # - Agenix ----------------------------------- @@ -24,6 +24,9 @@ # - Themeing --------------------------------- nix-colors.url = "github:misterio77/nix-colors"; + + # - Hyprland --------------------------------- + hyprcursor-rose-pine.url = "github:ndom91/rose-pine-hyprcursor"; }; outputs = inputs @ { self, nixpkgs, home-manager, ... }: diff --git a/modules/common.nix b/modules/common.nix index ea31992..1312ce3 100644 --- a/modules/common.nix +++ b/modules/common.nix @@ -11,9 +11,9 @@ system.stateVersion = "22.05"; nix = { - package = pkgs.nixFlakes; + package = pkgs.nixVersions.stable; - extraOptions = lib.optionalString (config.nix.package == pkgs.nixFlakes) + extraOptions = lib.optionalString (config.nix.package == pkgs.nixVersions.stable) "experimental-features = nix-command flakes"; gc = { diff --git a/modules/desktop/desktop.nix b/modules/desktop/desktop.nix index 823e07d..e1df891 100644 --- a/modules/desktop/desktop.nix +++ b/modules/desktop/desktop.nix @@ -34,13 +34,9 @@ in # - Audio ------------------------------------ - sound.enable = true; - - hardware = { - pulseaudio = { + services = { + pipewire = { enable = true; - support32Bit = true; - package = pkgs.pulseaudioFull; }; }; diff --git a/modules/desktop/hyprland.nix b/modules/desktop/hyprland.nix index b4b2b8a..0e04e46 100644 --- a/modules/desktop/hyprland.nix +++ b/modules/desktop/hyprland.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, ... }: +{ inputs, config, lib, pkgs, ... }: let cfg = config.samfelag.modules.desktop.hyprland; @@ -19,8 +19,11 @@ in { config = lib.mkIf cfg.enable { environment.systemPackages = with pkgs; [ + # Cursor + inputs.hyprcursor-rose-pine.packages.${pkgs.system}.default # Wallpaper hyprpaper + # Greeter greetd.gtkgreet cage ]; @@ -94,6 +97,10 @@ in { layout = "hy3"; }; + env = [ + "HYPRCURSOR_THEME,rose-pine-hyprcursor" + ]; + input = { kb_layout = cfg.kb_layout; }; @@ -174,7 +181,7 @@ in { ", XF86AudioStop, exec, playerctl stop" # - Keyboard --------------------------- - "${cfg.mod}, Escape, exec, hyprctl switchxkblayout kanata next" + "${cfg.mod}, Escape, exec, hyprctl switchxkblayout current next" ] ++ cfg.extraKeybindings; diff --git a/modules/system/nvidia.nix b/modules/system/nvidia.nix index cad3fb6..872494b 100644 --- a/modules/system/nvidia.nix +++ b/modules/system/nvidia.nix @@ -23,17 +23,21 @@ in services.xserver.videoDrivers = [ "nvidia" ]; - hardware.opengl.enable = true; - hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.stable; + hardware = { + graphics.enable = true; + nvidia = { + package = config.boot.kernelPackages.nvidiaPackages.stable; + open = true; + prime = { + offload.enable = true; - hardware.nvidia.prime = { - offload.enable = true; + # Bus ID of the Intel GPU. You can find it using lspci, either under 3D or VGA + intelBusId = cfg.intelBusId; - # Bus ID of the Intel GPU. You can find it using lspci, either under 3D or VGA - intelBusId = cfg.intelBusId; - - # Bus ID of the NVIDIA GPU. You can find it using lspci, either under 3D or VGA - nvidiaBusId = cfg.nvidiaBusId; + # Bus ID of the NVIDIA GPU. You can find it using lspci, either under 3D or VGA + nvidiaBusId = cfg.nvidiaBusId; + }; + }; }; }; }