about summary refs log tree commit diff
path: root/home.nix
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2019-02-03T21·04+0000
committerVincent Ambo <mail@tazj.in>2019-02-03T21·04+0000
commitf661e4e6ebd196e86d1e2cbd17ba5ec95dbc2051 (patch)
tree46a6f3bf01f3bd7e7f7b250c67e1e8bdc0a6c80e /home.nix
parenta1751798f1f0bc4419ceab3353fe969508bb40b6 (diff)
feat(home): Add initial home-manager configuration for ChromeOS
Adds a home-manager configuration that can be used in a Crostini
container running Nix. There isn't any truly ChromeOS-specific stuff
in this yet, as I've set up the interoperability with garcon etc.
manually for now.
Diffstat (limited to 'home.nix')
-rw-r--r--home.nix75
1 files changed, 75 insertions, 0 deletions
diff --git a/home.nix b/home.nix
new file mode 100644
index 000000000000..236091cb019d
--- /dev/null
+++ b/home.nix
@@ -0,0 +1,75 @@
+# home-manager configuration used on ChromeOS systems
+
+{ config, pkgs, ... }:
+
+{
+  # Allow non-free software (fonts, IDEA, etc.):
+  nixpkgs.config.allowUnfree = true;
+
+  # Install various useful packages:
+  home.packages = with pkgs; [
+    bat
+    exa
+    gnupg
+    google-cloud-sdk
+    htop
+    pass
+    ripgrep
+    tdesktop
+    transmission
+    tree
+
+    # Fonts to make available in X11 applications:
+    input-fonts
+
+    # Emacs configuration stays in the normal ~/.emacs.d location (for
+    # now), hence this package is not installed via `programs.emacs`.
+    (import ./emacs.nix { inherit pkgs; })
+  ];
+
+  programs.git = {
+    enable = true;
+    userEmail = "mail@tazj.in";
+    userName = "Vincent Ambo";
+  };
+
+  services.gpg-agent = {
+    enable = true;
+    extraConfig = ''
+      pinentry-program ${pkgs.pinentry}/bin/pinentry-gtk-2
+      allow-emacs-pinentry
+    '';
+  };
+
+  # Let Home Manager install and manage itself.
+  programs.home-manager.enable = true;
+  manual.html.enable = true;
+
+  # Shell configuration
+  #
+  # There are some differences between the ChromeOS / NixOS
+  # configurations, so instead of fixing up the dotfile to support
+  # both I opted for keeping the configuration here.
+  programs.fish = {
+    enable = true;
+    interactiveShellInit = ''
+      # Configure classic prompt
+      set fish_color_user --bold blue
+      set fish_color_cwd --bold white
+
+      # Enable colour hints in VCS prompt:
+      set __fish_git_prompt_showcolorhints yes
+      set __fish_git_prompt_color_prefix purple
+      set __fish_git_prompt_color_suffix purple
+
+      # Fish configuration
+      set fish_greeting ""
+
+      # Fix up nix-env & friends for Nix 2.0
+      export NIX_REMOTE=daemon
+    '';
+  };
+
+  # Ensure fonts installed via Nix are picked up.
+  fonts.fontconfig.enableProfileFonts = true;
+}