From 5b8d1da3f3dfd9bc1da2882d2b73be32608a554b Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Wed, 29 Mar 2023 15:38:01 +0100 Subject: [PATCH] Set fish as default shell, set home-manager to manage bash, zsh and fish configs --- nixos/H0615-elitherl.nix | 3 ++- nixos/common.nix | 16 +++++++++++++--- nixos/home-manager/common.nix | 3 --- nixos/home-manager/packages/env/bash.nix | 5 +++++ nixos/home-manager/packages/env/default.nix | 3 +++ nixos/home-manager/packages/env/fish.nix | 5 +++++ nixos/home-manager/packages/env/zsh.nix | 15 +++++++++++++++ nixos/vanguard-xenia.nix | 3 ++- 8 files changed, 45 insertions(+), 8 deletions(-) create mode 100644 nixos/home-manager/packages/env/bash.nix create mode 100644 nixos/home-manager/packages/env/fish.nix create mode 100644 nixos/home-manager/packages/env/zsh.nix diff --git a/nixos/H0615-elitherl.nix b/nixos/H0615-elitherl.nix index c1ef363a..d0ddd06f 100644 --- a/nixos/H0615-elitherl.nix +++ b/nixos/H0615-elitherl.nix @@ -1,4 +1,4 @@ -{ config, pkgs, ... }: +{ pkgs, ... }: { imports = [ @@ -14,6 +14,7 @@ isNormalUser = true; description = "Evie Litherland-Smith"; extraGroups = [ "networkmanager" "wheel" ]; + shell = pkgs.fish; }; # Enable automatic login for the user. diff --git a/nixos/common.nix b/nixos/common.nix index 5e093c0d..ecf1d901 100644 --- a/nixos/common.nix +++ b/nixos/common.nix @@ -1,4 +1,4 @@ -{ config, pkgs, ... }: +{ ... }: let home-manager = builtins.fetchTarball "https://github.com/nix-community/home-manager/archive/master.tar.gz"; @@ -12,8 +12,6 @@ in # Allow unfree packages nixpkgs.config.allowUnfree = true; - environment.systemPackages = with pkgs; [ ]; - home-manager.useUserPackages = false; home-manager.useGlobalPkgs = false; @@ -22,6 +20,18 @@ in # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. programs.ssh.startAgent = true; + programs.bash.enable = true; + programs.fish.enable = true; + programs.zsh = { + enable = true; + enableCompletion = true; + autosuggestions = { + enable = true; + }; + syntaxHighlighting = { + enable = true; + }; + }; nix.gc = { automatic = true; diff --git a/nixos/home-manager/common.nix b/nixos/home-manager/common.nix index af38cfae..80d87c2a 100644 --- a/nixos/home-manager/common.nix +++ b/nixos/home-manager/common.nix @@ -16,9 +16,6 @@ enable = true; userName = "Evie Litherland-Smith"; }; - programs.bash.enable = true; - programs.zsh.enable = true; - programs.fish.enable = true; programs.starship = { enable = true; enableBashIntegration = true; diff --git a/nixos/home-manager/packages/env/bash.nix b/nixos/home-manager/packages/env/bash.nix new file mode 100644 index 00000000..8e7df86c --- /dev/null +++ b/nixos/home-manager/packages/env/bash.nix @@ -0,0 +1,5 @@ +{ ... }: + +{ + programs.bash.enable = true; +} diff --git a/nixos/home-manager/packages/env/default.nix b/nixos/home-manager/packages/env/default.nix index 7a8255a6..d2255b6a 100644 --- a/nixos/home-manager/packages/env/default.nix +++ b/nixos/home-manager/packages/env/default.nix @@ -2,6 +2,9 @@ { imports = [ + ./bash.nix + ./zsh.nix + ./fish.nix ./qemu.nix ./python310.nix ]; diff --git a/nixos/home-manager/packages/env/fish.nix b/nixos/home-manager/packages/env/fish.nix new file mode 100644 index 00000000..d81c197e --- /dev/null +++ b/nixos/home-manager/packages/env/fish.nix @@ -0,0 +1,5 @@ +{ ... }: + +{ + programs.fish.enable = true; +} diff --git a/nixos/home-manager/packages/env/zsh.nix b/nixos/home-manager/packages/env/zsh.nix new file mode 100644 index 00000000..9c5dd48c --- /dev/null +++ b/nixos/home-manager/packages/env/zsh.nix @@ -0,0 +1,15 @@ +{ config, ... }: + +{ + programs.zsh = { + enable = true; + shellAliases = { + ll = "ls -l"; + update = "sudo nixos-rebuild switch"; + }; + history = { + size = 10000; + path = "${config.xdg.dataHome}/zsh/history"; + }; + }; +} diff --git a/nixos/vanguard-xenia.nix b/nixos/vanguard-xenia.nix index 7d4be48d..78c2a185 100644 --- a/nixos/vanguard-xenia.nix +++ b/nixos/vanguard-xenia.nix @@ -1,4 +1,4 @@ -{ config, pkgs, ... }: +{ pkgs, ... }: { imports = [ @@ -14,6 +14,7 @@ isNormalUser = true; description = "Evie Litherland-Smith"; extraGroups = [ "networkmanager" "wheel" ]; + shell = pkgs.fish; }; # Enable automatic login for the user.