Skip to content

Commit

Permalink
usr: cli: add clashctl to cachix
Browse files Browse the repository at this point in the history
  • Loading branch information
xieby1 committed May 24, 2024
1 parent 24df5e5 commit 8eb3818
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion home.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
{
imports = [
./opt.nix
./modules/cachix.nix
./usr/modules/cachix.nix
./usr/cli.nix
# Q: how to use isGui here?
# A: Not possible.
Expand Down
8 changes: 6 additions & 2 deletions usr/cli/clash.nix
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
{ config, pkgs, stdenv, lib, ... }:
{
let
clashctl = pkgs.callPackage ./clashctl.nix {};
in {
imports = [{
home.packages = [
pkgs.clash-meta
] ++ lib.optional (!config.isNixOnDroid) (pkgs.callPackage ./clashctl.nix {});
] ++ lib.optional (!config.isNixOnDroid) clashctl;
cachix_packages = lib.optional (!config.isNixOnDroid) clashctl;

systemd.user.services.clash = {
Unit = {
Description = "Auto start clash";
Expand Down
2 changes: 1 addition & 1 deletion usr/modules/cachix.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
(builtins.pathExists config.cachix_dhall) &&
(config.cachix_packages != [])
) {
home.activation = lib.hm.dag.entryAfter ["writeBoundary"] config._cachix_push;
home.activation.cachix_push = lib.hm.dag.entryAfter ["writeBoundary"] config._cachix_push;
};
}

0 comments on commit 8eb3818

Please sign in to comment.