mirror of
https://github.com/LnL7/nix-darwin.git
synced 2025-03-13 20:30:02 +00:00
add link to examples
This commit is contained in:
parent
b270f2fdc5
commit
ea047db86f
2 changed files with 30 additions and 0 deletions
|
@ -35,6 +35,8 @@ result/bin/darwin-rebuild switch
|
|||
|
||||
## Example configuration
|
||||
|
||||
Checkout [modules/examples](https://github.com/LnL7/nix-darwin/tree/master/modules/examples) for some example configurations.
|
||||
|
||||
```nix
|
||||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
|
|
28
modules/examples/simple.nix
Normal file
28
modules/examples/simple.nix
Normal file
|
@ -0,0 +1,28 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
|
||||
# List packages installed in system profile. To search by name, run:
|
||||
# $ nix-env -qaP | grep wget
|
||||
environment.systemPackages =
|
||||
[ # Include nix-tools
|
||||
config.system.build.nix
|
||||
|
||||
pkgs.nix-repl
|
||||
];
|
||||
|
||||
environment.etc."bashrc".text = ''
|
||||
# /etc/bashrc: DO NOT EDIT -- this file has been generated automatically.
|
||||
# This file is read for interactive shells.
|
||||
|
||||
# Only execute this file once per shell.
|
||||
if [ -n "$__ETC_BASHRC_SOURCED" -o -n "$NOSYSBASHRC" ]; then return; fi
|
||||
__ETC_BASHRC_SOURCED=1
|
||||
|
||||
export NIX_PATH=nixpkgs=$HOME/.nix-defexpr/nixpkgs:darwin=$HOME/.nix-defexpr/darwin:darwin-config=$HOME/.nixpkgs/darwin-config.nix:$NIX_PATH
|
||||
|
||||
export PATH=${config.environment.systemPath}''${PATH:+:$PATH}
|
||||
|
||||
${config.system.build.setEnvironment}
|
||||
${config.system.build.setAliases}
|
||||
'';
|
||||
}
|
Loading…
Add table
Reference in a new issue