diff options
| author | alex <[email protected]> | 2026-10-16 23:58:30 +0200 |
|---|---|---|
| committer | alex <[email protected]> | 2026-10-16 23:58:30 +0200 |
| commit | 30f1b4d92142ed378bac9edb54f438a7f1ba5e0a (patch) | |
| tree | bd3d385899d5453ce504b41051cd963574cf590f /flake.nix | |
| parent | 14eec8e2b0af7c74a9f5ace426f39a21fa3a84ac (diff) | |
| download | nixos-30f1b4d92142ed378bac9edb54f438a7f1ba5e0a.tar.xz nixos-30f1b4d92142ed378bac9edb54f438a7f1ba5e0a.zip | |
init
Diffstat (limited to 'flake.nix')
| -rw-r--r-- | flake.nix | 44 |
1 files changed, 36 insertions, 8 deletions
@@ -27,25 +27,53 @@ outputs = { self, nixpkgs, - lanzaboote, home-manager, ocnix, opencode, ... } @ inputs: let + mkHost = { + hostname, + system ? "x86_64-linux", + modules ? [], + }: + nixpkgs.lib.nixosSystem { + inherit system; + specialArgs = { inherit inputs opencode; }; + modules = + [ + { + networking.hostName = hostname; + nixpkgs.overlays = [ ocnix.overlays.default ]; + } + ocnix.nixosModules.opencode + home-manager.nixosModules.home-manager + ./nixos/common.nix + { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.extraSpecialArgs = { inherit inputs; }; + home-manager.users.phos = import ./home-manager/home.nix; + } + ] + ++ modules; + }; in { # NixOS configuration entrypoint # Available through 'nixos-rebuild --flake .#your-hostname' nixosConfigurations = { - phosphophyllite = nixpkgs.lib.nixosSystem { - specialArgs = { inherit inputs opencode; }; - # > Our main nixos configuration file < + phosphophyllite = mkHost { + hostname = "phosphophyllite"; modules = [ - { nixpkgs.overlays = [ ocnix.overlays.default ]; } - ocnix.nixosModules.opencode - ./nixos/configuration.nix + ./hosts/phosphophyllite ]; }; + + # Add your laptop here when ready. + # laptop-hostname = mkHost { + # hostname = "laptop-hostname"; + # modules = [ ./hosts/laptop ]; + # }; }; # Standalone home-manager configuration entrypoint @@ -61,4 +89,4 @@ }; }; }; -}
\ No newline at end of file +} |
