Skip to content

Commit

Permalink
usr: add cachix module
Browse files Browse the repository at this point in the history
  • Loading branch information
xieby1 committed May 24, 2024
1 parent 4cdf051 commit 24df5e5
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,11 @@ Nix/NixOS采用了“包(Package)”的理念,将Linux内核、驱动、
* system.nix: 系统总体配置(nixos-rebuild的配置)
* sys/cli.nix: 系统命令行配置
* sys/gui.nix: 系统图形配置
* modules/: 系统模块
* home.nix: 用户总体配置(home-manager的配置)
* usr/cli.nix: 用户命令行配置
* usr/gui.nix: 用户图形配置
* modules/: 用户模块
* nix-on-droid.nix: 安卓总体配置(nix-on-droid的配置)
* modules/: nixos/home-manager通用的模块

Expand Down
1 change: 1 addition & 0 deletions home.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
{
imports = [
./opt.nix
./modules/cachix.nix
./usr/cli.nix
# Q: how to use isGui here?
# A: Not possible.
Expand Down
11 changes: 11 additions & 0 deletions usr/modules/cachix.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{ config, lib, ...}:

{
imports = [../../modules/cachix.nix];
config = lib.mkIf (
(builtins.pathExists config.cachix_dhall) &&
(config.cachix_packages != [])
) {
home.activation = lib.hm.dag.entryAfter ["writeBoundary"] config._cachix_push;
};
}

0 comments on commit 24df5e5

Please sign in to comment.