push
This commit is contained in:
191
etc/nixos/configuration.nix
Normal file
191
etc/nixos/configuration.nix
Normal file
@@ -0,0 +1,191 @@
|
||||
# Edit this configuration file to define what should be installed on
|
||||
# your system. Help is available in the configuration.nix(5) man page
|
||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ # Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
../../home/bug/.config/nixos/test.nix
|
||||
];
|
||||
|
||||
# Bootloader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||
|
||||
# Configure network proxy if necessary
|
||||
# networking.proxy.default = "http://user:password@proxy:port/";
|
||||
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||||
|
||||
# Enable networking
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "America/Chicago";
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "en_US.UTF-8";
|
||||
LC_IDENTIFICATION = "en_US.UTF-8";
|
||||
LC_MEASUREMENT = "en_US.UTF-8";
|
||||
LC_MONETARY = "en_US.UTF-8";
|
||||
LC_NAME = "en_US.UTF-8";
|
||||
LC_NUMERIC = "en_US.UTF-8";
|
||||
LC_PAPER = "en_US.UTF-8";
|
||||
LC_TELEPHONE = "en_US.UTF-8";
|
||||
LC_TIME = "en_US.UTF-8";
|
||||
};
|
||||
|
||||
# Enable the X11 windowing system.
|
||||
services.xserver.enable = true;
|
||||
|
||||
# Enable the GNOME Desktop Environment.
|
||||
services.xserver.displayManager.gdm.enable = true;
|
||||
services.xserver.desktopManager.gnome.enable = true;
|
||||
|
||||
# Configure keymap in X11
|
||||
services.xserver.xkb = {
|
||||
layout = "us";
|
||||
variant = "";
|
||||
};
|
||||
|
||||
# Enable CUPS to print documents.
|
||||
services.printing.enable = true;
|
||||
|
||||
# Enable sound with pipewire.
|
||||
hardware.pulseaudio.enable = false;
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
# If you want to use JACK applications, uncomment this
|
||||
#jack.enable = true;
|
||||
|
||||
# use the example session manager (no others are packaged yet so this is enabled by default,
|
||||
# no need to redefine it in your config for now)
|
||||
#media-session.enable = true;
|
||||
};
|
||||
|
||||
# Enable touchpad support (enabled default in most desktopManager).
|
||||
# services.xserver.libinput.enable = true;
|
||||
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
security.sudo.enable = true;
|
||||
|
||||
services.flatpak.enable = true;
|
||||
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
|
||||
dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server
|
||||
localNetworkGameTransfers.openFirewall = true; # Open ports in the firewall for Steam Local Network Game Transfers
|
||||
};
|
||||
|
||||
xdg.portal.enable = true;
|
||||
xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
|
||||
|
||||
programs.hyprland = {
|
||||
enable = true;
|
||||
#nvidiaPatches = true;
|
||||
xwayland.enable = true;
|
||||
};
|
||||
|
||||
hardware = {
|
||||
opengl.enable = true;
|
||||
};
|
||||
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
services.xserver.videoDrivers = ["nvidia"];
|
||||
|
||||
hardware.nvidia = {
|
||||
modesetting.enable = true;
|
||||
powerManagement.enable = false;
|
||||
powerManagement.finegrained = false;
|
||||
open = true;
|
||||
nvidiaSettings = true;
|
||||
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||
};
|
||||
|
||||
environment.sessionVariables = {
|
||||
WLR_NO_HARDWARE_CURSORS = "1";
|
||||
NIXOS_OZONE_WL = "1";
|
||||
};
|
||||
|
||||
# Enable automatic login for the user.
|
||||
services.xserver.displayManager.autoLogin.enable = true;
|
||||
services.xserver.displayManager.autoLogin.user = "bug";
|
||||
|
||||
# Workaround for GNOME autologin: https://github.com/NixOS/nixpkgs/issues/103746#issuecomment-945091229
|
||||
systemd.services."getty@tty1".enable = false;
|
||||
systemd.services."autovt@tty1".enable = false;
|
||||
|
||||
# Install firefox.
|
||||
programs.firefox.enable = true;
|
||||
|
||||
# Allow unfree packages
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# List packages installed in system profile. To search, run:
|
||||
# $ nix search wget
|
||||
environment.systemPackages = with pkgs; [
|
||||
# vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
|
||||
# wget
|
||||
rofi-wayland
|
||||
waybar
|
||||
swww
|
||||
kitty
|
||||
ags
|
||||
gammastep
|
||||
fcitx5
|
||||
hypridle
|
||||
easyeffects
|
||||
wl-clipboard
|
||||
foot
|
||||
cliphist
|
||||
slurp
|
||||
grim
|
||||
swappy
|
||||
tesseract
|
||||
hyprpicker
|
||||
libnotify
|
||||
];
|
||||
|
||||
# Some programs need SUID wrappers, can be configured further or are
|
||||
# started in user sessions.
|
||||
# programs.mtr.enable = true;
|
||||
# programs.gnupg.agent = {
|
||||
# enable = true;
|
||||
# enableSSHSupport = true;
|
||||
# };
|
||||
|
||||
# List services that you want to enable:
|
||||
|
||||
# Enable the OpenSSH daemon.
|
||||
# services.openssh.enable = true;
|
||||
|
||||
# Open ports in the firewall.
|
||||
# networking.firewall.allowedTCPPorts = [ ... ];
|
||||
# networking.firewall.allowedUDPPorts = [ ... ];
|
||||
# Or disable the firewall altogether.
|
||||
# networking.firewall.enable = false;
|
||||
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||
# this value at the release version of the first install of this system.
|
||||
# Before changing this value read the documentation for this option
|
||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||
system.stateVersion = "24.11"; # Did you read the comment?
|
||||
|
||||
}
|
||||
39
etc/nixos/hardware-configuration.nix
Normal file
39
etc/nixos/hardware-configuration.nix
Normal file
@@ -0,0 +1,39 @@
|
||||
# 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" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/199c2e37-2d04-4e18-b92c-a1b4a6313519";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/3F2C-36CC";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0077" "dmask=0077" ];
|
||||
};
|
||||
|
||||
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.enp5s0.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlo1.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
10
home/bug/.config/nixos/boot.nix
Normal file
10
home/bug/.config/nixos/boot.nix
Normal file
@@ -0,0 +1,10 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
boot = {
|
||||
loader = {
|
||||
systemd-boot.enable = true;
|
||||
efi.canTouchEfiVariables = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
33
home/bug/.config/nixos/environment.nix
Normal file
33
home/bug/.config/nixos/environment.nix
Normal file
@@ -0,0 +1,33 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
environment = {
|
||||
# env
|
||||
sessionVariables = {
|
||||
WLR_NO_HARDWARE_CURSORS = "1";
|
||||
NIXOS_OZONE_WL = "1";
|
||||
};
|
||||
|
||||
# packages
|
||||
systemPackages = with pkgs; [
|
||||
rofi-wayland
|
||||
waybar
|
||||
swww
|
||||
kitty
|
||||
ags
|
||||
gammastep
|
||||
fcitx5
|
||||
hypridle
|
||||
easyeffects
|
||||
wl-clipboard
|
||||
foot
|
||||
cliphist
|
||||
slurp
|
||||
grim
|
||||
swappy
|
||||
tesseract
|
||||
hyprpicker
|
||||
libnotify
|
||||
];
|
||||
};
|
||||
}
|
||||
22
home/bug/.config/nixos/hardware.nix
Normal file
22
home/bug/.config/nixos/hardware.nix
Normal file
@@ -0,0 +1,22 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
hardware = {
|
||||
# open gl
|
||||
opengl.enable = true;
|
||||
graphics.enable = true;
|
||||
|
||||
# nvidia drivers
|
||||
nvidia = {
|
||||
modesetting.enable = true;
|
||||
powerManagement.enable = false;
|
||||
powerManagement.finegrained = false;
|
||||
open = true;
|
||||
nvidiaSettings = true;
|
||||
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||
};
|
||||
|
||||
# pipewire
|
||||
pulseaudio.enable = false;
|
||||
};
|
||||
}
|
||||
21
home/bug/.config/nixos/locale.nix
Normal file
21
home/bug/.config/nixos/locale.nix
Normal file
@@ -0,0 +1,21 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
time.timeZone = "America/Chicago";
|
||||
|
||||
i18n = {
|
||||
defaultLocale = "en_US.UTF-8";
|
||||
|
||||
extraLocaleSettings = {
|
||||
LC_ADDRESS = "en_US.UTF-8";
|
||||
LC_IDENTIFICATION = "en_US.UTF-8";
|
||||
LC_MEASUREMENT = "en_US.UTF-8";
|
||||
LC_MONETARY = "en_US.UTF-8";
|
||||
LC_NAME = "en_US.UTF-8";
|
||||
LC_NUMERIC = "en_US.UTF-8";
|
||||
LC_PAPER = "en_US.UTF-8";
|
||||
LC_TELEPHONE = "en_US.UTF-8";
|
||||
LC_TIME = "en_US.UTF-8";
|
||||
};
|
||||
};
|
||||
}
|
||||
17
home/bug/.config/nixos/main.nix
Normal file
17
home/bug/.config/nixos/main.nix
Normal file
@@ -0,0 +1,17 @@
|
||||
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
./boot.nix
|
||||
./environment.nix
|
||||
./hardware.nix
|
||||
./locale.nix
|
||||
./misc.nix
|
||||
./networking.nix
|
||||
./programs.nix
|
||||
./services.nix
|
||||
./users.nix
|
||||
];
|
||||
}
|
||||
18
home/bug/.config/nixos/misc.nix
Normal file
18
home/bug/.config/nixos/misc.nix
Normal file
@@ -0,0 +1,18 @@
|
||||
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
# portal
|
||||
xdg.portal.enable = true;
|
||||
xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
|
||||
|
||||
# gnome autologin workaround
|
||||
systemd.services."getty@tty1".enable = false;
|
||||
systemd.services."autovt@tty1".enable = false;
|
||||
|
||||
# unfree packages
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# pipewire
|
||||
security.rtkit.enable = true;
|
||||
}
|
||||
14
home/bug/.config/nixos/networking.nix
Normal file
14
home/bug/.config/nixos/networking.nix
Normal file
@@ -0,0 +1,14 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
networking = {
|
||||
hostName = "nix";
|
||||
networkmanager.enable = true;
|
||||
|
||||
# Open ports in the firewall.
|
||||
# firewall.allowedTCPPorts = [ ... ];
|
||||
# firewall.allowedUDPPorts = [ ... ];
|
||||
# Or disable the firewall altogether.
|
||||
# firewall.enable = false;
|
||||
};
|
||||
}
|
||||
23
home/bug/.config/nixos/programs.nix
Normal file
23
home/bug/.config/nixos/programs.nix
Normal file
@@ -0,0 +1,23 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
programs = {
|
||||
# firefox
|
||||
firefox.enable = true;
|
||||
|
||||
# steam
|
||||
steam = {
|
||||
enable = true;
|
||||
remotePlay.openFirewall = true;
|
||||
dedicatedServer.openFirewall = true;
|
||||
localNetworkGameTransfers.openFirewall = true;
|
||||
};
|
||||
|
||||
# hyprland
|
||||
hyprland = {
|
||||
enable = true;
|
||||
# nvidiaPatches = true;
|
||||
xwayland.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
52
home/bug/.config/nixos/services.nix
Normal file
52
home/bug/.config/nixos/services.nix
Normal file
@@ -0,0 +1,52 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
services = {
|
||||
# openssh
|
||||
openssh.enable = true;
|
||||
|
||||
# printing
|
||||
printing.enable = true;
|
||||
|
||||
# sound
|
||||
pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
# jack.enable = true;
|
||||
};
|
||||
|
||||
# x11
|
||||
xserver = {
|
||||
enable = true;
|
||||
|
||||
# enable nvidia drivers
|
||||
videoDrivers = ["nvidia"];
|
||||
|
||||
# touchpad
|
||||
libinput.enable = true;
|
||||
|
||||
# x11 keymap
|
||||
xkb = {
|
||||
layout = "us";
|
||||
variant = "";
|
||||
};
|
||||
|
||||
displayManager = {
|
||||
# gnome de
|
||||
gdm.enable = true;
|
||||
gnome.enable = true;
|
||||
|
||||
# auto login
|
||||
autoLogin = {
|
||||
enable = true;
|
||||
user = "bug";
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
# flatpak
|
||||
flatpak.enable = true;
|
||||
};
|
||||
}
|
||||
20
home/bug/.config/nixos/users.nix
Normal file
20
home/bug/.config/nixos/users.nix
Normal file
@@ -0,0 +1,20 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
users.users.bug = {
|
||||
isNormalUser = true;
|
||||
description = "Bug";
|
||||
extraGroups = [ "networkmanager" "wheel" ];
|
||||
packages = with pkgs; [
|
||||
vscodium
|
||||
neofetch
|
||||
git
|
||||
btop
|
||||
luajit
|
||||
luarocks
|
||||
nicotine-plus
|
||||
discord
|
||||
zed-editor
|
||||
];
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user