moved files to make more sense and added experimental desktop configuration

This commit is contained in:
Greg Leyda 2022-07-12 16:54:56 -04:00 committed by ISnortPennies
parent 22c5b6f826
commit 50fae0b2eb
38 changed files with 533 additions and 191 deletions

View file

@ -1,11 +0,0 @@
{
"/" =
{ device = "/dev/disk/by-label/nixos";
fsType = "ext4";
};
"/boot" =
{ device = "/dev/disk/by-label/BOOT";
fsType = "vfat";
};
}

View file

@ -1,13 +1,12 @@
{
description = "testing";
description = "my personal configurations";
inputs = {
nixpkgs.url = "nixpkgs/nixos-unstable";
home-manager.url = "github:nix-community/home-manager/master";
home-manager.inputs.nixkpkgs.follows = "nixpkgs";
nur.url = "github:nix-community/NUR";
};
outputs = { nixpkgs, home-manager, nur, ... }:
outputs = { nixpkgs, home-manager, ... }:
let
system = "x86_64-linux";
pkgs = import nixpkgs {
@ -28,8 +27,7 @@
gerg = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules = [
nur.nixosModules.nur
./home-manager.nix
./home-manager/home-manager.nix
];
};
};
@ -37,8 +35,15 @@
gerg-laptop = lib.nixosSystem {
inherit system pkgs;
modules = [
nur.nixosModules.nur
./configuration.nix
./hardware-configuration.nix
./systems/gerg-laptop.nix
];
};
gerg-desktop = lib.nixosSystem {
inherit system pkgs;
modules = [
./hardware-configuration.nix
./systems/gerg-desktop.nix
];
};
};

View 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 = [ "nvme" "xhci_pci" "ahci" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/c67796b3-d502-47db-8d0e-48f30bc91041";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/AD02-10EA";
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.eno1.useDHCP = lib.mkDefault true;
# networking.interfaces.wlo1.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

View file

@ -1,28 +0,0 @@
{config, pkgs, home-manager, ...}:
{
imports = [
./home-manager/zsh.nix
./home-manager/firefox.nix
./home-manager/bspwm.nix
./home-manager/sxhkd.nix
./home-manager/rofi.nix
./home-manager/polybar.nix
./home-manager/dunst.nix
./home-manager/alacritty.nix
./home-manager/theme.nix
./home-manager/picom.nix
];
programs.home-manager.enable = true;
home = {
username = "gerg";
homeDirectory = "/home/gerg";
stateVersion = "22.11";
file = {
".background-image".source = ./images/stars.jpg;
".config" = {
source = ./home/.config;
recursive = true;
};
};
};
}

28
home-manager/home-manager.nix Executable file
View file

@ -0,0 +1,28 @@
{config, pkgs, home-manager, ...}:
{
imports = [
./zsh.nix
./firefox.nix
./bspwm.nix
./sxhkd.nix
./rofi.nix
./polybar.nix
./dunst.nix
./alacritty.nix
./theme.nix
./picom.nix
];
programs.home-manager.enable = true;
home = {
username = "gerg";
homeDirectory = "/home/gerg";
stateVersion = "22.11";
file = {
".background-image".source = ../images/stars.jpg;
".config" = {
source = ./config;
recursive = true;
};
};
};
}

View file

@ -1,61 +1,62 @@
{
services.picom = {
enable = true;
activeOpacity = "1.0";
activeOpacity = 1.0;
backend = "glx";
blur = false;
blurExclude = [
"window_type = 'dock'"
"window_type = 'menu'"
"class_g = 'firefox'"
];
experimentalBackends = false;
fade = true;
fadeDelta = 4;
fadeSteps = [ "0.03" "0.03" ];
inactiveOpacity = "1.0";
menuOpacity = "1.0";
fadeSteps = [ 0.03 0.03 ];
inactiveOpacity = 1.0;
menuOpacity = 1.0;
shadow = true;
noDockShadow = true;
shadowExclude = [ "window_type = 'menu'" "class_g = 'firefox'" ];
shadowOffsets = [ 25 25 ];
shadowOpacity = "0.5";
shadowOpacity = 0.5;
vSync = false;
extraOptions = ''
animations: true;
animation-stiffness = 200
animation-window-mass = 0.4
animation-dampening = 20
animation-clamping = false
animation-for-open-window = "zoom";
animation-for-unmap-window = "zoom";
animation-for-workspace-switch-in = "slide-down";
animation-for-workspace-switch-out = "zoom";
animation-for-transient-window = "slide-up";
settings = {
animations = true;
animation = {
stiffness = 200;
window-mass = 0.4;
dampening = 20;
clamping = false;
for-open-window = "zoom";
for-unmap-window = "zoom";
for-workspace-switch-in = "slide-down";
for-workspace-switch-out = "zoom";
for-transient-window = "slide-up";
};
shadow-radius = 25;
frame-opacity = 1.0;
inactive-opacity-override = false;
corner-radius = 15;
rounded-corners-exclude = [
"window_type = 'desktop'",
"window_type = 'tooltip'",
];
mark-wmwin-focused = true;
mark-ovredir-focused = true;
detect-rounded-corners = true;
detect-client-opacity = true;
detect-transient = true;
use-damage = true;
log-level = "warn";
wintypes:
{
tooltip = { fade = true; shadow = false; opacity = 1.0; focus = true; full-shadow = false; };
dock = { shadow = true; }
dnd = { shadow = true; }
popup_menu = { opacity = 1.0; }
dropdown_menu = { opacity = 1.0; }
};
'';
blur = false;
blurExclude = [
"window_type = 'dock'"
"window_type = 'menu'"
"class_g = 'firefox'"
];
shadow-radius = 25;
frame-opacity = 1.0;
inactive-opacity-override = false;
corner-radius = 15;
rounded-corners-exclude = [
"window_type = 'desktop'"
"window_type = 'tooltip'"
];
mark-wmwin-focused = true;
mark-ovredir-focused = true;
detect-rounded-corners = true;
detect-client-opacity = true;
detect-transient = true;
use-damage = true;
log-level = "warn";
wintypes = {
tooltip = { fade = true; shadow = false; opacity = 1.0; focus = true; full-shadow = false; };
dock = { shadow = true; };
dnd = { shadow = true; };
popup_menu = { opacity = 1.0; };
dropdown_menu = { opacity = 1.0; };
};
};
};
}

208
misc/Main_VM.xml Normal file
View file

@ -0,0 +1,208 @@
<domain xmlns:qemu="http://libvirt.org/schemas/domain/qemu/1.0" type="kvm">
<name>Main_VM</name>
<uuid>dc54280f-8a72-4e0b-9771-e3fa6871c58b</uuid>
<metadata>
<libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0">
<libosinfo:os id="http://microsoft.com/win/10"/>
</libosinfo:libosinfo>
</metadata>
<memory unit="KiB">16384000</memory>
<currentMemory unit="KiB">16384000</currentMemory>
<memoryBacking>
<source type="memfd"/>
<access mode="shared"/>
</memoryBacking>
<vcpu placement="static" cpuset="3-5,9-11">6</vcpu>
<iothreads>2</iothreads>
<cputune>
<vcpupin vcpu="0" cpuset="3"/>
<vcpupin vcpu="1" cpuset="4"/>
<vcpupin vcpu="2" cpuset="5"/>
<vcpupin vcpu="3" cpuset="9"/>
<vcpupin vcpu="4" cpuset="10"/>
<vcpupin vcpu="5" cpuset="11"/>
<emulatorpin cpuset="3-5,9-11"/>
<iothreadpin iothread="1" cpuset="3-5"/>
<iothreadpin iothread="2" cpuset="9-11"/>
</cputune>
<os>
<type arch="x86_64" machine="pc-q35-6.2">hvm</type>
<loader readonly="yes" type="pflash">/usr/share/edk2-ovmf/x64/OVMF_CODE.fd</loader>
<nvram>/var/lib/libvirt/qemu/nvram/Main_VM_VARS.fd</nvram>
<boot dev="hd"/>
<bootmenu enable="yes"/>
</os>
<features>
<acpi/>
<hyperv mode="custom">
<relaxed state="on"/>
<vapic state="on"/>
<spinlocks state="on" retries="8191"/>
<vpindex state="on"/>
<runtime state="on"/>
<synic state="on"/>
<stimer state="on"/>
<reset state="on"/>
<vendor_id state="on" value="randomized"/>
<frequencies state="on"/>
</hyperv>
<kvm>
<hidden state="on"/>
</kvm>
<vmport state="off"/>
</features>
<cpu mode="host-passthrough" check="none" migratable="on">
<topology sockets="1" dies="1" cores="3" threads="2"/>
<cache mode="passthrough"/>
<feature policy="require" name="invtsc"/>
<feature policy="require" name="topoext"/>
<feature policy="disable" name="monitor"/>
<feature policy="disable" name="x2apic"/>
<feature policy="disable" name="svm"/>
<feature policy="disable" name="hypervisor"/>
</cpu>
<clock offset="localtime">
<timer name="pit" tickpolicy="delay"/>
<timer name="rtc" tickpolicy="catchup" track="guest"/>
<timer name="hpet" present="no"/>
<timer name="tsc" present="yes" mode="native"/>
<timer name="hypervclock" present="yes"/>
</clock>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<emulator>/usr/bin/qemu-system-x86_64</emulator>
<disk type="block" device="disk">
<driver name="qemu" type="raw" cache="none" io="native" discard="unmap"/>
<source dev="/dev/disk/by-id/ata-Samsung_SSD_870_EVO_500GB_S6PXNM0T402828A"/>
<target dev="sda" bus="sata"/>
<address type="drive" controller="0" bus="0" target="0" unit="0"/>
</disk>
<disk type="block" device="disk">
<driver name="qemu" type="raw" cache="none" io="native" discard="unmap"/>
<source dev="/dev/disk/by-id/ata-WDC_WD10EZEX-75WN4A0_WD-WCC6Y7FCSH2U"/>
<target dev="sdb" bus="sata"/>
<address type="drive" controller="0" bus="0" target="0" unit="1"/>
</disk>
<controller type="usb" index="0" model="qemu-xhci" ports="15">
<address type="pci" domain="0x0000" bus="0x02" slot="0x00" function="0x0"/>
</controller>
<controller type="pci" index="0" model="pcie-root"/>
<controller type="pci" index="1" model="pcie-root-port">
<model name="pcie-root-port"/>
<target chassis="1" port="0x8"/>
<address type="pci" domain="0x0000" bus="0x00" slot="0x01" function="0x0" multifunction="on"/>
</controller>
<controller type="pci" index="2" model="pcie-root-port">
<model name="pcie-root-port"/>
<target chassis="2" port="0x9"/>
<address type="pci" domain="0x0000" bus="0x00" slot="0x01" function="0x1"/>
</controller>
<controller type="pci" index="3" model="pcie-root-port">
<model name="pcie-root-port"/>
<target chassis="3" port="0xa"/>
<address type="pci" domain="0x0000" bus="0x00" slot="0x01" function="0x2"/>
</controller>
<controller type="pci" index="4" model="pcie-root-port">
<model name="pcie-root-port"/>
<target chassis="4" port="0xb"/>
<address type="pci" domain="0x0000" bus="0x00" slot="0x01" function="0x3"/>
</controller>
<controller type="pci" index="5" model="pcie-root-port">
<model name="pcie-root-port"/>
<target chassis="5" port="0xc"/>
<address type="pci" domain="0x0000" bus="0x00" slot="0x01" function="0x4"/>
</controller>
<controller type="pci" index="6" model="pcie-root-port">
<model name="pcie-root-port"/>
<target chassis="6" port="0xd"/>
<address type="pci" domain="0x0000" bus="0x00" slot="0x01" function="0x5"/>
</controller>
<controller type="pci" index="7" model="pcie-root-port">
<model name="pcie-root-port"/>
<target chassis="7" port="0xe"/>
<address type="pci" domain="0x0000" bus="0x00" slot="0x01" function="0x6"/>
</controller>
<controller type="pci" index="8" model="pcie-root-port">
<model name="pcie-root-port"/>
<target chassis="8" port="0xf"/>
<address type="pci" domain="0x0000" bus="0x00" slot="0x01" function="0x7"/>
</controller>
<controller type="pci" index="9" model="pcie-root-port">
<model name="pcie-root-port"/>
<target chassis="9" port="0x10"/>
<address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x0" multifunction="on"/>
</controller>
<controller type="pci" index="10" model="pcie-root-port">
<model name="pcie-root-port"/>
<target chassis="10" port="0x11"/>
<address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x1"/>
</controller>
<controller type="pci" index="11" model="pcie-root-port">
<model name="pcie-root-port"/>
<target chassis="11" port="0x12"/>
<address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x2"/>
</controller>
<controller type="pci" index="12" model="pcie-root-port">
<model name="pcie-root-port"/>
<target chassis="12" port="0x13"/>
<address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x3"/>
</controller>
<controller type="pci" index="13" model="pcie-root-port">
<model name="pcie-root-port"/>
<target chassis="13" port="0x14"/>
<address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x4"/>
</controller>
<controller type="pci" index="14" model="pcie-root-port">
<model name="pcie-root-port"/>
<target chassis="14" port="0x15"/>
<address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x5"/>
</controller>
<controller type="sata" index="0">
<address type="pci" domain="0x0000" bus="0x00" slot="0x1f" function="0x2"/>
</controller>
<interface type="bridge">
<mac address="52:54:00:05:03:2d"/>
<source bridge="bridge0"/>
<model type="virtio"/>
<link state="up"/>
<address type="pci" domain="0x0000" bus="0x01" slot="0x00" function="0x0"/>
</interface>
<input type="evdev">
<source dev="/dev/input/by-id/usb-Logitech_G502_HERO_Gaming_Mouse_1974396F3638-event-mouse"/>
</input>
<input type="evdev">
<source dev="/dev/input/by-id/usb-Logitech_Gaming_Keyboard_G610_067A397A3637-event-kbd" grab="all" repeat="on"/>
</input>
<input type="evdev">
<source dev="/dev/input/by-id/usb-Logitech_G502_HERO_Gaming_Mouse_1974396F3638-if01-event-kbd"/>
</input>
<input type="mouse" bus="ps2"/>
<input type="keyboard" bus="ps2"/>
<audio id="1" type="none"/>
<hostdev mode="subsystem" type="pci" managed="yes">
<source>
<address domain="0x0000" bus="0x10" slot="0x00" function="0x0"/>
</source>
<address type="pci" domain="0x0000" bus="0x04" slot="0x00" function="0x0"/>
</hostdev>
<hostdev mode="subsystem" type="pci" managed="yes">
<source>
<address domain="0x0000" bus="0x10" slot="0x00" function="0x1"/>
</source>
<address type="pci" domain="0x0000" bus="0x05" slot="0x00" function="0x0"/>
</hostdev>
<memballoon model="virtio">
<address type="pci" domain="0x0000" bus="0x03" slot="0x00" function="0x0"/>
</memballoon>
</devices>
<qemu:commandline>
<qemu:arg value="-device"/>
<qemu:arg value="ich9-intel-hda,bus=pcie.0,addr=0x1b"/>
<qemu:arg value="-device"/>
<qemu:arg value="hda-micro,audiodev=hda"/>
<qemu:arg value="-audiodev"/>
<qemu:arg value="pa,id=hda,server=unix:/run/user/1000/pulse/native"/>
</qemu:commandline>
</domain>

View file

@ -1,22 +1,13 @@
{pkgs, config, lib, modulesPath, ...}:
{
## NEED THIS OR WONT BOOT
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
### NEED THIS OR WONT BOOT
boot = {
kernelPackages = pkgs.linuxPackages_latest;
initrd = {
availableKernelModules = [ "nvme" "xhci_pci" "ahci" "uas" "usb_storage" "sd_mod" ];
kernelModules = [];
};
kernelModules = [ "kvm-amd" ];
blacklistedKernelModules = [ "nouveau" "lbm-nouveau" "pcspkr" ];
extraModprobeConfig = "";
kernelParams = [ "fbcon=nodefer" "bgrt_disable" "quiet" "splash" ];
plymouth = {
enable = true;
theme = "breeze";
logo = ./images/nixos.png;
logo = ../images/nixos.png;
};
loader = {
systemd-boot = {

36
configuration.nix → modules/misc.nix Executable file → Normal file
View file

@ -1,27 +1,10 @@
{ config, pkgs, callPackage, lib, ... }:
{ config, pkgs, lib, ... }:
{
#important stuff first
imports =
[
./boot.nix
./prime.nix
./networking.nix
./packages.nix
./fonts.nix
./thunar.nix
./nur.nix
];
nix = {
package = pkgs.nixFlakes;
extraOptions = ''
experimental-features = nix-command flakes
'';
networking = {
firewall.enable = true;
useDHCP = lib.mkDefault true;
networkmanager. enable = true;
};
services.xserver = import ./xserver.nix;
fileSystems = import ./fileSystems.nix;
system.stateVersion = "22.11";
hardware.cpu.amd.updateMicrocode = true;
# end important stuff
qt5 = {
enable = true;
style = "gtk2";
@ -57,14 +40,6 @@
package = pkgs.pulseaudioFull;
};
nixpkgs.config.pulseaudio = true;
# user managment
users = {
defaultUserShell = pkgs.zsh;
users.gerg = {
isNormalUser = true;
extraGroups = [ "wheel" "audio" "networkmanager"];
};
};
#enable ssh
programs.mtr.enable = true;
@ -74,4 +49,3 @@
};
services.openssh.enable = true;
}

7
prime.nix → modules/nvidia.nix Executable file → Normal file
View file

@ -1,15 +1,10 @@
{ config, ... }:
{
hardware = {
nvidia = {
nvidiaPersistenced = true;
prime = {
sync.enable = true;
amdgpuBusId = "PCI:5:0:0";
nvidiaBusId = "PCI:1:0:0";
};
nvidiaSettings = true;
package = config.boot.kernelPackages.nvidiaPackages.stable;
modesetting.enable = true;
};

View file

@ -8,6 +8,7 @@ environment.systemPackages = with pkgs; [
htop
efibootmgr
maim
curlFull
#lightdm
lightdm
lightdm-mini-greeter
@ -19,6 +20,7 @@ environment.systemPackages = with pkgs; [
pciutils
git
dash
binutils
#user/gui
discord
spotify

9
modules/prime.nix Executable file
View file

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

28
modules/scripts.nix Normal file
View file

@ -0,0 +1,28 @@
{ pkgs, ... }:
let
update-system = pkgs.writeScriptBin "update-system" ''
#!${pkgs.stdenv.shell}
nix flake update /etc/nixos/#
'';
clean-store = pkgs.writeScriptBin "clean-store" ''
#!${pkgs.stdenv.shell}
nix-collect-garbage -d
nix-store --gc
'';
apply-users = pkgs.writeScriptBin "apply-users" ''
#!${pkgs.stdenv.shell}
nix build /etc/nixos/#homeManagerConfiguration.gerg.activationPackage
./result/activate
rm -rf ./result
'';
apply-system = pkgs.writeScriptBin "apply-system" ''
#!${pkgs.stdenv.shell}
nixos-rebuild switch --flake /etc/nixos/#
'';
in {
environment.systemPackages = [ update-system clean-store apply-users apply-system ];
}

50
modules/vfio.nix Normal file
View file

@ -0,0 +1,50 @@
{
boot = {
kernelParams = [ "amd_iommu=on" ];
boot.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";
};
virtualisation = {
libvirtd = {
enable = true;
qemu = {
runAsRoot = false;
ovmf = {
enable = true;
package = pkgs.OVMFFull;
};
};
};
};
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"
if [ "$GUEST_NAME" == "Main_VM" ]; then
if [ "$OPERATION" == "start" ]; then
systemctl set-property --runtime -- user.slice AllowedCPUs=0,1,2,6,7,8
systemctl set-property --runtime -- system.slice AllowedCPUs=0,1,2,6,7,8
systemctl set-property --runtime -- init.scope AllowedCPUs=0,1,2,6,7,8
fi
if [ "$OPERATION" == "stopped" ]; then
systemctl set-property --runtime -- user.slice AllowedCPUs=0-11
systemctl set-property --runtime -- system.slice AllowedCPUs=0-11
systemctl set-property --runtime -- init.scope AllowedCPUs=0-11
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,3 +1,26 @@
{config, ... }:
{
services.xserver = {
enable = true;
videoDrivers =
if (config.networking.hostName == "gerg-laptop")
then ["modesetting" "nvidia"]
else [ "nvidia" ];
layout = "us";
libinput.enable = true;
desktopManager = {
xterm.enable = false;
};
windowManager.bspwm = {
enable = true;
};
displayManager = {
defaultSession = "none+bspwm";
lightdm = {
enable = true;
greeters.mini = {
enable = true;
extraConfig = ''
[greeter]
user = gerg
show-password-label = false
@ -36,3 +59,11 @@ password-background-color = "#24283B"
password-border-color = "#000000"
password-border-width = 2px
password-border-radius = 0.341125em
'';
};
};
};
};
}

View file

@ -1,10 +0,0 @@
{ lib, ...}:
{
networking = {
firewall.enable = true;
hostName = "gerg-laptop";
useDHCP = lib.mkDefault true;
networkmanager. enable = true;
};
}

View file

@ -1,6 +0,0 @@
{config, ...}:
{
environment.systemPackages = [
config.nur.repos.instantos.spotify-adblock
];
}

View file

@ -1,2 +0,0 @@
#!/bin/sh
sudo nixos-rebuild switch --flake /etc/nixos/#

View file

@ -1,5 +0,0 @@
#!/bin/sh
cd /etc/nixos/scripts
nix build /etc/nixos/#homeManagerConfiguration.gerg.activationPackage
/etc/nixos/scripts/result/activate
rm -rf /etc/nixos/scripts/result

View file

@ -1,3 +0,0 @@
#!/bin/sh
nix-collect-garbage -d
nix-store --gc

View file

@ -1,2 +0,0 @@
#!/bin/sh
nix flake update /etc/nixos/#

36
systems/gerg-desktop.nix Executable file
View file

@ -0,0 +1,36 @@
{ config, pkgs, callPackage, lib, ... }:
{
#important stuff first
imports =
[
../modules/boot.nix
../modules/packages.nix
../modules/nvidia.nix
../modules/fonts.nix
../modules/thunar.nix
../modules/scripts.nix
../modules/misc.nix
../modules/vfio.nix
];
networking.hostName = "gerg-desktop";
nix = {
package = pkgs.nixFlakes;
extraOptions = ''
experimental-features = nix-command flakes
'';
};
services.xserver = import ../modules/xserver.nix;
system.stateVersion = "22.11";
hardware.cpu.amd.updateMicrocode = true;
# end important stuff
# user managment
users = {
defaultUserShell = pkgs.zsh;
users.gerg = {
isNormalUser = true;
extraGroups = [ "wheel" "audio" "networkmanager" "libvirt" ];
};
};
}

36
systems/gerg-laptop.nix Executable file
View file

@ -0,0 +1,36 @@
{ config, pkgs, callPackage, lib, ... }:
{
#important stuff first
imports =
[
../modules/boot.nix
../modules/prime.nix
../modules/nvidia.nix
../modules/packages.nix
../modules/fonts.nix
../modules/thunar.nix
../modules/scripts.nix
../modules/misc.nix
../modules/xserver.nix
];
networking.hostName = "gerg-laptop";
nix = {
package = pkgs.nixFlakes;
extraOptions = ''
experimental-features = nix-command flakes
'';
};
system.stateVersion = "22.11";
hardware.cpu.amd.updateMicrocode = true;
# end important stuff
# user managment
users = {
defaultUserShell = pkgs.zsh;
users.gerg = {
isNormalUser = true;
extraGroups = [ "wheel" "audio" "networkmanager"];
};
};
}

View file

@ -1,23 +0,0 @@
{
enable = true;
videoDrivers = ["nvidia" "modesetting"];
layout = "us";
libinput.enable = true;
desktopManager = {
xterm.enable = false;
};
windowManager.bspwm = {
enable = true;
};
displayManager = {
defaultSession = "none+bspwm";
lightdm = {
enable = true;
greeters.mini = {
enable = true;
extraConfig = (builtins.readFile ./lightdm-mini.conf);
};
};
};
}