feat: simplify flake.nix

This commit is contained in:
Ryan Yin
2023-07-26 20:07:42 +08:00
parent eebbb9f5e6
commit 204cb03922
70 changed files with 1183 additions and 1165 deletions

View File

@@ -1,25 +1,34 @@
{ ... } @ args:
{ username, ... } @ args:
#############################################################
#
# Harmonica - my MacBook Pro 2020 13-inch, mainly for business.
#
#############################################################
let
name = "harmonica";
in
{
hostname = "harmonica";
in {
imports = [
../../modules/darwin/core.nix
../../modules/darwin/apps.nix
../../modules/darwin
../../secrets/darwin.nix
];
nixpkgs.overlays = import ../../overlays args;
networking.hostName = name;
networking.computerName = name;
system.defaults.smb.NetBIOSName = name;
networking.hostName = hostname;
networking.computerName = hostname;
system.defaults.smb.NetBIOSName = hostname;
# Define a user account. Don't forget to set a password with passwd.
users.users."${username}" = {
home = "/Users/${username}";
description = username;
# set user's default shell back to zsh
# `chsh -s /bin/zsh`
# DO NOT change the system's default shell to nushell! it will break some apps!
# It's better to change only starship/alacritty/vscode's shell to nushell!
};
nix.settings.trusted-users = [username];
}