From 2297667eb64e20d69f53e0488e5433b6092cebcc Mon Sep 17 00:00:00 2001 From: buffet Date: Tue, 2 May 2023 13:50:13 +0200 Subject: [PATCH] feat(anki): use unstable anki --- fanya.nix | 3 ++- flake.lock | 17 +++++++++++++++++ flake.nix | 14 +++++++++++--- system.nix | 7 +++++-- 4 files changed, 35 insertions(+), 6 deletions(-) diff --git a/fanya.nix b/fanya.nix index b025298..0be5a57 100644 --- a/fanya.nix +++ b/fanya.nix @@ -36,7 +36,8 @@ in { }; packages = with pkgs; [ - anki-bin + unstable.anki + cargo cargo-crev cargo-limit diff --git a/flake.lock b/flake.lock index 8c65725..281831f 100644 --- a/flake.lock +++ b/flake.lock @@ -176,6 +176,22 @@ "type": "github" } }, + "nixpkgs-unstable": { + "locked": { + "lastModified": 1682879489, + "narHash": "sha256-sASwo8gBt7JDnOOstnps90K1wxmVfyhsTPPNTGBPjjg=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "da45bf6ec7bbcc5d1e14d3795c025199f28e0de0", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "nur": { "locked": { "lastModified": 1682970362, @@ -218,6 +234,7 @@ "home-manager": "home-manager", "impermanence": "impermanence", "nixpkgs": "nixpkgs", + "nixpkgs-unstable": "nixpkgs-unstable", "nur": "nur", "nvim-cmp-vlime": "nvim-cmp-vlime", "rust-tools-nvim": "rust-tools-nvim", diff --git a/flake.nix b/flake.nix index f2598a8..7234565 100644 --- a/flake.nix +++ b/flake.nix @@ -2,6 +2,7 @@ inputs = { impermanence.url = "github:nix-community/impermanence"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-22.11"; + nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable"; nur.url = "github:nix-community/NUR"; agenix = { @@ -56,14 +57,21 @@ }; }; - outputs = {nixpkgs, ...} @ args: { - nixosConfigurations.fanya = nixpkgs.lib.nixosSystem { + outputs = {nixpkgs, nixpkgs-unstable, ...} @ args: { + nixosConfigurations.fanya = + let system = "x86_64-linux"; + overlay-unstable = final: prev: { + unstable = nixpkgs-unstable.legacyPackages.${prev.system}; + }; + in + nixpkgs.lib.nixosSystem { + inherit system; specialArgs = args; modules = [ ./fanya.nix - (_: {nixpkgs.overlays = [(import ./overlay)];}) + (_: {nixpkgs.overlays = [(import ./overlay) overlay-unstable];}) ]; }; }; diff --git a/system.nix b/system.nix index 0bb45c9..c9a6a6e 100644 --- a/system.nix +++ b/system.nix @@ -1,4 +1,4 @@ -{nixpkgs, ...}: { +{nixpkgs, nixpkgs-unstable, ...}: { imports = [ ./hardware-configuration.nix ]; @@ -34,7 +34,10 @@ }; nix = { - registry.nixpkgs.flake = nixpkgs; + registry = { + nixpkgs.flake = nixpkgs; + nixpkgs-unstable.flake = nixpkgs-unstable; + }; settings = { auto-optimise-store = true; trusted-users = ["root" "buffet"];