From 6af765d032c04224aeec071bf0c7478a4ef47091 Mon Sep 17 00:00:00 2001 From: Patrick Stevens <3138005+Smaug123@users.noreply.github.com> Date: Mon, 29 Jan 2024 00:42:13 +0000 Subject: [PATCH] Update (#29) --- flake.lock | 150 +++++++++++++++++++++++++++++++--------- flake.nix | 11 ++- home-manager/darwin.nix | 3 + home-manager/home.nix | 10 ++- home-manager/init.vim | 2 +- 5 files changed, 135 insertions(+), 41 deletions(-) diff --git a/flake.lock b/flake.lock index 5203f64..6caa361 100644 --- a/flake.lock +++ b/flake.lock @@ -7,11 +7,11 @@ "rust-overlay": "rust-overlay" }, "locked": { - "lastModified": 1695000433, - "narHash": "sha256-CYB6YD+NLpmj/ORWlmeS/58PIHONF1G7cQMyXHo9ILo=", + "lastModified": 1705557527, + "narHash": "sha256-DuxxHTQ/W5KToFLWG4FUF8hLldNo9eXlbt7JgvhrMnY=", "owner": "tpwrules", "repo": "nixos-apple-silicon", - "rev": "096dc63e5426e17f70b4a8bf7716c3dd3430ba8c", + "rev": "6e324ab06cb27a19409ebc1dc2664bf1e585490a", "type": "github" }, "original": { @@ -27,11 +27,11 @@ ] }, "locked": { - "lastModified": 1695686713, - "narHash": "sha256-rJATx5B/nwlBpt7CJUf85LV27qWPbul5UVV8fu6ABPg=", + "lastModified": 1705915768, + "narHash": "sha256-+Jlz8OAqkOwJlioac9wtpsCnjgGYUhvLpgJR/5tP9po=", "owner": "lnl7", "repo": "nix-darwin", - "rev": "e236a1e598a9a59265897948ac9874c364b9555f", + "rev": "1e706ef323de76236eb183d7784f3bd57255ec0b", "type": "github" }, "original": { @@ -50,11 +50,11 @@ "nixpkgs-stable": "nixpkgs-stable" }, "locked": { - "lastModified": 1696012364, - "narHash": "sha256-UvVsjzwYvsDmiXijFA6VPzhyI92KC7ALXtgOBuNuUSc=", + "lastModified": 1706170797, + "narHash": "sha256-oGuFylWYU9OY5DaEJEK+Z7EL81Ln27xz01LN9+8U0P0=", "owner": "nix-community", "repo": "emacs-overlay", - "rev": "a3807ae37389f6effb13e30cc12933cfdd325d80", + "rev": "dd5d758f69dd1ae6d0399763aa73ca34974ce9e3", "type": "github" }, "original": { @@ -83,11 +83,29 @@ "systems": "systems" }, "locked": { - "lastModified": 1694529238, - "narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=", + "lastModified": 1705309234, + "narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=", "owner": "numtide", "repo": "flake-utils", - "rev": "ff7b65b44d01cf9ba6a71320833626af21126384", + "rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_2": { + "inputs": { + "systems": "systems_2" + }, + "locked": { + "lastModified": 1701680307, + "narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "4022d587cbbfd70fe950c1e2083a02621806a725", "type": "github" }, "original": { @@ -103,11 +121,11 @@ ] }, "locked": { - "lastModified": 1695984718, - "narHash": "sha256-LQwKgaaaFOkIcxarf0xQXeDJFwZ5BZWcgmPeo3xp2CM=", + "lastModified": 1706134977, + "narHash": "sha256-KwNb1Li3K6vuVwZ77tFjZ89AWBo7AiCs9t0Cens4BsM=", "owner": "nix-community", "repo": "home-manager", - "rev": "4f02e35f9d150573e1a710afa338846c2f6d850c", + "rev": "6359d40f6ec0b72a38e02b333f343c3d4929ec10", "type": "github" }, "original": { @@ -116,45 +134,57 @@ "type": "github" } }, + "model": { + "flake": false, + "locked": { + "narHash": "sha256-aMuDhcvEaioTWn+LUcnxfAgs2VFbM8xBVVfdzx2Cu8I=", + "type": "file", + "url": "https://huggingface.co/ggerganov/whisper.cpp/resolve/main/ggml-large-v3.bin?download=true" + }, + "original": { + "type": "file", + "url": "https://huggingface.co/ggerganov/whisper.cpp/resolve/main/ggml-large-v3.bin?download=true" + } + }, "nixpkgs": { "locked": { - "lastModified": 1694767346, - "narHash": "sha256-5uH27SiVFUwsTsqC5rs3kS7pBoNhtoy9QfTP9BmknGk=", + "lastModified": 1705316053, + "narHash": "sha256-J2Ey5mPFT8gdfL2XC0JTZvKaBw/b2pnyudEXFvl+dQM=", "owner": "nixos", "repo": "nixpkgs", - "rev": "ace5093e36ab1e95cb9463863491bee90d5a4183", + "rev": "c3e128f3c0ecc1fb04aef9f72b3dcc2f6cecf370", "type": "github" }, "original": { "owner": "nixos", "repo": "nixpkgs", - "rev": "ace5093e36ab1e95cb9463863491bee90d5a4183", + "rev": "c3e128f3c0ecc1fb04aef9f72b3dcc2f6cecf370", "type": "github" } }, "nixpkgs-stable": { "locked": { - "lastModified": 1695825837, - "narHash": "sha256-4Ne11kNRnQsmSJCRSSNkFRSnHC4Y5gPDBIQGjjPfJiU=", + "lastModified": 1705916986, + "narHash": "sha256-iBpfltu6QvN4xMpen6jGGEb6jOqmmVQKUrXdOJ32u8w=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "5cfafa12d57374f48bcc36fda3274ada276cf69e", + "rev": "d7f206b723e42edb09d9d753020a84b3061a79d8", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-23.05", + "ref": "nixos-23.11", "repo": "nixpkgs", "type": "github" } }, "nixpkgs-stable_2": { "locked": { - "lastModified": 1694908564, - "narHash": "sha256-ducA98AuWWJu5oUElIzN24Q22WlO8bOfixGzBgzYdVc=", + "lastModified": 1705033721, + "narHash": "sha256-K5eJHmL1/kev6WuqyqqbS1cdNnSidIZ3jeqJ7GbrYnQ=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "596611941a74be176b98aeba9328aa9d01b8b322", + "rev": "a1982c92d8980a0114372973cbdfe0a307f1bdea", "type": "github" }, "original": { @@ -166,16 +196,31 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1695830400, - "narHash": "sha256-gToZXQVr0G/1WriO83olnqrLSHF2Jb8BPcmCt497ro0=", + "lastModified": 1706006310, + "narHash": "sha256-nDPz0fj0IFcDhSTlXBU2aixcnGs2Jm4Zcuoj0QtmiXQ=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "8a86b98f0ba1c405358f1b71ff8b5e1d317f5db2", + "rev": "b43bb235efeab5324c5e486882ef46749188eee2", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-unstable", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { + "locked": { + "lastModified": 1695033101, + "narHash": "sha256-RQ4m+ycjdLdass7Hr4+Lzwnjw7wGhcUkKqWiJS3YxPM=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "d941d9491804e0ca01e03468dbf6f8d3a7919a16", + "type": "github" + }, + "original": { + "owner": "nixos", "repo": "nixpkgs", "type": "github" } @@ -187,7 +232,8 @@ "emacs": "emacs", "home-manager": "home-manager", "nixpkgs": "nixpkgs_2", - "sops-nix": "sops-nix" + "sops-nix": "sops-nix", + "whisper": "whisper" } }, "rust-overlay": { @@ -214,11 +260,11 @@ "nixpkgs-stable": "nixpkgs-stable_2" }, "locked": { - "lastModified": 1695284550, - "narHash": "sha256-z9fz/wz9qo9XePEvdduf+sBNeoI9QG8NJKl5ssA8Xl4=", + "lastModified": 1706130372, + "narHash": "sha256-fHZxKH1DhsXPP36a2vJ91Zy6S+q6+QRIFlpLr9fZHU8=", "owner": "Mic92", "repo": "sops-nix", - "rev": "2f375ed8702b0d8ee2430885059d5e7975e38f78", + "rev": "4606d9b1595e42ffd9b75b9e69667708c70b1d68", "type": "github" }, "original": { @@ -241,6 +287,42 @@ "repo": "default", "type": "github" } + }, + "systems_2": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "whisper": { + "inputs": { + "flake-utils": "flake-utils_2", + "model": "model", + "nixpkgs": "nixpkgs_3" + }, + "locked": { + "lastModified": 1704121968, + "narHash": "sha256-N8FJb+ohJ4Qt/m5RoAbwm3RP4VRjl+hA6PUCfjPhZo8=", + "owner": "Smaug123", + "repo": "whisper.cpp", + "rev": "04f8e0cdc73abe7c593b2c9405f0f590c51de95a", + "type": "github" + }, + "original": { + "owner": "Smaug123", + "ref": "nix", + "repo": "whisper.cpp", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index a091edd..b7ae31e 100644 --- a/flake.nix +++ b/flake.nix @@ -3,7 +3,7 @@ inputs = { nixpkgs = { - url = "github:NixOS/nixpkgs/nixos-unstable"; + url = "github:NixOS/nixpkgs/nixpkgs-unstable"; }; home-manager = { url = "github:nix-community/home-manager"; @@ -25,6 +25,9 @@ apple-silicon = { url = "github:tpwrules/nixos-apple-silicon"; }; + whisper = { + url = "github:Smaug123/whisper.cpp/nix"; + }; }; outputs = { @@ -35,6 +38,7 @@ home-manager, sops-nix, apple-silicon, + whisper, ... } @ inputs: let config = { @@ -69,7 +73,7 @@ args = { nixpkgs = pkgs; username = "patrick"; - dotnet = pkgs.dotnet-sdk_7; + dotnet = pkgs.dotnet-sdk_8; }; in [ ./home-manager/earthworm-config.nix @@ -95,7 +99,8 @@ args = { nixpkgs = pkgs; username = "patrick"; - dotnet = pkgs.dotnet-sdk_7; + dotnet = pkgs.dotnet-sdk_8; + whisper = whisper.packages.${system}; }; in [ ./darwin-configuration.nix diff --git a/home-manager/darwin.nix b/home-manager/darwin.nix index 36e6032..e6fe72c 100644 --- a/home-manager/darwin.nix +++ b/home-manager/darwin.nix @@ -2,6 +2,7 @@ nixpkgs, username, dotnet, + whisper, ... }: { imports = [./rider]; @@ -13,6 +14,8 @@ }; home.packages = [ + whisper.default + whisper.normalize # "Damaged and can't be opened" #nixpkgs.bcompare #nixpkgs.gdb diff --git a/home-manager/home.nix b/home-manager/home.nix index e1dcb20..8e93d09 100644 --- a/home-manager/home.nix +++ b/home-manager/home.nix @@ -131,7 +131,6 @@ }; "git.path" = "${nixpkgs.git}/bin/git"; "update.mode" = "none"; - "docker.dockerPath" = "${nixpkgs.docker}/bin/docker"; "explorer.confirmDelete" = false; }; }; @@ -159,7 +158,7 @@ let g:syntastic_check_on_wq = 0''; } - YouCompleteMe + # YouCompleteMe tagbar ]; programs.neovim.viAlias = true; @@ -169,6 +168,12 @@ programs.neovim.extraConfig = builtins.readFile ./init.vim; + programs.direnv = { + enable = true; + enableZshIntegration = true; + nix-direnv.enable = true; + }; + home.packages = [ nixpkgs.keepassxc nixpkgs.rust-analyzer @@ -182,7 +187,6 @@ nixpkgs.hledger nixpkgs.hledger-web dotnet - nixpkgs.docker nixpkgs.jitsi-meet nixpkgs.ripgrep nixpkgs.elan diff --git a/home-manager/init.vim b/home-manager/init.vim index a9d3ed4..3b8a818 100644 --- a/home-manager/init.vim +++ b/home-manager/init.vim @@ -148,7 +148,7 @@ endif set encoding=utf8 " Use Unix as the standard file type -set ffs=unix,dos,mac +set ffs=unix,mac """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""