*: add config
This commit is contained in:
commit
80c42c7e45
22 changed files with 3229 additions and 0 deletions
140
configuration/steveej-laptop/system.nix
Normal file
140
configuration/steveej-laptop/system.nix
Normal file
|
@ -0,0 +1,140 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
nix.binaryCachePublicKeys = [ "hydra.nixos.org-1:CNHJZBh9K4tP3EKF6FkkgeVYsS3ohTl+oS0Qa8bezVs=" ];
|
||||
nix.binaryCaches = [
|
||||
"https://cache.nixos.org"
|
||||
"http://hydra.nixos.org"
|
||||
];
|
||||
nix.trustedBinaryCaches = [
|
||||
"https://cache.nixos.org"
|
||||
"http://hydra.nixos.org"
|
||||
];
|
||||
|
||||
# The NixOS release to be compatible with for stateful data such as databases.
|
||||
# system.stateVersion = "unstable";
|
||||
networking.hostName = "steveej-laptop"; # Define your hostname.
|
||||
|
||||
networking.firewall.enable = false;
|
||||
networking.networkmanager = {
|
||||
enable = true;
|
||||
unmanaged = [
|
||||
"interface-name:veth*"
|
||||
"interface-name:virbr*"
|
||||
"interface-name:br*"
|
||||
"interface-name:*vbox*"
|
||||
"interface-name:*cni*"
|
||||
];
|
||||
};
|
||||
|
||||
programs.bash = {
|
||||
enableCompletion = true;
|
||||
promptInit = ''
|
||||
if test "$TERM" != "dumb"; then
|
||||
# Provide a nice prompt.
|
||||
BLUE="\[\033[0;34m\]"
|
||||
RED="\[\033[1;31m\]"
|
||||
GREEN="\[\033[1;32m\]"
|
||||
NO_COLOR="\[\033[0m\]"
|
||||
|
||||
PROMPT_COLOR=$RED
|
||||
let $UID && PROMPT_COLOR=$GREEN
|
||||
PS1=" $BLUE\W/ $PROMPT_COLOR\\$ $NO_COLOR"
|
||||
if test "$TERM" = "xterm"; then
|
||||
PS1="\[\033]2;\h:\u:\w\007\]$PS1"
|
||||
fi
|
||||
fi
|
||||
'';
|
||||
};
|
||||
|
||||
# Package configuration
|
||||
environment.systemPackages = with pkgs; [
|
||||
xorg.xmodmap
|
||||
];
|
||||
|
||||
environment.sessionVariables = {
|
||||
EDITOR = "vim";
|
||||
NIXPKGS_ALLOW_UNFREE = "1";
|
||||
|
||||
# Don't create .pyc files.
|
||||
PYTHONDONTWRITEBYTECODE = "1";
|
||||
};
|
||||
|
||||
environment.etc."lvm/lvm.conf".text = ''
|
||||
devices {
|
||||
issue_discards = 1
|
||||
}
|
||||
'';
|
||||
|
||||
# Fonts, I18N, Date ...
|
||||
fonts = {
|
||||
enableCoreFonts = true;
|
||||
};
|
||||
|
||||
i18n = {
|
||||
consoleFont = "lat9w-16";
|
||||
defaultLocale = "en_US.UTF-8";
|
||||
};
|
||||
time.timeZone = "Europe/Berlin";
|
||||
|
||||
# Services
|
||||
services.gpm.enable = true;
|
||||
services.openssh.enable = true;
|
||||
services.openssh.permitRootLogin = "yes";
|
||||
|
||||
services.teamviewer.enable = true;
|
||||
|
||||
services.printing.enable = true; # uses cups
|
||||
services.xserver = {
|
||||
synaptics.enable = true;
|
||||
videoDrivers = [ "qxl" "intel" ];
|
||||
enable = true;
|
||||
layout = "us";
|
||||
|
||||
windowManager.qtile.enable = true;
|
||||
windowManager.default = "qtile";
|
||||
desktopManager = {
|
||||
xterm.enable = false;
|
||||
xfce.enable = true;
|
||||
};
|
||||
|
||||
displayManager = {
|
||||
slim = {
|
||||
enable = true;
|
||||
theme = /home/steveej/src/github/steveej/nixos-slim-theme;
|
||||
# theme = pkgs.fetchurl {
|
||||
# url = "mirror://sourceforge/project/slim.berlios/slim-rear-window.tar.gz";
|
||||
# sha256 = "04cmwdgcvxd3srhwcnqmmfdj0avkql7570y14vv98zmnrh33f4hb";
|
||||
# };
|
||||
# autoLogin = {
|
||||
# enable = true;
|
||||
# user = "steveej";
|
||||
# delay = 0;
|
||||
# };
|
||||
};
|
||||
sessionCommands = ''
|
||||
xscreensaver -no-splash &
|
||||
${pkgs.networkmanagerapplet}/bin/nm-applet &
|
||||
$(sleep 2; xmodmap /home/steveej/.Xmodmap) &
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
services.udev.extraRules = ''
|
||||
# OnePlusOne
|
||||
ATTR{idVendor}=="05c6", ATTR{idProduct}=="6764", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1", TAG+="uaccess"
|
||||
ATTR{idVendor}=="05c6", ATTR{idProduct}=="6765", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1", TAG+="uaccess"
|
||||
'';
|
||||
|
||||
hardware = {
|
||||
bluetooth.enable = true;
|
||||
pulseaudio = {
|
||||
enable = true;
|
||||
package = pkgs.pulseaudioFull;
|
||||
support32Bit = true;
|
||||
};
|
||||
};
|
||||
|
||||
virtualisation.libvirtd.enable = true;
|
||||
virtualisation.virtualbox.host.enable = true;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue