Browse Source

update nixos configs, rm borders in i3

master
arnaucube 1 year ago
parent
commit
7e9a45d336
3 changed files with 85 additions and 1 deletions
  1. +2
    -0
      i3/config
  2. +19
    -1
      nixos/configuration.nix
  3. +64
    -0
      nixos/surface-extra-hardware-configuration.nix

+ 2
- 0
i3/config

@ -171,6 +171,8 @@ bar {
status_command i3status
}
default_border pixel 1
# having installed feh (sudo apt install feh)
exec feh --bg-fill ~/Sync/wallpapers/geometry02_croped1920x1080.png
exec xmodmap .Xmodmap

+ 19
- 1
nixos/configuration.nix

@ -87,6 +87,7 @@
fzf
python3
xfce.thunar
xfce.xfconf # needed to save preferences of thunar
screenfetch
htop
alacritty
@ -97,8 +98,25 @@
chromium
xfce.ristretto
pavucontrol
texlive.combined.scheme-medium # includes latexmk
#pgf-umlsd # latex diagrams
#pgf
(pkgs.texlive.combine {
inherit (pkgs.texlive)
scheme-medium
pgf
;
})
sage
obs-studio
rustup
gcc
go
nodejs
xclip # to make clipboard work in neovim
xfce.xfce4-screenshooter
mpv
xorg.xmodmap
gnupg
];
programs.zsh.enable = true;

+ 64
- 0
nixos/surface-extra-hardware-configuration.nix

@ -3,6 +3,13 @@
{ config, lib, pkgs, modulesPath, ... }:
{
environment.systemPackages = with pkgs; [
obs-studio
rnote
xournalpp
];
# Set an usable key configuration: Ctrl at capslock, Win at Alt, Alt at Ctrl
services.xserver.displayManager.sessionCommands =''
${pkgs.xorg.xmodmap}/bin/xmodmap "${pkgs.writeText "xkb-layout" ''
@ -30,6 +37,63 @@
# add pulseaudio support to manage audio
hardware.pulseaudio.enable = true;
# next sleep & wake is code from: https://github.com/hpfr/system/blob/2e5b3b967b0436203d7add6adbd6b6f55e87cf3c/hosts/linux-surface.nix
systemd.services = {
surface-sleep = {
enable = lib.versionOlder config.boot.kernelPackages.kernel.version "5.4";
before = [ "suspend.target" ];
wantedBy = [ "suspend.target" ];
serviceConfig.Type = "oneshot";
path = with pkgs; [ procps kmod bluez ];
script = ''
# Disable bluetooth if no device is connected
if ps cax | grep bluetoothd && ! bluetoothctl info; then
bluetoothctl power off
fi
## Disable bluetooth regardless if devices are connected (see notes below)
# if ps cax | grep bluetoothd; then
# bluetoothctl power off
# fi
## > Remove IPTS from ME side
modprobe -r ipts_surface
modprobe -r intel_ipts
# modprobe -r mei_hdcp
modprobe -r mei_me
modprobe -r mei
## > Remove IPTS from i915 side
for i in $(find /sys/kernel/debug/dri -name i915_ipts_cleanup); do
echo 1 > $i
done
'';
};
surface-wake = {
enable = lib.versionOlder config.boot.kernelPackages.kernel.version "5.4";
after = [ "post-resume.target" ];
wantedBy = [ "post-resume.target" ];
serviceConfig.Type = "oneshot";
path = with pkgs; [ procps kmod bluez ];
script = ''
## > Load IPTS from i915 side
for i in $(find /sys/kernel/debug/dri -name i915_ipts_init); do
echo 1 > $i
done
## > Load IPTS from ME side
modprobe mei
modprobe mei_me
# modprobe mei_hdcp
modprobe intel_ipts
modprobe ipts_surface
# Restart bluetooth
if ps cax | grep bluetoothd; then
bluetoothctl power on
fi
'';
};
};
## NOTES:
# Susspend issue:
# https://github.com/linux-surface/linux-surface/wiki/Known-Issues-and-FAQ#suspend-aka-sleep-vs-lid-closingopening-events

Loading…
Cancel
Save