From ae760a1f14dffca65d98f4daa9ce09e138fd2532 Mon Sep 17 00:00:00 2001 From: Aria Date: Wed, 6 Dec 2023 19:04:14 +0000 Subject: colmena for vps --- nix-personal/configuration.nix | 23 ++++++++++++++++------- nix-personal/flake.nix | 34 ++++++++++++++++++++++++++++------ 2 files changed, 44 insertions(+), 13 deletions(-) diff --git a/nix-personal/configuration.nix b/nix-personal/configuration.nix index 1830725..1b958e2 100644 --- a/nix-personal/configuration.nix +++ b/nix-personal/configuration.nix @@ -10,22 +10,31 @@ (modulesPath + "/profiles/qemu-guest.nix") ./disk-config.nix ]; + + # Basic setup + system.stateVersion = "23.11"; + boot.loader.grub = { # no need to set devices, disko will add all devices that have a EF02 partition to the list already # devices = [ ]; efiSupport = true; efiInstallAsRemovable = true; }; - services.openssh.enable = true; - environment.systemPackages = map lib.lowPrio [ - pkgs.curl - pkgs.gitMinimal - ]; + deployment = { + targetHost = "puppy.girlth.ing"; + buildOnTarget = true; + }; + # SSH Access + services.openssh.enable = true; users.users.root.openssh.authorizedKeys.keys = [ - "sk-ssh-ed25519@openssh.com AAAAGnNrLXNzaC1lZDI1NTE5QG9wZW5zc2guY29tAAAAIPKawhXHIFl+j/YciUzfT6AkuhLJQ9hwFU8Jl07bC7XqAAAABHNzaDo= me@aria.rip" + "no-touch-required sk-ssh-ed25519@openssh.com AAAAGnNrLXNzaC1lZDI1NTE5QG9wZW5zc2guY29tAAAAIPpKjZfzPN1KxVskFRnmTTCwzyCtjwcXVZc4i1rNfl9oAAAABHNzaDo= me@aria.rip" ]; - system.stateVersion = "23.11"; + # Networking setup + networking = { + hostName = "puppy"; + domain = "girlth.ing"; + }; } diff --git a/nix-personal/flake.nix b/nix-personal/flake.nix index 946e3bb..e9722a4 100644 --- a/nix-personal/flake.nix +++ b/nix-personal/flake.nix @@ -7,13 +7,35 @@ nixpkgs, disko, ... - }: { - nixosConfigurations.primary = nixpkgs.lib.nixosSystem { + }: let + imports = [ + disko.nixosModules.disko + ./configuration.nix + ]; + in { + devShells.x86_64-linux.default = let + pkgs = import nixpkgs {system = "x86_64-linux";}; + in + pkgs.mkShell { + buildInputs = [pkgs.colmena]; + }; + + nixosConfigurations.puppy = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; - modules = [ - disko.nixosModules.disko - ./configuration.nix - ]; + modules = imports; + }; + + colmena = { + meta = { + nixpkgs = import nixpkgs { + system = "x86_64-linux"; + }; + }; + + # Also see the non-Flakes hive.nix example above. + puppy = {...}: { + imports = imports; + }; }; }; } -- cgit v1.2.3