Compare commits

..

No commits in common. "c64e8054f1fc339a8f6c7509666c668212114712" and "046f89aa3da15d252d78795a22d8280246f0661c" have entirely different histories.

9 changed files with 33 additions and 251 deletions

View File

@ -37,12 +37,12 @@
thebe = tapir.pkgs;
};
nodeSpecialArgs = {
deimos = {
inherit (tapir) sops-nix;
};
framework = {
inherit (tapir) home-manager;
};
deimos = {
inherit (tapir) sops-nix;
};
phobos = {
inherit (tapir) home-manager;
};
@ -52,37 +52,21 @@
};
};
deimos = {
imports = [ ./hive/deimos ];
deployment = {
allowLocalDeployment = false;
targetHost = "24.199.110.222";
};
};
# Local machines. Deploy using `colmena apply-local [--sudo]`
framework = {
imports = [ ./hive/framework ];
deployment = {
allowLocalDeployment = true;
targetHost = null;
targetHost = null; # Disable SSH deployment.
};
};
phobos = {
imports = [ ./hive/phobos ];
deployment = {
allowLocalDeployment = true;
targetHost = "144.126.218.252";
};
};
# Remote machines. Deploy using `colmena apply`
thebe = {
imports = [ ./hive/thebe ];
deployment = {
allowLocalDeployment = false;
targetHost = "64.23.168.148";
};
};
deimos.imports = [ ./hive/deimos ];
phobos.imports = [ ./hive/phobos ];
thebe.imports = [ ./hive/thebe ];
};
packages.${system}.digital-ocean = {

View File

@ -7,6 +7,8 @@
../../services/portfolio.nix
];
deployment.targetHost = "24.199.110.222";
networking = {
hostName = "deimos";
firewall = {

View File

@ -119,9 +119,6 @@
xkbOptions = "ctrl:swapcaps";
};
};
time.timeZone = "America/Denver";
users.users.jrpotter = {
isNormalUser = true;
extraGroups = [
@ -132,6 +129,8 @@
];
};
time.timeZone = "America/Denver";
virtualisation = {
libvirtd.enable = true;
docker.rootless = {

View File

@ -1,49 +1,16 @@
{ pkgs, lib, system, home-manager, ... }:
{ lib, system, home-manager, ... }:
{
imports = lib.optional (builtins.pathExists ./do-userdata.nix) ./do-userdata.nix ++ [
../../digital-ocean/configuration.nix
home-manager.nixosModules.home-manager
];
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 ];
deployment.targetHost = "144.126.218.252";
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
users.jrpotter = args@{ pkgs, lib, ... }:
let
base = import ../../users/jrpotter args;
in
lib.attrsets.updateManyAttrsByPath [
{
path = [ "home" "packages" ];
update = old: old ++ [ pkgs.wezterm ];
}
] base;
users.jrpotter = import ../../users/jrpotter;
# Used to pass non-default parameters to submodules.
extraSpecialArgs = {
@ -54,18 +21,10 @@
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 = [
@ -76,12 +35,5 @@
];
};
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";
}

View File

@ -7,6 +7,8 @@
../../services/forgejo.nix
];
deployment.targetHost = "64.23.168.148";
networking = {
hostName = "thebe";
firewall = {

View File

@ -1,168 +0,0 @@
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('')
),
}

View File

@ -0,0 +1,13 @@
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

View File

@ -32,7 +32,6 @@ function M.setup()
region_check_events = 'InsertEnter',
delete_check_events = 'InsertLeave',
store_selection_keys = '<tab>',
enable_autosnippets = true,
ext_opts = {
[types.snippet] = {
active = {

View File

@ -31,9 +31,6 @@ 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}
'';
};
@ -122,6 +119,7 @@ in
config = {
home.packages = with pkgs; [
par
ripgrep
];
@ -159,6 +157,7 @@ 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 ''