mirror of
https://github.com/RGBCube/ncc
synced 2025-09-13 01:27:56 +00:00
homebrew: init
This commit is contained in:
parent
419a2514b9
commit
51c02a78a2
6 changed files with 104 additions and 17 deletions
70
flake.lock
generated
70
flake.lock
generated
|
@ -43,6 +43,23 @@
|
|||
"type": "gitlab"
|
||||
}
|
||||
},
|
||||
"brew-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1751910772,
|
||||
"narHash": "sha256-jQNdIkq2iRDNWskd5f8kX6q9BO/CBSXhMH41WNRft8E=",
|
||||
"owner": "Homebrew",
|
||||
"repo": "brew",
|
||||
"rev": "700d67a85e0129ab8a893ff69246943479e33df1",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "Homebrew",
|
||||
"ref": "4.5.9",
|
||||
"repo": "brew",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"crash": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
|
@ -248,6 +265,38 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"homebrew-cask": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1753968895,
|
||||
"narHash": "sha256-q8loYa7TQFtxs0gAKUGs+arGusXkaNTnMYJdOSLLups=",
|
||||
"owner": "homebrew",
|
||||
"repo": "homebrew-cask",
|
||||
"rev": "d3cc45a4ab90edca625bb040823edac3c09feb11",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "homebrew",
|
||||
"repo": "homebrew-cask",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"homebrew-core": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1753967820,
|
||||
"narHash": "sha256-KPrAcjKW3dXbCt0b8i+bgMwNSnpGgnAnYZS6tgX0IVs=",
|
||||
"owner": "homebrew",
|
||||
"repo": "homebrew-core",
|
||||
"rev": "e64e128c3acca63c8cbb25a7e6896b78e214092c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "homebrew",
|
||||
"repo": "homebrew-core",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nil": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs_2"
|
||||
|
@ -308,6 +357,24 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nix-homebrew": {
|
||||
"inputs": {
|
||||
"brew-src": "brew-src"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1752160973,
|
||||
"narHash": "sha256-BCC8KB7TEtwv7vZN1WDu870tRbXtzUcmF9xNr6ws5Wc=",
|
||||
"owner": "zhaofengli",
|
||||
"repo": "nix-homebrew",
|
||||
"rev": "69c1aa2f136f3c3326d9b6770e0eb54f12832971",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "zhaofengli",
|
||||
"repo": "nix-homebrew",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixos-mailserver": {
|
||||
"inputs": {
|
||||
"blobs": "blobs",
|
||||
|
@ -450,9 +517,12 @@
|
|||
"fenix": "fenix",
|
||||
"github2forgejo": "github2forgejo",
|
||||
"home-manager": "home-manager",
|
||||
"homebrew-cask": "homebrew-cask",
|
||||
"homebrew-core": "homebrew-core",
|
||||
"nil": "nil",
|
||||
"nix": "nix",
|
||||
"nix-darwin": "nix-darwin",
|
||||
"nix-homebrew": "nix-homebrew",
|
||||
"nixos-mailserver": "nixos-mailserver",
|
||||
"nixpkgs": "nixpkgs_4",
|
||||
"themes": "themes"
|
||||
|
|
12
flake.nix
12
flake.nix
|
@ -44,6 +44,18 @@
|
|||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
nix-homebrew.url = "github:zhaofengli/nix-homebrew";
|
||||
homebrew-core = {
|
||||
url = "github:homebrew/homebrew-core";
|
||||
|
||||
flake = false;
|
||||
};
|
||||
homebrew-cask = {
|
||||
url = "github:homebrew/homebrew-cask";
|
||||
|
||||
flake = false;
|
||||
};
|
||||
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager";
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{ config, lib, pkgs, ... }: let
|
||||
inherit (lib) attrNames filterAttrs hasPrefix head mkAliasOptionModule mkIf;
|
||||
inherit (lib) mkAliasOptionModule mkIf;
|
||||
in {
|
||||
imports = [(mkAliasOptionModule [ "secrets" ] [ "age" "secrets" ])];
|
||||
|
||||
|
@ -7,7 +7,7 @@ in {
|
|||
(if config.isLinux then
|
||||
"/root/.ssh/id"
|
||||
else
|
||||
"/Users/${head <| attrNames <| filterAttrs (_: value: value.home != null && hasPrefix "/Users/" value.home) config.users.users}/.ssh/id")
|
||||
"/Users/${config.system.primaryUser}/.ssh/id")
|
||||
];
|
||||
|
||||
environment = mkIf config.isDesktop {
|
||||
|
|
3
modules/darwin/ghostty.nix
Normal file
3
modules/darwin/ghostty.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
homebrew.casks = [ "ghostty" ];
|
||||
}
|
16
modules/darwin/homebrew.nix
Normal file
16
modules/darwin/homebrew.nix
Normal file
|
@ -0,0 +1,16 @@
|
|||
{ nix-homebrew, homebrew-core, homebrew-cask, config, lib, ... }: let
|
||||
inherit (lib) enabled;
|
||||
in {
|
||||
imports = [ nix-homebrew.darwinModules.nix-homebrew ];
|
||||
|
||||
homebrew = enabled;
|
||||
|
||||
nix-homebrew = enabled {
|
||||
user = config.system.primaryUser;
|
||||
|
||||
taps."homebrew/homebrew-core" = homebrew-core;
|
||||
taps."homebrew/homebrew-cask" = homebrew-cask;
|
||||
|
||||
mutableTaps = false;
|
||||
};
|
||||
}
|
|
@ -129,21 +129,7 @@
|
|||
}
|
||||
];
|
||||
in {
|
||||
# TODO: Install using Nix. Currently I'm doing it manually.
|
||||
|
||||
# nixpkgs.overlays = [(self: super: {
|
||||
# karabiner-elements = super.karabiner-elements.overrideAttrs (old: {
|
||||
# version = "14.13.0";
|
||||
|
||||
# src = super.fetchurl {
|
||||
# inherit (old.src) url;
|
||||
|
||||
# hash = "sha256-gmJwoht/Tfm5qMecmq1N6PSAIfWOqsvuHU8VDJY8bLw=";
|
||||
# };
|
||||
# });
|
||||
# })];
|
||||
|
||||
# services.karabiner-elements = enabled;
|
||||
homebrew.casks = [ "karabiner-elements" ];
|
||||
|
||||
home-manager.sharedModules = [{
|
||||
xdg.configFile."karabiner/karabiner.json".text = toJSON {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue