mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-03-17 23:14:07 +01:00
fix: nix-darwin with nixos-23.11
This commit is contained in:
35
flake.lock
generated
35
flake.lock
generated
@@ -187,22 +187,6 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"catppuccin-wezterm": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1681259790,
|
||||
"narHash": "sha256-McSWoZaJeK+oqdK/0vjiRxZGuLBpEB10Zg4+7p5dIGY=",
|
||||
"owner": "catppuccin",
|
||||
"repo": "wezterm",
|
||||
"rev": "b1a81bae74d66eaae16457f2d8f151b5bd4fe5da",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "catppuccin",
|
||||
"repo": "wezterm",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"cattppuccin-k9s": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
@@ -345,11 +329,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1699783872,
|
||||
"narHash": "sha256-4zTwLT2LL45Nmo6iwKB3ls3hWodVP9DiSWxki/oewWE=",
|
||||
"lastModified": 1701040754,
|
||||
"narHash": "sha256-rHld3E3CeVI/GUxH3xE+mqAo+IX2hTbXVfXKahCrG5I=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "280721186ab75a76537713ec310306f0eba3e407",
|
||||
"rev": "7c97c46dc4f45f2a78df536a6ebe15252831b800",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -615,11 +599,11 @@
|
||||
},
|
||||
"nixpkgs-darwin": {
|
||||
"locked": {
|
||||
"lastModified": 1699725108,
|
||||
"narHash": "sha256-NTiPW4jRC+9puakU4Vi8WpFEirhp92kTOSThuZke+FA=",
|
||||
"lastModified": 1700977043,
|
||||
"narHash": "sha256-tX4d36Bq75NBjnYGaCO9b403VDpdFa99NtdUPQ4EALk=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "911ad1e67f458b6bcf0278fa85e33bb9924fed7e",
|
||||
"rev": "abbe047fb8a5a7074b6de24cced0dbdb27ea0ea8",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -731,11 +715,11 @@
|
||||
},
|
||||
"nixpkgs_5": {
|
||||
"locked": {
|
||||
"lastModified": 1699781429,
|
||||
"narHash": "sha256-UYefjidASiLORAjIvVsUHG6WBtRhM67kTjEY4XfZOFs=",
|
||||
"lastModified": 1700794826,
|
||||
"narHash": "sha256-RyJTnTNKhO0yqRpDISk03I/4A67/dp96YRxc86YOPgU=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "e44462d6021bfe23dfb24b775cc7c390844f773d",
|
||||
"rev": "5a09cb4b393d58f9ed0d9ca1555016a8543c2ac8",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -841,7 +825,6 @@
|
||||
"catppuccin-helix": "catppuccin-helix",
|
||||
"catppuccin-hyprland": "catppuccin-hyprland",
|
||||
"catppuccin-starship": "catppuccin-starship",
|
||||
"catppuccin-wezterm": "catppuccin-wezterm",
|
||||
"cattppuccin-k9s": "cattppuccin-k9s",
|
||||
"home-manager": "home-manager_2",
|
||||
"hyprland": "hyprland",
|
||||
|
||||
23
flake.nix
23
flake.nix
@@ -277,13 +277,13 @@
|
||||
# which represents the GitHub repository URL + branch/commit-id/tag.
|
||||
|
||||
# Official NixOS package source, using nixos's stable branch by default
|
||||
# nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05";
|
||||
# nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11";
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
|
||||
# for macos
|
||||
# nixpkgs-darwin.url = "github:nixos/nixpkgs/nixpkgs-23.05-darwin";
|
||||
nixpkgs-darwin.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
||||
# nixpkgs-darwin.url = "github:nixos/nixpkgs/nixpkgs-23.11-darwin";
|
||||
nix-darwin = {
|
||||
url = "github:lnl7/nix-darwin";
|
||||
inputs.nixpkgs.follows = "nixpkgs-darwin";
|
||||
@@ -291,7 +291,7 @@
|
||||
|
||||
# home-manager, used for managing user configuration
|
||||
home-manager = {
|
||||
# url = "github:nix-community/home-manager/release-23.05";
|
||||
# url = "github:nix-community/home-manager/release-23.11";
|
||||
url = "github:nix-community/home-manager/master";
|
||||
# The `follows` keyword in inputs is used for inheritance.
|
||||
# Here, `inputs.nixpkgs` of home-manager is kept consistent with the `inputs.nixpkgs` of the current flake,
|
||||
@@ -378,10 +378,6 @@
|
||||
url = "github:catppuccin/alacritty";
|
||||
flake = false;
|
||||
};
|
||||
catppuccin-wezterm = {
|
||||
url = "github:catppuccin/wezterm";
|
||||
flake = false;
|
||||
};
|
||||
catppuccin-helix = {
|
||||
url = "github:catppuccin/helix";
|
||||
flake = false;
|
||||
@@ -406,16 +402,19 @@
|
||||
|
||||
# the nixConfig here only affects the flake itself, not the system configuration!
|
||||
nixConfig = {
|
||||
experimental-features = ["nix-command" "flakes"];
|
||||
|
||||
substituters = [
|
||||
# cache mirror located in China
|
||||
# status: https://mirror.sjtu.edu.cn/
|
||||
"https://mirror.sjtu.edu.cn/nix-channels/store"
|
||||
# status: https://mirrors.ustc.edu.cn/status/
|
||||
# "https://mirrors.ustc.edu.cn/nix-channels/store"
|
||||
|
||||
# my own cache server
|
||||
"https://ryan4yin.cachix.org"
|
||||
# replace official cache with a mirror located in China
|
||||
"https://mirrors.ustc.edu.cn/nix-channels/store"
|
||||
"https://cache.nixos.org"
|
||||
"https://anyrun.cachix.org"
|
||||
"https://hyprland.cachix.org"
|
||||
|
||||
"https://cache.nixos.org"
|
||||
];
|
||||
|
||||
# nix community's cache server
|
||||
|
||||
@@ -1,12 +1,9 @@
|
||||
{
|
||||
pkgs,
|
||||
pkgs-unstable,
|
||||
...
|
||||
}: {
|
||||
home.packages = with pkgs; [
|
||||
# general tools
|
||||
terraform
|
||||
pkgs-unstable.terraformer # generate terraform configs from existing cloud resources
|
||||
pulumi
|
||||
pulumictl
|
||||
# istioctl
|
||||
|
||||
@@ -46,7 +46,6 @@
|
||||
# other tools
|
||||
bfg-repo-cleaner # remove large files from git history
|
||||
k6 # load testing tool
|
||||
mitmproxy # http/https proxy tool
|
||||
protobuf # protocol buffer compiler
|
||||
];
|
||||
|
||||
|
||||
@@ -103,7 +103,7 @@
|
||||
|
||||
#-- CloudNative
|
||||
nodePackages.dockerfile-language-server-nodejs
|
||||
terraform
|
||||
# terraform # install via brew on macOS
|
||||
terraform-ls
|
||||
jsonnet
|
||||
jsonnet-language-server
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
pkgs-unstable,
|
||||
catppuccin-wezterm,
|
||||
...
|
||||
}:
|
||||
###########################################################
|
||||
@@ -15,11 +12,14 @@
|
||||
{
|
||||
# wezterm has catppuccin theme built-in,
|
||||
# it's not necessary to install it separately.
|
||||
# xdg.configFile."wezterm/colors".source = "${catppuccin-wezterm}/dist";
|
||||
|
||||
programs.wezterm = {
|
||||
enable = true;
|
||||
package = pkgs-unstable.wezterm;
|
||||
package = if pkgs.stdenv.isDarwin
|
||||
then
|
||||
pkgs.hello # install wezterm via homebrew on macOS to avoid compilation, dummy package here.
|
||||
else
|
||||
pkgs.wezterm;
|
||||
|
||||
extraConfig =
|
||||
let
|
||||
|
||||
@@ -16,9 +16,6 @@
|
||||
'';
|
||||
|
||||
home.packages = with pkgs; [
|
||||
# Automatically trims your branches whose tracking remote refs are merged or gone
|
||||
# It's really useful when you work on a project for a long time.
|
||||
git-trim
|
||||
];
|
||||
|
||||
programs.git = {
|
||||
|
||||
@@ -1,6 +1,14 @@
|
||||
{pkgs, ...}: {
|
||||
# Linux Only Packages, not available on Darwin
|
||||
home.packages = with pkgs; [
|
||||
# Automatically trims your branches whose tracking remote refs are merged or gone
|
||||
# It's really useful when you work on a project for a long time.
|
||||
git-trim
|
||||
|
||||
# cloud tools that nix do not have cache for.
|
||||
terraform
|
||||
terraformer # generate terraform configs from existing cloud resources
|
||||
|
||||
nmon
|
||||
iotop
|
||||
iftop
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
|
||||
# misc
|
||||
flameshot
|
||||
mitmproxy # http/https proxy tool
|
||||
];
|
||||
|
||||
# GitHub CLI tool
|
||||
|
||||
@@ -27,7 +27,7 @@ in
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
|
||||
|
||||
home-manager.extraSpecialArgs = specialArgs;
|
||||
home-manager.users."${username}" = home-module;
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
|
||||
# homebrew need to be installed manually, see https://brew.sh
|
||||
homebrew = {
|
||||
enable = false;
|
||||
enable = true;
|
||||
|
||||
onActivation = {
|
||||
autoUpdate = false;
|
||||
@@ -83,6 +83,7 @@
|
||||
"aria2" # download tool
|
||||
"httpie" # http client
|
||||
"wireguard-tools" # wireguard
|
||||
"mitmproxy"
|
||||
|
||||
# Usage:
|
||||
# https://github.com/tailscale/tailscale/wiki/Tailscaled-on-macOS#run-the-tailscaled-daemon
|
||||
@@ -97,10 +98,17 @@
|
||||
# commands like `gsed` `gtar` are required by some tools
|
||||
"gnu-sed"
|
||||
"gnu-tar"
|
||||
|
||||
# misc that nix do not have cache for.
|
||||
"git-trim"
|
||||
"terraform"
|
||||
"terraformer"
|
||||
];
|
||||
|
||||
# `brew install --cask`
|
||||
casks = [
|
||||
"wezterm"
|
||||
|
||||
"squirrel" # input method for Chinese, rime-squirrel
|
||||
|
||||
"firefox"
|
||||
|
||||
@@ -35,7 +35,10 @@
|
||||
options = lib.mkDefault "--delete-older-than 7d";
|
||||
};
|
||||
|
||||
# Manual optimise storage: nix-store --optimise
|
||||
# https://nixos.org/manual/nix/stable/command-ref/conf-file.html#conf-auto-optimise-store
|
||||
nix.settings.auto-optimise-store = true;
|
||||
# Disable auto-optimise-store because of this issue:
|
||||
# https://github.com/NixOS/nix/issues/7273
|
||||
# "error: cannot link '/nix/store/.tmp-link-xxxxx-xxxxx' to '/nix/store/.links/xxxx': File exists"
|
||||
nix.settings = {
|
||||
auto-optimise-store = false;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -151,10 +151,14 @@
|
||||
|
||||
# Fonts
|
||||
fonts = {
|
||||
# use fonts specified by user rather than default ones
|
||||
# will be removed after this PR is merged:
|
||||
# https://github.com/LnL7/nix-darwin/pull/754
|
||||
fontDir.enable = true;
|
||||
|
||||
packages = with pkgs; [
|
||||
# will change to `fonts.packages` after this PR is merged:
|
||||
# https://github.com/LnL7/nix-darwin/pull/754
|
||||
fonts = with pkgs; [
|
||||
# packages = with pkgs; [
|
||||
# icon fonts
|
||||
material-design-icons
|
||||
font-awesome
|
||||
|
||||
Reference in New Issue
Block a user