2019-08-24 13:12:32 +02:00
|
|
|
|
# Import unstable and home-manager channels:
|
|
|
|
|
# sudo nix-channel --add http://nixos.org/channels/nixos-unstable nixos-unstable
|
2019-10-19 09:14:56 +02:00
|
|
|
|
# sudo nix-channel --add https://github.com/rycee/home-manager/archive/release-19.09.tar.gz home-manager
|
2019-08-24 13:12:32 +02:00
|
|
|
|
# sudo nix-channel --update
|
|
|
|
|
|
|
|
|
|
{ config, pkgs, ... }:
|
|
|
|
|
|
|
|
|
|
let
|
2019-08-27 00:46:15 +02:00
|
|
|
|
unstable = import <nixos-unstable> {
|
|
|
|
|
config = removeAttrs config.nixpkgs.config [ "packageOverrides" ];
|
|
|
|
|
};
|
2019-08-24 13:12:32 +02:00
|
|
|
|
in
|
|
|
|
|
{
|
|
|
|
|
imports =
|
|
|
|
|
[ # Include the results of the hardware scan.
|
|
|
|
|
./hardware-configuration.nix
|
|
|
|
|
<home-manager/nixos>
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
# configure unfree and unstable packages
|
|
|
|
|
nixpkgs.config.allowUnfree = true;
|
|
|
|
|
|
|
|
|
|
nixpkgs.overlays = [
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
# Use the systemd-boot EFI boot loader.
|
|
|
|
|
boot.initrd.luks.devices = [
|
|
|
|
|
{
|
|
|
|
|
name = "root";
|
2019-10-18 20:07:40 +02:00
|
|
|
|
device = "/dev/disk/by-partlabel/nixos";
|
2019-08-24 13:12:32 +02:00
|
|
|
|
preLVM = true;
|
|
|
|
|
allowDiscards = true;
|
|
|
|
|
}
|
|
|
|
|
];
|
2019-10-19 09:14:56 +02:00
|
|
|
|
boot.kernelPackages = pkgs.linuxPackages_latest;
|
|
|
|
|
# boot.kernelPackages = pkgs.linuxPackages_5_2;
|
2019-08-24 13:12:32 +02:00
|
|
|
|
boot.loader.systemd-boot.enable = true;
|
2019-10-19 09:14:56 +02:00
|
|
|
|
boot.loader.efi.canTouchEfiVariables = true;
|
2019-08-24 13:12:32 +02:00
|
|
|
|
|
|
|
|
|
networking.hostName = "felix-nixos"; # Define your hostname.
|
|
|
|
|
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
|
|
|
|
|
|
|
|
|
# Select internationalisation properties.
|
|
|
|
|
i18n = {
|
|
|
|
|
consoleFont = "Lat2-Terminus16";
|
|
|
|
|
consoleKeyMap = "uk";
|
|
|
|
|
defaultLocale = "en_GB.UTF-8";
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
# 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
|
|
|
|
|
curl
|
|
|
|
|
networkmanager
|
|
|
|
|
neovim
|
2019-10-19 09:14:56 +02:00
|
|
|
|
gnome3.gnome-tweaks
|
2019-08-24 13:12:32 +02:00
|
|
|
|
gnomeExtensions.dash-to-panel
|
|
|
|
|
gnomeExtensions.topicons-plus
|
|
|
|
|
];
|
|
|
|
|
|
2019-08-26 23:16:14 +02:00
|
|
|
|
# Use noto fonts with emoji support
|
2019-10-19 09:14:56 +02:00
|
|
|
|
fonts.enableDefaultFonts = true;
|
2019-08-26 23:16:14 +02:00
|
|
|
|
|
2019-08-24 13:12:32 +02:00
|
|
|
|
# Enable CUPS to print documents.
|
|
|
|
|
services.printing.enable = true;
|
|
|
|
|
|
2019-10-19 09:14:56 +02:00
|
|
|
|
hardware.bluetooth.enable = true;
|
|
|
|
|
hardware.bluetooth.extraConfig = "
|
|
|
|
|
[General]
|
|
|
|
|
Enable=Source,Sink,Media,Socket
|
|
|
|
|
";
|
|
|
|
|
|
2019-08-24 13:12:32 +02:00
|
|
|
|
# Enable sound.
|
|
|
|
|
sound.enable = true;
|
2019-10-19 09:14:56 +02:00
|
|
|
|
hardware.pulseaudio = {
|
|
|
|
|
enable = true;
|
|
|
|
|
extraModules = [ pkgs.pulseaudio-modules-bt ];
|
|
|
|
|
support32Bit = true;
|
|
|
|
|
package = pkgs.pulseaudioFull;
|
|
|
|
|
};
|
2019-08-24 13:12:32 +02:00
|
|
|
|
|
|
|
|
|
# NVIDIA drivers
|
|
|
|
|
services.xserver.videoDrivers = [ "nvidia" ];
|
|
|
|
|
hardware.opengl.driSupport32Bit = true;
|
|
|
|
|
|
|
|
|
|
# Enable special device support
|
|
|
|
|
hardware.ledger.enable = true;
|
|
|
|
|
hardware.u2f.enable = true;
|
2019-10-19 09:14:56 +02:00
|
|
|
|
services.udev.extraRules = ''
|
|
|
|
|
# Nano S
|
|
|
|
|
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2c97", ATTRS{idProduct}=="0001|1000|1001|1002|1003|1004|1005|1006|1007|1008|1009|100a|100b|100c|100d|100e|100f|1010|1011|1012|1013|1014|1015|1016|1017|1018|1019|101a|101b|101c|101d|101e|101f", TAG+="uaccess", TAG+="udev-acl"
|
|
|
|
|
'';
|
2019-08-24 13:12:32 +02:00
|
|
|
|
|
|
|
|
|
# Enable the X11 windowing system.
|
|
|
|
|
services.xserver.enable = true;
|
|
|
|
|
services.xserver.layout = "gb";
|
|
|
|
|
services.xserver.xkbOptions = "eurosign:e";
|
|
|
|
|
|
|
|
|
|
# Enable Gnome 3
|
|
|
|
|
services.xserver.displayManager.gdm.enable = true;
|
|
|
|
|
services.xserver.displayManager.gdm.wayland = false;
|
|
|
|
|
services.xserver.desktopManager.gnome3.enable = true;
|
|
|
|
|
services.dbus.packages = with pkgs; [
|
|
|
|
|
gnome3.dconf gnome2.GConf
|
|
|
|
|
];
|
|
|
|
|
environment.gnome3.excludePackages = with pkgs; [
|
2019-10-19 09:14:56 +02:00
|
|
|
|
gnome3.geary
|
2019-08-24 13:12:32 +02:00
|
|
|
|
gnome3.gnome-weather
|
|
|
|
|
gnome3.gnome-calendar
|
|
|
|
|
gnome3.gnome-maps
|
|
|
|
|
gnome3.gnome-contacts
|
|
|
|
|
gnome3.gnome-software
|
|
|
|
|
gnome3.gnome-packagekit
|
|
|
|
|
gnome3.epiphany
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
# Define a user account. Don't forget to set a password with ‘passwd’.
|
|
|
|
|
users.users.felschr = {
|
|
|
|
|
isNormalUser = true;
|
|
|
|
|
extraGroups = [ "wheel" "audio" ]; # Enable ‘sudo’ for the user.
|
|
|
|
|
shell = pkgs.fish;
|
|
|
|
|
};
|
|
|
|
|
home-manager.users.felschr = import ./home/felschr.nix;
|
|
|
|
|
|
|
|
|
|
# This value determines the NixOS release with which your system is to be
|
|
|
|
|
# compatible, in order to avoid breaking some software such as database
|
|
|
|
|
# servers. You should change this only after NixOS release notes say you
|
|
|
|
|
# should.
|
2019-10-19 09:14:56 +02:00
|
|
|
|
system.stateVersion = "19.09"; # Did you read the comment?
|
|
|
|
|
|
|
|
|
|
system.autoUpgrade.enable = true;
|
2019-08-24 13:12:32 +02:00
|
|
|
|
|
2019-10-19 09:14:56 +02:00
|
|
|
|
nix.gc.automatic = true;
|
|
|
|
|
nix.autoOptimiseStore = true;
|
2019-08-24 13:12:32 +02:00
|
|
|
|
}
|