modules/laptop-config: refactor
This commit is contained in:
parent
c756aa886b
commit
502ed1151a
1 changed files with 12 additions and 33 deletions
|
@ -1,36 +1,15 @@
|
||||||
{ pkgs, lib, ... }:
|
{ lib, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
programs.dconf.profiles.gdm = lib.mkForce (let
|
programs.dconf.profiles.gdm.databases = [
|
||||||
customDconf = pkgs.writeTextFile {
|
{
|
||||||
name = "gdm-dconf-touchpad";
|
settings."org/gnome/desktop/peripherals/touchpad" = {
|
||||||
destination = "/dconf/gdm-custom";
|
edge-scrolling-enabled = false;
|
||||||
text = ''
|
natural-scroll = false;
|
||||||
[org/gnome/desktop/peripherals/touchpad]
|
speed= lib.gvariant.mkDouble 0.375;
|
||||||
edge-scrolling-enabled=false
|
tap-to-click = true;
|
||||||
natural-scroll=false
|
two-finger-scrolling-enabled = true;
|
||||||
speed=0.375
|
};
|
||||||
tap-to-click=true
|
}
|
||||||
two-finger-scrolling-enabled=true
|
];
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
customDconfDb = pkgs.stdenv.mkDerivation {
|
|
||||||
name = "gdm-dconf-db";
|
|
||||||
buildCommand = ''
|
|
||||||
${pkgs.dconf}/bin/dconf compile $out ${customDconf}/dconf
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
in pkgs.stdenv.mkDerivation {
|
|
||||||
name = "dconf-gdm-profile";
|
|
||||||
buildCommand = with { gdm = pkgs.gnome.gdm; }; ''
|
|
||||||
# Check that the GDM profile starts with what we expect.
|
|
||||||
if [ $(head -n 1 ${gdm}/share/dconf/profile/gdm) != "user-db:user" ]; then
|
|
||||||
echo "GDM dconf profile changed, please update gdm.nix"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
# Insert our custom DB behind it.
|
|
||||||
sed '2ifile-db:${customDconfDb}' ${gdm}/share/dconf/profile/gdm > $out
|
|
||||||
'';
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue