Use unstable nix tool

This commit is contained in:
Oystein Kristoffer Tveit 2022-08-18 23:15:50 +02:00
parent 84429fca90
commit 3f7f9ceead
Signed by: oysteikt
GPG Key ID: 9F2F7D8250F35146
3 changed files with 41 additions and 6 deletions

View File

@ -67,11 +67,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1660496378, "lastModified": 1660581366,
"narHash": "sha256-sgAhmrC1iSnl5T2VPPiMpciH1aRw5c7PYEdXX6jd6Gk=", "narHash": "sha256-et+bi9/jlSF/pHx5AYB9ZP2XDdZEQ0vnF7xlvs4503Y=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "879121648fe522b38cc1cf75aef160a14a1f2e7b", "rev": "3d47bbaa26e7a771059d828eecf3bd8bf28a8b0f",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -87,6 +87,7 @@
"home-manager": "home-manager", "home-manager": "home-manager",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
"secrets": "secrets", "secrets": "secrets",
"unstable-nixpkgs": "unstable-nixpkgs",
"vscode-server": "vscode-server", "vscode-server": "vscode-server",
"website": "website" "website": "website"
} }
@ -111,6 +112,21 @@
"url": "file:///home/h7x4/git/nix-secrets" "url": "file:///home/h7x4/git/nix-secrets"
} }
}, },
"unstable-nixpkgs": {
"locked": {
"lastModified": 1660646295,
"narHash": "sha256-V4G+egGRc3elXPTr7QLJ7r7yrYed0areIKDiIAlMLC8=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "762b003329510ea855b4097a37511eb19c7077f0",
"type": "github"
},
"original": {
"id": "nixpkgs",
"ref": "nixos-unstable",
"type": "indirect"
}
},
"vscode-server": { "vscode-server": {
"flake": false, "flake": false,
"locked": { "locked": {

View File

@ -3,6 +3,7 @@
inputs = { inputs = {
nixpkgs.url = "nixpkgs/nixos-22.05"; nixpkgs.url = "nixpkgs/nixos-22.05";
unstable-nixpkgs.url = "nixpkgs/nixos-unstable";
home-manager = { home-manager = {
url = "github:nix-community/home-manager/release-22.05"; url = "github:nix-community/home-manager/release-22.05";
@ -44,6 +45,7 @@
outputs = inputs@{ outputs = inputs@{
self, self,
nixpkgs, nixpkgs,
unstable-nixpkgs,
home-manager, home-manager,
vscode-server, vscode-server,
secrets, secrets,
@ -65,6 +67,17 @@
overlays = [ self.overlays.lib ]; overlays = [ self.overlays.lib ];
}; };
unstable-pkgs = import unstable-nixpkgs {
inherit system;
config = {
allowUnfree = true;
android_sdk.accept_license = true;
};
overlays = [ self.overlays.lib ];
};
in { in {
overlays = { overlays = {
lib = import ./overlays/lib; lib = import ./overlays/lib;
@ -111,7 +124,13 @@
./hosts/common.nix ./hosts/common.nix
./hosts/${name}/configuration.nix ./hosts/${name}/configuration.nix
"${vscode-server}/default.nix" "${vscode-server}/default.nix"
{ config._module.args = { inherit inputs; secrets = secrets.outputs.default; }; } {
config._module.args = {
inherit inputs;
inherit unstable-pkgs;
secrets = secrets.outputs.default;
};
}
]; ];
}; };
in { in {

View File

@ -1,4 +1,4 @@
{ pkgs, config, inputs, secrets, ... }: { pkgs, unstable-pkgs, config, inputs, secrets, ... }:
let let
inherit (pkgs) lib; inherit (pkgs) lib;
# inherit (specialArgs) machineVars; # inherit (specialArgs) machineVars;
@ -10,7 +10,7 @@ in {
}; };
nix = { nix = {
package = pkgs.nixFlakes; package = unstable-pkgs.nixFlakes;
distributedBuilds = config.networking.hostName != "Tsuki"; distributedBuilds = config.networking.hostName != "Tsuki";
binaryCaches = [ binaryCaches = [
"https://cache.nixos.org/" "https://cache.nixos.org/"