changed formatter, migrated suckless configurations to flake

This commit is contained in:
ISnortPennies 2023-01-22 19:28:58 -05:00
parent 5e19c6b52f
commit b0b688c43f
97 changed files with 311 additions and 19216 deletions

View file

@ -1,6 +1,5 @@
{ pkgs, ... }:
{
boot.initrd.kernelModules = [ "amdgpu" ];
{pkgs, ...}: {
boot.initrd.kernelModules = ["amdgpu"];
hardware.opengl = {
driSupport = true;
driSupport32Bit = true;

View file

@ -1,8 +1,8 @@
{
hardware.enableRedistributableFirmware = true;
boot = {
blacklistedKernelModules = [ "nouveau" "lbm-nouveau" "pcspkr" ];
kernelParams = [ "fbcon=nodefer" "bgrt_disable" "quiet" "splash" ];
blacklistedKernelModules = ["nouveau" "lbm-nouveau" "pcspkr"];
kernelParams = ["fbcon=nodefer" "bgrt_disable" "quiet" "splash"];
plymouth = {
enable = true;
theme = "breeze";

View file

@ -1,13 +1,12 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
fonts = {
fonts = with pkgs; [ overpass nerdfonts-overpass material-design-icons ];
fonts = with pkgs; [overpass nerdfonts-overpass material-design-icons];
fontconfig = {
enable = true;
defaultFonts = {
serif = [ "Overpass" "Overpass Nerd Font" "Material Design Icons" ];
sansSerif = [ "Overpass" "Overpass Nerd Font" "Material Design Icons" ];
monospace = [ "Overpass Mono" "OverpassMono Nerd Font" "Material Design Icons" ];
serif = ["Overpass" "Overpass Nerd Font" "Material Design Icons"];
sansSerif = ["Overpass" "Overpass Nerd Font" "Material Design Icons"];
monospace = ["Overpass Mono" "OverpassMono Nerd Font" "Material Design Icons"];
};
};
};

View file

@ -1,5 +1,4 @@
{ config, ... }:
{
{config, ...}: {
hardware = {
nvidia = {
nvidiaPersistenced = false;
@ -13,4 +12,3 @@
};
};
}

View file

@ -1,5 +1,8 @@
{ config, pkgs, callPackage, ... }:
{
config,
pkgs,
...
}: {
environment.systemPackages = with pkgs; [
bottom #view tasks
efibootmgr #efi editor
@ -9,8 +12,8 @@
btrfs-progs #for external harddrive
vlc #play stuff
bitwarden #store stuff
gimp #edit stuff
qbittorrent #steal stuff
gimp #edit stuff
qbittorrent #steal stuff
discord # talk to people (gross)
feh #for wallpaper
xfce.mousepad
@ -26,10 +29,9 @@
neofetch # cus yes
st #suckless terminal
pipes-rs # more fun things
pcmanfm #file manager
pcmanfm #file manager
haskellPackages.squeeze #file compression
nix-tree #view packages
bc #terminal calculator
];
}

View file

@ -1,9 +1,7 @@
{ config, ... }:
{
{config, ...}: {
hardware.nvidia.prime = {
sync.enable = true;
amdgpuBusId = "PCI:5:0:0";
nvidiaBusId = "PCI:1:0:0";
};
}

View file

@ -9,9 +9,9 @@
'';
}
];
screenSection = ''
screenSection = ''
Option "metamodes" "1920x1080_144 +0+0"
'';
'';
monitorSection = ''
Option "DPMS" "false"
'';

View file

@ -1,6 +1,8 @@
{ pkgs, config, ... }:
let
{
pkgs,
config,
...
}: let
update-system = pkgs.writeShellScriptBin "update-system" ''
if ! [ $(id -u) = 0 ]; then
echo "RUN AS ROOT"
@ -37,7 +39,6 @@ let
pastebin = pkgs.writeShellScriptBin "pastebin" ''
curl -F 'clbin=<-' https://clbin.com
'';
in
{
environment.systemPackages = [ update-system apply-system full-upgrade clean-store pastebin ];
in {
environment.systemPackages = [update-system apply-system full-upgrade clean-store pastebin];
}

View file

@ -1,9 +1,8 @@
{ username, ... }:
{
{username, ...}: {
services.samba-wsdd.enable = true; # make shares visible for windows 10 clients
networking.firewall = {
allowedTCPPorts = [ 139 445 ];
allowedUDPPorts = [ 137 138 ];
allowedTCPPorts = [139 445];
allowedUDPPorts = [137 138];
};
services.samba = {
enable = true;

View file

@ -1,9 +1,12 @@
{ pkgs, username, ... }:
{
pkgs,
username,
...
}: {
boot = {
kernelParams = [ "amd_iommu=on" "iommu=pt" "vfio_iommu_type1.allow_unsafe_interrupts=1" "kvm.ignore_msrs=1" ];
kernelModules = [ "vfio_virqfd" "vfio_pci" "vfio_iommu_type1" "vfio" ];
initrd.kernelModules = [ "vfio_virqfd" "vfio_pci" "vfio_iommu_type1" "vfio" ];
kernelParams = ["amd_iommu=on" "iommu=pt" "vfio_iommu_type1.allow_unsafe_interrupts=1" "kvm.ignore_msrs=1"];
kernelModules = ["vfio_virqfd" "vfio_pci" "vfio_iommu_type1" "vfio"];
initrd.kernelModules = ["vfio_virqfd" "vfio_pci" "vfio_iommu_type1" "vfio"];
extraModprobeConfig = ''
options vfio-pci ids=10de:228e,10de:2504
'';
@ -22,36 +25,34 @@
};
};
};
environment.systemPackages = with pkgs; [ virt-manager ];
systemd.services.libvirtd.preStart =
let
qemuHook = pkgs.writeScript "qemu-hook" ''
#!${pkgs.stdenv.shell}
environment.systemPackages = with pkgs; [virt-manager];
systemd.services.libvirtd.preStart = let
qemuHook = pkgs.writeScript "qemu-hook" ''
#!${pkgs.stdenv.shell}
GUEST_NAME="$1"
OPERATION="$2"
SUB_OPERATION="$3"
GUEST_NAME="$1"
OPERATION="$2"
SUB_OPERATION="$3"
if [ "$GUEST_NAME" == "Windows" ]; then
if [ "$OPERATION" == "start" ]; then
systemctl set-property --runtime -- user.slice AllowedCPUs=8-15,24-31
systemctl set-property --runtime -- system.slice AllowedCPUs=8-15,24-31
systemctl set-property --runtime -- init.scope AllowedCPUs=8-15,24-31
fi
if [ "$OPERATION" == "stopped" ]; then
systemctl set-property --runtime -- user.slice AllowedCPUs=0-31
systemctl set-property --runtime -- system.slice AllowedCPUs=0-31
systemctl set-property --runtime -- init.scope AllowedCPUs=0-31
fi
if [ "$GUEST_NAME" == "Windows" ]; then
if [ "$OPERATION" == "start" ]; then
systemctl set-property --runtime -- user.slice AllowedCPUs=8-15,24-31
systemctl set-property --runtime -- system.slice AllowedCPUs=8-15,24-31
systemctl set-property --runtime -- init.scope AllowedCPUs=8-15,24-31
fi
'';
in
''
mkdir -p /var/lib/libvirt/hooks
chmod 755 /var/lib/libvirt/hooks
# Copy hook files
ln -sf ${qemuHook} /var/lib/libvirt/hooks/qemu
if [ "$OPERATION" == "stopped" ]; then
systemctl set-property --runtime -- user.slice AllowedCPUs=0-31
systemctl set-property --runtime -- system.slice AllowedCPUs=0-31
systemctl set-property --runtime -- init.scope AllowedCPUs=0-31
fi
fi
'';
in ''
mkdir -p /var/lib/libvirt/hooks
chmod 755 /var/lib/libvirt/hooks
# Copy hook files
ln -sf ${qemuHook} /var/lib/libvirt/hooks/qemu
'';
}

View file

@ -1,16 +1,20 @@
{ config, pkgs, username, ... }:
{
config,
pkgs,
username,
...
}: {
services.xserver = {
enable = true;
videoDrivers =
if (config.networking.hostName == "gerg-laptop")
then [ "modesetting" "nvidia" ]
else [ "amdgpu" ];
then ["modesetting" "nvidia"]
else ["amdgpu"];
layout = "us";
libinput.enable = true;
xautolock.enable = false;
desktopManager.xterm.enable = false;
excludePackages = [ pkgs.xterm ];
excludePackages = [pkgs.xterm];
windowManager.dwm.enable = true;
displayManager = {
defaultSession = "none+dwm";
@ -22,8 +26,8 @@
[greeter]
user = ${username}
show-password-label = false
password-label-text =
invalid-password-text =
password-label-text =
invalid-password-text =
show-input-cursor = false
password-alignment = center
password-input-width = 19
@ -64,4 +68,3 @@
};
};
}