From 288289d6cecc91f2f4c3e384e8dde776fa2ca291 Mon Sep 17 00:00:00 2001 From: Charlie Root Date: Wed, 16 Apr 2025 22:34:25 +0200 Subject: [PATCH 01/10] flake.nix: cleanup --- flake.nix | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/flake.nix b/flake.nix index 28699fc..c7f8c3d 100644 --- a/flake.nix +++ b/flake.nix @@ -13,21 +13,23 @@ }) pkgsFor; - formatter.x86_64-linux = inputs.nixpkgs.legacyPackages.x86_64-linux.alejandra; + formatter = eachSystem (system: pkgsFor.${system}.alejandra); - packages = eachSystem ( - system: { - inherit - (import ./packages rec { - pkgs = pkgsFor.${system}; - helix = inputs.helix.packages.${pkgs.system}.default; - }) - fish - wrapped-helix - kakoune - ; - } - ); + packages = + lib.mapAttrs ( + system: pkgs: { + inherit + (import ./packages rec { + inherit pkgs; + helix = inputs.helix.packages.${system}.default; + }) + fish + wrapped-helix + kakoune + ; + } + ) + pkgsFor; apps = eachSystem (system: let inherit (inputs.self.packages.${system}) fish wrapped-helix; From 1c662fcce6208d12ae19bab0774eacb82db9637a Mon Sep 17 00:00:00 2001 From: Charlie Root Date: Wed, 16 Apr 2025 22:34:25 +0200 Subject: [PATCH 02/10] owncloud/module.nix: unharden --- modules/services/owncloud/module.nix | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/modules/services/owncloud/module.nix b/modules/services/owncloud/module.nix index 2d7974e..0239704 100644 --- a/modules/services/owncloud/module.nix +++ b/modules/services/owncloud/module.nix @@ -30,19 +30,19 @@ in { # User = "cr"; # Group = "cr"; - Keyringmode = "shared"; - DevicePolicy = "closed"; - PrivateDevices = true; - PrivateTmp = true; - ProtectClock = true; - ProtectControlGroups = true; - ProtectControlGroup = true; - ProtectKernelLogs = true; - ProtectKernelModules = true; - ProtectKernelTunables = true; + # Keyringmode = "shared"; + # DevicePolicy = "closed"; + # PrivateDevices = true; + # PrivateTmp = true; + # ProtectClock = true; + # ProtectControlGroups = true; + # ProtectControlGroup = true; + # ProtectKernelLogs = true; + # ProtectKernelModules = true; + # ProtectKernelTunables = true; - ProtectSystem = "strict"; - SystemCallFilter = "~@clock @cpu-emulation @debug @obsolete @module @mount @raw-io @reboot @swap @privileged"; + # ProtectSystem = "strict"; + # SystemCallFilter = "~@clock @cpu-emulation @debug @obsolete @module @mount @raw-io @reboot @swap @privileged"; }; }; }; From 559ccacb10ff6c642eb1217ec7c83ea5ec22b608 Mon Sep 17 00:00:00 2001 From: Charlie Root Date: Wed, 16 Apr 2025 22:34:25 +0200 Subject: [PATCH 03/10] temperance/programs.nix: remove nextcloud-client --- hosts/temperance/programs.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/hosts/temperance/programs.nix b/hosts/temperance/programs.nix index 9559ac9..ca3d742 100644 --- a/hosts/temperance/programs.nix +++ b/hosts/temperance/programs.nix @@ -43,7 +43,6 @@ in { logiops mpv nautilus - nextcloud-client nheko nicotine-plus obsidian From 57612c66fe084d22beb1d86f17fa609d3e2a7dc2 Mon Sep 17 00:00:00 2001 From: Charlie Root Date: Wed, 16 Apr 2025 22:34:25 +0200 Subject: [PATCH 04/10] temperance/configuration.nix: disable docker --- hosts/temperance/configuration.nix | 2 +- packages/helix.nix | 24 +++++++++++++++++++++++- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/hosts/temperance/configuration.nix b/hosts/temperance/configuration.nix index 655f67f..cf0502c 100644 --- a/hosts/temperance/configuration.nix +++ b/hosts/temperance/configuration.nix @@ -36,7 +36,7 @@ in { udisks2.enable = true; }; - virtualisation.docker.enable = true; + virtualisation.docker.enable = false; meta = { mainUser.gitSigningKey = ""; diff --git a/packages/helix.nix b/packages/helix.nix index 305dbaa..fc3215d 100644 --- a/packages/helix.nix +++ b/packages/helix.nix @@ -31,6 +31,7 @@ tinymist, typescript-language-server, vscode-langservers-extracted, + simple-completion-language-server, helix, ... }: let @@ -136,6 +137,12 @@ auto-format = true; language-servers = ["dprint" "typescript-language-server"]; } + { + name = "jjdescription"; + scope = "source.jjdescription"; + file-types = ["jjdescription"]; + language-servers = ["scls"]; + } { name = "json"; formatter = mark "json"; @@ -144,10 +151,11 @@ name = "markdown"; auto-format = true; formatter = mark "md"; + language-servers = ["scls" "marksman"]; } { name = "nix"; - language-servers = ["nil"]; + language-servers = ["nil" "scls"]; } { name = "qml"; @@ -255,6 +263,20 @@ config.nil.formatting.command = ["${getExe alejandra}" "-q"]; }; + scls = { + command = getExe simple-completion-language-server; + config = { + max_completion_items = 100; # set max completion results len for each group: words, snippets, unicode-input + feature_words = true; # enable completion by word + feature_snippets = true; # enable snippets + snippets_first = true; # completions will return before snippets by default + snippets_inline_by_word_tail = false; # suggest snippets by WORD tail, for example text `xsq|` become `x^2|` when snippet `sq` has body `^2` + feature_unicode_input = false; # enable "unicode input" + feature_paths = false; # enable path completion + feature_citations = false; # enable citation completion (only on `citation` feature enabled) + }; + }; + typescript-language-server = { command = lib.getExe typescript-language-server; args = ["--stdio"]; From db01784a8b5bb54a31b937f283f2fa9d22c0092f Mon Sep 17 00:00:00 2001 From: Charlie Root Date: Wed, 16 Apr 2025 22:34:25 +0200 Subject: [PATCH 05/10] flake.lock: bump inputs --- flake.lock | 90 ++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 87 insertions(+), 3 deletions(-) diff --git a/flake.lock b/flake.lock index b0fc213..b4c7f98 100644 --- a/flake.lock +++ b/flake.lock @@ -189,6 +189,39 @@ "type": "github" } }, + "flake-utils_2": { + "inputs": { + "systems": "systems_2" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flakey-profile": { + "locked": { + "lastModified": 1712898590, + "narHash": "sha256-FhGIEU93VHAChKEXx905TSiPZKga69bWl1VB37FK//I=", + "owner": "lf-", + "repo": "flakey-profile", + "rev": "243c903fd8eadc0f63d205665a92d4df91d42d9d", + "type": "github" + }, + "original": { + "owner": "lf-", + "repo": "flakey-profile", + "type": "github" + } + }, "gitignore": { "inputs": { "nixpkgs": [ @@ -604,6 +637,41 @@ "type": "github" } }, + "lix": { + "flake": false, + "locked": { + "lastModified": 1737234286, + "narHash": "sha256-pgDJZjj4jpzkFxsqBTI/9Yb0n3gW+DvDtuv9SwQZZcs=", + "rev": "079528098f5998ba13c88821a2eca1005c1695de", + "type": "tarball", + "url": "https://git.lix.systems/api/v1/repos/lix-project/lix/archive/079528098f5998ba13c88821a2eca1005c1695de.tar.gz?rev=079528098f5998ba13c88821a2eca1005c1695de" + }, + "original": { + "type": "tarball", + "url": "https://git.lix.systems/lix-project/lix/archive/release-2.92.tar.gz" + } + }, + "lix-module": { + "inputs": { + "flake-utils": "flake-utils_2", + "flakey-profile": "flakey-profile", + "lix": "lix", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1742943028, + "narHash": "sha256-fprwZKE1uMzO9tiWWOrmLWBW3GPkMayQfb0xOvVFIno=", + "rev": "868d97695bab9d21f6070b03957bcace249fbe3c", + "type": "tarball", + "url": "https://git.lix.systems/api/v1/repos/lix-project/nixos-module/archive/868d97695bab9d21f6070b03957bcace249fbe3c.tar.gz?rev=868d97695bab9d21f6070b03957bcace249fbe3c" + }, + "original": { + "type": "tarball", + "url": "https://git.lix.systems/lix-project/nixos-module/archive/2.92.0-3.tar.gz" + } + }, "nixpak": { "inputs": { "flake-parts": [ @@ -765,10 +833,11 @@ "hyprland": "hyprland", "impermanence": "impermanence", "lanzaboote": "lanzaboote", + "lix-module": "lix-module", "nixpkgs": "nixpkgs_2", "quickshell": "quickshell", "schizofox": "schizofox", - "systems": "systems_3" + "systems": "systems_4" } }, "rust-overlay": { @@ -821,7 +890,7 @@ "nixpak": "nixpak", "nixpkgs": "nixpkgs_3", "searx-randomizer": "searx-randomizer", - "systems": "systems_2" + "systems": "systems_3" }, "locked": { "lastModified": 1744892989, @@ -876,6 +945,21 @@ } }, "systems_2": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_3": { "locked": { "lastModified": 1689347949, "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", @@ -890,7 +974,7 @@ "type": "github" } }, - "systems_3": { + "systems_4": { "locked": { "lastModified": 1689347949, "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", From c11fac7e01677ca0aba4a4eb52b56c7a596ccb5a Mon Sep 17 00:00:00 2001 From: Bloxx12 Date: Mon, 5 May 2025 11:05:40 +0200 Subject: [PATCH 06/10] flake: add lix module; set default nix to lix --- flake.nix | 7 ++++++- modules/system/nix/module.nix | 4 +++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/flake.nix b/flake.nix index c7f8c3d..64012ac 100644 --- a/flake.nix +++ b/flake.nix @@ -19,7 +19,7 @@ lib.mapAttrs ( system: pkgs: { inherit - (import ./packages rec { + (import ./packages { inherit pkgs; helix = inputs.helix.packages.${system}.default; }) @@ -74,5 +74,10 @@ # Mismatched system dependencies will lead to crashes and other issues. inputs.nixpkgs.follows = "nixpkgs"; }; + + lix-module = { + url = "https://git.lix.systems/lix-project/nixos-module/archive/2.92.0-3.tar.gz"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; } diff --git a/modules/system/nix/module.nix b/modules/system/nix/module.nix index 4f0d67a..69e8b78 100644 --- a/modules/system/nix/module.nix +++ b/modules/system/nix/module.nix @@ -12,10 +12,11 @@ in { imports = [ ./documentation.nix # nixos documentation ./nixpkgs.nix # global nixpkgs configuration + inputs.lix-module.nixosModules.default ]; nix = { - package = pkgs.lix; + # package = pkgs.lix; # fuck channels, no thanks channel.enable = mkForce false; @@ -98,6 +99,7 @@ in { "nix-command" # experimental nix commands "cgroups" # allow nix to execute builds inside cgroups "repl-flake" # nh os repl needs this on lix + "pipe-operator" ]; # Ensures that the result of Nix expressions is fully determined by From d89347da3260012b9bd43a06d6392062b75943a1 Mon Sep 17 00:00:00 2001 From: Bloxx12 Date: Mon, 5 May 2025 11:06:06 +0200 Subject: [PATCH 07/10] gui/foot.nix: fix bold font --- modules/programs/gui/foot.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/programs/gui/foot.nix b/modules/programs/gui/foot.nix index 5568d7b..fff3d61 100644 --- a/modules/programs/gui/foot.nix +++ b/modules/programs/gui/foot.nix @@ -18,7 +18,7 @@ locked-title = "no"; font = "Iosevka Nerd Font:size=14"; - font-bold = "Iosevka Nerd Font:size=14"; + font-bold = "Iosevka Nerd Font:size=14:style=Bold"; line-height = 20; letter-spacing = 0; From 087e9a3d4f832bc7e897a2a46d6b47681da4b55d Mon Sep 17 00:00:00 2001 From: Bloxx12 Date: Mon, 5 May 2025 11:06:26 +0200 Subject: [PATCH 08/10] hyprland/binds.nix: switch to quickshell launcher --- modules/wms/wayland/hyprland/binds.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/wms/wayland/hyprland/binds.nix b/modules/wms/wayland/hyprland/binds.nix index ed9c3ff..860ed20 100644 --- a/modules/wms/wayland/hyprland/binds.nix +++ b/modules/wms/wayland/hyprland/binds.nix @@ -31,7 +31,7 @@ in { "$mainMod, RETURN, exec, foot" "$mainMod, Q, killactive" "$mainMod, F, fullscreen, 0" - "$mainMod, D, exec, ${pkgs.procps}/bin/pkill fuzzel || ${getExe pkgs.fuzzel}" + "$mainMod, D, exec, ${getExe' inputs.quickshell.packages.${pkgs.stdenv.system}.default "quickshell"} msg launcher open" "$mainMod, SPACE, togglefloating, active" "$mainMod ALT, L, exec, ${getExe pkgs.hyprlock}" From ee58fd0628a26b66a5122e1a4d905d9960fdc5d4 Mon Sep 17 00:00:00 2001 From: Bloxx12 Date: Mon, 5 May 2025 11:06:51 +0200 Subject: [PATCH 09/10] packages/helix.nix: add clippy flags --- packages/helix.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/helix.nix b/packages/helix.nix index fc3215d..c084885 100644 --- a/packages/helix.nix +++ b/packages/helix.nix @@ -216,7 +216,10 @@ rust-analyzer = { config = { - check.command = "clippy"; + check = { + command = "clippy"; + extraArgs = ["--" "-W" "clippy::pedantic" "-W" "clippy::nursery" "-W" "clippy::perf"]; + }; cargo.features = "all"; }; }; From 4ef6c24751f8a1e8c89805729febf13e9c5504f5 Mon Sep 17 00:00:00 2001 From: Bloxx12 Date: Mon, 5 May 2025 11:07:09 +0200 Subject: [PATCH 10/10] hyprland/decorations.nix: enable decorations again --- modules/wms/wayland/hyprland/decorations.nix | 22 +++++++++++++------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/modules/wms/wayland/hyprland/decorations.nix b/modules/wms/wayland/hyprland/decorations.nix index 5d75710..2355693 100644 --- a/modules/wms/wayland/hyprland/decorations.nix +++ b/modules/wms/wayland/hyprland/decorations.nix @@ -5,7 +5,7 @@ _: { rounding = 10; rounding_power = 3; blur = { - enabled = false; + enabled = true; size = 3; passes = 2; }; @@ -19,13 +19,13 @@ _: { animations = { enabled = true; }; - animation = [ - "windows, 1, 4, dupa, popin" - "windowsOut, 1, 4, dupa, slide" - "border, 1, 15, default" - "fade, 1, 10, default" - "workspaces, 1, 5, dupa, slidevert" - ]; + animation = [ + "windows, 1, 4, dupa, popin" + "windowsOut, 1, 4, dupa, slide" + "border, 1, 15, default" + "fade, 1, 10, default" + "workspaces, 1, 5, dupa, slidevert" + ]; cursor = { hide_on_key_press = true; @@ -59,5 +59,11 @@ _: { "center, class: ^(code), title: ^(Open*)" "float, class:^(org.keepassxc.KeePassXC)$" ]; + + layerrule = [ + "blur, shell:launcher" + "ignorezero, shell:launcher" + "animation popin 90%, shell:launcher" + ]; }; }