Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
takeokunn committed Jul 20, 2024
1 parent b258a71 commit 02874f4
Show file tree
Hide file tree
Showing 8 changed files with 165 additions and 17 deletions.
24 changes: 12 additions & 12 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions home-manager/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{ system, nixpkgs, emacs-overlay }:
let
lib = nixpkgs.lib;

# packages
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
Expand All @@ -10,7 +12,12 @@ let
advancedPkgs = import ./packages/advanced.nix { inherit pkgs; };
darwinPkgs = import ./packages/darwin { inherit pkgs; };
nixosPkgs = import ./packages/nixos { inherit pkgs; };

# programs
programs = import ./programs;
in {
imports = programs;

home.stateVersion = "24.11";
home.packages = basicPkgs ++ advancedPkgs
++ lib.optionals pkgs.stdenv.isDarwin darwinPkgs
Expand Down
4 changes: 4 additions & 0 deletions home-manager/programs/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
let
git = import ./git;
in
[git]
102 changes: 102 additions & 0 deletions home-manager/programs/git/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
{
home.file.".config/git/message" = {
source = ./message;
};

programs.git = {
enable = true;

aliases = {
st = "status";
br = "branch";
co = "commit";
ch = "checkout";
ad = "add";
rs = "restore";
sw = "switch";
fix = "commit --amend --no-edit";
};

ignores = [ "*.swp" "*.save" "*.fasl" "*~" ".DS_Store" ];

extraConfig = {
core = {
editor = "emacs -nw";
quotepath = "off";
ignorecase = false;
safecrlf = true;
autocrlf = false;
precomposeunicode = true;
untrackedCache = true;
fsmonitor = true;
};

commit = {
template = "~/.config/git/message";
gpgsign = true;
};

user = {
name = "takeokunn";
email = "[email protected]";
signingkey = "0B10DAA7BA0236D7382287660F79C0AB03FD7A1C";
};

ghq = {
root = "~/.ghq";
};

fetch = {
prune = true;
writeCommitGraph= true;
};

pull = {
rebase = false;
};

push = {
default = "nothing";
};

github = {
user = "takeokunn";
};

gpg = {
program = "gpg";
};

diff = {
patience = true;
};

color = {
ui = "auto";
status = "auto";
diff = "auto";
branch = "auto";
interactive = "auto";
grep = "auto";
};

url = {
"[email protected]:".insteadOf = "https://github.com/";
};

init = {
defaultBranch = "main";
};

rerere = {
enabled = true;
};

rebase = {
autoStash = true;
abbreviateCommands = true;
autosquash = true;
};
};
};
}
20 changes: 20 additions & 0 deletions home-manager/programs/git/message
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@


# ==== Emojis ====
# :bug: バグ修正
# :+1: 機能改善
# :sparkles: 部分的な機能追加
# :tada: 盛大に祝うべき大きな機能追加
# :recycle: リファクタリング
# :shower: 不要な機能・使われなくなった機能の削除
# :green_heart: テストやCIの修正・改善
# :shirt: Lintエラーの修正やコードスタイルの修正
# :rocket: パフォーマンス改善
# :up: 依存パッケージなどのアップデート
# :lock: 新機能の公開範囲の制限
# :cop: セキュリティ関連の改善

# ==== Format ====
# :emoji: Subject
#
# Commit body...
11 changes: 11 additions & 0 deletions home-manager/systems/darwin.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{ pkgs }:
with pkgs; [
pinentry_mac
terminal-notifier

# for emacs
mu
emacs-git
pinentry-emacs
emacsPackages.mu4e
]
8 changes: 8 additions & 0 deletions home-manager/systems/linux.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{ pkgs }:
with pkgs; [
# for emacs
emacs-git
mu
pinentry-emacs
emacsPackages.mu4e
]
6 changes: 1 addition & 5 deletions nixos/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,7 @@

programs = {
fish.enable = true;

gnupg = { agent = { enable = true; }; };
gnupg.agent.enable = true;

sway = {
enable = true;
Expand All @@ -100,9 +99,6 @@

system = {
stateVersion = "24.11";

# MEMO: 有効にしたい
autoUpgrade.enable = false;
};

fonts = {
Expand Down

0 comments on commit 02874f4

Please sign in to comment.