Compare commits
7 commits
edd3ffff2d
...
c5add0f1f7
Author | SHA1 | Date | |
---|---|---|---|
c5add0f1f7 |
|||
c394cb70f6 |
|||
4773f4abef |
|||
2a145bb8d0 |
|||
edaa90d993 |
|||
500c9d2cd6 |
|||
69bd84f240 |
8 changed files with 105 additions and 91 deletions
|
@ -80,11 +80,13 @@ in {
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
locate.enable = true;
|
locate.enable = true;
|
||||||
|
|
||||||
media.mpd = {
|
media.mpd = {
|
||||||
enable = true;
|
enable = true;
|
||||||
musicDirectory = "/home/${config.modules.other.system.username}/cloud/media/Music";
|
musicDirectory = "/home/${config.modules.other.system.username}/cloud/media/Music";
|
||||||
};
|
};
|
||||||
uwsm.enable = true;
|
uwsm.enable = true;
|
||||||
|
greetd.enable = true;
|
||||||
};
|
};
|
||||||
other = {
|
other = {
|
||||||
system = {
|
system = {
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
boot.initrd.luks.devices."cryptroot".device = "/dev/disk/by-uuid/96e8f3d6-8d2d-4e2d-abd9-3eb7f48fed02";
|
boot.initrd.luks.devices."cryptroot".device = "/dev/disk/by-uuid/96e8f3d6-8d2d-4e2d-abd9-3eb7f48fed02";
|
||||||
fileSystems = {
|
fileSystems = {
|
||||||
"/boot" = {
|
"/boot" = {
|
||||||
device = "/dev/disk/by-uuid/7825-451F";
|
device = "/dev/disk/by-uuid/B3AC-9050";
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
};
|
};
|
||||||
# root on tmpfs
|
# root on tmpfs
|
||||||
|
|
|
@ -3,58 +3,46 @@
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
with lib; let
|
|
||||||
cfg = config.modules.services.greetd;
|
cfg = config.modules.services.greetd;
|
||||||
inherit (config.modules.other.system) username;
|
uwsmEnabled = config.modules.services.uwsm.enable;
|
||||||
|
inherit (lib.options) mkOption mkEnableOption;
|
||||||
hyprlandConfig = pkgs.writeText "greetd-hyprland-config" ''
|
inherit (lib.types) str listOf;
|
||||||
misc {
|
inherit (lib.modules) mkIf;
|
||||||
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}
|
|
||||||
'';
|
|
||||||
in {
|
in {
|
||||||
options.modules.services.greetd = {
|
options.modules.services.greetd = {
|
||||||
enable = mkEnableOption "greetd";
|
enable = mkEnableOption "greetd";
|
||||||
greeter = mkOption {
|
greeter = mkOption {
|
||||||
description = "greetd frontend to use";
|
description = "greetd frontend to use";
|
||||||
type = types.str;
|
type = str;
|
||||||
};
|
};
|
||||||
launchOptions = mkOption {
|
launchOptions = mkOption {
|
||||||
description = "/etc/greetd/environments as list of strings";
|
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 {
|
config = mkIf cfg.enable {
|
||||||
services.greetd = {
|
services.greetd = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
package = pkgs.greetd;
|
||||||
settings.default_session = {
|
settings.default_session = {
|
||||||
command = "${
|
command = ''
|
||||||
pkgs.hyprland
|
${pkgs.greetd.tuigreet}/bin/tuigreet \
|
||||||
}/bin/Hyprland --config ${hyprlandConfig}";
|
-c '${cfg.session}' \
|
||||||
user = username;
|
-r
|
||||||
|
-t --time-format "DD.MM.YYYY"
|
||||||
|
--asteriks'';
|
||||||
};
|
};
|
||||||
|
vt = 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.etc."greetd/environments".text =
|
|
||||||
concatStringsSep "\n" cfg.launchOptions;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,11 +14,6 @@ in {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.uwsm;
|
package = pkgs.uwsm;
|
||||||
waylandCompositors = {
|
waylandCompositors = {
|
||||||
hyprland = {
|
|
||||||
prettyName = "Hyprland";
|
|
||||||
comment = "Hyprland managed with UWSM";
|
|
||||||
binPath = "/run/current-system/sw/bin/Hyprland";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,17 +1,28 @@
|
||||||
{pkgs, ...}: {
|
{pkgs, ...}: {
|
||||||
boot.loader = {
|
boot = {
|
||||||
|
initrd = {
|
||||||
|
verbose = true;
|
||||||
|
systemd.enable = true;
|
||||||
|
};
|
||||||
|
loader = {
|
||||||
efi.canTouchEfiVariables = true;
|
efi.canTouchEfiVariables = true;
|
||||||
grub = {
|
systemd-boot = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
editor = true;
|
||||||
|
configurationLimit = 5;
|
||||||
|
};
|
||||||
|
grub = {
|
||||||
|
enable = false;
|
||||||
efiSupport = true;
|
efiSupport = true;
|
||||||
device = "nodev";
|
device = "nodev";
|
||||||
configurationLimit = 5;
|
configurationLimit = 5;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
boot.plymouth = {
|
plymouth = {
|
||||||
enable = true;
|
enable = false;
|
||||||
# font = "${pkgs.jetbrains-mono}/share/fonts/truetype/JetBrainsMono-Regular.ttf";
|
# font = "${pkgs.jetbrains-mono}/share/fonts/truetype/JetBrainsMono-Regular.ttf";
|
||||||
themePackages = [pkgs.catppuccin-plymouth];
|
themePackages = [pkgs.catppuccin-plymouth];
|
||||||
theme = "catppuccin-macchiato";
|
theme = "catppuccin-macchiato";
|
||||||
};
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,7 @@ in {
|
||||||
# Hyprland settings
|
# Hyprland settings
|
||||||
# Programs which get executed at Hyprland start.
|
# Programs which get executed at Hyprland start.
|
||||||
exec-once = [
|
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:keepassxc; silent;tile] ${pkgs.keepassxc}/bin/keepassxc"
|
||||||
"[workspace special:audio; silent;tile] ${pkgs.pwvucontrol}/bin/pwvucontrol"
|
"[workspace special:audio; silent;tile] ${pkgs.pwvucontrol}/bin/pwvucontrol"
|
||||||
|
|
|
@ -53,6 +53,7 @@ in {
|
||||||
plugins = [
|
plugins = [
|
||||||
pkgs.hyprlandPlugins.hyprsplit
|
pkgs.hyprlandPlugins.hyprsplit
|
||||||
];
|
];
|
||||||
|
withUWSM = true;
|
||||||
};
|
};
|
||||||
# xdg Portal
|
# xdg Portal
|
||||||
xdg.portal = {
|
xdg.portal = {
|
||||||
|
|
|
@ -27,6 +27,9 @@
|
||||||
typescript-language-server,
|
typescript-language-server,
|
||||||
rustfmt,
|
rustfmt,
|
||||||
clippy,
|
clippy,
|
||||||
|
vscode-langservers-extracted,
|
||||||
|
ruff,
|
||||||
|
basedpyright,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit (lib) getExe;
|
inherit (lib) getExe;
|
||||||
|
@ -89,7 +92,7 @@
|
||||||
};
|
};
|
||||||
helix-languages = {
|
helix-languages = {
|
||||||
language = let
|
language = let
|
||||||
extraFormatter = lang: {
|
mark = lang: {
|
||||||
command = getExe deno;
|
command = getExe deno;
|
||||||
args = ["fmt" "-" "--ext" lang];
|
args = ["fmt" "-" "--ext" lang];
|
||||||
};
|
};
|
||||||
|
@ -123,20 +126,24 @@
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
name = "json";
|
name = "json";
|
||||||
formatter = extraFormatter "json";
|
formatter = mark "json";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
name = "markdown";
|
name = "markdown";
|
||||||
auto-format = true;
|
auto-format = true;
|
||||||
formatter = extraFormatter "md";
|
formatter = mark "md";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "qml";
|
||||||
|
language-servers = ["qmlls"];
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
name = "python";
|
name = "python";
|
||||||
language-servers = ["pyright"];
|
auto-format = true;
|
||||||
formatter = {
|
language-servers = [
|
||||||
command = getExe black;
|
"basedpyright"
|
||||||
args = ["-" "--quiet" "--line-length 100"];
|
"ruff"
|
||||||
};
|
];
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
name = "typescript";
|
name = "typescript";
|
||||||
|
@ -199,6 +206,28 @@
|
||||||
command = getExe cmake-language-server;
|
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 = {
|
dprint = {
|
||||||
command = getExe dprint;
|
command = getExe dprint;
|
||||||
args = ["lsp"];
|
args = ["lsp"];
|
||||||
|
@ -210,32 +239,10 @@
|
||||||
config.nil.formatting.command = ["${getExe alejandra}" "-q"];
|
config.nil.formatting.command = ["${getExe alejandra}" "-q"];
|
||||||
};
|
};
|
||||||
|
|
||||||
pyright = {
|
typescript-language-server = {
|
||||||
command = "${pyright}/bin/pyright-langserver";
|
command = lib.getExe typescript-language-server;
|
||||||
args = ["--stdio"];
|
args = ["--stdio"];
|
||||||
config = {
|
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 = {
|
typescript-language-server.source = {
|
||||||
addMissingImports.ts = true;
|
addMissingImports.ts = true;
|
||||||
fixAll.ts = true;
|
fixAll.ts = true;
|
||||||
|
@ -243,11 +250,21 @@
|
||||||
removeUnusedImports.ts = true;
|
removeUnusedImports.ts = true;
|
||||||
sortImports.ts = true;
|
sortImports.ts = true;
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
ruff = {
|
||||||
|
command = lib.getExe ruff;
|
||||||
|
args = ["server"];
|
||||||
|
};
|
||||||
|
basedpyright.command = "${basedpyright}/bin/basedpyright-langserver";
|
||||||
|
|
||||||
typescript = {inherit inlayHints;};
|
vscode-css-language-server = {
|
||||||
javascript = {inherit inlayHints;};
|
command = "${vscode-langservers-extracted}/bin/vscode-css-languageserver";
|
||||||
|
args = ["--stdio"];
|
||||||
hostInfo = "helix";
|
config = {
|
||||||
|
provideFormatter = true;
|
||||||
|
css.validate.enable = true;
|
||||||
|
scss.validate.enable = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue