Skip to content

Commit

Permalink
feat: add mio config
Browse files Browse the repository at this point in the history
and update secrets repo to remove nano and add mio
  • Loading branch information
shelken committed Sep 8, 2024
1 parent 1423d1b commit 3d9d989
Show file tree
Hide file tree
Showing 9 changed files with 76 additions and 8 deletions.
6 changes: 3 additions & 3 deletions flake.lock

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

13 changes: 13 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,17 @@
"hosts/yuuko/home.nix"
];
};
mioModules = {
darwin-modules = map mylib.relativeToRoot [
"modules/darwin"
"hosts/mio"
];
home-modules = map mylib.relativeToRoot [
"home/darwin"
"secrets/home.nix"
"hosts/mio/home.nix"
];
};
nanoModules = {
darwin-modules = map mylib.relativeToRoot [
"modules/darwin"
Expand Down Expand Up @@ -118,6 +129,8 @@
darwinConfigurations = {
# mac mini
yuuko = mylib.macosSystem (yuukoModules // args // {system = "aarch64-darwin";});
# macbook air
mio = mylib.macosSystem (mioModules // args // {system = "aarch64-darwin";});
nano = mylib.macosSystem (nanoModules // args // {system = "x86_64-darwin";});
ling = mylib.macosSystem (lingModules // args // {system = "aarch64-darwin";});
};
Expand Down
12 changes: 11 additions & 1 deletion home/base/core/secrets.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
{mylib, ...}: let
{
mylib,
config,
lib,
...
}: let
inherit (mylib) mkBoolOpt;
inherit (lib) mkIf;
cfg = config.shelken.secrets;
in {
options.shelken.secrets = {
enable = mkBoolOpt false "Whether or not use secrets";
};
config =
mkIf cfg.enable {
};
}
8 changes: 8 additions & 0 deletions hosts/mio/apps.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
# 版本差异的
homebrew = {
casks = [
"arc"
];
};
}
11 changes: 11 additions & 0 deletions hosts/mio/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
_: let
hostname = "mio";
in {
networking.hostName = hostname;
networking.computerName = hostname;
system.defaults.smb.NetBIOSName = hostname;
imports = [
./apps.nix
];
shelken.wm.aerospace.enable = true;
}
9 changes: 9 additions & 0 deletions hosts/mio/home.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{...}: {
# programs.ssh = {
# inherit (myvars.networking.ssh) extraConfig;
# };
shelken = {
wm.aerospace.enable = true;
secrets.enable = true;
};
}
2 changes: 1 addition & 1 deletion hosts/yuuko/home.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
# };
shelken = {
wm.aerospace.enable = true;
secrets = true;
secrets.enable = true;
};
}
6 changes: 3 additions & 3 deletions modules/darwin/apps.nix
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,9 @@ in {
};

taps = [
"homebrew/cask-fonts"
#"homebrew/cask-fonts"
"homebrew/services"
"homebrew/cask-versions"
#"homebrew/cask-versions"
"shelken/tap" # self tap

"hashicorp/tap" # terraform
Expand Down Expand Up @@ -157,7 +157,7 @@ in {

# Misc
# "iina" # video player
# "raycast" # macOS 12+ (HotKey: alt/option + space)search, calculate and run scripts(with many plugins)
"raycast" # macOS 12+ (HotKey: alt/option + space)search, calculate and run scripts(with many plugins)
"stats" # beautiful system status monitor in menu bar
# "appcleaner" # app uninstall
# "applite" # homebrew ui; need macOS 13+
Expand Down
17 changes: 17 additions & 0 deletions modules/darwin/secrets.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
mylib,
config,
lib,
...
}: let
inherit (mylib) mkBoolOpt;
inherit (lib) mkIf;
cfg = config.shelken.secrets;
in {
options.shelken.secrets = {
enable = mkBoolOpt false "Whether or not use secrets";
};
config =
mkIf cfg.enable {
};
}

0 comments on commit 3d9d989

Please sign in to comment.