Add a stable branch to my flake.nix to still use broken packages if broken on unstable

This commit is contained in:
Zeph Levy 2025-11-16 15:20:41 +01:00
parent 6167e8af4a
commit 79d981ea73
3 changed files with 41 additions and 13 deletions

25
flake.lock generated
View file

@ -7,11 +7,11 @@
]
},
"locked": {
"lastModified": 1762964643,
"narHash": "sha256-RYHN8O/Aja59XDji6WSJZPkJpYVUfpSkyH+PEupBJqM=",
"lastModified": 1763228015,
"narHash": "sha256-1rYieMVUyZ3kK/cBIr8mOusxrOEJ1/+2MsOg0oJ7b3A=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "827f2a23373a774a8805f84ca5344654c31f354b",
"rev": "96156a9e86281c4bfc451236bc2ddfe4317e6f39",
"type": "github"
},
"original": {
@ -52,11 +52,28 @@
"type": "github"
}
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1763049705,
"narHash": "sha256-A5LS0AJZ1yDPTa2fHxufZN++n8MCmtgrJDtxFxrH4S8=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "3acb677ea67d4c6218f33de0db0955f116b7588c",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-25.05",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"home-manager": "home-manager",
"nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs"
"nixpkgs": "nixpkgs",
"nixpkgs-stable": "nixpkgs-stable"
}
}
},

View file

@ -3,6 +3,7 @@
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-25.05";
home-manager = {
url = "github:nix-community/home-manager";
@ -13,18 +14,26 @@
};
outputs =
{ nixpkgs, home-manager, nixos-hardware, ... }:
{ nixpkgs, nixpkgs-stable, home-manager, nixos-hardware, ... }:
let
system = "x86_64-linux";
in
{
nixosConfigurations.TARS = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
nixosConfigurations = {
TARS = nixpkgs.lib.nixosSystem {
inherit system;
modules = [
./nixos/configuration.nix
nixos-hardware.nixosModules.framework-amd-ai-300-series
];
specialArgs = {
pkgs-stable = nixpkgs-stable.legacyPackages.${system};
};
};
};
homeConfigurations.zeph = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages."x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
modules = [ ./home-manager/home.nix ];
};

View file

@ -1,5 +1,5 @@
{ pkgs, lib, config, ... }: {
environment.systemPackages = with pkgs; [
{ pkgs, pkgs-stable, lib, config, ... }: {
environment.systemPackages = (with pkgs; [
# Editors
helix
vim
@ -40,10 +40,8 @@
starship
home-manager
capitaine-cursors-themed
# adwaita-icon-theme
libsecret
lsd
# protonvpn-gui
wireguard-tools
# Internet
@ -67,7 +65,11 @@
hyprshot
mako
swayosd
];
])
++
(with pkgs-stable; [
protonvpn-gui
]);
# Unfree pkgs
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [