feat: add python 3.13 as mise global

format with alejandra
This commit is contained in:
Poby 2026-03-15 01:05:00 +09:00
parent 4cf65ab631
commit fed3a5226a
No known key found for this signature in database
27 changed files with 101 additions and 116 deletions

View file

@ -49,54 +49,53 @@
}; };
}; };
outputs = outputs = inputs @ {
inputs@{ self,
self, nixpkgs,
nixpkgs, darwin,
darwin, home-manager,
home-manager, nvf,
nvf, sops-nix,
sops-nix, nix-homebrew,
nix-homebrew, homebrew-core,
homebrew-core, homebrew-cask,
homebrew-cask, ...
... }: let
}: system = "aarch64-darwin";
let username = "poby";
system = "aarch64-darwin"; useremail = "smg981024@gmail.com";
username = "poby"; hostname = "fenrir"; # TODO break down to multiple hosts
useremail = "smg981024@gmail.com";
hostname = "fenrir"; # TODO break down to multiple hosts
specialArgs = inputs // { specialArgs =
inputs
// {
inherit username useremail hostname; inherit username useremail hostname;
}; };
in in {
{ darwinConfigurations."${hostname}" = darwin.lib.darwinSystem {
darwinConfigurations."${hostname}" = darwin.lib.darwinSystem { inherit system specialArgs;
inherit system specialArgs; modules = [
modules = [ ./modules/nix-core.nix
./modules/nix-core.nix ./modules/system.nix
./modules/system.nix ./modules/apps.nix
./modules/apps.nix ./modules/host-users.nix
./modules/host-users.nix nix-homebrew.darwinModules.nix-homebrew
nix-homebrew.darwinModules.nix-homebrew home-manager.darwinModules.home-manager
home-manager.darwinModules.home-manager {
{ home-manager = {
home-manager = { useGlobalPkgs = true;
useGlobalPkgs = true; useUserPackages = true;
useUserPackages = true; backupFileExtension = "backup";
backupFileExtension = "backup"; extraSpecialArgs = specialArgs;
extraSpecialArgs = specialArgs; sharedModules = [
sharedModules = [ nvf.homeManagerModules.nvf
nvf.homeManagerModules.nvf sops-nix.homeManagerModules.sops
sops-nix.homeManagerModules.sops ];
]; users.${username} = import ./home;
users.${username} = import ./home; };
}; }
} ];
];
};
formatter.${system} = nixpkgs.legacyPackages.${system}.alejandra;
}; };
formatter.${system} = nixpkgs.legacyPackages.${system}.alejandra;
};
} }

View file

@ -6,7 +6,7 @@
accordion-padding = 10; accordion-padding = 10;
default-root-container-layout = "tiles"; default-root-container-layout = "tiles";
default-root-container-orientation = "auto"; default-root-container-orientation = "auto";
on-focused-monitor-changed = [ "move-mouse monitor-lazy-center" ]; on-focused-monitor-changed = ["move-mouse monitor-lazy-center"];
automatically-unhide-macos-hidden-apps = false; automatically-unhide-macos-hidden-apps = false;
# persistent-workspaces = [ "1" "2" "3" "4" "5" "6" "7" "8" "9" ]; # persistent-workspaces = [ "1" "2" "3" "4" "5" "6" "7" "8" "9" ];

View file

