mirror of
https://github.com/wlcx/home.git
synced 2026-09-12 11:18:23 +01:00
Compare commits
65
Commits
9c620bd13d
..
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
344f52c05b | ||
|
|
a6a4f5660b | ||
|
|
edcb288716 | ||
|
|
327962567f | ||
|
|
5e5bacfd14 | ||
|
|
433c96eca4 | ||
|
|
746b05f91c | ||
|
|
ad60d86c53 | ||
|
|
ac362b6667 | ||
|
|
072ff7acdc | ||
|
|
edefea64ee | ||
|
|
1ede986cc1 | ||
|
|
aebb5dcd08 | ||
|
|
7a1df05022 | ||
|
|
97d3c6f0af | ||
|
|
c4953a227a | ||
|
|
84d4741d98 | ||
|
|
924177bd4c | ||
|
|
b15ba6c14c | ||
|
|
d90384b2de | ||
|
|
31b30027ce | ||
|
|
7c56f42779 | ||
|
|
ef681a3ba8 | ||
|
|
cee2d8e6bc | ||
|
|
b3fedf3584 | ||
|
|
1e8b5ebb0d | ||
|
|
f89e0bcec7 | ||
|
|
6e55465310 | ||
|
|
9d1d445fbc | ||
|
|
38715744d0 | ||
|
|
c12f8e2d07 | ||
|
|
78f926a1a1 | ||
|
|
5b373b9a57 | ||
|
|
700b56d41a | ||
|
|
665403ee0f | ||
|
|
c0978d2186 | ||
|
|
b3b9941c9b | ||
|
|
8fd2a4fb6e | ||
|
|
cc24d247b1 | ||
|
|
c38a6da542 | ||
|
|
36ae4c738d | ||
|
|
7f90b53891 | ||
|
|
58e331678d | ||
|
|
9f821584d5 | ||
|
|
786d7d1b06 | ||
|
|
c5c4e59f04 | ||
|
|
007d0203bc | ||
|
|
eb0ee2cdce | ||
|
|
39c4a76673 | ||
|
|
7eaf129278 | ||
|
|
57ca6b2305 | ||
|
|
a2cab93005 | ||
|
|
604cf1b75d | ||
|
|
2941017589 | ||
|
|
6b46199500 | ||
|
|
0fbb31defe | ||
|
|
a44510a299 | ||
|
|
94453d9b7f | ||
|
|
cf1a0cbee2 | ||
|
|
b0ae82d147 | ||
|
|
b4dedbbea3 | ||
|
|
7cff2f9d50 | ||
|
|
780b0969ed | ||
|
|
098307eac9 | ||
|
|
e8d7c460db |
Generated
+43
-28
@@ -2,19 +2,16 @@
|
|||||||
"nodes": {
|
"nodes": {
|
||||||
"devshell": {
|
"devshell": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-utils": [
|
|
||||||
"flake-utils"
|
|
||||||
],
|
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1671489820,
|
"lastModified": 1764011051,
|
||||||
"narHash": "sha256-qoei5HDJ8psd1YUPD7DhbHdhLIT9L2nadscp4Qk37uk=",
|
"narHash": "sha256-M7SZyPZiqZUR/EiiBJnmyUbOi5oE/03tCeFrTiUZchI=",
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "devshell",
|
"repo": "devshell",
|
||||||
"rev": "5aa3a8039c68b4bf869327446590f4cdf90bb634",
|
"rev": "17ed8d9744ebe70424659b0ef74ad6d41fc87071",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -24,12 +21,15 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"flake-utils": {
|
"flake-utils": {
|
||||||
|
"inputs": {
|
||||||
|
"systems": "systems"
|
||||||
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1667395993,
|
"lastModified": 1731533236,
|
||||||
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
|
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "flake-utils",
|
"repo": "flake-utils",
|
||||||
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
|
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -42,36 +42,50 @@
|
|||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
],
|
]
|
||||||
"utils": "utils"
|
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1672244468,
|
"lastModified": 1764866045,
|
||||||
"narHash": "sha256-xaZb8AZqoXRCSqPusCk4ouf+fUNP8UJdafmMTF1Ltlw=",
|
"narHash": "sha256-0GsEtXV9OquDQ1VclQfP16cU5VZh7NEVIOjSH4UaJuM=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "89a8ba0b5b43b3350ff2e3ef37b66736b2ef8706",
|
"rev": "f63d0fe9d81d36e5fc95497217a72e02b8b7bcab",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"ref": "release-22.11",
|
"ref": "release-25.11",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1678101631,
|
"lastModified": 1764831616,
|
||||||
"narHash": "sha256-vuuvWBNGhNSPPbFCjp2XZmBqJOvsFF1T0hyleRnHZlc=",
|
"narHash": "sha256-OtzF5wBvO0jgW1WW1rQU9cMGx7zuvkF7CAVJ1ypzkxA=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "934e613c31cf7af0624dcf088b9e2d9b802d0717",
|
"rev": "c97c47f2bac4fa59e2cbdeba289686ae615f8ed4",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nixos",
|
||||||
|
"ref": "nixos-25.11",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs-unstable": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1764951420,
|
||||||
|
"narHash": "sha256-oLJXP0fb5hyUvHGKAWdtjhl1/4ivxXy3HsuMMTTxrd8=",
|
||||||
|
"owner": "nixos",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "0b784f7c32b9bbab8a599ccc6b4acc58f42d6f4f",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"ref": "release-22.11",
|
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
@@ -81,21 +95,22 @@
|
|||||||
"devshell": "devshell",
|
"devshell": "devshell",
|
||||||
"flake-utils": "flake-utils",
|
"flake-utils": "flake-utils",
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs",
|
||||||
|
"nixpkgs-unstable": "nixpkgs-unstable"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"utils": {
|
"systems": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1667395993,
|
"lastModified": 1681028828,
|
||||||
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
|
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||||
"owner": "numtide",
|
"owner": "nix-systems",
|
||||||
"repo": "flake-utils",
|
"repo": "default",
|
||||||
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
|
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "numtide",
|
"owner": "nix-systems",
|
||||||
"repo": "flake-utils",
|
"repo": "default",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,52 +2,77 @@
|
|||||||
description = "Samw's home environment, as managed by nix/home-manager.";
|
description = "Samw's home environment, as managed by nix/home-manager.";
|
||||||
inputs = {
|
inputs = {
|
||||||
# Nixpkgs
|
# Nixpkgs
|
||||||
nixpkgs = {url = "github:nixos/nixpkgs/release-22.11";};
|
nixpkgs = {
|
||||||
|
# N.B. we use the nixos-x branch as this is updated *after* successful hydra builds
|
||||||
|
# rather than release-x. See https://wiki.nixos.org/wiki/Channel_branches
|
||||||
|
url = "github:nixos/nixpkgs/nixos-25.11";
|
||||||
|
};
|
||||||
|
nixpkgs-unstable = {
|
||||||
|
url = "github:nixos/nixpkgs";
|
||||||
|
};
|
||||||
# Other modules
|
# Other modules
|
||||||
home-manager = {
|
home-manager = {
|
||||||
url = "github:nix-community/home-manager/release-22.11";
|
url = "github:nix-community/home-manager/release-25.11";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
flake-utils.url = "github:numtide/flake-utils";
|
flake-utils.url = "github:numtide/flake-utils";
|
||||||
devshell = {
|
devshell = {
|
||||||
url = "github:numtide/devshell";
|
url = "github:numtide/devshell";
|
||||||
inputs.flake-utils.follows = "flake-utils";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
outputs = inputs: let
|
outputs =
|
||||||
|
inputs:
|
||||||
|
let
|
||||||
overlays = [
|
overlays = [
|
||||||
# Add our own local packages
|
# Add our own local packages
|
||||||
(final: prev: rec {
|
(final: prev: {
|
||||||
# Make my local packages available as pkgs.mypkgs.<foo>
|
# Make my local packages available as pkgs.mypkgs.<foo>
|
||||||
mypkgs = prev.callPackage ./pkgs {};
|
mypkgs = prev.callPackage ./pkgs { };
|
||||||
|
})
|
||||||
|
# more up to date ssh-tpm-agent. Can probably ditch this post-24.05
|
||||||
|
(final: prev: {
|
||||||
|
ssh-tpm-agent = (import inputs.nixpkgs-unstable { system = prev.system; }).ssh-tpm-agent;
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
in (rec {
|
in
|
||||||
|
(
|
||||||
|
rec {
|
||||||
profiles = import ./home/profiles.nix;
|
profiles = import ./home/profiles.nix;
|
||||||
lib = {
|
lib = {
|
||||||
mkHome = {
|
mkHome =
|
||||||
|
{
|
||||||
profiles,
|
profiles,
|
||||||
system,
|
system,
|
||||||
username ? "samw",
|
username ? "samw",
|
||||||
}:
|
}:
|
||||||
inputs.home-manager.lib.homeManagerConfiguration {
|
inputs.home-manager.lib.homeManagerConfiguration {
|
||||||
pkgs = (import inputs.nixpkgs {
|
pkgs = (
|
||||||
|
import inputs.nixpkgs {
|
||||||
inherit system;
|
inherit system;
|
||||||
config.allowUnfree = true; # Yes I know it's bad for me
|
config.allowUnfree = true; # Yes I know it's bad for me
|
||||||
});
|
}
|
||||||
|
);
|
||||||
modules = [
|
modules = [
|
||||||
{ home = {
|
{
|
||||||
|
home = {
|
||||||
inherit username;
|
inherit username;
|
||||||
homeDirectory =
|
homeDirectory =
|
||||||
if (inputs.nixpkgs.lib.systems.elaborate system).isDarwin
|
if (inputs.nixpkgs.lib.systems.elaborate system).isDarwin then
|
||||||
then "/Users/${username}"
|
"/Users/${username}"
|
||||||
else "/home/${username}";
|
else
|
||||||
|
"/home/${username}";
|
||||||
stateVersion = "21.11";
|
stateVersion = "21.11";
|
||||||
};}] ++ profiles ++ [
|
};
|
||||||
{nixpkgs.overlays = overlays;}
|
}
|
||||||
|
]
|
||||||
|
++ profiles
|
||||||
|
++ [
|
||||||
|
{ nixpkgs.overlays = overlays; }
|
||||||
# See comment in home/default.nix.
|
# See comment in home/default.nix.
|
||||||
({ pkgs, ... }: {
|
(
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
nix = {
|
nix = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.nix;
|
package = pkgs.nix;
|
||||||
@@ -58,50 +83,80 @@
|
|||||||
# level, so less duplication overall and no more fetching that 30MB src
|
# level, so less duplication overall and no more fetching that 30MB src
|
||||||
# every time you run nix shell.
|
# every time you run nix shell.
|
||||||
registry.nixpkgs.flake = inputs.nixpkgs;
|
registry.nixpkgs.flake = inputs.nixpkgs;
|
||||||
|
registry.nixpkgs-unstable.to = {
|
||||||
|
owner = "nixos";
|
||||||
|
repo = "nixpkgs";
|
||||||
|
type = "github";
|
||||||
};
|
};
|
||||||
})
|
};
|
||||||
|
}
|
||||||
|
)
|
||||||
];
|
];
|
||||||
extraSpecialArgs = {inherit system;};
|
extraSpecialArgs = { inherit system; };
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# Standalone home-manager configurations
|
# Standalone home-manager configurations
|
||||||
homeConfigurations = {
|
homeConfigurations = {
|
||||||
boron = lib.mkHome {
|
|
||||||
system = "aarch64-darwin";
|
|
||||||
profiles = with profiles; [default dev dev-gui sensitive mac docker aws];
|
|
||||||
username = "samuel.willcocks";
|
|
||||||
};
|
|
||||||
zinc = lib.mkHome {
|
zinc = lib.mkHome {
|
||||||
system = "aarch64-darwin";
|
system = "aarch64-darwin";
|
||||||
profiles = with profiles; [default dev dev-gui sensitive mac];
|
profiles = with profiles; [
|
||||||
|
default
|
||||||
|
dev
|
||||||
|
dev-gui
|
||||||
|
sensitive
|
||||||
|
mac
|
||||||
|
];
|
||||||
};
|
};
|
||||||
luroy = lib.mkHome {
|
luroy = lib.mkHome {
|
||||||
|
system = "x86_64-linux";
|
||||||
|
profiles = with profiles; [
|
||||||
|
default
|
||||||
|
dev
|
||||||
|
];
|
||||||
|
};
|
||||||
|
kallax = lib.mkHome {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
profiles = with profiles; [default dev];
|
profiles = with profiles; [default dev];
|
||||||
};
|
};
|
||||||
|
phosphorus = lib.mkHome {
|
||||||
|
system = "aarch64-darwin";
|
||||||
|
profiles = with profiles; [
|
||||||
|
default
|
||||||
|
dev
|
||||||
|
sensitive
|
||||||
|
mac
|
||||||
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
# Per-system things
|
# Per-system things
|
||||||
// (inputs.flake-utils.lib.eachDefaultSystem (system: let
|
// (inputs.flake-utils.lib.eachDefaultSystem (
|
||||||
|
system:
|
||||||
|
let
|
||||||
pkgs = import inputs.nixpkgs {
|
pkgs = import inputs.nixpkgs {
|
||||||
inherit system;
|
inherit system;
|
||||||
overlays = overlays ++ [inputs.devshell.overlay];
|
overlays = overlays ++ [ inputs.devshell.overlays.default ];
|
||||||
};
|
};
|
||||||
platform = pkgs.lib.systems.elaborate system;
|
platform = pkgs.lib.systems.elaborate system;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
# Flake interface to my local packages.
|
# Flake interface to my local packages.
|
||||||
# - `callPackage` puts some junk in mypkgs (`override` and
|
# - `callPackage` puts some junk in mypkgs (`override` and
|
||||||
# `overrideDerivation`) so we filter out anything that isn't a derivation
|
# `overrideDerivation`) so we filter out anything that isn't a derivation
|
||||||
# - We also filter out any packages that aren't supported on the current
|
# - We also filter out any packages that aren't supported on the current
|
||||||
# platform.
|
# platform.
|
||||||
packages = with pkgs.lib; (filterAttrs (_: v: (isDerivation v && meta.availableOn platform v)) pkgs.mypkgs);
|
packages =
|
||||||
formatter = pkgs.alejandra;
|
with pkgs.lib;
|
||||||
|
(filterAttrs (_: v: (isDerivation v && meta.availableOn platform v)) pkgs.mypkgs);
|
||||||
|
formatter = pkgs.nixfmt-tree;
|
||||||
# A devshell with useful utils
|
# A devshell with useful utils
|
||||||
devShells.default = pkgs.devshell.mkShell {
|
devShells.default = pkgs.devshell.mkShell {
|
||||||
packages = [
|
packages = [
|
||||||
inputs.home-manager.defaultPackage.${system}
|
inputs.home-manager.packages.${system}.default
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
})));
|
}
|
||||||
|
))
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-1
@@ -1 +1,4 @@
|
|||||||
{pkgs, ...}: {home.packages = with pkgs; [awscli2];}
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
home.packages = with pkgs; [ awscli2 ];
|
||||||
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
+40
-23
@@ -1,15 +1,15 @@
|
|||||||
{
|
{
|
||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
|
||||||
...
|
...
|
||||||
}: let
|
}:
|
||||||
packages = pkgs.callPackage ./packages.nix {};
|
let
|
||||||
in {
|
packages = pkgs.callPackage ./packages.nix { };
|
||||||
|
in
|
||||||
|
{
|
||||||
home.packages = packages.all;
|
home.packages = packages.all;
|
||||||
home.sessionVariables = {
|
home.sessionVariables = {
|
||||||
"PATH" = "$HOME/.local/bin:$PATH";
|
EDITOR = "vim"; # is overriden to nvim in vim.nix if needed
|
||||||
"EDITOR" = "vim";
|
WORDCHARS = "\${WORDCHARS//[\\/.=]/}"; # ctrl-w on paths without make angery
|
||||||
"WORDCHARS" = "\${WORDCHARS//[\\/.=]/}"; # ctrl-w on paths without make angery
|
|
||||||
};
|
};
|
||||||
/*
|
/*
|
||||||
# For some reason this doesn't play nice when using home manager config from inside
|
# For some reason this doesn't play nice when using home manager config from inside
|
||||||
@@ -38,13 +38,16 @@ in {
|
|||||||
g = "git";
|
g = "git";
|
||||||
cat = "bat";
|
cat = "bat";
|
||||||
ip = "ip --color=auto";
|
ip = "ip --color=auto";
|
||||||
hmswitch = ''home-manager switch --flake ".#$(hostname -s)"'';
|
ns = "nix shell nixpkgs#";
|
||||||
nrswitch = "nixos-rebuild --use-remote-sudo switch --flake '.#'";
|
hm = ''home-manager --flake ".#$(hostname -s)"'';
|
||||||
|
hms = ''home-manager --flake ".#$(hostname -s)" switch'';
|
||||||
|
nr = "nixos-rebuild --sudo --flake '.#'";
|
||||||
|
nrs = "nixos-rebuild --sudo --flake '.#' switch";
|
||||||
da = "direnv allow .";
|
da = "direnv allow .";
|
||||||
dr = "direnv reload";
|
dr = "direnv reload";
|
||||||
};
|
};
|
||||||
# Extra .zshrc stuff
|
# Extra .zshrc stuff
|
||||||
initExtra = ''
|
initContent = ''
|
||||||
# zstyle ':completion:*' menu select # fancy interactive autocomplete
|
# zstyle ':completion:*' menu select # fancy interactive autocomplete
|
||||||
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}' # tabcomplete lower to upper case
|
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}' # tabcomplete lower to upper case
|
||||||
|
|
||||||
@@ -54,7 +57,7 @@ in {
|
|||||||
# Don't honk at me constantly
|
# Don't honk at me constantly
|
||||||
unsetopt beep
|
unsetopt beep
|
||||||
'';
|
'';
|
||||||
enableSyntaxHighlighting = true;
|
syntaxHighlighting.enable = true;
|
||||||
plugins = [
|
plugins = [
|
||||||
{
|
{
|
||||||
name = "fzf-tab";
|
name = "fzf-tab";
|
||||||
@@ -67,42 +70,56 @@ in {
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
exa = {
|
eza.enable = true;
|
||||||
enable = true;
|
|
||||||
enableAliases = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
starship = {
|
starship = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
add_newline = false;
|
add_newline = false;
|
||||||
format = "$username$hostname$shlvl$directory$git_branch$git_commit$git_state$git_metrics$git_status$hg_branch$docker_context$golang$kotlin$nodejs$python$rust$terraform$nix_shell$memory_usage$aws$gcloud$openstack$azure$env_var$crystal$custom$sudo$cmd_duration$line_break$jobs$status$shell$character";
|
direnv.disabled = false;
|
||||||
|
format = "$all";
|
||||||
username.format = "[$user]($style) ";
|
username.format = "[$user]($style) ";
|
||||||
hostname.format = "[$hostname]($style) ";
|
hostname.format = "[$hostname]($style) ";
|
||||||
directory = {truncation_length = -1;};
|
directory = {
|
||||||
|
truncation_length = -1;
|
||||||
|
};
|
||||||
git_branch.format = "[$symbol$branch]($style) ";
|
git_branch.format = "[$symbol$branch]($style) ";
|
||||||
python.format = "[py \${pyenv_prefix}(\${version} )(\\($virtualenv\\) )]($style)";
|
python.symbol = "py ";
|
||||||
nodejs.format = "[js ($version )]($style)";
|
nodejs.symbol = "js ";
|
||||||
nix_shell.format = "[nix $state( \\($name\\))]($style) ";
|
nix_shell.symbol = "nix ";
|
||||||
|
rust.symbol = "rs ";
|
||||||
|
direnv.symbol = "de ";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
direnv = {
|
direnv = {
|
||||||
enable = true;
|
enable = true;
|
||||||
nix-direnv.enable = true;
|
nix-direnv.enable = true;
|
||||||
|
config.global.warn_timeout = "30s";
|
||||||
};
|
};
|
||||||
|
|
||||||
fzf = {
|
fzf = {
|
||||||
enable = true;
|
enable = true;
|
||||||
defaultCommand = "${pkgs.ripgrep}/bin/rg --files";
|
# Include hidden files/folders (-H) but exclude .git
|
||||||
|
defaultCommand = "${pkgs.fd}/bin/fd -H --type f -E .git";
|
||||||
|
fileWidgetCommand = "${pkgs.fd}/bin/fd -H --type f -E .git";
|
||||||
};
|
};
|
||||||
|
|
||||||
ssh = {
|
ssh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
includes = ["~/.ssh/config.local"];
|
enableDefaultConfig = false;
|
||||||
|
package = pkgs.openssh; # Use modern ssh
|
||||||
|
includes = [ "~/.ssh/config.local" ];
|
||||||
|
matchBlocks."*" = {
|
||||||
|
user = "samw";
|
||||||
serverAliveInterval = 30;
|
serverAliveInterval = 30;
|
||||||
serverAliveCountMax = 10;
|
serverAliveCountMax = 10;
|
||||||
matchBlocks."*".user = "samw";
|
compression = true;
|
||||||
|
controlMaster = "autoask";
|
||||||
|
controlPath = "~/.ssh/master-%r@%n:%p";
|
||||||
|
# Close socket once last connection closes
|
||||||
|
controlPersist = "no";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
+7
-1
@@ -1 +1,7 @@
|
|||||||
{pkgs, ...}: {home.packages = with pkgs; [docker colima];}
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
docker
|
||||||
|
colima
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|||||||
+27
-14
@@ -1,17 +1,24 @@
|
|||||||
{pkgs, ...}: {
|
{ pkgs, ... }:
|
||||||
home.packages = [pkgs.git-open];
|
{
|
||||||
programs.git = {
|
home.packages = with pkgs; [
|
||||||
enable = true;
|
git-open
|
||||||
userName = "Sam Willcocks";
|
tea
|
||||||
userEmail = "sam@wlcx.cc";
|
];
|
||||||
|
programs.delta = {
|
||||||
delta = {
|
|
||||||
# Better diffs
|
# Better diffs
|
||||||
enable = true;
|
enable = true;
|
||||||
options = {line-numbers = true;};
|
enableGitIntegration = true;
|
||||||
|
options = {
|
||||||
|
line-numbers = true;
|
||||||
};
|
};
|
||||||
|
};
|
||||||
aliases = {
|
programs.git = {
|
||||||
|
enable = true;
|
||||||
|
lfs.enable = true;
|
||||||
|
settings = {
|
||||||
|
user.name = "Sam Willcocks";
|
||||||
|
user.email = "sam@wlcx.cc";
|
||||||
|
alias = {
|
||||||
a = "add";
|
a = "add";
|
||||||
ap = "add -p";
|
ap = "add -p";
|
||||||
br = "branch";
|
br = "branch";
|
||||||
@@ -34,14 +41,20 @@
|
|||||||
st = "status";
|
st = "status";
|
||||||
sw = "switch";
|
sw = "switch";
|
||||||
swc = "switch --create";
|
swc = "switch --create";
|
||||||
|
unp = "log --branches --not --remotes --no-walk --decorate --oneline";
|
||||||
|
|
||||||
gone = ''
|
gone = ''! git fetch -p && git for-each-ref --format '%(refname:short) %(upstream:track)' │ awk '$2 == "[gone]" {print $1}' | xargs -r git branch -D'';
|
||||||
! git fetch -p && git for-each-ref --format '%(refname:short) %(upstream:track)' │ awk '$2 == "[gone]" {print $1}' | xargs -r git branch -D'';
|
|
||||||
};
|
};
|
||||||
extraConfig = {
|
|
||||||
branch.sort = "-committerdate";
|
branch.sort = "-committerdate";
|
||||||
push.default = "current";
|
push.default = "current";
|
||||||
init.defaultBranch = "main";
|
init.defaultBranch = "main";
|
||||||
|
merge = {
|
||||||
|
conflictStyle = "diff3";
|
||||||
|
mergiraf = {
|
||||||
|
name = "mergiraf";
|
||||||
|
driver = "${pkgs.mergiraf}/bin/mergiraf merge --git %O %A %B -s %S -x %X -y %Y -p %P -l %L";
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
includes = [
|
includes = [
|
||||||
# Always include local gitconfig if it's there
|
# Always include local gitconfig if it's there
|
||||||
|
|||||||
+10
-2
@@ -1,4 +1,5 @@
|
|||||||
{pkgs, ...}: {
|
{ pkgs, lib, ... }:
|
||||||
|
{
|
||||||
programs.gpg = {
|
programs.gpg = {
|
||||||
enable = true;
|
enable = true;
|
||||||
mutableKeys = false;
|
mutableKeys = false;
|
||||||
@@ -19,6 +20,13 @@
|
|||||||
];
|
];
|
||||||
# make yubikey work on macos? lolgpg
|
# make yubikey work on macos? lolgpg
|
||||||
# https://github.com/NixOS/nixpkgs/issues/155629
|
# https://github.com/NixOS/nixpkgs/issues/155629
|
||||||
scdaemonSettings = {disable-ccid = true;};
|
scdaemonSettings = (lib.optionalAttrs pkgs.stdenv.isDarwin { disable-ccid = true; });
|
||||||
|
};
|
||||||
|
|
||||||
|
# Shouldn't have an effect on macos, on linux we need to specify a pinentry
|
||||||
|
services.gpg-agent = {
|
||||||
|
enable = !pkgs.stdenv.isDarwin;
|
||||||
|
enableSshSupport = true;
|
||||||
|
pinentry.package = pkgs.pinentry-all;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,37 @@
|
|||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
programs.helix = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
theme = "monokai_pro";
|
||||||
|
editor = {
|
||||||
|
"soft-wrap".enable = true;
|
||||||
|
"file-picker".hidden = false; # Show hidden files (yes it's counter-intuitive)
|
||||||
|
gutters = ["diagnostics" "line-numbers" "spacer" "diff"];
|
||||||
|
whitespace.render = {
|
||||||
|
space = "none";
|
||||||
|
tab = "all";
|
||||||
|
nbsp = "all";
|
||||||
|
nnbsp = "all";
|
||||||
|
newline = "none";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
languages = {
|
||||||
|
language-server.rust-analyzer.config = {
|
||||||
|
# Don't get lost in .direnv etc and chew 100% cpu forever
|
||||||
|
files.excludeDirs = [
|
||||||
|
".git"
|
||||||
|
".cargo"
|
||||||
|
".direnv"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
language = [
|
||||||
|
{
|
||||||
|
name = "python";
|
||||||
|
language-servers = [ "ty" "basedpyright" ];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
+1
-1
@@ -11,7 +11,7 @@ vim.o.softtabstop = 4
|
|||||||
vim.o.expandtab = true -- owo expands ur tab
|
vim.o.expandtab = true -- owo expands ur tab
|
||||||
|
|
||||||
vim.o.list = true
|
vim.o.list = true
|
||||||
vim.o.listchars = "trail:·" -- show trailing spaces
|
vim.o.listchars = "trail:·,tab:␉·" -- show trailing spaces
|
||||||
|
|
||||||
-- Colors
|
-- Colors
|
||||||
vim.cmd "colorscheme gruvbox"
|
vim.cmd "colorscheme gruvbox"
|
||||||
|
|||||||
+24
-4
@@ -2,14 +2,34 @@
|
|||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
# Mac specific packages.
|
# Mac specific packages.
|
||||||
# TODO: have this in a central packages place rather than here
|
# TODO: have this in a central packages place rather than here
|
||||||
home.packages = with pkgs; [pngpaste mypkgs.qrclip];
|
home.packages = with pkgs; [
|
||||||
|
pngpaste
|
||||||
|
mypkgs.qrclip
|
||||||
|
];
|
||||||
|
home.sessionPath = [
|
||||||
|
"/Applications/Sublime Merge.app/Contents/SharedSupport/bin"
|
||||||
|
];
|
||||||
# Use secretive for SSH agent
|
# Use secretive for SSH agent
|
||||||
programs.ssh.matchBlocks.all = lib.mkIf pkgs.stdenv.isDarwin {
|
programs.ssh.matchBlocks.all = lib.mkIf pkgs.stdenv.isDarwin {
|
||||||
host = "*";
|
host = "*";
|
||||||
extraOptions."IdentityAgent" = "~/Library/Containers/com.maxgoedjen.Secretive.SecretAgent/Data/socket.ssh";
|
extraOptions."IdentityAgent" =
|
||||||
|
"~/Library/Containers/com.maxgoedjen.Secretive.SecretAgent/Data/socket.ssh";
|
||||||
};
|
};
|
||||||
programs.zsh.initExtra = "eval $(/opt/homebrew/bin/brew shellenv)";
|
programs.zsh.sessionVariables = {
|
||||||
|
SSH_AUTH_SOCK = "$HOME/Library/Containers/com.maxgoedjen.Secretive.SecretAgent/Data/socket.ssh";
|
||||||
|
# Make connection muxing permission work.
|
||||||
|
# Openssh by default will only use SSH_ASKPASS if it sees DISPLAY/WAYLAND_DISPLAY, so we have to force it
|
||||||
|
SSH_ASKPASS_REQUIRE = "force";
|
||||||
|
# A nice applescript permission dialog
|
||||||
|
SSH_ASKPASS = (pkgs.fetchurl {
|
||||||
|
url = "https://raw.githubusercontent.com/theseal/ssh-askpass/refs/heads/master/ssh-askpass";
|
||||||
|
hash= "sha256-bQUuGS3Mb+i4Kt+1mDP203s2W1jlRcpl/7uXA7TUZ+o=";
|
||||||
|
executable = true;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
programs.zsh.initContent = "[ -e /opt/homebrew/bin/brew ] && eval $(/opt/homebrew/bin/brew shellenv)";
|
||||||
}
|
}
|
||||||
|
|||||||
+20
-4
@@ -1,5 +1,6 @@
|
|||||||
{pkgs}:
|
{ pkgs }:
|
||||||
with pkgs; rec {
|
with pkgs;
|
||||||
|
rec {
|
||||||
# The stuff you want installed everywhere. The necessities.
|
# The stuff you want installed everywhere. The necessities.
|
||||||
base = [
|
base = [
|
||||||
bat # cat replacement, aliased to cat in home-manager
|
bat # cat replacement, aliased to cat in home-manager
|
||||||
@@ -12,13 +13,28 @@ with pkgs; rec {
|
|||||||
unzip
|
unzip
|
||||||
vim
|
vim
|
||||||
wget
|
wget
|
||||||
|
helix
|
||||||
];
|
];
|
||||||
|
|
||||||
# Networking shit
|
# Networking shit
|
||||||
net = [iperf3 nmap socat tcpdump];
|
net = [
|
||||||
|
dig
|
||||||
|
iperf3
|
||||||
|
mtr
|
||||||
|
nmap
|
||||||
|
socat
|
||||||
|
tcpdump
|
||||||
|
];
|
||||||
|
|
||||||
# development tools
|
# development tools
|
||||||
dev = [jq nixfmt gh glab hexyl];
|
dev = [
|
||||||
|
jq
|
||||||
|
nixfmt-rfc-style
|
||||||
|
gh
|
||||||
|
glab
|
||||||
|
hexyl
|
||||||
|
attic-client
|
||||||
|
];
|
||||||
|
|
||||||
all = base ++ net ++ dev;
|
all = base ++ net ++ dev;
|
||||||
}
|
}
|
||||||
|
|||||||
+7
-4
@@ -1,9 +1,12 @@
|
|||||||
{pkgs, ...}: {
|
{ pkgs, ... }:
|
||||||
home.packages = with pkgs; [yubikey-manager];
|
{
|
||||||
|
home.packages = with pkgs; [ yubikey-manager ];
|
||||||
programs.password-store = {
|
programs.password-store = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {PASSWORD_STORE_DIR = "$HOME/.password-store";};
|
settings = {
|
||||||
package = pkgs.pass.withExtensions (exts: [exts.pass-otp]);
|
PASSWORD_STORE_DIR = "$HOME/.password-store";
|
||||||
|
};
|
||||||
|
package = pkgs.pass.withExtensions (exts: [ exts.pass-otp ]);
|
||||||
};
|
};
|
||||||
programs.zsh.shellAliases = {
|
programs.zsh.shellAliases = {
|
||||||
p = "pass";
|
p = "pass";
|
||||||
|
|||||||
+46
-6
@@ -2,16 +2,48 @@
|
|||||||
# The basics that you'll want everywhere
|
# The basics that you'll want everywhere
|
||||||
default = ./default.nix;
|
default = ./default.nix;
|
||||||
# A machine for development
|
# A machine for development
|
||||||
dev = {...}: {
|
dev =
|
||||||
imports = [./git.nix ./vim.nix ./vim-dev];
|
{ ... }:
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./git.nix
|
||||||
|
./vim.nix
|
||||||
|
./vim-dev
|
||||||
|
./helix.nix
|
||||||
|
];
|
||||||
};
|
};
|
||||||
# A machine for dev with a GUI
|
# A machine for dev with a GUI
|
||||||
# TODO: detect this automatically somehow?
|
# TODO: detect this automatically somehow?
|
||||||
dev-gui = {...}: {
|
dev-gui =
|
||||||
imports = [./vscode.nix];
|
{ ... }:
|
||||||
|
{
|
||||||
|
imports = [ ./vscode.nix ];
|
||||||
|
programs.wezterm = {
|
||||||
|
enable = true;
|
||||||
|
extraConfig = ''
|
||||||
|
return {
|
||||||
|
color_scheme = "GruvboxDarkHard",
|
||||||
|
keys = {
|
||||||
|
{
|
||||||
|
key = 'd',
|
||||||
|
mods = 'SUPER',
|
||||||
|
action = wezterm.action.SplitVertical{domain='CurrentPaneDomain'},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key = 'D',
|
||||||
|
mods = 'SUPER | SHIFT',
|
||||||
|
action = wezterm.action.SplitHorizontal{domain='CurrentPaneDomain'},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
tpmssh = ./tpmssh.nix;
|
||||||
# Sensitive stuff
|
# Sensitive stuff
|
||||||
sensitive = {...}: {
|
sensitive =
|
||||||
|
{ ... }:
|
||||||
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./passwords.nix
|
./passwords.nix
|
||||||
./gpg.nix
|
./gpg.nix
|
||||||
@@ -24,5 +56,13 @@
|
|||||||
# A machine you want to do aws stuff on
|
# A machine you want to do aws stuff on
|
||||||
aws = ./aws.nix;
|
aws = ./aws.nix;
|
||||||
# A server
|
# A server
|
||||||
server = {...}: {imports = [./default.nix ./git.nix ./vim.nix];};
|
server =
|
||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./default.nix
|
||||||
|
./git.nix
|
||||||
|
./vim.nix
|
||||||
|
];
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,43 @@
|
|||||||
|
# Enable tpm-ssh-agent in a systemd user service
|
||||||
|
{ pkgs, config, ... }:
|
||||||
|
{
|
||||||
|
home.packages = [ pkgs.ssh-tpm-agent ];
|
||||||
|
home.sessionVariables = {
|
||||||
|
SSH_AUTH_SOCK = "$(${pkgs.ssh-tpm-agent}/bin/ssh-tpm-agent --print-socket)";
|
||||||
|
};
|
||||||
|
systemd.user.sockets.ssh-tpm-agent = {
|
||||||
|
Install.WantedBy = [ "sockets.target" ];
|
||||||
|
Socket = {
|
||||||
|
ListenStream = "%t/ssh-tpm-agent.sock";
|
||||||
|
SocketMode = "0600";
|
||||||
|
Service = "ssh-tpm-agent.service";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.user.services.ssh-tpm-agent = {
|
||||||
|
Unit = {
|
||||||
|
Requires = [ "ssh-tpm-agent.socket" ];
|
||||||
|
ConditionEnvironment = "!SSH_AGENT_PID";
|
||||||
|
};
|
||||||
|
Service = {
|
||||||
|
Environment = ''
|
||||||
|
SSH_AUTH_SOCK="%t/ssh-tpm-agent.sock"
|
||||||
|
'';
|
||||||
|
ExecStart = "${
|
||||||
|
pkgs.writeShellScriptBin "start-ssh-tpm-agent" (
|
||||||
|
if config.services.gpg-agent.enableSshSupport then
|
||||||
|
''
|
||||||
|
${pkgs.ssh-tpm-agent}/bin/ssh-tpm-agent -A $(${config.programs.gpg.package}/bin/gpgconf --list-dirs agent-ssh-socket)
|
||||||
|
''
|
||||||
|
else
|
||||||
|
''
|
||||||
|
${pkgs.ssh-tpm-agent}/bin/ssh-tpm-agent
|
||||||
|
''
|
||||||
|
)
|
||||||
|
}/bin/start-ssh-tpm-agent";
|
||||||
|
PassEnvironment = "SSH_AGENT_PID";
|
||||||
|
SuccessExitStatus = 2;
|
||||||
|
Type = "simple";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -3,8 +3,14 @@
|
|||||||
lib,
|
lib,
|
||||||
system,
|
system,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
programs.neovim.plugins = with pkgs.vimPlugins;
|
{
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
nil
|
||||||
|
nixd
|
||||||
|
];
|
||||||
|
programs.neovim.plugins =
|
||||||
|
with pkgs.vimPlugins;
|
||||||
[
|
[
|
||||||
# More fancy shit
|
# More fancy shit
|
||||||
nvim-treesitter
|
nvim-treesitter
|
||||||
@@ -13,6 +19,8 @@
|
|||||||
nvim-lspconfig
|
nvim-lspconfig
|
||||||
nvim-cmp
|
nvim-cmp
|
||||||
cmp-nvim-lsp
|
cmp-nvim-lsp
|
||||||
|
cmp-vsnip
|
||||||
|
vim-vsnip
|
||||||
# Language specific
|
# Language specific
|
||||||
go-nvim
|
go-nvim
|
||||||
rust-vim
|
rust-vim
|
||||||
@@ -24,10 +32,12 @@
|
|||||||
kotlin-vim
|
kotlin-vim
|
||||||
Jenkinsfile-vim-syntax
|
Jenkinsfile-vim-syntax
|
||||||
html5-vim
|
html5-vim
|
||||||
|
# Useful stuff
|
||||||
|
vim-gh-line
|
||||||
]
|
]
|
||||||
# delve is unsupported on aarch64-linux and golangci-lint is broken on darwin
|
# delve is unsupported on aarch64-linux and golangci-lint is broken on darwin
|
||||||
# (see https://github.com/NixOS/nixpkgs/issues/168984).
|
# (see https://github.com/NixOS/nixpkgs/issues/168984).
|
||||||
++ lib.optionals (system != "aarch64-linux" && !pkgs.stdenv.isDarwin) [vim-go];
|
++ lib.optionals (system != "aarch64-linux" && !pkgs.stdenv.isDarwin) [ vim-go ];
|
||||||
programs.neovim.extraConfig = ''
|
programs.neovim.extraConfig = ''
|
||||||
lua <<EOF
|
lua <<EOF
|
||||||
${builtins.readFile ./dev.lua}
|
${builtins.readFile ./dev.lua}
|
||||||
|
|||||||
+17
-11
@@ -12,6 +12,12 @@ end
|
|||||||
-- Completion
|
-- Completion
|
||||||
local cmp = require'cmp'
|
local cmp = require'cmp'
|
||||||
cmp.setup({
|
cmp.setup({
|
||||||
|
-- Use snippy for completion
|
||||||
|
snippet = {
|
||||||
|
expand = function(args)
|
||||||
|
vim.fn["vsnip#anonymous"](args.body)
|
||||||
|
end,
|
||||||
|
},
|
||||||
-- Disable completions if we're in a comment
|
-- Disable completions if we're in a comment
|
||||||
enabled = function()
|
enabled = function()
|
||||||
if require"cmp.config.context".in_treesitter_capture("comment")==true or require"cmp.config.context".in_syntax_group("Comment") then
|
if require"cmp.config.context".in_treesitter_capture("comment")==true or require"cmp.config.context".in_syntax_group("Comment") then
|
||||||
@@ -43,19 +49,12 @@ require'lspconfig'.gopls.setup{
|
|||||||
on_attach = on_attach,
|
on_attach = on_attach,
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
}
|
}
|
||||||
require'lspconfig'.pylsp.setup{
|
require'lspconfig'.basedpyright.setup{}
|
||||||
|
require'lspconfig'.nil_ls.setup{
|
||||||
on_attach = on_attach,
|
on_attach = on_attach,
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
handlers = {
|
|
||||||
["textDocument/publishDiagnostics"] = vim.lsp.with(
|
|
||||||
vim.lsp.diagnostic.on_publish_diagnostics, {
|
|
||||||
-- Disable virtual_text
|
|
||||||
virtual_text = false
|
|
||||||
}
|
|
||||||
),
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
require'lspconfig'.rnix.setup{
|
require'lspconfig'.nixd.setup{
|
||||||
on_attach = on_attach,
|
on_attach = on_attach,
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
}
|
}
|
||||||
@@ -76,6 +75,13 @@ require'lspconfig'.rust_analyzer.setup{
|
|||||||
description = 'Open documentation for the symbol under the cursor in default browser',
|
description = 'Open documentation for the symbol under the cursor in default browser',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
settings = {
|
||||||
|
["rust-analyzer"] = {
|
||||||
|
procMacro = {
|
||||||
|
enable = false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
require'lspconfig'.dhall_lsp_server.setup{
|
require'lspconfig'.dhall_lsp_server.setup{
|
||||||
on_attach = on_attach,
|
on_attach = on_attach,
|
||||||
@@ -102,7 +108,7 @@ require('go').setup()
|
|||||||
|
|
||||||
-- Diags with Trouble
|
-- Diags with Trouble
|
||||||
require('trouble').setup {
|
require('trouble').setup {
|
||||||
icons = false,
|
icons = {},
|
||||||
signs = {
|
signs = {
|
||||||
error = "E",
|
error = "E",
|
||||||
warning = "W",
|
warning = "W",
|
||||||
|
|||||||
+7
-7
@@ -1,13 +1,13 @@
|
|||||||
# This module sets up a "full" neovim install with plugins and unicorns. It
|
# Vim with some niceties. If you're spending any time in vim you'll want this.
|
||||||
# also makes neovim the default editor and aliases vim to nvim.
|
# For a full-fat vim with all the bells and whistles, see vim-dev
|
||||||
{
|
{
|
||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
strings,
|
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
home.sessionVariables = {"EDITOR" = "nvim";};
|
{
|
||||||
home.packages = with pkgs; [rnix-lsp ripgrep];
|
home.sessionVariables.EDITOR = lib.mkForce "nvim";
|
||||||
|
home.packages = with pkgs; [ ripgrep ];
|
||||||
programs.neovim = {
|
programs.neovim = {
|
||||||
enable = true;
|
enable = true;
|
||||||
viAlias = true;
|
viAlias = true;
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
vim-gitgutter
|
vim-gitgutter
|
||||||
# More stuff idk
|
# More stuff idk
|
||||||
emmet-vim
|
emmet-vim
|
||||||
vim-sleuth # guess whitespace settings from file
|
vim-sleuth # guess whitespace settings from file
|
||||||
];
|
];
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
lua <<EOF
|
lua <<EOF
|
||||||
|
|||||||
+12
-5
@@ -1,18 +1,25 @@
|
|||||||
{pkgs, ...}: {
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
programs.vscode = {
|
programs.vscode = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.vscodium;
|
package = pkgs.vscodium;
|
||||||
mutableExtensionsDir = false;
|
mutableExtensionsDir = false;
|
||||||
extensions = with pkgs.vscode-extensions; [
|
profiles.default.extensions = with pkgs.vscode-extensions; [
|
||||||
matklad.rust-analyzer
|
rust-lang.rust-analyzer
|
||||||
jdinhlife.gruvbox
|
jdinhlife.gruvbox
|
||||||
jnoortheen.nix-ide
|
jnoortheen.nix-ide
|
||||||
editorconfig.editorconfig
|
editorconfig.editorconfig
|
||||||
];
|
];
|
||||||
userSettings = {
|
profiles.default.userSettings = {
|
||||||
"update.mode" = "none";
|
"update.mode" = "none";
|
||||||
"workbench.colorTheme" = "Gruvbox Dark Hard";
|
"window.autoDetectColorScheme" = true;
|
||||||
|
"workbench.preferredDarkColorTheme" = "Gruvbox Dark Hard";
|
||||||
|
"workbench.preferredLightColorTheme" = "Gruvbox Light Hard";
|
||||||
"files.trimTrailingWhitespace" = true;
|
"files.trimTrailingWhitespace" = true;
|
||||||
|
"emmet.includeLanguages"."django-html" = "html";
|
||||||
|
# Don't try to write to the nix-managed .ssh/config
|
||||||
|
"remote.SSH.configFile" = "~/.ssh/config.local";
|
||||||
|
"editor.rulers" = [ 90 ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,5 +5,6 @@
|
|||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIMvrgrLnE+AQBOBRiBoTFkbWaYTvqaBzIp4OfDiXUij"
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIMvrgrLnE+AQBOBRiBoTFkbWaYTvqaBzIp4OfDiXUij"
|
||||||
"ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBDQdGzwYiallvWXIHgSAf2GOwMJKA8bxPmwyuO+vsd1HwB65hMRPCpKS+FNLIpkrADNnuhGS3xGCGSSuQ+zAu/g= zinc-se-main@secretive.zinc.local"
|
"ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBDQdGzwYiallvWXIHgSAf2GOwMJKA8bxPmwyuO+vsd1HwB65hMRPCpKS+FNLIpkrADNnuhGS3xGCGSSuQ+zAu/g= zinc-se-main@secretive.zinc.local"
|
||||||
"ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBNLrJyUXmiFWb9vhlTWZLYr64IsKut+c9TGqq3/uwPDeF4X0Qb2jzxqXfQcDSztjR09JHbC8BOqfpYYT9LHahIo= YubiKey #13340583 PIV Slot 9a"
|
"ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBNLrJyUXmiFWb9vhlTWZLYr64IsKut+c9TGqq3/uwPDeF4X0Qb2jzxqXfQcDSztjR09JHbC8BOqfpYYT9LHahIo= YubiKey #13340583 PIV Slot 9a"
|
||||||
|
"ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBC/kJYueV9cBlyPsYhC0Q2HQR+E6MswwUF6hwXrkbb4JPNn9bD2PM2GjXQe0rz6KWPr4LYkbGTo9zbRQg3d2MTE= gallium-se-main@secretive.gallium.local"
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-2
@@ -1,4 +1,5 @@
|
|||||||
# TODO: auto import everything
|
# TODO: auto import everything
|
||||||
{pkgs, ...}: {
|
{ pkgs, ... }:
|
||||||
qrclip = pkgs.callPackage ./qrclip {};
|
{
|
||||||
|
qrclip = pkgs.callPackage ./qrclip { };
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,11 +2,14 @@
|
|||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
stdenv,
|
stdenv,
|
||||||
}: let
|
}:
|
||||||
zbar = pkgs.zbar.override {enableVideo = false;};
|
let
|
||||||
|
zbar = pkgs.zbar.override { enableVideo = false; };
|
||||||
in
|
in
|
||||||
(pkgs.writeShellScriptBin "qrclip" ''
|
(pkgs.writeShellScriptBin "qrclip" ''
|
||||||
set -eo pipefail
|
set -eo pipefail
|
||||||
${pkgs.pngpaste}/bin/pngpaste - | ${zbar}/bin/zbarimg --raw -q1 -
|
${pkgs.pngpaste}/bin/pngpaste - | ${zbar}/bin/zbarimg --raw -q1 -
|
||||||
'')
|
'')
|
||||||
// {meta.platforms = lib.platforms.darwin;}
|
// {
|
||||||
|
meta.platforms = lib.platforms.darwin;
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user