This commit is contained in:
2025-03-11 22:25:47 +02:00
parent 319b0bf433
commit 971216f1b3
9 changed files with 156 additions and 23 deletions

2
.gitignore vendored
View File

@@ -1 +1 @@
hardware-configuration.nix
# hardware-configuration.nix

View File

@@ -8,14 +8,14 @@
hyprland.url = "github:hyprwm/Hyprland";
hyprsysteminfo.url = "github:hyprwm/hyprsysteminfo";
ghostty.url = "github:ghostty-org/ghostty";
hyprpanel.url = "github:jas-singhfsu/hyprpanel";
hyprpanel.inputs.nixpkgs.follows = "nixpkgs";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
disko.url = "github:nix-community/disko/latest";
disko.inputs.nixpkgs.follows = "nixpkgs";
};
# Required by NixOS:
@@ -31,13 +31,10 @@
inherit inputs;
};
modules = [
{
nixpkgs.overlays = [inputs.hyprpanel.overlay];
}
inputs.home-manager.nixosModules.default
inputs.catppuccin.nixosModules.catppuccin
inputs.nix-flatpak.nixosModules.nix-flatpak
/etc/nixos/hardware-configuration.nix
./hosts/default/hardware-configuration.nix
./hosts/default/configuration.nix
];
};

View File

@@ -189,7 +189,7 @@
programs.chromium = {
enable = true;
package = pkgs.brave;
package = pkgs.ungoogled-chromium;
extensions = [
{ id = "cjpalhdlnbpafiamejdnhcphjbkeiagm"; } # uBlock Origin
{ id = "enamippconapkdmgfgjchkhakpfinmaj"; } # DeArrow

73
hosts/default/disko.nix Normal file
View File

@@ -0,0 +1,73 @@
{
disko.devices = {
disk = {
main = {
type = "disk";
device = "/dev/disk/by-diskseq/1";
content = {
type = "gpt";
partitions = {
ESP = {
priority = 1;
name = "ESP";
start = "1M";
end = "1G";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
mountOptions = [ "umask=0077" ];
};
};
root = {
size = "100%";
content = {
type = "btrfs";
extraArgs = [ "-f" ]; # Override existing partition
# Subvolumes must set a mountpoint in order to be mounted,
# unless their parent is mounted
subvolumes = {
# Subvolume name is different from mountpoint
"/root" = {
mountpoint = "/";
};
# Subvolume name is the same as the mountpoint
"/home" = {
mountOptions = [ "compress=zstd" ];
mountpoint = "/home";
};
"/nix" = {
mountOptions = [
"compress=zstd"
"noatime"
];
mountpoint = "/nix";
};
"/swap" = {
mountpoint = "/swap";
swap = {
swapfile.size = "20M";
swapfile2.size = "20M";
swapfile2.path = "rel-path";
};
};
};
mountpoint = "/partition-root";
swap = {
swapfile = {
size = "20M";
};
swapfile1 = {
size = "20M";
};
};
};
};
};
};
};
};
};
}

View File

@@ -0,0 +1,57 @@
# 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 = [ "xhci_pci" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/8efee6be-05b9-4349-966b-4cf924c644e4";
fsType = "btrfs";
options = [ "subvol=root" "compress=zstd" ];
};
fileSystems."/home" =
{ device = "/dev/disk/by-uuid/8efee6be-05b9-4349-966b-4cf924c644e4";
fsType = "btrfs";
options = [ "subvol=home" "compress=zstd" ];
};
fileSystems."/nix" =
{ device = "/dev/disk/by-uuid/8efee6be-05b9-4349-966b-4cf924c644e4";
fsType = "btrfs";
options = [ "subvol=nix" "noatime" ];
};
fileSystems."/swap" =
{ device = "/dev/disk/by-uuid/8efee6be-05b9-4349-966b-4cf924c644e4";
fsType = "btrfs";
options = [ "subvol=swap" "noatime" ];
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/12CE-A600";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
swapDevices = [ { device = "/swap/swapfile"; } ];
# 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.enp3s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

View File

@@ -16,9 +16,10 @@
programs.seahorse.enable = true;
environment.variables.LD_LIBRARY_PATH = "${pkgs.stdenv.cc.cc.lib}/lib";
environment.systemPackages = with pkgs; [
inputs.hyprsysteminfo.packages.${pkgs.stdenv.hostPlatform.system}.hyprsysteminfo
hyprpanel
# minecraft
qemu
(writeShellScriptBin "qemu-system-x86_64-uefi" ''
@@ -26,7 +27,7 @@
-bios ${OVMF.fd}/FV/OVMF.fd \
"$@"
'')
(writeShellScriptBin "regretevator" ''xdg-open https://www.roblox.com/games/4972273297/Regretevator-ELEVATOR-SIMULATOR'')
(writeShellScriptBin "regretevator" ''xdg-open roblox://placeId=4972273297'')
libxkbcommon
ffmpeg
gnupg
@@ -65,6 +66,7 @@
fontforge
xclip
gamescope
yt-dlp
fontforge-gtk
deno
wofi

6
install.sh Normal file
View File

@@ -0,0 +1,6 @@
lsblk
echo "Enter disk to install to: "
read vardisk
sudo nix run 'github:nix-community/disko/latest#disko-install' --extra-experimental-features "nix-command flakes" -- --flake .#default --disk $vardisk

View File

@@ -7,17 +7,15 @@
options nvidia_drm modeset=1 fbdev=1
'';
environment.variables = {
LIBVA_DRIVER_NAME = "nvidia";
GBM_BACKEND = "nvidia-drm";
__GLX_VENDOR_LIBRARY_NAME = "nvidia";
NVD_BACKEND = "direct";
EGL_PLATFORM = "wayland";
VDPAU_DRIVER = "va_gl";
WAYLAND_DISPLAY = "wayland-1";
DISPLAY = ":0";
XDG_CURRENT_DESKTOP = "Hyprland";
};
environment.variables.LIBVA_DRIVER_NAME = "nvidia";
environment.variables.GBM_BACKEND = "nvidia-drm";
environment.variables.__GLX_VENDOR_LIBRARY_NAME = "nvidia";
environment.variables.NVD_BACKEND = "direct";
environment.variables.EGL_PLATFORM = "wayland";
environment.variables.VDPAU_DRIVER = "va_gl";
environment.variables.WAYLAND_DISPLAY = "wayland-1";
environment.variables.DISPLAY = ":0";
environment.variables.XDG_CURRENT_DESKTOP = "Hyprland";
environment.sessionVariables = {
NIXOS_OZONE_WL = 1;

View File

@@ -38,7 +38,7 @@
services.openssh = {
enable = true;
banner = "What the fuck do you think you're doing here?\n";
banner = "please fuck off\n";
};
services.dbus.packages = [ pkgs.gcr ];