diff --git a/nixos-configuration/steveej-live-usb/boot.nix b/nixos-configuration/steveej-live-usb/boot.nix index 95780ab..f8ad805 100644 --- a/nixos-configuration/steveej-live-usb/boot.nix +++ b/nixos-configuration/steveej-live-usb/boot.nix @@ -4,9 +4,11 @@ boot.kernelPackages = pkgs.linuxPackages_latest; # Bootloader, initrd and Kernel - boot.loader.grub.enable = true; - boot.loader.grub.enableCryptodisk = true; - boot.loader.grub.version = 2; + boot.loader.grub = { + enable = true; + enableCryptodisk = true; + version = 2; + }; # workaround to disable CPU wining # current CPU has 9 idle cstates. diff --git a/nixos-configuration/steveej-live-usb/hw.nix b/nixos-configuration/steveej-live-usb/hw.nix index 3eebc18..faa07e0 100644 --- a/nixos-configuration/steveej-live-usb/hw.nix +++ b/nixos-configuration/steveej-live-usb/hw.nix @@ -21,7 +21,7 @@ boot.extraModulePackages = [ ]; boot.loader.systemd-boot.enable = true; - boot.loader.efi.canTouchEfiVariables = true; + boot.loader.efi.canTouchEfiVariables = false; fileSystems."/boot" = { device = "/dev/disk/by-id/usb-SCSI_DISK_9E216FC57FBD4AE1-0:0-part2"; @@ -47,6 +47,7 @@ boot.loader.grub = { device = "/dev/disk/by-id/usb-SCSI_DISK_9E216FC57FBD4AE1-0:0"; efiSupport = true; + efiInstallAsRemovable = true; }; boot.initrd.luks.devices = [ { diff --git a/nixos-configuration/steveej-live-usb/pkg.nix b/nixos-configuration/steveej-live-usb/pkg.nix index 50145ca..eed0765 100644 --- a/nixos-configuration/steveej-live-usb/pkg.nix +++ b/nixos-configuration/steveej-live-usb/pkg.nix @@ -3,9 +3,13 @@ ... }: let + environmentVariables = { + EDITOR = "nvim"; + }; in { + nixpkgs.config = { allowBroken = false; allowUnfree = true; @@ -15,15 +19,149 @@ in }; }; - imports = - [ - ../common/pkg/default.nix - ]; + imports = [ + ../common/pkg/default.nix + "${builtins.fetchGit { url = "https://github.com/rycee/home-manager.git"; ref = "master"; }}/nixos" + ]; environment.systemPackages = with pkgs; [ - firefox - gitFull - gpg2 - nvim ]; + + + home-manager.users.steveej = { + /* + programs.firefox = { + enable = true; + enableAdobeFlash = false; + enableGoogleTalk = true; + enableIcedTea = true; + }; + + programs.command-not-found.enable = true; + + programs.zsh = { + enable = true; + + # will be called again by oh-my-zsh + enableCompletion = false; + enableAutosuggestions = true; + initExtra = '' + PROMPT='%F{%(!.red.green)}%n%f@%m %(?.%F{green}✓%f.%F{red}✗ ($?%))%f %F{blue}%~%f %F{magenta}$(git_prompt_info)%f +%_%F{%(!.red.green)}$(prompt_char)%f ' + RPROMPT="" + + # Automatic rehash + zstyle ':completion:*' rehash true + + if [ -f $HOME/.shrc.d/sh_aliases ]; then + . $HOME/.shrc.d/sh_aliases + fi + + source "$HOME/.homesick/repos/homeshick/homeshick.sh" + fpath=($HOME/.homesick/repos/homeshick/completions $fpath) + + + # Disable intercepting of ctrl-s and ctrl-q as flow control. + stty stop ''' -ixoff -ixon + + # don't cd into directories when executed + unsetopt AUTO_CD + + # Load direnv + eval "$(direnv hook zsh)" + + source <(hcloud completion zsh) # zsh + ''; + sessionVariables = environmentVariables // { + # Add more envrionment variables here + }; + + plugins = [ + { + # will source zsh-autosuggestions.plugin.zsh + name = "zsh-autosuggestions"; + src = pkgs.fetchFromGitHub { + owner = "zsh-users"; + repo = "zsh-autosuggestions"; + rev = "v0.4.0"; + sha256 = "0z6i9wjjklb4lvr7zjhbphibsyx51psv50gm07mbb0kj9058j6kc"; + }; + } + { + name = "enhancd"; + file = "init.sh"; + src = pkgs.fetchFromGitHub { + owner = "b4b4r07"; + repo = "enhancd"; + rev = "v2.2.1"; + sha256 = "0iqa9j09fwm6nj5rpip87x3hnvbbz9w9ajgm6wkrd5fls8fn8i5g"; + }; + } + { + name = "pass"; + src = "${pkgs.oh-my-zsh}/share/oh-my-zsh/plugins/pass"; + } + { + name = "minikube"; + src = "${pkgs.oh-my-zsh}/share/oh-my-zsh/plugins/minikube"; + } + ]; + oh-my-zsh = { + enable = true; + theme = "tjkirch"; + plugins = [ + "git" + "sudo" + ]; + }; + }; + + programs.neovim = { + enable = true; + }; + + home.keyboard = { + layout = "us"; + variant = "altgr-intl"; + options = [ + "nodeadkeys" + # "caps:swapescape" + ]; + }; + + home.packages = [] + ++ (with pkgs; [ + # Version Control Systems + git-crypt + unstablepkgs.pijul + gitFull + gitless + + # Password Management + gnupg + (hiPrio pass) + pass-otp + qtpass + rofi-pass + yubikey-neo-manager + yubikey-personalization + yubikey-personalization-gui + gnome3.gnome_keyring + gnome3.seahorse + + # Code Editors + xclip + xsel + + # Archive Managers + sshfsFuse + xarchive + p7zip + zip + unzip + gzip + lzop + ]); + */ + }; }