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 '++'" | _ -> failwith "Unexpected number of '++'"
let verbatim, skipped = let verbatim, skipped =
match pre.Split "\n" |> List.ofArray with match pre.Split "\n" |> Seq.filter (fun s -> s <> "") |> List.ofSeq with
| "{pkgs}:" :: "with pkgs.vscode-extensions;" :: " [" :: rest -> | pkgsStr :: "with pkgs.vscode-extensions; [" :: rest when pkgsStr.Replace(" ", "") = "{pkgs}:" ->
rest rest
|> List.map (fun s -> |> List.map (fun s ->
if s.StartsWith '#' then Choice2Of2 (s.[2..].Trim()) else Choice1Of2 (s.Trim()) 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]" |> sprintf "[%s]"
|> fun s -> JsonSerializer.Deserialize<Version array> (s, options) |> fun s -> JsonSerializer.Deserialize<Version array> (s, options)
|> Seq.head |> 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 = let upgrade (nixFile : NixFile) : NixFile =
@@ -170,7 +172,7 @@ module Program =
File.ReadAllText sourceFile File.ReadAllText sourceFile
|> NixFile.Parse |> NixFile.Parse
|> upgrade |> upgrade
|> sprintf "%O" |> string<NixFile>
|> fun s -> File.WriteAllText (sourceFile, s) |> fun s -> File.WriteAllText (sourceFile, s)
0 0

View File

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

View File

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

91
flake.lock generated
View File

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

View File

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

View File

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

View File

@@ -13,38 +13,38 @@ with pkgs.vscode-extensions;
{ {
name = "remote-containers"; name = "remote-containers";
publisher = "ms-vscode-remote"; publisher = "ms-vscode-remote";
version = "0.242.0"; version = "0.285.0";
sha256 = "4Li0sYfHOsJMn5FJtvDTGKoGPcRmoosD9tZ7q9H9DfQ="; 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"; name = "vscode-pull-request-github";
publisher = "GitHub"; publisher = "GitHub";
version = "0.55.2022111609"; version = "0.61.2023031710";
sha256 = "sha256-PSPvpIW6OC/mST9poirQKVub+PAvShI411w3SK4gH6I=="; sha256 = "sha256-3CZYbEkpLaBkUexhdVdCevNNBHlu7EBszt5E1o4rif8=";
} }
{ {
name = "remote-ssh"; name = "remote-ssh";
publisher = "ms-vscode-remote"; publisher = "ms-vscode-remote";
version = "0.85.2022071315"; version = "0.99.2023031515";
sha256 = "hTRfoUHKrIOSV8eZ/62ewaII5291huXjOZ++dRUmKoI="; sha256 = "sha256-X77QJER3u+MhhP87TBEw8S+mTDkUymQM0aanHipRod4=";
} }
{ {
name = "vscode-docker"; name = "vscode-docker";
publisher = "ms-azuretools"; publisher = "ms-azuretools";
version = "1.22.1"; version = "1.24.0";
sha256 = "UPUfTOc5xJhI5ACm2oyWqtZ4zNxZjy16D6Mf30eHFEI="; sha256 = "sha256-zZ34KQrRPqVbfGdpYACuLMiMj4ZIWSnJIPac1yXD87k=";
}
{
name = "code-gnu-global";
publisher = "austin";
version = "0.2.2";
sha256 = "1fz89m6ja25aif6wszg9h2fh5vajk6bj3lp1mh0l2b04nw2mzhd5";
}
{
name = "rust-analyzer";
publisher = "matklad";
version = "0.4.1128";
sha256 = "t5CCUdFCiSYrMsBHG5eOfg3sXMacFWiR0hmVa7S1i8Y=";
} }
{ {
name = "toml"; name = "toml";
@@ -61,8 +61,14 @@ with pkgs.vscode-extensions;
{ {
name = "lean"; name = "lean";
publisher = "jroesch"; publisher = "jroesch";
version = "0.16.53"; version = "0.16.58";
sha256 = "hjflz5JHVr1YWq6QI9DpdNPY1uL7lAuQTMAdwCtLEfY="; sha256 = "sha256-e5+C6dAcpet4xOiifmTJ1vm2pNrcPhx/mjl70il5NG0=";
}
{
name = "lean4";
publisher = "leanprover";
version = "0.0.101";
sha256 = "sha256-tHxP6X6qp3qVkkCn5TjhHrYHHvGGWJ4kYE7la6bPT6w=";
} }
{ {
name = "language-haskell"; name = "language-haskell";
@@ -79,20 +85,14 @@ with pkgs.vscode-extensions;
{ {
name = "dotnet-interactive-vscode"; name = "dotnet-interactive-vscode";
publisher = "ms-dotnettools"; publisher = "ms-dotnettools";
version = "1.0.3362041"; version = "1.0.4165021";
sha256 = "a3u9NKsqHZKhZkKqJqo+LgJFTL2yhehBepTOFOXE+jY="; sha256 = "sha256-P5EHc5t4UyKEfxIGNTg+SyQPFlrbwaNIaprPY63iJ/k=";
}
{
name = "python";
publisher = "ms-python";
version = "2022.11.11961004";
sha256 = "hXTVZ7gbu234zyAg0ZrZPUo6oULB98apxe79U2yQHD4=";
} }
{ {
name = "mono-debug"; name = "mono-debug";
publisher = "ms-vscode"; publisher = "ms-vscode";
version = "0.16.2"; version = "0.16.3";
sha256 = "10hixqkw5r3cg52xkbky395lv72sb9d9wrngdvmrwx62hkbk5465"; sha256 = "sha256-6IU8aP4FQVbEMZAgssGiyqM+PAbwipxou5Wk3Q2mjZg=";
} }
{ {
name = "Theme-MarkdownKit"; name = "Theme-MarkdownKit";
@@ -109,7 +109,39 @@ with pkgs.vscode-extensions;
{ {
name = "debug"; name = "debug";
publisher = "webfreak"; publisher = "webfreak";
version = "0.26.0"; version = "0.26.1";
sha256 = "1l01sv6kwh8dlv3kygkkd0z9m37hahflzd5bx1wwij5p61jg7np9"; 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";
})
]