Commit c61c1b969327
Changed files (15)
configuration/acpi.nix
@@ -0,0 +1,26 @@
+{ config, pkgs, ... }:
+
+{
+ environment.systemPackages = with pkgs; [
+ acpi
+ lm_sensors
+ ];
+
+ services = {
+ acpid = {
+ enable = true;
+ lidEventCommands = ''
+if grep -q closed /proc/acpi/button/lid/LID/state; then
+ date >> /tmp/i3lock.log
+ DISPLAY=":0.0" XAUTHORITY=/home/fadenb/.Xauthority ${pkgs.i3lock}/bin/i3lock &>> /tmp/i3lock.log
+fi
+'';
+ };
+ tlp = {
+ enable = true;
+ extraConfig = ''
+DISK_DEVICES="nvme0n1p3"
+ '';
+ };
+ };
+}
audio.nix → configuration/audio.nix
File renamed without changes
configuration/common.nix
@@ -0,0 +1,46 @@
+{ configs, pkgs, ...}:
+
+# This is the common configuration shared by any of my machine
+# You should include it in `configuration.nix`.
+
+{
+ imports =
+ [ # Include the results of the hardware scan.
+ ./keyboard.nix
+ ./acpi.nix
+ ./network.nix
+ ./audio.nix
+ ./gui.nix
+ ./virtualisation.nix
+ ./security.nix
+ ./users.nix
+ ./packages.nix
+ ];
+ boot.loader.systemd-boot.enable = true;
+ boot.loader.efi.canTouchEfiVariables = true;
+ boot.kernelPackages = pkgs.linuxPackages_4_8;
+ i18n = {
+ consoleFont = "Lat2-Terminus16";
+ consoleKeyMap = "fr";
+ defaultLocale = "en_US.UTF-8";
+ };
+
+ time.timeZone = "Europe/Paris";
+
+ system = {
+ stateVersion = "16.09";
+ autoUpgrade = {
+ enable = true;
+ dates = "13:00";
+ };
+ };
+
+ nix = {
+ useSandbox = true;
+ };
+ nixpkgs = {
+ config = {
+ allowUnfree = true;
+ };
+ };
+}
gui.nix → configuration/gui.nix
@@ -3,7 +3,6 @@
{
environment = {
systemPackages = with pkgs; [
- compton
dmenu2
dunst
emacs
@@ -28,11 +27,7 @@
xserver = {
enable = true;
enableTCP = false;
- synaptics = {
- enable = true;
- twoFingerScroll = true;
- tapButtons = true;
- };
+ libinput.enable = true;
windowManager = {
i3 = {
enable = true;
@@ -41,7 +36,7 @@
};
displayManager = {
sessionCommands = ''
-compton &
+xrandr --dpi 128 &
${pkgs.xlibs.xmodmap}/bin/xmodmap ~/.Xmodmap &
#xss-lock -- ${pkgs.slim}/bin/slimlock &
${pkgs.networkmanagerapplet}/bin/nm-applet &
keyboard.nix → configuration/keyboard.nix
@@ -25,6 +25,13 @@
Driver "evdev"
Option "XkbLayout" "fr"
Option "XkbVariant" "bepo"
+ ''
+ ''
+ Identifier "evdev touchpad off"
+ MatchIsTouchpad "on"
+ MatchDevicePath "/dev/input/event*"
+ Driver "evdev"
+ Option "Ignore" "true"
''
];
};
network.nix → configuration/network.nix
File renamed without changes
packages.nix → configuration/packages.nix
File renamed without changes
security.nix → configuration/security.nix
File renamed without changes
users.nix → configuration/users.nix
File renamed without changes
virtualisation.nix → configuration/virtualisation.nix
File renamed without changes
acpi.nix
@@ -1,17 +0,0 @@
-{ config, pkgs, ... }:
-
-{
- environment.systemPackages = with pkgs; [
- acpi
- lm_sensors
- ];
-
- services = {
- acpid = {
- enable = true;
- };
- };
- powerManagement = {
- enable = true;
- };
-}
configuration.nix
@@ -0,0 +1,1 @@
+wakasu.nix
\ No newline at end of file
configuration.nix
@@ -1,47 +0,0 @@
-{ config, pkgs, ... }:
-
-{
- imports =
- [ # Include the results of the hardware scan.
- ./hardware-configuration.nix
- ./keyboard.nix
- ./acpi.nix
- ./network.nix
- ./audio.nix
- ./gui.nix
- ./virtualisation.nix
- ./security.nix
- ./users.nix
- ./packages.nix
- ./local-configuration.nix
- ];
-
- boot.loader.systemd-boot.enable = true;
- boot.loader.efi.canTouchEfiVariables = true;
- boot.kernelPackages = pkgs.linuxPackages_4_8;
-
- i18n = {
- consoleFont = "Lat2-Terminus16";
- consoleKeyMap = "fr";
- defaultLocale = "en_US.UTF-8";
- };
-
- time.timeZone = "Europe/Paris";
-
- system = {
- stateVersion = "16.09";
- autoUpgrade = {
- enable = true;
- dates = "13:00";
- };
- };
-
- nix = {
- useSandbox = true;
- };
- nixpkgs = {
- config = {
- allowUnfree = true;
- };
- };
-}
thinkpad-t460s-configuration.nix
@@ -0,0 +1,31 @@
+{ config, pkgs, ... }:
+
+{
+ services.xserver = {
+ synaptics.enable = false;
+
+ config = ''
+ Section "InputClass"
+ Identifier "Enable libinput for TrackPoint"
+ MatchIsPointer "on"
+ Driver "libinput"
+ Option "ScrollMethod" "button"
+ Option "ScrollButton" "8"
+ EndSection
+ '';
+ inputClassSections = [
+ ''
+ Identifier "evdev touchpad off"
+ MatchIsTouchpad "on"
+ MatchDevicePath "/dev/input/event*"
+ Driver "evdev"
+ Option "Ignore" "true"
+ ''
+ ];
+ };
+
+ boot.extraModprobeConfig = ''
+ options snd_hda_intel power_save=1
+ # options i915 enable_rc6=0
+ '';
+}
wakasu.nix
@@ -0,0 +1,13 @@
+{ config, pkgs, ... }:
+
+{
+ imports =
+ [ # Include the results of the hardware scan.
+ ./hardware-configuration.nix
+ ./configuration/common.nix
+ ./thinkpad-t460s-configuration.nix
+ ];
+
+ networking.hostName = "wakasu";
+
+}