chore: fix trace warnings
fix: hyprland nvidia problems(WIP)
This commit is contained in:
parent
838b04b12a
commit
f386f780b9
|
@ -6,44 +6,114 @@
|
|||
}:
|
||||
let
|
||||
inherit (lib)
|
||||
types
|
||||
getExe
|
||||
mkEnableOption
|
||||
mkPackageOption
|
||||
mkIf
|
||||
mkOption
|
||||
mkPackageOption
|
||||
types
|
||||
;
|
||||
|
||||
cfg = config.services.actual;
|
||||
configFile = formatType.generate "config.json" cfg.settings;
|
||||
dataDir = "/var/lib/actual";
|
||||
|
||||
formatType = pkgs.formats.json { };
|
||||
in
|
||||
{
|
||||
options.services.actual = {
|
||||
enable = mkEnableOption "actual, a privacy focused app for managing your finances";
|
||||
package = mkPackageOption pkgs "actual" { };
|
||||
package = mkPackageOption pkgs "actual-server" { };
|
||||
|
||||
user = mkOption {
|
||||
type = types.str;
|
||||
default = "actual";
|
||||
description = ''
|
||||
User to run actual as.
|
||||
|
||||
::: {.note}
|
||||
If left as the default value this user will automatically be created
|
||||
on system activation, otherwise the sysadmin is responsible for
|
||||
ensuring the user exists.
|
||||
:::
|
||||
'';
|
||||
};
|
||||
|
||||
group = mkOption {
|
||||
type = types.str;
|
||||
default = "actual";
|
||||
description = ''
|
||||
Group under which to run.
|
||||
|
||||
::: {.note}
|
||||
If left as the default value this group will automatically be created
|
||||
on system activation, otherwise the sysadmin is responsible for
|
||||
ensuring the user exists.
|
||||
:::
|
||||
'';
|
||||
};
|
||||
|
||||
openFirewall = mkOption {
|
||||
default = false;
|
||||
type = types.bool;
|
||||
description = "Whether to open the firewall for the specified port.";
|
||||
};
|
||||
|
||||
settings = mkOption {
|
||||
default = { };
|
||||
description = "Server settings, refer to (the documentation)[https://actualbudget.org/docs/config/] for available options.";
|
||||
type = types.submodule {
|
||||
freeformType = formatType.type;
|
||||
|
||||
options = {
|
||||
hostname = mkOption {
|
||||
type = types.str;
|
||||
description = "The address to listen on";
|
||||
default = "::";
|
||||
};
|
||||
|
||||
port = mkOption {
|
||||
type = types.port;
|
||||
description = "The port to listen on";
|
||||
default = 3000;
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
serverFiles = "/var/lib/actual/server-files";
|
||||
userFiles = "/var/lib/actual/user-files";
|
||||
dataDir = "/var/lib/actual";
|
||||
serverFiles = "${dataDir}/server-files";
|
||||
userFiles = "${dataDir}/user-files";
|
||||
inherit dataDir;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
config.systemd.services.actual = {
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
networking.firewall.allowedTCPPorts = mkIf cfg.openFirewall [ cfg.settings.port ];
|
||||
|
||||
users.groups = mkIf (cfg.group == "actual") {
|
||||
${cfg.group} = { };
|
||||
};
|
||||
|
||||
users.users = mkIf (cfg.user == "actual") {
|
||||
${cfg.user} = {
|
||||
isSystemUser = true;
|
||||
inherit (cfg) group;
|
||||
home = dataDir;
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services.actual = {
|
||||
description = "Actual server, a local-first personal finance app";
|
||||
after = [ "network.target" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
environment.ACTUAL_CONFIG_PATH = configFile;
|
||||
serviceConfig = {
|
||||
ExecStartPre = "${pkgs.coreutils}/bin/ln -sf ${cfg.package}/migrations /var/lib/actual/";
|
||||
ExecStart = lib.getExe cfg.package;
|
||||
User = "actual";
|
||||
Group = "actual";
|
||||
DynamicUser = true;
|
||||
ExecStart = getExe cfg.package;
|
||||
User = cfg.user;
|
||||
Group = cfg.group;
|
||||
StateDirectory = "actual";
|
||||
WorkingDirectory = "/var/lib/actual";
|
||||
WorkingDirectory = dataDir;
|
||||
LimitNOFILE = "1048576";
|
||||
PrivateTmp = true;
|
||||
PrivateDevices = true;
|
||||
|
@ -79,6 +149,6 @@ in
|
|||
];
|
||||
UMask = "0077";
|
||||
};
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,6 +1,18 @@
|
|||
{ pkgs, lib, nixosConfig, ... }:
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
nixosConfig,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib) mkMerge optionals elem mkIf flip concatMap;
|
||||
inherit (lib)
|
||||
mkMerge
|
||||
optionals
|
||||
elem
|
||||
mkIf
|
||||
flip
|
||||
concatMap
|
||||
;
|
||||
#from https://github.com/hyprwm/Hyprland/issues/3835
|
||||
float_script = pkgs.writeShellScript "hyprland-bitwarden-float" ''
|
||||
handle() {
|
||||
|
@ -34,7 +46,8 @@ let
|
|||
# Listen to the Hyprland socket for events and process each line with the handle function
|
||||
${pkgs.socat}/bin/socat -U - UNIX-CONNECT:$XDG_RUNTIME_DIR/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock | while read -r line; do handle "$line"; done
|
||||
'';
|
||||
in {
|
||||
in
|
||||
{
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
settings = mkMerge [
|
||||
|
@ -53,22 +66,28 @@ in {
|
|||
touchpad = {
|
||||
natural_scroll = true;
|
||||
disable_while_typing = true;
|
||||
clickfinger_behavior = true;
|
||||
scroll_factor = 0.7;
|
||||
};
|
||||
};
|
||||
gestures = { workspace_swipe = true; };
|
||||
gestures = {
|
||||
workspace_swipe = true;
|
||||
};
|
||||
|
||||
general = {
|
||||
gaps_in = 0;
|
||||
gaps_out = 0;
|
||||
allow_tearing = true;
|
||||
};
|
||||
render = {
|
||||
explicit_sync = 0;
|
||||
direct_scanout = false;
|
||||
};
|
||||
binds = {
|
||||
focus_preferred_method = 1;
|
||||
workspace_center_on = 1;
|
||||
};
|
||||
bind = let
|
||||
bind =
|
||||
let
|
||||
monitor_binds = {
|
||||
"1" = "j";
|
||||
"2" = "d";
|
||||
|
@ -80,9 +99,11 @@ in {
|
|||
"8" = "F3";
|
||||
"9" = "F4";
|
||||
};
|
||||
in [
|
||||
in
|
||||
[
|
||||
"SUPER,q,killactive,"
|
||||
"SUPER,return,fullscreen,"
|
||||
"SUPER + SHIFT,return,fullscreenstate,2,0,"
|
||||
"SUPER,f,togglefloating"
|
||||
"SUPER,g,togglegroup"
|
||||
"SUPER,tab,cyclenext,"
|
||||
|
@ -129,14 +150,16 @@ in {
|
|||
"CTRL,F9,exec,systemctl --user start swww-update-wallpaper"
|
||||
|
||||
"SUPER + SHIFT,q,exit"
|
||||
] ++ flip concatMap (map toString (lib.lists.range 1 9)) (x: [
|
||||
]
|
||||
++ flip concatMap (map toString (lib.lists.range 1 9)) (x: [
|
||||
"SUPER,${monitor_binds."${x}"},workspace,${x}"
|
||||
"SUPER + SHIFT,${monitor_binds."${x}"},movetoworkspacesilent,${x}"
|
||||
]);
|
||||
|
||||
cursor.no_warps = true;
|
||||
debug.disable_logs = false;
|
||||
env = [
|
||||
env =
|
||||
[
|
||||
"NIXOS_OZONE_WL,1"
|
||||
"MOZ_ENABLE_WAYLAND,1"
|
||||
"_JAVA_AWT_WM_NONREPARENTING,1"
|
||||
|
@ -145,8 +168,8 @@ in {
|
|||
"GDK_BACKEND,wayland"
|
||||
"WLR_DRM_NO_ATOMIC,1" # retest on newest nvidia driver
|
||||
"XDG_SESSION_TYPE,wayland"
|
||||
] ++ optionals
|
||||
(elem "nvidia" nixosConfig.services.xserver.videoDrivers) [
|
||||
]
|
||||
++ optionals (elem "nvidia" nixosConfig.services.xserver.videoDrivers) [
|
||||
# See https://wiki.hyprland.org/Nvidia/
|
||||
"LIBVA_DRIVER_NAME,nvidia"
|
||||
"GBM_BACKEND,nvidia-drm"
|
||||
|
@ -191,6 +214,7 @@ in {
|
|||
#baldur
|
||||
"immediate, class:^(steam_app_1086940)$"
|
||||
"float, class:^(steam)$, title:^(Friends List)"
|
||||
"float, class:^(steam)$, title:(Chat)"
|
||||
"workspace 2,class:^(firefox)$"
|
||||
"workspace 3,class:^(thunderbird)$"
|
||||
"workspace 4,class:^(bottles)$"
|
||||
|
@ -205,9 +229,9 @@ in {
|
|||
}
|
||||
(mkIf (nixosConfig.node.name == "desktopnix") {
|
||||
monitor = [
|
||||
"DVI-D-1,preferred,0x-1080,1"
|
||||
"HDMI-A-1,preferred,0x0,1"
|
||||
"DP-3,2560x1440@144.00Hz,1920x-540,1"
|
||||
"DVI-D-1,preferred,0x0,1"
|
||||
"HDMI-A-1,preferred,0x1080,1"
|
||||
"DP-3,2560x1440@144.00Hz,1920x540,1"
|
||||
# Thank you NVIDIA for this generous, free-of-charge, extra monitor that
|
||||
# doesn't exist and crashes yoru session sometimes when moving a window to it.
|
||||
"Unknown-1, disable"
|
||||
|
@ -223,7 +247,7 @@ in {
|
|||
"8, monitor:HDMI-A-1, default: true"
|
||||
"9, monitor:HDMI-A-1"
|
||||
];
|
||||
env = [ "HYPRLAND_FLOAT_LOCATION,3800 -400" ];
|
||||
env = [ "HYPRLAND_FLOAT_LOCATION,3800 680" ];
|
||||
})
|
||||
(mkIf (nixosConfig.node.name == "patricknix") {
|
||||
monitor = [
|
||||
|
|
|
@ -6,8 +6,10 @@
|
|||
./plugins/neo-tree.nix
|
||||
];
|
||||
programs.nixvim.plugins = {
|
||||
web-devicons.enable = true;
|
||||
lualine = {
|
||||
enable = true;
|
||||
settings = {
|
||||
extensions = [
|
||||
"fzf"
|
||||
"nvim-dap-ui"
|
||||
|
@ -17,10 +19,10 @@
|
|||
"quickfix"
|
||||
"fugitive"
|
||||
];
|
||||
componentSeparators.left = "";
|
||||
componentSeparators.right = "";
|
||||
sectionSeparators.left = "";
|
||||
sectionSeparators.right = "";
|
||||
component_separators.left = "";
|
||||
component_separators.right = "";
|
||||
section_separators.left = "";
|
||||
section_separators.right = "";
|
||||
sections = {
|
||||
lualine_a = [ "mode" ];
|
||||
lualine_b = [
|
||||
|
@ -48,13 +50,14 @@
|
|||
lualine_z = [ "location" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
fugitive.enable = true;
|
||||
neogit.enable = true;
|
||||
notify.enable = true;
|
||||
rainbow-delimiters.enable = true;
|
||||
rustaceanvim = {
|
||||
enable = true;
|
||||
settings.server.settings.files.excludeDirs = [ ".direnv" ];
|
||||
settings.server.default_settings.files.excludeDirs = [ ".direnv" ];
|
||||
};
|
||||
indent-blankline = {
|
||||
enable = true;
|
||||
|
@ -76,7 +79,7 @@
|
|||
diffview.enable = true;
|
||||
treesitter = {
|
||||
enable = true;
|
||||
indent = true;
|
||||
settings.indent.enable = true;
|
||||
nixvimInjections = true;
|
||||
};
|
||||
#treesitter-context.enable = true;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
programs.nixvim.plugins = {
|
||||
luasnip = {
|
||||
enable = true;
|
||||
extraConfig = {
|
||||
settings = {
|
||||
history = true;
|
||||
# Update dynamic snippets while typing
|
||||
updateevents = "TextChanged,TextChangedI";
|
||||
|
|
|
@ -49,8 +49,8 @@
|
|||
pyright.enable = true;
|
||||
texlab.enable = true;
|
||||
ocamllsp.enable = true;
|
||||
java-language-server.enable = true;
|
||||
nil-ls = {
|
||||
java_language_server.enable = true;
|
||||
nil_ls = {
|
||||
enable = true;
|
||||
settings = {
|
||||
formatting.command = [
|
||||
|
|
|
@ -22,6 +22,8 @@
|
|||
".config/google-chrome"
|
||||
".cache/google-chrome"
|
||||
|
||||
".config/Mullvad VPN"
|
||||
|
||||
# For nextcloud client install
|
||||
"Nextcloud"
|
||||
".config/Nextcloud"
|
||||
|
|
|
@ -32,6 +32,8 @@
|
|||
|
||||
yt-dlp
|
||||
|
||||
hyperfine
|
||||
|
||||
figlet
|
||||
cowsay
|
||||
cmatrix
|
||||
|
|
Loading…
Reference in a new issue