mirror of
https://github.com/itme-brain/nixos.git
synced 2026-03-24 00:29:43 -04:00
Initial
This commit is contained in:
commit
a79fc67d37
647 changed files with 123931 additions and 0 deletions
19
sysConfig/audio.nix
Normal file
19
sysConfig/audio.nix
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
{ 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
|
||||
];
|
||||
}
|
||||
19
sysConfig/boot.nix
Normal file
19
sysConfig/boot.nix
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
boot = {
|
||||
loader = {
|
||||
grub = {
|
||||
enable = true;
|
||||
useOSProber = true;
|
||||
devices = [ "nodev" ];
|
||||
efiSupport = true;
|
||||
configurationLimit = 5;
|
||||
};
|
||||
|
||||
efi = {
|
||||
canTouchEfiVariables = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
25
sysConfig/default.nix
Normal file
25
sysConfig/default.nix
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
# Nix requires default.nix to build the system properly, do not rename it.
|
||||
|
||||
# Add or remove imports based on the modules in your sysConfig directory.
|
||||
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.
|
||||
}
|
||||
58
sysConfig/gui.nix
Normal file
58
sysConfig/gui.nix
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
|
||||
# DESKTOP
|
||||
|
||||
programs.sway.enable = true;
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
rofi-wayland
|
||||
grim
|
||||
slurp
|
||||
mako
|
||||
wl-clipboard
|
||||
|
||||
xdg-desktop-portal
|
||||
xdg-desktop-portal-wlr
|
||||
|
||||
fontconfig
|
||||
];
|
||||
|
||||
# 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
|
||||
}
|
||||
40
sysConfig/hardware.nix
Normal file
40
sysConfig/hardware.nix
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
## KERNEL MODULES
|
||||
|
||||
boot.initrd.availableKernelModules = [ "vmd" "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ "dm-snapshot" ];
|
||||
boot.kernelModules = [ "coretemp" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
|
||||
# FSTAB
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/af24c5b3-8a6e-4333-a61d-922a97928cae";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/home" =
|
||||
{ device = "/dev/disk/by-uuid/1639ee20-28d6-4649-814d-ba981c138b35";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/74B9-4AAF";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
|
||||
## CPU
|
||||
|
||||
powerManagement.cpuFreqGovernor = lib.mkDefault "performance";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
20
sysConfig/locale.nix
Normal file
20
sysConfig/locale.nix
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
|
||||
time = {
|
||||
timeZone = "America/New_York"; # Change time-zone, run timedatectl list-timezones if you're unsure
|
||||
};
|
||||
|
||||
services.timesyncd = {
|
||||
enable = true;
|
||||
servers = [
|
||||
"0.pool.ntp.org"
|
||||
"1.pool.ntp.org"
|
||||
"2.pool.ntp.org"
|
||||
"3.pool.ntp.org"
|
||||
];
|
||||
};
|
||||
|
||||
i18n.defaultLocale = "en_US.UTF-8"; # Change locale
|
||||
}
|
||||
20
sysConfig/network.nix
Normal file
20
sysConfig/network.nix
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
|
||||
networking = {
|
||||
hostName = "socrates"; # Change your hostname
|
||||
|
||||
useDHCP = lib.mkDefault true;
|
||||
|
||||
networkmanager.enable = true;
|
||||
};
|
||||
|
||||
# Remove this if you don't want to use GPG as your SSH agent
|
||||
programs.gnupg = {
|
||||
agent = {
|
||||
enable = true;
|
||||
enableSSHSupport = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
19
sysConfig/users.nix
Normal file
19
sysConfig/users.nix
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
# Change users.users.<USERNAME> to your username, I don't recommend messing with extraGroups
|
||||
users.users.bryan = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" "networkmanager" "home-manager" "input" "video" "audio" "kvm" "libvirtd" ];
|
||||
};
|
||||
|
||||
security.sudo.wheelNeedsPassword = false; # Feel free to remove this if you want to type your password on sudo
|
||||
|
||||
programs.gnupg = {
|
||||
agent = {
|
||||
enable = true;
|
||||
enableSSHSupport = true;
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
24
sysConfig/virt.nix
Normal file
24
sysConfig/virt.nix
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{ 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
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue