Swap to sway
This commit is contained in:
parent
470983b32e
commit
c2bd235753
|
@ -23,8 +23,7 @@
|
||||||
# TeX
|
# TeX
|
||||||
texlive.combined.scheme-full
|
texlive.combined.scheme-full
|
||||||
|
|
||||||
(firefox.override { cfg.enablePlasmaBrowserIntegration = true; })
|
firefox-wayland
|
||||||
plasma-browser-integration
|
|
||||||
|
|
||||||
# Java & sbt
|
# Java & sbt
|
||||||
openjdk11
|
openjdk11
|
||||||
|
@ -32,27 +31,55 @@
|
||||||
]);
|
]);
|
||||||
|
|
||||||
# Graphical set up
|
# Graphical set up
|
||||||
linux.graphical.type = "x11";
|
linux.graphical.type = "wayland";
|
||||||
linux.graphical.wallpaper = ./images/wallpaper_0.png;
|
linux.graphical.wallpaper = ./images/wallpaper_0.png;
|
||||||
# Enable sway
|
# Enable sway
|
||||||
# programs.my-sway.enable = true;
|
programs.my-sway.enable = true;
|
||||||
# programs.my-sway.fontSize = 14.0;
|
programs.my-sway.fontSize = 20.0;
|
||||||
# programs.my-sway.terminal = "${config.programs.kitty.package}/bin/kitty";
|
programs.my-sway.enableLaptopBars = true;
|
||||||
# Keyboard support
|
programs.my-sway.enableMpd = false;
|
||||||
# wayland.windowManager.sway.config = {
|
programs.my-sway.discord = null;
|
||||||
# input."1278:34:HHKB-Hybrid_3_Keyboard".xkb_layout = "jp";
|
# Keyboard options
|
||||||
# input."1:1:AT_Translated_Set_2_keyboard" = {
|
wayland.windowManager.sway.config.input."type:keyboard".xkb_layout = "jp";
|
||||||
# xkb_options = "ctrl:swapcaps";
|
wayland.windowManager.sway.config.output."Unknown-1" = {
|
||||||
# xkb_layout = "us";
|
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
|
# Kitty
|
||||||
nki.programs.kitty = {
|
nki.programs.kitty = {
|
||||||
enable = true;
|
enable = true;
|
||||||
fontSize = 16;
|
fontSize = 22;
|
||||||
enableTabs = true;
|
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" = {
|
home.file.".gnupg/gpg-agent.conf" = {
|
||||||
text = ''
|
text = ''
|
||||||
pinentry-program ${pkgs.pinentry-gnome}/bin/pinentry-gnome3
|
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
|
# Multiple screen setup
|
||||||
# services.kanshi = {
|
# services.kanshi = {
|
||||||
# enable = true;
|
# enable = true;
|
||||||
|
|
|
@ -61,6 +61,16 @@ in
|
||||||
description = "The command to the terminal emulator to be used";
|
description = "The command to the terminal emulator to be used";
|
||||||
default = "${config.programs.kitty.package}/bin/kitty";
|
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 {
|
enableLaptopBars = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
|
@ -108,9 +118,10 @@ in
|
||||||
# Waybar
|
# Waybar
|
||||||
{ command = "systemctl --user restart waybar"; always = true; }
|
{ command = "systemctl --user restart waybar"; always = true; }
|
||||||
# Startup programs
|
# Startup programs
|
||||||
{ command = "${config.programs.firefox.package}/bin/firefox"; }
|
{ command = "${cfg.browser}"; }
|
||||||
{ command = "${pkgs.unstable.discord}/bin/discord"; }
|
] ++ (if cfg.discord != null then [
|
||||||
];
|
{ command = "${cfg.discord}"; }
|
||||||
|
] else [ ]);
|
||||||
|
|
||||||
### Keybindings
|
### Keybindings
|
||||||
#
|
#
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
./m1-support/firmware
|
./m1-support/firmware
|
||||||
# Fonts
|
# Fonts
|
||||||
../modules/personal/fonts
|
../modules/personal/fonts
|
||||||
|
../modules/services/swaylock.nix
|
||||||
# Encrypted DNS
|
# Encrypted DNS
|
||||||
../modules/services/edns
|
../modules/services/edns
|
||||||
];
|
];
|
||||||
|
@ -37,7 +38,9 @@
|
||||||
# networking.hostName = "nixos"; # Define your hostname.
|
# networking.hostName = "nixos"; # Define your hostname.
|
||||||
# Pick only one of the below networking options.
|
# Pick only one of the below networking options.
|
||||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
# 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.
|
# Set your time zone.
|
||||||
time.timeZone = "Europe/Zurich";
|
time.timeZone = "Europe/Zurich";
|
||||||
|
@ -64,10 +67,10 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
# Enable the X11 windowing system.
|
# Enable the X11 windowing system.
|
||||||
services.xserver.enable = true;
|
# services.xserver.enable = true;
|
||||||
services.xserver.displayManager.sddm.enable = true;
|
# services.xserver.displayManager.sddm.enable = true;
|
||||||
services.xserver.displayManager.sddm.enableHidpi = true;
|
# services.xserver.displayManager.sddm.enableHidpi = true;
|
||||||
services.xserver.desktopManager.plasma5.enable = true;
|
# services.xserver.desktopManager.plasma5.enable = true;
|
||||||
services.gnome.gnome-keyring.enable = true;
|
services.gnome.gnome-keyring.enable = true;
|
||||||
|
|
||||||
services.udev.packages = with pkgs; [ libfido2 ];
|
services.udev.packages = with pkgs; [ libfido2 ];
|
||||||
|
@ -98,6 +101,8 @@
|
||||||
# Keyboard
|
# Keyboard
|
||||||
services.input-remapper.enable = true;
|
services.input-remapper.enable = true;
|
||||||
hardware.uinput.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’.
|
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||||
users.users.nki = {
|
users.users.nki = {
|
||||||
|
@ -116,8 +121,21 @@
|
||||||
wget
|
wget
|
||||||
|
|
||||||
libfido2
|
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
|
||||||
environment.variables = {
|
environment.variables = {
|
||||||
# Input method overrides
|
# Input method overrides
|
||||||
|
|
Loading…
Reference in a new issue