From a5e8d0eb373816a03e6cae339b02e5910850663b Mon Sep 17 00:00:00 2001 From: twoneis Date: Sun, 19 Nov 2023 16:17:20 +0100 Subject: [PATCH] added niri from flake --- flake.lock | 137 +++++++++++++++++++++++++++++++++++++ flake.nix | 5 ++ modules/niri/default.nix | 28 +------- modules/system/default.nix | 3 +- 4 files changed, 145 insertions(+), 28 deletions(-) diff --git a/flake.lock b/flake.lock index 0d6c69d..0a4fdde 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,44 @@ { "nodes": { + "crane": { + "inputs": { + "nixpkgs": [ + "niri", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1700327093, + "narHash": "sha256-OgYvlBABxJYWhZ/HBd0bPVcIEkT+xDhDCpRYqtVhYWY=", + "owner": "ipetkov", + "repo": "crane", + "rev": "ae7cd510e508ee03d792005c2f1c0a3ff25ecb80", + "type": "github" + }, + "original": { + "owner": "ipetkov", + "repo": "crane", + "type": "github" + } + }, + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1681202837, + "narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "cfacdce06f30d2b68473a46042957675eebb3401", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, "home-manager": { "inputs": { "nixpkgs": [ @@ -20,6 +59,45 @@ "type": "github" } }, + "niri": { + "inputs": { + "crane": "crane", + "nix-filter": "nix-filter", + "nixpkgs": [ + "nixpkgs" + ], + "parts": "parts", + "rust": "rust" + }, + "locked": { + "lastModified": 1700406443, + "narHash": "sha256-Bb6cKBVMJHg9U/x8JjFgqhM/zrzdTg5fBoFp/UTTru8=", + "owner": "twoneis", + "repo": "niri", + "rev": "ead740c9518d34b4f542df0c188e70527801fd54", + "type": "github" + }, + "original": { + "owner": "twoneis", + "repo": "niri", + "type": "github" + } + }, + "nix-filter": { + "locked": { + "lastModified": 1694857738, + "narHash": "sha256-bxxNyLHjhu0N8T3REINXQ2ZkJco0ABFPn6PIe2QUfqo=", + "owner": "numtide", + "repo": "nix-filter", + "rev": "41fd48e00c22b4ced525af521ead8792402de0ea", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "nix-filter", + "type": "github" + } + }, "nixos-hardware": { "locked": { "lastModified": 1699997707, @@ -52,12 +130,71 @@ "type": "github" } }, + "parts": { + "inputs": { + "nixpkgs-lib": [ + "niri", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1698882062, + "narHash": "sha256-HkhafUayIqxXyHH1X8d9RDl1M2CkFgZLjKD3MzabiEo=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "8c9fa2545007b49a5db5f650ae91f227672c3877", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, "root": { "inputs": { "home-manager": "home-manager", + "niri": "niri", "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs" } + }, + "rust": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": [ + "niri", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1700360261, + "narHash": "sha256-8fRSHx5osjDELHSL7OHEfj/cOh8q+B7M9EF/yPR3bw8=", + "owner": "oxalica", + "repo": "rust-overlay", + "rev": "45066cb0b2505d8da581be8432a16238c867f199", + "type": "github" + }, + "original": { + "owner": "oxalica", + "repo": "rust-overlay", + "type": "github" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 8db033b..f77cab2 100644 --- a/flake.nix +++ b/flake.nix @@ -14,6 +14,11 @@ nixos-hardware = { url = "github:nixos/nixos-hardware/master"; }; + + niri = { + url = "github:twoneis/niri"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; outputs = { nixpkgs, home-manager, nixos-hardware, ... }: diff --git a/modules/niri/default.nix b/modules/niri/default.nix index 13b8986..22e3250 100644 --- a/modules/niri/default.nix +++ b/modules/niri/default.nix @@ -1,27 +1,3 @@ -{ pkgs, ... }: -let - niri = pkgs.callPackage ./niri {}; -in { - environment.systemPackages = [niri]; - services.xserver.displayManager.sessionPackages = [ - niri - /* - ((pkgs.callPackage ./niri {}).overrideAttrs (prevAttrs: rec { - postInstall = - let - niriSession = '' - [Desktop Entry] - Name=niri - Comment=Scrolling wayland compositor - Exec=niri - Type=Application - ''; - in '' - mkdir -p $out/share/wayland-sessions - echo "${niriSession}" > $out/share/wayland-sessions/niri.desktop - ''; - passthru.providedSessions = [ "niri" ]; - })) - */ - ]; +{ niri, ... }: { + services.xserver.displayManager.sessionPackages = [ niri.niri ]; } diff --git a/modules/system/default.nix b/modules/system/default.nix index e807e17..3a9a1bf 100644 --- a/modules/system/default.nix +++ b/modules/system/default.nix @@ -2,9 +2,8 @@ # your system. Help is available in the configuration.nix(5) man page # and in the NixOS manual (accessible by running ‘nixos-help’). -{ pkgs, ... }: { +{ pkgs, niri, ... }: { imports = [ - ../niri ../gnome ];