Compare commits

..

24 commits

Author SHA1 Message Date
lelgenio db66e7ea65 kak: add javascript region to blade templates 2024-06-03 15:28:21 -03:00
Leonardo Eugênio 6e27e32a7a qutebrowser: remove config, not used anymore 2024-06-02 22:11:15 -03:00
Leonardo Eugênio 8508606050 gnome: disable open tablet driver 2024-06-02 22:11:15 -03:00
Leonardo Eugênio e1dc0649d3 gnome: don't manage mimeapps 2024-06-02 22:11:15 -03:00
Leonardo Eugênio 103ac20f1e gnome: enable variable refresh rate 2024-06-02 22:11:15 -03:00
Leonardo Eugênio 1e204760c4 monolith: forced disks to use mq-deadline scheduler 2024-05-31 22:09:29 -03:00
Leonardo Eugênio 46a75ce485 fixup! treewide: format using nixfmt-rfc-style 2024-05-31 21:46:49 -03:00
Leonardo Eugênio 16eeb3e1e5 nix: don't optimise on every build
this makes builds slower
2024-05-31 21:45:12 -03:00
Leonardo Eugênio 97d95d678d gnome: add workaround for autologin bug 2024-05-31 20:06:47 -03:00
Leonardo Eugênio c20343c129 controller: add auto-connect service 2024-05-31 11:41:21 -03:00
Leonardo Eugênio 0093ab7007 flake: set formatter to nixfmt-rfc-style 2024-05-31 11:41:21 -03:00
Leonardo Eugênio fbcf9bd14e treewide: format using nixfmt-rfc-style 2024-05-31 11:41:21 -03:00
Leonardo Eugênio 8376baaf34 kakoune: use rfc-style nixfmt 2024-05-31 11:41:21 -03:00
Leonardo Eugênio 4fdbf6f821 nix: lower frequency of gc 2024-05-31 11:41:21 -03:00
Leonardo Eugênio 7808c20502 monolith: add docker subvolume 2024-05-31 11:41:21 -03:00
Leonardo Eugênio 49ea594496 configuration: extract nixos config into more files 2024-05-31 11:41:21 -03:00
Leonardo Eugênio 4494f23f22 kdeconect: update config 2024-05-31 11:41:21 -03:00
Leonardo Eugênio 314d95f9dd gnome: update autologin config 2024-05-31 11:41:21 -03:00
Leonardo Eugênio d29b92d8b4 scripts: add pass export script 2024-05-31 11:41:21 -03:00
Leonardo Eugênio f2ffa579f2 qutebrowser: don't install if not the default browser 2024-05-31 11:41:21 -03:00
Leonardo Eugênio 52bd0f67ed monolith: disable virtualbox while it's borked 2024-05-31 11:41:21 -03:00
Leonardo Eugênio 5e0c4ff27d flake: update to 24.05 2024-05-31 11:41:21 -03:00
Leonardo Eugênio 4c356d6822 Revert "sshd: disable until xz is secure"
This reverts commit b0d1b2fbff.
2024-05-31 11:41:21 -03:00
Leonardo Eugênio 0d5a1c1fd5 sway: don't require rebuilding sway dependencies 2024-05-31 11:41:21 -03:00
41 changed files with 78 additions and 106 deletions

View file

@ -40,6 +40,7 @@ in
"zenpower"
];
boot.kernelParams = [
"amdgpu.dcdebugmask=0x10" # amdgpu undervolting bug
"video=DP-1:1920x1080@144"
# hibernation
"resume=LABEL=BTRFS_ROOT" # findmnt -o LABEL --noheadings /swap/
@ -63,6 +64,14 @@ in
rocmPackages.rocm-smi
];
programs.corectrl = {
enable = true;
gpuOverclock = {
enable = true;
ppfeaturemask = "0xffffffff";
};
};
fileSystems."/" = {
device = "/dev/disk/by-label/BTRFS_ROOT";
fsType = "btrfs";

View file

@ -6,6 +6,7 @@ rec {
themes
new-packages
patches
variables
lib_extended
];
@ -79,6 +80,8 @@ rec {
}
);
variables = (final: prev: { uservars = import ../user/variables.nix; });
lib_extended = (
final: prev: {
lib = prev.lib // rec {

View file

@ -126,7 +126,6 @@
wl-clipboard
];
auto_connect_gamepad = [ bluez ];
vrr-fullscreen = [ ];
}
// lib.mapAttrs import_script {
wdmenu = ./wdmenu.nix;

View file

