Compare commits

...

7 commits

8 changed files with 105 additions and 91 deletions

View file

@ -80,11 +80,13 @@ in {
services = {
locate.enable = true;
media.mpd = {
enable = true;
musicDirectory = "/home/${config.modules.other.system.username}/cloud/media/Music";
};
uwsm.enable = true;
greetd.enable = true;
};
other = {
system = {

View file

@ -3,7 +3,7 @@
boot.initrd.luks.devices."cryptroot".device = "/dev/disk/by-uuid/96e8f3d6-8d2d-4e2d-abd9-3eb7f48fed02";
fileSystems = {
"/boot" = {
device = "/dev/disk/by-uuid/7825-451F";
device = "/dev/disk/by-uuid/B3AC-9050";
fsType = "vfat";
};
# root on tmpfs

View file

@ -3,58 +3,46 @@
lib,
pkgs,
...
}:
with lib; let
}: let
cfg = config.modules.services.greetd;
inherit (config.modules.other.system) username;
hyprlandConfig = pkgs.writeText "greetd-hyprland-config" ''
misc {
force_default_wallpaper=0
focus_on_activate=1
}
animations {
enabled=0
first_launch_animation=0
}
workspace=1,default:true,gapsout:0,gapsin:0,border:false,decorate:false
#exec-once=[workspace 1;fullscreen;noanim] ${
pkgs.greetd.${cfg.greeter}
}/bin/${cfg.greeter} -l; ${
pkgs.hyprland
}/bin/hyprctl dispatch exit
#exec-once=${
pkgs.hyprland
}/bin/hyprctl dispatch focuswindow ${cfg.greeter}
'';
uwsmEnabled = config.modules.services.uwsm.enable;
inherit (lib.options) mkOption mkEnableOption;
inherit (lib.types) str listOf;
inherit (lib.modules) mkIf;
in {
options.modules.services.greetd = {
enable = mkEnableOption "greetd";
greeter = mkOption {
description = "greetd frontend to use";
type = types.str;
type = str;
};
launchOptions = mkOption {
description = "/etc/greetd/environments as list of strings";
type = with types; listOf str;
type = listOf str;
};
session = mkOption {
description = "Which login session to start";
type = str;
default =
if uwsmEnabled
then "uwsm start Hyprland"
else "Hyprland";
};
};
config = mkIf cfg.enable {
services.greetd = {
enable = true;
package = pkgs.greetd;
settings.default_session = {
command = "${
pkgs.hyprland
}/bin/Hyprland --config ${hyprlandConfig}";
user = username;
command = ''
${pkgs.greetd.tuigreet}/bin/tuigreet \
-c '${cfg.session}' \
-r
-t --time-format "DD.MM.YYYY"
--asteriks'';
};
vt = 1;
};
environment.etc."greetd/environments".text =
concatStringsSep "\n" cfg.launchOptions;
};
}

View file

@ -14,11 +14,6 @@ in {
enable = true;
package = pkgs.uwsm;
waylandCompositors = {
hyprland = {
prettyName = "Hyprland";
comment = "Hyprland managed with UWSM";
binPath = "/run/current-system/sw/bin/Hyprland";
};
};
};
};

View file

