diff options
| author | Miran Bastaja <miran.bastaja04@gmail.com> | 2024-02-27 14:04:39 +0100 |
|---|---|---|
| committer | Miran Bastaja <miran.bastaja04@gmail.com> | 2024-02-27 14:04:39 +0100 |
| commit | 990449536712f886c800e55463aa4d854e34928f (patch) | |
| tree | 4d3d8b357e9ae7898da4131f62d1b24ca6a52e02 | |
| parent | 264e95ed1c8c7cb9ec8319f51a2c07c8f53b10d1 (diff) | |
Refactor, test out fish on wonderland
| -rw-r--r-- | .helix/ignore | 3 | ||||
| -rw-r--r-- | hosts/sagittarius/default.nix | 1 | ||||
| -rw-r--r-- | hosts/underworld/default.nix | 3 | ||||
| -rw-r--r-- | hosts/underworld/home.nix | 7 | ||||
| -rw-r--r-- | hosts/wonderland/default.nix | 9 | ||||
| -rw-r--r-- | hosts/wonderland/home.nix | 7 | ||||
| -rw-r--r-- | share/home/fish.nix | 9 | ||||
| -rw-r--r-- | share/home/hyprdesktop.nix | 1 | ||||
| -rw-r--r-- | share/home/minimal.nix | 9 | ||||
| -rw-r--r-- | share/home/shellenv.nix | 51 | ||||
| -rw-r--r-- | share/home/zsh.nix | 65 | ||||
| -rw-r--r-- | share/system/client-common.nix | 3 |
12 files changed, 100 insertions, 68 deletions
diff --git a/.helix/ignore b/.helix/ignore new file mode 100644 index 0000000..41f9000 --- /dev/null +++ b/.helix/ignore @@ -0,0 +1,3 @@ +*.lock +LICENSE +secrets/ diff --git a/hosts/sagittarius/default.nix b/hosts/sagittarius/default.nix index 5357e46..89ee629 100644 --- a/hosts/sagittarius/default.nix +++ b/hosts/sagittarius/default.nix @@ -7,6 +7,7 @@ ./web ]; + boot.loader.grub.device = "/dev/sda"; time.timeZone = "Europe/Helsinki"; diff --git a/hosts/underworld/default.nix b/hosts/underworld/default.nix index 24e030a..cb7618f 100644 --- a/hosts/underworld/default.nix +++ b/hosts/underworld/default.nix @@ -10,6 +10,9 @@ { _module.args = { inherit inputs; }; } ]; + programs.zsh.enable = true; + users.defaultUserShell = pkgs.zsh; + # Using grub because the disko docs tell me to use it boot = { # TODO: remove in favour of kernel 6.7 when it makes it's way into nixpkgs diff --git a/hosts/underworld/home.nix b/hosts/underworld/home.nix index 8e965da..9132a42 100644 --- a/hosts/underworld/home.nix +++ b/hosts/underworld/home.nix @@ -6,7 +6,12 @@ home-manager = { useGlobalPkgs = true; useUserPackages = true; - sharedModules = [{ imports = [ (flakeRoot + /share/home/hyprdesktop.nix) ]; }]; + sharedModules = [{ + imports = [ + (flakeRoot + /share/home/hyprdesktop.nix) + (flakeRoot + /share/home/fish.nix) + ]; + }]; extraSpecialArgs = { inherit inputs; }; }; diff --git a/hosts/wonderland/default.nix b/hosts/wonderland/default.nix index 72d04e9..0863828 100644 --- a/hosts/wonderland/default.nix +++ b/hosts/wonderland/default.nix @@ -11,6 +11,9 @@ { _module.args = { inherit inputs; }; } ]; + programs.fish.enable = true; + users.defaultUserShell = pkgs.fish; + # Use the systemd-boot EFI boot loader. boot = { # TODO: remove in favour of kernel 6.7 when it makes it's way into nixpkgs @@ -56,6 +59,12 @@ services.upower.enable = true; hardware.bluetooth.enable = true; + environment.shellAliases = { + battery-status = '' + upower -i $(upower -e | grep BAT) | grep -E "state|to full|percentage" + ''; + }; + users.users = { alice = { isNormalUser = true; diff --git a/hosts/wonderland/home.nix b/hosts/wonderland/home.nix index a87a203..759f728 100644 --- a/hosts/wonderland/home.nix +++ b/hosts/wonderland/home.nix @@ -6,7 +6,12 @@ home-manager = { useGlobalPkgs = true; useUserPackages = true; - sharedModules = [{ imports = [ (flakeRoot + /share/home/hyprdesktop.nix) ]; }]; + sharedModules = [{ + imports = [ + (flakeRoot + /share/home/hyprdesktop.nix) + (flakeRoot + /share/home/fish.nix) + ]; + }]; extraSpecialArgs = { inherit inputs; }; }; diff --git a/share/home/fish.nix b/share/home/fish.nix new file mode 100644 index 0000000..7206bb9 --- /dev/null +++ b/share/home/fish.nix @@ -0,0 +1,9 @@ +{ ... }: { + imports = [ ./shellenv.nix ]; + + programs.fish = { + enable = true; + }; + + programs.starship.enableFishIntegration = true; +} diff --git a/share/home/hyprdesktop.nix b/share/home/hyprdesktop.nix index 28f5909..5f0ea5d 100644 --- a/share/home/hyprdesktop.nix +++ b/share/home/hyprdesktop.nix @@ -151,7 +151,6 @@ fluffychat # matrix client qbittorrent # bittorrent client zathura # document reader - okular # document reader bitwarden # password manager heroic # FOSS game launcher for GOG & Epic diff --git a/share/home/minimal.nix b/share/home/minimal.nix index b00346e..da519f2 100644 --- a/share/home/minimal.nix +++ b/share/home/minimal.nix @@ -1,7 +1,7 @@ # This module contains a bunch of things that make up a minimal environment that # I want on ALL of my machines. { pkgs, config, ... }: { - imports = [ ./helix.nix ./zsh.nix ]; + imports = [ ./helix.nix ]; home.packages = with pkgs; [ wget @@ -11,6 +11,7 @@ ffmpeg imagemagick exiftool + sl # Modern unix ripgrep # grep @@ -34,6 +35,12 @@ xdg.enable = true; + home.shellAliases = { + ip = ''ip --color=auto''; + tempdir = "cd $(mktemp -d)"; + sl = "sl -awFc5"; + }; + # Lots of these are courtesy of xdg-ninja # https://github.com/b3nj5m1n/xdg-ninja # diff --git a/share/home/shellenv.nix b/share/home/shellenv.nix new file mode 100644 index 0000000..ae9004c --- /dev/null +++ b/share/home/shellenv.nix @@ -0,0 +1,51 @@ +{ ... }: { + home.shellAliases = { + ltg = "ls --git --tree"; + ltgi = "ltg --git-ignore"; + }; + programs.eza = { + enable = true; + enableAliases = true; + icons = true; + extraOptions = [ "--header" "--group-directories-first" "--long" ]; + }; + + programs.starship = { + enable = true; + # settings = let + # lightblue-bg = "bg:#769ff0"; + # lightblue-fg = "fg:#e3e5e5"; + # lightblue = "${lightblue-fg} ${lightblue-bg}"; + # in { + # format = lib.concatStrings [ + # "[░▒▓](#a3aed2)" + # "[$username @ $hostname](${lightblue})" + # "$directory" + # "$rust" + # "$package" + # "\n" + # "> " + # ]; + # + # hostname = { + # ssh_only = false; + # format = "[$hostname]($style)"; + # trim_at = ""; # disable trimming + # style = lightblue; + # }; + # + # username = { + # show_always = true; + # format = "[$user]($style)"; + # style_user = lightblue; + # style_root = "${lightblue-bg} fg:red bold"; + # }; + # + # directory = { + # format = "[ $path ]($style)"; + # truncation_length = 3; + # truncation_symbol = "…/"; + # }; + # }; # end of settings + }; # end of programs.starship +} diff --git a/share/home/zsh.nix b/share/home/zsh.nix index 4a52f5c..cbc8428 100644 --- a/share/home/zsh.nix +++ b/share/home/zsh.nix @@ -1,4 +1,6 @@ -{ pkgs, ... }: { +{ ... }: { + imports = [ ./shellenv.nix ]; + programs.zsh = { enable = true; enableAutosuggestions = true; @@ -7,65 +9,6 @@ enableVteIntegration = true; autocd = true; dotDir = ".config/zsh"; - - shellAliases = { - battery-status = '' - upower -i $(upower -e | grep BAT) | grep -E "state|to full|percentage" - ''; - ip = ''ip --color=auto''; - ltg = "ls --git --tree"; - ltgi = "ltg --git-ignore"; - sl = "sl -awFc5"; - tempdir = "cd $(mktemp -d)"; - }; - }; - home.packages = with pkgs; [ sl ]; - - programs.eza = { - enable = true; - enableAliases = true; - icons = true; - extraOptions = [ "--header" "--group-directories-first" "--long" ]; }; - - programs.starship = { - enable = true; - enableZshIntegration = true; - - # settings = let - # lightblue-bg = "bg:#769ff0"; - # lightblue-fg = "fg:#e3e5e5"; - # lightblue = "${lightblue-fg} ${lightblue-bg}"; - # in { - # format = lib.concatStrings [ - # "[░▒▓](#a3aed2)" - # "[$username @ $hostname](${lightblue})" - # "$directory" - # "$rust" - # "$package" - # "\n" - # "> " - # ]; - # - # hostname = { - # ssh_only = false; - # format = "[$hostname]($style)"; - # trim_at = ""; # disable trimming - # style = lightblue; - # }; - # - # username = { - # show_always = true; - # format = "[$user]($style)"; - # style_user = lightblue; - # style_root = "${lightblue-bg} fg:red bold"; - # }; - # - # directory = { - # format = "[ $path ]($style)"; - # truncation_length = 3; - # truncation_symbol = "…/"; - # }; - # }; # end of settings - }; # end of programs.starship + programs.starship.enableZshIntegration = true; } diff --git a/share/system/client-common.nix b/share/system/client-common.nix index 59dfa5f..63c5219 100644 --- a/share/system/client-common.nix +++ b/share/system/client-common.nix @@ -54,7 +54,4 @@ overpass inter ]; - - programs.zsh.enable = true; - users.defaultUserShell = pkgs.zsh; } |
