Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
raba-jp committed Jan 4, 2025
1 parent 5392530 commit 0b0e493
Show file tree
Hide file tree
Showing 8 changed files with 57 additions and 14 deletions.
1 change: 1 addition & 0 deletions darwin/common/homebrew.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"bartender"
"discord"
"gitkraken"
"ghostty"
"the-unarchiver"
"visual-studio-code"
"raycast"
Expand Down
4 changes: 3 additions & 1 deletion darwin/common/nixpkgs.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{...}: {
{outputs, ...}: {
nixpkgs = {
config = {
allowUnfree = true;
};

overlays = builtins.attrValues outputs.overlays;
};
}
4 changes: 4 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@
};
};

packages = (import ./pkgs {inherit pkgs;});

devShell = with pkgs;
mkShell {
packages = [
Expand All @@ -87,6 +89,8 @@
};
})
// {
overlays = import ./overlays;

darwinConfigurations = {
"QN63HFT2NY" = darwin.lib.darwinSystem {
system = "aarch64-darwin";
Expand Down
22 changes: 12 additions & 10 deletions home/profiles/desktop/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,20 @@
];
};

programs.mise = {
programs.ghostty = {
enable = true;
package = pkgs.stubin; # dummy
enableFishIntegration = true;
installBatSyntax = false;
clearDefaultKeybinds = true;
settings = {
"theme" = "rose-pine";
"font-size" = 14;
"font-family" ="UDEV Gothic 35NFLG";
"shell-integration" = "fish";
"command" ="${pkgs.fish}/bin/fish -c";
"keybind" = "global:alt+t=toggle_quick_terminal";
};
};

programs.git = {
Expand Down Expand Up @@ -100,15 +111,6 @@
amend = "commit --amend";
precommit = "diff --cached --diff-algorithm=minimal -w";
remotes = "remote -v";
delete-merged-branches = ''
!git checkout -q main && \
git for-each-ref refs/heads/ "--format=%(refname:short)" | \
while read branch; do
mergeBase=$(git merge-base main $branch) && \
[[ $(git cherry main $(git commit-tree $(git rev-parse $branch^{tree}) -p $mergeBase -m _)) == "-"* ]] && \
git branch -D $branch;
done
'';
};

ignores = [
Expand Down
3 changes: 0 additions & 3 deletions home/profiles/minimal/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@
programs.bat = {
enable = true;
config.style = "changes,header";
extraPackages = with pkgs.bat-extras; [
batman
];
};

programs.fzf = {
Expand Down
3 changes: 3 additions & 0 deletions overlays/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
additions = final: _prev: import ../pkgs {pkgs = final;};
}
3 changes: 3 additions & 0 deletions pkgs/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{pkgs ? null}: {
stubin = pkgs.callPackage ./stubin.nix {};
}
31 changes: 31 additions & 0 deletions pkgs/stubin.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
lib,
buildGoModule,
fetchFromGitHub,
...
}:
buildGoModule rec {
pname = "stubin";
version = "1.0.0";

src = fetchFromGitHub {
owner = "k1LoW";
repo = "stubin";
rev = "v${version}";
sha256 = "sha256-nLqZF36q09n/dc+RMQxxECA2Ku6g3M94X7kwZFwmJCw=";
};
vendorHash = "sha256-KTGnuVN0+HJ7xr7+/mKSrdfF5c+XW0wDLtn5F2nCL3M=";

ldflags = [
"-s -w"
];

doCheck = false;
doInstallCheck = false;

meta = with lib; {
homepage = "https://github.com/k1LoW/stubin";
mainProgram = "stubin";
license = licenses.mit;
};
}

0 comments on commit 0b0e493

Please sign in to comment.