summaryrefslogtreecommitdiff
path: root/hosts/morpheus/configuration.nix
blob: 8b2ba27a3e7959c28a332be00098f9e0e6d745ff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
{ config, pkgs, ... }:

{
  services.nix-daemon.enable = true;
  users.users.shubh.home = "/Users/shubh";
  programs.zsh.enable = true;
  programs.zsh.promptInit = ''
  '';
  environment.pathsToLink = ["/share/zsh"];
  security.pki.certificateFiles = [ "${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt" "/etc/ssl/certs/zscaler.pem" ];

  homebrew = {
    enable = true;
    casks = [ "brave-browser" "karabiner-elements" "adobe-acrobat-reader" ];
  };

  nixpkgs = {
    config = {
      allowUnfree = true;
      input-fonts.acceptLicense = true;
    };
  };

  nix = {
    extraOptions = ''
      experimental-features = nix-command flakes
    '';
  };

  system.activationScripts.applications.text = pkgs.lib.mkForce (
    ''
      echo "setting up ~/Applications..." >&2
      rm -rf ~/Applications/Nix\ Apps
      mkdir -p ~/Applications/Nix\ Apps
      for app in $(find ${config.system.build.applications}/Applications -maxdepth 1 -type l); do
        src="$(/usr/bin/stat -f%Y "$app")"
        cp -r "$src" ~/Applications/Nix\ Apps
      done
    ''
  );
}