Merge branch 'main' of gh:greg-hellings/nixos-config
This commit is contained in:
+27
-17
@@ -33,10 +33,6 @@ in
|
||||
globals = {
|
||||
indent_guides_enable_on_vim_startup = 1;
|
||||
nix_recommended_style = 0;
|
||||
netrw_liststyle = 3;
|
||||
netrw_browse_split = 4;
|
||||
netrw_altv = 1;
|
||||
netrw_winsize = 25;
|
||||
};
|
||||
opts = {
|
||||
background = "dark";
|
||||
@@ -75,11 +71,7 @@ in
|
||||
} {
|
||||
mode = "n";
|
||||
key = "<C-t>";
|
||||
action = "<Esc>:Lex<CR>";
|
||||
} {
|
||||
mode = "n";
|
||||
key = "<C-o>";
|
||||
action = "<Esc>:GFiles?<CR>";
|
||||
action = "<Esc>:NERDTreeToggle<CR>";
|
||||
}
|
||||
(winMove "h")
|
||||
(winMove "j")
|
||||
@@ -87,25 +79,43 @@ in
|
||||
(winMove "l")
|
||||
];
|
||||
plugins = {
|
||||
airline = {
|
||||
enable = true;
|
||||
settings.theme = "gruvbox";
|
||||
};
|
||||
airline.enable = true;
|
||||
cmp.enable = true;
|
||||
direnv.enable = true;
|
||||
gitgutter.enable = true;
|
||||
fugitive.enable = true;
|
||||
fzf-lua = {
|
||||
enable = true;
|
||||
iconsEnabled = true;
|
||||
keymaps = {
|
||||
"<C-o>" = {
|
||||
action = "files";
|
||||
settings = {
|
||||
previewers.cat.cmd = "${pkgs.coreutils}/bin/cat";
|
||||
winopts.height = 0.5;
|
||||
};
|
||||
};
|
||||
"<C-p>" = {
|
||||
action = "git_files";
|
||||
settings = {
|
||||
previewers.cat.cmd = "${pkgs.coreutils}/bin/cat";
|
||||
winopts.height = 0.5;
|
||||
};
|
||||
};
|
||||
};
|
||||
profile = "fzf-vim";
|
||||
};
|
||||
notify.enable = true;
|
||||
};
|
||||
extraConfigLua = builtins.replaceStrings [ "@git@" ] [ "${pkgs.git}/bin/git" ] (builtins.readFile ./vim/extra.lua);
|
||||
extraConfigVim = builtins.readFile ./vim/extra.vimrc;
|
||||
extraPlugins = with pkgs.vimPlugins; [
|
||||
bufexplorer
|
||||
gruvbox
|
||||
nvim-cmp
|
||||
nerdtree
|
||||
nvim-web-devicons # Be sure to install Hack Nerd Font and set it to your term default: https://gist.github.com/matthewjberger/7dd7e079f282f8138a9dc3b045ebefa0
|
||||
packer-nvim
|
||||
|
||||
context-vim
|
||||
direnv-vim
|
||||
fzf-vim
|
||||
vim-flake8
|
||||
vim-indent-guides
|
||||
vim-xonsh
|
||||
|
||||
@@ -15,6 +15,10 @@ def bw_unlock():
|
||||
$BW_SESSION = token
|
||||
return token
|
||||
|
||||
def _glrestart(args):
|
||||
sudo nixos-container run gitlab -- systemctl restart gitlab
|
||||
sudo nixos-container run gitlab -- systemctl restart nginx
|
||||
|
||||
def _cfetch(args):
|
||||
bw_unlock()
|
||||
$CIRCLECI_CLI_TOKEN=$(bw get password CircleCI)
|
||||
@@ -68,6 +72,7 @@ def _bake(args):
|
||||
git clone src:greg/copier-templates.git ~/.copier-templates
|
||||
copier copy @(str(templates / args[0])) .
|
||||
|
||||
aliases['glrestart'] = _glrestart
|
||||
aliases['cfetch'] = _cfetch
|
||||
aliases['bake'] = _bake
|
||||
aliases['rebuild'] = _rebuild
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# your system. Help is available in the configuration.nix(5) man page
|
||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||
|
||||
{ config, pkgs, ... }:
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
@@ -56,6 +56,19 @@
|
||||
};
|
||||
environment.systemPackages = with pkgs; [
|
||||
btrfs-progs
|
||||
curl
|
||||
gawk
|
||||
git
|
||||
p7zip
|
||||
packer
|
||||
pup
|
||||
gregpy
|
||||
shellcheck
|
||||
unzip
|
||||
xonsh
|
||||
xorriso
|
||||
vagrant
|
||||
wget
|
||||
];
|
||||
|
||||
fileSystems = {
|
||||
@@ -70,4 +83,55 @@
|
||||
device = "/dev/nvme0n1p1";
|
||||
};
|
||||
};
|
||||
|
||||
#####################################################################################
|
||||
#################### Virtualbox Runner ##############################################
|
||||
#####################################################################################
|
||||
services = {
|
||||
gitlab-runner = {
|
||||
enable = true;
|
||||
settings.concurrent = 1;
|
||||
services = {
|
||||
shell = {
|
||||
executor = "shell";
|
||||
limit = 5;
|
||||
registrationConfigFile = config.age.secrets.runner-reg.path;
|
||||
environmentVariables = {
|
||||
EFI_DIR = "${pkgs.OVMF.fd}/FV/";
|
||||
STORAGE_URL = "http://localhost:9000";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
age.secrets.runner-reg.file = ../../secrets/gitlab/jeremiah-runner-reg.age;
|
||||
virtualisation.virtualbox.host = {
|
||||
enable = true;
|
||||
enableExtensionPack = true;
|
||||
enableHardening = false;
|
||||
headless = true;
|
||||
};
|
||||
|
||||
systemd.services."gitlab-runner" = {
|
||||
after = [
|
||||
"network.target"
|
||||
"network-online.target"
|
||||
"systemd-resolved.service"
|
||||
];
|
||||
wants = [
|
||||
"network-online.target"
|
||||
"systemd-resolved.service"
|
||||
];
|
||||
preStart = builtins.concatStringsSep "\n" [
|
||||
"${pkgs.kmod}/bin/modprobe vboxdrv"
|
||||
"${pkgs.kmod}/bin/modprobe vboxnetadp"
|
||||
"${pkgs.kmod}/bin/modprobe vboxnetflt"
|
||||
];
|
||||
postStop = "${pkgs.kmod}/bin/rmmod vboxnetadp vboxnetflt vboxdrv";
|
||||
serviceConfig = {
|
||||
DevicePolicy = lib.mkForce "auto";
|
||||
User = "root";
|
||||
DynamicUser = lib.mkForce false;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -106,7 +106,7 @@ in {
|
||||
proxy_download = false; # Tell them to reach out to object storage themselves!
|
||||
connection = {
|
||||
provider = "AWS";
|
||||
endpoint = "http://s3.thehellings.lan:9000";
|
||||
endpoint = "http://minio-01.thehellings.lan:9000";
|
||||
region = "us-east-1";
|
||||
aws_access_key_id = { _secret = config.age.secrets.minio_access_key_id.path; };
|
||||
aws_secret_access_key = { _secret = config.age.secrets.minio_secret_access_key.path; };
|
||||
|
||||
@@ -31,6 +31,7 @@ lib.attrsets.recursiveUpdate {
|
||||
curl
|
||||
gawk
|
||||
git
|
||||
minio-client
|
||||
p7zip
|
||||
packer
|
||||
pup
|
||||
@@ -67,6 +68,7 @@ lib.attrsets.recursiveUpdate {
|
||||
registrationConfigFile = config.age.secrets.runner-reg.path;
|
||||
environmentVariables = {
|
||||
EFI_DIR = "${pkgs.OVMF.fd}/FV/";
|
||||
STORAGE_URL = "http://localhost:9000";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -120,6 +120,7 @@ in {
|
||||
registrationConfigFile = config.age.secrets.runner-qemu.path;
|
||||
environmentVariables = {
|
||||
EFI_DIR = "${pkgs.OVMF.fd}/FV/";
|
||||
STORAGE_URL = "http://localhost:9000";
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -132,6 +133,7 @@ in {
|
||||
curl
|
||||
gawk
|
||||
git
|
||||
minio-client
|
||||
p7zip
|
||||
packer
|
||||
pup
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -57,6 +57,7 @@ in
|
||||
# Then pipe the resulting files to agenix -e <foo>
|
||||
"gitlab/key.age".publicKeys = everyone;
|
||||
"gitlab/cert.age".publicKeys = everyone;
|
||||
"gitlab/jeremiah-runner-reg.age".publicKeys = everyone;
|
||||
"gitlab/myself-qemu-runner-reg.age".publicKeys = everyone;
|
||||
"gitlab/myself-vbox-runner-reg.age".publicKeys = everyone;
|
||||
"gitlab/myself-podman-runner-reg.age".publicKeys = everyone;
|
||||
|
||||
Reference in New Issue
Block a user