Rework in progress

This commit is contained in:
Bryan Ramos 2023-06-04 14:11:38 -04:00
parent fe512e2175
commit e2ca654681
11 changed files with 153 additions and 193 deletions

View file

@ -5,9 +5,9 @@
boot.initrd.availableKernelModules = [ "vmd" "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ]; boot.initrd.availableKernelModules = [ "vmd" "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ "dm-snapshot" ]; boot.initrd.kernelModules = [ "dm-snapshot" ];
boot.kernelModules = [ "coretemp" ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
boot.kernelParams = [ "intel_iommu=on" ];
boot.kernelModules = [ "kvm-intel" "virtio" "vfio-pci" "coretemp" ];
boot.kernelPackages = pkgs.linuxPackages_latest; boot.kernelPackages = pkgs.linuxPackages_latest;
fileSystems."/" = fileSystems."/" =
@ -25,14 +25,14 @@
fsType = "vfat"; fsType = "vfat";
}; };
services.xserver.videoDrivers = [ "nvidia" ]; # Uncomment services.xserver.videoDrivers = [ "nvidia" ];
hardware = { # this hardware = {
opengl.enable = true; # codeblock opengl.enable = true;
nvidia = { # for nvidia = {
package = config.boot.kernelPackages.nvidiaPackages.stable; # NVIDIA package = config.boot.kernelPackages.nvidiaPackages.stable;
modesetting.enable = true; # proprietary modesetting.enable = true;
}; # driver };
}; # support };
powerManagement.cpuFreqGovernor = lib.mkDefault "performance"; powerManagement.cpuFreqGovernor = lib.mkDefault "performance";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;

View file

@ -1,4 +1,129 @@
{ config, pkgs, lib, ... }:
{ {
system.stateVersion = "23.05";
environment.defaultPackages = [ ];
nix = {
extraOptions = "experimental-features = nix-command flakes";
settings = {
allowed-users = "bryan";
auto-optimise-store = true;
system-features = [
"kvm"
];
};
gc = {
automatics = true;
options = "weekly";
};
};
boot = {
loader = {
grub = {
enable = true;
useOSProber = true;
devices = [ "nodev" ];
efiSupport = true;
configurationLimit = 5;
};
efi = {
canTouchEfiVariables = true;
};
};
# extraModprobeConfig = ''
# options vfio-pci ids=10de:1f82,10de:10fa
# '';
};
programs = {
sway = {
enable = true;
extraPackages = with pkgs; [
rofi-wayland
grim
slurp
wl-clipboard
xdg-utils
fontconfig
qogir-icon-theme
emote
virt-manager
pavucontrol
];
};
bash = {
enable = true;
enableCompletion = true;
enableLsColors = true;
blesh.enable = true;
shellInit = ''
'';
};
gnupg = {
agent = {
enable = true;
enableSSHSupport = true;
};
};
xwayland = {
enable = true;
};
git.enable = true;
};
fonts = {
fonts = with pkgs; [
terminus_font
nerdfonts
noto-fonts
noto-fonts-cjk
emojione
];
};
xdg.portal.wlr.enable = true;
services.pipewire = {
enable = true;
audio.enable = true;
wireplumber.enable = true;
pulse.enable = true;
jack.enable = true;
alsa.enable = true;
alsa.support32Bit = true;
};
services = {
trezord.enable = true;
cron = {
enable = true;
systemCronJobs = [
"0 0 * * * bryan /home/bryan/Documents/scripts/lnbackup_script.sh"
];
};
};
console = {
font = "Lat2-Terminus16";
useXkbConfig = true;
};
time = { time = {
timeZone = "America/New_York"; timeZone = "America/New_York";
}; };
@ -13,6 +138,22 @@
]; ];
}; };
i18n.defaultLocale = "en_US.UTF-8"; # Change locale i18n.defaultLocale = "en_US.UTF-8";
}
# Networking
networking = {
hostName = "socrates";
useDHCP = lib.mkDefault true;
networkmanager.enable = true;
firewall.enable = true;
};
virtualisation.libvirtd = {
enable = true;
qemu = {
package = pkgs.qemu_kvm;
runAsRoot = true;
ovmf.enable = true;
};
};
}

