Files
nix-dotfiles/darwin-configuration.nix
2021-12-20 21:35:49 +00:00

59 lines
1.6 KiB
Nix

{ config, lib, pkgs, ... }:
let python = import ./python.nix { inherit pkgs; }; in
{
nix.useDaemon = true;
imports = [ <home-manager/nix-darwin> ];
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.Patrick = import ./home.nix;
# List packages installed in system profile. To search by name, run:
# $ nix-env -qaP | grep wget
environment.systemPackages =
[
pkgs.alacritty
pkgs.rustup
pkgs.libiconv
pkgs.clang
#pkgs.keepassxc
python
];
# This line is required; otherwise, on shell startup, you won't have Nix stuff in the PATH.
programs.zsh.enable = true;
# Use a custom configuration.nix location.
# $ darwin-rebuild switch -I darwin-config=$HOME/.config/nixpkgs/darwin/configuration.nix
environment.darwinConfig = "$HOME/.nixpkgs/darwin-configuration.nix";
nixpkgs.overlays = [
(import (builtins.fetchTarball {
url = https://github.com/nix-community/emacs-overlay/archive/9516033899da467b8fcee6536a61ea66ebd0c4fa.tar.gz;
}))
];
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
"vscode"
];
# Auto upgrade nix package and the daemon service.
services.nix-daemon.enable = true;
nix.package = pkgs.nixFlakes;
nix.gc.automatic = true;
nix.useSandbox = true;
nix.extraOptions = ''
auto-optimise-store = true
experimental-features = nix-command flakes
'';
# Used for backwards compatibility, please read the changelog before changing.
# $ darwin-rebuild changelog
system.stateVersion = 4;
}