2018-09-25 23:09:53 +02:00
|
|
|
|
# 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, ... }:
|
|
|
|
|
|
|
|
|
|
let
|
|
|
|
|
fsOptions = [ "noatime" "ssd" "space_cache" "compress=lzo" ];
|
|
|
|
|
|
|
|
|
|
in {
|
|
|
|
|
imports =
|
|
|
|
|
[ # Include the results of the hardware scan.
|
|
|
|
|
./hardware-configuration.nix
|
|
|
|
|
./packages.nix
|
2018-10-13 19:56:31 +02:00
|
|
|
|
/home/spiollinux/src/nixos-hardware/lenovo/thinkpad/t440s
|
2018-09-25 23:09:53 +02:00
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
# encrypted partitions
|
|
|
|
|
boot.initrd.luks =
|
|
|
|
|
{ devices =
|
2018-10-12 11:08:52 +02:00
|
|
|
|
{ "system".device = "/dev/disk/by-uuid/85154131-b2a8-4ef5-9d74-47429cb267ef";
|
|
|
|
|
"cryptswap".device = "/dev/disk/by-uuid/ac586df6-6332-4809-beb1-f51906a2adaa";
|
2018-09-25 23:09:53 +02:00
|
|
|
|
};
|
2018-10-07 16:49:34 +02:00
|
|
|
|
reusePassphrases = true;
|
2018-09-25 23:09:53 +02:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
fileSystems."/".options = fsOptions ++ [ "subvol=nixos_root" ];
|
|
|
|
|
fileSystems."/home".options = fsOptions ++ [ "subvol=home" ];
|
2018-10-11 15:44:44 +02:00
|
|
|
|
boot.tmpOnTmpfs = true;
|
|
|
|
|
fileSystems."/tmp".fsType = "tmpfs";
|
2018-09-25 23:09:53 +02:00
|
|
|
|
|
|
|
|
|
services.fstrim.enable = true;
|
2018-10-13 19:58:56 +02:00
|
|
|
|
# exfat support
|
|
|
|
|
boot.extraModulePackages = [ config.boot.kernelPackages.exfat-nofuse ];
|
2018-09-25 23:09:53 +02:00
|
|
|
|
|
2018-09-26 14:03:53 +02:00
|
|
|
|
# powermanagement
|
2018-10-11 15:44:44 +02:00
|
|
|
|
services.tlp =
|
|
|
|
|
{ enable = true;
|
|
|
|
|
extraConfig = ''
|
|
|
|
|
SATA_LINKPWR_ON_BAT=medium_power
|
|
|
|
|
SATA_LINKPWR_ON_AC=max_performance
|
|
|
|
|
'';
|
|
|
|
|
};
|
2018-09-25 23:09:53 +02:00
|
|
|
|
|
|
|
|
|
# Use the systemd-boot EFI boot loader.
|
|
|
|
|
boot.loader.systemd-boot.enable = true;
|
|
|
|
|
boot.loader.efi.canTouchEfiVariables = true;
|
|
|
|
|
|
|
|
|
|
networking.hostName = "thinknix";
|
|
|
|
|
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
|
|
|
|
|
|
|
|
|
# Select internationalisation properties.
|
|
|
|
|
i18n = {
|
|
|
|
|
consoleFont = "Lat2-Terminus16";
|
|
|
|
|
consoleKeyMap = "de";
|
|
|
|
|
defaultLocale = "de_DE.UTF-8";
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
# Set your time zone.
|
|
|
|
|
time.timeZone = "Europe/Berlin";
|
|
|
|
|
|
|
|
|
|
# Some programs need SUID wrappers, can be configured further or are
|
|
|
|
|
# started in user sessions.
|
|
|
|
|
programs.bash.enableCompletion = true;
|
|
|
|
|
# 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;
|
|
|
|
|
|
|
|
|
|
# Open ports in the firewall.
|
|
|
|
|
# networking.firewall.allowedTCPPorts = [ ... ];
|
|
|
|
|
# networking.firewall.allowedUDPPorts = [ ... ];
|
|
|
|
|
# Or disable the firewall altogether.
|
|
|
|
|
# networking.firewall.enable = false;
|
|
|
|
|
|
|
|
|
|
networking.networkmanager.enable = true;
|
|
|
|
|
|
2018-10-03 23:48:19 +02:00
|
|
|
|
services.avahi.enable = true;
|
|
|
|
|
|
2018-09-25 23:09:53 +02:00
|
|
|
|
# Enable CUPS to print documents.
|
2018-09-26 15:20:59 +02:00
|
|
|
|
services.printing =
|
|
|
|
|
{ enable = true;
|
|
|
|
|
drivers = [ pkgs.hplip ];
|
|
|
|
|
};
|
|
|
|
|
# scanners
|
|
|
|
|
hardware.sane =
|
|
|
|
|
{ enable = true;
|
|
|
|
|
extraBackends = [ pkgs.hplip ];
|
|
|
|
|
};
|
2018-09-25 23:09:53 +02:00
|
|
|
|
|
|
|
|
|
# Enable sound.
|
|
|
|
|
sound.enable = true;
|
|
|
|
|
hardware.pulseaudio.enable = true;
|
|
|
|
|
|
2018-09-26 15:24:25 +02:00
|
|
|
|
# Bluetooth
|
|
|
|
|
hardware.bluetooth.enable = true;
|
|
|
|
|
hardware.pulseaudio.package = pkgs.pulseaudioFull;
|
|
|
|
|
|
2018-09-25 23:09:53 +02:00
|
|
|
|
# Enable the X11 windowing system.
|
|
|
|
|
services.xserver.enable = true;
|
|
|
|
|
services.xserver.layout = "de";
|
|
|
|
|
services.xserver.xkbOptions = "eurosign:e";
|
|
|
|
|
|
2018-09-26 02:07:43 +02:00
|
|
|
|
services.xserver.videoDrivers = [ "modesetting" "intel" ];
|
2018-09-25 23:09:53 +02:00
|
|
|
|
|
|
|
|
|
# Enable touchpad support.
|
|
|
|
|
services.xserver.libinput.enable = true;
|
|
|
|
|
|
|
|
|
|
# Enable the KDE Desktop Environment.
|
|
|
|
|
services.xserver.displayManager.sddm.enable = true;
|
|
|
|
|
services.xserver.desktopManager.plasma5.enable = true;
|
|
|
|
|
|
|
|
|
|
# Define a user account. Don't forget to set a password with ‘passwd’.
|
|
|
|
|
users.extraUsers.spiollinux = {
|
|
|
|
|
isNormalUser = true;
|
|
|
|
|
uid = 1000;
|
2018-10-02 12:27:34 +02:00
|
|
|
|
extraGroups = [ "vboxusers" "wheel" "networkmanager" "scanner" "lp" "wireshark"];
|
2018-09-25 23:09:53 +02:00
|
|
|
|
shell = pkgs.zsh;
|
|
|
|
|
};
|
|
|
|
|
|
2018-09-26 02:07:43 +02:00
|
|
|
|
programs.zsh =
|
|
|
|
|
{ enable = true;
|
2018-10-07 16:49:34 +02:00
|
|
|
|
autosuggestions.enable = true;
|
2018-09-26 02:07:43 +02:00
|
|
|
|
};
|
2018-09-25 23:09:53 +02:00
|
|
|
|
|
2018-10-13 22:11:30 +02:00
|
|
|
|
services.psd =
|
|
|
|
|
{ enable = true;
|
|
|
|
|
users = ["spiollinux"];
|
|
|
|
|
};
|
|
|
|
|
|
2018-09-26 15:16:04 +02:00
|
|
|
|
services.smartd =
|
|
|
|
|
{ enable = true;
|
|
|
|
|
devices = [ { device = "/dev/sda"; } { device = "/dev/sdb"; } ];
|
|
|
|
|
};
|
|
|
|
|
|
2018-10-13 19:56:31 +02:00
|
|
|
|
# fix nix-env memory issues
|
|
|
|
|
boot.kernel.sysctl."vm.overcommit_memory" = "1";
|
|
|
|
|
# keep build-time deps around for offline-rebuilding
|
|
|
|
|
nix.extraOptions = ''
|
|
|
|
|
gc-keep-outputs = true
|
|
|
|
|
gc-keep-derivations = true
|
|
|
|
|
'';
|
2018-09-25 23:09:53 +02:00
|
|
|
|
|
|
|
|
|
# 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.
|
2018-10-12 11:08:52 +02:00
|
|
|
|
system.stateVersion = "18.09"; # Did you read the comment?
|
2018-09-25 23:09:53 +02:00
|
|
|
|
|
|
|
|
|
}
|