diff --git a/flake.lock b/flake.lock index f485362..8fd4b40 100644 --- a/flake.lock +++ b/flake.lock @@ -152,6 +152,22 @@ "url": "https://channels.nixos.org/nixpkgs-unstable/nixexprs.tar.xz" } }, + "nixpkgs_3": { + "locked": { + "lastModified": 1773840656, + "narHash": "sha256-9tpvMGFteZnd3gRQZFlRCohVpqooygFuy9yjuyRL2C0=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "9cf7092bdd603554bd8b63c216e8943cf9b12512", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "root": { "inputs": { "flake-file": "flake-file", @@ -164,7 +180,8 @@ "nixpkgs-lib": [ "nixpkgs" ], - "sops-nix": "sops-nix" + "sops-nix": "sops-nix", + "wrapper-modules": "wrapper-modules" } }, "sops-nix": { @@ -201,6 +218,24 @@ "repo": "default", "type": "github" } + }, + "wrapper-modules": { + "inputs": { + "nixpkgs": "nixpkgs_3" + }, + "locked": { + "lastModified": 1774400689, + "narHash": "sha256-hHABVYL0rxhVIzc7hZEpvE0eiCKPnevte73Tn6FRolo=", + "owner": "BirdeeHub", + "repo": "nix-wrapper-modules", + "rev": "54645978682ff99594a1d1666dde6fac6a8134f2", + "type": "github" + }, + "original": { + "owner": "BirdeeHub", + "repo": "nix-wrapper-modules", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index c3f1821..3dc09aa 100644 --- a/flake.nix +++ b/flake.nix @@ -25,5 +25,6 @@ url = "github:Mic92/sops-nix"; inputs.nixpkgs.follows = "nixpkgs"; }; + wrapper-modules.url = "github:BirdeeHub/nix-wrapper-modules"; }; } diff --git a/modules/hosts/john-p14s/default.nix b/modules/hosts/john-p14s/default.nix index a26b4b8..f1ecbcd 100644 --- a/modules/hosts/john-p14s/default.nix +++ b/modules/hosts/john-p14s/default.nix @@ -11,6 +11,7 @@ "${inputs.nixos-hardware}/lenovo/thinkpad/p14s" "${inputs.nixos-hardware}/lenovo/thinkpad/p14s/amd/gen4" self.modules.nixos.p14sConfiguration + self.modules.nixos.niri ]; }; } \ No newline at end of file diff --git a/modules/programs/niri.nix b/modules/programs/niri.nix new file mode 100644 index 0000000..bbb878b --- /dev/null +++ b/modules/programs/niri.nix @@ -0,0 +1,32 @@ +{ self, inputs, ... }: { + flake-file.inputs = { + wrapper-modules.url = "github:BirdeeHub/nix-wrapper-modules"; + wrapper-modules.follows = "nixpkgs"; + }; + + flake.modules.nixos.niri = { pkgs, lib, ... }: { + programs.niri = { + enable = true; + package = self.packages.${pkgs.stdenv.hostPlatform.system}.myNiri; + }; + }; + + perSystem = { pkgs, lib, self', ... }: { + packages.myNiri = inputs.wrapper-modules.wrappers.niri.wrap { + inherit pkgs; + settings = { + spawn-at-startup = [ + { command = [ (lib.getExe self'.packages.myNoctalia) ]; } + ]; + xwayland-satellite.path = lib.getExe pkgs.xwayland-satellite; + input.keyboard.xkb.layout = "us,ua"; + layout.gaps = 5; + binds = { + "Mod+Return".spawn-sh = lib.getExe pkgs.ghostty; + "Mod+Q".close-window = null; + "Mod+S".spawn-sh = "${lib.getExe self'.packages.myNoctalia} ipc call launcher toggle"; + }; + }; + }; + }; +} \ No newline at end of file diff --git a/modules/programs/noctalia.nix b/modules/programs/noctalia.nix new file mode 100644 index 0000000..0707fb7 --- /dev/null +++ b/modules/programs/noctalia.nix @@ -0,0 +1,8 @@ +{ self, inputs, ... }: { + perSystem = { pkgs, ... }: { + packages.myNoctalia = inputs.wrapper-modules.wrappers.noctalia-shell.wrap { + inherit pkgs; + # settings = (builtins.fromJSON (builtins.readFile ./noctalia.json)).settings; + }; + }; +} \ No newline at end of file