Skip to content

Instantly share code, notes, and snippets.

@marvin
Last active October 24, 2021 19:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marvin/1cd57b27333e0925aa3774d8722c81f9 to your computer and use it in GitHub Desktop.
Save marvin/1cd57b27333e0925aa3774d8722c81f9 to your computer and use it in GitHub Desktop.
# nixos config for camus thinkpad T430s Laptop
{ config, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
];
# Use the GRUB 2 boot loader.
boot.loader.grub.enable = true;
boot.loader.grub.version = 2;
boot.loader.grub.device = "/dev/sda"; # or "nodev" for efi only
networking.hostName = "camus"; # Define your hostname.
networking.networkmanager.enable = true; # Enables wireless support via wpa_supplicant.
networking.useDHCP = false;
networking.interfaces.enp0s25.useDHCP = true;
networking.interfaces.wlp3s0.useDHCP = true;
networking.interfaces.wwp0s20u4i6.useDHCP = true;
# ssh
services.openssh.enable = false;
services.sshd.enable = false;
services.openssh.allowSFTP = true;
# enable virtualbox
# virtualisation.virtualbox.host.enable = false;
# users.extraGroups.vboxusers.members = [ "david" ];
virtualisation.docker.enable = true;
# Select internationalisation properties.
i18n = {
defaultLocale = "de_DE.UTF-8";
};
console = {
font = "Lat2-Terminus16";
keyMap = "de-latin1-nodeadkeys";
};
# Set your time zone.
time.timeZone = "Europe/Berlin";
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
wget
vim
firefox
chromium
clipmenu
pulseaudio
networkmanagerapplet
pidgin-with-plugins
thunderbird
mc
nmap
wine
tmux
nmon
bmon
htop
python
python3
atom
git
git-cola
go
qbittorrent
remmina
green-pdfviewer
pavucontrol
unzip
filezilla
autorandr
shutter
w3m
weechat
rxvt_unicode
rofi
];
environment.pathsToLink = [ "/libexec" ];
environment.variables.EDITOR = "urxvt";
fonts.fonts = with pkgs; [
hermit
source-code-pro
terminus_font
];
# 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:
networking.firewall.enable = true;
# Enable CUPS to print documents.
services.printing.enable = true;
# Enable sound.
sound.enable = true;
hardware.pulseaudio.enable = true;
hardware.opengl.driSupport32Bit = true;
# Enable the X11 windowing system.
services.xserver.enable = true;
services.xserver.autorun = true;
services.xserver.layout = "de";
# services.xserver.xkbVariant = "neo";
services.xserver.xkbOptions = "eurosign:e";
# Enable touchpad support.
services.xserver.libinput.enable = true;
nixpkgs.config.packageOverrides = pkgs: {
vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; };
};
nixpkgs.config = {
allowUnfree = true;
firefox = {
enableAdobeFlash = false;
};
#chromium = {
# enablePepperFlash = true; # Chromium removed support for Mozilla (NPAPI) plugins so Adobe Flash no longer works
#};
};
hardware.opengl = {
enable = true;
extraPackages = with pkgs; [
vaapiIntel
vaapiVdpau
libvdpau-va-gl
intel-media-driver # only available starting nixos-19.03 or the current nixos-unstable
];
};
# enable lightdm and i3
services.xserver.displayManager.lightdm.enable = true;
services.xserver.desktopManager = {
plasma5.enable = false;
xterm.enable = false;
};
# i3
services.xserver.windowManager = {
i3 = {
enable = true;
# Packages to be installed with i3
extraPackages = with pkgs; [
dmenu
i3status
i3lock
i3blocks
];
};
};
# Define a user account. Don't forget to set a password with ‘passwd’.
users.users.david = {
isNormalUser = true;
extraGroups = [ "wheel" "networkmanager" "docker"]; # Enable ‘sudo’ for the user.
};
system.stateVersion = "21.05";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment