Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions nix/darwin/apple.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
...
}: {
environment = {
systemPackages =[
systemPackages = [
];
};

Expand Down Expand Up @@ -52,13 +52,16 @@
# Settings of plist in ~/Library/Preferences/
"com.apple.finder" = {
# Set home directory as startup window
NewWindowTargetPath = "file:///Users/${username}/";
NewWindowTargetPath = "file:///Users/${username}/Downloads";
NewWindowTarget = "PfHm";
# Set search scope to directory
FXDefaultSearchScope = "SCcf";
# Multi-file tab view
FinderSpawnTab = true;
};
"com.apple.dock" = {
mru-spaces = 0;
};
"com.apple.desktopservices" = {
# Disable creating .DS_Store files in network an USB volumes
DSDontWriteNetworkStores = true;
Expand Down
1 change: 1 addition & 0 deletions nix/hm/shared.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ in {
run mkdir -p ${config.home.homeDirectory}/workspace
run mkdir -p ${config.home.homeDirectory}/workspace/goenv
run mkdir -p ${config.home.homeDirectory}/.local/bin
run mkdir -p ${config.home.homeDirectory}/Pictures/Screenshots
'';
};
# TODO: move to module.
Expand Down
68 changes: 39 additions & 29 deletions nix/pkgs/dark-mode-notify.nix
Original file line number Diff line number Diff line change
@@ -1,35 +1,45 @@
{pkgs, ...}:
pkgs.stdenv.mkDerivation rec {
name = "dark-notify";
{pkgs, ...}: let
version = "0.1.2";

src = pkgs.fetchurl {
url = "https://github.com/cormacrelf/dark-notify/releases/download/v${version}/dark-notify-v0.1.2.tar.gz";
sha256 = "987c4e40ca9f7996f72d8967a74417e2fc7e8d7aea02e93bd314f80a80817f9a";
tarballUrlMap = {
x86_64-darwin = {
url = "https://github.com/cormacrelf/dark-notify/releases/download/v${version}/dark-notify-v0.1.2.tar.gz";
sha256 = "987c4e40ca9f7996f72d8967a74417e2fc7e8d7aea02e93bd314f80a80817f9a";
};
aarch64-darwin = {
url = "https://github.com/pze/dark-notify/releases/download/v0.1.2/dark-notify-aarch64-darwin-v0.1.2.tar.gz";
sha256 = "0kf1ms88847j022lk7gw26zjxw9cvv3zz8xar88l0vx8f46xjss6";
};
};
tarball = tarballUrlMap.${pkgs.system};
in
pkgs.stdenv.mkDerivation {
name = "dark-notify";
version = version;

nativeBuildInputs = [
# installShellFiles
pkgs.makeBinaryWrapper
];
src = pkgs.fetchurl tarball;

sourceRoot = ".";
installPhase = ''
mkdir -p $out/bin
mv dark-notify $out/bin/dark-notify
'';
nativeBuildInputs = [
# installShellFiles
pkgs.makeBinaryWrapper
];

postFixup = with pkgs; ''
wrapProgram $out/bin/dark-notify \
--set PATH ${lib.makeBinPath [
coreutils
bash
python3
]}
'';
sourceRoot = ".";
installPhase = ''
mkdir -p $out/bin
mv dark-notify $out/bin/dark-notify
'';

meta = {
description = "Watcher for macOS 10.14+ light/dark mode changes";
homepage = "https://github.com/cormacrelf/dark-notify";
};
}
postFixup = with pkgs; ''
wrapProgram $out/bin/dark-notify \
--set PATH ${lib.makeBinPath [
coreutils
bash
python3
]}
'';

meta = {
description = "Watcher for macOS 10.14+ light/dark mode changes";
homepage = "https://github.com/cormacrelf/dark-notify";
};
}