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": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"home": "home",
|
"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"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
36
flake.nix
36
flake.nix
@ -2,9 +2,10 @@
|
|||||||
description = "A highly structured configuration database.";
|
description = "A highly structured configuration database.";
|
||||||
|
|
||||||
inputs.nixpkgs.url = "nixpkgs/release-20.03";
|
inputs.nixpkgs.url = "nixpkgs/release-20.03";
|
||||||
|
inputs.unstable.url = "nixpkgs/nixos-unstable";
|
||||||
inputs.home.url = "github:rycee/home-manager/bqv-flakes";
|
inputs.home.url = "github:rycee/home-manager/bqv-flakes";
|
||||||
|
|
||||||
outputs = inputs@{ self, home, nixpkgs }:
|
outputs = inputs@{ self, home, nixpkgs, unstable }:
|
||||||
let
|
let
|
||||||
inherit (builtins) listToAttrs baseNameOf attrNames attrValues readDir;
|
inherit (builtins) listToAttrs baseNameOf attrNames attrValues readDir;
|
||||||
inherit (nixpkgs.lib) removeSuffix;
|
inherit (nixpkgs.lib) removeSuffix;
|
||||||
@ -22,25 +23,30 @@
|
|||||||
value = import path;
|
value = import path;
|
||||||
});
|
});
|
||||||
|
|
||||||
pkgs = import nixpkgs {
|
pkgImport = pkgs:
|
||||||
inherit system;
|
import pkgs {
|
||||||
overlays = attrValues self.overlays;
|
inherit system;
|
||||||
config = { allowUnfree = true; };
|
overlays = attrValues self.overlays;
|
||||||
};
|
config = { allowUnfree = true; };
|
||||||
|
};
|
||||||
|
|
||||||
|
pkgs = pkgImport nixpkgs;
|
||||||
|
|
||||||
|
unstablePkgs = pkgImport unstable;
|
||||||
|
|
||||||
in {
|
in {
|
||||||
nixosConfigurations =
|
nixosConfigurations = let
|
||||||
let configs = import ./hosts (inputs // { inherit system pkgs; });
|
configs =
|
||||||
in configs;
|
import ./hosts (inputs // { inherit system pkgs unstablePkgs; });
|
||||||
|
in configs;
|
||||||
|
|
||||||
overlay = import ./pkgs;
|
overlay = import ./pkgs;
|
||||||
|
|
||||||
overlays =
|
overlays = let
|
||||||
let
|
overlayDir = ./overlays;
|
||||||
overlayDir = ./overlays;
|
fullPath = name: overlayDir + "/${name}";
|
||||||
fullPath = name: overlayDir + "/${name}";
|
overlayPaths = map fullPath (attrNames (readDir overlayDir));
|
||||||
overlayPaths = map fullPath (attrNames (readDir overlayDir));
|
in pathsToImportedAttrs overlayPaths;
|
||||||
in pathsToImportedAttrs overlayPaths;
|
|
||||||
|
|
||||||
packages.x86_64-linux = {
|
packages.x86_64-linux = {
|
||||||
inherit (pkgs) sddm-chili dejavu_nerdfont purs pure;
|
inherit (pkgs) sddm-chili dejavu_nerdfont purs pure;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
inputs@{ home, nixpkgs, self, pkgs, system, ... }:
|
inputs@{ home, nixpkgs, unstablePkgs, self, pkgs, system, ... }:
|
||||||
let
|
let
|
||||||
inherit (nixpkgs) lib;
|
inherit (nixpkgs) lib;
|
||||||
|
|
||||||
@ -12,7 +12,10 @@ let
|
|||||||
lib.nixosSystem {
|
lib.nixosSystem {
|
||||||
inherit system;
|
inherit system;
|
||||||
|
|
||||||
specialArgs.usr = { inherit utils; };
|
specialArgs = {
|
||||||
|
inherit unstablePkgs;
|
||||||
|
usr = { inherit utils; };
|
||||||
|
};
|
||||||
|
|
||||||
modules = let
|
modules = let
|
||||||
inherit (home.nixosModules) home-manager;
|
inherit (home.nixosModules) home-manager;
|
||||||
|
@ -1,19 +1,20 @@
|
|||||||
{ pkgs, ... }:
|
{ unstablePkgs, ... }:
|
||||||
let inherit (builtins) readFile;
|
let inherit (builtins) readFile;
|
||||||
in {
|
in {
|
||||||
sound.enable = true;
|
sound.enable = true;
|
||||||
|
|
||||||
environment = {
|
environment = {
|
||||||
etc."xdg/qutebrowser/config.py".text = let mpv = "${pkgs.mpv}/bin/mpv";
|
etc."xdg/qutebrowser/config.py".text =
|
||||||
in ''
|
let mpv = "${unstablePkgs.mpv}/bin/mpv";
|
||||||
${readFile ./config.py}
|
in ''
|
||||||
|
${readFile ./config.py}
|
||||||
|
|
||||||
config.bind(',m', 'hint links spawn -d ${mpv} {hint-url}')
|
config.bind(',m', 'hint links spawn -d ${mpv} {hint-url}')
|
||||||
config.bind(',v', 'spawn -d ${mpv} {url}')
|
config.bind(',v', 'spawn -d ${mpv} {url}')
|
||||||
'';
|
'';
|
||||||
|
|
||||||
sessionVariables.BROWSER = "qute";
|
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