From 0195f7528766925efb8533db094e10753aa08114 Mon Sep 17 00:00:00 2001 From: moons-14 Date: Wed, 27 May 2026 19:34:18 +0900 Subject: [PATCH] add nix-test --- flake.nix | 6 +++++ hosts/nix-test/default.nix | 12 +++++++++ hosts/nix-test/hardware-configuration.nix | 30 +++++++++++++++++++++++ 3 files changed, 48 insertions(+) create mode 100644 hosts/nix-test/default.nix create mode 100644 hosts/nix-test/hardware-configuration.nix diff --git a/flake.nix b/flake.nix index 104dbc7..6aeb50f 100644 --- a/flake.nix +++ b/flake.nix @@ -118,6 +118,12 @@ profile = "cli-server"; extraModules = []; }; + nix-test = mkSystem { + host = "nix-test"; + system = "x86_64-linux"; + profile = "cli-server"; + extraModules = []; + }; }; devShells = { diff --git a/hosts/nix-test/default.nix b/hosts/nix-test/default.nix new file mode 100644 index 0000000..1ad056a --- /dev/null +++ b/hosts/nix-test/default.nix @@ -0,0 +1,12 @@ +# Edit this configuration file to define what should be installed on +# your system. Help is available in the configuration.nix(5) man page +# and in the NixOS manual (accessible by running ‘nixos-help’). + +{ ... }: + +{ + imports = + [ + ./hardware-configuration.nix + ]; +} diff --git a/hosts/nix-test/hardware-configuration.nix b/hosts/nix-test/hardware-configuration.nix new file mode 100644 index 0000000..2fc6e47 --- /dev/null +++ b/hosts/nix-test/hardware-configuration.nix @@ -0,0 +1,30 @@ +# 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 = + [ (modulesPath + "/profiles/qemu-guest.nix") + ]; + + boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/8f0eaec6-5dc9-4821-aa8d-fb6809b5a5bf"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/201C-961B"; + fsType = "vfat"; + options = [ "fmask=0077" "dmask=0077" ]; + }; + + swapDevices = [ ]; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; +}