From 91dcc93febee462e8b0b38aa377f8ca04e3534a5 Mon Sep 17 00:00:00 2001 From: Frantisek Bohacek Date: Mon, 2 Oct 2023 20:18:54 +0200 Subject: [PATCH] feat: add flake with python and lsp for qtile configuration --- .gitignore | 2 + modules/desktop/qtile/config/.envrc | 1 + modules/desktop/qtile/config/flake.lock | 61 +++++++++++++++++++++++++ modules/desktop/qtile/config/flake.nix | 33 +++++++++++++ 4 files changed, 97 insertions(+) create mode 100644 modules/desktop/qtile/config/.envrc create mode 100644 modules/desktop/qtile/config/flake.lock create mode 100644 modules/desktop/qtile/config/flake.nix diff --git a/.gitignore b/.gitignore index 4304a0d..cf31b3d 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,5 @@ tmp/ *.qcow2 result + +.direnv diff --git a/modules/desktop/qtile/config/.envrc b/modules/desktop/qtile/config/.envrc new file mode 100644 index 0000000..3550a30 --- /dev/null +++ b/modules/desktop/qtile/config/.envrc @@ -0,0 +1 @@ +use flake diff --git a/modules/desktop/qtile/config/flake.lock b/modules/desktop/qtile/config/flake.lock new file mode 100644 index 0000000..093268e --- /dev/null +++ b/modules/desktop/qtile/config/flake.lock @@ -0,0 +1,61 @@ +{ + "nodes": { + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1694529238, + "narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "ff7b65b44d01cf9ba6a71320833626af21126384", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1696262784, + "narHash": "sha256-3SlC8YAzqxaJbKWF2QXZPeJh7hdb/D04rFchtES9Kn0=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "9ea7fec070b3ab13613b144f4d70d8b1140dd43d", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "release-23.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + } + }, + "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", + "version": 7 +} diff --git a/modules/desktop/qtile/config/flake.nix b/modules/desktop/qtile/config/flake.nix new file mode 100644 index 0000000..7715962 --- /dev/null +++ b/modules/desktop/qtile/config/flake.nix @@ -0,0 +1,33 @@ +{ + description = "A very basic flake"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/release-23.05"; + flake-utils.url = "github:numtide/flake-utils"; + }; + + outputs = { self, flake-utils, nixpkgs }: + flake-utils.lib.eachDefaultSystem(system: let + pkgs = import nixpkgs { + inherit system; + }; + in rec { + + packages.python = pkgs.python310.withPackages (ps: with ps; [ + dbus-next + qtile + qtile-extras + ]); + packages.default = packages.python; + + devShells.default = pkgs.mkShell { + nativeBuildInputs = [ + packages.default + ]; + packages = [ + pkgs.nodePackages.pyright + ]; + }; + + }); +} -- 2.48.1