diff --git a/dotfiles/takamaki/niri.kdl b/dotfiles/takamaki/niri.kdl index c9bcf59..ea3ff01 100644 --- a/dotfiles/takamaki/niri.kdl +++ b/dotfiles/takamaki/niri.kdl @@ -61,6 +61,7 @@ layout { default-column-width center-focused-column "never" always-center-single-column + empty-workspace-above-first } cursor { xcursor-theme "Bibata-Modern-Ice" @@ -107,6 +108,9 @@ binds { Mod+Shift+WheelScrollUp { focus-workspace-up; } Mod+Shift+WheelScrollDown { focus-workspace-down; } + Mod+equal { set-column-width "+2%"; } + Mod+minus { set-column-width "-2%"; } + Mod+Shift+Up { move-window-to-workspace-up; } Mod+Shift+Down { move-window-to-workspace-down; } Mod+Shift+Left { move-column-left; } @@ -144,6 +148,7 @@ window-rule { // Steam windows float (excluding main window) exclude title=r#"^notificationtoasts_\d+_desktop$"# default-window-height { proportion 0.5; } open-floating true + open-focused true } window-rule { match app-id="steam" title=r#"^notificationtoasts_\d+_desktop$"# diff --git a/flake.lock b/flake.lock index 2143d3f..8af0de1 100644 --- a/flake.lock +++ b/flake.lock @@ -251,6 +251,22 @@ "type": "github" } }, + "nixpkgs-26-05": { + "locked": { + "lastModified": 1788297115, + "narHash": "sha256-Z+vUNbfd2FIKkWOTkcT7RYlh3oFCnig/d2eXD1SWf2E=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "a3116115851d68b8952a2a4221cc25a84e56b532", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-26.05", + "repo": "nixpkgs", + "type": "github" + } + }, "nixpkgs-lib": { "locked": { "lastModified": 1785031560, @@ -319,6 +335,7 @@ "home-manager": "home-manager", "import-tree": "import-tree", "nixpkgs": "nixpkgs", + "nixpkgs-26-05": "nixpkgs-26-05", "noctalia": "noctalia", "spicetify": "spicetify", "stylix": "stylix" diff --git a/flake.nix b/flake.nix index 92eee91..3606d32 100644 --- a/flake.nix +++ b/flake.nix @@ -4,6 +4,8 @@ inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + nixpkgs-26-05.url = "github:nixos/nixpkgs/nixos-26.05"; + flake-parts.url = "github:hercules-ci/flake-parts"; import-tree.url = "github:vic/import-tree"; diff --git a/modules/dev-shells/biri.nix b/modules/dev-shells/biri.nix new file mode 100644 index 0000000..4ad7ea2 --- /dev/null +++ b/modules/dev-shells/biri.nix @@ -0,0 +1,67 @@ +{ inputs, self, ... }: { + perSystem = { system, ... }: let + pkgs = import inputs.nixpkgs { + inherit system; + overlays = [ + (final: prev: { + libdisplay-info = inputs.nixpkgs-26-05.legacyPackages.${system}.libdisplay-info; + }) + ]; + config = { }; + }; + in { + devShells.niri = with pkgs; mkShell { + name = "niri-dev-shell"; + + strictDeps = true; + + buildInputs = with pkgs; [ + llvmPackages_latest.llvm + glib + libsysprof-capture + pcre2 + libffi + util-linux + selinuxPackages.libselinux + pipewire + systemd + seatd + pango + libdisplay-info + libinput + libxkbcommon + libglvnd + libgbm + wayland + dbus + ]; + + nativeBuildInputs = [ + rustc + cargo + pkg-config + rustPlatform.bindgenHook + ]; + + env = { + # Force linking with libEGL and libwayland-client + # so they can be discovered by `dlopen()` + RUSTFLAGS = toString ( + map (arg: "-C link-arg=" + arg) [ + "-Wl,--push-state,--no-as-needed" + "-lEGL" + "-lwayland-client" + "-Wl,--pop-state" + ] + ); + + # Upstream recommends setting the commit hash manually when in a + # build environment where the Git repository is unavailable. + # See https://github.com/niri-wm/niri/wiki/Packaging-niri#version-string + NIRI_BUILD_COMMIT = "barrulus/biri"; + }; + + RUST_SRC_PATH = "${pkgs.rustPlatform.rustLibSrc}"; + }; + }; +} \ No newline at end of file diff --git a/modules/dev-shells/rust.nix b/modules/dev-shells/rust.nix new file mode 100644 index 0000000..3e31af7 --- /dev/null +++ b/modules/dev-shells/rust.nix @@ -0,0 +1,17 @@ +{ inputs, self, ... }: { + perSystem = { pkgs, ... }: { + devShells.rust = with pkgs; mkShell { + name = "rust-dev-shell"; + strictDeps = true; + + nativeBuildInputs = [ + rustc + cargo + pkg-config + rustPlatform.bindgenHook + ]; + + RUST_SRC_PATH = "${rustPlatform.rustLibSrc}"; + }; + }; +} \ No newline at end of file diff --git a/modules/hosts/takamaki/takamaki.nix b/modules/hosts/takamaki/takamaki.nix index 9c21919..528361a 100644 --- a/modules/hosts/takamaki/takamaki.nix +++ b/modules/hosts/takamaki/takamaki.nix @@ -17,11 +17,25 @@ ]; info = { - rootPath = "/home/grey/flake"; + userName = "grey"; hostName = "takamaki"; + rootPath = "/home/grey/flake"; stateVersion = "26.11"; }; + programs.sftpman = { + enable = true; + mounts = { + sakamoto = { + host = "sakamoto"; + mountDestPath = "/home/grey/mounts/ssh/sakamoto"; + mountPoint = "/"; + sshKey = "/home/grey/.ssh/id_sakamoto"; + user = "grey"; + }; + }; + }; + services.gpg-agent = { enable = true; extraConfig = '' @@ -71,6 +85,7 @@ extraPackages = with pkgs; [ nix-init github-desktop + self.packages.${stdenv.hostPlatform.system}.biri ]; shellScripts = let diff --git a/modules/packages/biri.nix b/modules/packages/biri.nix new file mode 100644 index 0000000..82d1929 --- /dev/null +++ b/modules/packages/biri.nix @@ -0,0 +1,40 @@ +{ inputs, self, ... }: { + perSystem = { pkgs, ... }: { + packages = let + finalAttrs = rec { + name = "${pname}-${version}"; + pname = "biri"; + version = "26.04"; + + src = pkgs.fetchFromGitHub { + owner = "barrulus"; + repo = pname; + rev = "82efb3c0fb688a0c738d15517a2e6a44ed7ca703"; + hash = "sha256-Gg4UHnugGnVZifxfKRUnxt3T+DSPgUvHEfE9tflA5zM="; + }; + + cargoHash = "sha256-aNovCzrTtmqTO33YtZap47npdN73zXC1bap5q5dZvZk="; + }; + + overrideAttrs = with pkgs; prev: { + rustPlatform = prev.rustPlatform // { + buildRustPackage = args: pkgs.rustPlatform.buildRustPackage (args finalAttrs // finalAttrs); + }; + }; + in { + biri = pkgs.niri.override (prev: overrideAttrs prev); + + biri-unwrapped = pkgs.niri.override (prev: (overrideAttrs prev) // { + rustPlatform = (overrideAttrs prev).rustPlatform // { + buildRustPackage = args: pkgs.rustPlatform.buildRustPackage (args finalAttrs // { + postInstall = '' + install -Dm0644 README.md resources/default-config.kdl -t $doc/share/doc/niri + mv docs/wiki $doc/share/doc/niri/wiki + cp -r . $out + ''; + }); + }; + }); + }; + }; +} \ No newline at end of file