@ -1,28 +0,0 @@
#!/usr/bin/env bash
# List of supported outputs for VRR
output_vrr_whitelist=(
"DP-1"
"DP-2"
)
# Toggle VRR for fullscreened apps in prespecified displays to avoid stutters while in desktop
swaymsg -t subscribe -m '[ "window" ]' | while read window_json; do
window_event=$(echo ${window_json} | jq -r '.change')
# Process only focus change and fullscreen toggle
if [[ $window_event = "focus" || $window_event = "fullscreen_mode" ]]; then
output_json=$(swaymsg -t get_outputs | jq -r '.[] | select(.focused == true)')
output_name=$(echo ${output_json} | jq -r '.name')
# Use only VRR in whitelisted outputs
if [[ ${output_vrr_whitelist[*]} =~ ${output_name} ]]; then
output_vrr_status=$(echo ${output_json} | jq -r '.adaptive_sync_status')
window_fullscreen_status=$(echo ${window_json} | jq -r '.container.fullscreen_mode')
# Only update output if nesseccary to avoid flickering
[[ $output_vrr_status = "disabled" && $window_fullscreen_status = "1" ]] && swaymsg output "${output_name}" adaptive_sync 1
[[ $output_vrr_status = "enabled" && $window_fullscreen_status = "0" ]] && swaymsg output "${output_name}" adaptive_sync 0
fi
fi
done

View file

@ -1,4 +1,12 @@
{ pkgs, ... }:
let
inherit (pkgs.uservars) dmenu;
available_menus = {
bmenu = "bmenu";
rofi = "rofi -dmenu -sort";
};
menu_cmd = available_menus.${dmenu};
in
pkgs.writeShellScriptBin "wdmenu" ''
exec bmenu "$@"
exec ${menu_cmd} "$@"
''

View file

@ -1,6 +1,6 @@
{ pkgs, ... }:
let
inherit (config.my) dmenu;
inherit (pkgs.uservars) dmenu;
available_menus = {
bmenu = "bmenu run";
rofi = "rofi -show drun -sort";

View file

@ -1,4 +1,12 @@
{ pkgs, ... }:
let
inherit (pkgs.uservars) dmenu;
available_menus = {
bmenu = "bmenu run";
rofi = "rofi -show drun -sort";
};
menu_cmd = available_menus.${dmenu};
in
pkgs.writeShellScriptBin "wlauncher" ''
exec bmenu run "$@"
exec ${menu_cmd} "$@"
''

View file

@ -1,6 +0,0 @@
{ lib, ... }:
{
options = {
my = lib.mkOption { };
};
}

View file

@ -43,7 +43,7 @@
};
plymouth = {
enable = true;
theme = lib.mkIf (config.my.desktop == "sway") "red_loader";
theme = lib.mkIf (pkgs.uservars.desktop == "sway") "red_loader";
themePackages = with pkgs; [
(adi1090x-plymouth-themes.override { selected_themes = [ "red_loader" ]; })
];

View file

@ -22,10 +22,9 @@
./users.nix
./containers.nix
./network.nix
../settings
];
my = import ../user/variables.nix;
boot.kernelPackages = pkgs.linuxPackages_latest;
zramSwap.enable = true;

View file

@ -5,7 +5,7 @@
...
}:
let
inherit (config.my)
inherit (pkgs.uservars)
key
accent
font
@ -71,7 +71,7 @@ in
enable = true;
settings = {
initial_session = {
command = desktop;
command = "${pkgs.sway}/bin/sway";
user = "lelgenio";
};
default_session = {

View file

@ -5,7 +5,7 @@
...
}:
let
inherit (config.my)
inherit (pkgs.uservars)
key
theme
accent

View file

@ -6,7 +6,7 @@
...
}:
let
inherit (config.my)
inherit (pkgs.uservars)
key
theme
accent

View file

@ -6,7 +6,7 @@
...
}:
let
inherit (config.my) desktop browser;
inherit (pkgs.uservars) desktop browser;
bugfixedFirefox = pkgs.firefox-esr-unwrapped // {
requireSigning = false;
allowAddonSideload = true;

View file

