diff --git a/hosts/paidh-tri.nix b/hosts/paidh-tri.nix index 1119dc5..a2d9bf7 100644 --- a/hosts/paidh-tri.nix +++ b/hosts/paidh-tri.nix @@ -13,7 +13,6 @@ environment.systemPackages = with pkgs; [ gnupg # GPL OpenPGP implementation - nix-zsh-completions # ZSH completions for Nix, NixOS, and NixOps nixops # NixOS cloud provisioning and deployment tool ]; diff --git a/hosts/paidh-uachdar.nix b/hosts/paidh-uachdar.nix new file mode 100644 index 0000000..69fc7a7 --- /dev/null +++ b/hosts/paidh-uachdar.nix @@ -0,0 +1,42 @@ +# NixOps configuration for pĂ idh-uachdar + +{ config, pkgs, lib, ... }: + +{ + imports = [ + ../hardware/raspberry_pi_3_model_B.nix + ../profiles/host_common.nix + ../profiles/openssh.nix + ../profiles/pi_common.nix + #../profiles/xmonad.nix + ../secrets/craige.nix # Ssshhhhh! + ../secrets/root.nix # Ssshhhhh! + ../secrets/wireless.nix # Hey look! A squirrel! + ]; + + # Comment out deployment when building the SD Image. + deployment.targetHost = "10.42.0.125"; + networking.hostName = "paidh-uachdar"; # Define your hostname. + + # Ensure the right package architecture is used + nixpkgs = { + config = { + allowUnfree = true; + allowUnsupportedSystem = true; + }; + localSystem = { + system = "aarch64-linux"; + config = "aarch64-unknown-linux-gnu"; + }; + }; + + documentation = { + nixos.enable = false; # Save some space by disabling the manual + }; + + environment.systemPackages = with pkgs; [ + gnupg # GPL OpenPGP implementation + ]; + + system.stateVersion = "20.09"; # The version of NixOS originally installed +} diff --git a/profiles/host_common.nix b/profiles/host_common.nix index 66d1f0b..9175978 100644 --- a/profiles/host_common.nix +++ b/profiles/host_common.nix @@ -7,6 +7,7 @@ imports = [ ./chrony.nix ./tmux.nix + ./zsh.nix ]; # Common boot settings @@ -99,29 +100,6 @@ }; }; - # Program defaults for all hosts - programs.zsh = { - enable = true; - autosuggestions = { - enable = true; - }; - interactiveShellInit = '' - export TERM="xterm-256color" - eval "$(direnv hook zsh)" - test -r ~/.dir_colors && eval $(dircolors ~/.dir_colors) - export GPG_TTY="$(tty)" - export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket) - gpgconf --launch gpg-agent - ''; - ohMyZsh = { - enable = true; - plugins = [ "git" ]; - }; - promptInit = "source ${pkgs.zsh-powerlevel9k}/share/zsh-powerlevel9k/powerlevel9k.zsh-theme"; - }; - - users.defaultUserShell = pkgs.zsh; # Set the default shell for all users - # Users common across MIO Ops: users.mutableUsers = false; # Remove any users not defined in here diff --git a/profiles/zsh.nix b/profiles/zsh.nix new file mode 100644 index 0000000..3873b45 --- /dev/null +++ b/profiles/zsh.nix @@ -0,0 +1,28 @@ +# Configuration common to all my servers + +{ config, pkgs, lib, ... }: + +{ + + # Program defaults for all hosts + programs.zsh = { + enable = true; # Also enables & installs nix-zsh-completions + autosuggestions.enable = true; + interactiveShellInit = '' + export TERM="xterm-256color" + eval "$(direnv hook zsh)" + test -r ~/.dir_colors && eval $(dircolors ~/.dir_colors) + export GPG_TTY="$(tty)" + export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket) + gpgconf --launch gpg-agent + ''; + ohMyZsh = { + enable = true; + plugins = [ "git" ]; + }; + promptInit = "source ${pkgs.zsh-powerlevel9k}/share/zsh-powerlevel9k/powerlevel9k.zsh-theme"; + }; + + users.defaultUserShell = pkgs.zsh; # Set the default shell for all users + +}