From 9f2cacd5b144e052b976107fc3baa7786349aa9f Mon Sep 17 00:00:00 2001 From: TheWanderingCrow Date: Fri, 13 Sep 2024 10:58:25 -0400 Subject: [PATCH] Test this base config --- flake.nix | 24 ++++++++++++++++++++++++ hosts/remote/default.nix | 11 +++++++++++ 2 files changed, 35 insertions(+) create mode 100644 flake.nix create mode 100644 hosts/remote/default.nix diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..edcd038 --- /dev/null +++ b/flake.nix @@ -0,0 +1,24 @@ +{ + description = "Entry point for NixOS"; + + inputs = { + nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + home-manager.url = "github:nix-community/home-manager"; + home-manager.inputs.nixpkgs.follows = "nixpkgs"; + }; + + outputs = inputs: let + system = "x86_64-linux"; + inherit (inputs.nixpkgs) lib; + + pkgs = import inputs.nixpkgs { + inherit system; + config.allowUnfree = true; + }; + + ns = host: (lib.nixosSystem { + specialArgs = {inherit pkgs inputs;}; + modules = [(./hosts + "/${host}")]; + }); + in {nixosConfigurations = lib.attrsets.genAttrs ["remote"] ns;}; +} diff --git a/hosts/remote/default.nix b/hosts/remote/default.nix new file mode 100644 index 0000000..fe0dd8b --- /dev/null +++ b/hosts/remote/default.nix @@ -0,0 +1,11 @@ +{ + imports = [ + ./hardware-configuration.nix + ]; + networking.hostName = "nixos-remote"; + environment.systemPackages = [ + pkgs.git + pkgs.vim + pkgs.wget + ]; +}