commit 144290304148bd4057e61da10d0910a6f461254b Author: mehbark Date: Wed Oct 8 19:04:29 2025 -0400 initial diff --git a/configuration.nix b/configuration.nix new file mode 100644 index 0000000..ecb51f6 --- /dev/null +++ b/configuration.nix @@ -0,0 +1,25 @@ +{ pkgs, ... }: +{ + imports = []; + + networking.hostName = "example"; + + system.stateVersion = "24.11"; + + security.sudo.wheelNeedsPassword = false; + + services.openssh = { + enable = true; + settings.PasswordAuthentication = false; + }; + + users.users.example = { + isNormalUser = true; + description = "example"; + extraGroups = [ "networkmanager" "wheel" ]; + initialPassword = "hunter2"; + openssh.authorizedKeys.keys = [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICyTxPV3S7ms0AJ0tduI3aJP3o2TJCnkirWKaj5i1+DW" + ]; + }; +} diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..07a940c --- /dev/null +++ b/flake.lock @@ -0,0 +1,27 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1759887028, + "narHash": "sha256-gljzEVuaj841XmluE1ng62RHMN5NkMHqdw+4OtQcpi4=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "8b5c9dd8856f0c0cf46cc91f2c21c106a9d42e25", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..d51c83b --- /dev/null +++ b/flake.nix @@ -0,0 +1,16 @@ +{ + inputs = { + nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; + }; + + outputs = { self, nixpkgs }: { + nixosConfigurations.example = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + modules = [ + (import ./configuration.nix) + ]; + }; + + packages.x86_64-linux.default = self.nixosConfigurations.example.config.system.build.vm; + }; +}