Added scaling support

This commit is contained in:
Julian 2022-12-24 09:28:17 -08:00
parent 29b1e3b55d
commit e6b734a680
3 changed files with 193 additions and 0 deletions

View file

@ -8,6 +8,7 @@
imports = imports =
[ [
./hardware-configuration.nix ./hardware-configuration.nix
./user-jsutter.nix
]; ];
# Bootloader. # Bootloader.

165
configuration.nix.save Normal file
View file

@ -0,0 +1,165 @@
# 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, pkgs, ... }:
{
imports =
[
./hardware-configuration.nix
./user-jsutter.nix
];
# Bootloader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
boot.loader.efi.efiSysMountPoint = "/boot/efi";
# Kernel
boot.kernelPackages = pkgs.linuxPackages_latest;
# Flakes
nix.settings.experimental-features = [ "nix-command" "flakes" ];
# Power Stuff
services.power-profiles-daemon.enable = false;
services.tlp = {
enable = true;
settings = {
CPU_BOOST_ON_BAT = 0;
CPU_SCALING_GOVERNOR_ON_BATTERY = "powersave";
START_CHARGE_THRESH_BAT0 = 90;
STOP_CHARGE_THRESH_BAT0 = 97;
RUNTIME_PM_ON_BAT = "auto";
};
};
networking.hostName = "framework"; # Define your hostname.
networking.networkmanager.enable = true;
# Set your time zone.
time.timeZone = "America/Los_Angeles";
# 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";
};
# Services
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 = {
layout = "us";
xkbVariant = "";
};
# 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;
};
# Define a user account. Don't forget to set a password with passwd.
users.users.jsutter = {
isNormalUser = true;
description = "Julian Sutter";
extraGroups = [ "networkmanager" "wheel" ];
packages = with pkgs; [
alacritty
tor-browser-bundle-bin
nextcloud-client
vlc
deluge
steam
vmware-horizon-client
kleopatra
pinentry
arc-theme
zoom-us
slack
];
};
# Options for Steam
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
};
programs.java.enable = true;
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
# System packages
environment.systemPackages = with pkgs; [
fish
git
firefox
curl
file
gdb
unar
lsof
pciutils
htop
sysstat
nmap
powertop
gnupg
p7zip
rsync
bumblebee
glxinfo
libgdiplus
];
# GNUPG Stuff
services.pcscd.enable = true;
programs.gnupg.agent = {
enable = true;
pinentryFlavor = "gnome3";
enableSSHSupport = true;
};
# 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;
system.stateVersion = "22.11"; # Did you read the comment?
}

27
user-jsutter.nix Normal file
View file

@ -0,0 +1,27 @@
{ config, pkgs, ... }:
let
home-manager = builtins.fetchTarball "https://github.com/nix-community/home-manager/archive/master.tar.gz";
in
{
imports = [
(import "${home-manager}/nixos")
];
home-manager.users.jsutter = {
home.stateVersion = "22.11";
# Git Configuration
programs.git = {
enable = true;
userName = "Julian Sutter";
userEmail = "jsutter@symbiotip.com";
};
dconf.settings = {
"org/gnome/mutter" = {
experimental-features = [ "scale-monitor-framebuffer" ];
};
};
};
}