mirror of
https://github.com/willemml/dotfiles.nix.git
synced 2025-04-12 11:17:17 +00:00
cachix stuff
This commit is contained in:
parent
c6603acd7e
commit
4539d38714
9 changed files with 70 additions and 0 deletions
12
apps/cachix.nix
Normal file
12
apps/cachix.nix
Normal file
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
writeShellApplication,
|
||||
cachix,
|
||||
stdenv,
|
||||
}:
|
||||
writeShellApplication {
|
||||
name = "cachix";
|
||||
runtimeInputs = [cachix];
|
||||
text = ''
|
||||
exec cachix -d ./cachix -m nixos "$@"
|
||||
'';
|
||||
}
|
13
cachix/cachix.nix
Normal file
13
cachix/cachix.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
# 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;
|
||||
}
|
12
cachix/cachix/nix-community.nix
Normal file
12
cachix/cachix/nix-community.nix
Normal file
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
nix = {
|
||||
settings = {
|
||||
substituters = [
|
||||
"https://nix-community.cachix.org"
|
||||
];
|
||||
trusted-public-keys = [
|
||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
12
cachix/cachix/nixos.nix
Normal file
12
cachix/cachix/nixos.nix
Normal file
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
nix = {
|
||||
settings = {
|
||||
substituters = [
|
||||
"https://cache.nixos.org/"
|
||||
];
|
||||
trusted-public-keys = [
|
||||
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
12
cachix/cachix/willemml.nix
Normal file
12
cachix/cachix/willemml.nix
Normal file
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
nix = {
|
||||
settings = {
|
||||
substituters = [
|
||||
"https://willemml.cachix.org"
|
||||
];
|
||||
trusted-public-keys = [
|
||||
"willemml.cachix.org-1:A8M1pBOuBmA6f4Pq4+VNO0r4Joi2I3DZI72V3U+YnKg="
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -32,6 +32,8 @@
|
|||
home.sessionVariables.NIX_PATH = "nixpkgs=${inputs.nixpkgs}";
|
||||
nix.registry.nixpkgs.flake = inputs.nixpkgs;
|
||||
};
|
||||
|
||||
nix-useCachix = ../../cachix/cachix.nix;
|
||||
}
|
||||
// modules;
|
||||
}
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
homeManagerModules.user-willem = {
|
||||
imports = [
|
||||
self.homeManagerModules.default
|
||||
self.homeManagerModules.nix-useCachix
|
||||
self.homeManagerModules.nixpkgs-useFlakeNixpkgs
|
||||
self.homeManagerModules.nixpkgs-config
|
||||
];
|
||||
|
|
|
@ -6,11 +6,13 @@
|
|||
flake = {
|
||||
nixosModules.base = {config, ...}: {
|
||||
imports = [
|
||||
../../nixos/cachix
|
||||
../../nixos/profiles/common.nix
|
||||
../../nixos/profiles/linux-common.nix
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
self.nixosModules.default
|
||||
self.nixosModules.home-manager-integration
|
||||
self.nixosModules.nix-useCachix
|
||||
self.nixosModules.nixpkgs-useFlakeNixpkgs
|
||||
];
|
||||
|
||||
|
@ -28,6 +30,8 @@
|
|||
inputs.home-manager.darwinModules.home-manager
|
||||
self.nixosModules.custom-linkNixInputs
|
||||
self.nixosModules.home-manager-integration
|
||||
self.nixosModules.nix-useCachix
|
||||
self.nixosModules.nixpkgs-useFlakeNixpkgs
|
||||
];
|
||||
|
||||
nixpkgs.overlays = builtins.attrValues self.overlays;
|
||||
|
|
|
@ -25,6 +25,8 @@
|
|||
nix.registry.nixpkgs.flake = inputs.nixpkgs;
|
||||
};
|
||||
|
||||
nix-useCachix = ../../cachix/cachix.nix;
|
||||
|
||||
home-manager-integration = {
|
||||
config.home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
|
|
Loading…
Add table
Reference in a new issue