Skip to content

ldeck/nix-config

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nix-config

My DEPRECATED nixos nixpkgs single user config (macOS)

Deprecated?

Yes, this was my first adventure in nix, doing it the harder way without home-manager.

See my nix-home for a niv/home-manager based flexible config instead.

Installation

PREREQUISITES

Install nix purely functional package manager (single-user).

Go to Single User Installation

It be may required for you to create a Nix Store volume because the default drive is encrypted.

sudo diskutil apfs addVolume disk1 'APFS' 'Nix Store' -mountpoint /nix
sh <(curl -L https://nixos.org/nix/install) --no-daemon

Clone Location

git clone git@github.com:ldeck/nix-config.git ~/.config

Install/update myPackages environment

nix-env -iA nixpkgs.myPackages

NB: nothing will change if you've not changed any config and/or updated nix itself. See Upgrading Nix.

Link Shell

e.g., ~/.zshrc

#!/bin/sh
source $HOME/.config/shell/.profile

Install macOS apps

See list of macOS apps in nixpkgs/custom/apps/default.nix

nix-env -iA nixpkgs.myApps

Custom scripts

app-path

Finds a single application via fuzzy matching if possible. If a single app can't be found, the matching applications are printed (if any), then app-path usage is printed.

Usage: app-path fuzzyname...

Locations searched (in order):

  • ~/.nix-profile/Applications
  • ~/.nix-profile/Applications/Utilities
  • ~/Applications
  • ~/Applications/Utilities
  • /Applications
  • /Applications/Utilities
  • /System/Applications
  • /System/Applications/Utilities

Examples:

% app-path cont
Matches:
| Contacts.app
| Mission Control.app
Usage: app-path fuzzyname...

% app-path conta
/System/Applications/Contacts.app

% app-path idea
/Users/ldeck/.nix-profile/Applications/IntelliJ IDEA.app

 % app-path ins
Matches:
| Insomnia Designer.app |
| Insomnia.app          |
Usage: app-path fuzzyname...

% app-path ins de
/Users/ldeck/.nix-profile/Applications/Insomnia Designer.app

# same as this regex
% app-path 'ins.*de'
/Users/ldeck/.nix-profile/Applications/Insomnia Designer.app

future-git

Usage: future-git <hours> [<git args>]

idownload

Downloads unresolved .*icloud files or directories.

Usage: idownload <file|dir>

java_home

Usage: java_home -v <version>

jqo

Pipe stdout to jqo to handle intermixed json and standard messages

Usage: ... | jqo

jqj

Pipe stdout to jqj to handle intermixed json and standard messages

Usage: ... | jqj

jqr

Pipe stdout to jqr to handle intermixed json and standard messages

Usage: ... | jqr

nix-cache-versions

pin versions in ~/.cache/pinned-versions.tsv

nix-create-shell

shell.nix template with pinned pkgs

nix-link-macapps

Symlinks ~/.nix-profile/Applications/* to ~/Applications.

Usage: nix-link-macapps

nix-open

Open nix or system-installed apps (found using app-path).

Usage: nix-open application [args...]

nix-reopen

Re-open nix or system-installed apps (found using app-path).

Usage: nix-reopen application [args...]

nix-system

Shortcut for nix-shell -p nix-info --run "nix-info -m"

nix-update

update nix, nixpkgs, myPackages, myApps and symlinks

nix-version

shortcut for nix-instantiate --eval -A 'lib.version' '<nixpkgs>' | xargs

sudo-with-touch

Configures sudo to be used with Touch ID.

Usage: sudo-with-touch

About

My [nixos](https://nixos.org) nixpkgs single user config (macOS)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published