diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..5762d62 --- /dev/null +++ b/flake.lock @@ -0,0 +1,48 @@ +{ + "nodes": { + "home-manager": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1726222338, + "narHash": "sha256-KuA8ciNR8qCF3dQaCaeh0JWyQUgEwkwDHr/f49Q5/e8=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "503af483e1b328691ea3a434d331995595fb2e3d", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1726062873, + "narHash": "sha256-IiA3jfbR7K/B5+9byVi9BZGWTD4VSbWe8VLpp9B/iYk=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "4f807e8940284ad7925ebd0a0993d2a1791acb2f", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "home-manager": "home-manager", + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/hosts/remote/default.nix b/hosts/remote/default.nix index fe0dd8b..8634862 100644 --- a/hosts/remote/default.nix +++ b/hosts/remote/default.nix @@ -1,6 +1,9 @@ -{ +{ pkgs, + ... +}:{ imports = [ ./hardware-configuration.nix + ../../modules ]; networking.hostName = "nixos-remote"; environment.systemPackages = [ @@ -8,4 +11,14 @@ pkgs.vim pkgs.wget ]; + + boot.loader.grub.device = "/dev/xvda"; + boot.loader.grub.efiSupport = true; + boot.loader.grub.efiInstallAsRemovable = true; + boot.loader.timeout = 1; + boot.loader.grub.extraConfig = '' + serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1 + terminal_output console serial + terminal_input console serial + ''; } diff --git a/hosts/remote/hardware-configuration.nix b/hosts/remote/hardware-configuration.nix new file mode 100644 index 0000000..fcb587c --- /dev/null +++ b/hosts/remote/hardware-configuration.nix @@ -0,0 +1,29 @@ +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ config, lib, pkgs, modulesPath, ... }: + +{ + imports = [ ]; + + boot.initrd.availableKernelModules = [ "nvme" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/f222513b-ded1-49fa-b591-20ce86a2fe7f"; + fsType = "ext4"; + }; + + swapDevices = [ ]; + + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking + # (the default) this is the recommended approach. When using systemd-networkd it's + # still possible to use this option, but it's recommended to use it in conjunction + # with explicit per-interface declarations with `networking.interfaces..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.ens5.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; +} diff --git a/modules/default.nix b/modules/default.nix new file mode 100644 index 0000000..92bac17 --- /dev/null +++ b/modules/default.nix @@ -0,0 +1,5 @@ +{ +imports = [ +./boot.nix +]; +} diff --git a/shell.nix b/shell.nix index c961361..9f27b92 100644 --- a/shell.nix +++ b/shell.nix @@ -1,3 +1,6 @@ -{ pkgs ? import {} }: pkgs.mkShell { - nativeBuildInputs = with pkgs.buildPackages; [ git vim ]; +{pkgs ? import {}, ...}: { + default = pkgs.mkShell { + NIX_CONFIG = "extra-experimental-features = nix-command flakes"; + nativeBuildInputs = with pkgs; [git neovim nix]; + }; }