various better defaults

This commit is contained in:
Tao Tien 2024-04-04 02:50:30 -07:00
parent f93a0e1928
commit 422e000821
8 changed files with 109 additions and 53 deletions

View file

@ -18,6 +18,7 @@
sqlx-cli sqlx-cli
sshfs sshfs
tokei tokei
jujutsu
# c # c
clang clang

View file

@ -7,4 +7,5 @@ in {
"uwuraid.age".publicKeys = systems; "uwuraid.age".publicKeys = systems;
"syncthing-NOcomputer.age".publicKeys = systems; "syncthing-NOcomputer.age".publicKeys = systems;
"syncthing-NOlaptop.age".publicKeys = systems; "syncthing-NOlaptop.age".publicKeys = systems;
"syncthing-uwuraid.age".publicKeys = systems;
} }

View file

@ -0,0 +1,9 @@
age-encryption.org/v1
-> ssh-ed25519 V3f6QA CzSKiHHMiuoU3eo6VlWu8TTnYQNea7+12WjEPUInuS0
LmmizztoqXpNiLMAdwBJ24UnQzioJvVIMz5s3pYBliY
-> ssh-ed25519 iNXO0g TZBtsdfoYiPdIrt/X8N7OVZWS+5UEzP+4cFXUGRLvTg
2niGoJMbeCw7i0JttV3ZNwyi43ILeBOBzlOoF2wnlBg
-> ssh-ed25519 J90tbg PYxNEV9nlZtgQcBVQo/CcLwGUDomnVLY5PwFcnuGiQM
CMtOa2+1ZgvHiHVwOHznXtK3bIslud0ZQQG1NjQT9u4
--- 8ZLuFKGV+w7zVR5jKjfrKWemq4zmnreBUViSSXM0Bbs
ô¬M0”çHY áZ˜¥¿±¦´ öG¡µ\éƒÅ"¦v ”KÃ]Vú[!û¹eê¯P¡DdNØU" ¾µ¡%Yå<59>µE¯ž3„žl4ŒÚ®ßV<C39F>ÔažíÆùµÚ>;Qùä»k —

View file

@ -42,14 +42,16 @@
NoDefaultBookmarks = false; NoDefaultBookmarks = false;
}; };
programs.firefox.preferences = { programs.firefox.preferences = {
"accessibility.browsewithcaret_shortcut.enabled" = false; "media.ffmpeg.vaapi.enabled" = true;
"browser.bookmarks.restore_default_bookmarks" = false;
"widget.use-xdg-desktop-portal.file-picker" = 1; "widget.use-xdg-desktop-portal.file-picker" = 1;
"widget.use-xdg-desktop-portal.location" = 1; "widget.use-xdg-desktop-portal.location" = 1;
"widget.use-xdg-desktop-portal.mime-handler" = 1; "widget.use-xdg-desktop-portal.mime-handler" = 1;
"widget.use-xdg-desktop-portal.open-uri" = 1; "widget.use-xdg-desktop-portal.open-uri" = 1;
"widget.use-xdg-desktop-portal.settings" = 1; "widget.use-xdg-desktop-portal.settings" = 1;
"accessibility.browsewithcaret_shortcut.enabled" = false;
"browser.bookmarks.restore_default_bookmarks" = false;
}; };
services.xserver.enable = lib.mkDefault true; services.xserver.enable = lib.mkDefault true;
@ -105,10 +107,10 @@
SKIM_DEFAULT_COMMAND = "rg --files"; SKIM_DEFAULT_COMMAND = "rg --files";
}; };
environment.sessionVariables = { environment.sessionVariables = {
# EDITOR = "hx"; EDITOR = "hx";
# VISUAL = "hx"; VISUAL = "hx";
# PAGER = "bat"; PAGER = "bat";
# SKIM_DEFAULT_COMMAND = "rg --files"; SKIM_DEFAULT_COMMAND = "rg --files";
}; };
time.timeZone = lib.mkDefault "US/Pacific"; time.timeZone = lib.mkDefault "US/Pacific";

