]> Skullheadx's Git Forge - nixos.git/commitdiff
make shell config file
authorSkullheadx <admonty1@protonmail.com>
Fri, 1 May 2026 17:03:52 +0000 (13:03 -0400)
committerSkullheadx <admonty1@protonmail.com>
Fri, 1 May 2026 17:03:52 +0000 (13:03 -0400)
configuration.nix
sh.nix [new file with mode: 0644]
vim.nix

index 523a32a5b5a0ff1306040e2926065cab919aa188..7660ce3aaca7a2a56cc8c3e9b595eda3c4c4c6cb 100644 (file)
@@ -12,6 +12,7 @@
     ./hjem.nix
     ./audio.nix
     ./vim.nix
+    ./sh.nix
   ];
 
   # Bootloader.
   # List packages installed in system profile. To search, run:
   # $ nix search wget
   environment.systemPackages = with pkgs; [
-    (lib.lowPrio pkgs.vim-full) # Lower Vim's priority
-    (pkgs.writeShellApplication {
-      name = "vi";
-      runtimeInputs = [ pkgs.nvi ];
-      text = ''
-        exec ${pkgs.nvi}/bin/vi "$@"
-      '';
-    })
-
-    neovim
     wget
-    git
     nixfmt
     st
     dmenu
@@ -72,7 +62,6 @@
     surf
     terminus_font
     terminus_font_ttf
-
   ];
 
   programs.git = {
     };
   };
 
-  programs.bash = {
-    enable = true;
-    interactiveShellInit = ''
-      shopt -s autocd
-      shopt -s cdable_vars
-      shopt -s cdspell
-      shopt -s dirspell
-      shopt -s checkjobs
-      shopt -s cmdhist
-      shopt -s histappend
-      shopt -s globstar
-      shopt -s extglob
-    '';
-    promptInit = ''
-      PS1="\[\e[97m\][\[\e[m\]\[\e[92m\]\u\[\e[m\]\[\e[32m\]@\[\e[m\]\[\e[92m\]\h\[\e[m\]:\[\e[92m\]\w\[\e[m\]\[\e[97m\]]\[\e[m\]\[\e[97m\]\\$\[\e[m\] "
-    '';
-  };
-
-  environment.etc."inputrc".text = ''
-    set editing-mode vi
-    set show-mode-in-prompt on
-    set keyseq-timeout 10
-
-    set vi-ins-mode-string "\1\e[5 q\2"
-    set vi-cmd-mode-string "\1\e[2 q\2"
-
-
-    set colored-stats on
-    set colored-completion-prefix on
-    set blink-matching-paren on
-
-    set completion-ignore-case on
-    set show-all-if-ambiguous on
-    set completion-map-case on
-  '';
 
 
 
diff --git a/sh.nix b/sh.nix
new file mode 100644 (file)
index 0000000..71b0647
--- /dev/null
+++ b/sh.nix
@@ -0,0 +1,42 @@
+{config, pkgs, ... }:{
+  programs.bash = {
+    enable = true;
+    interactiveShellInit = ''
+      shopt -s autocd
+      shopt -s cdable_vars
+      shopt -s cdspell
+      shopt -s dirspell
+      shopt -s checkjobs
+      shopt -s cmdhist
+      shopt -s histappend
+      shopt -s globstar
+      shopt -s extglob
+    '';
+    promptInit = ''
+      PS1="\[\e[97m\][\[\e[m\]\[\e[92m\]\u\[\e[m\]\[\e[32m\]@\[\e[m\]\[\e[92m\]\h\[\e[m\]:\[\e[92m\]\w\[\e[m\]\[\e[97m\]]\[\e[m\]\[\e[97m\]\\$\[\e[m\] "
+    '';
+    shellAliases = {
+      nix-sw = "sudo nixos-rebuild switch --flake .";
+      nix-upd-sl = "sudo nix flake update my-slstatus my-dwm my-surf my-st my-dmenu";
+      
+    };
+  };
+
+  environment.etc."inputrc".text = ''
+    set editing-mode vi
+    set show-mode-in-prompt on
+    set keyseq-timeout 10
+
+    set vi-ins-mode-string "\1\e[5 q\2"
+    set vi-cmd-mode-string "\1\e[2 q\2"
+
+
+    set colored-stats on
+    set colored-completion-prefix on
+    set blink-matching-paren on
+
+    set completion-ignore-case on
+    set show-all-if-ambiguous on
+    set completion-map-case on
+  '';
+}
diff --git a/vim.nix b/vim.nix
index 80e1ed20aaf3f6a2c7a148f3dd5ec451f3dcc614..90db98d418caa595bd6d84c13df607edac13be42 100644 (file)
--- a/vim.nix
+++ b/vim.nix
@@ -1,5 +1,19 @@
 {config, pkgs, ... }:
 {
+
+  environment.systemPackages = with pkgs; [
+    (lib.lowPrio pkgs.vim-full) # Lower Vim's priority
+    (pkgs.writeShellApplication {
+      name = "vi";
+      runtimeInputs = [ pkgs.nvi ];
+      text = ''
+        exec ${pkgs.nvi}/bin/vi "$@"
+      '';
+    })
+    neovim
+  ];
+
+
   environment.etc."vimrc".text = ''
 set autoread
 au FocusGained,BufEnter * silent! checktime
@@ -54,8 +68,8 @@ set number relativenumber
 
 
   " Force the cursor to a Block when Vim starts
-let &t_ti .= "\e[2 q"
-let &t_te .= "\e[2 q"
+let &t_ti = &t_ti . "\e[2 q"
+let &t_te = &t_te . "\e[2 q"
 let &t_EI = "\e[2 q"
 let &t_SI = "\e[2 q"
   '';