Swap to sway
This commit is contained in:
parent
470983b32e
commit
c2bd235753
|
@ -23,8 +23,7 @@
|
|||
# TeX
|
||||
texlive.combined.scheme-full
|
||||
|
||||
(firefox.override { cfg.enablePlasmaBrowserIntegration = true; })
|
||||
plasma-browser-integration
|
||||
firefox-wayland
|
||||
|
||||
# Java & sbt
|
||||
openjdk11
|
||||
|
@ -32,27 +31,55 @@
|
|||
]);
|
||||
|
||||
# Graphical set up
|
||||
linux.graphical.type = "x11";
|
||||
linux.graphical.type = "wayland";
|
||||
linux.graphical.wallpaper = ./images/wallpaper_0.png;
|
||||
# Enable sway
|
||||
# programs.my-sway.enable = true;
|
||||
# programs.my-sway.fontSize = 14.0;
|
||||
# programs.my-sway.terminal = "${config.programs.kitty.package}/bin/kitty";
|
||||
# Keyboard support
|
||||
# wayland.windowManager.sway.config = {
|
||||
# input."1278:34:HHKB-Hybrid_3_Keyboard".xkb_layout = "jp";
|
||||
# input."1:1:AT_Translated_Set_2_keyboard" = {
|
||||
# xkb_options = "ctrl:swapcaps";
|
||||
# xkb_layout = "us";
|
||||
# };
|
||||
# };
|
||||
programs.my-sway.enable = true;
|
||||
programs.my-sway.fontSize = 20.0;
|
||||
programs.my-sway.enableLaptopBars = true;
|
||||
programs.my-sway.enableMpd = false;
|
||||
programs.my-sway.discord = null;
|
||||
# Keyboard options
|
||||
wayland.windowManager.sway.config.input."type:keyboard".xkb_layout = "jp";
|
||||
wayland.windowManager.sway.config.output."Unknown-1" = {
|
||||
mode = "2560x1600@60Hz";
|
||||
scale = "1";
|
||||
subpixel = "vrgb";
|
||||
};
|
||||
wayland.windowManager.sway.config.input."1452:641:Apple_Internal_Keyboard_/_Trackpad" = {
|
||||
# Keyboard stuff
|
||||
xkb_layout = "jp";
|
||||
repeat_delay = "300";
|
||||
repeat_rate = "10";
|
||||
# Trackpad stuff
|
||||
accel_profile = "adaptive";
|
||||
drag = "enabled";
|
||||
dwt = "enabled";
|
||||
middle_emulation = "enabled";
|
||||
natural_scroll = "enabled";
|
||||
pointer_accel = "0.5";
|
||||
tap = "disabled";
|
||||
};
|
||||
|
||||
# Kitty
|
||||
nki.programs.kitty = {
|
||||
enable = true;
|
||||
fontSize = 16;
|
||||
fontSize = 22;
|
||||
enableTabs = true;
|
||||
};
|
||||
|
||||
# Yellow light!
|
||||
services.wlsunset = {
|
||||
enable = true;
|
||||
# # Waterloo
|
||||
# latitude = "43.3";
|
||||
# longitude = "-80.3";
|
||||
|
||||
# Lausanne
|
||||
latitude = "46.31";
|
||||
longitude = "6.38";
|
||||
};
|
||||
|
||||
home.file.".gnupg/gpg-agent.conf" = {
|
||||
text = ''
|
||||
pinentry-program ${pkgs.pinentry-gnome}/bin/pinentry-gnome3
|
||||
|
@ -63,6 +90,12 @@
|
|||
'';
|
||||
};
|
||||
|
||||
# Autostart
|
||||
xdg.configFile."autostart/polkit.desktop".text = ''
|
||||
${builtins.readFile "${pkgs.pantheon.pantheon-agent-polkit}/etc/xdg/autostart/io.elementary.desktop.agent-polkit.desktop"}
|
||||
OnlyShowIn=sway;
|
||||
'';
|
||||
|
||||
# Multiple screen setup
|
||||
# services.kanshi = {
|
||||
# enable = true;
|
||||
|
|
|
@ -61,6 +61,16 @@ in
|
|||
description = "The command to the terminal emulator to be used";
|
||||
default = "${config.programs.kitty.package}/bin/kitty";
|
||||
};
|
||||
browser = mkOption {
|
||||
type = types.str;
|
||||
description = "The command for the browser";
|
||||
default = "${pkgs.firefox-wayland}/bin/firefox";
|
||||
};
|
||||
discord = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
description = "The command for discord";
|
||||
default = "${pkgs.discord}/bin/discord";
|
||||
};
|
||||
|
||||
enableLaptopBars = mkOption {
|
||||
type = types.bool;
|
||||
|
@ -108,9 +118,10 @@ in
|
|||
# Waybar
|
||||
{ command = "systemctl --user restart waybar"; always = true; }
|
||||
# Startup programs
|
||||
{ command = "${config.programs.firefox.package}/bin/firefox"; }
|
||||
{ command = "${pkgs.unstable.discord}/bin/discord"; }
|
||||
];
|
||||
{ command = "${cfg.browser}"; }
|
||||
] ++ (if cfg.discord != null then [
|
||||
{ command = "${cfg.discord}"; }
|
||||
] else [ ]);
|
||||
|
||||
### Keybindings
|
||||
#
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
./m1-support/firmware
|
||||
# Fonts
|
||||
../modules/personal/fonts
|
||||
../modules/services/swaylock.nix
|
||||
# Encrypted DNS
|
||||
../modules/services/edns
|
||||
];
|
||||
|
@ -37,7 +38,9 @@
|
|||
# networking.hostName = "nixos"; # Define your hostname.
|
||||
# Pick only one of the below networking options.
|
||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||
networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
|
||||
# networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
|
||||
networking.wireless.iwd.enable = true;
|
||||
networking.interfaces.wlan0.useDHCP = true;
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "Europe/Zurich";
|
||||
|
@ -64,10 +67,10 @@
|
|||
};
|
||||
|
||||
# Enable the X11 windowing system.
|
||||
services.xserver.enable = true;
|
||||
services.xserver.displayManager.sddm.enable = true;
|
||||
services.xserver.displayManager.sddm.enableHidpi = true;
|
||||
services.xserver.desktopManager.plasma5.enable = true;
|
||||
# services.xserver.enable = true;
|
||||
# services.xserver.displayManager.sddm.enable = true;
|
||||
# services.xserver.displayManager.sddm.enableHidpi = true;
|
||||
# services.xserver.desktopManager.plasma5.enable = true;
|
||||
services.gnome.gnome-keyring.enable = true;
|
||||
|
||||
services.udev.packages = with pkgs; [ libfido2 ];
|
||||
|
@ -98,6 +101,8 @@
|
|||
# Keyboard
|
||||
services.input-remapper.enable = true;
|
||||
hardware.uinput.enable = true;
|
||||
hardware.opengl.enable = true;
|
||||
services.swaylock.enable = true;
|
||||
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
users.users.nki = {
|
||||
|
@ -116,8 +121,21 @@
|
|||
wget
|
||||
|
||||
libfido2
|
||||
|
||||
## Security stuff
|
||||
libsForQt5.qtkeychain
|
||||
|
||||
## Wayland
|
||||
qt5.qtwayland
|
||||
];
|
||||
|
||||
# Enable sway on login.
|
||||
environment.loginShellInit = ''
|
||||
if [ -z $DISPLAY ] && [ "$(tty)" = "/dev/tty1" ]; then
|
||||
exec sway
|
||||
fi
|
||||
'';
|
||||
|
||||
# Environment variables
|
||||
environment.variables = {
|
||||
# Input method overrides
|
||||
|
|
Loading…
Reference in a new issue