feat: add nix-example host and base profile

This commit is contained in:
2026-05-28 12:54:12 +09:00
parent 57c4ac099e
commit 039282ba94
5 changed files with 55 additions and 5 deletions
+1
View File
@@ -13,5 +13,6 @@
!shells/ !shells/
!hosts/ !hosts/
!overlays/ !overlays/
!profiles/
!/flake/ !/flake/
+4 -5
View File
@@ -11,17 +11,16 @@ let
{ {
host, host,
system, system,
profile ? null,
extraModules ? [ ], extraModules ? [ ],
...
}: }:
assert lib.assertMsg (lib.elem system config.systems) assert lib.assertMsg (lib.elem system config.systems)
"mkSystem: system '${system}' not in valid systems: ${lib.generators.toPretty { } config.systems}"; "mkSystem: system '${system}' not in valid systems: ${lib.generators.toPretty { } config.systems}";
nixosSystem { nixosSystem {
inherit system; inherit system;
modules = [ modules = [
{ ../profiles/${profile}.nix
networking.hostName = lib.mkDefault host; ../hosts/${host}/default.nix
}
] ]
++ extraModules; ++ extraModules;
specialArgs = { inherit inputs; }; specialArgs = { inherit inputs; };
@@ -32,7 +31,7 @@ in
nix-example = mkSystem { nix-example = mkSystem {
host = "nix-example"; host = "nix-example";
system = "x86_64-linux"; system = "x86_64-linux";
profile = "laptop"; profile = "base";
extraModules = [ ]; extraModules = [ ];
}; };
}; };
+6
View File
@@ -0,0 +1,6 @@
{ ... }:
{
imports = [
./hardware-configuration.nix
];
}
@@ -0,0 +1,43 @@
# 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.
{
lib,
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";
}
+1
View File
@@ -0,0 +1 @@
_: { }