Allow unfree / baremetalling tweaks

This commit is contained in:
agryphus 2023-10-17 20:52:16 -04:00
parent c2ec166dfd
commit 71f1006190
2 changed files with 63 additions and 58 deletions

View file

@ -8,15 +8,14 @@
imports = imports =
[ # Include the results of the hardware scan. [ # Include the results of the hardware scan.
./hardware-configuration.nix ./hardware-configuration.nix
./personal.nix
]; ];
# Use the systemd-boot EFI boot loader. # Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true; boot.loader.efi.canTouchEfiVariables = true;
nix.settings.experimental-features = ["nix-command" "flakes"]; nix.settings.experimental-features = ["nix-command" "flakes"];
nixpkgs.config.allowUnfree = true;
environment.sessionVariables = { environment.sessionVariables = {
ZDOTDIR = "$HOME/.config/zsh"; ZDOTDIR = "$HOME/.config/zsh";
@ -36,10 +35,7 @@
fi fi
''; '';
# networking.hostName = "lappy"; # Define your hostname. networking.networkmanager.enable = true;
# Pick only one of the below networking options.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
# Set your time zone. # Set your time zone.
time.timeZone = "America/New_York"; time.timeZone = "America/New_York";
@ -61,13 +57,21 @@
]; ];
}; };
}; };
# console = { # console = {
# font = "Lat2-Terminus16"; # font = "Lat2-Terminus16";
# keyMap = "us"; # keyMap = "us";
# useXkbConfig = true; # use xkbOptions in tty. # useXkbConfig = true; # use xkbOptions in tty.
# }; # };
# Enable the X11 windowing system. fonts.fonts = with pkgs; [
source-han-sans
source-han-serif
(nerdfonts.override { fonts = [ "FiraCode" ]; })
];
# X Server
services.xserver = { services.xserver = {
enable = true; enable = true;
autorun = false; autorun = false;
@ -76,8 +80,11 @@
layout = "us"; layout = "us";
xkbOptions = "eurosign:e,caps:escape"; xkbOptions = "eurosign:e,caps:escape";
# Enable touchpad support (enabled default in most desktopManager). # Touchpad stuff
libinput.enable = true; libinput = {
enable = true;
touchpad.naturalScrolling = true;
};
displayManager = { displayManager = {
lightdm.enable = false; lightdm.enable = false;
@ -87,32 +94,43 @@
windowManager.dwm.enable = true; windowManager.dwm.enable = true;
}; };
# Enable CUPS to print documents. # Bluetooth daemon
# services.printing.enable = true; services.blueman.enable = true;
hardware.bluetooth.enable = true;
hardware.bluetooth.powerOnBoot = true;
# Enable sound. # Audio daemon
sound.enable = true; security.rtkit.enable = true;
hardware.pulseaudio.enable = true; services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
jack.enable = true;
};
# Misc services
services.udisks2.enable = true; # USB Mounting
# services.printing.enable = true; # CUPS
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
# programs.mtr.enable = true;
programs = {
zsh.enable = true;
gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
};
# Define a user account. Don't forget to set a password with passwd. # Define a user account. Don't forget to set a password with passwd.
users = { users = {
mutableUsers = true; mutableUsers = true;
users = { users.root = {
vince = { # Disables root login, since nothing can hash to "!". Requires setting mutableUsers to "false",
isNormalUser = true; # rebuilding, and then setting mutableUsers back to "true".
extraGroups = [ "wheel" ]; hashedPassword = "!";
packages = with pkgs; [
];
shell = pkgs.zsh;
# Set so when mutableUsers is set to "false", the user still has a way to login.
password = "";
};
root = {
# Disables root login, since nothing can hash to "!". Requires setting mutableUsers to "false",
# rebuilding, and then setting mutableUsers back to "true".
hashedPassword = "!";
};
}; };
}; };
@ -120,6 +138,9 @@
# $ nix search wget # $ nix search wget
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
# General programs that I like and use # General programs that I like and use
arandr # Visually move relative positions of monitors
autorandr # Save and load xrandr profiles
blueman # Bluetooth manager
devour # Opens new program on top of terminal devour # Opens new program on top of terminal
dunst # Notification daemon dunst # Notification daemon
dwmblocks # Suckless statusbar for DWM dwmblocks # Suckless statusbar for DWM
@ -129,6 +150,7 @@
git # Imagine not having this git # Imagine not having this
htop # Process monitor htop # Process monitor
killall # Easy way to kill a process killall # Easy way to kill a process
libnotify # Send messages to notification daemon
libreoffice # MSOffice btfo libreoffice # MSOffice btfo
neofetch # Aesthetic sysinfo neofetch # Aesthetic sysinfo
pass-nodmenu # CLI password store (without dmenu dependency) pass-nodmenu # CLI password store (without dmenu dependency)
@ -143,7 +165,9 @@
texlive.combined.scheme-full # LaTeX to create documents texlive.combined.scheme-full # LaTeX to create documents
tmux # Terminal multiplexor tmux # Terminal multiplexor
typst # Cool, minimal LaTeX alternative typst # Cool, minimal LaTeX alternative
udisks # Good way of dealing with USBs and similar media
ungoogled-chromium # If I need a special chrome feature ungoogled-chromium # If I need a special chrome feature
xsecurelock # Session locker
zsh # Shell zsh # Shell
zsh-syntax-highlighting # Shell syntax highlighting zsh-syntax-highlighting # Shell syntax highlighting
@ -205,28 +229,11 @@
) )
]; ];
nixpkgs.overlays = [ #nixpkgs.overlays = [
(final: prev: { # (final: prev: {
dwm = prev.dwm.overrideAttrs (old: {src = /home/vince/.config/dwm;}); # dwm = prev.dwm.overrideAttrs (old: {src = /home/vince/.config/dwm;});
}) # })
]; #];
fonts.fonts = with pkgs; [
source-han-sans
source-han-serif
(nerdfonts.override { fonts = [ "FiraCode" ]; })
];
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
# programs.mtr.enable = true;
programs = {
zsh.enable = true;
gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
};
# Open ports in the firewall. # Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ]; # networking.firewall.allowedTCPPorts = [ ... ];
@ -234,11 +241,6 @@
# Or disable the firewall altogether. # Or disable the firewall altogether.
# networking.firewall.enable = false; # networking.firewall.enable = false;
# Copy the NixOS configuration file and link it from the resulting system
# (/run/current-system/configuration.nix). This is useful in case you
# accidentally delete configuration.nix.
# system.copySystemConfiguration = true;
# This value determines the NixOS release from which the default # This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions # settings for stateful data, like file locations and database versions
# on your system were taken. It's perfectly fine and recommended to leave # on your system were taken. It's perfectly fine and recommended to leave
@ -246,6 +248,5 @@
# Before changing this value read the documentation for this option # Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "23.05"; # Did you read the comment? system.stateVersion = "23.05"; # Did you read the comment?
} }

View file

@ -0,0 +1,4 @@
{
allowUnfree = true;
}