feat: home-manager config files implemented

build not tested
This commit is contained in:
Sangmin Kim 2026-03-04 21:53:28 +09:00 committed by Poby
parent 248170c877
commit 54297f94fd
No known key found for this signature in database
44 changed files with 852 additions and 60 deletions

View file

@ -1,11 +1,12 @@
{ pkgs, ... }: {
{pkgs, ...}: {
nixpkgs.config.allowUnfree = true;
environment.systemPackages = with pkgs; [
git
neovim
just # use Justfile to simplify nix-darwin's commands
vim
curl
];
environment.variables.EDITOR = "nvim";
homebrew = {
enable = true;
@ -22,7 +23,7 @@
Bitwarden = 1352778147;
};
taps = [ ];
taps = [];
# WARNING only include those not in nixpkgs
brews = [

View file

@ -1,5 +1,8 @@
{ username, hostname, ... }:
{
username,
hostname,
...
}: {
networking.hostName = hostname;
networking.computerName = hostname;
@ -8,5 +11,5 @@
description = username;
};
nix.settings.trusted-users = [ username ];
nix.settings.trusted-users = [username];
}

View file

@ -1,17 +1,20 @@
{ pkgs, lib, ... }:
{
pkgs,
lib,
...
}: {
nix = {
enable = true;
package = pkgs.nix;
settings = {
experimental-features = [ "nix-command" "flakes" ];
substituters = [ "https://nix-community.cachix.org" ];
experimental-features = ["nix-command" "flakes"];
substituters = ["https://nix-community.cachix.org"];
trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
];
builders-user-substitutes = true;
auto-optimise-store = false; # issue https://github.com/NixOS/nix/issues/7273
auto-optimise-store = false; # issue https://github.com/NixOS/nix/issues/7273
};
};

View file

@ -1,6 +1,12 @@
{ pkgs, config, username, hostname, ... }:
{
pkgs,
config,
username,
hostname,
...
}: {
time.timeZone = "Asia/Seoul";
system = {
primaryUser = username;
stateVersion = 6;
@ -32,7 +38,6 @@
'';
defaults = {
loginwindow = {
GuestEnabled = false;
};
@ -86,12 +91,12 @@
trackpad = {
Clicking = true;
TrackpadRightClick = true; # two finger right click
TrackpadRightClick = true; # two finger right click
TrackpadThreeFingerDrag = true;
TrackpadFourFingerHorizSwipeGesture = 2; # swipe between full-screen applications
TrackpadFourFingerHorizSwipeGesture = 2; # swipe between full-screen applications
TrackpadFourFingerVertSwipeGesture = 2; # down for Mission Control, up for App Expose
TrackpadPinch = true;
TrackpadThreeFingerHorizSwipGesture = 0; # disable for three finger drag
TrackpadThreeFingerHorizSwipGesture = 0; # disable for three finger drag
TrackpadThreeFingerVertSwipeGesture = 0; # disable for three finger drag
TrackpadTwoFingerDoubleTapGesture = true; # smart zoom
TrackpadTwoFingerFromRightEdgeSwipeGesture = 0;
@ -142,6 +147,7 @@
NSTableViewDefaultSizeMode = 2;
"com.apple.keyboard.fnState" = true;
"com.apple.sound.beep.feedback" = 0;
};
# Customize settings that not supported by nix-darwin directly
@ -164,7 +170,7 @@
};
keyboard = {
enableKeyMapping = true; # enable key mapping so that we can use `option` as `control`
enableKeyMapping = true; # enable key mapping so that we can use `option` as `control`
};
};
@ -175,50 +181,60 @@
# this is required if you want to use darwin's default shell - zsh
programs.zsh = {
enable = true;
enableCompletion = true;
enableAutosuggestions = true;
enableFastSyntaxHighlighting = true;
enableFzfCompletion = true;
enableFzfGit = true;
enableFzfHistory = true;
promptInit = ''
source ${pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k/powerlevel10k.zsh-theme
source ${pkgs.zsh-fzf-tab}/share/fzf-tab/fzf-tab.plugin.zsh
'';
# enableCompletion = true;
# enableAutosuggestions = true;
# enableFastSyntaxHighlighting = true;
# enableFzfCompletion = true;
# enableFzfGit = true;
# enableFzfHistory = true;
# promptInit = ''
# source ${pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k/powerlevel10k.zsh-theme
# source ${pkgs.zsh-fzf-tab}/share/fzf-tab/fzf-tab.plugin.zsh
# '';
};
environment = {
shells = [
pkgs.zsh
];
shellAliases = {
ls = "lsd --color=auto";
l = "lsd -lhG";
lt = "l --tree";
ll = "lsd -alhG";
lh = "lsd -dl .*";
lsd = "lsd --group-directories-first";
filecount="find . -type f | wc -l";
cat = "bat --color=always";
man = "tldr";
nixrebuild = "sudo darwin-rebuild switch --flake ~/.config/nix-darwin";
nixupgrade = "cd ~/.config/nix-darwin && nix flake update";
nixconfig = "nvim ~/.config/nix-darwin";
sshconfig = "nvim ~/.ssh/config";
# git
g = "git";
gaa = "git add --all";
gcm = "git commit -m";
gca = "git commit --amend";
gst = "git status";
gco = "git checkout";
gl = "git pull";
gp = "git push";
glg = "git log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ad) %C(bold blue)<%an>%Creset' --date=short";
};
# shellAliases = {
# ls = "lsd --color=auto";
# l = "lsd -lhG";
# lt = "l --tree";
# ll = "lsd -alhG";
# lh = "lsd -dl .*";
# lsd = "lsd --group-directories-first";
# filecount = "find . -type f | wc -l";
# cat = "bat --color=always";
# man = "tldr";
# nixrebuild = "sudo darwin-rebuild switch --flake ~/.config/nix-darwin";
# nixupgrade = "cd ~/.config/nix-darwin && nix flake update";
# nixconfig = "nvim ~/.config/nix-darwin";
# sshconfig = "nvim ~/.ssh/config";
#
# # git
# g = "git";
# gaa = "git add --all";
# gcm = "git commit -m";
# gca = "git commit --amend";
# gst = "git status";
# gco = "git checkout";
# gl = "git pull";
# gp = "git push";
# glg = "git log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ad) %C(bold blue)<%an>%Creset' --date=short";
# };
};
# Set your time zone.
time.timeZone = "Asia/Seoul";
fonts = {
packages = with pkgs; [
material-design-icons
font-awesome
pretendard
nerd-fonts.symbols-only
nerd-fonts.jetbrains-mono
nerd-fonts.d2coding
nerd-fonts.iosevka
nerd-fonts.meslo-lg
];
};
}