aboutsummaryrefslogtreecommitdiff
path: root/macos.local/.flake/system/core.nix.org
blob: f342e60d7387733b55a82e8e0e0654a5827b835c (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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#+title: System Core

This file imports various system configuration components in addition to enabling flakes and defining the system version.
#+begin_src nix
  { config, pkgs, ... }:

  let
  inherit (pkgs) aspellWithDicts;
  myaspell = aspellWithDicts (d: [d.en d.en-computers d.en-science]);
  in {
    imports = [
      ./aerospace.nix
      ./homebrew.nix
    ];

    # Unfortunately, I sometimes need unfree packages
    nixpkgs.config.allowUnfree = true;

    # Install a small number of packages for root
    environment.systemPackages = with pkgs; [
      gnupg
      myaspell
      neovim
    ];

    # Use TouchID for sudo
    security.pam.enableSudoTouchIdAuth = true;

    # Open text files in neovim by default
    environment.variables.EDITOR = "nvim";

    # Run Gnu Privacy Guard
    programs.gnupg.agent.enable = false;

    # Enable nix
    services.nix-daemon.enable = true;
    nix.package = pkgs.nix;

    # Use flakes
    nix.settings.experimental-features = "nix-command flakes";

    # Use zsh as my shell
    programs.zsh.enable = true;

    system.stateVersion = 5;

    # Use ARM64 packages
    nixpkgs.hostPlatform = "aarch64-darwin";

    # Define my user
    users.users.jjanzen = {
      name = "jjanzen";
      home = "/Users/jjanzen";
    };
  }
#+end_src