sway
This commit is contained in:
parent
492f085d52
commit
bb021a1aae
30 changed files with 487 additions and 573 deletions
|
@ -1,29 +0,0 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
{
|
||||
config = lib.mkIf (builtins.length config.frogeye.desktop.x11_screens > 1) {
|
||||
services = {
|
||||
autorandr.enable = true;
|
||||
xserver.displayManager.lightdm.extraConfig =
|
||||
let
|
||||
setupScript = "${
|
||||
pkgs.writeShellApplication {
|
||||
name = "greeter-setup-script";
|
||||
runtimeInputs = [ pkgs.autorandr ];
|
||||
text = ''
|
||||
autorandr --change
|
||||
'';
|
||||
}
|
||||
}/bin/greeter-setup-script";
|
||||
in
|
||||
''
|
||||
[Seat:*]
|
||||
display-setup-script = ${setupScript}
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
|
@ -7,10 +7,23 @@
|
|||
{
|
||||
config = lib.mkIf config.frogeye.desktop.xorg {
|
||||
boot.kernelModules = [ "i2c-dev" ]; # Allows using ddcutil
|
||||
programs.sway.enable = true;
|
||||
security.rtkit.enable = true; # Recommended for pipewire
|
||||
services = {
|
||||
blueman.enable = true;
|
||||
displayManager.defaultSession = "none+i3";
|
||||
greetd = {
|
||||
enable = true;
|
||||
settings = rec {
|
||||
# Automatically log in as myself.
|
||||
# Because everything is encrypted and I'm the only user, this is fine.
|
||||
initial_session = {
|
||||
command = "${lib.getExe config.programs.sway.package} --unsupported-gpu";
|
||||
# --unsupported-gpu is for curacao (DisplayLink)
|
||||
user = "geoffrey";
|
||||
};
|
||||
default_session = initial_session;
|
||||
};
|
||||
};
|
||||
udev.packages = with pkgs; [ ddcutil ]; # TODO Doesn't seem to help
|
||||
pipewire = {
|
||||
enable = true;
|
||||
|
@ -34,40 +47,20 @@
|
|||
];
|
||||
};
|
||||
};
|
||||
# Video
|
||||
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 = pkgs.fetchFromGitHub {
|
||||
owner = "qwerty-fr";
|
||||
repo = "qwerty-fr";
|
||||
rev = "3a4d13089e8ef016aa20baf6b2bf3ea53de674b8";
|
||||
sha256 = "sha256-wn5n6jJVDrQWJze8xYF2nEY8a7mHI3hVO4xsT4LMo9c=";
|
||||
};
|
||||
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";
|
||||
};
|
||||
# Keyboard layout
|
||||
xserver.xkb.extraLayouts.us_qwerty-fr = {
|
||||
description = "QWERTY-fr";
|
||||
languages = [
|
||||
"fre"
|
||||
"eng"
|
||||
];
|
||||
symbolsFile = "${
|
||||
pkgs.qwerty-fr.overrideAttrs (old: {
|
||||
patches = (old.patches or [ ]) ++ [ ./qwerty-fr-keypad.diff ];
|
||||
# TODO Does this work?
|
||||
})
|
||||
}/share/X11/xkb/symbols/us_qwerty-fr";
|
||||
};
|
||||
# Disco
|
||||
};
|
||||
|
||||
# Enable sound & bluetooth
|
||||
|
@ -76,7 +69,4 @@
|
|||
# So we can use gnome3 pinentry flavour
|
||||
services.dbus.packages = [ pkgs.gcr ];
|
||||
};
|
||||
imports = [
|
||||
./autorandr.nix
|
||||
];
|
||||
}
|
||||
|
|
|
@ -49,9 +49,6 @@
|
|||
|
||||
# Fix https://nix-community.github.io/home-manager/index.html#_why_do_i_get_an_error_message_about_literal_ca_desrt_dconf_literal_or_literal_dconf_service_literal
|
||||
programs.dconf.enable = true;
|
||||
|
||||
# Because everything is encrypted and I'm the only user, this is fine.
|
||||
services.displayManager.autoLogin.user = "geoffrey";
|
||||
};
|
||||
imports = [
|
||||
home-manager.nixosModules.home-manager
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue