From fb8da3487ab78b9f969a0758b905860f42e9ad09 Mon Sep 17 00:00:00 2001 From: Don Harper Date: Thu, 14 Sep 2023 21:17:02 -0500 Subject: [PATCH] flake | working for vm --- flake.nix | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/flake.nix b/flake.nix index 8080e5e..7f85a99 100644 --- a/flake.nix +++ b/flake.nix @@ -1,13 +1,41 @@ { inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + home-manager = { + url = "github:nix-community/home-manager/release-23.05"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + nixos-hardware.url = "github:NixOS/nixos-hardware/master"; }; outputs = inputs: { - nixosConfigurations = { + nixosConfigurations = let + workstation = { + modules = [ + ./workstation + inputs.home-manager.nixosModules.home-manager + ./home + ]; + }; + in { loki = inputs.nixpkgs.lib.nixosSystem { system = "x86_64-linux"; - modules = [ ./hosts/loki/configuration.nix ]; + modules = workstation.modules ++ [ + { + networking.hostName = "loki"; + } + ./wm/sway + ]; + }; + vm2 = inputs.nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + modules = workstation.modules ++ [ + { + services.getty.autologinUser = "don"; + networking.hostName = "vm2"; + } + ./wm/sway + ]; }; }; };