Add stable nixpkgs. Use that for Calibre (python/qt is broken)

This commit is contained in:
Daniel Lundin 2024-10-14 09:21:25 +02:00
parent ad64ae1ecc
commit c9f5febd94
Signed by: dln
SSH key fingerprint: SHA256:dQy1Xj3UiqJYpKR5ggQ2bxgz4jCH8IF+k3AB8o0kmdI
6 changed files with 58 additions and 17 deletions

View file

@ -46,5 +46,7 @@
};
programs.nix-ld.enable = true;
environment.systemPackages = with pkgs; [ nvd ];
environment.systemPackages = with pkgs; [
nvd
];
}

View file

@ -21,10 +21,10 @@
"ghostty": {
"inputs": {
"nixpkgs-stable": [
"nixpkgs"
"nixpkgs-stable"
],
"nixpkgs-unstable": [
"nixpkgs"
"nixpkgs-unstable"
],
"zig": "zig"
},
@ -60,7 +60,7 @@
"home-manager": {
"inputs": {
"nixpkgs": [
"nixpkgs"
"nixpkgs-unstable"
]
},
"locked": {
@ -77,7 +77,23 @@
"type": "github"
}
},
"nixpkgs": {
"nixpkgs-stable": {
"locked": {
"lastModified": 1729044727,
"narHash": "sha256-GKJjtPY+SXfLF/yTN7M2cAnQB6RERFKnQhD8UvPSf3M=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "dc2e0028d274394f73653c7c90cc63edbb696be1",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-24.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1728888510,
"narHash": "sha256-nsNdSldaAyu6PE3YUA+YQLqUDJh+gRbBooMMekZJwvI=",
@ -98,7 +114,8 @@
"ghostty": "ghostty",
"ghostty-hm": "ghostty-hm",
"home-manager": "home-manager",
"nixpkgs": "nixpkgs"
"nixpkgs-stable": "nixpkgs-stable",
"nixpkgs-unstable": "nixpkgs-unstable"
}
},
"systems": {

View file

@ -2,16 +2,17 @@
description = "NixOS configuration";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-24.05";
home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
home-manager.inputs.nixpkgs.follows = "nixpkgs-unstable";
ghostty = {
url = "git+ssh://git@github.com/ghostty-org/ghostty";
inputs = {
nixpkgs-stable.follows = "nixpkgs";
nixpkgs-unstable.follows = "nixpkgs";
nixpkgs-stable.follows = "nixpkgs-stable";
nixpkgs-unstable.follows = "nixpkgs-unstable";
};
};
ghostty-hm.url = "github:clo4/ghostty-hm-module";
@ -20,17 +21,28 @@
outputs =
inputs@{
self,
nixpkgs,
nixpkgs-stable,
nixpkgs-unstable,
ghostty-hm,
home-manager,
...
}:
let
inherit (self) outputs;
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
pkgs = nixpkgs-unstable.legacyPackages.${system};
overlays-nixpkgs = final: prev: {
stable = import nixpkgs-stable {
inherit system;
config.allowUnfree = true;
};
unstable = import nixpkgs-unstable {
inherit system;
config.allowUnfree = true;
};
};
mkHome =
modules:
@ -42,13 +54,18 @@
modules = [
ghostty-hm.homeModules.default
./home/common
(
{ ... }:
{
nixpkgs.overlays = [ overlays-nixpkgs ];
}
)
] ++ modules;
};
mkHost =
modules:
nixpkgs.lib.nixosSystem {
inherit system;
nixpkgs-unstable.lib.nixosSystem {
specialArgs = {
inherit inputs outputs;
};

View file

@ -14,6 +14,7 @@
ldns
minio-client
nil
nix-output-monitor
nixd
nixfmt-rfc-style
nodejs_22

View file

@ -1,4 +1,8 @@
{ outputs, ... }:
{
pkgs,
outputs,
...
}:
{
nixpkgs = {
config.allowUnfree = true;

View file

@ -24,7 +24,7 @@
};
};
home.packages = with pkgs; [ calibre ];
home.packages = with pkgs; [ stable.calibre ];
programs.gpg.enable = true;