From c41b15e051c9729ba25273b38f99e5ee42570332 Mon Sep 17 00:00:00 2001 From: Aly Raffauf Date: Tue, 5 Mar 2024 17:54:51 -0500 Subject: [PATCH] moved to FlakeHub for tracking latest stable channels --- flake.lock | 74 ++++++++++++++++++++++++++---------------------------- flake.nix | 44 ++++++++++++++++---------------- 2 files changed, 58 insertions(+), 60 deletions(-) diff --git a/flake.lock b/flake.lock index b58513d7..37426077 100644 --- a/flake.lock +++ b/flake.lock @@ -6,6 +6,25 @@ "nixpkgs" ] }, + "locked": { + "lastModified": 1706981411, + "narHash": "sha256-cLbLPTL1CDmETVh4p0nQtvoF+FSEjsnJTFpTxhXywhQ=", + "rev": "652fda4ca6dafeb090943422c34ae9145787af37", + "revCount": 3175, + "type": "tarball", + "url": "https://api.flakehub.com/f/pinned/nix-community/home-manager/0.2311.3175%2Brev-652fda4ca6dafeb090943422c34ae9145787af37/018d7006-5e60-71db-b1f6-4c21ee3eb47e/source.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://flakehub.com/f/nix-community/home-manager/0.%2A.%2A.tar.gz" + } + }, + "home-manager-unstable": { + "inputs": { + "nixpkgs": [ + "nixpkgs-unstable" + ] + }, "locked": { "lastModified": 1709578243, "narHash": "sha256-hF96D+c2PBmAFhymMw3z8hou++lqKtZ7IzpFbYeL1/Y=", @@ -21,27 +40,6 @@ "type": "github" } }, - "home-manager-stable": { - "inputs": { - "nixpkgs": [ - "nixpkgs-stable" - ] - }, - "locked": { - "lastModified": 1706981411, - "narHash": "sha256-cLbLPTL1CDmETVh4p0nQtvoF+FSEjsnJTFpTxhXywhQ=", - "owner": "nix-community", - "repo": "home-manager", - "rev": "652fda4ca6dafeb090943422c34ae9145787af37", - "type": "github" - }, - "original": { - "owner": "nix-community", - "ref": "release-23.11", - "repo": "home-manager", - "type": "github" - } - }, "nix-flatpak": { "locked": { "lastModified": 1708268179, @@ -75,6 +73,20 @@ } }, "nixpkgs": { + "locked": { + "lastModified": 1709569716, + "narHash": "sha256-iOR44RU4jQ+YPGrn+uQeYAp7Xo7Z/+gT+wXJoGxxLTY=", + "rev": "617579a787259b9a6419492eaac670a5f7663917", + "revCount": 556422, + "type": "tarball", + "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.2311.556422%2Brev-617579a787259b9a6419492eaac670a5f7663917/018e0df2-b0f7-7a27-af1a-04150ef0f2c7/source.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://flakehub.com/f/NixOS/nixpkgs/%2A.tar.gz" + } + }, + "nixpkgs-unstable": { "locked": { "lastModified": 1709479366, "narHash": "sha256-n6F0n8UV6lnTZbYPl1A9q1BS0p4hduAv1mGAP17CVd0=", @@ -90,30 +102,14 @@ "type": "github" } }, - "nixpkgs-stable": { - "locked": { - "lastModified": 1709309926, - "narHash": "sha256-VZFBtXGVD9LWTecGi6eXrE0hJ/mVB3zGUlHImUs2Qak=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "79baff8812a0d68e24a836df0a364c678089e2c7", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixos-23.11", - "repo": "nixpkgs", - "type": "github" - } - }, "root": { "inputs": { "home-manager": "home-manager", - "home-manager-stable": "home-manager-stable", + "home-manager-unstable": "home-manager-unstable", "nix-flatpak": "nix-flatpak", "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs", - "nixpkgs-stable": "nixpkgs-stable" + "nixpkgs-unstable": "nixpkgs-unstable" } } }, diff --git a/flake.nix b/flake.nix index 758bf78a..9bce02a4 100644 --- a/flake.nix +++ b/flake.nix @@ -2,44 +2,46 @@ description = "Aly's NixOS configuration."; inputs = { - # Unstable NixOS channel. - nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; - - # Release NixOS channel. - nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-23.11"; - - # Declarative Flatpaks. - nix-flatpak.url = "github:gmodena/nix-flatpak/?ref=v0.3.0"; + # Latest Stable NixOS, tracked by FlakeHub. + nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/*.tar.gz"; # Home-manager, used for managing user configuration. + # Tracks latest stable version using FlakeHub. home-manager = { - url = "github:nix-community/home-manager/master"; + url = "https://flakehub.com/f/nix-community/home-manager/0.*.*.tar.gz"; # The `follows` keyword in inputs is used for inheritance. # Here, `inputs.nixpkgs` of home-manager is kept consistent with # the `inputs.nixpkgs` of the current flake, # to avoid problems caused by different versions of nixpkgs. inputs.nixpkgs.follows = "nixpkgs"; }; - # Home-manager, used for managing user configuration. - home-manager-stable = { - url = "github:nix-community/home-manager/release-23.11"; + + # Unstable NixOS channel. + nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; + + # Home-manager, used for managing user configuration. + home-manager-unstable = { + url = "github:nix-community/home-manager/master"; # The `follows` keyword in inputs is used for inheritance. # Here, `inputs.nixpkgs` of home-manager is kept consistent with # the `inputs.nixpkgs` of the current flake, # to avoid problems caused by different versions of nixpkgs. - inputs.nixpkgs.follows = "nixpkgs-stable"; + inputs.nixpkgs.follows = "nixpkgs-unstable"; }; + + # Declarative Flatpaks. + nix-flatpak.url = "github:gmodena/nix-flatpak/?ref=v0.3.0"; # Pre-baked hardware support for various devices. nixos-hardware.url = "github:NixOS/nixos-hardware/master"; }; - outputs = inputs@{ nixpkgs, nixpkgs-stable, nix-flatpak, home-manager, home-manager-stable, nixos-hardware, ... }: { + outputs = inputs@{ nixpkgs, home-manager, nixpkgs-unstable, home-manager-unstable, nix-flatpak, nixos-hardware, ... }: { nixosConfigurations = { # T440p with i5-4210M and 16GB RAM. - rustboro = nixpkgs.lib.nixosSystem { + rustboro = nixpkgs-unstable.lib.nixosSystem { system = "x86_64-linux"; modules = [ ./hosts/rustboro @@ -55,7 +57,7 @@ nix-flatpak.nixosModules.nix-flatpak # Add home-manager nixos module so home-manager config deploys on nixos-rebuild. - home-manager.nixosModules.home-manager { + home-manager-unstable.nixosModules.home-manager { home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; home-manager.users.aly = import ./home/aly; @@ -67,7 +69,7 @@ }; # Lenovo Yoga 9i with i7-1360P and 16GB RAM. - petalburg = nixpkgs.lib.nixosSystem { + petalburg = nixpkgs-unstable.lib.nixosSystem { system = "x86_64-linux"; modules = [ ./hosts/petalburg @@ -83,7 +85,7 @@ nix-flatpak.nixosModules.nix-flatpak # Add home-manager nixos module so home-manager config deploys on nixos-rebuild. - home-manager.nixosModules.home-manager { + home-manager-unstable.nixosModules.home-manager { home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; home-manager.users.aly = import ./home/aly; @@ -94,7 +96,7 @@ }; # Ryzen 5 2600 with 16GB RAM, RX 6700. - mauville = nixpkgs.lib.nixosSystem { + mauville = nixpkgs-unstable.lib.nixosSystem { system = "x86_64-linux"; modules = [ ./hosts/mauville @@ -110,7 +112,7 @@ nix-flatpak.nixosModules.nix-flatpak # Add home-manager nixos module so home-manager config deploys on nixos-rebuild. - home-manager.nixosModules.home-manager { + home-manager-unstable.nixosModules.home-manager { home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; home-manager.users.aly = import ./home/aly; @@ -121,7 +123,7 @@ packages.x86_64-linux.default = home-manager.defaultPackage.x86_64-linux; homeConfigurations.aly = home-manager.lib.homeManagerConfiguration { - pkgs = import nixpkgs { + pkgs = import nixpkgs-unstable { system = "x86_64-linux"; config = { allowUnfree = true;