summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorDaiderd Jordan <daiderd@gmail.com>2016-11-05 16:54:04 +0100
committerDaiderd Jordan <daiderd@gmail.com>2016-11-05 16:54:04 +0100
commit380bdd293bbcd10ffa8f632572ec34e6f1314cfb (patch)
treee9d8e346c0d6ce1ab48d8fed9e63159659d93d45 /modules
parentefc38f72f9d38146b938c475a1b47693bc508bb6 (diff)
added environment.systemPath and improved zsh options
Diffstat (limited to 'modules')
-rw-r--r--modules/environment.nix16
-rw-r--r--modules/system.nix3
-rw-r--r--modules/tmux.nix6
3 files changed, 16 insertions, 9 deletions
diff --git a/modules/environment.nix b/modules/environment.nix
index 58a5e25..37cd652 100644
--- a/modules/environment.nix
+++ b/modules/environment.nix
@@ -31,6 +31,15 @@ in {
'';
};
+ environment.systemPath = mkOption {
+ type = types.loeOf types.path;
+ default = [ "$HOME/.nix-profile" "/run/current-system/sw" "/nix/var/nix/profiles/default" "/usr/local" ];
+ description = ''
+ The set of paths that are added to PATH
+ '';
+ apply = x: if isList x then makeBinPath x else x;
+ };
+
environment.extraOutputsToInstall = mkOption {
type = types.listOf types.str;
default = [ ];
@@ -66,11 +75,8 @@ in {
config = {
- system.build.setEnvironment = pkgs.writeText "set-environment"
- (concatStringsSep "\n" exportVariables);
-
- system.build.setAliases = pkgs.writeText "set-aliases"
- (concatStringsSep "\n" aliasCommands);
+ system.build.setEnvironment = concatStringsSep "\n" exportVariables;
+ system.build.setAliases = concatStringsSep "\n" aliasCommands;
system.path = pkgs.buildEnv {
name = "system-path";
diff --git a/modules/system.nix b/modules/system.nix
index 13744a4..e80f4c9 100644
--- a/modules/system.nix
+++ b/modules/system.nix
@@ -39,7 +39,6 @@ in {
system.build = mkOption {
internal = true;
- type = types.attrsOf types.package;
default = {};
description = ''
Attribute set of derivation used to setup the system.
@@ -97,6 +96,8 @@ in {
# Prevent the current configuration from being garbage-collected.
ln -sfn /run/current-system /nix/var/nix/gcroots/current-system
+ ${cfg.activationScripts.etc.text}
+
exit $_status
'';
diff --git a/modules/tmux.nix b/modules/tmux.nix
index c54d0a2..18967d2 100644
--- a/modules/tmux.nix
+++ b/modules/tmux.nix
@@ -66,7 +66,7 @@ in {
config = {
- programs.tmux.config = lib.concatStringsSep "\n" tmuxConfigs;
+ programs.tmux.config = concatStringsSep "\n" tmuxConfigs;
programs.tmux.text.login-shell = if stdenv.isDarwin then ''
set -g default-command "reattach-to-user-namespace ${cfg.loginShell}"
@@ -113,9 +113,9 @@ in {
bind v split-window -h -c '#{pane_current_path}'
bind -t vi-copy v begin-selection
- '' + lib.optionalString stdenv.isLinux ''
+ '' + optionalString stdenv.isLinux ''
bind -t vi-copy y copy-selection
- '' + lib.optionalString stdenv.isDarwin ''
+ '' + optionalString stdenv.isDarwin ''
bind -t vi-copy y copy-pipe "reattach-to-user-namespace pbcopy"
'');