Convert nix-dev to flake config.

This commit is contained in:
2023-11-26 07:48:58 +00:00
parent 15c8a3fbb0
commit db1f6baaf7
7 changed files with 66 additions and 1 deletions

22
hosts/nix-dev/default.nix Normal file
View File

@@ -0,0 +1,22 @@
{ pkgs, inputs, ... }:
{
imports = [
../common/global
../common/user-node.nix
./hardware.nix
];
networking.hostName = "nix-dev";
services.tailscaleAutoconnect.authkey = "tskey-auth-k6s6VD5CNTRL-3fmjSfzbQ3PHUMyaiML95P8xzmGv5XxYc";
environment.systemPackages = with pkgs; [
wget
git
nomad
deploy-rs
docker
];
boot.loader.grub.enable = true;
boot.loader.grub.device = "/dev/sda"; # or "nodev" for efi only
}

View File

@@ -0,0 +1,23 @@
{ 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 = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/d8fd0d0d-99f3-47c3-9821-1ecb51e0fa7b";
fsType = "ext4";
};
swapDevices =
[ { device = "/dev/disk/by-uuid/f50d64a5-948d-4ff4-88f2-0e0f4eae4c9e"; }
];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
}