View file

@ -1,19 +0,0 @@
{ config, pkgs, lib, ... }:
{
services.pipewire = {
enable = true;
audio.enable = true;
wireplumber.enable = true;
pulse.enable = true;
jack.enable = true;
alsa.enable = true;
alsa.support32Bit = true;
};
environment.systemPackages = with pkgs; [
pavucontrol
];
}

View file

@ -1,19 +0,0 @@
{ config, pkgs, lib, ... }:
{
boot = {
loader = {
grub = {
enable = true;
useOSProber = true;
devices = [ "nodev" ];
efiSupport = true;
configurationLimit = 5;
};
efi = {
canTouchEfiVariables = true;
};
};
};
}

View file

@ -1,25 +0,0 @@
{ pkgs, ... }:
{
# Nix requires default.nix to build the system properly.
# Add or remove imports based on the modules in sysConfig/.
imports = [
./audio.nix
./boot.nix
./gui.nix
./hardware.nix
./locale.nix
./network.nix
./users.nix
./virt.nix
];
# Enable nix commands and flakes
nix = {
package = pkgs.nixFlakes;
extraOptions = "experimental-features = nix-command flakes";
};
system.stateVersion = "22.11"; # Do not edit this variable.
}

View file

@ -1 +0,0 @@
#TBD

View file

@ -1,76 +0,0 @@
{ config, pkgs, lib, ... }:
{
# DESKTOP
programs.sway.enable = true;
environment.systemPackages = with pkgs; [
rofi-wayland
grim
jq
slurp
wl-clipboard
xdg-desktop-portal
xdg-desktop-portal-wlr
xdg-utils
fontconfig
qogir-icon-theme
emote
xwayland
];
services = {
trezord = {
enable = true;
};
cron = {
enable = true;
systemCronJobs = [
"0 0 * * * bryan /home/bryan/Documents/scripts/lnbackup_script.sh"
];
};
};
# CONSOLE
console = {
font = "Lat2-Terminus16";
useXkbConfig = true;
};
# FONTS
fonts = {
fonts = with pkgs; [
terminus_font
nerdfonts
noto-fonts
noto-fonts-cjk
emojione
];
};
# GPU DRIVERS
# boot.initrd.kernelModules = [ "amdgpu" ]; #Uncomment for AMD
hardware.nvidia.open = true; # Uncomment for nvidia open-source nouveau drivers
# services.xserver.videoDrivers = [ "nvidia" ]; # Uncomment
# hardware = { # this
# opengl.enable = true; # codeblock
# nvidia = { # for
# package = config.boot.kernelPackages.nvidiaPackages.stable; # NVIDIA
# modesetting.enable = true; # proprietary
# }; # driver
# }; # support
}

View file

@ -1,17 +0,0 @@
{ config, pkgs, lib, ... }:
{
networking = {
hostName = "socrates";
useDHCP = lib.mkDefault true;
networkmanager.enable = true;
};
programs.gnupg = {
agent = {
enable = true;
enableSSHSupport = true;
};
};
}

View file

@ -1,24 +0,0 @@
{ config, pkgs, lib, ... }:
{
boot = {
kernelParams = [ "intel_iommu=on" ];
kernelModules = [ "kvm-intel" "virtio" "vfio-pci" ];
# TODO: (bryan) - Fix GPU passthrough
# extraModprobeConfig = ''
# options vfio-pci ids=10de:1f82,10de:10fa
# '';
};
virtualisation.libvirtd.enable = true;
environment.systemPackages = with pkgs; [
qemu_kvm
libvirt
virt-manager
OVMF
];
}