From 9f2358d529388b89e5db297f25779f7d62e5ddce Mon Sep 17 00:00:00 2001 From: Aly Raffauf Date: Thu, 23 May 2024 19:02:05 -0400 Subject: [PATCH] flake: move to 24.05 with optional unstable overlays --- README.md | 4 +- aly.nix | 3 +- flake.lock | 43 +++++---- flake.nix | 102 +++++++++++++++----- homeManagerModules/desktop/hypr/default.nix | 4 +- homeManagerModules/desktop/sway/default.nix | 7 +- nixosModules/desktop/hyprland/default.nix | 2 + nixosModules/desktop/sway/default.nix | 3 +- nixosModules/user/default.nix | 3 +- 9 files changed, 118 insertions(+), 53 deletions(-) diff --git a/README.md b/README.md index 6e404780..c838ac7c 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ NixOS flake for all of mine + my husband's hosts. Modules for Hyprland, Sway (wi | RAM | 32GB DDR5-5600Mhz | 16GB LPDDR5-5200Mhz | 16GB DDR3L-1600Mhz | | GPU | AMD Radeon 760M | Intel Iris Xe Graphics | Intel HD Graphics 4600 | | Storage | 1TB Sk hynix P41 | 512GB M.2 PCIe 4.0 | 512GB SATA SSD | -| OS | NixOS Unstable | NixOS Unstable | NixOS Unstable | +| OS | NixOS 24.05 | NixOS 24.05 | NixOS 24.05 | | Desktop | Sway | Sway | Sway | | Host | mossdeep | fallarbor | mauville | @@ -27,7 +27,7 @@ NixOS flake for all of mine + my husband's hosts. Modules for Hyprland, Sway (wi | RAM | 16GB LPDDR5 6400 MT/s | 16GB DDR4-3200Mhz | 16GB DDR4-3200Mhz | | GPU | AMD RDNA 2 | Intel Iris Xe Graphics | AMD Radeon Rx 6700 | | Storage | 512GB M.2 PCIe SSD | 512GB M.2 PCIe 3.0 | 1TB M.2 PCIe 3.0 | -| OS | NixOS Unstable | NixOS Unstable | NixOS Unstable | +| OS | NixOS 24.05 | NixOS 24.05 | NixOS 24.05 | | Desktop | Hyprland | Hyprland | Sway | ## Home Lab Services diff --git a/aly.nix b/aly.nix index ba993c1d..b50b15b5 100644 --- a/aly.nix +++ b/aly.nix @@ -3,6 +3,7 @@ config, pkgs, lib, + unstable, ... }: { imports = [./homeManagerModules]; @@ -20,7 +21,7 @@ gnome.file-roller google-chrome keepassxc - obsidian + unstable.obsidian python3 ruby trayscale diff --git a/flake.lock b/flake.lock index a83ee860..b057aaf4 100644 --- a/flake.lock +++ b/flake.lock @@ -36,26 +36,11 @@ }, "original": { "owner": "nix-community", - "ref": "master", + "ref": "release-24.05", "repo": "home-manager", "type": "github" } }, - "impermanence": { - "locked": { - "lastModified": 1708968331, - "narHash": "sha256-VUXLaPusCBvwM3zhGbRIJVeYluh2uWuqtj4WirQ1L9Y=", - "owner": "nix-community", - "repo": "impermanence", - "rev": "a33ef102a02ce77d3e39c25197664b7a636f9c30", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "impermanence", - "type": "github" - } - }, "jovian": { "inputs": { "nix-github-actions": "nix-github-actions", @@ -64,11 +49,11 @@ ] }, "locked": { - "lastModified": 1716274466, - "narHash": "sha256-upoklExLKqq6LiZTLkaVK5LcBdl/VIiW7kZ8g2vdqhw=", + "lastModified": 1716455390, + "narHash": "sha256-HZockBczLQPFqZMpxi0Xv/vxeqamJrSveFIRIpkiGrs=", "owner": "Jovian-Experiments", "repo": "Jovian-NixOS", - "rev": "3516515f04e8ab8339a5d1eefd8f051b00d7c362", + "rev": "e3f0e189e5ab4a28c51f84d5a052a39423ccc838", "type": "github" }, "original": { @@ -116,6 +101,22 @@ } }, "nixpkgs": { + "locked": { + "lastModified": 1716408587, + "narHash": "sha256-el71IUaQdEmntmd51GBpkJs/Hqh6S4dmfmUGP8GQaME=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "1a7abfa62e8a36f7f2dbe463722ed9ea31be5e43", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-24.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-unstable": { "locked": { "lastModified": 1716330097, "narHash": "sha256-8BO3B7e3BiyIDsaKA0tY8O88rClYRTjvAp66y+VBUeU=", @@ -135,10 +136,10 @@ "inputs": { "disko": "disko", "home-manager": "home-manager", - "impermanence": "impermanence", "jovian": "jovian", "nixos-hardware": "nixos-hardware", - "nixpkgs": "nixpkgs" + "nixpkgs": "nixpkgs", + "nixpkgs-unstable": "nixpkgs-unstable" } } }, diff --git a/flake.nix b/flake.nix index cc35d089..093685d5 100644 --- a/flake.nix +++ b/flake.nix @@ -2,21 +2,30 @@ description = "Aly's NixOS flake."; inputs = { - # Unstable NixOS channel. - nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + # Latest stable NixOS release. + nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05"; - # Home-manager, used for managing user configuration. + # Stable home-manager, synced with latest stable nixpkgs. home-manager = { - url = "github:nix-community/home-manager/master"; + url = "github:nix-community/home-manager/release-24.05"; inputs.nixpkgs.follows = "nixpkgs"; }; + # Unstable NixOS. + nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; + + # # Unstable version of home-manager. + # home-manager-unstable = { + # url = "github:nix-community/home-manager/master"; + # inputs.nixpkgs.follows = "nixpkgs-unstable"; + # }; + disko = { url = "github:nix-community/disko"; inputs.nixpkgs.follows = "nixpkgs"; }; - impermanence.url = "github:nix-community/impermanence"; + # impermanence.url = "github:nix-community/impermanence"; # Pre-baked hardware support for various devices. nixos-hardware.url = "github:NixOS/nixos-hardware/master"; @@ -36,32 +45,50 @@ outputs = inputs @ { nixpkgs, + nixpkgs-unstable, home-manager, nixos-hardware, - impermanence, disko, jovian, ... }: { formatter."x86_64-linux" = nixpkgs.legacyPackages."x86_64-linux".alejandra; homeConfigurations = { - aly = home-manager.lib.homeManagerConfiguration { + aly = home-manager.lib.homeManagerConfiguration rec { pkgs = import nixpkgs {system = "x86_64-linux";}; modules = [./aly.nix]; - extraSpecialArgs = inputs; + extraSpecialArgs = { + inherit inputs; + unstable = import nixpkgs-unstable { + system = "x86_64-linux"; + config.allowUnfree = true; + }; + }; }; - dustin = home-manager.lib.homeManagerConfiguration { + dustin = home-manager.lib.homeManagerConfiguration rec { pkgs = import nixpkgs {system = "x86_64-linux";}; modules = [./dustin.nix]; - extraSpecialArgs = inputs; + extraSpecialArgs = { + inherit inputs; + unstable = import nixpkgs-unstable { + system = "x86_64-linux"; + config.allowUnfree = true; + }; + }; }; }; nixosConfigurations = { # Steam Deck OLED - mossdeep = nixpkgs.lib.nixosSystem { + mossdeep = nixpkgs.lib.nixosSystem rec { system = "x86_64-linux"; - specialArgs = {inherit inputs;}; + specialArgs = { + inherit inputs; + unstable = import nixpkgs-unstable { + inherit system; + config.allowUnfree = true; + }; + }; modules = [ disko.nixosModules.disko jovian.nixosModules.default @@ -73,9 +100,15 @@ }; # Framework 13 with AMD Ryzen 7640U and 32GB RAM. - lavaridge = nixpkgs.lib.nixosSystem { + lavaridge = nixpkgs.lib.nixosSystem rec { system = "x86_64-linux"; - specialArgs = {inherit inputs;}; + specialArgs = { + inherit inputs; + unstable = import nixpkgs-unstable { + inherit system; + config.allowUnfree = true; + }; + }; modules = [ disko.nixosModules.disko nixos-hardware.nixosModules.framework-13-7040-amd @@ -86,9 +119,15 @@ }; # Framework 13 with 11th Gen Intel Core i5 and 16GB RAM. - fallarbor = nixpkgs.lib.nixosSystem { + fallarbor = nixpkgs.lib.nixosSystem rec { system = "x86_64-linux"; - specialArgs = {inherit inputs;}; + specialArgs = { + inherit inputs; + unstable = import nixpkgs-unstable { + inherit system; + config.allowUnfree = true; + }; + }; modules = [ disko.nixosModules.disko nixos-hardware.nixosModules.framework-11th-gen-intel @@ -99,9 +138,15 @@ }; # Home Lab. Ryzen 5 2600 with 16GB RAM, RX 6700. - mauville = nixpkgs.lib.nixosSystem { + mauville = nixpkgs.lib.nixosSystem rec { system = "x86_64-linux"; - specialArgs = {inherit inputs;}; + specialArgs = { + inherit inputs; + unstable = import nixpkgs-unstable { + inherit system; + config.allowUnfree = true; + }; + }; modules = [ nixos-hardware.nixosModules.common-pc-ssd nixos-hardware.nixosModules.common-cpu-amd @@ -112,9 +157,15 @@ }; # Lenovo Yoga 9i with i7-1360P and 16GB RAM. - petalburg = nixpkgs.lib.nixosSystem { + petalburg = nixpkgs.lib.nixosSystem rec { system = "x86_64-linux"; - specialArgs = {inherit inputs;}; + specialArgs = { + inherit inputs; + unstable = import nixpkgs-unstable { + inherit system; + config.allowUnfree = true; + }; + }; modules = [ disko.nixosModules.disko nixos-hardware.nixosModules.common-pc-laptop-ssd @@ -126,12 +177,17 @@ }; # T440p with i5-4210M and 16GB RAM. - rustboro = nixpkgs.lib.nixosSystem { + rustboro = nixpkgs.lib.nixosSystem rec { system = "x86_64-linux"; - specialArgs = {inherit inputs;}; + specialArgs = { + inherit inputs; + unstable = import nixpkgs-unstable { + inherit system; + config.allowUnfree = true; + }; + }; modules = [ disko.nixosModules.disko - impermanence.nixosModules.impermanence nixos-hardware.nixosModules.common-pc-laptop-ssd nixos-hardware.nixosModules.lenovo-thinkpad-t440p home-manager.nixosModules.home-manager diff --git a/homeManagerModules/desktop/hypr/default.nix b/homeManagerModules/desktop/hypr/default.nix index 3eb37b92..6673843e 100644 --- a/homeManagerModules/desktop/hypr/default.nix +++ b/homeManagerModules/desktop/hypr/default.nix @@ -3,7 +3,8 @@ lib, config, osConfig, - hyprland, + inputs, + unstable, ... }: { imports = [./hypridle ./hyprlock ./hyprpaper ./hyprshade]; @@ -60,6 +61,7 @@ }; wayland.windowManager.hyprland.enable = true; + wayland.windowManager.hyprland.package = unstable.hyprland; wayland.windowManager.hyprland.extraConfig = let modifier = "SUPER"; diff --git a/homeManagerModules/desktop/sway/default.nix b/homeManagerModules/desktop/sway/default.nix index a6ec9498..546fdffd 100644 --- a/homeManagerModules/desktop/sway/default.nix +++ b/homeManagerModules/desktop/sway/default.nix @@ -2,7 +2,8 @@ pkgs, lib, config, - osConfig, + inputs, + unstable, ... }: { imports = [./autoRotate.nix ./randomWallpaper.nix ./redShift.nix ./virtKeyboard.nix]; @@ -79,7 +80,7 @@ wayland.windowManager.sway.package = if config.alyraffauf.desktop.sway.tabletMode.enable then pkgs.sway - else pkgs.swayfx; + else unstable.swayfx; wayland.windowManager.sway.wrapperFeatures.gtk = true; wayland.windowManager.sway.checkConfig = false; @@ -492,7 +493,7 @@ bindswitch --reload --locked lid:off output eDP-1 enable ${ - if config.wayland.windowManager.sway.package == pkgs.swayfx + if config.wayland.windowManager.sway.package == unstable.swayfx then " blur enable blur_passes 1 diff --git a/nixosModules/desktop/hyprland/default.nix b/nixosModules/desktop/hyprland/default.nix index a95300e0..f261ea45 100644 --- a/nixosModules/desktop/hyprland/default.nix +++ b/nixosModules/desktop/hyprland/default.nix @@ -3,6 +3,7 @@ pkgs, lib, config, + unstable, ... }: { options = { @@ -28,6 +29,7 @@ gnupg.agent.pinentryPackage = pkgs.pinentry-gnome3; hyprland = { enable = true; + package = unstable.hyprland; }; }; }; diff --git a/nixosModules/desktop/sway/default.nix b/nixosModules/desktop/sway/default.nix index 320597e5..0baefa8c 100644 --- a/nixosModules/desktop/sway/default.nix +++ b/nixosModules/desktop/sway/default.nix @@ -3,6 +3,7 @@ pkgs, lib, config, + unstable, ... }: { options = { @@ -29,7 +30,7 @@ gnupg.agent.pinentryPackage = pkgs.pinentry-gnome3; sway = { enable = true; - package = pkgs.swayfx; + package = unstable.swayfx; }; }; }; diff --git a/nixosModules/user/default.nix b/nixosModules/user/default.nix index ebfa0c18..307a2c93 100644 --- a/nixosModules/user/default.nix +++ b/nixosModules/user/default.nix @@ -3,6 +3,7 @@ lib, config, inputs, + unstable, ... }: { imports = [./aly ./dustin]; @@ -10,7 +11,7 @@ home-manager = { useGlobalPkgs = true; useUserPackages = true; - extraSpecialArgs = inputs; + extraSpecialArgs = {inherit inputs; inherit unstable;}; backupFileExtension = "backup"; };