Various fixes + tweaks
parent
c6e365bdb7
commit
10bccf6fcd
|
@ -38,7 +38,7 @@
|
|||
zsh
|
||||
];
|
||||
# Fonts
|
||||
fonts.enableFontDir = true;
|
||||
fonts.fontDir.enable = true;
|
||||
fonts.fonts = with pkgs; [
|
||||
recursive
|
||||
(nerdfonts.override {
|
||||
|
|
|
@ -71,5 +71,5 @@ in
|
|||
|
||||
# For cli packages that aren't currently available for macOS in `nixpkgs`.Packages should be
|
||||
# installed in `../home/default.nix` whenever possible.
|
||||
homebrew.brews = [ "fzf" "unison-language" ];
|
||||
homebrew.brews = [ "fileicon" "fzf" "unison-language" ];
|
||||
}
|
||||
|
|
30
flake.lock
30
flake.lock
|
@ -7,11 +7,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1648278671,
|
||||
"narHash": "sha256-1WrR9ex+rKTjZtODNUZQhkWYUprtfOkjOyo9YWL2NMs=",
|
||||
"lastModified": 1651916036,
|
||||
"narHash": "sha256-UuD9keUGm4IuVEV6wdSYbuRm7CwfXE63hVkzKDjVsh4=",
|
||||
"owner": "lnl7",
|
||||
"repo": "nix-darwin",
|
||||
"rev": "4fdbb8168f61d31d3f90bb0d07f48de709c4fe79",
|
||||
"rev": "2f2bdf658d2b79bada78dc914af99c53cad37cba",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -24,11 +24,11 @@
|
|||
"flake-compat": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1648199409,
|
||||
"narHash": "sha256-JwPKdC2PoVBkG6E+eWw3j6BMR6sL3COpYWfif7RVb8Y=",
|
||||
"lastModified": 1650374568,
|
||||
"narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=",
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"rev": "64a525ee38886ab9028e6f61790de0832aa3ef03",
|
||||
"rev": "b4a34015c698c7793d592d66adbab377907a2be8",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -59,11 +59,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1650301786,
|
||||
"narHash": "sha256-9rz9NqL+mC+BIggn2emuzZ+3MYogxVBTdsFK7E3Vv1k=",
|
||||
"lastModified": 1651886851,
|
||||
"narHash": "sha256-kbXOJSf1uho0/7P54nZkJdJY3oAelIjyc6tfiRhaXJI=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "8d38ca886880265d523a66fe3da4d42e92ab0748",
|
||||
"rev": "882bd8118bdbff3a6e53e5ced393932b351ce2f6",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -74,11 +74,11 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1650287833,
|
||||
"narHash": "sha256-lTmQ/Yj7zjtRAcEstIa4sxOvn6vAQRsgekX88wO2CXI=",
|
||||
"lastModified": 1651948785,
|
||||
"narHash": "sha256-3UoMx0cLnFJt4/2HpMGrlOqWUFJfuLMgKqi1ytL8GxM=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "ac1191a866bf974d7e246cc7bb0b9c7e80d7cd7a",
|
||||
"rev": "ac4d124eeed195db518712120fbf2b384a254ca2",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -90,11 +90,11 @@
|
|||
},
|
||||
"nixpkgs-unstable": {
|
||||
"locked": {
|
||||
"lastModified": 1650194139,
|
||||
"narHash": "sha256-kurZsqeOw5fpqA/Ig+8tHvbjwzs5P9AE6WUKOX1m6qM=",
|
||||
"lastModified": 1651927509,
|
||||
"narHash": "sha256-fGVGUdEsriuAL1vkUh29FlOQmEkPRnSfRGImWYaVjos=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "bd4dffcdb7c577d74745bd1eff6230172bd176d5",
|
||||
"rev": "2fdb6f2e08e7989b03a2a1aa8538d99e3eeea881",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
26
flake.nix
26
flake.nix
|
@ -3,13 +3,14 @@
|
|||
|
||||
inputs = {
|
||||
# Package sets
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-21.11-darwin";
|
||||
nixpkgs.url = github:NixOS/nixpkgs/nixpkgs-21.11-darwin;
|
||||
nixpkgs-unstable.url = github:NixOS/nixpkgs/nixpkgs-unstable;
|
||||
nixpkgs-master.url = github:NixOS/nixpkgs/master;
|
||||
|
||||
# Environment/system management
|
||||
darwin.url = "github:lnl7/nix-darwin/master";
|
||||
darwin.url = github:lnl7/nix-darwin/master;
|
||||
darwin.inputs.nixpkgs.follows = "nixpkgs-unstable";
|
||||
home-manager.url = "github:nix-community/home-manager";
|
||||
home-manager.url = github:nix-community/home-manager;
|
||||
home-manager.inputs.nixpkgs.follows = "nixpkgs-unstable";
|
||||
|
||||
# Other sources
|
||||
|
@ -26,13 +27,14 @@
|
|||
# Configuration for `nixpkgs`
|
||||
nixpkgsConfig = {
|
||||
config = { allowUnfree = true; };
|
||||
# overlays = attrValues self.overlays;
|
||||
overlays = attrValues self.overlays ++ singleton (
|
||||
final: prev: optionalAttrs
|
||||
(prev.stdenv.system == "aarch64-darwin")
|
||||
{
|
||||
# Sub in x86 version of packages that don't build on Apple Silicon yet
|
||||
final: prev: (optionalAttrs (prev.stdenv.system == "aarch64-darwin") {
|
||||
inherit (final.pkgs-x86)
|
||||
vscodium;
|
||||
})
|
||||
# inherit (final.pkgs-x86) foo;
|
||||
vscodium = final.vscodium-m1;
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
|
@ -152,6 +154,13 @@
|
|||
};
|
||||
};
|
||||
|
||||
pkgs-master = final: prev: {
|
||||
pkgs-master = import inputs.nixpkgs-master {
|
||||
inherit (prev.stdenv) system;
|
||||
inherit (nixpkgsConfig) config;
|
||||
};
|
||||
};
|
||||
|
||||
colors = import ./overlays/colors.nix;
|
||||
|
||||
# Overlay useful on Macs with Apple Silicon
|
||||
|
@ -161,6 +170,7 @@
|
|||
system = "x86_64-darwin";
|
||||
inherit (nixpkgsConfig) config;
|
||||
};
|
||||
# Use local pkg for M1 native vscodium build
|
||||
vscodium-m1 = final.callPackage ./pkgs/vscodium-m1.nix { };
|
||||
};
|
||||
};
|
||||
|
|
|
@ -15,12 +15,6 @@
|
|||
# Packages with configuration --------------------------------------------------------------- {{{
|
||||
|
||||
programs = {
|
||||
# fancy shell history
|
||||
# https://rycee.gitlab.io/home-manager/options.html#opt-programs.atuin.enable
|
||||
atuin = {
|
||||
enable = false;
|
||||
settings = { };
|
||||
};
|
||||
# a nicer cat
|
||||
# https://rycee.gitlab.io/home-manager/options.html#opt-programs.bat.enable
|
||||
bat = {
|
||||
|
@ -64,9 +58,10 @@
|
|||
'';
|
||||
};
|
||||
# vscode
|
||||
vscode = {
|
||||
vscode = with pkgs; {
|
||||
enable = true;
|
||||
package = pkgs.vscodium-m1;
|
||||
package = vscodium;
|
||||
# extensions = [ pijul-vscode ];
|
||||
};
|
||||
};
|
||||
# }}}
|
||||
|
@ -87,6 +82,7 @@
|
|||
hyperfine # benchmarking tool
|
||||
mosh # wrapper for `ssh` that better at not dropping connections
|
||||
procs # fancy version of `ps`
|
||||
pv # pipe progress viewer
|
||||
ripgrep # better version of `grep`
|
||||
tealdeer # rust implementation of `tldr`
|
||||
thefuck
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
mkdcd = {
|
||||
argumentNames = [ "target" ];
|
||||
body = ''
|
||||
mkdir $target
|
||||
mkdir -p $target
|
||||
cd $target
|
||||
'';
|
||||
};
|
||||
|
@ -141,6 +141,7 @@
|
|||
nf = "nix flake";
|
||||
nr = "nix run";
|
||||
ns = "nix search nixpkgs";
|
||||
nsh = "nix shell";
|
||||
|
||||
# Other
|
||||
".." = "cd ..";
|
||||
|
@ -168,10 +169,10 @@
|
|||
bind -M insert ! __history_previous_command
|
||||
bind -M insert '$' __history_previous_command_arguments
|
||||
${pkgs.thefuck}/bin/thefuck --alias | source
|
||||
# Run function to set colors that are dependant on `$term_background` and to register them so
|
||||
# they are triggerd when the relevent event happens or variable changes.
|
||||
# Run function to set colors that are dependent on `$term_background` and to register them so
|
||||
# they are triggered when the relevent event happens or variable changes.
|
||||
set-shell-colors
|
||||
# Set Fish colors that aren't dependant the `$term_background`.
|
||||
# Set Fish colors that aren't dependent the `$term_background`.
|
||||
set -g fish_color_quote cyan # color of commands
|
||||
set -g fish_color_redirection brmagenta # color of IO redirections
|
||||
set -g fish_color_end blue # color of process separators like ';' and '&'
|
||||
|
|
|
@ -12,11 +12,12 @@
|
|||
, python3
|
||||
, xcodebuild
|
||||
, darwin
|
||||
, ...
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "vscodium";
|
||||
version = "1.66.2";
|
||||
version = "1.67.0";
|
||||
|
||||
executableName = "codium";
|
||||
longName = "VSCodium";
|
||||
|
@ -24,7 +25,7 @@ stdenv.mkDerivation rec {
|
|||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/VSCodium/vscodium/archive/refs/tags/${version}.tar.gz";
|
||||
sha256 = "JtEMO9GVez5v7eE23DB2WVIZNMlC7O50gvP5p5l3jkU=";
|
||||
sha256 = "d7Ci1SzEkH+QBYnBEZQ6Jim7dO2NoDe2eK4xDqENnrI=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = with darwin.apple_sdk.frameworks; [
|
||||
|
@ -56,7 +57,7 @@ stdenv.mkDerivation rec {
|
|||
runHook preInstall
|
||||
|
||||
mkdir -p "$out/Applications/${longName}.app" "$out/bin"
|
||||
cp -r ./VSCode-darwin-arm64/* "$out/Applications/${longName}.app"
|
||||
cp -r ./VSCode-darwin-arm64/${longName}.app/* "$out/Applications/${longName}.app"
|
||||
ln -s "$out/Applications/${longName}.app/Contents/Resources/app/bin/${executableName}" "$out/bin/${executableName}"
|
||||
|
||||
runHook postInstall
|
||||
|
|
Loading…
Reference in New Issue