Skip to content

Commit

Permalink
Disable auto-optimise-store on nix-on-droid because of permission d…
Browse files Browse the repository at this point in the history
…enied errors
  • Loading branch information
rake5k committed Oct 15, 2023
1 parent 459fd8a commit 1c09838
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 31 deletions.
72 changes: 44 additions & 28 deletions home/base/nix/default.nix
Original file line number Diff line number Diff line change
@@ -1,34 +1,50 @@
{ pkgs, inputs, ... }:
{ config, lib, pkgs, inputs, ... }:

with lib;

let

cfg = config.custom.base.nix;

in

{
home.packages = [
pkgs.nix-output-monitor
];

nix = {
registry = {
nixpkgs.flake = inputs.nixpkgs;
nix-config.flake = inputs.self;
};
settings = {
auto-optimise-store = true;
experimental-features = [ "nix-command" "flakes" ];
log-lines = 30;
substituters = [
"https://christianharke.cachix.org/"
"https://nix-community.cachix.org"
"https://cache.nixos.org"
];
trusted-public-keys = [
"christianharke.cachix.org-1:TzmbiNLRcH8G0932XRlQzh8GPvuV9pJcHLqLnzznLKU="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
];
options = {
custom.base.nix = {
enableStoreOptimization = mkEnableOption "Optimize nix store" // { default = true; };
};
};
nixpkgs.config = import ./nixpkgs-config.nix;
xdg.configFile."nixpkgs/config.nix".source = ./nixpkgs-config.nix;

# Command-not-found replacement
programs.nix-index.enable = true;
config = {
home.packages = [
pkgs.nix-output-monitor
];

nix = {
registry = {
nixpkgs.flake = inputs.nixpkgs;
nix-config.flake = inputs.self;
};
settings = {
auto-optimise-store = cfg.enableStoreOptimization;
experimental-features = [ "nix-command" "flakes" ];
log-lines = 30;
substituters = [
"https://christianharke.cachix.org/"
"https://nix-community.cachix.org"
"https://cache.nixos.org"
];
trusted-public-keys = [
"christianharke.cachix.org-1:TzmbiNLRcH8G0932XRlQzh8GPvuV9pJcHLqLnzznLKU="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
];
};
};
nixpkgs.config = import ./nixpkgs-config.nix;
xdg.configFile."nixpkgs/config.nix".source = ./nixpkgs-config.nix;

# Command-not-found replacement
programs.nix-index.enable = true;
};
}
9 changes: 6 additions & 3 deletions home/roles/mobile/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,12 @@ in
};

custom = {
base.non-nixos = {
enable = true;
installNix = false;
base = {
nix.enableStoreOptimization = false;
non-nixos = {
enable = true;
installNix = false;
};
};

programs.ssh = {
Expand Down

0 comments on commit 1c09838

Please sign in to comment.