system: Enable cachix for nix-community
This commit is contained in:
parent
58540efc77
commit
7f5dd75732
|
@ -0,0 +1,14 @@
|
||||||
|
|
||||||
|
# WARN: this file will get overwritten by $ cachix use <name>
|
||||||
|
{ pkgs, lib, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
folder = ./cachix;
|
||||||
|
toImport = name: value: folder + ("/" + name);
|
||||||
|
filterCaches = key: value: value == "regular" && lib.hasSuffix ".nix" key;
|
||||||
|
imports = lib.mapAttrsToList toImport (lib.filterAttrs filterCaches (builtins.readDir folder));
|
||||||
|
in {
|
||||||
|
inherit imports;
|
||||||
|
nix.binaryCaches = ["https://cache.nixos.org/"];
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
|
||||||
|
{
|
||||||
|
nix = {
|
||||||
|
binaryCaches = [
|
||||||
|
"https://nix-community.cachix.org"
|
||||||
|
];
|
||||||
|
binaryCachePublicKeys = [
|
||||||
|
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
|
@ -10,8 +10,12 @@ let
|
||||||
host-config = ./machines + "/${hostName}.nix";
|
host-config = ./machines + "/${hostName}.nix";
|
||||||
optionalPath = path: lib.lists.optional (builtins.pathExists path) path;
|
optionalPath = path: lib.lists.optional (builtins.pathExists path) path;
|
||||||
in {
|
in {
|
||||||
imports = [ <home-manager/nixos> ./hardware-configuration.nix ./local.nix ]
|
imports = [
|
||||||
++ optionalPath host-config;
|
<home-manager/nixos>
|
||||||
|
./hardware-configuration.nix
|
||||||
|
./local.nix
|
||||||
|
./cachix.nix
|
||||||
|
] ++ optionalPath host-config;
|
||||||
|
|
||||||
# Nix ######################################################################
|
# Nix ######################################################################
|
||||||
system.stateVersion = "20.03"; # Leave this alone (see configuration.nix(5))
|
system.stateVersion = "20.03"; # Leave this alone (see configuration.nix(5))
|
||||||
|
@ -119,6 +123,8 @@ in {
|
||||||
|
|
||||||
# General ##################################################################
|
# General ##################################################################
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
|
cachix
|
||||||
|
|
||||||
wget
|
wget
|
||||||
vim
|
vim
|
||||||
git
|
git
|
||||||
|
|
Loading…
Reference in New Issue