View file

@ -1,34 +1,29 @@
{ {pkgs, ...}: {
pkgs,
config,
...
}: let
amdgpu-kernel-module = pkgs.callPackage ./vrr_patch.nix {
kernel = config.boot.kernelPackages.kernel;
};
in {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
# prescurve # prescurve
libinput libinput
powertop powertop
fw-ectool fw-ectool
nvtopPackages.amd
]; ];
services.power-profiles-daemon.enable = true;
services.fwupd.enable = true; services.fwupd.enable = true;
services.fprintd.enable = true; services.fprintd.enable = true;
powerManagement.powertop.enable = false; # stop using this: https://community.frame.work/t/tracking-ppd-v-tlp-for-amd-ryzen-7040/39423/9?u=ghett_klapson
systemd.services.powertop = { # powerManagement.powertop.enable = false;
wantedBy = ["multi-user.target"]; # systemd.services.powertop = {
after = ["multi-user.target"]; # wantedBy = ["multi-user.target"];
path = [pkgs.kmod]; # after = ["multi-user.target"];
serviceConfig = { # path = [pkgs.kmod];
Type = "oneshot"; # serviceConfig = {
RemainAfterExit = "yes"; # Type = "oneshot";
ExecStart = "${pkgs.powertop}/bin/powertop --auto-tune"; # RemainAfterExit = "yes";
ExecStartPost = "/bin/sh -c 'for f in $(grep -l \"Keyboard\\|Preonic\\|Razer\\|Macropad\" /sys/bus/usb/devices/*/product | sed \"s/product/power\\\\/control/\"); do echo on >| '$f'; done'"; # ExecStart = "${pkgs.powertop}/bin/powertop --auto-tune";
}; # ExecStartPost = "/bin/sh -c 'for f in $(grep -l \"Keyboard\\|Preonic\\|Razer\\|Macropad\" /sys/bus/usb/devices/*/product | sed \"s/product/power\\\\/control/\"); do echo on >| '$f'; done'";
}; # };
# };
environment.etc = { environment.etc = {
"libinput/local-overrides.quirks".text = " "libinput/local-overrides.quirks".text = "
@ -76,18 +71,10 @@ AttrKeyboardIntegration=internal";
boot.kernelParams = [ boot.kernelParams = [
# "mem_sleep_default=deep" # "mem_sleep_default=deep"
# "nvme.noacpi=1" # "nvme.noacpi=1"
"amdgpu.abmlevel=1"
]; ];
boot.kernelModules = ["kvm-amd"]; boot.kernelModules = ["kvm-amd"];
boot.extraModulePackages = [ # boot.extraModulePackages = [ ];
(amdgpu-kernel-module.overrideAttrs (_: {
patches = [
(pkgs.fetchurl {
url = "https://gitlab.freedesktop.org/agd5f/linux/-/commit/2f14c0c8cae8e9e3b603a3f91909baba66540027.diff";
hash = "sha256-0++twr9t4AkJXZfj0aHGMVDuOhxtLP/q2d4FGfggnww=";
})
];
}))
];
powerManagement.cpuFreqGovernor = "powersave"; powerManagement.cpuFreqGovernor = "powersave";
systemd.sleep.extraConfig = "HibernateDelaySec=180m"; systemd.sleep.extraConfig = "HibernateDelaySec=180m";

View file

@ -78,6 +78,7 @@
age.secrets.syncthing-NOcomputer.file = ../secrets/syncthing-NOcomputer.age; age.secrets.syncthing-NOcomputer.file = ../secrets/syncthing-NOcomputer.age;
age.secrets.syncthing-NOlaptop.file = ../secrets/syncthing-NOlaptop.age; age.secrets.syncthing-NOlaptop.file = ../secrets/syncthing-NOlaptop.age;
age.secrets.syncthing-uwuraid.file = ../secrets/syncthing-uwuraid.age;
services.syncthing = { services.syncthing = {
enable = true; enable = true;
user = "tao"; user = "tao";
@ -91,11 +92,13 @@
# bootstrap by commenting out devices first and rebuild switch impurely # bootstrap by commenting out devices first and rebuild switch impurely
"nocomputer".id = builtins.readFile config.age.secrets.syncthing-NOcomputer.path; "nocomputer".id = builtins.readFile config.age.secrets.syncthing-NOcomputer.path;
"nolaptop".id = builtins.readFile config.age.secrets.syncthing-NOlaptop.path; "nolaptop".id = builtins.readFile config.age.secrets.syncthing-NOlaptop.path;
"uwuraid".id = builtins.readFile config.age.secrets.syncthing-uwuraid.path;
}; };
folders = let folders = let
devs = [ devs = [
"nocomputer" "nocomputer"
"nolaptop" "nolaptop"
"uwuraid"
]; ];
in { in {
"sync" = { "sync" = {
@ -110,6 +113,10 @@
path = "/home/tao/projects"; path = "/home/tao/projects";
devices = devs; devices = devs;
}; };
"pictures" = {
path = "/home/tao/pictures";
devices = devs;
};
# "pictures".path = "/home/tao/pictures"; # "pictures".path = "/home/tao/pictures";
}; };
}; };

