Formatted everything.

This commit is contained in:
vorboyvo 2024-04-13 23:45:36 -04:00
parent 0c0e98b61a
commit d2388df647
9 changed files with 369 additions and 281 deletions

View file

@ -5,11 +5,9 @@
{ config, lib, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
];
imports = [ # Include the results of the hardware scan.
./hardware-configuration.nix
];
################################################
# SECTION 1: BASIC SYSTEM SOFTWARE CONFIGURATION
@ -18,11 +16,9 @@
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
# Enable flakes.
nix = {
settings.experimental-features = [ "nix-command" "flakes" ];
};
nix = { settings.experimental-features = [ "nix-command" "flakes" ]; };
# Enable Nix User Repository
# See https://github.com/nix-community/NUR#installation
@ -31,9 +27,10 @@
# inherit pkgs;
# };
# };
networking.hostName = "oyvoLaptop"; # Define your hostname.
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.
# Extra hosts for connecting to tailscale'd servers
networking.extraHosts = ''
@ -69,10 +66,11 @@
# Set login and power management options
services.logind.lidSwitch = "suspend";
services.logind.lidSwitchDocked = "ignore"; # when an external monitor is plugged in
services.logind.lidSwitchDocked =
"ignore"; # when an external monitor is plugged in
services.logind.powerKey = "ignore"; # handle this WM side
services.logind.powerKeyLongPress = "poweroff";
# Enable graphics.
hardware.opengl.enable = true;
@ -84,7 +82,7 @@
# Enable CUPS to print documents.
services.printing.enable = true;
# Enable udisks (handles storage devices, e.g. usb flash drives)
services.udisks2.enable = true;
@ -100,14 +98,12 @@
# Enable fingerprint reader
services.fprintd.enable = true;
# Enable Bluetooth.
hardware.bluetooth.enable = true;
# Enable power management
services.upower = {
enable = true;
};
services.upower = { enable = true; };
###################################################
# SECTION 3: USERSPACE CONFIG AND OPTIONAL SOFTWARE
@ -117,12 +113,13 @@
users.users.alice = {
isNormalUser = true;
home = "/home/alice";
extraGroups = [ "wheel" "networkmanager" "video" ] ++ [ "adbusers" ]; # Enable 'sudo' for the user.
extraGroups = [ "wheel" "networkmanager" "video" ]
++ [ "adbusers" ]; # Enable 'sudo' for the user.
initialPassword = "manysuchcases";
shell = pkgs.zsh;
};
home-manager.users.alice = import ./home.nix;
# Make sure swaylock works (defined in home.nix)
security.pam.services.swaylock = { };
@ -132,21 +129,22 @@
services.logind.extraConfig = ''
InhibitDelayMaxSec=10
'';
# Allow steam to run nonfree
# nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
# "steam" "steam-original" "steam-run" "zoom-5.16.10.668"
# ];
nixpkgs.config.allowUnfreePredicate = _: true;
nixpkgs.overlays = [
(final: prev: {
fprintd = prev.fprintd.overrideAttrs (old: {
mesonCheckFlags = (old.mesonCheckFlags or [ ]) ++ [
# PAM related checks are timing out
"--no-suite" "fprintd:TestPamFprintd"
];
});
})
(final: prev: {
fprintd = prev.fprintd.overrideAttrs (old: {
mesonCheckFlags = (old.mesonCheckFlags or [ ]) ++ [
# PAM related checks are timing out
"--no-suite"
"fprintd:TestPamFprintd"
];
});
})
];
# List packages installed in system profile. To search, run:
@ -163,7 +161,7 @@
enable = true;
remotePlay.openFirewall = true; # Open ports in the firewall for Remote Play
# dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server
};
};
# Enable dconf; necessary for some programs
programs.dconf.enable = true;

View file

@ -2,7 +2,7 @@
description = "NixOS configuration with flakes";
inputs = {
nixpkgs.url = "nixpkgs/nixos-unstable";
# xdg-terminal-exec = {
# url = "path:/etc/nixos/flakes/xdg-terminal-exec";
# inputs.nixpkgs.follows = "nixpkgs";
@ -21,19 +21,17 @@
# nur.url = "github:nix-community/NUR";
};
outputs = { self, nixpkgs, home-manager }:
let
system = "x86_64-linux";
in
{
nixosConfigurations = {
oyvoLaptop = nixpkgs.lib.nixosSystem {
inherit system;
modules = [
./configuration.nix
home-manager.nixosModules.home-manager
# nur.nixosModules.nur
];
let system = "x86_64-linux";
in {
nixosConfigurations = {
oyvoLaptop = nixpkgs.lib.nixosSystem {
inherit system;
modules = [
./configuration.nix
home-manager.nixosModules.home-manager
# nur.nixosModules.nur
];
};
};
};
};
}

175
home.nix
View file

@ -4,8 +4,7 @@ let
scripts = ./scripts;
extra = ./extra;
terminal = pkgs.alacritty;
in
{
in {
home.username = "alice";
home.homeDirectory = "/home/alice";
@ -47,32 +46,80 @@ in
};
# Install packages
home.packages =
with pkgs;
let
xdg-terminal-exec = callPackage ./pkgs/xdg-terminal-exec/xdg-terminal-exec.nix {};
mons = callPackage ./pkgs/mons/mons.nix {};
archivo = callPackage ./pkgs/archivo/archivo.nix {};
in
[ gcc tree-sitter ] ++ # Basic dev tools
[ marksman nil ] ++ # Language servers except those installed through package sections
[ texliveFull texlab ] ++ # LaTeX
(with ocamlPackages; [ ocaml opam dune_3 dune-release merlin ocaml-lsp odoc ocamlformat utop ]) ++ # OCaml
[ ghc stack cabal-install haskell-language-server ] ++ # Haskell
[ python3 ] ++ # I guess.....
[ julia ] ++ # Julia
[ kak-lsp brightnessctl grim slurp wl-clipboard jq xdg-terminal-exec blueman ] ++ # Basic utilities
[ bitwarden-cli htop snore ] ++ # Personalized selection of command-line (CLI/TUI) apps
[ terminal ] ++ # Terminal emulator
[ firefox cinnamon.nemo gnome.file-roller cinnamon.nemo-fileroller evince imv vlc pavucontrol ] ++ # Basic graphical apps
[ libreoffice signal-desktop element-desktop prismlauncher mumble gimp inkscape deluge-gtk shotwell lorien ] ++ # Personalized selection of graphical apps
[ mons ] ++ # Games
[ swaybg bemenu j4-dmenu-desktop ] ++ # Sway- and Wayland-related packages
[ noto-fonts redhat-official-fonts overpass ibm-plex rubik archivo font-awesome ] ++ # Fonts
# [ papirus-icon-theme ] ++ # Icons
# [ vanilla-dmz ] ++ # Cursor
[ ] ++ # Temp
[ ];
home.packages = with pkgs;
let
xdg-terminal-exec =
callPackage ./pkgs/xdg-terminal-exec/xdg-terminal-exec.nix { };
mons = callPackage ./pkgs/mons/mons.nix { };
archivo = callPackage ./pkgs/archivo/archivo.nix { };
in [ gcc tree-sitter ] ++ # Basic dev tools
[ marksman nil ]
++ # Language servers except those installed through package sections
[ texliveFull texlab ] ++ # LaTeX
(with ocamlPackages; [
ocaml
opam
dune_3
dune-release
merlin
ocaml-lsp
odoc
ocamlformat
utop
]) ++ # OCaml
[ ghc stack cabal-install haskell-language-server ] ++ # Haskell
[ python3 ] ++ # I guess.....
[ julia ] ++ # Julia
[
kak-lsp
brightnessctl
grim
slurp
wl-clipboard
jq
xdg-terminal-exec
blueman
] ++ # Basic utilities
[ bitwarden-cli htop snore ]
++ # Personalized selection of command-line (CLI/TUI) apps
[ terminal ] ++ # Terminal emulator
[
firefox
cinnamon.nemo
gnome.file-roller
cinnamon.nemo-fileroller
evince
imv
vlc
pavucontrol
] ++ # Basic graphical apps
[
libreoffice
signal-desktop
element-desktop
prismlauncher
mumble
gimp
inkscape
deluge-gtk
shotwell
lorien
] ++ # Personalized selection of graphical apps
[ mons ] ++ # Games
[ swaybg bemenu j4-dmenu-desktop ] ++ # Sway- and Wayland-related packages
[
noto-fonts
redhat-official-fonts
overpass
ibm-plex
rubik
archivo
font-awesome
] ++ # Fonts
# [ papirus-icon-theme ] ++ # Icons
# [ vanilla-dmz ] ++ # Cursor
[ ] ++ # Temp
[ ];
programs.home-manager.enable = true;
@ -96,47 +143,50 @@ in
userName = "vorboyvo";
userEmail = "mrsirofvibe@outlook.com";
extraConfig = {
init.defaultBranch = "main";
core.editor = "kak";
init.defaultBranch = "main";
core.editor = "kak";
};
};
wayland.windowManager.sway = import ./programs/sway.nix { inherit scripts extra config lib pkgs terminal; };
wayland.windowManager.sway = import ./programs/sway.nix {
inherit scripts extra config lib pkgs terminal;
};
programs.waybar = import ./programs/waybar.nix { inherit scripts config lib pkgs terminal; };
programs.waybar =
import ./programs/waybar.nix { inherit scripts config lib pkgs terminal; };
programs.swaylock = {
enable = true;
settings = {
font-size = 14;
};
settings = { font-size = 14; };
};
services.swayidle = {
enable = true;
events = [
{ event = "before-sleep"; command = "${pkgs.lib.getExe pkgs.swaylock} -f"; }
];
events = [{
event = "before-sleep";
command = "${pkgs.lib.getExe pkgs.swaylock} -f";
}];
};
home.sessionVariables = {
NIXOS_OZONE_WL = "1";
};
home.sessionVariables = { NIXOS_OZONE_WL = "1"; };
# configure fonts correctly
fonts.fontconfig.enable = true;
xdg.configFile."fontconfig/conf.d/20-default.fonts.conf".source = "${extra}/20-default-fonts.conf";
xdg.configFile."fontconfig/conf.d/20-default.fonts.conf".source =
"${extra}/20-default-fonts.conf";
# fix nemo terminal integration
dconf.settings."org/cinnamon/desktop/applications/terminal".exec = "${pkgs.lib.getExe terminal}" ;
dconf.settings."org/cinnamon/desktop/applications/terminal".exec =
"${pkgs.lib.getExe terminal}";
# dconf.settings."org/cinnamon/desktop/applications/terminal".exec-arg = "-e --cwd %F";
# terminal emulator
programs.alacritty.enable = true;
# programs.neovim = import ./programs/neovim.nix;
programs.kakoune = import ./programs/kakoune.nix;
xdg.configFile."kak-lsp/kak-lsp.toml".source = ./programs/kakoune/kak-lsp.toml;
xdg.configFile."kak-lsp/kak-lsp.toml".source =
./programs/kakoune/kak-lsp.toml;
xdg.desktopEntries.kakoune = {
name = "Kakoune";
genericName = "Text Editor";
@ -145,21 +195,30 @@ in
exec = "kak %F";
terminal = true;
mimeType = [
"text/english" "text/plain" "text/x-makefile" "text/x-c++hdr"
"text/x-c++src" "text/x-chdr" "text/x-csrc" "text/x-java"
"text/x-moc" "text/x-pascal" "text/x-tcl" "text/x-tex"
"application/x-shellscript" "text/x-c" "text/x-c++"
"text/english"
"text/plain"
"text/x-makefile"
"text/x-c++hdr"
"text/x-c++src"
"text/x-chdr"
"text/x-csrc"
"text/x-java"
"text/x-moc"
"text/x-pascal"
"text/x-tcl"
"text/x-tex"
"application/x-shellscript"
"text/x-c"
"text/x-c++"
];
categories = ["Utility" "TextEditor"];
categories = [ "Utility" "TextEditor" ];
};
# programs.zathura = {
# enable = true;
# };
programs.pandoc = {
enable = true;
};
programs.pandoc = { enable = true; };
# Configure notifications
services.dunst = {
@ -173,11 +232,9 @@ in
};
};
};
services.batsignal = {
enable = true;
};
services.batsignal = { enable = true; };
programs.firefox = import ./programs/firefox.nix {inherit pkgs;};
programs.firefox = import ./programs/firefox.nix { inherit pkgs; };
programs.thunderbird = import ./programs/thunderbird.nix;
}

