2024-01-17 04:47:27 +00:00
|
|
|
{
|
|
|
|
inputs,
|
|
|
|
pkgs,
|
2024-02-26 05:31:57 +00:00
|
|
|
config,
|
|
|
|
lib,
|
2024-01-17 04:47:27 +00:00
|
|
|
...
|
|
|
|
}: {
|
|
|
|
### Options
|
|
|
|
home-manager.users.guanranwang = import ./home;
|
|
|
|
|
2023-11-17 05:38:25 +00:00
|
|
|
imports = [
|
|
|
|
./nix
|
2023-12-13 11:02:11 +00:00
|
|
|
./anti-features.nix
|
2024-01-03 14:41:18 +00:00
|
|
|
./networking.nix
|
2023-12-13 11:02:11 +00:00
|
|
|
|
2024-01-03 14:41:18 +00:00
|
|
|
inputs.self.darwinModules.default
|
2023-12-13 11:02:11 +00:00
|
|
|
inputs.home-manager.darwinModules.home-manager
|
2023-11-17 05:38:25 +00:00
|
|
|
];
|
2023-12-13 11:02:11 +00:00
|
|
|
|
2024-01-17 04:47:27 +00:00
|
|
|
users = {
|
|
|
|
knownUsers = ["guanranwang"];
|
|
|
|
users."guanranwang" = {
|
|
|
|
createHome = true;
|
|
|
|
description = "Guanran Wang";
|
|
|
|
home = "/Users/guanranwang";
|
|
|
|
shell = pkgs.fish;
|
|
|
|
uid = 501;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2023-12-13 11:02:11 +00:00
|
|
|
home-manager = {
|
|
|
|
useGlobalPkgs = true;
|
|
|
|
useUserPackages = true;
|
|
|
|
extraSpecialArgs = {inherit inputs;}; # ??? isnt specialArgs imported by default ???
|
|
|
|
};
|
2024-02-26 05:31:57 +00:00
|
|
|
|
|
|
|
# Create /etc/zshrc that loads the nix-darwin environment.
|
|
|
|
programs.zsh.enable = true; # default shell on catalina
|
|
|
|
programs.fish.enable = true;
|
|
|
|
|
|
|
|
# fucking horrible
|
|
|
|
# https://github.com/LnL7/nix-darwin/issues/122#issuecomment-1659465635
|
|
|
|
programs.fish.loginShellInit = let
|
|
|
|
dquote = str: "\"" + str + "\"";
|
|
|
|
|
|
|
|
makeBinPathList = map (path: path + "/bin");
|
|
|
|
in ''
|
|
|
|
fish_add_path --move --prepend --path ${lib.concatMapStringsSep " " dquote (makeBinPathList config.environment.profiles)}
|
|
|
|
set fish_user_paths $fish_user_paths
|
|
|
|
'';
|
2024-02-26 05:53:04 +00:00
|
|
|
|
|
|
|
# Install more recent versions of some macOS tools.
|
|
|
|
# https://github.com/mathiasbynens/dotfiles/blob/master/brew.sh
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
bashInteractive
|
|
|
|
coreutils
|
|
|
|
findutils
|
|
|
|
git
|
|
|
|
gnugrep
|
|
|
|
gnused
|
|
|
|
openssh
|
|
|
|
screen
|
|
|
|
tree
|
|
|
|
vim
|
|
|
|
];
|
2023-11-17 05:38:25 +00:00
|
|
|
}
|