add json support for helix
change notification app for niri from mako to swaync add deno as json/jsonc formatter in helix add wluma to control backlight add taplo as toml formatter refactor waybar, and use waybar default config change gpg pinentry to shell script which can determine which session type is used fix error when SSH_CLIENT is unbind in pinentry script fix pinentry selector in pkgs
This commit is contained in:
parent
a20699531d
commit
47550dfff7
16 changed files with 459 additions and 8 deletions
|
|
@ -17,6 +17,8 @@
|
|||
./fuzzel.nix
|
||||
./firefox.nix
|
||||
./niri.nix
|
||||
./wluma.nix
|
||||
./waybar.nix
|
||||
];
|
||||
|
||||
options = {
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
outputs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
|
|
@ -26,7 +27,7 @@
|
|||
{
|
||||
enable = true;
|
||||
enableSshSupport = true;
|
||||
pinentryPackage = pkgs.pinentry-curses;
|
||||
pinentryPackage = outputs.packages."${pkgs.system}".pinentry-selector;
|
||||
}
|
||||
(lib.mkIf config.youthlic.programs.fish.enable {
|
||||
enableFishIntegration = true;
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@
|
|||
nixd
|
||||
deno
|
||||
nixfmt-rfc-style
|
||||
nodePackages_latest.vscode-json-languageserver
|
||||
];
|
||||
example = (
|
||||
with pkgs;
|
||||
|
|
@ -50,6 +51,76 @@
|
|||
config = builtins.fromTOML config-file;
|
||||
in
|
||||
config;
|
||||
languages = {
|
||||
language-server = {
|
||||
vscode-json-languageserver = {
|
||||
command = "vscode-json-languageserver";
|
||||
args = [ "--stdio" ];
|
||||
config = {
|
||||
provideFormatter = true;
|
||||
json = {
|
||||
validate = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
language = [
|
||||
{
|
||||
name = "toml";
|
||||
formatter = {
|
||||
command = "taplo";
|
||||
args = [
|
||||
"fmt"
|
||||
"-"
|
||||
];
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "markdown";
|
||||
formatter = {
|
||||
command = "deno";
|
||||
args = [
|
||||
"fmt"
|
||||
"-"
|
||||
"--ext"
|
||||
"md"
|
||||
];
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "json";
|
||||
language-servers = [
|
||||
"vscode-json-languageserver"
|
||||
];
|
||||
formatter = {
|
||||
command = "deno";
|
||||
args = [
|
||||
"fmt"
|
||||
"-"
|
||||
"--ext"
|
||||
"json"
|
||||
];
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "jsonc";
|
||||
language-servers = [
|
||||
"vscode-json-languageserver"
|
||||
];
|
||||
formatter = {
|
||||
command = "deno";
|
||||
args = [
|
||||
"fmt"
|
||||
"-"
|
||||
"--ext"
|
||||
"jsonc"
|
||||
];
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
home.packages = cfg.extraPackages;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -22,13 +22,14 @@ in
|
|||
};
|
||||
config = lib.mkIf cfg.enable {
|
||||
home.packages = with pkgs; [
|
||||
mako
|
||||
swaynotificationcenter
|
||||
swaybg
|
||||
xwayland-satellite
|
||||
waybar
|
||||
];
|
||||
youthlic.programs = {
|
||||
fuzzel.enable = true;
|
||||
wluma.enable = true;
|
||||
waybar.enable = true;
|
||||
};
|
||||
programs.niri = {
|
||||
config = builtins.readFile cfg.config;
|
||||
|
|
|
|||
33
home/modules/waybar.nix
Normal file
33
home/modules/waybar.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.youthlic.programs.waybar;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
youthlic.programs.waybar = {
|
||||
enable = lib.mkEnableOption "waybar";
|
||||
configDir = lib.mkOption {
|
||||
type = lib.types.path;
|
||||
example = ./config;
|
||||
description = ''
|
||||
path to waybar config dir
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
config = lib.mkIf cfg.enable {
|
||||
home.packages = with pkgs; [
|
||||
waybar
|
||||
];
|
||||
xdg.configFile."waybar" = {
|
||||
enable = true;
|
||||
source = cfg.configDir;
|
||||
recursive = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
57
home/modules/wluma.nix
Normal file
57
home/modules/wluma.nix
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.youthlic.programs.wluma;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
youthlic.programs.wluma = {
|
||||
enable = lib.mkEnableOption "wluma";
|
||||
config = lib.mkOption {
|
||||
type = lib.types.path;
|
||||
example = ./config.toml;
|
||||
description = ''
|
||||
path to config file of wluma
|
||||
'';
|
||||
};
|
||||
package = lib.mkOption {
|
||||
type = lib.types.package;
|
||||
example = pkgs.wluam;
|
||||
default = pkgs.wluma;
|
||||
description = ''
|
||||
pakcage of wluma
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
config = lib.mkIf cfg.enable {
|
||||
home.packages = [
|
||||
cfg.package
|
||||
];
|
||||
xdg.configFile."wluma/config.toml" = {
|
||||
enable = true;
|
||||
source = cfg.config;
|
||||
};
|
||||
systemd.user.services.wluma = {
|
||||
Unit = {
|
||||
Description = "Adjusting screen brightness based on screen contents and amount of ambient light";
|
||||
PartOf = [ "graphical-session.target" ];
|
||||
After = [ "graphical-session.target" ];
|
||||
};
|
||||
Service = {
|
||||
ExecStart = [ "${lib.getExe cfg.package}" ];
|
||||
Restart = "always";
|
||||
EnvironmentFile = [ "-%E/wluma/service.conf" ];
|
||||
PrivateNetwork = true;
|
||||
PrivateMounts = false;
|
||||
};
|
||||
Install = {
|
||||
WantedBy = [ "graphical-session.target" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue