My setup, with initial keymap
This commit is contained in:
50
flake.nix
Normal file
50
flake.nix
Normal file
@@ -0,0 +1,50 @@
|
||||
{
|
||||
outputs = {
|
||||
self,
|
||||
nixpkgs,
|
||||
}: let
|
||||
sys = "x86_64-linux";
|
||||
pkgs = nixpkgs.legacyPackages.${sys};
|
||||
in {
|
||||
packages.${sys} = rec {
|
||||
python3 = pkgs.python3.override {
|
||||
packageOverrides = final: prev: {
|
||||
milc = prev.milc.overrideAttrs {
|
||||
patches = [
|
||||
# Logs pre-initialization give long exceptions without this - they try to write directly to str('/dev/null')
|
||||
# This effects every `qmk` command post-userspaces, as they have an import-time 'find the userspace' operation
|
||||
# that logs in several different substeps
|
||||
# I have *no* idea how noone else has run into this at all, but I can't find any mention of it as an issue anywhere
|
||||
(pkgs.writeText "patch" ''
|
||||
diff --git a/milc/__init__.py b/milc/__init__.py
|
||||
index b3e7158..4f2843e 100644
|
||||
--- a/milc/__init__.py
|
||||
+++ b/milc/__init__.py
|
||||
@@ -39,7 +39,7 @@ if 'MILC_IGNORE_DEPRECATED' not in os.environ:
|
||||
if name in os.environ:
|
||||
warnings.warn(f'Using {name} is deprecated and will not be supported in the future, please use set_metadata() instead.', stacklevel=2)
|
||||
|
||||
-logging.basicConfig(stream=os.devnull) # Disable logging until we can configure it how the user wants
|
||||
+logging.basicConfig(filename=os.devnull) # Disable logging until we can configure it how the user wants
|
||||
|
||||
cli = MILC(APP_NAME, APP_VERSION, APP_AUTHOR)
|
||||
'')
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
qmk = pkgs.qmk.override {inherit python3;};
|
||||
};
|
||||
devShells.${sys}.default = pkgs.mkShell {
|
||||
packages = with pkgs; [
|
||||
self.packages.${sys}.qmk
|
||||
clang
|
||||
clang-tools
|
||||
];
|
||||
shellHook = ''
|
||||
export QMK_HOME=$PWD/qmk_firmware
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user