Modularize NixOS 'vm' configuration
							parent
							
								
									ca8cfd7deb
								
							
						
					
					
						commit
						c36b202d4e
					
				
							
								
								
									
										49
									
								
								flake.lock
								
								
								
								
							
							
						
						
									
										49
									
								
								flake.lock
								
								
								
								
							| 
						 | 
				
			
			@ -1,49 +0,0 @@
 | 
			
		|||
{
 | 
			
		||||
  "nodes": {
 | 
			
		||||
    "home-manager": {
 | 
			
		||||
      "inputs": {
 | 
			
		||||
        "nixpkgs": [
 | 
			
		||||
          "nixpkgs"
 | 
			
		||||
        ]
 | 
			
		||||
      },
 | 
			
		||||
      "locked": {
 | 
			
		||||
        "lastModified": 1748665073,
 | 
			
		||||
        "narHash": "sha256-RMhjnPKWtCoIIHiuR9QKD7xfsKb3agxzMfJY8V9MOew=",
 | 
			
		||||
        "owner": "nix-community",
 | 
			
		||||
        "repo": "home-manager",
 | 
			
		||||
        "rev": "282e1e029cb6ab4811114fc85110613d72771dea",
 | 
			
		||||
        "type": "github"
 | 
			
		||||
      },
 | 
			
		||||
      "original": {
 | 
			
		||||
        "owner": "nix-community",
 | 
			
		||||
        "ref": "release-25.05",
 | 
			
		||||
        "repo": "home-manager",
 | 
			
		||||
        "type": "github"
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "nixpkgs": {
 | 
			
		||||
      "locked": {
 | 
			
		||||
        "lastModified": 1748437600,
 | 
			
		||||
        "narHash": "sha256-hYKMs3ilp09anGO7xzfGs3JqEgUqFMnZ8GMAqI6/k04=",
 | 
			
		||||
        "owner": "nixos",
 | 
			
		||||
        "repo": "nixpkgs",
 | 
			
		||||
        "rev": "7282cb574e0607e65224d33be8241eae7cfe0979",
 | 
			
		||||
        "type": "github"
 | 
			
		||||
      },
 | 
			
		||||
      "original": {
 | 
			
		||||
        "owner": "nixos",
 | 
			
		||||
        "ref": "nixos-25.05",
 | 
			
		||||
        "repo": "nixpkgs",
 | 
			
		||||
        "type": "github"
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "root": {
 | 
			
		||||
      "inputs": {
 | 
			
		||||
        "home-manager": "home-manager",
 | 
			
		||||
        "nixpkgs": "nixpkgs"
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  "root": "root",
 | 
			
		||||
  "version": 7
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										11
									
								
								flake.nix
								
								
								
								
							
							
						
						
									
										11
									
								
								flake.nix
								
								
								
								
							| 
						 | 
				
			
			@ -6,16 +6,15 @@
 | 
			
		|||
  };
 | 
			
		||||
 | 
			
		||||
  outputs = { self, nixpkgs, home-manager }: {
 | 
			
		||||
    nixosConfigurations.nixos = nixpkgs.lib.nixosSystem {
 | 
			
		||||
    nixosConfigurations.vm = nixpkgs.lib.nixosSystem {
 | 
			
		||||
      system = "x86_64-linux";
 | 
			
		||||
      modules = [
 | 
			
		||||
        ./configuration.nix
 | 
			
		||||
        home-manager.nixosModules.home-manager
 | 
			
		||||
	{
 | 
			
		||||
        ./hosts/vm/configuration.nix
 | 
			
		||||
        home-manager.nixosModules.home-manager {
 | 
			
		||||
          home-manager.useGlobalPkgs = true;
 | 
			
		||||
          home-manager.useUserPackages = true;
 | 
			
		||||
          home-manager.users.h = ./home.nix;
 | 
			
		||||
	}
 | 
			
		||||
          home-manager.users.h = ./hosts/vm/home.nix;
 | 
			
		||||
	      }
 | 
			
		||||
      ];
 | 
			
		||||
    };
 | 
			
		||||
  };
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,18 +1,18 @@
 | 
			
		|||
{ config, pkgs, ... }:
 | 
			
		||||
{ pkgs, ... }:
 | 
			
		||||
 | 
			
		||||
{
 | 
			
		||||
  system.stateVersion = "25.05";
 | 
			
		||||
 | 
			
		||||
  imports =
 | 
			
		||||
    [
 | 
			
		||||
      ./modules/hardware-configuration.nix # Include the results of the hardware scan.
 | 
			
		||||
      ./modules/bootloader.nix
 | 
			
		||||
      ./modules/networking.nix
 | 
			
		||||
      ./modules/users.nix
 | 
			
		||||
      ./modules/audio.nix
 | 
			
		||||
      ./modules/printing.nix
 | 
			
		||||
      ./modules/localization.nix
 | 
			
		||||
      ./modules/x.nix
 | 
			
		||||
      ./hard.nix
 | 
			
		||||
      ../../modules/bootloader.nix
 | 
			
		||||
      ../../modules/networking.nix
 | 
			
		||||
      ../../modules/users.nix
 | 
			
		||||
      ../../modules/audio.nix
 | 
			
		||||
      ../../modules/printing.nix
 | 
			
		||||
      ../../modules/localization.nix
 | 
			
		||||
      ../../modules/x.nix
 | 
			
		||||
    ];
 | 
			
		||||
 | 
			
		||||
  nix.settings.experimental-features = [ "nix-command" "flakes" ];
 | 
			
		||||
		Loading…
	
		Reference in New Issue