mirror of
https://github.com/blahai/nyx.git
synced 2025-01-18 19:10:21 +00:00
vm stuff
This commit is contained in:
parent
7cc96f4b42
commit
12d74db2d3
6 changed files with 42 additions and 101 deletions
|
@ -70,7 +70,7 @@
|
|||
let system = "x86_64-linux";
|
||||
in {
|
||||
nixosConfigurations = {
|
||||
nyx = nixpkgs.lib.nixosSystem {
|
||||
nyx-vm = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {
|
||||
inherit inputs;
|
||||
pkgs-smol = import nixpkgs-smol {
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
inputs.home-manager.nixosModules.default
|
||||
];
|
||||
|
||||
documentation.nixos.enable = false;
|
||||
documentation.enable = false;
|
||||
|
||||
boot = {
|
||||
tmp.cleanOnBoot = true;
|
||||
|
@ -18,21 +18,9 @@
|
|||
};
|
||||
efi.canTouchEfiVariables = true;
|
||||
};
|
||||
supportedFilesystems = [ "zfs" "ext4" "btrfs" ];
|
||||
zfs = {
|
||||
forceImportRoot = false;
|
||||
extraPools = [ "zpool" "zootfs" ];
|
||||
devNodes = "/dev/disk/by-id";
|
||||
package = pkgs.zfs;
|
||||
allowHibernation = true; # might cause corruption?
|
||||
};
|
||||
kernelPackages = pkgs.linuxPackages_6_12;
|
||||
supportedFilesystems = [ "ext4" "btrfs" ];
|
||||
kernelPackages = pkgs.linuxPackages_zen;
|
||||
kernel = { sysctl = { "vm.max_map_count" = 2147483642; }; };
|
||||
kernelParams = [
|
||||
"elevator=none" # for zfs
|
||||
"zfs.zfs_arc_max=8589934592"
|
||||
"nvme.noacpi=1"
|
||||
];
|
||||
};
|
||||
|
||||
zramSwap = {
|
||||
|
@ -42,15 +30,10 @@
|
|||
};
|
||||
|
||||
networking = {
|
||||
hostName = "nyx";
|
||||
hostName = "nyx-vm";
|
||||
hostId = builtins.substring 0 8
|
||||
(builtins.hashString "md5" config.networking.hostName);
|
||||
networkmanager.enable = true;
|
||||
stevenblack = {
|
||||
enable = true;
|
||||
block = [ "fakenews" "gambling" ];
|
||||
};
|
||||
nameservers = [ "1.1.1.1" "1.0.0.1" "9.9.9.9" ];
|
||||
};
|
||||
|
||||
time.timeZone = "Europe/Helsinki";
|
||||
|
@ -78,8 +61,7 @@
|
|||
};
|
||||
};
|
||||
xkb = {
|
||||
layout = "us";
|
||||
variant = "euro";
|
||||
layout = "fi";
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -98,6 +80,7 @@
|
|||
shell = pkgs.fish;
|
||||
packages = with pkgs; [
|
||||
floorp
|
||||
librewolf
|
||||
vesktop
|
||||
equibop
|
||||
element-desktop
|
||||
|
@ -209,7 +192,6 @@
|
|||
nautilus
|
||||
diff-so-fancy
|
||||
eog
|
||||
bottles
|
||||
ffmpeg-full
|
||||
gst_all_1.gstreamer
|
||||
gst_all_1.gst-libav
|
||||
|
@ -221,13 +203,9 @@
|
|||
age
|
||||
ssh-to-age
|
||||
sops
|
||||
cloudflared
|
||||
inputs.zen-browser.packages."${pkgs.system}".specific
|
||||
# cava
|
||||
socat
|
||||
btrfs-progs
|
||||
btop-rocm
|
||||
rocmPackages.rocm-smi
|
||||
hyprcursor
|
||||
grimblast
|
||||
neovim
|
||||
|
@ -272,11 +250,10 @@
|
|||
material-design-icons
|
||||
material-symbols
|
||||
imagemagick
|
||||
wireguard-tools
|
||||
mission-center
|
||||
nix-output-monitor
|
||||
speedcrunch
|
||||
geogebra
|
||||
localsend
|
||||
];
|
||||
|
||||
fonts.packages = with pkgs; [
|
||||
|
@ -298,6 +275,11 @@
|
|||
enableSSHSupport = true;
|
||||
};
|
||||
|
||||
programs.localsend = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
};
|
||||
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
settings = {
|
||||
|
|
|
@ -1,78 +1,42 @@
|
|||
# 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 = [ "nvme" "ahci" "xhci_pci" "usbhid" "hid_generic" "uas" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ "amdgpu" ];
|
||||
boot.kernelModules = [ "kvm-amd" "amd-pstate" ];
|
||||
boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "usbhid" "sr_mod" "virtio_blk" "virtio_net" "virtio_scsi" "virtio_mmio" ];
|
||||
boot.initrd.kernelModules = [ "virtio_rng" "virtio_console" ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "zpool/root";
|
||||
fsType = "zfs";
|
||||
options = [ "zfsutil" ];
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
enable32Bit = true;
|
||||
};
|
||||
|
||||
fileSystems."/nix" = {
|
||||
device = "zpool/nix";
|
||||
fsType = "zfs";
|
||||
options = [ "zfsutil" ];
|
||||
};
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/ee016081-8270-4347-8555-65112f1a31ad";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/var" = {
|
||||
device = "zpool/var";
|
||||
fsType = "zfs";
|
||||
options = [ "zfsutil" ];
|
||||
};
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/88A8-14E0";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0022" "dmask=0022" ];
|
||||
};
|
||||
|
||||
fileSystems."/home" = {
|
||||
device = "zpool/home";
|
||||
fsType = "zfs";
|
||||
options = [ "zfsutil" ];
|
||||
};
|
||||
swapDevices =
|
||||
[ { device = "/dev/disk/by-uuid/23d436d9-1402-44a0-8a75-a481195826fb"; }
|
||||
];
|
||||
|
||||
fileSystems."/mnt/zootfs/Storage" = {
|
||||
device = "zootfs/Storage";
|
||||
fsType = "zfs";
|
||||
options = [ "zfsutil" ];
|
||||
};
|
||||
# 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.enp1s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
fileSystems."/mnt/zootfs/Media" = {
|
||||
device = "zootfs/Media";
|
||||
fsType = "zfs";
|
||||
options = [ "zfsutil" ];
|
||||
};
|
||||
|
||||
# https://github.com/atuinsh/atuin/issues/952#issuecomment-1902164562
|
||||
fileSystems."/home/pingu/.local/share/atuin" = {
|
||||
device = "/dev/zvol/zpool/nixos/atuin";
|
||||
fsType = "ext4";
|
||||
options = [ "async" "auto" "nofail" ];
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-label/BOOT";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0022" "dmask=0022" ];
|
||||
};
|
||||
|
||||
fileSystems."/mnt/ssd" = {
|
||||
device = "/dev/disk/by-uuid/e4c31e1c-6667-4582-8d6a-d142d6118ce2";
|
||||
fsType = "btrfs";
|
||||
options = [ "async" "auto" "noatime" "rw" ];
|
||||
};
|
||||
|
||||
fileSystems."/mnt/ext" = {
|
||||
device = "/dev/disk/by-uuid/43280a82-cf9a-452e-9bdc-a8cc66ccd7c8";
|
||||
fsType = "btrfs";
|
||||
options = [ "async" "auto" "nofail" "noatime" ];
|
||||
};
|
||||
|
||||
swapDevices = [{ device = "/dev/disk/by-uuid/04281bd7-784a-4287-b4f2-ce406d2ab6ac"; }];
|
||||
|
||||
# networking.useDHCP = lib.mkDefault true;
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = true;
|
||||
}
|
||||
|
|
|
@ -2,9 +2,7 @@
|
|||
wayland.windowManager.hyprland.settings = {
|
||||
exec-once = [
|
||||
"${pkgs.swww}/bin/swww-daemon --format xrgb"
|
||||
"${pkgs.floorp}/bin/floorp"
|
||||
"sleep 3; ${pkgs.vesktop}/bin/vesktop"
|
||||
"JKPS"
|
||||
"${pkgs.librewolf}/bin/librewolf"
|
||||
"ags"
|
||||
];
|
||||
};
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
{
|
||||
imports = [
|
||||
./catppuccin.nix
|
||||
./games/default.nix
|
||||
./services/default.nix
|
||||
./virtualisation.nix
|
||||
];
|
||||
}
|
||||
|
|
|
@ -3,6 +3,5 @@
|
|||
imports = [
|
||||
./pipewire.nix
|
||||
./tailscale.nix
|
||||
./jellyfin.nix
|
||||
];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue