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

View File

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

View File

@ -119,9 +119,6 @@
xkbOptions = "ctrl:swapcaps"; xkbOptions = "ctrl:swapcaps";
}; };
}; };
time.timeZone = "America/Denver";
users.users.jrpotter = { users.users.jrpotter = {
isNormalUser = true; isNormalUser = true;
extraGroups = [ extraGroups = [
@ -132,6 +129,8 @@
]; ];
}; };
time.timeZone = "America/Denver";
virtualisation = { virtualisation = {
libvirtd.enable = true; libvirtd.enable = true;
docker.rootless = { 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 ++ [ imports = lib.optional (builtins.pathExists ./do-userdata.nix) ./do-userdata.nix ++ [
../../digital-ocean/configuration.nix ../../digital-ocean/configuration.nix
home-manager.nixosModules.home-manager home-manager.nixosModules.home-manager
]; ];
environment = { deployment.targetHost = "144.126.218.252";
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 = { home-manager = {
useGlobalPkgs = true; useGlobalPkgs = true;
useUserPackages = true; useUserPackages = true;
users.jrpotter = args@{ pkgs, lib, ... }: users.jrpotter = import ../../users/jrpotter;
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. # Used to pass non-default parameters to submodules.
extraSpecialArgs = { extraSpecialArgs = {
@ -54,18 +21,10 @@
networking.hostName = "phobos"; networking.hostName = "phobos";
nix.settings.experimental-features = [ "nix-command" "flakes" ];
programs.mosh.enable = true; 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; services.openssh.enable = true;
time.timeZone = "America/Denver";
users.users.jrpotter = { users.users.jrpotter = {
isNormalUser = true; isNormalUser = true;
extraGroups = [ 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"; system.stateVersion = "23.11";
} }

View File

@ -7,6 +7,8 @@
../../services/forgejo.nix ../../services/forgejo.nix
]; ];
deployment.targetHost = "64.23.168.148";
networking = { networking = {
hostName = "thebe"; hostName = "thebe";
firewall = { 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', region_check_events = 'InsertEnter',
delete_check_events = 'InsertLeave', delete_check_events = 'InsertLeave',
store_selection_keys = '<tab>', store_selection_keys = '<tab>',
enable_autosnippets = true,
ext_opts = { ext_opts = {
[types.snippet] = { [types.snippet] = {
active = { active = {

View File

@ -31,9 +31,6 @@ let
plugin = pkgs.vimPlugins.luasnip; plugin = pkgs.vimPlugins.luasnip;
config = '' config = ''
require('utils.luasnip').setup() require('utils.luasnip').setup()
require('luasnip').add_snippets('all', require('utf8.snippets'), {
type = 'autosnippets',
})
${config.programs.neovim.nvim-snippets} ${config.programs.neovim.nvim-snippets}
''; '';
}; };
@ -122,6 +119,7 @@ in
config = { config = {
home.packages = with pkgs; [ home.packages = with pkgs; [
par
ripgrep ripgrep
]; ];
@ -159,6 +157,7 @@ in
# Lua loader to search for our /nix/store/.../?.lua files. # Lua loader to search for our /nix/store/.../?.lua files.
(lib.mkBefore '' (lib.mkBefore ''
package.path = '${config}/?.lua;' .. package.path package.path = '${config}/?.lua;' .. package.path
require('utils.fmt').set_fmt_map()
'') '')
# Extra Lua configuration to be appended to `init.lua`. # Extra Lua configuration to be appended to `init.lua`.
(lib.mkAfter '' (lib.mkAfter ''