move laptop to x13-mairie

This commit is contained in:
2026-06-19 06:07:08 +02:00
parent 25a00f435f
commit a52e554770
4 changed files with 34 additions and 3 deletions

31
README.md Normal file
View File

@@ -0,0 +1,31 @@
# nixos-config
Configuration NixOS multi-machines gérée par flake.
## Machines
| Host | Fichier | Description |
|------|---------|-------------|
| `nixos-desktop` | `hosts/nixos-desktop/` | Desktop AMD, Hyprland, Steam, Ollama |
| `x13-mairie` | `hosts/x13-mairie/` | Laptop ThinkPad X13, Hyprland |
## Commandes
```bash
# Appliquer la configuration
sudo nixos-rebuild switch --flake .#nixos-desktop
sudo nixos-rebuild switch --flake .#x13-mairie
# Tester sans activer (rollback automatique au reboot)
sudo nixos-rebuild test --flake .#x13-mairie
# Mettre à jour les inputs du flake
nix flake update
```
## Ajouter une nouvelle machine
1. Créer `hosts/<nom>/default.nix` et `hosts/<nom>/users.nix`
2. Copier la hardware config : `nixos-generate-config --show-hardware-config > hosts/<nom>/hardware-configuration.nix`
3. Déclarer le host dans `flake.nix`
4. `sudo nixos-rebuild switch --flake .#<nom>`

View File

@@ -27,13 +27,13 @@
];
};
nixosConfigurations.nixos-laptop = nixpkgs.lib.nixosSystem {
nixosConfigurations.x13-mairie = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = {
pkgs-unstable = nixpkgs-unstable.legacyPackages.x86_64-linux;
};
modules = [
./hosts/nixos-laptop
./hosts/x13-mairie
{
nixpkgs.config.allowUnfree = true;
nixpkgs.overlays = [ claude-code.overlays.default ];

View File

@@ -14,7 +14,7 @@
../../modules/desktop/packages.nix
];
networking.hostName = "nixos-laptop";
networking.hostName = "x13-mairie";
nix.settings.experimental-features = [ "nix-command" "flakes" ];