@ -2,8 +2,7 @@
pkgs, pkgs,
username, username,
... ...
}: }: {
{
imports = [ imports = [
./fd.nix ./fd.nix
./fzf.nix ./fzf.nix

View file

@ -1,7 +1,7 @@
{ {
programs.fd = { programs.fd = {
enable = true; enable = true;
ignores = [ ".git/" ]; ignores = [".git/"];
hidden = true; hidden = true;
}; };
} }

View file

@ -6,6 +6,7 @@
tools = { tools = {
node = "lts"; node = "lts";
uv = "latest"; uv = "latest";
python = "3.13";
}; };
settings = { settings = {
experimental = true; experimental = true;

View file

@ -1,9 +1,8 @@
{ lib, ... }: {lib, ...}: [
[
# autocmds # autocmds
{ {
enable = true; enable = true;
event = [ "BufReadPost" ]; event = ["BufReadPost"];
desc = "Return to last cursor position"; desc = "Return to last cursor position";
group = "LastCursorGroup"; group = "LastCursorGroup";
callback = lib.generators.mkLuaInline '' callback = lib.generators.mkLuaInline ''
@ -18,10 +17,10 @@
} }
{ {
enable = true; enable = true;
event = [ "TextYankPost" ]; event = ["TextYankPost"];
desc = "Highlight yanks on copy"; desc = "Highlight yanks on copy";
group = "HighlightYank"; group = "HighlightYank";
pattern = [ "*" ]; pattern = ["*"];
callback = lib.generators.mkLuaInline '' callback = lib.generators.mkLuaInline ''
function() function()
vim.hl.on_yank({ vim.hl.on_yank({

View file

@ -1,5 +1,5 @@
{ {
# spellcheck # spellcheck
enable = true; enable = true;
languages = [ "en" ]; languages = ["en"];
} }

View file

@ -2,10 +2,9 @@
lib, lib,
pkgs, pkgs,
... ...
}: }: let
let
options = import ./core/options.nix; options = import ./core/options.nix;
autocmds = import ./core/autocmds.nix { inherit lib; }; autocmds = import ./core/autocmds.nix {inherit lib;};
augroups = import ./core/augroups.nix; augroups = import ./core/augroups.nix;
keymaps = import ./core/keymaps.nix; keymaps = import ./core/keymaps.nix;
fzf-lua = import ./plugins/fzf-lua.nix; fzf-lua = import ./plugins/fzf-lua.nix;
@ -15,11 +14,10 @@ let
terminal = import ./plugins/terminal.nix; terminal = import ./plugins/terminal.nix;
theme = import ./appearance/theme.nix; theme = import ./appearance/theme.nix;
lsp = import ./lsp/lsp.nix; lsp = import ./lsp/lsp.nix;
treesitter = import ./lsp/treesitter.nix { inherit pkgs; }; treesitter = import ./lsp/treesitter.nix {inherit pkgs;};
autocomplete = import ./lsp/autocomplete.nix; autocomplete = import ./lsp/autocomplete.nix;
languages = import ./lsp/languages; languages = import ./lsp/languages;
in in {
{
programs.nvf = { programs.nvf = {
enable = true; enable = true;

View file

@ -3,15 +3,15 @@
enable = true; enable = true;
extraDiagnostics = { extraDiagnostics = {
enable = true; enable = true;
types = [ "shellcheck" ]; types = ["shellcheck"];
}; };
format = { format = {
enable = true; enable = true;
type = [ "shfmt" ]; type = ["shfmt"];
}; };
lsp = { lsp = {
enable = true; enable = true;
servers = [ "bash-ls" ]; servers = ["bash-ls"];
}; };
treesitter.enable = true; treesitter.enable = true;
} }

View file

@ -6,8 +6,7 @@ let
markdown = import ./markdown.nix; markdown = import ./markdown.nix;
html = import ./html.nix; html = import ./html.nix;
yaml = import ./yaml.nix; yaml = import ./yaml.nix;
in in {
{
inherit inherit
nix nix
python python

View file

@ -3,7 +3,7 @@
enable = true; enable = true;
extraDiagnostics = { extraDiagnostics = {
enable = true; enable = true;
types = [ "htmlhint" ]; types = ["htmlhint"];
}; };
format = { format = {
enable = true; enable = true;
@ -14,7 +14,7 @@
}; };
lsp = { lsp = {
enable = true; enable = true;
servers = [ "superhtml" ]; servers = ["superhtml"];
}; };
treesitter = { treesitter = {
enable = true; enable = true;

View file

@ -3,15 +3,15 @@
enable = true; enable = true;
extraDiagnostics = { extraDiagnostics = {
enable = true; enable = true;
types = [ "luacheck" ]; types = ["luacheck"];
}; };
format = { format = {
enable = true; enable = true;
type = [ "stylua" ]; type = ["stylua"];
}; };
lsp = { lsp = {
enable = true; enable = true;
servers = [ "lua-language-server" ]; servers = ["lua-language-server"];
}; };
treesitter.enable = true; treesitter.enable = true;
} }

View file

@ -13,7 +13,7 @@
}; };
extraDiagnostics = { extraDiagnostics = {
enable = true; enable = true;
types = [ "markdownlint-cli2" ]; types = ["markdownlint-cli2"];
}; };
format = { format = {
enable = true; enable = true;
@ -24,7 +24,7 @@
}; };
lsp = { lsp = {
enable = true; enable = true;
servers = [ "marksman" ]; servers = ["marksman"];
}; };
treesitter.enable = true; treesitter.enable = true;
} }

View file

@ -10,11 +10,11 @@
}; };
format = { format = {
enable = true; enable = true;
type = [ "alejandra" ]; type = ["alejandra"];
}; };
lsp = { lsp = {
enable = true; enable = true;
servers = [ "nil" ]; servers = ["nil"];
}; };
treesitter.enable = true; treesitter.enable = true;
} }

View file

@ -3,11 +3,11 @@
enable = true; enable = true;
format = { format = {
enable = true; enable = true;
type = [ "ruff" ]; type = ["ruff"];
}; };
lsp = { lsp = {
enable = true; enable = true;
servers = [ "pyright" ]; servers = ["pyright"];
}; };
treesitter.enable = true; treesitter.enable = true;
} }

View file

@ -3,7 +3,7 @@
enable = true; enable = true;
lsp = { lsp = {
enable = true; enable = true;
servers = [ "yaml-language-server" ]; servers = ["yaml-language-server"];
}; };
treesitter.enable = true; treesitter.enable = true;
} }

View file

@ -1,5 +1,4 @@
{ pkgs, ... }: {pkgs, ...}: {
{
# treesitter # treesitter
enable = true; enable = true;
addDefaultGrammars = true; addDefaultGrammars = true;

View file

@ -2,5 +2,5 @@
# fzf-lua # fzf-lua
enable = true; enable = true;
profile = "default"; profile = "default";
setupOpts = { }; setupOpts = {};
} }

View file

@ -1,13 +1,12 @@
{ config, ... }: {config, ...}: {
{
sops = { sops = {
age.keyFile = "${config.home.homeDirectory}/.config/sops/age/keys.txt"; age.keyFile = "${config.home.homeDirectory}/.config/sops/age/keys.txt";
defaultSopsFile = ../secrets/poby.yaml; defaultSopsFile = ../secrets/poby.yaml;
secrets = { secrets = {
"github_ssh_key" = { }; "github_ssh_key" = {};
"github_cli_token" = { }; "github_cli_token" = {};
}; };
}; };
} }

View file

@ -1,15 +1,14 @@
{ config, ... }: {config, ...}: {
{
programs.ssh = { programs.ssh = {
enable = true; enable = true;
enableDefaultConfig = false; enableDefaultConfig = false;
matchBlocks = { matchBlocks = {
"*" = { }; "*" = {};
"github.com" = { "github.com" = {
host = "github.com"; host = "github.com";
user = "git"; user = "git";
identitiesOnly = true; identitiesOnly = true;
identityFile = [ config.sops.secrets."github_ssh_key".path ]; identityFile = [config.sops.secrets."github_ssh_key".path];
}; };
}; };
}; };

View file

@ -1,5 +1,4 @@
{ lib, ... }: {lib, ...}: {
{
programs.starship = { programs.starship = {
enable = true; enable = true;
enableZshIntegration = true; enableZshIntegration = true;
@ -163,8 +162,8 @@
"package-lock.json" "package-lock.json"
"yarn.lock" "yarn.lock"
]; ];
detect_folders = [ "node_modules" ]; detect_folders = ["node_modules"];
detect_extensions = [ ]; detect_extensions = [];
}; };
python = { python = {

View file

@ -3,6 +3,6 @@
enable = true; enable = true;
enableZshIntegration = true; enableZshIntegration = true;
enableBashIntegration = true; enableBashIntegration = true;
options = [ "--cmd j" ]; options = ["--cmd j"];
}; };
} }

View file

@ -1,5 +1,4 @@
{ config, ... }: {config, ...}: {
{
programs.zsh = { programs.zsh = {
enable = true; enable = true;
@ -21,7 +20,7 @@
shellAliases = { shellAliases = {
poby = "echo my name is poby"; poby = "echo my name is poby";
nixconfig = "cd ~/nix-darwin && vim flake.nix"; nixconfig = "cd ~/nix-darwin && vim flake.nix";
just-darwin = "cd ~/nix-darwin && just darwin"; just-darwin = "cd ~/nix-darwin && just darwin $(hostname)";
}; };
sessionVariables = { sessionVariables = {

View file

@ -5,8 +5,7 @@
homebrew-core, homebrew-core,
homebrew-cask, homebrew-cask,
... ...
}: }: {
{
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [

View file

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

View file

@ -2,8 +2,7 @@
pkgs, pkgs,
lib, lib,
... ...
}: }: {
{
nix = { nix = {
enable = true; enable = true;
package = pkgs.nix; package = pkgs.nix;
@ -13,7 +12,7 @@
"nix-command" "nix-command"
"flakes" "flakes"
]; ];
substituters = [ "https://nix-community.cachix.org" ]; substituters = ["https://nix-community.cachix.org"];
trusted-public-keys = [ trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
]; ];

View file

@ -4,8 +4,7 @@
username, username,
hostname, hostname,
... ...
}: }: {
{
time.timeZone = "Asia/Seoul"; time.timeZone = "Asia/Seoul";
system = { system = {
@ -19,14 +18,13 @@
sudo -u ${username} /System/Library/PrivateFrameworks/SystemAdministration.framework/Resources/activateSettings -u sudo -u ${username} /System/Library/PrivateFrameworks/SystemAdministration.framework/Resources/activateSettings -u
''; '';
activationScripts.applications.text = activationScripts.applications.text = let
let env = pkgs.buildEnv {
env = pkgs.buildEnv { name = "system-applications";
name = "system-applications"; paths = config.environment.systemPackages;
paths = config.environment.systemPackages; pathsToLink = ["/Applications"];
pathsToLink = [ "/Applications" ]; };
}; in
in
pkgs.lib.mkForce '' pkgs.lib.mkForce ''
# Set up applications. # Set up applications.
echo "setting up /Applications..." >&2 echo "setting up /Applications..." >&2