mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-04-23 17:28:33 +02: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"
|
"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": {
|
"cattppuccin-k9s": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
@@ -345,11 +329,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1699783872,
|
"lastModified": 1701040754,
|
||||||
"narHash": "sha256-4zTwLT2LL45Nmo6iwKB3ls3hWodVP9DiSWxki/oewWE=",
|
"narHash": "sha256-rHld3E3CeVI/GUxH3xE+mqAo+IX2hTbXVfXKahCrG5I=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "280721186ab75a76537713ec310306f0eba3e407",
|
"rev": "7c97c46dc4f45f2a78df536a6ebe15252831b800",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -615,11 +599,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs-darwin": {
|
"nixpkgs-darwin": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1699725108,
|
"lastModified": 1700977043,
|
||||||
"narHash": "sha256-NTiPW4jRC+9puakU4Vi8WpFEirhp92kTOSThuZke+FA=",
|
"narHash": "sha256-tX4d36Bq75NBjnYGaCO9b403VDpdFa99NtdUPQ4EALk=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "911ad1e67f458b6bcf0278fa85e33bb9924fed7e",
|
"rev": "abbe047fb8a5a7074b6de24cced0dbdb27ea0ea8",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -731,11 +715,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs_5": {
|
"nixpkgs_5": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1699781429,
|
"lastModified": 1700794826,
|
||||||
"narHash": "sha256-UYefjidASiLORAjIvVsUHG6WBtRhM67kTjEY4XfZOFs=",
|
"narHash": "sha256-RyJTnTNKhO0yqRpDISk03I/4A67/dp96YRxc86YOPgU=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "e44462d6021bfe23dfb24b775cc7c390844f773d",
|
"rev": "5a09cb4b393d58f9ed0d9ca1555016a8543c2ac8",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -841,7 +825,6 @@
|
|||||||
"catppuccin-helix": "catppuccin-helix",
|
"catppuccin-helix": "catppuccin-helix",
|
||||||
"catppuccin-hyprland": "catppuccin-hyprland",
|
"catppuccin-hyprland": "catppuccin-hyprland",
|
||||||
"catppuccin-starship": "catppuccin-starship",
|
"catppuccin-starship": "catppuccin-starship",
|
||||||
"catppuccin-wezterm": "catppuccin-wezterm",
|
|
||||||
"cattppuccin-k9s": "cattppuccin-k9s",
|
"cattppuccin-k9s": "cattppuccin-k9s",
|
||||||
"home-manager": "home-manager_2",
|
"home-manager": "home-manager_2",
|
||||||
"hyprland": "hyprland",
|
"hyprland": "hyprland",
|
||||||
|
|||||||
23
flake.nix
23
flake.nix
@@ -277,13 +277,13 @@
|
|||||||
# which represents the GitHub repository URL + branch/commit-id/tag.
|
# which represents the GitHub repository URL + branch/commit-id/tag.
|
||||||
|
|
||||||
# Official NixOS package source, using nixos's stable branch by default
|
# 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.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
|
|
||||||
# for macos
|
# 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-unstable";
|
||||||
|
# nixpkgs-darwin.url = "github:nixos/nixpkgs/nixpkgs-23.11-darwin";
|
||||||
nix-darwin = {
|
nix-darwin = {
|
||||||
url = "github:lnl7/nix-darwin";
|
url = "github:lnl7/nix-darwin";
|
||||||
inputs.nixpkgs.follows = "nixpkgs-darwin";
|
inputs.nixpkgs.follows = "nixpkgs-darwin";
|
||||||
@@ -291,7 +291,7 @@
|
|||||||
|
|
||||||
# home-manager, used for managing user configuration
|
# home-manager, used for managing user configuration
|
||||||
home-manager = {
|
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";
|
url = "github:nix-community/home-manager/master";
|
||||||
# The `follows` keyword in inputs is used for inheritance.
|
# 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,
|
# 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";
|
url = "github:catppuccin/alacritty";
|
||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
catppuccin-wezterm = {
|
|
||||||
url = "github:catppuccin/wezterm";
|
|
||||||
flake = false;
|
|
||||||
};
|
|
||||||
catppuccin-helix = {
|
catppuccin-helix = {
|
||||||
url = "github:catppuccin/helix";
|
url = "github:catppuccin/helix";
|
||||||
flake = false;
|
flake = false;
|
||||||
@@ -406,16 +402,19 @@
|
|||||||
|
|
||||||
# the nixConfig here only affects the flake itself, not the system configuration!
|
# the nixConfig here only affects the flake itself, not the system configuration!
|
||||||
nixConfig = {
|
nixConfig = {
|
||||||
experimental-features = ["nix-command" "flakes"];
|
|
||||||
|
|
||||||
substituters = [
|
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
|
# my own cache server
|
||||||
"https://ryan4yin.cachix.org"
|
"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://anyrun.cachix.org"
|
||||||
"https://hyprland.cachix.org"
|
"https://hyprland.cachix.org"
|
||||||
|
|
||||||
|
"https://cache.nixos.org"
|
||||||
];
|
];
|
||||||
|
|
||||||
# nix community's cache server
|
# nix community's cache server
|
||||||
|
|||||||
@@ -1,12 +1,9 @@
|
|||||||
{
|
{
|
||||||
pkgs,
|
pkgs,
|
||||||
pkgs-unstable,
|
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
# general tools
|
# general tools
|
||||||
terraform
|
|
||||||
pkgs-unstable.terraformer # generate terraform configs from existing cloud resources
|
|
||||||
pulumi
|
pulumi
|
||||||
pulumictl
|
pulumictl
|
||||||
# istioctl
|
# istioctl
|
||||||
|
|||||||
@@ -46,7 +46,6 @@
|
|||||||
# other tools
|
# other tools
|
||||||
bfg-repo-cleaner # remove large files from git history
|
bfg-repo-cleaner # remove large files from git history
|
||||||
k6 # load testing tool
|
k6 # load testing tool
|
||||||
mitmproxy # http/https proxy tool
|
|
||||||
protobuf # protocol buffer compiler
|
protobuf # protocol buffer compiler
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@@ -103,7 +103,7 @@
|
|||||||
|
|
||||||
#-- CloudNative
|
#-- CloudNative
|
||||||
nodePackages.dockerfile-language-server-nodejs
|
nodePackages.dockerfile-language-server-nodejs
|
||||||
terraform
|
# terraform # install via brew on macOS
|
||||||
terraform-ls
|
terraform-ls
|
||||||
jsonnet
|
jsonnet
|
||||||
jsonnet-language-server
|
jsonnet-language-server
|
||||||
|
|||||||
@@ -1,8 +1,5 @@
|
|||||||
{
|
{
|
||||||
lib,
|
|
||||||
pkgs,
|
pkgs,
|
||||||
pkgs-unstable,
|
|
||||||
catppuccin-wezterm,
|
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
###########################################################
|
###########################################################
|
||||||
@@ -15,11 +12,14 @@
|
|||||||
{
|
{
|
||||||
# wezterm has catppuccin theme built-in,
|
# wezterm has catppuccin theme built-in,
|
||||||
# it's not necessary to install it separately.
|
# it's not necessary to install it separately.
|
||||||
# xdg.configFile."wezterm/colors".source = "${catppuccin-wezterm}/dist";
|
|
||||||
|
|
||||||
programs.wezterm = {
|
programs.wezterm = {
|
||||||
enable = true;
|
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 =
|
extraConfig =
|
||||||
let
|
let
|
||||||
|
|||||||
@@ -16,9 +16,6 @@
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
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 = {
|
programs.git = {
|
||||||
|
|||||||
@@ -1,6 +1,14 @@
|
|||||||
{pkgs, ...}: {
|
{pkgs, ...}: {
|
||||||
# Linux Only Packages, not available on Darwin
|
# Linux Only Packages, not available on Darwin
|
||||||
home.packages = with pkgs; [
|
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
|
nmon
|
||||||
iotop
|
iotop
|
||||||
iftop
|
iftop
|
||||||
|
|||||||
@@ -29,6 +29,7 @@
|
|||||||
|
|
||||||
# misc
|
# misc
|
||||||
flameshot
|
flameshot
|
||||||
|
mitmproxy # http/https proxy tool
|
||||||
];
|
];
|
||||||
|
|
||||||
# GitHub CLI tool
|
# GitHub CLI tool
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ in
|
|||||||
{
|
{
|
||||||
home-manager.useGlobalPkgs = true;
|
home-manager.useGlobalPkgs = true;
|
||||||
home-manager.useUserPackages = true;
|
home-manager.useUserPackages = true;
|
||||||
|
|
||||||
home-manager.extraSpecialArgs = specialArgs;
|
home-manager.extraSpecialArgs = specialArgs;
|
||||||
home-manager.users."${username}" = home-module;
|
home-manager.users."${username}" = home-module;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,7 +44,7 @@
|
|||||||
|
|
||||||
# homebrew need to be installed manually, see https://brew.sh
|
# homebrew need to be installed manually, see https://brew.sh
|
||||||
homebrew = {
|
homebrew = {
|
||||||
enable = false;
|
enable = true;
|
||||||
|
|
||||||
onActivation = {
|
onActivation = {
|
||||||
autoUpdate = false;
|
autoUpdate = false;
|
||||||
@@ -83,6 +83,7 @@
|
|||||||
"aria2" # download tool
|
"aria2" # download tool
|
||||||
"httpie" # http client
|
"httpie" # http client
|
||||||
"wireguard-tools" # wireguard
|
"wireguard-tools" # wireguard
|
||||||
|
"mitmproxy"
|
||||||
|
|
||||||
# Usage:
|
# Usage:
|
||||||
# https://github.com/tailscale/tailscale/wiki/Tailscaled-on-macOS#run-the-tailscaled-daemon
|
# 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
|
# commands like `gsed` `gtar` are required by some tools
|
||||||
"gnu-sed"
|
"gnu-sed"
|
||||||
"gnu-tar"
|
"gnu-tar"
|
||||||
|
|
||||||
|
# misc that nix do not have cache for.
|
||||||
|
"git-trim"
|
||||||
|
"terraform"
|
||||||
|
"terraformer"
|
||||||
];
|
];
|
||||||
|
|
||||||
# `brew install --cask`
|
# `brew install --cask`
|
||||||
casks = [
|
casks = [
|
||||||
|
"wezterm"
|
||||||
|
|
||||||
"squirrel" # input method for Chinese, rime-squirrel
|
"squirrel" # input method for Chinese, rime-squirrel
|
||||||
|
|
||||||
"firefox"
|
"firefox"
|
||||||
|
|||||||
@@ -35,7 +35,10 @@
|
|||||||
options = lib.mkDefault "--delete-older-than 7d";
|
options = lib.mkDefault "--delete-older-than 7d";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Manual optimise storage: nix-store --optimise
|
# Disable auto-optimise-store because of this issue:
|
||||||
# https://nixos.org/manual/nix/stable/command-ref/conf-file.html#conf-auto-optimise-store
|
# https://github.com/NixOS/nix/issues/7273
|
||||||
nix.settings.auto-optimise-store = true;
|
# "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
|
||||||
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;
|
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
|
# icon fonts
|
||||||
material-design-icons
|
material-design-icons
|
||||||
font-awesome
|
font-awesome
|
||||||
|
|||||||
Reference in New Issue
Block a user