Add flag to control homebrew, get rid of kakoune.cr

work
mat ess 2022-07-24 15:55:26 -04:00
parent ee0c4462ee
commit 7ce0b53808
4 changed files with 75 additions and 9 deletions

View File

@ -23,7 +23,7 @@ in
end
'';
homebrew.enable = true;
homebrew.enable = pkgs.lib.homebrew-enabled;
homebrew.autoUpdate = true;
homebrew.cleanup = "zap";
homebrew.global.brewfile = true;

View File

@ -89,6 +89,53 @@
"type": "github"
}
},
"homebrew-enabled": {
"locked": {
"lastModified": 1657739253,
"narHash": "sha256-L9eyTL7njtPBUYmZRYFKCzQFDgua9U9oE7UwCzjZfl8=",
"owner": "boolean-option",
"repo": "true",
"rev": "6ecb49143ca31b140a5273f1575746ba93c3f698",
"type": "github"
},
"original": {
"owner": "boolean-option",
"repo": "true",
"type": "github"
}
},
"kakoune-cr-src": {
"flake": false,
"locked": {
"lastModified": 1651502437,
"narHash": "sha256-9sYqDWWnvoNpSYDBsMU6mV8AKLOwgolhzskD2sL7X+Q=",
"owner": "alexherbo2",
"repo": "kakoune.cr",
"rev": "d2b59774382328343cb4e6336f371e15d2a84b96",
"type": "github"
},
"original": {
"owner": "alexherbo2",
"repo": "kakoune.cr",
"type": "github"
}
},
"kitty-themes-src": {
"flake": false,
"locked": {
"lastModified": 1654224633,
"narHash": "sha256-SM7ExyD6cCYXZwxb4Rs1U2P2N9vzhmaUHJJRz/gO3IQ=",
"owner": "kovidgoyal",
"repo": "kitty-themes",
"rev": "f6c2f4e5617ef946b17db8bc18dadc9fad38d32e",
"type": "github"
},
"original": {
"owner": "kovidgoyal",
"repo": "kitty-themes",
"type": "github"
}
},
"luar-src": {
"flake": false,
"locked": {
@ -160,6 +207,9 @@
"flake-compat": "flake-compat",
"flake-utils": "flake-utils",
"home-manager": "home-manager",
"homebrew-enabled": "homebrew-enabled",
"kakoune-cr-src": "kakoune-cr-src",
"kitty-themes-src": "kitty-themes-src",
"luar-src": "luar-src",
"nixpkgs": "nixpkgs",
"nixpkgs-master": "nixpkgs-master",

View File

@ -13,27 +13,31 @@
home-manager.url = github:nix-community/home-manager;
home-manager.inputs.nixpkgs.follows = "nixpkgs-unstable";
# Config "flag" for disabling homebrew
homebrew-enabled.url = github:boolean-option/true;
# Other sources
flake-utils.url = github:numtide/flake-utils;
flake-compat = {
url = github:edolstra/flake-compat;
flake = false;
};
dark-mode-notify-src = {
url = github:bouk/dark-mode-notify;
flake = false;
};
luar-src = {
url = github:gustavo-hms/luar;
flake = false;
};
smarttab-kak-src = {
url = github:andreyorst/smarttab.kak;
flake = false;
};
kitty-themes-src = {
url = github:kovidgoyal/kitty-themes;
flake = false;
};
};
outputs = { self, darwin, nixpkgs, home-manager, flake-utils, ... }@inputs:
@ -59,8 +63,7 @@
inherit (final) callPackage;
};
in
pkgs // optionalAttrs
(prev.stdenv.system == "aarch64-darwin")
pkgs // optionalAttrs (prev.stdenv.system == "aarch64-darwin")
{
# Sub in x86 version of packages that don't build on Apple Silicon yet
inherit (final.pkgs-x86);
@ -201,6 +204,12 @@
inherit (nixpkgsConfig) config;
};
};
patched = final: prev: optionalAttrs prev.stdenv.isDarwin {
lib = prev.lib // {
homebrew-enabled = inputs.homebrew-enabled.value;
};
};
};
# `nix-darwin` modules (some are pending upstream acceptance)
@ -215,7 +224,7 @@
# configs-git-aliases = import ./home/configs/git-aliases.nix;
# configs-gh-aliases = import ./home/configs/gh-aliases.nix;
configs-starship-symbols = import ./home/configs/starship-symbols.nix;
programs-neovim-extras = import ./modules/home/programs/neovim/extras.nix;
# programs-kakoune-extras = import ./modules/home/programs/kakoune/extras.nix;
programs-kitty-extras = import ./modules/home/programs/kitty/extras.nix;
};
@ -228,6 +237,7 @@
pkgs-stable
colors
apple-silicon
patched
];
};
});

View File

@ -1,14 +1,17 @@
{ pkgs, ... }: {
home.packages = [ pkgs.kak-lsp ];
home.packages = with pkgs; [
kak-lsp
];
programs.kakoune = {
enable = true;
config = {
autoReload = "yes";
colorScheme = "tokyonight";
# colorScheme = "tokyonight";
hooks = [
# smarttab hooks
{
name = "BufOpenFile";
option = ".*";
@ -31,6 +34,7 @@
set-option global softtabstop %opt{indentwidth}
'';
}
# lsp hooks
{
name = "WinSetOption";
option = "filetype=(haskell)";
@ -38,6 +42,7 @@
lsp-enable-window
'';
}
# general hooks
{
name = "WinSetOption";
option = "filetype=(haskell|nix)";
@ -91,6 +96,7 @@
plugins = with pkgs.kakounePlugins; [
active-window-kak
auto-pairs-kak
connect-kak
fzf-kak
kak-lsp
kakboard