Bash : Use program to setup.

This commit is contained in:
Dmitry Voronin 2024-07-01 08:15:31 +03:00
parent 1d49f37f40
commit 5af57de559
Signed by: voronind
SSH key fingerprint: SHA256:3kBb4iV2ahufEBNq+vFbUe4QYfHt98DHQjN7QaptY9k
65 changed files with 21 additions and 18 deletions

View file

@ -1,5 +1,4 @@
{ self, config, ... } @args: let { self, config, ... } @args: let
bash = import ./bash args;
btop = import ./top/btop args; btop = import ./top/btop args;
editor = import ./editorconfig args; editor = import ./editorconfig args;
foot = import ./foot args; foot = import ./foot args;
@ -17,9 +16,6 @@
waybar = import ./waybar args; waybar = import ./waybar args;
yazi = import ./yazi args; yazi = import ./yazi args;
in { in {
".bashrc".text = bash.bashrc;
".bash_profile".text = bash.bash_profile;
".profile".text = bash.profile;
".config/MangoHud/MangoHud.conf".text = mangohud.config; ".config/MangoHud/MangoHud.conf".text = mangohud.config;
".config/MangoHud/presets.conf".text = mangohud.presets; ".config/MangoHud/presets.conf".text = mangohud.presets;
".config/btop/btop.conf".text = btop.text; ".config/btop/btop.conf".text = btop.text;

View file

@ -20,19 +20,19 @@ in {
fi fi
''; '';
bash_profile = util.trimTabs '' # bash_profile = util.trimTabs ''
# Home manager. # # Home manager.
[ -e ~/.nix-profile/etc/profile.d/nix.sh ] && source ~/.nix-profile/etc/profile.d/nix.sh # [ -e ~/.nix-profile/etc/profile.d/nix.sh ] && source ~/.nix-profile/etc/profile.d/nix.sh
# Bashrc. # # Bashrc.
[ -f ~/.bashrc ] && source ~/.bashrc # [ -f ~/.bashrc ] && source ~/.bashrc
# Profile. # # Profile.
[ -f ~/.profile ] && source ~/.profile # [ -f ~/.profile ] && source ~/.profile
''; # '';
profile = util.trimTabs '' # profile = util.trimTabs ''
# Load HM vars. # # Load HM vars.
[ -e ~/.nix-profile/etc/profile.d/hm-session-vars.sh ] && source ~/.nix-profile/etc/profile.d/hm-session-vars.sh # [ -e ~/.nix-profile/etc/profile.d/hm-session-vars.sh ] && source ~/.nix-profile/etc/profile.d/hm-session-vars.sh
''; # '';
} }

View file

@ -1,4 +1,6 @@
{ secret, ... } @args: { { secret, ... } @args: let
bash = import ./bash args;
in {
home-manager.enable = true; home-manager.enable = true;
gpg = { gpg = {
@ -7,4 +9,9 @@
}; };
firefox = import ./firefox args; firefox = import ./firefox args;
bash = {
enable = true;
initExtra = bash.bashrc;
};
} }

View file

@ -1,5 +1,5 @@
{ pkgs, util, __findFile, ... } @args: let { pkgs, util, __findFile, ... } @args: let
bash = import <home/config/bash> args; bash = import <home/program/bash> args;
script = pkgs.writeText "backupScript" '' script = pkgs.writeText "backupScript" ''
source ${bash.modulesFile} source ${bash.modulesFile}