summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--flake.nix3
-rw-r--r--users/seth/home.nix1
-rw-r--r--users/seth/shell/bash.nix5
-rw-r--r--users/seth/shell/fish.nix8
-rw-r--r--util/user.nix2
5 files changed, 15 insertions, 4 deletions
diff --git a/flake.nix b/flake.nix
index cba1ed1..94cf9b1 100644
--- a/flake.nix
+++ b/flake.nix
@@ -27,6 +27,9 @@
stateVersion = "23.05";
channel = nixpkgsUnstable;
modules = [];
+ extraSpecialArgs = {
+ standalone = true;
+ };
};
};
diff --git a/users/seth/home.nix b/users/seth/home.nix
index 64bf18e..4852ad0 100644
--- a/users/seth/home.nix
+++ b/users/seth/home.nix
@@ -1,6 +1,7 @@
_: {
imports = [
./programs
+ ./shell
];
nix.settings.warn-dirty = false;
diff --git a/users/seth/shell/bash.nix b/users/seth/shell/bash.nix
index f086ec4..bdc2fe1 100644
--- a/users/seth/shell/bash.nix
+++ b/users/seth/shell/bash.nix
@@ -1,6 +1,9 @@
-{config, ...}: {
+{config, standalone, ...}: {
programs.bash = {
enable = true;
+ bashrcExtra = if standalone then ''
+ . ${config.home.homeDirectory}/.nix-profile/etc/profile.d/nix.sh
+ '' else '''';
historyFile = "${config.xdg.stateHome}/bash/history";
historyFileSize = 1000;
historySize = 100;
diff --git a/users/seth/shell/fish.nix b/users/seth/shell/fish.nix
index b017f03..09b7b42 100644
--- a/users/seth/shell/fish.nix
+++ b/users/seth/shell/fish.nix
@@ -1,4 +1,4 @@
-{pkgs, ...}: {
+{config, pkgs, standalone, ...}: {
xdg.configFile."fish/themes" = {
recursive = true;
source =
@@ -15,9 +15,11 @@
programs.fish = {
enable = true;
interactiveShellInit = ''
- fish_config theme choose "Catppuccin Mocha"
+ fish_config theme choose "Catppuccin Mocha"
direnv hook fish | source
- '';
+ '' + (if standalone then ''
+ . ${config.home.homeDirectory}/.nix-profile/etc/profile.d/nix.fish
+ '' else '''');
plugins = [
{
name = "autopair-fish";
diff --git a/util/user.nix b/util/user.nix
index 21cbd4e..d28ae2e 100644
--- a/util/user.nix
+++ b/util/user.nix
@@ -5,9 +5,11 @@
system ? "x86_64-linux",
channel,
modules ? [],
+ extraSpecialArgs ? {},
}:
home-manager.lib.homeManagerConfiguration {
pkgs = channel.legacyPackages.${system};
+ inherit extraSpecialArgs;
modules =
[
../users/${username}/home.nix