Skip to content

Instantly share code, notes, and snippets.

@polachok
Created December 27, 2021 15:58
Show Gist options
  • Save polachok/b7d397e64909ec2c772cd77ea60f5e68 to your computer and use it in GitHub Desktop.
Save polachok/b7d397e64909ec2c772cd77ea60f5e68 to your computer and use it in GitHub Desktop.
config
{ config, pkgs, ... }:
{
imports =
[
./hardware-configuration.nix
];
nixpkgs.config = {
allowUnfree = true;
packageOverrides = pkgs: {
unstable = import <nixos-unstable> {
config = config.nixpkgs.config;
};
};
};
hardware.video.hidpi.enable = true;
hardware.firmware = with pkgs; [
firmwareLinuxNonfree
];
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
boot.loader.systemd-boot.consoleMode = "max";
boot.kernelParams = [ "video=efifb" ];
boot.initrd.kernelModules = [ ];
boot.blacklistedKernelModules = [ "nouveau" ];
networking.hostName = "desk";
networking.networkmanager.wifi.powersave = false;
time.timeZone = "Europe/Moscow";
networking.networkmanager.enable = true;
networking.networkmanager.enableStrongSwan = true;
services.xserver.enable = true;
services.xserver.dpi = 96;
services.xserver.videoDrivers = ["nvidia"];
hardware.nvidia.modesetting.enable = true;
services.xserver.windowManager.i3 = {
enable = true;
extraPackages = with pkgs; [ dmenu i3lock ];
};
services.xserver.displayManager.session = [
{
manage = "desktop";
name = "default";
start = ''
${pkgs.i3}/bin/i3
'';
}
];
services.xserver.displayManager.lightdm.greeters.tiny.enable = true;
services.xserver.displayManager.defaultSession = "default";
services.xserver.desktopManager.xterm.enable = false;
xdg.portal = {
enable = true;
extraPortals = with pkgs; [
xdg-desktop-portal-gtk
];
};
services.flatpak.enable = true;
virtualisation.docker = {
enable = true;
extraOptions = "--data-root /mnt/scratch/docker";
};
fonts.fontDir.enable = true;
sound.enable = true;
hardware.pulseaudio.enable = true;
hardware.pulseaudio.daemon.config = {
default-sample-format = "s24le";
default-sample-rate = "192000";
};
services.xserver.libinput.enable = true;
services.gnome.gnome-keyring.enable = true;
services.gnome.gnome-settings-daemon.enable = true;
users.users.plhk = {
isNormalUser = true;
extraGroups = [ "wheel" "networkmanager" "docker" ];
shell = pkgs.zsh;
};
environment.systemPackages = with pkgs; [
vim
zsh
gnome.networkmanager-l2tp
home-manager
gnome.seahorse
];
environment.homeBinInPath = true;
environment.sessionVariables = {
"GDK_SCALE" = "2";
"GDK_DPI_SCALE" = "0.7";
};
programs.dconf.enable = true;
powerManagement.cpuFreqGovernor = "ondemand";
nix.autoOptimiseStore = true;
nix.gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 30d";
};
services.openssh.enable = true;
programs.ssh.askPassword = "${pkgs.gnome.seahorse}/libexec/seahorse/ssh-askpass";
system.stateVersion = "21.05";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment