Skip to content

Commit

Permalink
feat(nix):添加初始配置文件和依赖项
Browse files Browse the repository at this point in the history
- 创建 .gitignore 以排除不必要的文件和目录。
- 使用新的依赖项更新了 flake.lock,包括“deploy-rs”和各种“flake-compat”版本。
- 添加 flake.nix,其中包含核心系统、库和应用程序配置。
- 引入了各种系统的部署检查和默认配置。
- 为 aarch64-darwin 系统实现了用户和主配置。
- 添加了 GUI 应用程序和 CLI 工具配置,包括编辑器和终端设置。
- 建立了用于启用/禁用各种程序和服务的选项。
  • Loading branch information
Jetiaime committed Jan 15, 2025
1 parent 5d9f888 commit 89f7260
Show file tree
Hide file tree
Showing 23 changed files with 564 additions and 58 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.DS_Store
./vscode
./idea
6 changes: 6 additions & 0 deletions checks/deploy/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
inputs,
...
}: builtins.mapAttrs (
system: deploy-lib: deploy-lib.deployChecks inputs.self.deploy
) inputs.deploy-rs.lib
126 changes: 106 additions & 20 deletions flake.lock

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

36 changes: 34 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
description = "TeAmo's Nix Darwin Configuration";

inputs = {

#########################################################
# Core Systems #
#########################################################

# Nixpkgs
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";

Expand All @@ -23,6 +28,13 @@
inputs.nixpkgs.follows = "nixpkgs";
};

#########################################################
# Core Libs #
#########################################################

# Deployment
deploy-rs.url = "github:serokell/deploy-rs";

# Snowfall Lib
snowfall-lib = {
url = "github:snowfallorg/lib";
Expand All @@ -35,6 +47,10 @@
inputs.nixpkgs.follows = "nixpkgs";
};

#########################################################
# Applications #
#########################################################

# WezTerm
wezterm.url = "github:wez/wezterm?dir=nix";
};
Expand All @@ -56,7 +72,7 @@
};
};
};
in lib.mkFlake {
in with lib; mkFlake {
channels-config = {
allowUnfree = true;
permittedInsecurePackages = [];
Expand All @@ -65,6 +81,22 @@

overlays = [];

systems = {};
systems = {
modules = {
nixos = with inputs; [
home-manager.nixosModules.home-manager
];

darwin = with inputs; [
home-manager.darwinModules.home-manager
];
};

hosts = {};
};

deploy = mkDeploy {
inherit inputs;
};
};
}
45 changes: 45 additions & 0 deletions homes/aarch64-darwin/teamo@blaze/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
lib,
namespace,
...
}: let
inherit (lib.${namespace}) enabled;
in {
${namespace} = {
home = {
enable = true;
stateVersion = "24.11";
};

user = {
enable = true;
email = "[email protected]";
};

programs = {
cli = {
editor = {
neovim = enabled;
helix = enabled;
};

shell = {
prompt = {
starship = enabled;
};
};
};

gui = {
editor = {
obsidian = enabled;
vscode = enabled;
};

terminal.wezterm = enabled;

windows.launcher.raycast = enabled;
};
};
};
}
Loading

0 comments on commit 89f7260

Please sign in to comment.