diff --git a/hosts/temperance/configuration.nix b/hosts/temperance/configuration.nix index f117583..a8e084b 100644 --- a/hosts/temperance/configuration.nix +++ b/hosts/temperance/configuration.nix @@ -80,13 +80,11 @@ 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 = { diff --git a/hosts/temperance/filesystem/default.nix b/hosts/temperance/filesystem/default.nix index 7b7311f..2f79bbf 100644 --- a/hosts/temperance/filesystem/default.nix +++ b/hosts/temperance/filesystem/default.nix @@ -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/B3AC-9050"; + device = "/dev/disk/by-uuid/7825-451F"; fsType = "vfat"; }; # root on tmpfs diff --git a/modules/services/greetd.nix b/modules/services/greetd.nix index 3a01e75..0f9ee72 100644 --- a/modules/services/greetd.nix +++ b/modules/services/greetd.nix @@ -3,46 +3,58 @@ lib, pkgs, ... -}: let +}: +with lib; let cfg = config.modules.services.greetd; - uwsmEnabled = config.modules.services.uwsm.enable; - inherit (lib.options) mkOption mkEnableOption; - inherit (lib.types) str listOf; - inherit (lib.modules) mkIf; + 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} + ''; in { options.modules.services.greetd = { enable = mkEnableOption "greetd"; greeter = mkOption { description = "greetd frontend to use"; - type = str; + type = types.str; }; launchOptions = mkOption { description = "/etc/greetd/environments as list of strings"; - type = listOf str; - }; - session = mkOption { - description = "Which login session to start"; - type = str; - default = - if uwsmEnabled - then "uwsm start Hyprland" - else "Hyprland"; + type = with types; listOf str; }; }; config = mkIf cfg.enable { services.greetd = { enable = true; - package = pkgs.greetd; settings.default_session = { - command = '' - ${pkgs.greetd.tuigreet}/bin/tuigreet \ - -c '${cfg.session}' \ - -r - -t --time-format "DD.MM.YYYY" - --asteriks''; + command = "${ + pkgs.hyprland + }/bin/Hyprland --config ${hyprlandConfig}"; + user = username; }; - vt = 1; }; + + environment.etc."greetd/environments".text = + concatStringsSep "\n" cfg.launchOptions; }; } diff --git a/modules/services/uwsm/module.nix b/modules/services/uwsm/module.nix index 8a16d98..8a35c6d 100644 --- a/modules/services/uwsm/module.nix +++ b/modules/services/uwsm/module.nix @@ -14,6 +14,11 @@ in { enable = true; package = pkgs.uwsm; waylandCompositors = { + hyprland = { + prettyName = "Hyprland"; + comment = "Hyprland managed with UWSM"; + binPath = "/run/current-system/sw/bin/Hyprland"; + }; }; }; }; diff --git a/modules/system/boot/module.nix b/modules/system/boot/module.nix index 872f2ad..e9fa481 100644 --- a/modules/system/boot/module.nix +++ b/modules/system/boot/module.nix @@ -1,28 +1,17 @@ {pkgs, ...}: { - 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.loader = { + efi.canTouchEfiVariables = true; + grub = { + enable = true; + efiSupport = true; + device = "nodev"; + configurationLimit = 5; }; }; + boot.plymouth = { + enable = true; + # font = "${pkgs.jetbrains-mono}/share/fonts/truetype/JetBrainsMono-Regular.ttf"; + themePackages = [pkgs.catppuccin-plymouth]; + theme = "catppuccin-macchiato"; + }; } diff --git a/modules/wms/wayland/hyprland/exec.nix b/modules/wms/wayland/hyprland/exec.nix index 6a2c5f5..037b44e 100644 --- a/modules/wms/wayland/hyprland/exec.nix +++ b/modules/wms/wayland/hyprland/exec.nix @@ -10,7 +10,7 @@ in { # Hyprland settings # Programs which get executed at Hyprland start. exec-once = [ - "hyprctl setcursor BreezeX-RosePine-Linux 32" + "hyprctl setcursor ${pkgs.rose-pine-cursor} BreezeX-RosePine-Linux" "[workspace special:keepassxc; silent;tile] ${pkgs.keepassxc}/bin/keepassxc" "[workspace special:audio; silent;tile] ${pkgs.pwvucontrol}/bin/pwvucontrol" diff --git a/modules/wms/wayland/hyprland/module.nix b/modules/wms/wayland/hyprland/module.nix index e6e42c7..5b7e289 100644 --- a/modules/wms/wayland/hyprland/module.nix +++ b/modules/wms/wayland/hyprland/module.nix @@ -53,7 +53,6 @@ in { plugins = [ pkgs.hyprlandPlugins.hyprsplit ]; - withUWSM = true; }; # xdg Portal xdg.portal = { diff --git a/packages/helix.nix b/packages/helix.nix index d13623c..52ab14b 100644 --- a/packages/helix.nix +++ b/packages/helix.nix @@ -27,9 +27,6 @@ typescript-language-server, rustfmt, clippy, - vscode-langservers-extracted, - ruff, - basedpyright, ... }: let inherit (lib) getExe; @@ -92,7 +89,7 @@ }; helix-languages = { language = let - mark = lang: { + extraFormatter = lang: { command = getExe deno; args = ["fmt" "-" "--ext" lang]; }; @@ -126,24 +123,20 @@ } { name = "json"; - formatter = mark "json"; + formatter = extraFormatter "json"; } { name = "markdown"; auto-format = true; - formatter = mark "md"; - } - { - name = "qml"; - language-servers = ["qmlls"]; + formatter = extraFormatter "md"; } { name = "python"; - auto-format = true; - language-servers = [ - "basedpyright" - "ruff" - ]; + language-servers = ["pyright"]; + formatter = { + command = getExe black; + args = ["-" "--quiet" "--line-length 100"]; + }; } { name = "typescript"; @@ -206,28 +199,6 @@ 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"]; @@ -239,10 +210,32 @@ config.nil.formatting.command = ["${getExe alejandra}" "-q"]; }; - typescript-language-server = { - command = lib.getExe typescript-language-server; + pyright = { + command = "${pyright}/bin/pyright-langserver"; 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; @@ -250,21 +243,11 @@ removeUnusedImports.ts = true; sortImports.ts = true; }; - }; - }; - ruff = { - command = lib.getExe ruff; - args = ["server"]; - }; - basedpyright.command = "${basedpyright}/bin/basedpyright-langserver"; - 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; + typescript = {inherit inlayHints;}; + javascript = {inherit inlayHints;}; + + hostInfo = "helix"; }; }; };