225 lines
6.1 KiB
Nix
225 lines
6.1 KiB
Nix
# sudo nix-channel --add https://github.com/NixOS/nixos-hardware/archive/master.tar.gz nixos-hardware
|
||
# sudo nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager
|
||
|
||
{ config, pkgs, ... }:
|
||
|
||
{
|
||
networking.hostName = "kudzu";
|
||
|
||
imports =
|
||
[ # Include the results of the hardware scan.
|
||
#
|
||
# DON'T FORGET to add your hardware config too
|
||
# https://github.com/NixOS/nixos-hardware/
|
||
#
|
||
# Also make sure to move the swap configuration to the hardware config
|
||
/etc/nixos/hardware-configuration.nix
|
||
./filesystems.nix
|
||
<home-manager/nixos>
|
||
];
|
||
|
||
# Bootloader
|
||
boot.loader.systemd-boot.enable = true;
|
||
boot.loader.efi.canTouchEfiVariables = true;
|
||
boot.loader.efi.efiSysMountPoint = "/boot/efi";
|
||
|
||
boot.kernelParams = [
|
||
# Power efficiency
|
||
# https://wiki.archlinux.org/title/Power_management#Kernel_parameters
|
||
"nmi_watchdog=0"
|
||
];
|
||
|
||
boot.kernel.sysctl = {
|
||
# Set IO batching to 2 minutes for power reasons
|
||
"vm.dirty_writeback_centisecs" = 12000;
|
||
};
|
||
|
||
# Setup keyfile
|
||
boot.initrd.secrets = {
|
||
"/crypto_keyfile.bin" = null;
|
||
};
|
||
|
||
# Enable networking
|
||
networking.networkmanager.enable = true;
|
||
|
||
# Set your time zone.
|
||
time.timeZone = "America/New_York";
|
||
|
||
# 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;
|
||
services.logind.lidSwitch = "ignore";
|
||
|
||
# Enable the GNOME Desktop Environment.
|
||
services.xserver.displayManager.gdm.enable = true;
|
||
services.xserver.desktopManager.gnome = {
|
||
enable = true;
|
||
extraGSettingsOverrides = ''
|
||
# Favorite apps in gnome-shell
|
||
# [org.gnome.shell]
|
||
# favorite-apps=['org.gnome.Photos.desktop', 'org.gnome.Nautilus.desktop']
|
||
|
||
[org.gnome.desktop.input-sources]
|
||
show-all-sources=true
|
||
sources=[('xkb', 'us'), ('xkb', 'us+3l')]
|
||
|
||
[org.gnome.desktop.wm.preferences]
|
||
num-workspaces=5
|
||
|
||
[org.gnome.desktop.wm.keybindings]
|
||
# Pop shell bindings
|
||
minimize=['<Alt>comma']
|
||
switch-to-workspace-left=@as []
|
||
switch-to-workspace-right=@as []
|
||
maximize=@as []
|
||
unmaximize=@as []
|
||
move-to-monitor-up=@as []
|
||
move-to-monitor-down=@as []
|
||
move-to-monitor-left=@as []
|
||
move-to-monitor-right=@as []
|
||
switch-to-workspace-down=@as []
|
||
switch-to-workspace-up=@as []
|
||
toggle-fullscreen=['<Alt>m']
|
||
close=['<Alt>q']
|
||
switch-to-workspace-1=@as ['<Alt>1']
|
||
switch-to-workspace-2=@as ['<Alt>2']
|
||
switch-to-workspace-3=@as ['<Alt>3']
|
||
switch-to-workspace-4=@as ['<Alt>4']
|
||
switch-to-workspace-5=@as ['<Alt>5']
|
||
move-to-workspace-1=@as ['<Alt><Shift>1']
|
||
move-to-workspace-2=@as ['<Alt><Shift>2']
|
||
move-to-workspace-3=@as ['<Alt><Shift>3']
|
||
move-to-workspace-4=@as ['<Alt><Shift>4']
|
||
move-to-workspace-5=@as ['<Alt><Shift>5']
|
||
|
||
[org.gnome.shell.keybindings]
|
||
open-application-menu=@as []
|
||
toggle-message-tray=@as []
|
||
toggle-overview=@as []
|
||
|
||
[org.gnome.mutter.keybindings]
|
||
toggle-tiled-left=@as []
|
||
toggle-tiled-right=@as []
|
||
'';
|
||
extraGSettingsOverridePackages = [
|
||
pkgs.gsettings-desktop-schemas # for org.gnome.desktop
|
||
pkgs.gnome.gnome-shell # for org.gnome.shell
|
||
];
|
||
};
|
||
|
||
# Configure keymap in X11
|
||
services.xserver = {
|
||
layout = "us";
|
||
xkbVariant = "3l";
|
||
};
|
||
|
||
# Enable CUPS to print documents.
|
||
services.printing.enable = true;
|
||
|
||
# Enable sound with pipewire.
|
||
sound.enable = true;
|
||
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;
|
||
};
|
||
|
||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||
users.users.ember = {
|
||
uid = 1312;
|
||
isNormalUser = true;
|
||
description = "Ember";
|
||
extraGroups = [ "networkmanager" "wheel" ];
|
||
shell = pkgs.fish;
|
||
};
|
||
home-manager.users.ember = import ./home.nix;
|
||
|
||
# Allow unfree packages
|
||
nixpkgs.config.allowUnfree = true;
|
||
|
||
# List packages installed in system profile. To search, run:
|
||
environment.systemPackages = with pkgs; [
|
||
wget
|
||
gnumake
|
||
htop
|
||
wl-clipboard
|
||
unzip
|
||
vlc
|
||
file
|
||
gst_all_1.gstreamer gst_all_1.gst-plugins-base gst_all_1.gst-libav gst_all_1.gst-vaapi gst_all_1.gst-plugins-bad gst_all_1.gst-plugins-good gst_all_1.gst-plugins-ugly
|
||
];
|
||
environment.gnome.excludePackages = with pkgs.gnome; [
|
||
gnome-terminal
|
||
gnome-music
|
||
gedit
|
||
geary
|
||
totem
|
||
];
|
||
|
||
# List services that you want to enable:
|
||
|
||
services = {
|
||
flatpak = {
|
||
enable = true;
|
||
};
|
||
fwupd.enable = true;
|
||
};
|
||
|
||
# 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;
|
||
networking.hosts = {
|
||
"162.255.119.254" = ["www.librepunk.club"];
|
||
"129.21.49.69" = ["www.librepunk.club"];
|
||
};
|
||
|
||
# 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 = "22.11"; # Did you read the comment?
|
||
|
||
# Set up hardware acceleration
|
||
# https://nixos.wiki/wiki/Accelerated_Video_Playback
|
||
hardware.opengl = {
|
||
enable = true;
|
||
extraPackages = with pkgs; [
|
||
intel-compute-runtime
|
||
intel-media-driver # LIBVA_DRIVER_NAME=iHD
|
||
vaapiIntel # LIBVA_DRIVER_NAME=i965 (older but works better for Firefox/Chromium)
|
||
vaapiVdpau
|
||
libvdpau-va-gl
|
||
];
|
||
};
|
||
}
|