flake: add option to install packages from nixos-unstable
This commit is contained in:
parent
861cb69fa1
commit
05a798a56e
20
flake.lock
20
flake.lock
@ -57,7 +57,25 @@
|
||||
"root": {
|
||||
"inputs": {
|
||||
"home": "home",
|
||||
"nixpkgs": "nixpkgs_2"
|
||||
"nixpkgs": "nixpkgs_2",
|
||||
"unstable": "unstable"
|
||||
}
|
||||
},
|
||||
"unstable": {
|
||||
"info": {
|
||||
"lastModified": 1591465133,
|
||||
"narHash": "sha256-HdXyiHl8TumxQZhs2/DCSnqbi1GnvqXaZlsJneGf0g0="
|
||||
},
|
||||
"locked": {
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "029a5de08390bb03c3f44230b064fd1850c6658a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"id": "nixpkgs",
|
||||
"ref": "nixos-unstable",
|
||||
"type": "indirect"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
18
flake.nix
18
flake.nix
@ -2,9 +2,10 @@
|
||||
description = "A highly structured configuration database.";
|
||||
|
||||
inputs.nixpkgs.url = "nixpkgs/release-20.03";
|
||||
inputs.unstable.url = "nixpkgs/nixos-unstable";
|
||||
inputs.home.url = "github:rycee/home-manager/bqv-flakes";
|
||||
|
||||
outputs = inputs@{ self, home, nixpkgs }:
|
||||
outputs = inputs@{ self, home, nixpkgs, unstable }:
|
||||
let
|
||||
inherit (builtins) listToAttrs baseNameOf attrNames attrValues readDir;
|
||||
inherit (nixpkgs.lib) removeSuffix;
|
||||
@ -22,21 +23,26 @@
|
||||
value = import path;
|
||||
});
|
||||
|
||||
pkgs = import nixpkgs {
|
||||
pkgImport = pkgs:
|
||||
import pkgs {
|
||||
inherit system;
|
||||
overlays = attrValues self.overlays;
|
||||
config = { allowUnfree = true; };
|
||||
};
|
||||
|
||||
pkgs = pkgImport nixpkgs;
|
||||
|
||||
unstablePkgs = pkgImport unstable;
|
||||
|
||||
in {
|
||||
nixosConfigurations =
|
||||
let configs = import ./hosts (inputs // { inherit system pkgs; });
|
||||
nixosConfigurations = let
|
||||
configs =
|
||||
import ./hosts (inputs // { inherit system pkgs unstablePkgs; });
|
||||
in configs;
|
||||
|
||||
overlay = import ./pkgs;
|
||||
|
||||
overlays =
|
||||
let
|
||||
overlays = let
|
||||
overlayDir = ./overlays;
|
||||
fullPath = name: overlayDir + "/${name}";
|
||||
overlayPaths = map fullPath (attrNames (readDir overlayDir));
|
||||
|
@ -1,4 +1,4 @@
|
||||
inputs@{ home, nixpkgs, self, pkgs, system, ... }:
|
||||
inputs@{ home, nixpkgs, unstablePkgs, self, pkgs, system, ... }:
|
||||
let
|
||||
inherit (nixpkgs) lib;
|
||||
|
||||
@ -12,7 +12,10 @@ let
|
||||
lib.nixosSystem {
|
||||
inherit system;
|
||||
|
||||
specialArgs.usr = { inherit utils; };
|
||||
specialArgs = {
|
||||
inherit unstablePkgs;
|
||||
usr = { inherit utils; };
|
||||
};
|
||||
|
||||
modules = let
|
||||
inherit (home.nixosModules) home-manager;
|
||||
|
@ -1,10 +1,11 @@
|
||||
{ pkgs, ... }:
|
||||
{ unstablePkgs, ... }:
|
||||
let inherit (builtins) readFile;
|
||||
in {
|
||||
sound.enable = true;
|
||||
|
||||
environment = {
|
||||
etc."xdg/qutebrowser/config.py".text = let mpv = "${pkgs.mpv}/bin/mpv";
|
||||
etc."xdg/qutebrowser/config.py".text =
|
||||
let mpv = "${unstablePkgs.mpv}/bin/mpv";
|
||||
in ''
|
||||
${readFile ./config.py}
|
||||
|
||||
@ -14,6 +15,6 @@ in {
|
||||
|
||||
sessionVariables.BROWSER = "qute";
|
||||
|
||||
systemPackages = with pkgs; [ qute qutebrowser mpv youtubeDL ];
|
||||
systemPackages = with unstablePkgs; [ qute qutebrowser mpv youtubeDL ];
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user