Commit b0cdba8
Changed files (6)
modules
modules/core/shell/atuin.nix
@@ -0,0 +1,50 @@
+{lib, ...}: {
+ den.aspects.core.shell.atuin = {
+ includes = [
+ ({user, ...}: {
+ persistUser = {
+ directories = lib.optional (!(lib.elem "homeManager" user.classes)) ".local/share/atuin";
+ };
+ persistHome = {config, ...}: {
+ directories = ["${config.xdg.dataHome}/atuin"];
+ };
+ })
+ ];
+
+ nixos = {
+ programs.atuin = {
+ enable = true;
+ settings = {
+ style = "full";
+ inline_height = 32;
+ keymap_mode = "vim-normal";
+ };
+ };
+ };
+
+ homeManager = {
+ programs.atuin = {
+ enable = true;
+ enableBashIntegration = true;
+ enableFishIntegration = true;
+ };
+ };
+ };
+
+ den.aspects.core.shell.atuin.themes = {
+ catppuccin = {
+ homeManager = {pkgs, ...}: {
+ programs.atuin = {
+ settings.theme.name = "catppuccin-mocha-mauve";
+ };
+
+ xdg.configFile = {
+ "atuin/themes/catppuccin-mocha-mauve.toml".source = pkgs.fetchurl {
+ url = "https://github.com/catppuccin/atuin/raw/68aa64b77573c235044b614e752a781701af4eec/themes/mocha/catppuccin-mocha-mauve.toml";
+ hash = "sha256-X66L7YmWQ4ClPeQoFhXkkWXPrmpLwWfHcDNbvnc+K3g=";
+ };
+ };
+ };
+ };
+ };
+}
modules/core/shell/bash.nix
@@ -0,0 +1,17 @@
+{
+ den.aspects.core.shell.bash = {
+ nixos = {
+ programs.bash = {
+ enable = true;
+ completion.enable = true;
+ };
+ };
+
+ homeManager = {
+ programs.bash = {
+ enable = true;
+ enableCompletion = true;
+ };
+ };
+ };
+}
modules/core/shell/fish.nix
@@ -0,0 +1,77 @@
+{lib, ...}: {
+ den.aspects.core.shell.fish = {
+ includes = [
+ ({user, ...}: {
+ persistUser = {
+ files = lib.optional (!(lib.elem "homeManager" user.classes)) ".local/share/fish/fish_history";
+ };
+ persistHome = {config, ...}: {
+ files = ["${config.xdg.dataHome}/fish/fish_history"];
+ };
+ })
+ ];
+
+ nixos = {
+ programs.fish = {
+ enable = true;
+ useBabelfish = true;
+
+ shellInit = ''
+ set -U fish_greeting
+ '';
+ };
+ };
+
+ homeManager = {pkgs, ...}: {
+ programs.fish = {
+ enable = true;
+ generateCompletions = true;
+ plugins = with pkgs.fishPlugins; [
+ {
+ inherit (puffer) src;
+ name = "puffer";
+ }
+ {
+ inherit (autopair) src;
+ name = "autopair";
+ }
+ ];
+
+ shellInit = ''
+ set -U fish_greeting
+ '';
+ };
+ };
+ };
+
+ den.aspects.core.shell.fish.themes = {
+ catppuccin = {
+ homeManager = {pkgs, ...}: {
+ programs.fish = {
+ shellInit = ''
+ fish_config theme choose catppuccin-mocha
+ '';
+ };
+ xdg.configFile."fish/themes/catppuccin-mocha.theme".source = pkgs.fetchurl {
+ pname = "fish-theme-catppuccin-mocha.theme";
+ url = "https://github.com/catppuccin/fish/raw/5fc5ae9c2ec22eb376cb03ce76f0d262a38960f3/themes/static/catppuccin-mocha.theme";
+ hash = "sha256-sAn4eJy6tmloWbN0p+mBdku3CK5TUeKVtVsaH/CBnGk=";
+ };
+ };
+ };
+ };
+
+ den.aspects.core.shell.fish.bashOverlay = {
+ nixos = {config, ...}: {
+ programs.bash = {
+ interactiveShellInit = ''
+ # "check if parent process is not fish" && "make nested shells work properly"
+ if grep -qv fish /proc/$PPID/comm && [[ $SHLVL == [12] ]]; then
+ # set $SHELL for better integration with programs like nix shell, tmux, etc.
+ SHELL=${config.programs.fish.package}/bin/fish exec fish
+ fi
+ '';
+ };
+ };
+ };
+}
modules/core/shell/starship.nix
@@ -0,0 +1,11 @@
+{
+ den.aspects.core.shell.starship = {
+ nixos = {
+ programs.starship = {
+ enable = true;
+ interactiveOnly = true;
+ presets = ["pure-preset"];
+ };
+ };
+ };
+}
modules/roles/default.nix
@@ -13,6 +13,11 @@
core.hardware.graphic.nvidia
core.hardware.thunderbolt
+ core.shell.bash
+ core.shell.fish
+ core.shell.atuin
+ core.shell.starship
+
core.editor
core.impermanence
core.localization
modules/users/hpcesia/default.nix
@@ -4,6 +4,8 @@
[
den.batteries.host-aspects
den.batteries.primary-user
+
+ den.aspects.core.shell.fish.bashOverlay
]
++ (den.lib.policy.when
({host, ...}: host.hasAspect den.aspects.roles.develop)