feat(hosts): add macOS and Nix-on-Droid configurations
Introduce base configurations for macOS and Nix-on-Droid hosts. The macOS configuration sets up Nix-darwin with home-manager, essential system packages, keyboard remapping, and disabled Homebrew. The Nix-on-Droid configuration provides common environment packages, home-manager integration, and Nix flake support.
This commit is contained in:
@@ -0,0 +1,70 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
inputs.home-manager.darwinModules.home-manager
|
||||
|
||||
|
||||
# inputs.sops.nixosModules.sops # Inclus dans sopswarden
|
||||
|
||||
# ../../services/wg-quick
|
||||
];
|
||||
|
||||
environment.systemPackages = [
|
||||
inputs.nix-darwin.packages.aarch64-darwin.darwin-rebuild
|
||||
pkgs.vim
|
||||
pkgs.neovim
|
||||
pkgs.git
|
||||
];
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
networking.hostName = "macos";
|
||||
|
||||
# services.nix-daemon.enable = true; <- supprime cette ligne
|
||||
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
extraSpecialArgs = {inherit inputs;};
|
||||
backupFileExtension = "bak";
|
||||
users.marc = import ../../users/mac/home.nix;
|
||||
};
|
||||
|
||||
# darwin-configuration.nix ou flake.nix -> darwinConfigurations
|
||||
system.keyboard = {
|
||||
enableKeyMapping = true;
|
||||
remapCapsLockToEscape = true;
|
||||
};
|
||||
|
||||
system.primaryUser = "marc";
|
||||
|
||||
# deactivated
|
||||
homebrew = {
|
||||
enable = false;
|
||||
onActivation = {
|
||||
autoUpdate = true;
|
||||
cleanup = "zap"; # supprime les packages non listés
|
||||
upgrade = true;
|
||||
};
|
||||
|
||||
brews = [
|
||||
"mas" # packages CLI homebrew
|
||||
];
|
||||
|
||||
casks = [
|
||||
"librewolf"
|
||||
"rqbit"
|
||||
"beeper"
|
||||
];
|
||||
|
||||
masApps = {
|
||||
# App Store (nécessite mas)
|
||||
"Xcode" = 497799835;
|
||||
};
|
||||
};
|
||||
|
||||
system.stateVersion = 6;
|
||||
}
|
||||
@@ -0,0 +1,126 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
# ./modules/sshd
|
||||
# ../../nod-sshd
|
||||
# ../../zsh
|
||||
# ../../services/postgres
|
||||
# ../../services/nextcloud
|
||||
# ../../services/radarr
|
||||
];
|
||||
|
||||
# Simply install just the packages
|
||||
environment.packages = with pkgs; [
|
||||
# Some common stuff that people expect to have
|
||||
procps
|
||||
killall
|
||||
fastfetch
|
||||
#diffutils
|
||||
#findutils
|
||||
#utillinux
|
||||
#tzdata
|
||||
#hostname
|
||||
#man
|
||||
#gnugrep
|
||||
#gnupg
|
||||
#gnused
|
||||
#gnutar
|
||||
#bzip2
|
||||
#gzip
|
||||
#xz
|
||||
#zip
|
||||
#unzip
|
||||
eza
|
||||
nano
|
||||
openssh
|
||||
iproute2
|
||||
shadow
|
||||
neovim
|
||||
zsh
|
||||
git
|
||||
# gh
|
||||
just
|
||||
wayvnc
|
||||
stow
|
||||
ncdu
|
||||
# pangolin
|
||||
htop
|
||||
which
|
||||
podman
|
||||
neofetch
|
||||
# gemini-cli-bin
|
||||
tmate
|
||||
bat
|
||||
ripgrep
|
||||
qemu
|
||||
|
||||
# pinentry-curses
|
||||
];
|
||||
|
||||
# home-manager.users.nix-on-droid = {
|
||||
# home.stateVersion = "25.11";
|
||||
# imports = [
|
||||
# inputs.nixvim.homeModules.default
|
||||
# ../../modules/home/neovim
|
||||
# ../../modules/home/zsh
|
||||
# ../../modules/home/git
|
||||
# ../../modules/home/ssh
|
||||
# # ../../modules/home/gh
|
||||
# ];
|
||||
# };
|
||||
|
||||
home-manager.config = {
|
||||
home.stateVersion = "24.05";
|
||||
# home.packages = [
|
||||
# (inputs.nixvim.legacyPackages.aarch64-linux.makeNixvimWithModule {
|
||||
# module = import ../../modules/home/neovim;
|
||||
# })
|
||||
# ];
|
||||
imports = [
|
||||
# ../../modules/home/yt-dlp
|
||||
# inputs.nixvim.homeModules.default
|
||||
# ../../modules/home/neovim
|
||||
# ../../modules/home/zsh
|
||||
# ../../modules/home/git
|
||||
# ../../modules/home/ssh
|
||||
# ../../modules/home/gh
|
||||
];
|
||||
};
|
||||
|
||||
user.shell = "${pkgs.zsh}/bin/zsh";
|
||||
|
||||
# --- CONFIGURATION GPG (OBLIGATOIRE SUR 25.11) ---
|
||||
# Sans ça, git sign / gpg plantera car il ne trouvera pas pinentry
|
||||
# environment.etc."gnupg/gpg-agent.conf".text = ''
|
||||
# pinentry-program ${pkgs.pinentry-curses}/bin/pinentry
|
||||
# '';
|
||||
|
||||
# Ces options activent l'intégration Home Manager
|
||||
# home-manager.useGlobalPkgs = true;
|
||||
# home-manager.useUserPackages = true;
|
||||
home-manager.backupFileExtension = "hm-backup";
|
||||
|
||||
# environment.pathsToLink = [
|
||||
# "/share/applications"
|
||||
# "/share/xdg-desktop-portal"
|
||||
# ];
|
||||
|
||||
# Backup etc files instead of failing to activate generation if a file already exists in /etc
|
||||
environment.etcBackupExtension = ".bak";
|
||||
|
||||
# Read the changelog before changing this value
|
||||
system.stateVersion = "24.05";
|
||||
|
||||
# Set up nix for flakes
|
||||
nix.extraOptions = ''
|
||||
experimental-features = nix-command flakes
|
||||
'';
|
||||
|
||||
# Set your time zone
|
||||
time.timeZone = "Europe/Paris";
|
||||
}
|
||||
Reference in New Issue
Block a user