@ -1,17 +1,28 @@
{pkgs, ...}: {
boot.loader = {
efi.canTouchEfiVariables = true;
grub = {
enable = true;
efiSupport = true;
device = "nodev";
configurationLimit = 5;
boot = {
initrd = {
verbose = true;
systemd.enable = true;
};
loader = {
efi.canTouchEfiVariables = true;
systemd-boot = {
enable = true;
editor = true;
configurationLimit = 5;
};
grub = {
enable = false;
efiSupport = true;
device = "nodev";
configurationLimit = 5;
};
};
plymouth = {
enable = false;
# font = "${pkgs.jetbrains-mono}/share/fonts/truetype/JetBrainsMono-Regular.ttf";
themePackages = [pkgs.catppuccin-plymouth];
theme = "catppuccin-macchiato";
};
};
boot.plymouth = {
enable = true;
# font = "${pkgs.jetbrains-mono}/share/fonts/truetype/JetBrainsMono-Regular.ttf";
themePackages = [pkgs.catppuccin-plymouth];
theme = "catppuccin-macchiato";
};
}

View file

@ -10,7 +10,7 @@ in {
# Hyprland settings
# Programs which get executed at Hyprland start.
exec-once = [
"hyprctl setcursor ${pkgs.rose-pine-cursor} BreezeX-RosePine-Linux"
"hyprctl setcursor BreezeX-RosePine-Linux 32"
"[workspace special:keepassxc; silent;tile] ${pkgs.keepassxc}/bin/keepassxc"
"[workspace special:audio; silent;tile] ${pkgs.pwvucontrol}/bin/pwvucontrol"

View file

@ -53,6 +53,7 @@ in {
plugins = [
pkgs.hyprlandPlugins.hyprsplit
];
withUWSM = true;
};
# xdg Portal
xdg.portal = {

View file

@ -27,6 +27,9 @@
typescript-language-server,
rustfmt,
clippy,
vscode-langservers-extracted,
ruff,
basedpyright,
...
}: let
inherit (lib) getExe;
@ -89,7 +92,7 @@
};
helix-languages = {
language = let
extraFormatter = lang: {
mark = lang: {
command = getExe deno;
args = ["fmt" "-" "--ext" lang];
};
@ -123,20 +126,24 @@
}
{
name = "json";
formatter = extraFormatter "json";
formatter = mark "json";
}
{
name = "markdown";
auto-format = true;
formatter = extraFormatter "md";
formatter = mark "md";
}
{
name = "qml";
language-servers = ["qmlls"];
}
{
name = "python";
language-servers = ["pyright"];
formatter = {
command = getExe black;
args = ["-" "--quiet" "--line-length 100"];
};
auto-format = true;
language-servers = [
"basedpyright"
"ruff"
];
}
{
name = "typescript";
@ -199,6 +206,28 @@
command = getExe cmake-language-server;
};
deno-lsp = {
command = lib.getExe deno;
args = ["lsp"];
environment.NO_COLOR = "1";
config.deno = {
enable = true;
lint = true;
unstable = true;
suggest = {
completeFunctionCalls = false;
imports = {hosts."https://deno.land" = true;};
};
inlayHints = {
enumMemberValues.enabled = true;
functionLikeReturnTypes.enabled = true;
parameterNames.enabled = "all";
parameterTypes.enabled = true;
propertyDeclarationTypes.enabled = true;
variableTypes.enabled = true;
};
};
};
dprint = {
command = getExe dprint;
args = ["lsp"];
@ -210,32 +239,10 @@
config.nil.formatting.command = ["${getExe alejandra}" "-q"];
};
pyright = {
command = "${pyright}/bin/pyright-langserver";
typescript-language-server = {
command = lib.getExe typescript-language-server;
args = ["--stdio"];
config = {
reportMissingTypeStubs = false;
analysis = {
typeCheckingMode = "basic";
autoImportCompletions = true;
};
};
};
typescript-language-server = {
command = getExe typescript-language-server;
args = ["--stdio"];
config = let
inlayHints = {
includeInlayEnumMemberValueHints = true;
includeInlayFunctionLikeReturnTypeHints = true;
includeInlayFunctionParameterTypeHints = true;
includeInlayParameterNameHints = "all";
includeInlayParameterNameHintsWhenArgumentMatchesName = true;
includeInlayPropertyDeclarationTypeHints = true;
includeInlayVariableTypeHints = true;
};
in {
typescript-language-server.source = {
addMissingImports.ts = true;
fixAll.ts = true;
@ -243,11 +250,21 @@
removeUnusedImports.ts = true;
sortImports.ts = true;
};
};
};
ruff = {
command = lib.getExe ruff;
args = ["server"];
};
basedpyright.command = "${basedpyright}/bin/basedpyright-langserver";
typescript = {inherit inlayHints;};
javascript = {inherit inlayHints;};
hostInfo = "helix";
vscode-css-language-server = {
command = "${vscode-langservers-extracted}/bin/vscode-css-languageserver";
args = ["--stdio"];
config = {
provideFormatter = true;
css.validate.enable = true;
scss.validate.enable = true;
};
};
};