mirror of
https://github.com/Smaug123/nix-dotfiles
synced 2025-10-20 13:48:41 +00:00
Compare commits
20 Commits
update-ext
...
166ef06a35
Author | SHA1 | Date | |
---|---|---|---|
|
166ef06a35 | ||
|
b07f725d3d | ||
|
4b3f3f886b | ||
|
028225eca7 | ||
|
b343f6bb01 | ||
|
2cd767ae5b | ||
|
44856ee782 | ||
|
36171014c8 | ||
|
df297beff1 | ||
|
4e6c9b03af | ||
|
460af9d007 | ||
|
b72a716083 | ||
|
f1d917d4ec | ||
|
f4678f910f | ||
|
cf0dbe7f44 | ||
|
c45a0d9df6 | ||
|
d22ad837a0 | ||
|
005de0c62a | ||
|
c9dd6b03ec | ||
|
5fda4e0165 |
8
.github/dependabot.yml
vendored
Normal file
8
.github/dependabot.yml
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
version: 2
|
||||
updates:
|
||||
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
|
50
.github/workflows/lint.yaml
vendored
Normal file
50
.github/workflows/lint.yaml
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
name: Lint
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
|
||||
jobs:
|
||||
shellcheck:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: "Checkout"
|
||||
uses: "actions/checkout@v4"
|
||||
- name: "Install Nix"
|
||||
uses: "cachix/install-nix-action@v23"
|
||||
with: { "extra_nix_config": "access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}" }
|
||||
- name: "Run Shellcheck"
|
||||
run: "nix develop --command bash -c \"find . -type f -name '*.sh' | xargs shellcheck\""
|
||||
|
||||
format:
|
||||
runs-on: "ubuntu-latest"
|
||||
steps:
|
||||
- name: "Checkout"
|
||||
uses: "actions/checkout@v4"
|
||||
- name: "Install Nix"
|
||||
uses: "cachix/install-nix-action@v23"
|
||||
with: { "extra_nix_config": "access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}" }
|
||||
- name: "Run Alejandra"
|
||||
run: "nix develop --command alejandra --check ."
|
||||
|
||||
flake-check:
|
||||
runs-on: "ubuntu-latest"
|
||||
steps:
|
||||
- name: "Checkout"
|
||||
uses: "actions/checkout@v4"
|
||||
- name: "Install Nix"
|
||||
uses: "cachix/install-nix-action@v23"
|
||||
with: { "extra_nix_config": "access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}" }
|
||||
- name: "Check flake"
|
||||
run: "nix flake check --all-systems"
|
||||
|
||||
all-required-checks-complete:
|
||||
runs-on: "ubuntu-latest"
|
||||
steps:
|
||||
- run: "echo \"All required checks complete.\""
|
||||
needs:
|
||||
- "shellcheck"
|
||||
- "format"
|
||||
- "flake-check"
|
1
.gitignore
vendored
1
.gitignore
vendored
@@ -2,3 +2,4 @@ result
|
||||
.idea/
|
||||
bin/
|
||||
obj/
|
||||
.DS_Store
|
||||
|
@@ -81,14 +81,14 @@ type NixFile =
|
||||
|
||||
static member Parse (s : string) : NixFile =
|
||||
let pre, post =
|
||||
s.Split "\n] ++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [\n"
|
||||
s.Split "++ pkgs.vscode-utils.extensionsFromVscodeMarketplace ["
|
||||
|> function
|
||||
| [| pre ; post |] -> pre, post
|
||||
| _ -> 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
|
@@ -2,7 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
install_nix () {
|
||||
echo "Installing Nix..."
|
||||
diskutil list > /dev/null || export PATH=/usr/sbin:$PATH
|
||||
diskutil list > /dev/null || export PATH="/usr/sbin:$PATH"
|
||||
curl -L https://nixos.org/nix/install | sh -s -- --darwin-use-unencrypted-nix-store-volume --daemon || exit 1
|
||||
echo "Nix installed."
|
||||
}
|
||||
@@ -23,4 +23,4 @@ nix-channel --update || exit 1
|
||||
|
||||
darwin-rebuild changelog || install_darwin_build || exit 1
|
||||
|
||||
NIX_PATH="darwin-config=$HOME/.nixpkgs/darwin-configuration.nix:/nix/var/nix/profiles/per-user/Patrick/channels:$NIX_PATH" darwin-rebuild switch || exit 1
|
||||
NIX_PATH="darwin-config=$HOME/.nixpkgs/darwin-configuration.nix:/nix/var/nix/profiles/per-user/patrick/channels:$NIX_PATH" darwin-rebuild switch || exit 1
|
||||
|
@@ -1,22 +1,23 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
let python = import ./python.nix { inherit pkgs; }; in
|
||||
|
||||
{
|
||||
{pkgs, ...}: let
|
||||
python = import ./python.nix {inherit pkgs;};
|
||||
in {
|
||||
nix.useDaemon = true;
|
||||
|
||||
# List packages installed in system profile. To search by name, run:
|
||||
# $ nix-env -qaP | grep wget
|
||||
|
||||
environment.systemPackages =
|
||||
[
|
||||
pkgs.alacritty
|
||||
pkgs.rustup
|
||||
pkgs.libiconv
|
||||
pkgs.clang
|
||||
#pkgs.keepassxc
|
||||
python
|
||||
];
|
||||
environment.systemPackages = [
|
||||
pkgs.alacritty
|
||||
pkgs.rustup
|
||||
pkgs.libiconv
|
||||
pkgs.clang
|
||||
python
|
||||
];
|
||||
|
||||
users.users.patrick = {
|
||||
home = "/Users/patrick";
|
||||
name = "patrick";
|
||||
};
|
||||
|
||||
# This line is required; otherwise, on shell startup, you won't have Nix stuff in the PATH.
|
||||
programs.zsh.enable = true;
|
||||
@@ -27,17 +28,20 @@ let python = import ./python.nix { inherit pkgs; }; in
|
||||
|
||||
# Auto upgrade nix package and the daemon service.
|
||||
services.nix-daemon.enable = true;
|
||||
nix.package = pkgs.nixFlakes;
|
||||
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.useSandbox = false;
|
||||
nix.settings.sandbox = false;
|
||||
|
||||
nix.extraOptions = ''
|
||||
auto-optimise-store = true
|
||||
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
|
||||
# Allow fetching build results from the Lean Cachix cache
|
||||
trusted-substituters = https://lean4.cachix.org/
|
||||
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= lean4.cachix.org-1:mawtxSxcaiWE24xCXXgh3qnvlTkyU7evRRnGeAhD4Wk=
|
||||
|
0
firmware/copy-from-host.txt
Normal file
0
firmware/copy-from-host.txt
Normal file
188
flake.lock
generated
188
flake.lock
generated
@@ -1,5 +1,25 @@
|
||||
{
|
||||
"nodes": {
|
||||
"apple-silicon": {
|
||||
"inputs": {
|
||||
"flake-compat": "flake-compat",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"rust-overlay": "rust-overlay"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1693064156,
|
||||
"narHash": "sha256-EnZntHnlPqWZIoa593zDV4GSkfbLLAL6VAreMvM6JN4=",
|
||||
"owner": "tpwrules",
|
||||
"repo": "nixos-apple-silicon",
|
||||
"rev": "bef25f9cdfd8513a42c175b88a1cb619e3ef5951",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "tpwrules",
|
||||
"repo": "nixos-apple-silicon",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"darwin": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
@@ -7,11 +27,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1645007752,
|
||||
"narHash": "sha256-FQZMiVP/1vgR7x+TWonMf0NZczrZ4ZjhSTj3rM+kglY=",
|
||||
"lastModified": 1692248770,
|
||||
"narHash": "sha256-tZeFpETKQGbgnaSIO1AGWD27IyTcBm4D+A9d7ulQ4NM=",
|
||||
"owner": "lnl7",
|
||||
"repo": "nix-darwin",
|
||||
"rev": "c944b5ee82a829ddf7fa6bd9300bc2fe3d005fa1",
|
||||
"rev": "511177ffe8226c78c9cf6a92a7b5f2df3684956b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -22,12 +42,19 @@
|
||||
}
|
||||
},
|
||||
"emacs": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"nixpkgs-stable": "nixpkgs-stable"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1644143491,
|
||||
"narHash": "sha256-ld5MzYesjOE8Ml5uvjFUFaxAozJEl48svwWQ3i7oggc=",
|
||||
"lastModified": 1693193430,
|
||||
"narHash": "sha256-6qsW+c7CTlrOkY3PuZksNgNVrRSqUhlA/Uzq7Kb/3IY=",
|
||||
"owner": "nix-community",
|
||||
"repo": "emacs-overlay",
|
||||
"rev": "4c7e0980a5f23684ca3ea772d4f62b0da4f55e3c",
|
||||
"rev": "78ec4983ba820b37fc2e7c998ead39be6bec7f6d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -36,6 +63,39 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-compat": {
|
||||
"locked": {
|
||||
"lastModified": 1688025799,
|
||||
"narHash": "sha256-ktpB4dRtnksm9F5WawoIkEneh1nrEvuxb5lJFt1iOyw=",
|
||||
"owner": "nix-community",
|
||||
"repo": "flake-compat",
|
||||
"rev": "8bf105319d44f6b9f0d764efa4fdef9f1cc9ba1c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "flake-compat",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils": {
|
||||
"inputs": {
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1692799911,
|
||||
"narHash": "sha256-3eihraek4qL744EvQXsK1Ha6C3CR7nnT8X2qWap4RNk=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "f9e7cf818399d17d347f847525c5a5a8032e4e44",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
@@ -43,11 +103,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1645140957,
|
||||
"narHash": "sha256-WTJzLSCDLBI537o2L/3kRyqEV5YRT7+1QSGryeKReHE=",
|
||||
"lastModified": 1693187908,
|
||||
"narHash": "sha256-cTcNpsqi1llmUFl9bmCdD0mTyfjhBrNFPhu2W12WXzA=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "4f4165a8b9108818ab0193bbd1a252106870b2a2",
|
||||
"rev": "8bde7a651b94ba30bd0baaa9c4a08aae88cc2e92",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -58,11 +118,59 @@
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1644972330,
|
||||
"narHash": "sha256-hEDWZcTDopnz4jRDhCmnH9VztdKSfR6mrudSM8+Jfco",
|
||||
"lastModified": 1692913444,
|
||||
"narHash": "sha256-1SvMQm2DwofNxXVtNWWtIcTh7GctEVrS/Xel/mdc6iY=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "1a5ff5ea0297dc8ec5a33b87dfb4fc78687068e6",
|
||||
"rev": "18324978d632ffc55ef1d928e81630c620f4f447",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "18324978d632ffc55ef1d928e81630c620f4f447",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-stable": {
|
||||
"locked": {
|
||||
"lastModified": 1693087214,
|
||||
"narHash": "sha256-Kn1SSqRfPpqcI1MDy82JXrPT1WI8c03TA2F0xu6kS+4=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "f155f0cf4ea43c4e3c8918d2d327d44777b6cad4",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-23.05",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-stable_2": {
|
||||
"locked": {
|
||||
"lastModified": 1693097136,
|
||||
"narHash": "sha256-fBZSMdBaoZ0INFbyZ5s0DOF7zDNcLsLxgkwdDh3l9Pc=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "9117c4e9dc117a6cd0319cca40f2349ed333669d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "release-23.05",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1693145325,
|
||||
"narHash": "sha256-Gat9xskErH1zOcLjYMhSDBo0JTBZKfGS0xJlIRnj6Rc=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "cddebdb60de376c1bdb7a4e6ee3d98355453fe56",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -74,10 +182,64 @@
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"apple-silicon": "apple-silicon",
|
||||
"darwin": "darwin",
|
||||
"emacs": "emacs",
|
||||
"home-manager": "home-manager",
|
||||
"nixpkgs": "nixpkgs"
|
||||
"nixpkgs": "nixpkgs_2",
|
||||
"sops-nix": "sops-nix"
|
||||
}
|
||||
},
|
||||
"rust-overlay": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1686795910,
|
||||
"narHash": "sha256-jDa40qRZ0GRQtP9EMZdf+uCbvzuLnJglTUI2JoHfWDc=",
|
||||
"owner": "oxalica",
|
||||
"repo": "rust-overlay",
|
||||
"rev": "5c2b97c0a9bc5217fc3dfb1555aae0fb756d99f9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "oxalica",
|
||||
"repo": "rust-overlay",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"sops-nix": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"nixpkgs-stable": "nixpkgs-stable_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1693105804,
|
||||
"narHash": "sha256-nlqNjW7dfucUJQqRGuG08MKPOSME8fLOCx/bd9hiEPs=",
|
||||
"owner": "Mic92",
|
||||
"repo": "sops-nix",
|
||||
"rev": "0618c8f0ed5255ad74ee08d1618841ff5af85c86",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "Mic92",
|
||||
"repo": "sops-nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
115
flake.nix
115
flake.nix
@@ -9,38 +9,117 @@
|
||||
};
|
||||
darwin = {
|
||||
url = "github:lnl7/nix-darwin/master";
|
||||
# url = "github:Smaug123/nix-darwin/extract";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
emacs = {
|
||||
url = "github:nix-community/emacs-overlay";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
sops-nix = {
|
||||
url = "github:Mic92/sops-nix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
apple-silicon = {
|
||||
url = "github:tpwrules/nixos-apple-silicon";
|
||||
};
|
||||
};
|
||||
|
||||
outputs = { self, darwin, emacs, nixpkgs, home-manager, ... }@inputs:
|
||||
let system = "aarch64-darwin"; in
|
||||
let config = {
|
||||
allowUnfreePredicate = pkg: builtins.elem (nixpkgs.lib.getName pkg) [
|
||||
"vscode"
|
||||
];
|
||||
}; in
|
||||
let overlays = [ emacs.overlay ] ++ import ./overlays.nix; in
|
||||
let pkgs = (import nixpkgs { inherit system config overlays; }); in
|
||||
{
|
||||
darwinConfigurations = {
|
||||
nixpkgs = pkgs;
|
||||
patrick = darwin.lib.darwinSystem {
|
||||
system = system;
|
||||
modules = [
|
||||
./darwin-configuration.nix
|
||||
home-manager.darwinModules.home-manager
|
||||
outputs = {
|
||||
self,
|
||||
darwin,
|
||||
emacs,
|
||||
nixpkgs,
|
||||
home-manager,
|
||||
sops-nix,
|
||||
apple-silicon,
|
||||
...
|
||||
} @ inputs: let
|
||||
config = {
|
||||
# contentAddressedByDefault = true;
|
||||
allowUnfree = true;
|
||||
};
|
||||
in let
|
||||
overlays = [emacs.overlay] ++ import ./overlays.nix;
|
||||
recursiveMerge = attrList: let
|
||||
f = attrPath:
|
||||
builtins.zipAttrsWith (n: values:
|
||||
if builtins.tail values == []
|
||||
then builtins.head values
|
||||
else if builtins.all builtins.isList values
|
||||
then nixpkgs.lib.unique (builtins.concatLists values)
|
||||
else if builtins.all builtins.isAttrs values
|
||||
then f (attrPath ++ [n]) values
|
||||
else builtins.last values);
|
||||
in
|
||||
f [] attrList;
|
||||
in {
|
||||
nixosConfigurations = {
|
||||
earthworm = let
|
||||
system = "aarch64-linux";
|
||||
in let
|
||||
pkgs = import nixpkgs {inherit system config overlays;};
|
||||
in
|
||||
nixpkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
modules = let
|
||||
args = {
|
||||
nixpkgs = pkgs;
|
||||
username = "patrick";
|
||||
dotnet = pkgs.dotnet-sdk_7;
|
||||
};
|
||||
in [
|
||||
./home-manager/earthworm-config.nix
|
||||
apple-silicon.nixosModules.default
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.users.Patrick = import ./home.nix { nixpkgs = pkgs; };
|
||||
home-manager.users.patrick = recursiveMerge [(import ./home-manager/earthworm.nix args) (import ./home-manager/home.nix args)];
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
darwinConfigurations = let
|
||||
system = "aarch64-darwin";
|
||||
in let
|
||||
pkgs = import nixpkgs {inherit system config overlays;};
|
||||
in {
|
||||
nixpkgs = pkgs;
|
||||
patrick = darwin.lib.darwinSystem {
|
||||
system = system;
|
||||
modules = let
|
||||
args = {
|
||||
nixpkgs = pkgs;
|
||||
username = "patrick";
|
||||
dotnet = pkgs.dotnet-sdk_7;
|
||||
};
|
||||
in [
|
||||
./darwin-configuration.nix
|
||||
sops-nix.nixosModules.sops
|
||||
home-manager.darwinModules.home-manager
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.users.patrick = recursiveMerge [(import ./home-manager/darwin.nix args) (import ./home-manager/home.nix args)];
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
devShells = let
|
||||
devShell = system: (
|
||||
let
|
||||
pkgs = import nixpkgs {inherit config system;};
|
||||
in {
|
||||
default = pkgs.mkShell {
|
||||
buildInputs = [pkgs.alejandra pkgs.shellcheck];
|
||||
};
|
||||
}
|
||||
);
|
||||
in
|
||||
builtins.listToAttrs (builtins.map (system: {
|
||||
name = system;
|
||||
value = devShell system;
|
||||
}) ["aarch64-darwin" "aarch64-linux" "x86_64-linux"]);
|
||||
};
|
||||
}
|
||||
|
41
hardware/earthworm.nix
Normal file
41
hardware/earthworm.nix
Normal file
@@ -0,0 +1,41 @@
|
||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = ["usb_storage" "sdhci_pci"];
|
||||
boot.initrd.kernelModules = [];
|
||||
boot.kernelModules = [];
|
||||
boot.extraModulePackages = [];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/49068d2d-13e6-43b5-a740-f23db6fbd6b2";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/43ED-0FE7";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
swapDevices = [];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
# still possible to use this option, but it's recommended to use it in conjunction
|
||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlan0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux";
|
||||
powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
|
||||
}
|
2
home-manager/cargo-config.toml
Normal file
2
home-manager/cargo-config.toml
Normal file
@@ -0,0 +1,2 @@
|
||||
[registries.crates-io]
|
||||
protocol = "sparse"
|
40
home-manager/darwin.nix
Normal file
40
home-manager/darwin.nix
Normal file
@@ -0,0 +1,40 @@
|
||||
{
|
||||
nixpkgs,
|
||||
username,
|
||||
dotnet,
|
||||
...
|
||||
}: {
|
||||
imports = [./rider];
|
||||
|
||||
rider = {
|
||||
enable = true;
|
||||
username = username;
|
||||
dotnet = dotnet;
|
||||
};
|
||||
|
||||
home.packages = [
|
||||
# "Damaged and can't be opened"
|
||||
#nixpkgs.bcompare
|
||||
#nixpkgs.gdb
|
||||
#nixpkgs.handbrake
|
||||
];
|
||||
|
||||
programs.vscode = {
|
||||
userSettings = {
|
||||
"lean.leanpkgPath" = "/Users/${username}/.elan/toolchains/stable/bin/leanpkg";
|
||||
"lean.executablePath" = "/Users/${username}/.elan/toolchains/stable/bin/lean";
|
||||
"lean.memoryLimit" = 16384;
|
||||
"latex-workshop.view.pdf.viewer" = "tab";
|
||||
"lean4.toolchainPath" = "/Users/${username}/.elan/toolchains/leanprover--lean4---nightly-2022-12-16";
|
||||
};
|
||||
};
|
||||
|
||||
programs.zsh = {
|
||||
shellAliases = {
|
||||
cmake = "cmake -DCMAKE_MAKE_PROGRAM=${nixpkgs.gnumake}/bin/make -DCMAKE_AR=${nixpkgs.darwin.cctools}/bin/ar -DCMAKE_RANLIB=${nixpkgs.darwin.cctools}/bin/ranlib -DGMP_INCLUDE_DIR=${nixpkgs.gmp.dev}/include/ -DGMP_LIBRARIES=${nixpkgs.gmp}/lib/libgmp.10.dylib";
|
||||
ar = "${nixpkgs.darwin.cctools}/bin/ar";
|
||||
};
|
||||
};
|
||||
|
||||
home.file.".ssh/config".source = ./ssh.config;
|
||||
}
|
56
home-manager/earthworm-config.nix
Normal file
56
home-manager/earthworm-config.nix
Normal file
@@ -0,0 +1,56 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
../hardware/earthworm.nix
|
||||
];
|
||||
|
||||
hardware.asahi.peripheralFirmwareDirectory = ../firmware;
|
||||
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = false;
|
||||
boot.extraModprobeConfig = ''
|
||||
options hid_apple iso_layout=0
|
||||
'';
|
||||
|
||||
networking = {
|
||||
hostName = "earthworm";
|
||||
networkmanager.enable = true;
|
||||
};
|
||||
|
||||
time.timeZone = "Europe/London";
|
||||
|
||||
programs.sway.enable = true;
|
||||
programs.zsh.enable = true;
|
||||
|
||||
# TODO: work out secrets management for password, then set mutableUsers to false
|
||||
users.mutableUsers = true;
|
||||
users.users.patrick = {
|
||||
isNormalUser = true;
|
||||
extraGroups = ["wheel" "networkManager"];
|
||||
};
|
||||
|
||||
environment.systemPackages = [
|
||||
pkgs.vim
|
||||
pkgs.wget
|
||||
];
|
||||
|
||||
environment.loginShellInit = ''
|
||||
[[ "$(tty)" == /dev/tty1 ]] && sway
|
||||
'';
|
||||
|
||||
services.openssh.enable = true;
|
||||
|
||||
system.stateVersion = "23.11";
|
||||
nix.settings.experimental-features = ["nix-command" "flakes" "ca-derivations"];
|
||||
|
||||
nix.gc.automatic = true;
|
||||
nix.extraOptions = ''
|
||||
auto-optimise-store = true
|
||||
max-jobs = auto
|
||||
keep-outputs = true
|
||||
keep-derivations = true
|
||||
'';
|
||||
}
|
29
home-manager/earthworm.nix
Normal file
29
home-manager/earthworm.nix
Normal file
@@ -0,0 +1,29 @@
|
||||
{
|
||||
nixpkgs,
|
||||
username,
|
||||
dotnet,
|
||||
...
|
||||
}: {
|
||||
home.packages = [nixpkgs.firefox-wayland];
|
||||
nixpkgs.config.firefox.speechSynthesisSupport = true;
|
||||
|
||||
wayland.windowManager.sway = {
|
||||
enable = true;
|
||||
config = {
|
||||
focus = {followMouse = false;};
|
||||
modifier = "Mod4";
|
||||
terminal = "alacritty";
|
||||
window = {border = 5;};
|
||||
};
|
||||
extraConfig = ''
|
||||
output Unknown-1 scale 2
|
||||
'';
|
||||
};
|
||||
|
||||
services.swayidle = {enable = true;};
|
||||
services.cbatticon = {
|
||||
lowLevelPercent = 20;
|
||||
iconType = "standard";
|
||||
enable = true;
|
||||
};
|
||||
}
|
@@ -1,20 +1,9 @@
|
||||
{
|
||||
nixpkgs,
|
||||
username,
|
||||
dotnet,
|
||||
...
|
||||
}:
|
||||
let
|
||||
username = "Patrick";
|
||||
in let
|
||||
dotnet = nixpkgs.dotnet-sdk_6;
|
||||
in {
|
||||
imports = [./rider];
|
||||
|
||||
rider = {
|
||||
enable = true;
|
||||
username = username;
|
||||
dotnet = dotnet;
|
||||
};
|
||||
|
||||
}: {
|
||||
# Let Home Manager install and manage itself.
|
||||
programs.home-manager.enable = true;
|
||||
|
||||
@@ -32,62 +21,11 @@ in {
|
||||
# changes in each release.
|
||||
home.stateVersion = "22.05";
|
||||
|
||||
home.packages =
|
||||
[
|
||||
nixpkgs.rust-analyzer
|
||||
nixpkgs.tmux
|
||||
nixpkgs.wget
|
||||
nixpkgs.youtube-dl
|
||||
nixpkgs.cmake
|
||||
nixpkgs.gnumake
|
||||
nixpkgs.gcc
|
||||
nixpkgs.gdb
|
||||
nixpkgs.hledger
|
||||
nixpkgs.hledger-web
|
||||
dotnet
|
||||
nixpkgs.docker
|
||||
nixpkgs.jitsi-meet
|
||||
#nixpkgs.handbrake
|
||||
nixpkgs.ripgrep
|
||||
nixpkgs.elan
|
||||
nixpkgs.coreutils-prefixed
|
||||
nixpkgs.shellcheck
|
||||
nixpkgs.html-tidy
|
||||
nixpkgs.hugo
|
||||
#nixpkgs.agda
|
||||
nixpkgs.pijul
|
||||
nixpkgs.universal-ctags
|
||||
nixpkgs.asciinema
|
||||
nixpkgs.git-lfs
|
||||
nixpkgs.imagemagick
|
||||
nixpkgs.nixpkgs-fmt
|
||||
nixpkgs.rnix-lsp
|
||||
];
|
||||
|
||||
programs.vscode = {
|
||||
enable = true;
|
||||
package = nixpkgs.vscode;
|
||||
extensions = import ./vscode-extensions.nix { pkgs = nixpkgs; };
|
||||
userSettings = {
|
||||
workbench.colorTheme = "Default High Contrast";
|
||||
"files.Exclude" = {
|
||||
"**/.git" = true;
|
||||
"**/.DS_Store" = true;
|
||||
"**/Thumbs.db" = true;
|
||||
"**/*.olean" = true;
|
||||
"**/result" = true;
|
||||
};
|
||||
"git.path" = "${nixpkgs.git}/bin/git";
|
||||
"update.mode" = "none";
|
||||
"docker.dockerPath" = "${nixpkgs.docker}/bin/docker";
|
||||
#"lean.leanpkgPath" = "/Users/${username}/.elan/toolchains/stable/bin/leanpkg";
|
||||
"lean.executablePath" = "/Users/${username}/.elan/toolchains/lean4/bin/lean";
|
||||
"lean.memoryLimit" = 8092;
|
||||
};
|
||||
};
|
||||
|
||||
programs.tmux = {
|
||||
shell = "\${nixpkgs.zsh}/bin/zsh";
|
||||
escapeTime = 50;
|
||||
mouse = false;
|
||||
prefix = "C-b";
|
||||
};
|
||||
|
||||
programs.zsh = {
|
||||
@@ -107,15 +45,16 @@ in {
|
||||
EDITOR = "vim";
|
||||
LC_ALL = "en_US.UTF-8";
|
||||
LC_CTYPE = "en_US.UTF-8";
|
||||
RUSTFLAGS = "-L ${nixpkgs.libiconv}/lib";
|
||||
RUSTFLAGS = "-L ${nixpkgs.libiconv}/lib -L ${nixpkgs.libcxxabi}/lib -L ${nixpkgs.libcxx}/lib";
|
||||
RUST_BACKTRACE = "full";
|
||||
};
|
||||
shellAliases = {
|
||||
vim = "nvim";
|
||||
view = "vim -R";
|
||||
nix-upgrade = "sudo -i sh -c 'nix-channel --update && nix-env -iA nixpkgs.nix && launchctl remove org.nixos.nix-daemon && launchctl load /Library/LaunchDaemons/org.nixos.nix-daemon.plist'";
|
||||
cmake = "cmake -DCMAKE_MAKE_PROGRAM=${nixpkgs.gnumake}/bin/make -DCMAKE_AR=${nixpkgs.darwin.cctools}/bin/ar -DCMAKE_RANLIB=${nixpkgs.darwin.cctools}/bin/ranlib -DGMP_INCLUDE_DIR=${nixpkgs.gmp.dev}/include/ -DGMP_LIBRARIES=${nixpkgs.gmp}/lib/libgmp.10.dylib";
|
||||
ar = "${nixpkgs.darwin.cctools}/bin/ar";
|
||||
grep = "${nixpkgs.ripgrep}/bin/rg";
|
||||
};
|
||||
sessionVariables = {
|
||||
RIPGREP_CONFIG_PATH = "/Users/${username}/.config/ripgrep/config";
|
||||
};
|
||||
};
|
||||
|
||||
@@ -139,6 +78,7 @@ in {
|
||||
};
|
||||
push = {
|
||||
default = "current";
|
||||
autoSetupRemote = true;
|
||||
};
|
||||
pull = {
|
||||
rebase = false;
|
||||
@@ -158,6 +98,34 @@ in {
|
||||
pull = {
|
||||
twohead = "ort";
|
||||
};
|
||||
merge = {
|
||||
conflictStyle = "diff3";
|
||||
};
|
||||
diff = {
|
||||
colorMoved = "default";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
programs.vscode = {
|
||||
enable = true;
|
||||
enableExtensionUpdateCheck = true;
|
||||
enableUpdateCheck = true;
|
||||
package = nixpkgs.vscode;
|
||||
extensions = import ./vscode-extensions.nix {pkgs = nixpkgs;};
|
||||
userSettings = {
|
||||
workbench.colorTheme = "Default";
|
||||
"files.Exclude" = {
|
||||
"**/.git" = true;
|
||||
"**/.DS_Store" = true;
|
||||
"**/Thumbs.db" = true;
|
||||
"**/*.olean" = true;
|
||||
"**/result" = true;
|
||||
};
|
||||
"git.path" = "${nixpkgs.git}/bin/git";
|
||||
"update.mode" = "none";
|
||||
"docker.dockerPath" = "${nixpkgs.docker}/bin/docker";
|
||||
"explorer.confirmDelete" = false;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -192,18 +160,61 @@ in {
|
||||
|
||||
programs.neovim.extraConfig = builtins.readFile ./init.vim;
|
||||
|
||||
home.file.".ssh/config".source = ./ssh.config;
|
||||
home.packages = [
|
||||
nixpkgs.keepassxc
|
||||
nixpkgs.rust-analyzer
|
||||
nixpkgs.tmux
|
||||
nixpkgs.wget
|
||||
nixpkgs.yt-dlp
|
||||
nixpkgs.cmake
|
||||
nixpkgs.gnumake
|
||||
nixpkgs.gcc
|
||||
nixpkgs.lldb
|
||||
nixpkgs.hledger
|
||||
nixpkgs.hledger-web
|
||||
dotnet
|
||||
nixpkgs.docker
|
||||
nixpkgs.jitsi-meet
|
||||
nixpkgs.ripgrep
|
||||
nixpkgs.elan
|
||||
nixpkgs.coreutils-prefixed
|
||||
nixpkgs.shellcheck
|
||||
nixpkgs.html-tidy
|
||||
nixpkgs.hugo
|
||||
nixpkgs.agda
|
||||
nixpkgs.pijul
|
||||
nixpkgs.universal-ctags
|
||||
nixpkgs.asciinema
|
||||
nixpkgs.git-lfs
|
||||
nixpkgs.imagemagick
|
||||
nixpkgs.nixpkgs-fmt
|
||||
nixpkgs.rnix-lsp
|
||||
nixpkgs.grpc-tools
|
||||
nixpkgs.element-desktop
|
||||
nixpkgs.ihp-new
|
||||
nixpkgs.direnv
|
||||
nixpkgs.lnav
|
||||
nixpkgs.age
|
||||
nixpkgs.nodejs
|
||||
nixpkgs.sqlitebrowser
|
||||
nixpkgs.typst
|
||||
nixpkgs.poetry
|
||||
nixpkgs.woodpecker-agent
|
||||
nixpkgs.alacritty
|
||||
];
|
||||
|
||||
home.file.".ideavimrc".source = ./ideavimrc;
|
||||
|
||||
home.file.".config/youtube-dl/config".source = ./youtube-dl.conf;
|
||||
home.file.".config/yt-dlp/config".source = ./youtube-dl.conf;
|
||||
home.file.".config/ripgrep/config".source = ./ripgrep.conf;
|
||||
programs.emacs = {
|
||||
enable = true;
|
||||
package = nixpkgs.emacsGcc;
|
||||
extraPackages = (epkgs: []);
|
||||
package = nixpkgs.emacs;
|
||||
extraPackages = epkgs: [];
|
||||
extraConfig = ''
|
||||
(load-file (let ((coding-system-for-read 'utf-8))
|
||||
(shell-command-to-string "agda-mode locate")))
|
||||
'';
|
||||
};
|
||||
|
||||
home.file.".cargo/config.toml".source = ./cargo-config.toml;
|
||||
}
|
@@ -359,6 +359,7 @@ function! VisualSelection(direction, extra_filter) range
|
||||
endfunction
|
||||
|
||||
nnoremap <leader>c :!cargo clippy
|
||||
nnoremap <leader>j :%!python -m json.tool
|
||||
|
||||
set statusline+=%#warningmsg#
|
||||
set statusline+=%{SyntasticStatuslineFlag()}
|
@@ -1,6 +1,6 @@
|
||||
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
|
||||
<s:Boolean x:Key="/Default/Environment/Hierarchy/NuGetOptions/IncludePrerelease/@EntryValue">False</s:Boolean>
|
||||
<s:String x:Key="/Default/AppBrowserSnapshotsStoreSettings/CurrentStore/@EntryValue">/Users/Patrick/Library/Preferences/Rider2019.3/resharper-host/Sessions</s:String>
|
||||
<s:String x:Key="/Default/AppBrowserSnapshotsStoreSettings/CurrentStore/@EntryValue">/Users/patrick/Library/Preferences/Rider2019.3/resharper-host/Sessions</s:String>
|
||||
<s:Boolean x:Key="/Default/CodeEditing/Intellisense/CodeCompletion/CacheImportCompletion/@EntryValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/CodeInspection/Roslyn/LegacySeveritiesMigrated/@EntryValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/Environment/ExternalSources/Decompiler/DecompilerLegalNoticeAccepted/@EntryValue">True</s:Boolean>
|
||||
@@ -34,7 +34,7 @@
|
||||
<s:String x:Key="/Default/Profilers/Common/ConfigurationsStore/SelectedProfileConfigurationId/=NotSupported/@EntryIndexedValue">00000000-0000-0000-0000-000000000000</s:String>
|
||||
<s:String x:Key="/Default/Profilers/Common/ConfigurationsStore/SelectedProfileTestsConfigurationId/=Any/@EntryIndexedValue">2704f639-7a6d-4dc0-8931-351a3f933333</s:String>
|
||||
<s:Boolean x:Key="/Default/RiderDebugger/RiderRestoreDecompile/RestoreDecompileSetting/@EntryValue">False</s:Boolean>
|
||||
<s:String x:Key="/Default/SnapshotsStore/CurrentStore/@EntryValue">/Users/Patrick/Library/Preferences/Rider2019.3/resharper-host/Sessions</s:String>
|
||||
<s:String x:Key="/Default/SnapshotsStore/CurrentStore/@EntryValue">/Users/patrick/Library/Preferences/Rider2019.3/resharper-host/Sessions</s:String>
|
||||
<s:Boolean x:Key="/Default/SymbolServers/RestoreDecompileSetting/@EntryValue">False</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Leet/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=nums/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=nums/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
|
49
home-manager/rider/default.nix
Normal file
49
home-manager/rider/default.nix
Normal file
@@ -0,0 +1,49 @@
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
src = ./GlobalSettingsStorage.DotSettings;
|
||||
in let
|
||||
link = ./link.sh;
|
||||
in let
|
||||
riderconfig = pkgs.stdenv.mkDerivation {
|
||||
name = "rider-config";
|
||||
version = "2023.1";
|
||||
__contentAddressed = true;
|
||||
|
||||
src = src;
|
||||
phases = ["unpackPhase"];
|
||||
unpackPhase = ''
|
||||
mkdir -p "$out"
|
||||
cp ${src} "$out/GlobalSettingsStorage.DotSettings"
|
||||
cp ${link} "$out/link.sh"
|
||||
chmod u+x "$out/link.sh"
|
||||
sed -i 's_NIX-DOTNET-SDK_${config.rider.dotnet}_' "$out/GlobalSettingsStorage.DotSettings"
|
||||
sed -i "s!NIX-RIDER-CONFIG!$out!" "$out/link.sh"
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
'';
|
||||
};
|
||||
in {
|
||||
options = {
|
||||
rider.enable = lib.mkOption {default = false;};
|
||||
rider.username = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
example = "Patrick";
|
||||
};
|
||||
rider.dotnet = lib.mkOption {default = pkgs.dotnet-sdk;};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.rider.enable {
|
||||
home.activation.jetbrains-rider-settings = lib.hm.dag.entryAfter ["writeBoundary"] ''
|
||||
|
||||
dest="/Users/${config.rider.username}/Library/Application Support/JetBrains"
|
||||
if [ -e "$dest" ]; then
|
||||
find "$dest" -maxdepth 1 -type d -name 'Rider*' -exec sh -c '${riderconfig}/link.sh "$0"' {} \;
|
||||
fi
|
||||
'';
|
||||
};
|
||||
}
|
6
home-manager/ripgrep.conf
Normal file
6
home-manager/ripgrep.conf
Normal file
@@ -0,0 +1,6 @@
|
||||
# Don't let ripgrep vomit really long lines to my terminal, and show a preview.
|
||||
--max-columns=150
|
||||
--max-columns-preview
|
||||
|
||||
# Ignore contents of .git
|
||||
--glob=!.git/*
|
@@ -4,4 +4,4 @@ Host *
|
||||
AddKeysToAgent yes
|
||||
IgnoreUnknown UseKeychain
|
||||
UseKeychain yes
|
||||
IdentityFile ~/.ssh/id_rsa
|
||||
IdentityFile ~/.ssh/id_ed25519
|
111
home-manager/vscode-extensions.nix
Normal file
111
home-manager/vscode-extensions.nix
Normal file
@@ -0,0 +1,111 @@
|
||||
{pkgs}:
|
||||
with pkgs.vscode-extensions;
|
||||
[
|
||||
bbenoist.nix
|
||||
haskell.haskell
|
||||
yzhang.markdown-all-in-one
|
||||
james-yu.latex-workshop
|
||||
vscodevim.vim
|
||||
ms-dotnettools.csharp
|
||||
ms-vscode-remote.remote-ssh
|
||||
justusadam.language-haskell
|
||||
rust-lang.rust-analyzer
|
||||
github.vscode-pull-request-github
|
||||
shardulm94.trailing-spaces
|
||||
nvarner.typst-lsp
|
||||
arrterian.nix-env-selector
|
||||
]
|
||||
++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [
|
||||
{
|
||||
name = "remote-containers";
|
||||
publisher = "ms-vscode-remote";
|
||||
version = "0.285.0";
|
||||
sha256 = "sha256-UHp6Ewx0bUvPjgaO0A5k77SGj8ovPFLl/WvxyLcZ4y0=";
|
||||
}
|
||||
{
|
||||
name = "vscode-hsx";
|
||||
publisher = "s0kil";
|
||||
version = "0.4.0";
|
||||
sha256 = "sha256-/WRy+cQBqzb6QB5+AizlyIcjqNpZ86o2at885hOcroM=";
|
||||
}
|
||||
{
|
||||
name = "vscode-docker";
|
||||
publisher = "ms-azuretools";
|
||||
version = "1.24.0";
|
||||
sha256 = "sha256-zZ34KQrRPqVbfGdpYACuLMiMj4ZIWSnJIPac1yXD87k=";
|
||||
}
|
||||
{
|
||||
name = "toml";
|
||||
publisher = "be5invis";
|
||||
version = "0.6.0";
|
||||
sha256 = "yk7buEyQIw6aiUizAm+sgalWxUibIuP9crhyBaOjC2E=";
|
||||
}
|
||||
{
|
||||
name = "Ionide-Paket";
|
||||
publisher = "Ionide";
|
||||
version = "2.0.0";
|
||||
sha256 = "1455zx5p0d30b1agdi1zw22hj0d3zqqglw98ga8lj1l1d757gv6v";
|
||||
}
|
||||
{
|
||||
name = "lean";
|
||||
publisher = "jroesch";
|
||||
version = "0.16.58";
|
||||
sha256 = "sha256-e5+C6dAcpet4xOiifmTJ1vm2pNrcPhx/mjl70il5NG0=";
|
||||
}
|
||||
{
|
||||
name = "lean4";
|
||||
publisher = "leanprover";
|
||||
version = "0.0.101";
|
||||
sha256 = "sha256-tHxP6X6qp3qVkkCn5TjhHrYHHvGGWJ4kYE7la6bPT6w=";
|
||||
}
|
||||
{
|
||||
name = "vscode-clang";
|
||||
publisher = "mitaki28";
|
||||
version = "0.2.4";
|
||||
sha256 = "0sys2h4jvnannlk2q02lprc2ss9nkgh0f0kwa188i7viaprpnx23";
|
||||
}
|
||||
{
|
||||
name = "dotnet-interactive-vscode";
|
||||
publisher = "ms-dotnettools";
|
||||
version = "1.0.4165021";
|
||||
sha256 = "sha256-P5EHc5t4UyKEfxIGNTg+SyQPFlrbwaNIaprPY63iJ/k=";
|
||||
}
|
||||
{
|
||||
name = "mono-debug";
|
||||
publisher = "ms-vscode";
|
||||
version = "0.16.3";
|
||||
sha256 = "sha256-6IU8aP4FQVbEMZAgssGiyqM+PAbwipxou5Wk3Q2mjZg=";
|
||||
}
|
||||
{
|
||||
name = "Theme-MarkdownKit";
|
||||
publisher = "ms-vscode";
|
||||
version = "0.1.4";
|
||||
sha256 = "1im78k2gaj6cri2jcvy727qdy25667v0f7vv3p3hv13apzxgzl0l";
|
||||
}
|
||||
{
|
||||
name = "debug";
|
||||
publisher = "webfreak";
|
||||
version = "0.26.1";
|
||||
sha256 = "sha256-lLLa8SN+Sf9Tbi7HeWYWa2KhPQFJyQWrf9l3EUljwYo=";
|
||||
}
|
||||
]
|
||||
++ [
|
||||
(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";
|
||||
})
|
||||
]
|
28
python.nix
28
python.nix
@@ -1,16 +1,14 @@
|
||||
{ pkgs }:
|
||||
|
||||
let my-python-packages = python-packages: with python-packages; [
|
||||
pip
|
||||
mathlibtools
|
||||
];
|
||||
{pkgs}: let
|
||||
my-python-packages = python-packages:
|
||||
with python-packages; [
|
||||
pip
|
||||
mathlibtools
|
||||
];
|
||||
in let
|
||||
packageOverrides = self: super: {
|
||||
# Test failures on darwin ("windows-1252"); just skip pytest
|
||||
# (required for elan)
|
||||
beautifulsoup4 = super.beautifulsoup4.overridePythonAttrs (old: {pytestCheckPhase = "true";});
|
||||
};
|
||||
in
|
||||
|
||||
let packageOverrides = self: super: {
|
||||
# Test failures on darwin ("windows-1252"); just skip pytest
|
||||
# (required for elan)
|
||||
beautifulsoup4 = super.beautifulsoup4.overridePythonAttrs (old: { pytestCheckPhase = "true"; });
|
||||
};
|
||||
in
|
||||
|
||||
(pkgs.python3.override { inherit packageOverrides; }).withPackages my-python-packages
|
||||
(pkgs.python3.override {inherit packageOverrides;}).withPackages my-python-packages
|
||||
|
@@ -1,44 +0,0 @@
|
||||
{ pkgs, config, lib, ... }:
|
||||
|
||||
let src = ./GlobalSettingsStorage.DotSettings; in
|
||||
let link = ./link.sh; in
|
||||
|
||||
let riderconfig =
|
||||
pkgs.stdenv.mkDerivation {
|
||||
name = "rider-config";
|
||||
version = "2021.2";
|
||||
|
||||
src = src;
|
||||
phases = [ "unpackPhase" ];
|
||||
unpackPhase = ''
|
||||
mkdir -p "$out"
|
||||
cp ${src} "$out/GlobalSettingsStorage.DotSettings"
|
||||
cp ${link} "$out/link.sh"
|
||||
chmod u+x "$out/link.sh"
|
||||
sed -i 's_NIX-DOTNET-SDK_${config.rider.dotnet}_' "$out/GlobalSettingsStorage.DotSettings"
|
||||
sed -i "s!NIX-RIDER-CONFIG!$out!" "$out/link.sh"
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
'';
|
||||
};
|
||||
in
|
||||
|
||||
{
|
||||
options = {
|
||||
rider.enable = lib.mkOption { default = false; };
|
||||
rider.username = lib.mkOption { type = lib.types.str; example = "Patrick"; };
|
||||
rider.dotnet = lib.mkOption { default = pkgs.dotnet-sdk; };
|
||||
};
|
||||
|
||||
config = lib.mkIf config.rider.enable {
|
||||
home.activation.jetbrains-rider-settings = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
|
||||
|
||||
dest="/Users/${config.rider.username}/Library/Application Support/JetBrains"
|
||||
if [ -e "$dest" ]; then
|
||||
find "$dest" -maxdepth 1 -type d -name 'Rider*' -exec sh -c '${riderconfig}/link.sh "$0"' {} \;
|
||||
fi
|
||||
'';
|
||||
};
|
||||
|
||||
}
|
2
server-home.nix
Normal file
2
server-home.nix
Normal file
@@ -0,0 +1,2 @@
|
||||
{nixpkgs, ...}: {
|
||||
}
|
@@ -1,115 +0,0 @@
|
||||
{pkgs}:
|
||||
with pkgs.vscode-extensions;
|
||||
[
|
||||
bbenoist.nix
|
||||
haskell.haskell
|
||||
yzhang.markdown-all-in-one
|
||||
james-yu.latex-workshop
|
||||
vscodevim.vim
|
||||
# Not supported on Darwin, apparently
|
||||
# ms-dotnettools.csharp
|
||||
]
|
||||
++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [
|
||||
{
|
||||
name = "remote-containers";
|
||||
publisher = "ms-vscode-remote";
|
||||
version = "0.222.0";
|
||||
sha256 = "4Li0sYfHOsJMn5FJtvDTGKoGPcRmoosD9tZ7q9H9DfQ=";
|
||||
}
|
||||
{
|
||||
name = "remote-ssh";
|
||||
publisher = "ms-vscode-remote";
|
||||
version = "0.75.2022021903";
|
||||
sha256 = "hTRfoUHKrIOSV8eZ/62ewaII5291huXjOZ++dRUmKoI=";
|
||||
}
|
||||
{
|
||||
name = "vscode-docker";
|
||||
publisher = "ms-azuretools";
|
||||
version = "1.19.0";
|
||||
sha256 = "UPUfTOc5xJhI5ACm2oyWqtZ4zNxZjy16D6Mf30eHFEI=";
|
||||
}
|
||||
{
|
||||
name = "code-gnu-global";
|
||||
publisher = "austin";
|
||||
version = "0.2.2";
|
||||
sha256 = "1fz89m6ja25aif6wszg9h2fh5vajk6bj3lp1mh0l2b04nw2mzhd5";
|
||||
}
|
||||
{
|
||||
name = "rust-analyzer";
|
||||
publisher = "matklad";
|
||||
version = "0.3.939";
|
||||
sha256 = "t5CCUdFCiSYrMsBHG5eOfg3sXMacFWiR0hmVa7S1i8Y=";
|
||||
}
|
||||
{
|
||||
name = "vscode-lldb";
|
||||
publisher = "vadimcn";
|
||||
version = "1.6.10";
|
||||
sha256 = "CGVVs//jIZM8uX7Wc9gM4aQGwECi88eIpfPqU2hKbeA=";
|
||||
}
|
||||
{
|
||||
name = "toml";
|
||||
publisher = "be5invis";
|
||||
version = "0.6.0";
|
||||
sha256 = "yk7buEyQIw6aiUizAm+sgalWxUibIuP9crhyBaOjC2E=";
|
||||
}
|
||||
{
|
||||
name = "Ionide-Paket";
|
||||
publisher = "Ionide";
|
||||
version = "2.0.0";
|
||||
sha256 = "1455zx5p0d30b1agdi1zw22hj0d3zqqglw98ga8lj1l1d757gv6v";
|
||||
}
|
||||
{
|
||||
name = "lean";
|
||||
publisher = "jroesch";
|
||||
version = "0.16.46";
|
||||
sha256 = "hjflz5JHVr1YWq6QI9DpdNPY1uL7lAuQTMAdwCtLEfY=";
|
||||
}
|
||||
{
|
||||
name = "language-haskell";
|
||||
publisher = "justusadam";
|
||||
version = "3.4.0";
|
||||
sha256 = "0ab7m5jzxakjxaiwmg0jcck53vnn183589bbxh3iiylkpicrv67y";
|
||||
}
|
||||
{
|
||||
name = "vscode-clang";
|
||||
publisher = "mitaki28";
|
||||
version = "0.2.4";
|
||||
sha256 = "0sys2h4jvnannlk2q02lprc2ss9nkgh0f0kwa188i7viaprpnx23";
|
||||
}
|
||||
{
|
||||
name = "dotnet-interactive-vscode";
|
||||
publisher = "ms-dotnettools";
|
||||
version = "1.0.3103011";
|
||||
sha256 = "a3u9NKsqHZKhZkKqJqo+LgJFTL2yhehBepTOFOXE+jY=";
|
||||
}
|
||||
{
|
||||
name = "python";
|
||||
publisher = "ms-python";
|
||||
version = "2022.0.1814523869";
|
||||
sha256 = "hXTVZ7gbu234zyAg0ZrZPUo6oULB98apxe79U2yQHD4=";
|
||||
}
|
||||
{
|
||||
name = "mono-debug";
|
||||
publisher = "ms-vscode";
|
||||
version = "0.16.2";
|
||||
sha256 = "10hixqkw5r3cg52xkbky395lv72sb9d9wrngdvmrwx62hkbk5465";
|
||||
}
|
||||
{
|
||||
name = "Theme-MarkdownKit";
|
||||
publisher = "ms-vscode";
|
||||
version = "0.1.4";
|
||||
sha256 = "1im78k2gaj6cri2jcvy727qdy25667v0f7vv3p3hv13apzxgzl0l";
|
||||
}
|
||||
{
|
||||
name = "trailing-spaces";
|
||||
publisher = "shardulm94";
|
||||
version = "0.3.1";
|
||||
sha256 = "0h30zmg5rq7cv7kjdr5yzqkkc1bs20d72yz9rjqag32gwf46s8b8";
|
||||
}
|
||||
{
|
||||
name = "debug";
|
||||
publisher = "webfreak";
|
||||
version = "0.25.1";
|
||||
sha256 = "1l01sv6kwh8dlv3kygkkd0z9m37hahflzd5bx1wwij5p61jg7np9";
|
||||
}
|
||||
]
|
Reference in New Issue
Block a user