wip
This commit is contained in:
10
flake.nix
10
flake.nix
@@ -56,9 +56,7 @@
|
||||
|
||||
nixosConfigurations.compute-deck = inputs.nixpkgs-unstable.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
./compute-deck
|
||||
];
|
||||
modules = [ ./compute-deck ];
|
||||
specialArgs = { inherit inputs; };
|
||||
};
|
||||
|
||||
@@ -68,6 +66,12 @@
|
||||
specialArgs = { inherit inputs; };
|
||||
};
|
||||
|
||||
nixosConfigurations.lp0 = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [ ./lp0 ];
|
||||
specialArgs = { inherit inputs; };
|
||||
};
|
||||
|
||||
# nixosConfigurations.devver = nixpkgs.lib.nixosSystem {
|
||||
# system = "x86_64-linux";
|
||||
# modules = [ ./devver ];
|
||||
|
76
lp0/default.nix
Normal file
76
lp0/default.nix
Normal file
@@ -0,0 +1,76 @@
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
../common-nixos-config.nix
|
||||
./hardware-config.nix
|
||||
];
|
||||
|
||||
# Use the systemd-boot EFI boot loader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
networking.hostName = "lp0onfire"; # Define your hostname.
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "America/Los_Angeles";
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
# List packages installed in system profile. To search, run:
|
||||
# $ nix search wget
|
||||
environment.systemPackages = with pkgs; [
|
||||
nano
|
||||
vim
|
||||
wget
|
||||
screen
|
||||
lsof
|
||||
htop
|
||||
mosh
|
||||
dnsutils
|
||||
iperf3
|
||||
nmap
|
||||
rsync
|
||||
ethtool
|
||||
sshfs
|
||||
ddrescue
|
||||
pciutils
|
||||
ncdu
|
||||
nix-index
|
||||
git
|
||||
];
|
||||
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||
# this value at the release version of the first install of this system.
|
||||
# Before changing this value read the documentation for this option
|
||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||
system.stateVersion = "22.05"; # Did you read the comment?
|
||||
|
||||
services.openssh.enable = true;
|
||||
|
||||
# system.autoUpgrade.enable = true;
|
||||
# system.autoUpgrade.allowReboot = true;
|
||||
# system.autoUpgrade.channel = https://nixos.org/channels/nixos-22.05-small;
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
services.zerotierone = {
|
||||
enable = true;
|
||||
joinNetworks = [ "1d719394047b32ae" ];
|
||||
};
|
||||
|
||||
#opens udp ports for mosh
|
||||
programs.mosh.enable = true;
|
||||
|
||||
# Disable wifi card; This is sitting directly under a router and I don't want to cause interference.
|
||||
boot.blacklistedKernelModules = [ "iwlwifi" ];
|
||||
|
||||
# networking.nat = {
|
||||
# enable = true;
|
||||
# externalInterface = "enp2s0";
|
||||
# internalIPs = [ "192.168.192.0/24" ];
|
||||
# internalInterfaces = [ "ztrf26rjvk" ];
|
||||
# };
|
||||
}
|
||||
|
38
lp0/hardware-config.nix
Normal file
38
lp0/hardware-config.nix
Normal file
@@ -0,0 +1,38 @@
|
||||
# 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 + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/51a9c6de-3231-469f-a292-ada7d2531d63";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/36B4-78A2";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
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.<interface>.useDHCP`.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.enp2s0.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlp1s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
||||
hardware.cpu.intel.updateMicrocode = true;
|
||||
}
|
@@ -1,6 +1,8 @@
|
||||
{ pkgs, lib, config, ... }: let
|
||||
{ pkgs, lib, config, inputs, ... }: let
|
||||
qemu-pkg = pkgs.qemu_kvm;
|
||||
rootPath = "/trip/devver-vm/root";
|
||||
installerIso = (import "${inputs.nixpkgs}/nixos/release-small.nix" { inherit (inputs) nixpkgs; }).isoMinimal.config.system.build.isoImage;
|
||||
bootInstaller = true;
|
||||
runArgs = [
|
||||
(lib.qemu-common.qemuBinary qemu-pkg)
|
||||
"-name" "devver"
|
||||
@@ -33,13 +35,18 @@
|
||||
"-device" "virtio-net-pci,netdev=vm-devver,mac=02:19:07:A2:15:72,romfile=,mq=on,vectors=34"
|
||||
|
||||
"-append" "earlyprintk=ttyS0 console=ttyS0 init=/init"
|
||||
] ++ (if bootInstaller then [
|
||||
"-boot" "once=d"
|
||||
"-cdrom" "${installerIso}"
|
||||
] else [
|
||||
"-kernel" "${rootPath}/boot/kernel"
|
||||
"-initrd" "${rootPath}/boot/initrd"
|
||||
];
|
||||
]);
|
||||
|
||||
runScript = ''
|
||||
#!${pkgs.sh}
|
||||
${lib.escapeShellArgs runArgs}
|
||||
'';
|
||||
in {
|
||||
|
||||
}
|
||||
environment.systemPackages = lib.singleton pkgs.writeScript "run-devver" runScript;
|
||||
}
|
||||
|
Reference in New Issue
Block a user