summaryrefslogtreecommitdiff
path: root/modules/examples
diff options
context:
space:
mode:
authorDaiderd Jordan <daiderd@gmail.com>2016-12-13 10:00:10 +0100
committerDaiderd Jordan <daiderd@gmail.com>2016-12-13 10:00:10 +0100
commitd06b9e82f3c6c9904c228c40e2e35313354589c3 (patch)
tree9b52d447a77a58bc5c454aa4b43a31820f3f3bc5 /modules/examples
parent9439a439e8507010f837115fd3787d34d89fbd5a (diff)
update example
Diffstat (limited to 'modules/examples')
-rw-r--r--modules/examples/lnl.nix11
-rw-r--r--modules/examples/simple.nix18
2 files changed, 5 insertions, 24 deletions
diff --git a/modules/examples/lnl.nix b/modules/examples/lnl.nix
index 9301f0c..e979166 100644
--- a/modules/examples/lnl.nix
+++ b/modules/examples/lnl.nix
@@ -83,11 +83,6 @@
conf=$HOME/.nixpkgs/darwin-config.nix
pkgs=$HOME/.nix-defexpr/nixpkgs
-
- # Read system-wide modifications.
- if test -f /etc/zprofile.local; then
- . /etc/zprofile.local
- fi
'';
programs.zsh.interactiveShellInit = ''
@@ -97,12 +92,6 @@
HISTFILE=$HOME/.zsh_history
setopt HIST_IGNORE_DUPS SHARE_HISTORY HIST_FCNTL_LOCK
-
- export PATH=${config.environment.systemPath}''${PATH:+:$PATH}
- typeset -U PATH
-
- ${config.system.build.setEnvironment}
- ${config.system.build.setAliases}
'';
environment.variables.EDITOR = "vim";
diff --git a/modules/examples/simple.nix b/modules/examples/simple.nix
index fd13cf8..4fa1eca 100644
--- a/modules/examples/simple.nix
+++ b/modules/examples/simple.nix
@@ -7,20 +7,12 @@
[ 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.
+ programs.bash.enable = true;
+ programs.bash.interactiveShellInit = ''
+ # Edit the NIX_PATH entries below or put the nix-darwin repository in
+ # ~/.nix-defexpr/darwin and your configuration in ~/.nixpkgs/darwin-config.nix
- # 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}
+ export NIX_PATH=darwin=$HOME/.nix-defexpr/darwin:darwin-config=$HOME/.nixpkgs/darwin-config.nix:$NIX_PATH
'';
services.activate-system.enable = true;