@ -5,7 +5,15 @@
...
}:
let
inherit (config.my) accent editor desktop;
inherit (pkgs.uservars)
key
theme
color
accent
font
editor
desktop
;
in
{
config = {

View file

@ -6,7 +6,7 @@
...
}:
let
inherit (config.my)
inherit (pkgs.uservars)
key
theme
accent

View file

@ -5,7 +5,7 @@
...
}:
let
inherit (config.my) username mail;
inherit (pkgs.uservars) username mail;
in
{
config = {

View file

@ -2,10 +2,9 @@
pkgs,
lib,
inputs,
config,
...
}:
lib.mkIf (config.my.desktop == "gnome") {
lib.mkIf (pkgs.uservars.desktop == "gnome") {
home.pointerCursor = {
name = "Adwaita";

View file

@ -1,11 +1,6 @@
{
pkgs,
lib,
config,
...
}:
{ pkgs, lib, ... }:
let
inherit (config.my) accent theme editor;
inherit (pkgs.uservars) accent theme editor;
inherit (theme) color;
in
{

View file

@ -44,11 +44,8 @@
./xdg-dirs.nix
inputs.hyprland.homeManagerModules.default
inputs.nix-index-database.hmModules.nix-index
../settings
];
my = import ./variables.nix;
# Home Manager needs a bit of information about you and the
# paths it should manage.
home.username = "lelgenio";

View file

@ -5,7 +5,7 @@
...
}:
{
config = lib.mkIf (config.my.desktop == "hyprland") {
config = lib.mkIf (pkgs.uservars.desktop == "hyprland") {
wayland.windowManager.hyprland = {
enable = false;
extraConfig = ''

View file

@ -5,7 +5,7 @@
...
}:
let
inherit (config.my)
inherit (pkgs.uservars)
key
dmenu
editor

View file

@ -6,7 +6,7 @@
...
}:
let
inherit (config.my)
inherit (pkgs.uservars)
key
theme
color

View file

@ -6,7 +6,7 @@
...
}:
let
inherit (config.my)
inherit (pkgs.uservars)
key
theme
color

View file

@ -6,7 +6,7 @@
...
}:
let
inherit (config.my) browser;
inherit (pkgs.uservars) browser;
cfg = config.xdg.defaultApplications;
in
{

View file

@ -5,7 +5,7 @@
...
}:
{
config = lib.mkIf (config.my.desktop != "gnome") {
config = lib.mkIf (pkgs.uservars.desktop != "gnome") {
services.mpd = {
enable = true;
musicDirectory = config.home.homeDirectory + "/Música";

View file

@ -6,7 +6,7 @@
...
}:
let
inherit (config.my)
inherit (pkgs.uservars)
key
theme
color

View file

@ -6,7 +6,7 @@
...
}:
let
inherit (config.my)
inherit (pkgs.uservars)
key
theme
accent

View file

@ -5,7 +5,7 @@
...
}:
let
inherit (config.my) username mail;
inherit (pkgs.uservars) username mail;
in
{
config = {

View file

@ -5,7 +5,7 @@
...
}:
let
inherit (config.my)
inherit (pkgs.uservars)
key
accent
font
@ -24,7 +24,7 @@ in
./swaylock.nix
./theme.nix
];
config = lib.mkIf (config.my.desktop == "sway") {
config = lib.mkIf (pkgs.uservars.desktop == "sway") {
services.mako.enable = true;
services.swayidle.enable = true;
services.kanshi.enable = true;
@ -69,7 +69,7 @@ in
};
output = {
"*" = {
adaptive_sync = "off";
adaptive_sync = "enabled";
bg = "${theme.background} fill";
mode = "1920x1080@144.000Hz";
};
@ -104,6 +104,7 @@ in
exec ${pkgs.dbus-sway-environment}/bin/dbus-sway-environment
exec swaymsg workspace 2
exec_always systemctl --user restart waybar.service
exec corectrl --minimize-systray
'';
};
services.gammastep = {
@ -116,21 +117,6 @@ in
indicator = true;
};
systemd.user.services.vrr-fullscreen = {
Unit = {
Description = "Enable VRR for fullscreen windows";
PartOf = [ "graphical-session.target" ];
After = [ "graphical-session.target" ];
};
Service = {
ExecStart = "${lib.getExe pkgs.vrr-fullscreen}";
Restart = "on-failure";
};
Install = {
WantedBy = [ "sway-session.target" ];
};
};
xdg.configFile."OpenTabletDriver/settings.json".source = ./open-tablet-driver.json;
home.packages = with pkgs; [

View file

@ -5,7 +5,7 @@
...
}:
let
inherit (config.my)
inherit (pkgs.uservars)
key
accent
font

View file

@ -5,7 +5,7 @@
...
}:
let
inherit (config.my)
inherit (pkgs.uservars)
key
accent
font

View file

@ -1,7 +1,7 @@
{ config, pkgs, ... }:
let
in
# inherit (config.my) key accent font theme;
# inherit (pkgs.uservars) key accent font theme;
# inherit (theme) color;
# inherit (pkgs) lib;
# mod = "Mod4";

View file

@ -1,6 +1,6 @@
{ config, pkgs, ... }:
let
inherit (config.my)
inherit (pkgs.uservars)
key
accent
font

View file

@ -1,6 +1,6 @@
{ config, pkgs, ... }:
let
inherit (config.my)
inherit (pkgs.uservars)
key
accent
font

View file

@ -5,7 +5,7 @@
...
}:
let
inherit (config.my)
inherit (pkgs.uservars)
key
accent
font

View file

@ -5,7 +5,7 @@
...
}:
let
inherit (config.my)
inherit (pkgs.uservars)
key
accent
font

View file

@ -6,7 +6,7 @@
...
}:
let
inherit (config.my) theme font desktop;
inherit (pkgs.uservars) theme font desktop;
inherit (theme)
color
gtk_theme

View file

@ -1,11 +1,6 @@
{
pkgs,
lib,
config,
...
}:
{ pkgs, lib, ... }:
let
inherit (config.my) nextcloud;
inherit (pkgs.uservars) nextcloud;
pass_cmd = (
pkgs.writeShellScript "get_pass" ''
pass "${nextcloud.pass}" | head -n1

View file

@ -7,7 +7,7 @@
...
}:
let
inherit (config.my)
inherit (pkgs.uservars)
key
theme
accent
@ -137,7 +137,7 @@ in
{
format = "{stateIcon} {title} - {artist}";
format-paused = "{stateIcon}";
format-stopped = "{stateIcon}";
format-stopped = "";
state-icons = {
stopped = "";
paused = "";

View file

@ -6,7 +6,7 @@
...
}:
let
inherit (config.my)
inherit (pkgs.uservars)
key
accent
font