View file

@ -1,75 +1,97 @@
{pkgs}:
{
enable = true;
profiles = {
default = {
id = 0;
name = "Main Profile";
isDefault = true;
search = {
force = true;
default = "DuckDuckGo";
order = [ "DuckDuckGo" "Google" ];
engines = {
"Nix Packages" = {
urls = [{
template = "https://search.nixos.org/packages";
params = [
{ name = "type"; value = "packages"; }
{ name = "query"; value = "{searchTerms}"; }
];
{ pkgs }: {
enable = true;
profiles = {
default = {
id = 0;
name = "Main Profile";
isDefault = true;
search = {
force = true;
default = "DuckDuckGo";
order = [ "DuckDuckGo" "Google" ];
engines = {
"Nix Packages" = {
urls = [{
template = "https://search.nixos.org/packages";
params = [
{
name = "type";
value = "packages";
}
{
name = "query";
value = "{searchTerms}";
}
];
}];
icon =
"''${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = [ "@np" ];
};
"NixOS Options" = {
urls = [{
template = "https://search.nixos.org/options";
params = [
{
name = "type";
value = "options";
}
{
name = "query";
value = "{searchTerms}";
}
];
}];
icon =
"''${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = [ "@no" ];
};
"NixOS Wiki" = {
urls = [{
template = "https://nixos.wiki/index.php?search={searchTerms}";
}];
iconUpdateURL = "https://nixos.wiki/favicon.png";
updateInterval = 24 * 60 * 60 * 1000; # every day
definedAliases = [ "@nw" ];
};
"HomeManager Unofficial Options" = {
urls = [{
template = "https://home-manager-options.extranix.com";
params = [{
name = "query";
value = "{searchTerms}";
}];
icon = "''${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = [ "@np" ];
};
"NixOS Options" = {
urls = [{
template = "https://search.nixos.org/options";
params = [
{ name = "type"; value = "options"; }
{ name = "query"; value = "{searchTerms}"; }
];
}];
icon = "''${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = [ "@no" ];
};
"NixOS Wiki" = {
urls = [{ template = "https://nixos.wiki/index.php?search={searchTerms}"; }];
iconUpdateURL = "https://nixos.wiki/favicon.png";
updateInterval = 24 * 60 * 60 * 1000; # every day
definedAliases = [ "@nw" ];
};
"HomeManager Unofficial Options" = {
urls = [{
template = "https://home-manager-options.extranix.com";
params = [
{ name = "query"; value = "{searchTerms}"; }
];
}];
icon = "''${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = [ "@hm" ];
};
"Arch Wiki" = {
urls = [{ template = "https://wiki.archlinux.org/index.php?search={searchTerms}"; }];
iconUpdateURL = "https://wiki.archlinux.org/favicon.ico";
definedAliases = [ "@aw" ];
};
"GeoGuessr Join" = {
urls = [{ template = "https://www.geoguessr.com/join/{searchTerms}"; }];
definedAliases = [ "@ggj" ];
};
"Google".metaData.alias = "@g"; #builtin engines only support specifying one additional alias
};
};
# extensions = with pkgs.nur.repos.rycee.firefox-addons; [
# ublock-origin
# bitwarden
# multi-account-containers
# ];
settings = {
"browser.search.region" = "CA";
"browser.search.isUS" = false;
};
}];
icon =
"''${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = [ "@hm" ];
};
"Arch Wiki" = {
urls = [{
template =
"https://wiki.archlinux.org/index.php?search={searchTerms}";
}];
iconUpdateURL = "https://wiki.archlinux.org/favicon.ico";
definedAliases = [ "@aw" ];
};
"GeoGuessr Join" = {
urls =
[{ template = "https://www.geoguessr.com/join/{searchTerms}"; }];
definedAliases = [ "@ggj" ];
};
"Google".metaData.alias =
"@g"; # builtin engines only support specifying one additional alias
};
};
# extensions = with pkgs.nur.repos.rycee.firefox-addons; [
# ublock-origin
# bitwarden
# multi-account-containers
# ];
settings = {
"browser.search.region" = "CA";
"browser.search.isUS" = false;
};
};
}
};
}

View file

@ -7,31 +7,29 @@
enable = true;
highlightCursor = true;
};
hooks = [
{
# When the filetype=latex option is set in a buffer context (automatically), add a new hook to build the latex file on write
name = "BufSetOption";
option = "filetype=latex";
commands = "hook buffer BufWritePost .* %{ texlab-build }";
}
];
hooks = [{
# When the filetype=latex option is set in a buffer context (automatically), add a new hook to build the latex file on write
name = "BufSetOption";
option = "filetype=latex";
commands = "hook buffer BufWritePost .* %{ texlab-build }";
}];
keyMappings = [
# Define usermode yank/copy and paste
{
key = "y";
mode = "user";
effect = "<a-|> wl-copy<ret>";
}
{
key = "p";
mode = "user";
effect = "<a-!> wl-paste<ret>;d"; # ;d at the end since newline inserted
}
{
key = "P";
mode = "user";
effect = "! wl-paste<ret>;d"; # ;d at the end since newline inserted
}
# Define usermode yank/copy and paste
{
key = "y";
mode = "user";
effect = "<a-|> wl-copy<ret>";
}
{
key = "p";
mode = "user";
effect = "<a-!> wl-paste<ret>;d"; # ;d at the end since newline inserted
}
{
key = "P";
mode = "user";
effect = "! wl-paste<ret>;d"; # ;d at the end since newline inserted
}
];
};
extraConfig = ''

View file

@ -4,8 +4,6 @@
viAlias = true;
vimAlias = true;
withPython3 = true;
extraPython3Packages = pyPkgs: with pyPkgs; [
virtualenv
];
extraPython3Packages = pyPkgs: with pyPkgs; [ virtualenv ];
extraLuaConfig = builtins.readFile ./neovim/init.lua;
}

View file

@ -1,11 +1,14 @@
{ scripts, extra, config, lib, pkgs, terminal, ... }@inputs:
let
dynscreenshot = pkgs.writeShellScript "dynscreenshot" (builtins.readFile "${scripts}/dynscreenshot.sh");
changebrightness = pkgs.writeShellScript "changebrightness" (builtins.readFile "${scripts}/changebrightness.sh");
dynscreenshot = pkgs.writeShellScript "dynscreenshot"
(builtins.readFile "${scripts}/dynscreenshot.sh");
changebrightness = pkgs.writeShellScript "changebrightness"
(builtins.readFile "${scripts}/changebrightness.sh");
mod = config.wayland.windowManager.sway.config.modifier;
dmenuCommand = builtins.readFile "${scripts}/dmenu.sh";
shutdownMenu = pkgs.writeShellScript "shutdownmenu" (builtins.readFile "${scripts}/shutdownmenu.sh");
shutdownMenu = pkgs.writeShellScript "shutdownmenu"
(builtins.readFile "${scripts}/shutdownmenu.sh");
backgroundImage = "${extra}/kuwaitboat.jpg";
in {
enable = true;
@ -20,16 +23,17 @@ in {
input = {
"type:touchpad" = {
natural_scroll = "disabled";
dwt = "disabled";
click_method = "clickfinger";
scroll_factor = "0.5";
dwt = "disabled";
click_method = "clickfinger";
scroll_factor = "0.5";
};
"*" = {
xkb_layout = "ca,ca";
xkb_variant = ",eng";
};
};
bars = let config = config; in [{
bars = let config = config;
in [{
command = "${pkgs.lib.getExe pkgs.waybar}";
position = "top";
inherit fonts;
@ -38,53 +42,64 @@ in {
border = 2;
titlebar = true;
};
keybindings = let screenshotPath = "Pictures/Screenshots/screenshot`date +%Y%m%d%H%M%S`.png"; in lib.mkOptionDefault ({ # Screenshot keybinds
"Print" = "exec grim - | wl-copy && wl-paste > ${screenshotPath}"; # Take screenshot of whole screen, save it, and copy it to clipboard
"Shift+Print" = "exec swaymsg -t get_tree | jq -r '.. | select(.focused?) | .rect | \"\\(.x),\\(.y) \\(.width)x\\(.height)\"' | grim -g - | wl-copy && wl-paste > ${screenshotPath}"; # Take screenshot of current window, save it, and copy it to clipboard
"Ctrl+Print" = "exec bash ${dynscreenshot} ${screenshotPath}"; # Take screenshot of selection, save it, and copy it to clipboard
keybindings = let
screenshotPath =
"Pictures/Screenshots/screenshot`date +%Y%m%d%H%M%S`.png";
in lib.mkOptionDefault ({ # Screenshot keybinds
"Print" =
"exec grim - | wl-copy && wl-paste > ${screenshotPath}"; # Take screenshot of whole screen, save it, and copy it to clipboard
"Shift+Print" = ''
exec swaymsg -t get_tree | jq -r '.. | select(.focused?) | .rect | "\(.x),\(.y) \(.width)x\(.height)"' | grim -g - | wl-copy && wl-paste > ${screenshotPath}''; # Take screenshot of current window, save it, and copy it to clipboard
"Ctrl+Print" =
"exec bash ${dynscreenshot} ${screenshotPath}"; # Take screenshot of selection, save it, and copy it to clipboard
} // { # Function Media Keys
XF86MonBrightnessUp = "exec bash ${changebrightness} 1";
XF86MonBrightnessDown = "exec bash ${changebrightness} -1";
XF86AudioMute = "exec wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle";
"${mod}+XF86AudioMute" = "exec wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle";
"${mod}+XF86AudioMute" =
"exec wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle";
XF86AudioRaiseVolume = "exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.05+";
XF86AudioLowerVolume = "exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.05-";
"${mod}+XF86AudioRaiseVolume" = "exec wpctl set-volume @DEFAULT_AUDIO_SOURCE@ 0.05+";
"${mod}+XF86AudioLowerVolume" = "exec wpctl set-volume @DEFAULT_AUDIO_SOURCE@ 0.05-";
"${mod}+XF86AudioRaiseVolume" =
"exec wpctl set-volume @DEFAULT_AUDIO_SOURCE@ 0.05+";
"${mod}+XF86AudioLowerVolume" =
"exec wpctl set-volume @DEFAULT_AUDIO_SOURCE@ 0.05-";
"${mod}+Shift+e" = null;
XF86AudioMedia = "dunstctl set-paused toggle; dunstify -a 'dunst_mute_key' -u low -h string:x-dunst-stack-tag:dunst_mute_key 'Notifications mute toggled'";
XF86PowerOff = "exec DMENU_COMMAND='${dmenuCommand}' bash ${shutdownMenu}";
XF86AudioMedia =
"dunstctl set-paused toggle; dunstify -a 'dunst_mute_key' -u low -h string:x-dunst-stack-tag:dunst_mute_key 'Notifications mute toggled'";
XF86PowerOff =
"exec DMENU_COMMAND='${dmenuCommand}' bash ${shutdownMenu}";
} // {
"${mod}+space" = "input \"*\" xkb_switch_layout next";
} // {
});
menu = "j4-dmenu-desktop --no-generic --term=${pkgs.lib.getExe inputs.terminal} --dmenu='${dmenuCommand}'";
"${mod}+space" = ''input "*" xkb_switch_layout next'';
} // { });
menu = "j4-dmenu-desktop --no-generic --term=${
pkgs.lib.getExe inputs.terminal
} --dmenu='${dmenuCommand}'";
focus.followMouse = false;
};
extraConfig =
''
extraConfig = ''
output 'eDP-1' scale 1.50
'' + # Fractional scaling to 1.50
''
exec gammastep-indicator
'' + # gammastep-indicator enables red shift
''
exec dunst
'' + # Enable notifications
''
bindgesture swipe:4:up focus parent
bindgesture swipe:4:left workspace prev
bindgesture swipe:4:right workspace next
bindgesture swipe:3:up focus up
bindgesture swipe:3:down focus down
bindgesture swipe:3:left focus left
bindgesture swipe:3:right focus right
'' + # Multi-touch touchpad gestures
''
exec swaybg -i ${backgroundImage}
'' + # Background image
''
focus_on_window_activation focus
'' + # Focus on window activation lol
"";
''
exec gammastep-indicator
'' + # gammastep-indicator enables red shift
''
exec dunst
'' + # Enable notifications
''
bindgesture swipe:4:up focus parent
bindgesture swipe:4:left workspace prev
bindgesture swipe:4:right workspace next
bindgesture swipe:3:up focus up
bindgesture swipe:3:down focus down
bindgesture swipe:3:left focus left
bindgesture swipe:3:right focus right
'' + # Multi-touch touchpad gestures
''
exec swaybg -i ${backgroundImage}
'' + # Background image
''
focus_on_window_activation focus
'' + # Focus on window activation lol
"";
}

View file

@ -1,8 +1,4 @@
{
enable = true;
profiles = {
main = {
isDefault = true;
};
};
profiles = { main = { isDefault = true; }; };
}

View file

@ -1,13 +1,22 @@
{ scripts, config, lib, pkgs, terminal, ... } :
{ scripts, config, lib, pkgs, terminal, ... }:
let
terminalExec = "${pkgs.lib.getExe terminal} -e";
in
{
let terminalExec = "${pkgs.lib.getExe terminal} -e";
in {
enable = true;
settings = [{
modules-left = [ "sway/workspaces" ];
modules-right = [ "pulseaudio" "bluetooth" "network" "cpu" "memory" "disk" "battery" "tray" "sway/language" "clock" ];
modules-right = [
"pulseaudio"
"bluetooth"
"network"
"cpu"
"memory"
"disk"
"battery"
"tray"
"sway/language"
"clock"
];
"sway/workspaces" = {
enable-bar-scroll = true;
disable-scroll-wraparound = true;
@ -37,20 +46,19 @@ in
};
bluetooth = {
format = " {status}";
format-disabled = ""; # hide module
format-disabled = ""; # hide module
format-connected = " {num_connections}";
tooltip-format = "{controller_alias}\t{controller_address}";
tooltip-format-connected = "{controller_alias}\t{controller_address}\n\n{device_enumerate}";
tooltip-format-enumerate-connected = "{device_alias}\t{device_address}";
tooltip-format = "{controller_alias} {controller_address}";
tooltip-format-connected = ''
{controller_alias} {controller_address}
{device_enumerate}'';
tooltip-format-enumerate-connected = "{device_alias} {device_address}";
on-click = "exec blueman-manager";
on-click-right = "exec bluetoothctl disconnect";
};
cpu = {
format = "{usage}% ";
};
memory = {
format = "{used:0.1f}GB/{total:0.1f}GB ";
};
cpu = { format = "{usage}% "; };
memory = { format = "{used:0.1f}GB/{total:0.1f}GB "; };
disk = {
format = "{used} ";
path = "/";
@ -74,13 +82,16 @@ in
"sway/language" = {
format = "eriuu";
tooltip-format = "boofer";
on-click = "swaymsg input \"*\" xkb_switch_layout next";
on-click = ''swaymsg input "*" xkb_switch_layout next'';
};
clock = {
interval = 1;
format = "{:L%H:%M:%S %a %F}";
locale = "fr_CA.utf8"; # TODO fix this; I don't want it to be hardcoded but rather tied to i18n.defaultLocale
tooltip-format = "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>";
locale =
"fr_CA.utf8"; # TODO fix this; I don't want it to be hardcoded but rather tied to i18n.defaultLocale
tooltip-format = ''
<big>{:%Y %B}</big>
<tt><small>{calendar}</small></tt>'';
};
}];
style = ''
@ -89,14 +100,12 @@ in
font-size: 12pt;
min-height: 20pt;
}
'' +
''
'' + ''
window#waybar {
background: rgba(34, 34, 34, 1);
color: white;
}
'' +
''
'' + ''
#workspaces button {
padding: 0 3px;
background: rgba(34, 34, 34, 1);
@ -104,20 +113,18 @@ in
border-radius: 0;
color: white;
}
'' +
''
'' + ''
#workspaces button.focused {
background: rgba(40, 85, 119, 1);
}
.modules-right label,
.modules-right box {
border-left: 1px solid #d3d3d3;
padding-left: 5px;
padding-right: 5px;
}
'' +
''
'' + ''
#battery.warning:not(.charging) {
background: rgba(140, 0, 0, 1);
}
@ -126,6 +133,5 @@ in
background: #ffffff;
color: black;
}
'' +
"";
'' + "";
}