View file

@ -14,7 +14,7 @@ in {
]; ];
home.file.".cargo/config.toml".text = cargoConfig; home.file.".cargo/config.toml".text = cargoConfig;
home.file."autostart" = { home.file.".config/autostart" = {
source = ./autostart; source = ./autostart;
recursive = true; recursive = true;
}; };
@ -43,7 +43,7 @@ in {
default-command = "log"; default-command = "log";
}; };
}; };
package = inputs.jujutsu.packages.${pkgs.system}.default; # package = inputs.jujutsu.packages.${pkgs.system}.default;
}; };
git = { git = {
@ -92,6 +92,19 @@ in {
}; };
}; };
xdg.userDirs = {
desktop = null;
documents = "documents";
download = "downloads";
music = "music";
pictures = "pictures";
templates = "templates";
videos = "videos";
publicShare = null;
createDirectories = true;
enable = true;
};
home.username = "tao"; home.username = "tao";
home.homeDirectory = "/home/tao"; home.homeDirectory = "/home/tao";
home.stateVersion = "23.11"; home.stateVersion = "23.11";

View file

@ -144,7 +144,7 @@
"kwin"."Window Shade" = [ ]; "kwin"."Window Shade" = [ ];
"kwin"."Window Shrink Horizontal" = [ ]; "kwin"."Window Shrink Horizontal" = [ ];
"kwin"."Window Shrink Vertical" = [ ]; "kwin"."Window Shrink Vertical" = [ ];
"kwin"."Window to Desktop 1" = [ ]; "kwin"."Window to Desktop 1" = "Meta+%";
"kwin"."Window to Desktop 10" = [ ]; "kwin"."Window to Desktop 10" = [ ];
"kwin"."Window to Desktop 11" = [ ]; "kwin"."Window to Desktop 11" = [ ];
"kwin"."Window to Desktop 12" = [ ]; "kwin"."Window to Desktop 12" = [ ];
@ -155,12 +155,12 @@
"kwin"."Window to Desktop 17" = [ ]; "kwin"."Window to Desktop 17" = [ ];
"kwin"."Window to Desktop 18" = [ ]; "kwin"."Window to Desktop 18" = [ ];
"kwin"."Window to Desktop 19" = [ ]; "kwin"."Window to Desktop 19" = [ ];
"kwin"."Window to Desktop 2" = [ ]; "kwin"."Window to Desktop 2" = "Meta+^";
"kwin"."Window to Desktop 20" = [ ]; "kwin"."Window to Desktop 20" = [ ];
"kwin"."Window to Desktop 3" = [ ]; "kwin"."Window to Desktop 3" = "Meta+&";
"kwin"."Window to Desktop 4" = [ ]; "kwin"."Window to Desktop 4" = "Meta+*";
"kwin"."Window to Desktop 5" = [ ]; "kwin"."Window to Desktop 5" = "Meta+(";
"kwin"."Window to Desktop 6" = [ ]; "kwin"."Window to Desktop 6" = "Meta+)";
"kwin"."Window to Desktop 7" = [ ]; "kwin"."Window to Desktop 7" = [ ];
"kwin"."Window to Desktop 8" = [ ]; "kwin"."Window to Desktop 8" = [ ];
"kwin"."Window to Desktop 9" = [ ]; "kwin"."Window to Desktop 9" = [ ];
@ -300,30 +300,66 @@
"kwinrc"."Tiling"."padding".value = 21; "kwinrc"."Tiling"."padding".value = 21;
"kwinrc"."Tiling/530b5b99-fb5c-526e-822b-a6ca66eb2461"."tiles".value = "{\"layoutDirection\":\"horizontal\",\"tiles\":[{\"width\":0.25},{\"width\":0.5},{\"width\":0.25}]}"; "kwinrc"."Tiling/530b5b99-fb5c-526e-822b-a6ca66eb2461"."tiles".value = "{\"layoutDirection\":\"horizontal\",\"tiles\":[{\"width\":0.25},{\"width\":0.5},{\"width\":0.25}]}";
"kwinrc"."Tiling/7e0b89fb-bf08-5d5d-a334-0ecfa3cb7b04"."tiles".value = "{\"layoutDirection\":\"horizontal\",\"tiles\":[{\"width\":0.2520833333333333},{\"width\":0.7479166666666595}]}"; "kwinrc"."Tiling/7e0b89fb-bf08-5d5d-a334-0ecfa3cb7b04"."tiles".value = "{\"layoutDirection\":\"horizontal\",\"tiles\":[{\"width\":0.2520833333333333},{\"width\":0.7479166666666595}]}";
"kwinrc"."Tiling/b139d5e7-0994-57d9-b378-1e6f13020bc3"."tiles".value = "{\"layoutDirection\":\"horizontal\",\"tiles\":[{\"width\":0.401171875},{\"width\":0.5988281249999998}]}"; "kwinrc"."Tiling/b139d5e7-0994-57d9-b378-1e6f13020bc3"."tiles".value = "{\"layoutDirection\":\"horizontal\",\"tiles\":[{\"width\":0.5},{\"width\":0.5}]}";
"kwinrc"."Tiling/b4e8ebb4-a5b0-596a-b70d-9a1b27c4f05b"."tiles".value = "{\"layoutDirection\":\"horizontal\",\"tiles\":[{\"width\":0.3312500000000039},{\"width\":0.6687499999999946}]}"; "kwinrc"."Tiling/b4e8ebb4-a5b0-596a-b70d-9a1b27c4f05b"."tiles".value = "{\"layoutDirection\":\"horizontal\",\"tiles\":[{\"width\":0.3312500000000039},{\"width\":0.6687499999999946}]}";
"kwinrc"."Tiling/e23d0cc4-ba9f-5b08-9f6b-33b2434ca622"."tiles".value = "{\"layoutDirection\":\"horizontal\",\"tiles\":[{\"width\":0.25},{\"width\":0.5},{\"width\":0.25}]}"; "kwinrc"."Tiling/e23d0cc4-ba9f-5b08-9f6b-33b2434ca622"."tiles".value = "{\"layoutDirection\":\"horizontal\",\"tiles\":[{\"width\":0.25},{\"width\":0.5},{\"width\":0.25}]}";
"kwinrc"."Tiling/e688eb74-7230-5d02-a5e0-3b38a54bc04e"."tiles".value = "{\"layoutDirection\":\"horizontal\",\"tiles\":[{\"width\":0.25},{\"width\":0.5},{\"width\":0.25}]}"; "kwinrc"."Tiling/e688eb74-7230-5d02-a5e0-3b38a54bc04e"."tiles".value = "{\"layoutDirection\":\"horizontal\",\"tiles\":[{\"width\":0.25},{\"width\":0.5},{\"width\":0.25}]}";
"kwinrc"."Wayland"."InputMethod[$e]".value = "/run/current-system/sw/share/applications/fcitx5-wayland-launcher.desktop"; "kwinrc"."Wayland"."InputMethod[$e]".value = "/run/current-system/sw/share/applications/org.fcitx.Fcitx5.desktop";
"kwinrc"."Windows"."AutoRaise".value = true; "kwinrc"."Windows"."AutoRaise".value = true;
"kwinrc"."Windows"."AutoRaiseInterval".value = 250; "kwinrc"."Windows"."AutoRaiseInterval".value = 250;
"kwinrc"."Windows"."DelayFocusInterval".value = 200; "kwinrc"."Windows"."DelayFocusInterval".value = 200;
"kwinrc"."Windows"."FocusPolicy".value = "FocusFollowsMouse"; "kwinrc"."Windows"."FocusPolicy".value = "FocusFollowsMouse";
"kwinrc"."Xwayland"."Scale".value = 1; "kwinrc"."Xwayland"."Scale".value = 1;
"kwinrulesrc"."1"."Description".value = "Application settings for org.wezfurlong.wezterm"; "kwinrulesrc"."1"."Description".value = "Application settings for discord";
"kwinrulesrc"."1"."clientmachine".value = "localhost";
"kwinrulesrc"."1"."desktops".value = "\\0";
"kwinrulesrc"."1"."desktopsrule".value = 2;
"kwinrulesrc"."1"."size".value = "1420,969"; "kwinrulesrc"."1"."size".value = "1420,969";
"kwinrulesrc"."1"."sizerule".value = 3; "kwinrulesrc"."1"."skippager".value = true;
"kwinrulesrc"."1"."wmclass".value = "wezterm-gui org.wezfurlong.wezterm"; "kwinrulesrc"."1"."skippagerrule".value = 2;
"kwinrulesrc"."1"."wmclasscomplete".value = true; "kwinrulesrc"."1"."title".value = "#all-gay-circlejerk-club | Vensuli - Discord";
"kwinrulesrc"."1"."windowrole".value = "browser-window";
"kwinrulesrc"."1"."wmclass".value = "discord";
"kwinrulesrc"."1"."wmclassmatch".value = 1; "kwinrulesrc"."1"."wmclassmatch".value = 1;
"kwinrulesrc"."2"."Description".value = "Application settings for org.wezfurlong.wezterm";
"kwinrulesrc"."2"."clientmachine".value = "localhost";
"kwinrulesrc"."2"."desktops".value = "\\0";
"kwinrulesrc"."2"."size".value = "1420,969";
"kwinrulesrc"."2"."sizerule".value = 3;
"kwinrulesrc"."2"."skippager".value = true;
"kwinrulesrc"."2"."wmclass".value = "wezterm-gui org.wezfurlong.wezterm";
"kwinrulesrc"."2"."wmclasscomplete".value = true;
"kwinrulesrc"."2"."wmclassmatch".value = 1;
"kwinrulesrc"."3"."Description".value = "Application settings for org.wezfurlong.wezterm";
"kwinrulesrc"."3"."size".value = "1420,969";
"kwinrulesrc"."3"."sizerule".value = 3;
"kwinrulesrc"."3"."wmclass".value = "wezterm-gui org.wezfurlong.wezterm";
"kwinrulesrc"."3"."wmclasscomplete".value = true;
"kwinrulesrc"."3"."wmclassmatch".value = 1;
"kwinrulesrc"."8d9e7fc8-749c-434f-a178-e92133fc9374"."Description".value = "Window settings for discord";
"kwinrulesrc"."8d9e7fc8-749c-434f-a178-e92133fc9374"."clientmachine".value = "localhost";
"kwinrulesrc"."8d9e7fc8-749c-434f-a178-e92133fc9374"."skippager".value = true;
"kwinrulesrc"."8d9e7fc8-749c-434f-a178-e92133fc9374"."skippagerrule".value = 3;
"kwinrulesrc"."8d9e7fc8-749c-434f-a178-e92133fc9374"."title".value = "#all-gay-circlejerk-club | Vensuli - Discord";
"kwinrulesrc"."8d9e7fc8-749c-434f-a178-e92133fc9374"."types".value = 1;
"kwinrulesrc"."8d9e7fc8-749c-434f-a178-e92133fc9374"."windowrole".value = "browser-window";
"kwinrulesrc"."8d9e7fc8-749c-434f-a178-e92133fc9374"."windowrolematch".value = 1;
"kwinrulesrc"."8d9e7fc8-749c-434f-a178-e92133fc9374"."wmclass".value = "discord";
"kwinrulesrc"."8d9e7fc8-749c-434f-a178-e92133fc9374"."wmclassmatch".value = 1;
"kwinrulesrc"."94b88066-bf8f-4089-8678-61be77391e5c"."Description".value = "Application settings for org.wezfurlong.wezterm"; "kwinrulesrc"."94b88066-bf8f-4089-8678-61be77391e5c"."Description".value = "Application settings for org.wezfurlong.wezterm";
"kwinrulesrc"."94b88066-bf8f-4089-8678-61be77391e5c"."size".value = "1420,969"; "kwinrulesrc"."94b88066-bf8f-4089-8678-61be77391e5c"."size".value = "1420,969";
"kwinrulesrc"."94b88066-bf8f-4089-8678-61be77391e5c"."sizerule".value = 3; "kwinrulesrc"."94b88066-bf8f-4089-8678-61be77391e5c"."sizerule".value = 3;
"kwinrulesrc"."94b88066-bf8f-4089-8678-61be77391e5c"."wmclass".value = "wezterm-gui org.wezfurlong.wezterm"; "kwinrulesrc"."94b88066-bf8f-4089-8678-61be77391e5c"."wmclass".value = "wezterm-gui org.wezfurlong.wezterm";
"kwinrulesrc"."94b88066-bf8f-4089-8678-61be77391e5c"."wmclasscomplete".value = true; "kwinrulesrc"."94b88066-bf8f-4089-8678-61be77391e5c"."wmclasscomplete".value = true;
"kwinrulesrc"."94b88066-bf8f-4089-8678-61be77391e5c"."wmclassmatch".value = 1; "kwinrulesrc"."94b88066-bf8f-4089-8678-61be77391e5c"."wmclassmatch".value = 1;
"kwinrulesrc"."General"."count".value = 1; "kwinrulesrc"."General"."count".value = 2;
"kwinrulesrc"."General"."rules".value = 1; "kwinrulesrc"."General"."rules".value = "1,2";
"kwinrulesrc"."eb7a8cbc-de66-4f33-b018-25f1c6bc80fc"."Description".value = "Application settings for discord";
"kwinrulesrc"."eb7a8cbc-de66-4f33-b018-25f1c6bc80fc"."clientmachine".value = "localhost";
"kwinrulesrc"."eb7a8cbc-de66-4f33-b018-25f1c6bc80fc"."desktops".value = "\\0";
"kwinrulesrc"."eb7a8cbc-de66-4f33-b018-25f1c6bc80fc"."desktopsrule".value = 2;
"kwinrulesrc"."eb7a8cbc-de66-4f33-b018-25f1c6bc80fc"."wmclass".value = "discord";
"kwinrulesrc"."eb7a8cbc-de66-4f33-b018-25f1c6bc80fc"."wmclassmatch".value = 1;
"kxkbrc"."Layout"."DisplayNames".value = ""; "kxkbrc"."Layout"."DisplayNames".value = "";
"kxkbrc"."Layout"."LayoutList".value = "us"; "kxkbrc"."Layout"."LayoutList".value = "us";
"kxkbrc"."Layout"."ResetOldOptions".value = true; "kxkbrc"."Layout"."ResetOldOptions".value = true;