Compare commits
7 Commits
046f89aa3d
...
c64e8054f1
Author | SHA1 | Date |
---|---|---|
Joshua Potter | c64e8054f1 | |
Joshua Potter | 861934229b | |
Joshua Potter | 49b189d9ab | |
Joshua Potter | 69a9c8653d | |
Joshua Potter | 439bb14368 | |
Joshua Potter | 8725aed4b1 | |
Joshua Potter | 6d3fadd0b2 |
34
flake.nix
34
flake.nix
|
@ -37,12 +37,12 @@
|
|||
thebe = tapir.pkgs;
|
||||
};
|
||||
nodeSpecialArgs = {
|
||||
framework = {
|
||||
inherit (tapir) home-manager;
|
||||
};
|
||||
deimos = {
|
||||
inherit (tapir) sops-nix;
|
||||
};
|
||||
framework = {
|
||||
inherit (tapir) home-manager;
|
||||
};
|
||||
phobos = {
|
||||
inherit (tapir) home-manager;
|
||||
};
|
||||
|
@ -52,21 +52,37 @@
|
|||
};
|
||||
};
|
||||
|
||||
# Local machines. Deploy using `colmena apply-local [--sudo]`
|
||||
deimos = {
|
||||
imports = [ ./hive/deimos ];
|
||||
deployment = {
|
||||
allowLocalDeployment = false;
|
||||
targetHost = "24.199.110.222";
|
||||
};
|
||||
};
|
||||
|
||||
framework = {
|
||||
imports = [ ./hive/framework ];
|
||||
deployment = {
|
||||
allowLocalDeployment = true;
|
||||
targetHost = null; # Disable SSH deployment.
|
||||
targetHost = null;
|
||||
};
|
||||
};
|
||||
|
||||
# Remote machines. Deploy using `colmena apply`
|
||||
phobos = {
|
||||
imports = [ ./hive/phobos ];
|
||||
deployment = {
|
||||
allowLocalDeployment = true;
|
||||
targetHost = "144.126.218.252";
|
||||
};
|
||||
};
|
||||
|
||||
deimos.imports = [ ./hive/deimos ];
|
||||
phobos.imports = [ ./hive/phobos ];
|
||||
thebe.imports = [ ./hive/thebe ];
|
||||
thebe = {
|
||||
imports = [ ./hive/thebe ];
|
||||
deployment = {
|
||||
allowLocalDeployment = false;
|
||||
targetHost = "64.23.168.148";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
packages.${system}.digital-ocean = {
|
||||
|
|
|
@ -7,8 +7,6 @@
|
|||
../../services/portfolio.nix
|
||||
];
|
||||
|
||||
deployment.targetHost = "24.199.110.222";
|
||||
|
||||
networking = {
|
||||
hostName = "deimos";
|
||||
firewall = {
|
||||
|
|
|
@ -119,6 +119,9 @@
|
|||
xkbOptions = "ctrl:swapcaps";
|
||||
};
|
||||
};
|
||||
|
||||
time.timeZone = "America/Denver";
|
||||
|
||||
users.users.jrpotter = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [
|
||||
|
@ -129,8 +132,6 @@
|
|||
];
|
||||
};
|
||||
|
||||
time.timeZone = "America/Denver";
|
||||
|
||||
virtualisation = {
|
||||
libvirtd.enable = true;
|
||||
docker.rootless = {
|
||||
|
|
|
@ -1,16 +1,49 @@
|
|||
{ lib, system, home-manager, ... }:
|
||||
{ pkgs, lib, system, home-manager, ... }:
|
||||
{
|
||||
imports = lib.optional (builtins.pathExists ./do-userdata.nix) ./do-userdata.nix ++ [
|
||||
../../digital-ocean/configuration.nix
|
||||
home-manager.nixosModules.home-manager
|
||||
];
|
||||
|
||||
deployment.targetHost = "144.126.218.252";
|
||||
environment = {
|
||||
systemPackages = with pkgs; [
|
||||
gcc
|
||||
git
|
||||
((vim_configurable.override {}).customize {
|
||||
name = "vim";
|
||||
vimrcConfig.customRC = ''
|
||||
set nocompatible
|
||||
syntax on
|
||||
|
||||
set colorcolumn=80,100
|
||||
set expandtab " Spaces instead of tabs.
|
||||
set list " Show hidden characters.
|
||||
set listchars=tab:>\ ,trail:-,nbsp:+
|
||||
set shiftwidth=2 " # of spaces to use for each (auto)indent.
|
||||
set tabstop=2 " # of spaces a <Tab> in the file counts for.
|
||||
'';
|
||||
})
|
||||
];
|
||||
variables = {
|
||||
EDITOR = "vim";
|
||||
};
|
||||
};
|
||||
|
||||
fonts.packages = with pkgs; [ iosevka ];
|
||||
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
users.jrpotter = import ../../users/jrpotter;
|
||||
users.jrpotter = args@{ pkgs, lib, ... }:
|
||||
let
|
||||
base = import ../../users/jrpotter args;
|
||||
in
|
||||
lib.attrsets.updateManyAttrsByPath [
|
||||
{
|
||||
path = [ "home" "packages" ];
|
||||
update = old: old ++ [ pkgs.wezterm ];
|
||||
}
|
||||
] base;
|
||||
|
||||
# Used to pass non-default parameters to submodules.
|
||||
extraSpecialArgs = {
|
||||
|
@ -21,10 +54,18 @@
|
|||
|
||||
networking.hostName = "phobos";
|
||||
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
|
||||
programs.mosh.enable = true;
|
||||
|
||||
# Our NixOS droplet's do not have a root password set. Disable so we can still
|
||||
# run commands that require sudo (e.g. `colmena apply-local --sudo`).
|
||||
security.sudo.wheelNeedsPassword = false;
|
||||
|
||||
services.openssh.enable = true;
|
||||
|
||||
time.timeZone = "America/Denver";
|
||||
|
||||
users.users.jrpotter = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [
|
||||
|
@ -35,5 +76,12 @@
|
|||
];
|
||||
};
|
||||
|
||||
virtualisation.docker.rootless = {
|
||||
enable = true;
|
||||
# Sets the `DOCKER_HOST` variable to the rootless Docker instance for normal
|
||||
# users by default.
|
||||
setSocketVariable = true;
|
||||
};
|
||||
|
||||
system.stateVersion = "23.11";
|
||||
}
|
||||
|
|
|
@ -7,8 +7,6 @@
|
|||
../../services/forgejo.nix
|
||||
];
|
||||
|
||||
deployment.targetHost = "64.23.168.148";
|
||||
|
||||
networking = {
|
||||
hostName = "thebe";
|
||||
firewall = {
|
||||
|
|
|
@ -0,0 +1,168 @@
|
|||
local ls = require('luasnip')
|
||||
|
||||
local s = ls.snippet
|
||||
local t = ls.text_node
|
||||
|
||||
return {
|
||||
-- Subscripts
|
||||
s(
|
||||
{ trig = [[_1]], wordTrig = false },
|
||||
t('₁')
|
||||
),
|
||||
s(
|
||||
{ trig = [[_2]], wordTrig = false },
|
||||
t('₂')
|
||||
),
|
||||
s(
|
||||
{ trig = [[_3]], wordTrig = false },
|
||||
t('₃')
|
||||
),
|
||||
s(
|
||||
{ trig = [[_4]], wordTrig = false },
|
||||
t('₄')
|
||||
),
|
||||
s(
|
||||
{ trig = [[_5]], wordTrig = false },
|
||||
t('₅')
|
||||
),
|
||||
s(
|
||||
{ trig = [[_6]], wordTrig = false },
|
||||
t('₆')
|
||||
),
|
||||
s(
|
||||
{ trig = [[_7]], wordTrig = false },
|
||||
t('₇')
|
||||
),
|
||||
s(
|
||||
{ trig = [[_8]], wordTrig = false },
|
||||
t('₈')
|
||||
),
|
||||
s(
|
||||
{ trig = [[_9]], wordTrig = false },
|
||||
t('₉')
|
||||
),
|
||||
s(
|
||||
{ trig = [[_a]], wordTrig = false },
|
||||
t('ₐ')
|
||||
),
|
||||
s(
|
||||
{ trig = [[_i]], wordTrig = false },
|
||||
t('ᵢ')
|
||||
),
|
||||
s(
|
||||
{ trig = [[_j]], wordTrig = false },
|
||||
t('ⱼ')
|
||||
),
|
||||
s(
|
||||
{ trig = [[_k]], wordTrig = false },
|
||||
t('ₖ')
|
||||
),
|
||||
s(
|
||||
{ trig = [[_m]], wordTrig = false },
|
||||
t('ₘ')
|
||||
),
|
||||
s(
|
||||
{ trig = [[_n]], wordTrig = false },
|
||||
t('ₙ')
|
||||
),
|
||||
|
||||
-- Lists
|
||||
s(
|
||||
{ trig = [[.]], wordTrig = false },
|
||||
t('·')
|
||||
),
|
||||
s(
|
||||
{ trig = [[circ]], wordTrig = false },
|
||||
t('∘')
|
||||
),
|
||||
|
||||
-- Arrows
|
||||
s(
|
||||
{ trig = [[d]], wordTrig = false },
|
||||
t('↓')
|
||||
),
|
||||
s(
|
||||
{ trig = [[l]], wordTrig = false },
|
||||
t('←')
|
||||
),
|
||||
s(
|
||||
{ trig = [[←r]], wordTrig = false },
|
||||
t('↔')
|
||||
),
|
||||
s(
|
||||
{ trig = [[r]], wordTrig = false },
|
||||
t('→')
|
||||
),
|
||||
s(
|
||||
{ trig = [[u]], wordTrig = false },
|
||||
t('↑')
|
||||
),
|
||||
|
||||
-- Greek letters
|
||||
s(
|
||||
{ trig = [[a]], wordTrig = false },
|
||||
t('α')
|
||||
),
|
||||
s(
|
||||
{ trig = [[b]], wordTrig = false },
|
||||
t('β')
|
||||
),
|
||||
s(
|
||||
{ trig = [[g]], wordTrig = false },
|
||||
t('γ')
|
||||
),
|
||||
s(
|
||||
{ trig = [[e]], wordTrig = false },
|
||||
t('ε')
|
||||
),
|
||||
s(
|
||||
{ trig = [[pi]], wordTrig = false },
|
||||
t('π')
|
||||
),
|
||||
s(
|
||||
{ trig = [[s]], wordTrig = false },
|
||||
t('σ')
|
||||
),
|
||||
s(
|
||||
{ trig = [[z]], wordTrig = false },
|
||||
t('ζ')
|
||||
),
|
||||
|
||||
-- Other operators
|
||||
s(
|
||||
{ trig = [[neg]], wordTrig = false },
|
||||
t('¬')
|
||||
),
|
||||
s(
|
||||
{ trig = [[αn]], wordTrig = false },
|
||||
t('∧')
|
||||
),
|
||||
s(
|
||||
{ trig = [[or]], wordTrig = false },
|
||||
t('∨')
|
||||
),
|
||||
s(
|
||||
{ trig = [[imp]], wordTrig = false },
|
||||
t('⇒')
|
||||
),
|
||||
s(
|
||||
{ trig = [[iff]], wordTrig = false },
|
||||
t('⇔')
|
||||
),
|
||||
s(
|
||||
{ trig = [[cap]], wordTrig = false },
|
||||
t('∩')
|
||||
),
|
||||
s(
|
||||
{ trig = [[cup]], wordTrig = false },
|
||||
t('∪')
|
||||
),
|
||||
s(
|
||||
{ trig = [[←eq]], wordTrig = false },
|
||||
t('≤')
|
||||
),
|
||||
s(
|
||||
{ trig = [[γeq]], wordTrig = false },
|
||||
t('≥')
|
||||
),
|
||||
}
|
|
@ -1,13 +0,0 @@
|
|||
local M = {}
|
||||
|
||||
function M.set_fmt_map()
|
||||
vim.keymap.set('v', 'g|', function()
|
||||
local width = vim.bo.textwidth
|
||||
if width == 0 and vim.w.colorcolumn then
|
||||
width = tonumber(vim.w.colorcolumn:match("[^,]+"))
|
||||
end
|
||||
return string.format("!par w%d<cr>", width ~= 0 and width or 80)
|
||||
end, { expr = true })
|
||||
end
|
||||
|
||||
return M
|
|
@ -32,6 +32,7 @@ function M.setup()
|
|||
region_check_events = 'InsertEnter',
|
||||
delete_check_events = 'InsertLeave',
|
||||
store_selection_keys = '<tab>',
|
||||
enable_autosnippets = true,
|
||||
ext_opts = {
|
||||
[types.snippet] = {
|
||||
active = {
|
||||
|
|
|
@ -31,6 +31,9 @@ let
|
|||
plugin = pkgs.vimPlugins.luasnip;
|
||||
config = ''
|
||||
require('utils.luasnip').setup()
|
||||
require('luasnip').add_snippets('all', require('utf8.snippets'), {
|
||||
type = 'autosnippets',
|
||||
})
|
||||
${config.programs.neovim.nvim-snippets}
|
||||
'';
|
||||
};
|
||||
|
@ -119,7 +122,6 @@ in
|
|||
|
||||
config = {
|
||||
home.packages = with pkgs; [
|
||||
par
|
||||
ripgrep
|
||||
];
|
||||
|
||||
|
@ -157,7 +159,6 @@ in
|
|||
# Lua loader to search for our /nix/store/.../?.lua files.
|
||||
(lib.mkBefore ''
|
||||
package.path = '${config}/?.lua;' .. package.path
|
||||
require('utils.fmt').set_fmt_map()
|
||||
'')
|
||||
# Extra Lua configuration to be appended to `init.lua`.
|
||||
(lib.mkAfter ''
|
||||
|
|
Loading…
Reference in New Issue