autorandr: deterministic and applies for LigthDM
This commit is contained in:
parent
f72112f332
commit
7b9d9053bf
6 changed files with 78 additions and 7 deletions
21
os/desktop/autorandr.nix
Normal file
21
os/desktop/autorandr.nix
Normal file
|
@ -0,0 +1,21 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
let
|
||||
setupScript = "${pkgs.writeShellApplication {
|
||||
name = "greeter-setup-script";
|
||||
runtimeInputs = [ pkgs.autorandr ];
|
||||
text = ''
|
||||
autorandr --change
|
||||
'';
|
||||
}}/bin/greeter-setup-script";
|
||||
in
|
||||
{
|
||||
config = {
|
||||
services = {
|
||||
autorandr.enable = true;
|
||||
xserver.displayManager.lightdm.extraConfig = ''
|
||||
[Seat:*]
|
||||
display-setup-script = ${setupScript}
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
51
os/desktop/default.nix
Normal file
51
os/desktop/default.nix
Normal file
|
@ -0,0 +1,51 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
{
|
||||
config = lib.mkIf config.frogeye.desktop.xorg {
|
||||
services = {
|
||||
blueman.enable = true;
|
||||
displayManager.defaultSession = "none+i3";
|
||||
xserver = {
|
||||
enable = true;
|
||||
windowManager.i3.enable = true;
|
||||
|
||||
# Keyboard layout
|
||||
xkb = {
|
||||
extraLayouts.qwerty-fr = {
|
||||
description = "QWERTY-fr";
|
||||
languages = [ "fr" ];
|
||||
symbolsFile = "${pkgs.stdenv.mkDerivation {
|
||||
name = "qwerty-fr-keypad";
|
||||
src = builtins.fetchGit {
|
||||
url = "https://github.com/qwerty-fr/qwerty-fr.git";
|
||||
rev = "3a4d13089e8ef016aa20baf6b2bf3ea53de674b8";
|
||||
};
|
||||
patches = [ ./qwerty-fr-keypad.diff ];
|
||||
# TODO This doesn't seem to be applied... it's the whole point of the derivation :(
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
mkdir -p $out/linux
|
||||
cp $src/linux/us_qwerty-fr $out/linux
|
||||
runHook postInstall
|
||||
'';
|
||||
}}/linux/us_qwerty-fr";
|
||||
};
|
||||
layout = "qwerty-fr";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Enable sound & bluetooth
|
||||
sound.enable = true;
|
||||
hardware = {
|
||||
bluetooth.enable = true;
|
||||
pulseaudio.enable = true;
|
||||
# TODO Try pipewire
|
||||
};
|
||||
|
||||
# So we can use gnome3 pinentry flavour
|
||||
services.dbus.packages = [ pkgs.gcr ];
|
||||
};
|
||||
imports = [
|
||||
./autorandr.nix
|
||||
];
|
||||
}
|
10
os/desktop/qwerty-fr-keypad.diff
Normal file
10
os/desktop/qwerty-fr-keypad.diff
Normal file
|
@ -0,0 +1,10 @@
|
|||
--- ./linux/us_qwerty-fr
|
||||
+++ ./linux/us_qwerty-fr
|
||||
@@ -4,6 +4,7 @@
|
||||
{
|
||||
include "us(basic)"
|
||||
include "level3(ralt_switch)"
|
||||
+ include "keypad(oss)"
|
||||
|
||||
name[Group1]= "US keyboard with french symbols - AltGr combination";
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue