Skip to content

RazYang/dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

277 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dotfiles (Nix Flake)

个人 Nix Flake,主要用来管理NixOS、home-manager、nix-darwin配置,也包含packages/bundlers等flake输出支持。

主要内容

  • 支持的系统架构:x86_64-linuxaarch64-linuxaarch64-darwin
  • nixos配置:playground(NixOS,impermanence + home-manager + 示例服务)
  • home-manager配置:razyangrootroot@playground(均为 x86_64-linux)、yang(aarch64-darwin)
  • packages:hello-customnixvimhm-switch
  • formatter:treefmt
  • 交叉编译支持:nix build .#pkgsCross.aarch64-multiplatform.hello-custom

仓库结构

  • flake.nix:目前该文件的作用约等于go.mod,真正的entrypint为part.nix,这么做是为rfc_0193以及rfc_0194做准备
  • modules:参考dendritic模式,每个文件都是一个flake module
  • services/process-compose-flake服务
  • packages/:自定义包,按包名分目录,自动导入每个目录下的package.nix文件,具有交叉编译支持
  • devshells/numtide/devshelldevelop环境定义独立,自动导入每个子目录下的devshell.nix
  • bundlers/:应用打包器集合,自动导入每个子目录下的bundler.nix

快速开始

  1. 安装 Nix 并启用一些额外的实验特性nix-command flakes pipe-operators
  2. 克隆仓库:git clone <repo-url> && cd dotfiles
  3. 预览输出:nix flake show
  4. NixOS:nix run .#nixos-switch
  5. nix-darwin:nix run .#darwin-switch
  6. 独立home-manager:nix run .#hm-switch
  7. 构建包:nix build .#hello-customnix run .#pkgsCross.aarch64-multiplatform.hello-custom
  8. 进入开发环境:nix develop .#hello-custom
  9. 代码格式化:nix fmt

About

My dotfiles

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages