Many updates (#16)

This commit is contained in:
Patrick Stevens
2023-04-01 09:00:45 +01:00
committed by GitHub
parent 36171014c8
commit 44856ee782
9 changed files with 178 additions and 69 deletions

View File

@@ -87,8 +87,8 @@ type NixFile =
| _ -> failwith "Unexpected number of '++'"
let verbatim, skipped =
match pre.Split "\n" |> List.ofArray with
| "{pkgs}:" :: "with pkgs.vscode-extensions;" :: " [" :: rest ->
match pre.Split "\n" |> Seq.filter (fun s -> s <> "") |> List.ofSeq with
| pkgsStr :: "with pkgs.vscode-extensions; [" :: rest when pkgsStr.Replace(" ", "") = "{pkgs}:" ->
rest
|> List.map (fun s ->
if s.StartsWith '#' then Choice2Of2 (s.[2..].Trim()) else Choice1Of2 (s.Trim())
@@ -146,7 +146,9 @@ let upgradeExtension (client : HttpClient) (e : Extension) : Extension Async =
|> sprintf "[%s]"
|> fun s -> JsonSerializer.Deserialize<Version array> (s, options)
|> Seq.head
return { e with Version = latestVersion.Version }
if latestVersion.Version <> e.Version then
return { e with Version = latestVersion.Version ; Sha256 = "sha256-/000+cQBqzb6QB5+AizlyIcjqNpZ86o2at885hOcro0=" }
else return e
}
let upgrade (nixFile : NixFile) : NixFile =
@@ -170,7 +172,7 @@ module Program =
File.ReadAllText sourceFile
|> NixFile.Parse
|> upgrade
|> sprintf "%O"
|> string<NixFile>
|> fun s -> File.WriteAllText (sourceFile, s)
0

View File

@@ -2,7 +2,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
</PropertyGroup>
<ItemGroup>

2
cargo-config.toml Normal file
View File

@@ -0,0 +1,2 @@
[registries.crates-io]
protocol = "sparse"

View File

@@ -13,8 +13,9 @@
};
home.packages = [
# Broken on Apple Silicon
#nixpkgs.keepassxc
nixpkgs.keepassxc
# "Damaged and can't be opened"
#nixpkgs.bcompare
nixpkgs.rust-analyzer
nixpkgs.tmux
nixpkgs.wget
@@ -23,7 +24,8 @@
nixpkgs.cmake
nixpkgs.gnumake
nixpkgs.gcc
nixpkgs.gdb
#nixpkgs.gdb
nixpkgs.lldb
nixpkgs.hledger
nixpkgs.hledger-web
dotnet
@@ -36,7 +38,7 @@
nixpkgs.shellcheck
nixpkgs.html-tidy
nixpkgs.hugo
#nixpkgs.agda
nixpkgs.agda
nixpkgs.pijul
nixpkgs.universal-ctags
nixpkgs.asciinema
@@ -46,14 +48,21 @@
nixpkgs.rnix-lsp
nixpkgs.grpc-tools
nixpkgs.element-desktop
nixpkgs.ihp-new
nixpkgs.direnv
nixpkgs.lnav
nixpkgs.age
nixpkgs.nodejs
nixpkgs.sqlitebrowser
nixpkgs.typst
];
programs.vscode = {
enable = true;
package = nixpkgs.vscodium;
package = nixpkgs.vscode;
extensions = import ./vscode-extensions.nix {pkgs = nixpkgs;};
userSettings = {
workbench.colorTheme = "Default High Contrast";
workbench.colorTheme = "Default";
"files.Exclude" = {
"**/.git" = true;
"**/.DS_Store" = true;
@@ -66,10 +75,10 @@
"docker.dockerPath" = "${nixpkgs.docker}/bin/docker";
"lean.leanpkgPath" = "/Users/${username}/.elan/toolchains/stable/bin/leanpkg";
"lean.executablePath" = "/Users/${username}/.elan/toolchains/stable/bin/lean";
#"lean.executablePath" = "/Users/${username}/.elan/toolchains/lean4/bin/lean";
"explorer.confirmDelete" = false;
"lean.memoryLimit" = 16384;
"latex-workshop.view.pdf.viewer" = "tab";
"lean4.toolchainPath" = "/Users/${username}/.elan/toolchains/leanprover--lean4---nightly-2022-12-16";
};
};
@@ -81,6 +90,7 @@
};
home.file.".ssh/config".source = ./ssh.config;
home.file.".cargo/config.toml".source = ./cargo-config.toml;
home.file.".ideavimrc".source = ./ideavimrc;
@@ -88,7 +98,7 @@
home.file.".config/yt-dlp/config".source = ./youtube-dl.conf;
programs.emacs = {
enable = true;
package = nixpkgs.emacsNativeComp;
package = nixpkgs.emacsUnstable;
extraPackages = epkgs: [];
extraConfig = ''
(load-file (let ((coding-system-for-read 'utf-8))

View File

@@ -30,13 +30,15 @@ in {
services.nix-daemon.enable = true;
nix.package = pkgs.nixVersions.stable;
nix.gc.automatic = true;
nix.nixPath = ["darwin=/nix/store/zq4v3pi2wsfsrjkpk71kcn8srhbwjabf-nix-darwin"];
# Sandbox causes failure: https://github.com/NixOS/nix/issues/4119
nix.settings.sandbox = false;
nix.extraOptions = ''
auto-optimise-store = true
experimental-features = nix-command flakes ca-derivations
experimental-features = nix-command flakes
extra-experimental-features = ca-derivations
max-jobs = auto # Allow building multiple derivations in parallel
keep-outputs = true # Do not garbage-collect build time-only dependencies (e.g. clang)
keep-derivations = true

91
flake.lock generated
View File

@@ -7,16 +7,16 @@
]
},
"locked": {
"lastModified": 1668976789,
"narHash": "sha256-DmR/x/WqhitGTXbC5GFFfd6wBV9vYN4enyeC86RM20Y=",
"owner": "Smaug123",
"lastModified": 1680266963,
"narHash": "sha256-IW/lzbUCOcldLHWHjNSg1YoViDnZOmz0ZJL7EH9OkV8=",
"owner": "lnl7",
"repo": "nix-darwin",
"rev": "cb1491586696839f334e6736224d5d1a1d99b096",
"rev": "99d4187d11be86b49baa3a1aec0530004072374f",
"type": "github"
},
"original": {
"owner": "Smaug123",
"ref": "extract",
"owner": "lnl7",
"ref": "master",
"repo": "nix-darwin",
"type": "github"
}
@@ -29,16 +29,17 @@
]
},
"locked": {
"lastModified": 1668973951,
"narHash": "sha256-4KHSC7les2Ex0RmeLmtnK1CpbIeu84jOkDgsZ7QdgEo=",
"lastModified": 1678439275,
"narHash": "sha256-ugErJAZB0K5Ml6Gow94e3knILog9nSXpBTVVv70r6DY=",
"owner": "nix-community",
"repo": "emacs-overlay",
"rev": "721aa34f1468f13b664c5f42aed1e4a560c2801c",
"rev": "c8421fbdb7d831296ecb735c8a7f60964809c857",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "emacs-overlay",
"rev": "c8421fbdb7d831296ecb735c8a7f60964809c857",
"type": "github"
}
},
@@ -65,11 +66,11 @@
"utils": "utils"
},
"locked": {
"lastModified": 1668900402,
"narHash": "sha256-IhVlueHoQNoN0SOHZIceKU3LyEL00g2ei0aUlaNypbQ=",
"lastModified": 1680249941,
"narHash": "sha256-7Ylr0NAr8msd3YVaYBw6uyJIRbtOq5l6aLrmrYA5qTw=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "c0f9cbcf93ca22e4f0ca66843be61a4bdf6f0a44",
"rev": "67b97020b6970d39b4126a7870063d11337ecb80",
"type": "github"
},
"original": {
@@ -80,11 +81,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1668912770,
"narHash": "sha256-Nzt7ALUl5PrUAYIH8aRbj+njkJZVQ4VQBkWx+qQvqyM=",
"lastModified": 1680273054,
"narHash": "sha256-Bs6/5LpvYp379qVqGt9mXxxx9GSE789k3oFc+OAL07M=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "862277ac9d34273cd953f42061e23d488d6b7e8b",
"rev": "3364b5b117f65fe1ce65a3cdd5612a078a3b31e3",
"type": "github"
},
"original": {
@@ -94,21 +95,73 @@
"type": "github"
}
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1679748960,
"narHash": "sha256-BP8XcYHyj1NxQi04RpyNW8e7KiXSoI+Fy1tXIK2GfdA=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "da26ae9f6ce2c9ab380c0f394488892616fc5a6a",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "release-22.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1679734080,
"narHash": "sha256-z846xfGLlon6t9lqUzlNtBOmsgQLQIZvR6Lt2dImk1M=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "dbf5322e93bcc6cfc52268367a8ad21c09d76fea",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"darwin": "darwin",
"emacs": "emacs",
"home-manager": "home-manager",
"nixpkgs": "nixpkgs"
"nixpkgs": "nixpkgs",
"sops-nix": "sops-nix"
}
},
"sops-nix": {
"inputs": {
"nixpkgs": "nixpkgs_2",
"nixpkgs-stable": "nixpkgs-stable"
},
"locked": {
"lastModified": 1679993313,
"narHash": "sha256-pfZ/BxJDTifnQBMXg60OhwpJvg96LHvEXGtpHeGcWLM=",
"owner": "Mic92",
"repo": "sops-nix",
"rev": "5b26523e28989a7f56953b695184070c06335814",
"type": "github"
},
"original": {
"owner": "Mic92",
"repo": "sops-nix",
"type": "github"
}
},
"utils": {
"locked": {
"lastModified": 1667395993,
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
"lastModified": 1676283394,
"narHash": "sha256-XX2f9c3iySLCw54rJ/CZs+ZK6IQy7GXNY4nSOyu2QG4=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
"rev": "3db36a8b464d0c4532ba1c7dda728f4576d6d073",
"type": "github"
},
"original": {

View File

@@ -8,13 +8,17 @@
inputs.nixpkgs.follows = "nixpkgs";
};
darwin = {
url = "github:Smaug123/nix-darwin/extract";
url = "github:lnl7/nix-darwin/master";
# url = "github:Smaug123/nix-darwin/extract";
inputs.nixpkgs.follows = "nixpkgs";
};
emacs = {
url = "github:nix-community/emacs-overlay";
url = "github:nix-community/emacs-overlay/c8421fbdb7d831296ecb735c8a7f60964809c857";
inputs.nixpkgs.follows = "nixpkgs";
};
sops-nix = {
url = github:Mic92/sops-nix;
};
};
outputs = {
@@ -23,10 +27,12 @@
emacs,
nixpkgs,
home-manager,
sops-nix,
...
} @ inputs: let
config = {
#contentAddressedByDefault = true;
allowUnfree = true;
};
in let
overlays = [emacs.overlay] ++ import ./overlays.nix;
@@ -71,6 +77,7 @@
};
in [
./darwin-configuration.nix
sops-nix.nixosModules.sops
home-manager.darwinModules.home-manager
{
home-manager.useGlobalPkgs = true;

View File

@@ -11,6 +11,7 @@ in let
riderconfig = pkgs.stdenv.mkDerivation {
name = "rider-config";
version = "2021.2";
__contentAddressed = true;
src = src;
phases = ["unpackPhase"];

View File

@@ -13,38 +13,38 @@ with pkgs.vscode-extensions;
{
name = "remote-containers";
publisher = "ms-vscode-remote";
version = "0.242.0";
sha256 = "4Li0sYfHOsJMn5FJtvDTGKoGPcRmoosD9tZ7q9H9DfQ=";
version = "0.285.0";
sha256 = "sha256-UHp6Ewx0bUvPjgaO0A5k77SGj8ovPFLl/WvxyLcZ4y0=";
}
{
name = "nix-env-selector";
publisher = "arrterian";
version = "1.0.9";
sha256 = "sha256-TkxqWZ8X+PAonzeXQ+sI9WI+XlqUHll7YyM7N9uErk0=";
}
{
name = "vscode-hsx";
publisher = "s0kil";
version = "0.4.0";
sha256 = "sha256-/WRy+cQBqzb6QB5+AizlyIcjqNpZ86o2at885hOcroM=";
}
{
name = "vscode-pull-request-github";
publisher = "GitHub";
version = "0.55.2022111609";
sha256 = "sha256-PSPvpIW6OC/mST9poirQKVub+PAvShI411w3SK4gH6I==";
version = "0.61.2023031710";
sha256 = "sha256-3CZYbEkpLaBkUexhdVdCevNNBHlu7EBszt5E1o4rif8=";
}
{
name = "remote-ssh";
publisher = "ms-vscode-remote";
version = "0.85.2022071315";
sha256 = "hTRfoUHKrIOSV8eZ/62ewaII5291huXjOZ++dRUmKoI=";
version = "0.99.2023031515";
sha256 = "sha256-X77QJER3u+MhhP87TBEw8S+mTDkUymQM0aanHipRod4=";
}
{
name = "vscode-docker";
publisher = "ms-azuretools";
version = "1.22.1";
sha256 = "UPUfTOc5xJhI5ACm2oyWqtZ4zNxZjy16D6Mf30eHFEI=";
}
{
name = "code-gnu-global";
publisher = "austin";
version = "0.2.2";
sha256 = "1fz89m6ja25aif6wszg9h2fh5vajk6bj3lp1mh0l2b04nw2mzhd5";
}
{
name = "rust-analyzer";
publisher = "matklad";
version = "0.4.1128";
sha256 = "t5CCUdFCiSYrMsBHG5eOfg3sXMacFWiR0hmVa7S1i8Y=";
version = "1.24.0";
sha256 = "sha256-zZ34KQrRPqVbfGdpYACuLMiMj4ZIWSnJIPac1yXD87k=";
}
{
name = "toml";
@@ -61,8 +61,14 @@ with pkgs.vscode-extensions;
{
name = "lean";
publisher = "jroesch";
version = "0.16.53";
sha256 = "hjflz5JHVr1YWq6QI9DpdNPY1uL7lAuQTMAdwCtLEfY=";
version = "0.16.58";
sha256 = "sha256-e5+C6dAcpet4xOiifmTJ1vm2pNrcPhx/mjl70il5NG0=";
}
{
name = "lean4";
publisher = "leanprover";
version = "0.0.101";
sha256 = "sha256-tHxP6X6qp3qVkkCn5TjhHrYHHvGGWJ4kYE7la6bPT6w=";
}
{
name = "language-haskell";
@@ -79,20 +85,14 @@ with pkgs.vscode-extensions;
{
name = "dotnet-interactive-vscode";
publisher = "ms-dotnettools";
version = "1.0.3362041";
sha256 = "a3u9NKsqHZKhZkKqJqo+LgJFTL2yhehBepTOFOXE+jY=";
}
{
name = "python";
publisher = "ms-python";
version = "2022.11.11961004";
sha256 = "hXTVZ7gbu234zyAg0ZrZPUo6oULB98apxe79U2yQHD4=";
version = "1.0.4165021";
sha256 = "sha256-P5EHc5t4UyKEfxIGNTg+SyQPFlrbwaNIaprPY63iJ/k=";
}
{
name = "mono-debug";
publisher = "ms-vscode";
version = "0.16.2";
sha256 = "10hixqkw5r3cg52xkbky395lv72sb9d9wrngdvmrwx62hkbk5465";
version = "0.16.3";
sha256 = "sha256-6IU8aP4FQVbEMZAgssGiyqM+PAbwipxou5Wk3Q2mjZg=";
}
{
name = "Theme-MarkdownKit";
@@ -109,7 +109,39 @@ with pkgs.vscode-extensions;
{
name = "debug";
publisher = "webfreak";
version = "0.26.0";
sha256 = "1l01sv6kwh8dlv3kygkkd0z9m37hahflzd5bx1wwij5p61jg7np9";
version = "0.26.1";
sha256 = "sha256-lLLa8SN+Sf9Tbi7HeWYWa2KhPQFJyQWrf9l3EUljwYo=";
}
{
name = "rust-analyzer";
publisher = "rust-lang";
version = "0.4.1440";
sha256 = "sha256-SZCiP82UV5E6PZRduQGxvOhrZw5noH9Cr0cFpATDKqc=";
}
{
name = "typst-lsp";
publisher = "nvarner";
version = "0.2.0";
sha256 = "sha256-FLFmXOGfFqZyf3YSMyVKwZh/tPdFCPY3Z++/6AI5FQc=";
}
]
++ [
(let
vsix = builtins.fetchurl {
name = "vadimcn-vscode-lldb.zip";
url = "https://github.com/vadimcn/codelldb/releases/download/v1.9.0/codelldb-aarch64-darwin.vsix";
sha256 = "sha256:1kxrxxlzasa9jl73lqh3n36fzpdgh2hbxpzp8fk6xyzcc5vm9zfb";
};
in
pkgs.vscode-utils.buildVscodeExtension
{
vsix = vsix;
src = vsix;
vscodeExtPublisher = "vadimcn";
vscodeExtName = "vscode-lldb";
vscodeExtUniqueId = "vadimcn-vscode-lldb";
publisher = "vadimcn";
version = "1.9.0";
name = "vadimcn-vscode-lldb-1.9.0";
})
]