Compare commits

..
1 Commits
Author SHA1 Message Date
samw 98a3416191 fix 2024-09-28 20:16:19 +01:00
21 changed files with 621 additions and 1903 deletions
Generated
+20 -17
View File
@@ -2,16 +2,19 @@
"nodes": {
"devshell": {
"inputs": {
"flake-utils": [
"flake-utils"
],
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1764011051,
"narHash": "sha256-M7SZyPZiqZUR/EiiBJnmyUbOi5oE/03tCeFrTiUZchI=",
"lastModified": 1713532798,
"narHash": "sha256-wtBhsdMJA3Wa32Wtm1eeo84GejtI43pMrFrmwLXrsEc=",
"owner": "numtide",
"repo": "devshell",
"rev": "17ed8d9744ebe70424659b0ef74ad6d41fc87071",
"rev": "12e914740a25ea1891ec619bb53cf5e6ca922e40",
"type": "github"
},
"original": {
@@ -25,11 +28,11 @@
"systems": "systems"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"lastModified": 1710146030,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"type": "github"
},
"original": {
@@ -45,43 +48,43 @@
]
},
"locked": {
"lastModified": 1764866045,
"narHash": "sha256-0GsEtXV9OquDQ1VclQfP16cU5VZh7NEVIOjSH4UaJuM=",
"lastModified": 1717527182,
"narHash": "sha256-vWSkg6AMok1UUQiSYVdGMOXKD2cDFnajITiSi0Zjd1A=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "f63d0fe9d81d36e5fc95497217a72e02b8b7bcab",
"rev": "845a5c4c073f74105022533907703441e0464bc3",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "release-25.11",
"ref": "release-24.05",
"repo": "home-manager",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1764831616,
"narHash": "sha256-OtzF5wBvO0jgW1WW1rQU9cMGx7zuvkF7CAVJ1ypzkxA=",
"lastModified": 1717880965,
"narHash": "sha256-7dnGrJc38PbjYdGkJ95ZIhvBgbTjETdYUjoYmOgxc5w=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "c97c47f2bac4fa59e2cbdeba289686ae615f8ed4",
"rev": "27d1200b2051213f338225cc366d49a37170f5d8",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-25.11",
"ref": "release-24.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1764951420,
"narHash": "sha256-oLJXP0fb5hyUvHGKAWdtjhl1/4ivxXy3HsuMMTTxrd8=",
"lastModified": 1713995654,
"narHash": "sha256-S+4C0H9w7H9tSv1RviD/otsTmf1ECuxJMJ/j1t9gjPE=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "0b784f7c32b9bbab8a599ccc6b4acc58f42d6f4f",
"rev": "ce6da85c2dc9e659bef799c2ed053771e1bb8ee3",
"type": "github"
},
"original": {
+27 -82
View File
@@ -2,77 +2,57 @@
description = "Samw's home environment, as managed by nix/home-manager.";
inputs = {
# Nixpkgs
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";
};
nixpkgs = {url = "github:nixos/nixpkgs/release-24.05";};
nixpkgs-unstable = {url = "github:nixos/nixpkgs";};
# Other modules
home-manager = {
url = "github:nix-community/home-manager/release-25.11";
url = "github:nix-community/home-manager/release-24.05";
inputs.nixpkgs.follows = "nixpkgs";
};
flake-utils.url = "github:numtide/flake-utils";
devshell = {
url = "github:numtide/devshell";
inputs.flake-utils.follows = "flake-utils";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
inputs:
let
outputs = inputs: let
overlays = [
# Add our own local packages
(final: prev: {
# 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;
lib = {
mkHome =
{
mkHome = {
profiles,
system,
username ? "samw",
}:
inputs.home-manager.lib.homeManagerConfiguration {
pkgs = (
import inputs.nixpkgs {
pkgs = (import inputs.nixpkgs {
inherit system;
config.allowUnfree = true; # Yes I know it's bad for me
}
);
});
modules = [
{
home = {
{ home = {
inherit username;
homeDirectory =
if (inputs.nixpkgs.lib.systems.elaborate system).isDarwin then
"/Users/${username}"
else
"/home/${username}";
if (inputs.nixpkgs.lib.systems.elaborate system).isDarwin
then "/Users/${username}"
else "/home/${username}";
stateVersion = "21.11";
};
}
]
++ profiles
++ [
{ nixpkgs.overlays = overlays; }
};}] ++ profiles ++ [
{nixpkgs.overlays = overlays;}
# See comment in home/default.nix.
(
{ pkgs, ... }:
{
({ pkgs, ... }: {
nix = {
enable = true;
package = pkgs.nix;
@@ -83,16 +63,10 @@
# level, so less duplication overall and no more fetching that 30MB src
# every time you run nix shell.
registry.nixpkgs.flake = inputs.nixpkgs;
registry.nixpkgs-unstable.to = {
owner = "nixos";
repo = "nixpkgs";
type = "github";
};
};
}
)
})
];
extraSpecialArgs = { inherit system; };
extraSpecialArgs = {inherit system;};
};
};
@@ -100,63 +74,34 @@
homeConfigurations = {
zinc = lib.mkHome {
system = "aarch64-darwin";
profiles = with profiles; [
default
dev
dev-gui
sensitive
mac
];
profiles = with profiles; [default dev dev-gui sensitive mac];
};
luroy = lib.mkHome {
system = "x86_64-linux";
profiles = with profiles; [
default
dev
];
};
kallax = lib.mkHome {
system = "x86_64-linux";
profiles = with profiles; [default dev];
};
phosphorus = lib.mkHome {
system = "aarch64-darwin";
profiles = with profiles; [
default
dev
sensitive
mac
];
};
};
}
# Per-system things
// (inputs.flake-utils.lib.eachDefaultSystem (
system:
let
// (inputs.flake-utils.lib.eachDefaultSystem (system: let
pkgs = import inputs.nixpkgs {
inherit system;
overlays = overlays ++ [ inputs.devshell.overlays.default ];
overlays = overlays ++ [inputs.devshell.overlays.default];
};
platform = pkgs.lib.systems.elaborate system;
in
{
in {
# Flake interface to my local packages.
# - `callPackage` puts some junk in mypkgs (`override` and
# `overrideDerivation`) so we filter out anything that isn't a derivation
# - We also filter out any packages that aren't supported on the current
# platform.
packages =
with pkgs.lib;
(filterAttrs (_: v: (isDerivation v && meta.availableOn platform v)) pkgs.mypkgs);
formatter = pkgs.nixfmt-tree;
packages = with pkgs.lib; (filterAttrs (_: v: (isDerivation v && meta.availableOn platform v)) pkgs.mypkgs);
formatter = pkgs.alejandra;
# A devshell with useful utils
devShells.default = pkgs.devshell.mkShell {
packages = [
inputs.home-manager.packages.${system}.default
inputs.home-manager.defaultPackage.${system}
];
};
}
))
);
})));
}
+1 -4
View File
@@ -1,4 +1 @@
{ pkgs, ... }:
{
home.packages = with pkgs; [ awscli2 ];
}
{pkgs, ...}: {home.packages = with pkgs; [awscli2];}
File diff suppressed because it is too large Load Diff
+17 -33
View File
@@ -1,11 +1,9 @@
{
pkgs,
...
}:
let
packages = pkgs.callPackage ./packages.nix { };
in
{
}: let
packages = pkgs.callPackage ./packages.nix {};
in {
home.packages = packages.all;
home.sessionVariables = {
EDITOR = "vim"; # is overriden to nvim in vim.nix if needed
@@ -41,13 +39,13 @@ in
ns = "nix shell nixpkgs#";
hm = ''home-manager --flake ".#$(hostname -s)"'';
hms = ''home-manager --flake ".#$(hostname -s)" switch'';
nr = "nixos-rebuild --sudo --flake '.#'";
nrs = "nixos-rebuild --sudo --flake '.#' switch";
nr = "nixos-rebuild --use-remote-sudo --flake '.#'";
nrs = "nixos-rebuild --use-remote-sudo --flake '.#' switch";
da = "direnv allow .";
dr = "direnv reload";
};
# Extra .zshrc stuff
initContent = ''
initExtra = ''
# zstyle ':completion:*' menu select # fancy interactive autocomplete
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}' # tabcomplete lower to upper case
@@ -57,6 +55,9 @@ in
# Don't honk at me constantly
unsetopt beep
'';
envExtra = ''
export FZF_DEFAULT_COMMAND='${pkgs.fd}/bin/fd --type f --strip-cwd-prefix'
'';
syntaxHighlighting.enable = true;
plugins = [
{
@@ -76,50 +77,33 @@ in
enable = true;
settings = {
add_newline = false;
direnv.disabled = false;
format = "$all";
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";
username.format = "[$user]($style) ";
hostname.format = "[$hostname]($style) ";
directory = {
truncation_length = -1;
};
directory = {truncation_length = -1;};
git_branch.format = "[$symbol$branch]($style) ";
python.symbol = "py ";
nodejs.symbol = "js ";
nix_shell.symbol = "nix ";
rust.symbol = "rs ";
direnv.symbol = "de ";
python.format = "[py \${pyenv_prefix}(\${version} )(\\($virtualenv\\) )]($style)";
nodejs.format = "[js ($version )]($style)";
nix_shell.format = "[nix $state( \\($name\\))]($style) ";
};
};
direnv = {
enable = true;
nix-direnv.enable = true;
config.global.warn_timeout = "30s";
};
fzf = {
enable = true;
# 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";
defaultCommand = "${pkgs.ripgrep}/bin/rg --files";
};
ssh = {
enable = true;
enableDefaultConfig = false;
package = pkgs.openssh; # Use modern ssh
includes = [ "~/.ssh/config.local" ];
matchBlocks."*" = {
user = "samw";
includes = ["~/.ssh/config.local"];
serverAliveInterval = 30;
serverAliveCountMax = 10;
compression = true;
controlMaster = "autoask";
controlPath = "~/.ssh/master-%r@%n:%p";
# Close socket once last connection closes
controlPersist = "no";
};
matchBlocks."*".user = "samw";
};
};
}
+1 -7
View File
@@ -1,7 +1 @@
{ pkgs, ... }:
{
home.packages = with pkgs; [
docker
colima
];
}
{pkgs, ...}: {home.packages = with pkgs; [docker colima];}
+15 -27
View File
@@ -1,24 +1,18 @@
{ pkgs, ... }:
{
home.packages = with pkgs; [
git-open
tea
];
programs.delta = {
# Better diffs
enable = true;
enableGitIntegration = true;
options = {
line-numbers = true;
};
};
{pkgs, ...}: {
home.packages = with pkgs; [ git-open tea ];
programs.git = {
enable = true;
lfs.enable = true;
settings = {
user.name = "Sam Willcocks";
user.email = "sam@wlcx.cc";
alias = {
userName = "Sam Willcocks";
userEmail = "sam@wlcx.cc";
delta = {
# Better diffs
enable = true;
options = {line-numbers = true;};
};
aliases = {
a = "add";
ap = "add -p";
br = "branch";
@@ -41,20 +35,14 @@
st = "status";
sw = "switch";
swc = "switch --create";
unp = "log --branches --not --remotes --no-walk --decorate --oneline";
gone = ''! git fetch -p && git for-each-ref --format '%(refname:short) %(upstream:track)' awk '$2 == "[gone]" {print $1}' | xargs -r git branch -D'';
gone = ''
! 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";
push.default = "current";
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 = [
# Always include local gitconfig if it's there
+3 -4
View File
@@ -1,5 +1,4 @@
{ pkgs, lib, ... }:
{
{pkgs, lib, ...}: {
programs.gpg = {
enable = true;
mutableKeys = false;
@@ -20,13 +19,13 @@
];
# make yubikey work on macos? lolgpg
# https://github.com/NixOS/nixpkgs/issues/155629
scdaemonSettings = (lib.optionalAttrs pkgs.stdenv.isDarwin { 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;
pinentryPackage = pkgs.pinentry-all;
};
}
-37
View File
@@ -1,37 +0,0 @@
{ ... }:
{
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" ];
}
];
};
};
}
+4 -24
View File
@@ -2,34 +2,14 @@
pkgs,
lib,
...
}:
{
}: {
# Mac specific packages.
# TODO: have this in a central packages place rather than here
home.packages = with pkgs; [
pngpaste
mypkgs.qrclip
];
home.sessionPath = [
"/Applications/Sublime Merge.app/Contents/SharedSupport/bin"
];
home.packages = with pkgs; [pngpaste mypkgs.qrclip];
# Use secretive for SSH agent
programs.ssh.matchBlocks.all = lib.mkIf pkgs.stdenv.isDarwin {
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.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)";
programs.zsh.initExtra = "eval $(/opt/homebrew/bin/brew shellenv)";
}
+4 -20
View File
@@ -1,6 +1,5 @@
{ pkgs }:
with pkgs;
rec {
{pkgs}:
with pkgs; rec {
# The stuff you want installed everywhere. The necessities.
base = [
bat # cat replacement, aliased to cat in home-manager
@@ -13,28 +12,13 @@ rec {
unzip
vim
wget
helix
];
# Networking shit
net = [
dig
iperf3
mtr
nmap
socat
tcpdump
];
net = [dig iperf3 nmap socat tcpdump whois];
# development tools
dev = [
jq
nixfmt-rfc-style
gh
glab
hexyl
attic-client
];
dev = [jq nixfmt gh glab hexyl];
all = base ++ net ++ dev;
}
+4 -7
View File
@@ -1,12 +1,9 @@
{ pkgs, ... }:
{
home.packages = with pkgs; [ yubikey-manager ];
{pkgs, ...}: {
home.packages = with pkgs; [yubikey-manager];
programs.password-store = {
enable = true;
settings = {
PASSWORD_STORE_DIR = "$HOME/.password-store";
};
package = pkgs.pass.withExtensions (exts: [ exts.pass-otp ]);
settings = {PASSWORD_STORE_DIR = "$HOME/.password-store";};
package = pkgs.pass.withExtensions (exts: [exts.pass-otp]);
};
programs.zsh.shellAliases = {
p = "pass";
+6 -45
View File
@@ -2,48 +2,17 @@
# The basics that you'll want everywhere
default = ./default.nix;
# A machine for development
dev =
{ ... }:
{
imports = [
./git.nix
./vim.nix
./vim-dev
./helix.nix
];
dev = {...}: {
imports = [./git.nix ./vim.nix ./vim-dev];
};
# A machine for dev with a GUI
# TODO: detect this automatically somehow?
dev-gui =
{ ... }:
{
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'},
},
},
}
'';
};
dev-gui = {...}: {
imports = [./vscode.nix];
};
tpmssh = ./tpmssh.nix;
# Sensitive stuff
sensitive =
{ ... }:
{
sensitive = {...}: {
imports = [
./passwords.nix
./gpg.nix
@@ -56,13 +25,5 @@
# A machine you want to do aws stuff on
aws = ./aws.nix;
# A server
server =
{ ... }:
{
imports = [
./default.nix
./git.nix
./vim.nix
];
};
server = {...}: {imports = [./default.nix ./git.nix ./vim.nix];};
}
+8 -16
View File
@@ -1,12 +1,15 @@
# Enable tpm-ssh-agent in a systemd user service
{ pkgs, config, ... }:
{
{pkgs, config, lib, ...}: {
home.packages = [ pkgs.ssh-tpm-agent ];
home.sessionVariables = {
SSH_AUTH_SOCK = "$(${pkgs.ssh-tpm-agent}/bin/ssh-tpm-agent --print-socket)";
SSH_AUTH_SOCK = let
maybeProxy = lib.strings.optionalString config.services.gpg-agent.enableSshSupport " -A $(${config.programs.gpg.package}/bin/gpgconf --list-dirs agent-ssh-socket)";
cmd = "${pkgs.ssh-tpm-agent}/bin/ssh-tpm-agent --print-socket${maybeProxy}";
in "$(${cmd})";
TESTIFICLES = "hello";
};
systemd.user.sockets.ssh-tpm-agent = {
Install.WantedBy = [ "sockets.target" ];
Unit.WantedBy = [ "sockets.target" ];
Socket = {
ListenStream = "%t/ssh-tpm-agent.sock";
SocketMode = "0600";
@@ -23,18 +26,7 @@
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";
ExecStart = "${pkgs.ssh-tpm-agent}";
PassEnvironment = "SSH_AGENT_PID";
SuccessExitStatus = 2;
Type = "simple";
+4 -9
View File
@@ -3,14 +3,9 @@
lib,
system,
...
}:
{
home.packages = with pkgs; [
nil
nixd
];
programs.neovim.plugins =
with pkgs.vimPlugins;
}: {
home.packages = with pkgs; [nil];
programs.neovim.plugins = with pkgs.vimPlugins;
[
# More fancy shit
nvim-treesitter
@@ -37,7 +32,7 @@
]
# delve is unsupported on aarch64-linux and golangci-lint is broken on darwin
# (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 = ''
lua <<EOF
${builtins.readFile ./dev.lua}
+1 -12
View File
@@ -54,10 +54,6 @@ require'lspconfig'.nil_ls.setup{
on_attach = on_attach,
capabilities = capabilities,
}
require'lspconfig'.nixd.setup{
on_attach = on_attach,
capabilities = capabilities,
}
require'lspconfig'.rust_analyzer.setup{
on_attach = on_attach,
capabilities = capabilities,
@@ -75,13 +71,6 @@ require'lspconfig'.rust_analyzer.setup{
description = 'Open documentation for the symbol under the cursor in default browser',
},
},
settings = {
["rust-analyzer"] = {
procMacro = {
enable = false,
},
},
},
}
require'lspconfig'.dhall_lsp_server.setup{
on_attach = on_attach,
@@ -108,7 +97,7 @@ require('go').setup()
-- Diags with Trouble
require('trouble').setup {
icons = {},
icons = false,
signs = {
error = "E",
warning = "W",
+3 -4
View File
@@ -4,10 +4,9 @@
pkgs,
lib,
...
}:
{
}: {
home.sessionVariables.EDITOR = lib.mkForce "nvim";
home.packages = with pkgs; [ ripgrep ];
home.packages = with pkgs; [ripgrep];
programs.neovim = {
enable = true;
viAlias = true;
@@ -27,7 +26,7 @@
vim-gitgutter
# More stuff idk
emmet-vim
vim-sleuth # guess whitespace settings from file
vim-sleuth # guess whitespace settings from file
];
extraConfig = ''
lua <<EOF
+4 -7
View File
@@ -1,22 +1,19 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
programs.vscode = {
enable = true;
package = pkgs.vscodium;
mutableExtensionsDir = false;
profiles.default.extensions = with pkgs.vscode-extensions; [
rust-lang.rust-analyzer
extensions = with pkgs.vscode-extensions; [
matklad.rust-analyzer
jdinhlife.gruvbox
jnoortheen.nix-ide
editorconfig.editorconfig
];
profiles.default.userSettings = {
userSettings = {
"update.mode" = "none";
"window.autoDetectColorScheme" = true;
"workbench.preferredDarkColorTheme" = "Gruvbox Dark Hard";
"workbench.preferredLightColorTheme" = "Gruvbox Light Hard";
"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 ];
-1
View File
@@ -5,6 +5,5 @@
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIMvrgrLnE+AQBOBRiBoTFkbWaYTvqaBzIp4OfDiXUij"
"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 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBC/kJYueV9cBlyPsYhC0Q2HQR+E6MswwUF6hwXrkbb4JPNn9bD2PM2GjXQe0rz6KWPr4LYkbGTo9zbRQg3d2MTE= gallium-se-main@secretive.gallium.local"
];
}
+2 -3
View File
@@ -1,5 +1,4 @@
# TODO: auto import everything
{ pkgs, ... }:
{
qrclip = pkgs.callPackage ./qrclip { };
{pkgs, ...}: {
qrclip = pkgs.callPackage ./qrclip {};
}
+5 -8
View File
@@ -2,14 +2,11 @@
pkgs,
lib,
stdenv,
}:
let
zbar = pkgs.zbar.override { enableVideo = false; };
}: let
zbar = pkgs.zbar.override {enableVideo = false;};
in
(pkgs.writeShellScriptBin "qrclip" ''
(pkgs.writeShellScriptBin "qrclip" ''
set -eo pipefail
${pkgs.pngpaste}/bin/pngpaste - | ${zbar}/bin/zbarimg --raw -q1 -
'')
// {
meta.platforms = lib.platforms.darwin;
}
'')
// {meta.platforms = lib.platforms.darwin;}