Merge branch 'main' of gh:greg-hellings/nixos-config
This commit is contained in:
+27
-17
@@ -33,10 +33,6 @@ in
|
|||||||
globals = {
|
globals = {
|
||||||
indent_guides_enable_on_vim_startup = 1;
|
indent_guides_enable_on_vim_startup = 1;
|
||||||
nix_recommended_style = 0;
|
nix_recommended_style = 0;
|
||||||
netrw_liststyle = 3;
|
|
||||||
netrw_browse_split = 4;
|
|
||||||
netrw_altv = 1;
|
|
||||||
netrw_winsize = 25;
|
|
||||||
};
|
};
|
||||||
opts = {
|
opts = {
|
||||||
background = "dark";
|
background = "dark";
|
||||||
@@ -75,11 +71,7 @@ in
|
|||||||
} {
|
} {
|
||||||
mode = "n";
|
mode = "n";
|
||||||
key = "<C-t>";
|
key = "<C-t>";
|
||||||
action = "<Esc>:Lex<CR>";
|
action = "<Esc>:NERDTreeToggle<CR>";
|
||||||
} {
|
|
||||||
mode = "n";
|
|
||||||
key = "<C-o>";
|
|
||||||
action = "<Esc>:GFiles?<CR>";
|
|
||||||
}
|
}
|
||||||
(winMove "h")
|
(winMove "h")
|
||||||
(winMove "j")
|
(winMove "j")
|
||||||
@@ -87,25 +79,43 @@ in
|
|||||||
(winMove "l")
|
(winMove "l")
|
||||||
];
|
];
|
||||||
plugins = {
|
plugins = {
|
||||||
airline = {
|
airline.enable = true;
|
||||||
enable = true;
|
cmp.enable = true;
|
||||||
settings.theme = "gruvbox";
|
direnv.enable = true;
|
||||||
};
|
|
||||||
gitgutter.enable = true;
|
gitgutter.enable = true;
|
||||||
fugitive.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;
|
notify.enable = true;
|
||||||
};
|
};
|
||||||
extraConfigLua = builtins.replaceStrings [ "@git@" ] [ "${pkgs.git}/bin/git" ] (builtins.readFile ./vim/extra.lua);
|
extraConfigLua = builtins.replaceStrings [ "@git@" ] [ "${pkgs.git}/bin/git" ] (builtins.readFile ./vim/extra.lua);
|
||||||
extraConfigVim = builtins.readFile ./vim/extra.vimrc;
|
extraConfigVim = builtins.readFile ./vim/extra.vimrc;
|
||||||
extraPlugins = with pkgs.vimPlugins; [
|
extraPlugins = with pkgs.vimPlugins; [
|
||||||
bufexplorer
|
bufexplorer
|
||||||
gruvbox
|
nerdtree
|
||||||
nvim-cmp
|
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
|
packer-nvim
|
||||||
|
|
||||||
context-vim
|
context-vim
|
||||||
direnv-vim
|
|
||||||
fzf-vim
|
|
||||||
vim-flake8
|
vim-flake8
|
||||||
vim-indent-guides
|
vim-indent-guides
|
||||||
vim-xonsh
|
vim-xonsh
|
||||||
|
|||||||
@@ -15,6 +15,10 @@ def bw_unlock():
|
|||||||
$BW_SESSION = token
|
$BW_SESSION = token
|
||||||
return 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):
|
def _cfetch(args):
|
||||||
bw_unlock()
|
bw_unlock()
|
||||||
$CIRCLECI_CLI_TOKEN=$(bw get password CircleCI)
|
$CIRCLECI_CLI_TOKEN=$(bw get password CircleCI)
|
||||||
@@ -68,6 +72,7 @@ def _bake(args):
|
|||||||
git clone src:greg/copier-templates.git ~/.copier-templates
|
git clone src:greg/copier-templates.git ~/.copier-templates
|
||||||
copier copy @(str(templates / args[0])) .
|
copier copy @(str(templates / args[0])) .
|
||||||
|
|
||||||
|
aliases['glrestart'] = _glrestart
|
||||||
aliases['cfetch'] = _cfetch
|
aliases['cfetch'] = _cfetch
|
||||||
aliases['bake'] = _bake
|
aliases['bake'] = _bake
|
||||||
aliases['rebuild'] = _rebuild
|
aliases['rebuild'] = _rebuild
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
# your system. Help is available in the configuration.nix(5) man page
|
# your system. Help is available in the configuration.nix(5) man page
|
||||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||||
|
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
imports =
|
||||||
@@ -56,6 +56,19 @@
|
|||||||
};
|
};
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
btrfs-progs
|
btrfs-progs
|
||||||
|
curl
|
||||||
|
gawk
|
||||||
|
git
|
||||||
|
p7zip
|
||||||
|
packer
|
||||||
|
pup
|
||||||
|
gregpy
|
||||||
|
shellcheck
|
||||||
|
unzip
|
||||||
|
xonsh
|
||||||
|
xorriso
|
||||||
|
vagrant
|
||||||
|
wget
|
||||||
];
|
];
|
||||||
|
|
||||||
fileSystems = {
|
fileSystems = {
|
||||||
@@ -70,4 +83,55 @@
|
|||||||
device = "/dev/nvme0n1p1";
|
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!
|
proxy_download = false; # Tell them to reach out to object storage themselves!
|
||||||
connection = {
|
connection = {
|
||||||
provider = "AWS";
|
provider = "AWS";
|
||||||
endpoint = "http://s3.thehellings.lan:9000";
|
endpoint = "http://minio-01.thehellings.lan:9000";
|
||||||
region = "us-east-1";
|
region = "us-east-1";
|
||||||
aws_access_key_id = { _secret = config.age.secrets.minio_access_key_id.path; };
|
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; };
|
aws_secret_access_key = { _secret = config.age.secrets.minio_secret_access_key.path; };
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ lib.attrsets.recursiveUpdate {
|
|||||||
curl
|
curl
|
||||||
gawk
|
gawk
|
||||||
git
|
git
|
||||||
|
minio-client
|
||||||
p7zip
|
p7zip
|
||||||
packer
|
packer
|
||||||
pup
|
pup
|
||||||
@@ -67,6 +68,7 @@ lib.attrsets.recursiveUpdate {
|
|||||||
registrationConfigFile = config.age.secrets.runner-reg.path;
|
registrationConfigFile = config.age.secrets.runner-reg.path;
|
||||||
environmentVariables = {
|
environmentVariables = {
|
||||||
EFI_DIR = "${pkgs.OVMF.fd}/FV/";
|
EFI_DIR = "${pkgs.OVMF.fd}/FV/";
|
||||||
|
STORAGE_URL = "http://localhost:9000";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -120,6 +120,7 @@ in {
|
|||||||
registrationConfigFile = config.age.secrets.runner-qemu.path;
|
registrationConfigFile = config.age.secrets.runner-qemu.path;
|
||||||
environmentVariables = {
|
environmentVariables = {
|
||||||
EFI_DIR = "${pkgs.OVMF.fd}/FV/";
|
EFI_DIR = "${pkgs.OVMF.fd}/FV/";
|
||||||
|
STORAGE_URL = "http://localhost:9000";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -132,6 +133,7 @@ in {
|
|||||||
curl
|
curl
|
||||||
gawk
|
gawk
|
||||||
git
|
git
|
||||||
|
minio-client
|
||||||
p7zip
|
p7zip
|
||||||
packer
|
packer
|
||||||
pup
|
pup
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
@@ -57,6 +57,7 @@ in
|
|||||||
# Then pipe the resulting files to agenix -e <foo>
|
# Then pipe the resulting files to agenix -e <foo>
|
||||||
"gitlab/key.age".publicKeys = everyone;
|
"gitlab/key.age".publicKeys = everyone;
|
||||||
"gitlab/cert.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-qemu-runner-reg.age".publicKeys = everyone;
|
||||||
"gitlab/myself-vbox-runner-reg.age".publicKeys = everyone;
|
"gitlab/myself-vbox-runner-reg.age".publicKeys = everyone;
|
||||||
"gitlab/myself-podman-runner-reg.age".publicKeys = everyone;
|
"gitlab/myself-podman-runner-reg.age".publicKeys = everyone;
|
||||||
|
|||||||
Reference in New Issue
Block a user