diff options
| -rw-r--r-- | flake.nix | 65 | ||||
| -rw-r--r-- | machines/vm/foolcreekwireless.nix | 22 | ||||
| -rw-r--r-- | machines/vm/foolcreekwireless/default.nix | 33 |
3 files changed, 73 insertions, 47 deletions
@@ -159,26 +159,38 @@ # }; let inherit (self) outputs; - lib = nixpkgs.lib //home-manager.lib; + lib = nixpkgs.lib // home-manager.lib; systems = [ "x86_64-linux" "aarch64-linux" ]; - # forEachSystem = f: lib.genAttrs systems (system: f pkgsFor.${system}); + # forAllSystems = f: lib.genAttrs systems (system: f pkgsFor.${system}); pkgsFor = lib.genAttrs systems (system: import nixpkgs { inherit system; - config.allowUnfreee = true; + config.allowUnfree = true; }); - minimalConfigSettings = [ # From github:MasterofNull/nixos config + minimalHomeManagerSettings = [ # From github:MasterofNull/nixos config home-manager.nixosModules.home-manager { home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; home-manager.extraSpecialArgs = { inherit inputs; }; } - { - # # Let 'nixos-version --json' know the Git revision of this flake. (for containers?) - # system.configurationRevision = nixpkgs.lib.mkIf (self ? rev) self.rev; - # nix.registry.nixpkgs.flake = nixpkgs; - } + # lib.nixosSystem { + # modules = [ + # ./modules/nixos/nix-common.nix + # ./modules/nixos/environment.nix + # ./modules/nixos/system-packages.nix + + # ./modules/users/defin.nix + # ./modules/users/root.nix + # ]; + # # # Let 'nixos-version --json' know the Git revision of this flake. (for containers?) + # # system.configurationRevision = nixpkgs.lib.mkIf (self ? rev) self.rev; + # # nix.registry.nixpkgs.flake = nixpkgs; + # } ]; + vm = lib.nixosSystem { + system = "x86_64-linux"; + modules = [ ./default.nix ]; + }; in { inherit lib; nixosModules = import ./modules/nixos; @@ -196,14 +208,14 @@ nixosConfigurations = { khad = lib.nixosSystem { # Main desktop - modules = minimalConfigSettings ++ [ ./machines/khad + modules = minimalHomeManagerSettings ++ [ ./machines/khad lix-module.nixosModules.default - home-manager.nixosModules.home-manager { home-manager.users.defin = import ./home-manager/home.nix; } + home-manager.nixosModules.home-manager { home-manager.users.defin = import ./home-manager/home.nix; } ]; }; zenbook = lib.nixosSystem { # Personal laptop # specialArgs = { inherit inputs; }; - modules = minimalConfigSettings ++ [ ./machines/zenbook + modules = minimalHomeManagerSettings ++ [ ./machines/zenbook lix-module.nixosModules.default # hyprland.homeManagerModules.default {wayland.windowManager.hyprland.enable = true;} home-manager.nixosModules.home-manager { home-manager.users.defin = import ./home-manager/home.nix; } @@ -211,42 +223,42 @@ }; betsy = lib.nixosSystem { # work laptop - modules = minimalConfigSettings ++ [ ./machines/betsy + modules = minimalHomeManagerSettings ++ [ ./machines/betsy # lix-module.nixosModules.default home-manager.nixosModules.home-manager { home-manager.users.defin = import ./home-manager/home.nix; } ]; }; doretta = lib.nixosSystem { # build server - modules = minimalConfigSettings ++ [ ./machines/doretta + modules = minimalHomeManagerSettings ++ [ ./machines/doretta lix-module.nixosModules.default home-manager.nixosModules.home-manager { home-manager.users.defin = import ./home-manager/doretta.nix; } ]; }; bosco = lib.nixosSystem { # networking server - modules = minimalConfigSettings ++ [ ./machines/bosco + modules = minimalHomeManagerSettings ++ [ ./machines/bosco # lix-module.nixosModules.default home-manager.nixosModules.home-manager { home-manager.users.defin = import ./home-manager/default.nix; } ]; }; biski = lib.nixosSystem { # another networking server, physical instead of cloud - modules = minimalConfigSettings ++ [ ./machines/biski + modules = minimalHomeManagerSettings ++ [ ./machines/biski disko.nixosModules.disko home-manager.nixosModules.home-manager { home-manager.users.defin = import ./home-manager/default.nix; } ]; }; picast = lib.nixosSystem { # anger at chromecast - modules = minimalConfigSettings ++ [ ./machines/picast + modules = minimalHomeManagerSettings ++ [ ./machines/picast home-manager.nixosModules.home-manager { home-manager.users.defin = import ./home-manager/default.nix; } ]; }; foolcreekwireless = lib.nixosSystem { # vm for website - modules = minimalConfigSettings ++ [ ./machines/vm/foolcreekwireless.nix + modules = minimalHomeManagerSettings ++ [ ./machines/vm/foolcreekwireless home-manager.nixosModules.home-manager { home-manager.users.defin = import ./home-manager/default.nix; } ]; }; live = lib.nixosSystem { - modules = minimalConfigSettings ++ [ + modules = minimalHomeManagerSettings ++ [ (nixpkgs + "/nixos/modules/installer/sd-card/sd-image-aarch64-installer.nix") ./machines/iso/configuration.nix ./modules/users/defin.nix @@ -263,14 +275,17 @@ ]; }; }; + vms = { + foolcreekwireless = vm.config.system.build.vm; + }; homeConfigurations = { #NOTE: no worky yet # Standalone HM only - # Desktop - "defin@khad" = lib.homeManagerConfiguration { - modules = [ ./home-manager/home.nix ]; - pkgs = pkgsFor.x86_64-linux; - extraSpecialArgs = { inherit inputs outputs; }; - }; + # # Desktop + # "defin@khad" = lib.homeManagerConfiguration { + # modules = [ ./home-manager/home.nix ]; + # pkgs = pkgsFor.x86_64-linux; + # extraSpecialArgs = { inherit inputs outputs; }; + # }; # Laptop "defin@nixos-zenbook" = lib.homeManagerConfiguration { modules = [ ./home-manager/home.nix ]; diff --git a/machines/vm/foolcreekwireless.nix b/machines/vm/foolcreekwireless.nix deleted file mode 100644 index e549b17..0000000 --- a/machines/vm/foolcreekwireless.nix +++ /dev/null @@ -1,22 +0,0 @@ -{ config, pkgs, ... }:{ - imports = [ - # ./hardware-configuration.nix - - ../../modules/nixos/nix-common.nix - ../../modules/nixos/environment.nix - ../../modules/nixos/system-packages.nix - - ../../modules/users/defin.nix - ../../modules/users/root.nix - ]; - - boot.loader.systemd-boot.enable = true; - boot.loader.efi.canTouchEfiVariables = true; - - environment.systemPackages = with pkgs; [ - cowsay - lolcat - ]; - - system.stateVersion = "24.11"; -} diff --git a/machines/vm/foolcreekwireless/default.nix b/machines/vm/foolcreekwireless/default.nix new file mode 100644 index 0000000..3cd4a91 --- /dev/null +++ b/machines/vm/foolcreekwireless/default.nix @@ -0,0 +1,33 @@ +{ config, pkgs, ... }:{ + imports = [ + # ./hardware-configuration.nix + + ../../../modules/nixos/nix-common.nix + ../../../modules/nixos/environment.nix + ../../../modules/nixos/system-packages.nix + + ../../../modules/users/defin.nix + ../../../modules/users/root.nix + ]; + + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + virtualisation.vmVariant = { + # following configuration is added only when building VM with build-vm + virtualisation = { + memorySize = 2048; # Use 2048 MiB memory. + cores = 3; + graphics = false; + }; + }; + + networking.firewall.allowedTCPPorts = [ 22 2200 ]; + + environment.systemPackages = with pkgs; [ + cowsay + lolcat + ]; + + nixpkgs.hostPlatform = "x86_64-linux"; + system.stateVersion = "24.11"; +} |
