Compare commits

..

78 Commits

Author SHA1 Message Date
fallingsky04 424644cd97 Add Shiro 2024-09-15 19:14:37 +00:00
Sky Hearn 93d2c9ce47 fix more things 2024-09-15 18:50:05 +00:00
fallingsky04 199d06538a fix things 2024-09-15 18:39:01 +00:00
Sky Hearn 7478740a0a add witu and mari 2024-09-15 18:34:35 +00:00
fallingsky04 a61aa349d0 Correct Mari 2024-09-15 18:13:18 +00:00
fallingsky04 9935f7c4e0 add mari 2024-09-15 18:01:43 +00:00
Sky Hearn 44bc033828 Merge remote-tracking branch 'origin/rackserver' into rackserver 2024-06-19 21:55:43 +00:00
Sky Hearn 778e2e6860 remove unnececary commits and improper gitea configuration 2024-06-19 21:51:20 +00:00
Sky Hearn 792eec4aa5 Update Saffs WG config 2024-06-19 14:49:23 -07:00
fallingsky04 687fd697d1 add baba 2024-05-12 17:38:54 +00:00
fallingsky04 41801992c2 Add blise 2024-05-07 04:23:07 +00:00
fallingsky04 6cae2056fe Add baron 2024-05-05 03:12:25 +00:00
Sky Hearn d0c50ed1af launched forever server 2024-05-05 02:53:08 +00:00
Sky Hearn e372d23c89 Merge branch 'rackserver' of http://127.0.0.1:3001/fallingsky04/nixos-config into rackserver 2024-04-29 02:00:00 +00:00
Sky Hearn 514452531d start new server 2024-04-29 01:58:28 +00:00
fallingsky04 a0a9e032be Add tach mew and fetti 2024-04-29 01:58:13 +00:00
fallingsky04 20a5023d70 Fix syntax error 2024-04-26 05:04:04 +00:00
fallingsky04 51da53ac97 Add saffronfox to the wireguard configuration 2024-04-26 05:02:22 +00:00
Sky Hearn 6422d6c1bf actually working 2024-04-26 04:59:24 +00:00
Sky Hearn 4e0fa90cf7 third time's the charm? 2024-04-25 20:41:14 +00:00
Sky Hearn 05c0dd7168 annnndddddd syntax error X3 2024-04-25 20:36:16 +00:00
Sky Hearn ad922e65fd new minecraft server! 2024-04-25 20:34:23 +00:00
Sky Hearn 22f5724b8e new public key 2024-04-04 21:14:13 +00:00
Sky Hearn 99de6e7528
Really need to get persistant secrets setup :( 2024-03-24 17:42:01 -07:00
Sky Hearn d993a8535e Minecraft server setup 2024-03-09 16:52:21 +00:00
Sky Hearn c289954dc3 Make the minecraft server create a data folder in the podman user's home directory. 2024-03-09 06:39:20 -08:00
Sky Hearn fc7195db6f Jaspers Public key and IP 2024-03-08 21:10:39 -08:00
fallingsky04 337b2bff00 Allow nub's subnet to be an endpoint for the tunnel.
Also leaves a some room for more people, but not too much *hehe*
2024-03-08 11:41:07 +00:00
Sky Hearn 0f14004a7b
Nub's Public Key 2024-03-08 03:00:07 -08:00
Sky Hearn 7fd3937726
wireguard public key 2024-03-08 02:56:10 -08:00
Sky Hearn 67e8c86a87 Change iptables to Insert instead of append. 2024-03-08 03:24:58 +00:00
Sky Hearn d695930229
Change some domain names around and name my gitea server. 2024-03-07 19:14:37 -08:00
fallingsky04 3fade7c667 Give nub the 10.100.1.0/24 subnet 2024-03-07 07:58:31 +00:00
Sky Hearn ed27586631
actually add the changes to configuration this time 2024-03-06 22:04:11 -08:00
Sky Hearn 035560abdd
add desktop's public keys 2024-03-06 21:56:08 -08:00
Sky Hearn 6618318370 ACME and SSL stuff 2024-03-07 05:34:47 +00:00
Sky Hearn 3a8a31cb99 probably working ddns setup (it does not work and I know it) 2024-03-07 03:30:41 +00:00
Sky Hearn 42768ab36e almost working wireguard 2024-03-07 02:41:55 +00:00
Sky Hearn fef06f7eae add gitea to the keys group 2024-03-06 22:47:13 +00:00
Sky Hearn 91a382415f store password in a file, and not in nix store 2024-03-06 21:56:52 +00:00
Sky Hearn 9ea5275661 fix syntax errors with sky 2024-03-06 21:56:13 +00:00
Sky Hearn dec37af817 Move arion to 23.11 version, fix docker-compose syntax errors, use openssh.authorizedKeys instead of home-manager files for my openssh key 2024-03-06 21:33:52 +00:00
Sky Hearn 0cc72e047b minecraft docker container should work? 2024-03-05 22:41:50 -08:00
Sky Hearn 0516ff439d make it so podman can be logged into, and fix arion compose being the same file as 2024-03-05 18:48:24 -08:00
Sky Hearn 654f1bbf8a working gitea server! 2024-03-05 01:16:28 -08:00
Sky Hearn d90654d02e give each user their own file 2024-03-04 17:32:22 -08:00
Sky Hearn d02f1e8b9d Gitea server 2024-03-03 23:08:31 -08:00
Sky Hearn a6ccd25396 almost flakes and start of arion setup, also actually remove files for my laptop install 2024-03-03 21:59:41 -08:00
Sky Hearn 5001614445 basic users and wireguard setup 2024-03-03 16:17:28 -08:00
Sky Hearn cd9946699d 83 current 2024-03-02 00:12:17 23.11.4801.b7ee09cf5614 6.1.79 * 2024-03-02 00:12:23 -08:00
Sky Hearn e6aa7bb147 82 current 2024-03-01 23:37:36 23.11.4801.b7ee09cf5614 6.1.79 * 2024-03-01 23:37:40 -08:00
Sky Hearn 0d9b01da13 81 current 2024-03-01 23:24:55 23.11.4801.b7ee09cf5614 6.1.79 * 2024-03-01 23:24:59 -08:00
Sky Hearn fffeb726dc 80 current 2024-03-01 23:23:35 23.11.4801.b7ee09cf5614 6.1.79 * 2024-03-01 23:23:39 -08:00
Sky Hearn ea20aa5bba 79 current 2024-03-01 19:08:49 23.11.4801.b7ee09cf5614 6.1.79 * 2024-03-01 19:08:53 -08:00
Sky Hearn 7f095e0c5d 78 current 2024-03-01 16:37:01 23.11.4801.b7ee09cf5614 6.1.79 * 2024-03-01 19:07:44 -08:00
Sky Hearn 8f6b8576b6 78 current 2024-03-01 16:37:01 23.11.4801.b7ee09cf5614 6.1.79 * 2024-03-01 16:37:06 -08:00
Sky Hearn 91e2296818 neovim configuration - thanks ku <3 2024-03-01 14:39:20 -08:00
Sky Hearn 4fc5c31654 76 current 2024-03-01 14:17:16 23.11.4801.b7ee09cf5614 6.1.79 * 2024-03-01 14:17:20 -08:00
Sky Hearn ffa53ad2e8 75 current 2024-03-01 14:06:14 23.11.4801.b7ee09cf5614 6.1.79 * 2024-03-01 14:06:19 -08:00
Sky Hearn a2735e25cc 74 current 2024-03-01 02:17:17 23.11.4801.b7ee09cf5614 6.1.79 * 2024-03-01 13:43:45 -08:00
Sky Hearn 96d5267072 74 current 2024-03-01 02:17:17 23.11.4801.b7ee09cf5614 6.1.79 * 2024-03-01 02:17:21 -08:00
Sky Hearn 17cf571296 73 current 2024-03-01 02:15:56 23.11.4801.b7ee09cf5614 6.1.79 * 2024-03-01 02:16:01 -08:00
Sky Hearn b653dbc0ca 72 current 2024-03-01 02:08:18 23.11.4801.b7ee09cf5614 6.1.79 * 2024-03-01 02:08:22 -08:00
Sky Hearn eabf444e34 71 current 2024-03-01 02:05:57 23.11.4801.b7ee09cf5614 6.1.79 * 2024-03-01 02:06:01 -08:00
Sky Hearn abaeb7c598 70 current 2024-03-01 01:24:53 23.11.4801.b7ee09cf5614 6.1.79 * 2024-03-01 01:24:57 -08:00
Sky Hearn 18fb6eaee6 69 current 2024-03-01 00:55:17 23.11.4801.b7ee09cf5614 6.1.79 * 2024-03-01 00:55:21 -08:00
Sky Hearn f521ffecf7 68 current 2024-03-01 00:22:19 23.11.4801.b7ee09cf5614 6.1.79 * 2024-03-01 00:22:24 -08:00
Sky Hearn 95ae003413 67 current 2024-02-28 18:00:45 23.11.4801.b7ee09cf5614 6.1.79 * 2024-02-28 18:00:49 -08:00
Sky Hearn 329d7b1ab3 66 current 2024-02-28 17:58:29 23.11.4801.b7ee09cf5614 6.1.79 * 2024-02-28 17:58:51 -08:00
Sky Hearn 369df10eba
Moonlight Client 2024-02-28 15:16:13 -08:00
Sky Hearn e1c592cef3
64 current 2024-02-27 23:55:28 23.11.4801.b7ee09cf5614 6.1.79 * 2024-02-28 14:53:47 -08:00
Sky Hearn 7b2d100cd3
62 current 2024-02-27 23:23:49 23.11.4801.b7ee09cf5614 6.1.79 * 2024-02-27 23:23:52 -08:00
Sky Hearn 9ee4009437
49 current 2024-02-27 21:29:53 23.11.4801.b7ee09cf5614 6.1.79 * 2024-02-27 21:29:56 -08:00
Sky Hearn 3e764e0b66
46 current 2024-02-27 20:28:27 23.11.4801.b7ee09cf5614 6.1.79 * 2024-02-27 20:28:30 -08:00
Sky Hearn 506b261a4c
45 current 2024-02-27 19:54:42 23.11.4801.b7ee09cf5614 6.1.79 * 2024-02-27 19:55:36 -08:00
Sky Hearn a8c282a5fc
44 current 2024-02-27 19:41:39 23.11.4801.b7ee09cf5614 6.1.79 * 2024-02-27 19:42:08 -08:00
Sky Hearn eb141ac2d5
43 current 2024-02-27 17:58:27 23.11.4801.b7ee09cf5614 6.1.79 * 2024-02-27 18:00:27 -08:00
Sky Hearn 15b8e99f33
42 current 2024-02-27 17:56:22 23.11.4801.b7ee09cf5614 6.1.79 * 2024-02-27 17:56:24 -08:00
23 changed files with 684 additions and 369 deletions

9
.gitmodules vendored
View File

@ -1,9 +0,0 @@
[submodule "slstatus"]
path = slstatus
url = https://git.fallingsky.love/fallingsky04/slstatus.git
[submodule "dwm"]
path = dwm
url = https://git.fallingsky.love/fallingsky04/dwm.git
[submodule "st"]
path = st
url = https://git.fallingsky.love/fallingsky04/st.git

11
.sops.yaml Normal file
View File

@ -0,0 +1,11 @@
# This example uses YAML anchors which allows reuse of multiple keys
# without having to repeat yourself.
# Also see https://github.com/Mic92/dotfiles/blob/master/nixos/.sops.yaml
# for a more complex example.
keys:
- &sky age1j8gk5rrczcdql0mkwevjsgdaqqqzavgv006sx0xnc7mzmlp3x4wqvtwdsa
creation_rules:
- path_regex: secrets/[^/]+\.(yaml|json|env|ini)$
key_groups:
age:
- *sky

3
canary.txt Normal file
View File

@ -0,0 +1,3 @@
This document exists to inform users that Sky Hearn has not been served with a secret government subpoena in any of their hardware, their software, or their services.
2024-03-03

BIN
canary.txt.sig Normal file

Binary file not shown.

View File

@ -5,348 +5,204 @@
{ config, lib, pkgs, ... }:
{
nix.settings.experimental-features = [ "nix-command" "flakes" ];
sops.age.keyFile = "/secrets/age/keys.txt";
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
<home-manager/nixos>
./users/users.nix
./services/gitea.nix
./services/duckddns.nix
];
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
# amdgpu stuffs
boot.initrd.kernelModules = [ "amdgpu" ];
services.xserver.videoDrivers = [ "amdgpu" ];
# set hostname
networking.hostName = "rackserver";
# opengl support
hardware.opengl.enable = true;
# opengl packages
hardware.opengl.extraPackages = with pkgs; [
rocm-opencl-icd
rocm-opencl-runtime
vaapiVdpau
libvdpau-va-gl
# fix nixpkgs warning
nix.nixPath = [
"nixpkgs=${pkgs.path}"
];
hardware.opengl.driSupport = true;
networking.hostName = "sky-laptop"; # Define your hostname.
# Pick only one of the below networking options.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
# Set your time zone.
time.timeZone = "America/Los_Angeles";
# Configure network proxy if necessary
# networking.proxy.default = "http://user:password@proxy:port/";
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
console = {
font = "Lat2-Terminus16";
#keyMap = "us";
useXkbConfig = true; # use xkb.options in tty.
# ACME
security.acme = {
acceptTerms = true;
defaults.email = "sky.hearn@pm.me";
};
# Enable the X11 windowing system
services.xserver.enable = true;
services.xserver.displayManager.sessionCommands = ''
slstatus &
nitrogen --restore &
clipcatd &
'';
# Configure keymap in X11
services.xserver.xkb.layout = "us";
# services.xserver.xkb.options = "eurosign:e,caps:escape";
# Enable CUPS to print documents.
# services.printing.enable = true;
# Enable sound.
sound.enable = true;
hardware.pulseaudio.enable = true;
# Enable touchpad support (enabled default in most desktopManager).
services.xserver.libinput.enable = true;
# Enable dwm
services.xserver.windowManager.dwm.package = pkgs.dwm.overrideAttrs {
src = ./dwm;
# wireguard server setup
# enable NAT
networking.nat.enable = true;
networking.nat.externalInterface = "eno4";
networking.nat.internalInterfaces = [ "wg0" ];
networking.firewall = {
allowedUDPPorts = [ 51820 ];
};
services.xserver.windowManager.dwm.enable = true;
# Sky User
users.users.sky.isNormalUser = true;
users.users.sky.extraGroups = [ "wheel" ]; # Enable sudo for the user.
nixpkgs.config.allowUnfreePredicate = pkg:
builtins.elem (lib.getName pkg) [
"obsidian"
];
networking.wireguard.interfaces = {
# "wg0" is the network interface name. You can name the interface arbitrarily.
wg0 = {
# Determines the IP address and subnet of the server's end of the tunnel interface.
ips = [ "10.100.0.1/22" ];
nixpkgs.config.permittedInsecurePackages =
lib.optional (pkgs.obsidian.version == "1.4.16") "electron-25.9.0";
# The port that WireGuard listens to. Must be accessible by the client.
listenPort = 51820;
home-manager.useGlobalPkgs = true;
# Home Manager for Sky
home-manager.users.sky = {pkgs, ...}: {
home.packages = with pkgs; [
obsidian
(callPackage (./rolldice/default.nix) {})
clang-tools
rclone
trash-cli
mumble
nheko
zim
moonlight-embedded
nitrogen
firefox-bin
neofetch
ncpamixer
tree
xclip
grpc
clipcat
keepassxc
jellyfin-media-player
];
# This allows the wireguard server to route your traffic to the internet and hence be like a VPN
# For this to work you have to set the dnsserver IP of your router (or dnsserver of choice) in your clients
postSetup = ''
${pkgs.iptables}/bin/iptables -t nat -A POSTROUTING -s 10.100.0.0/24 -o eno4 -j MASQUERADE
'';
services.picom = {
enable = true;
vSync = true;
backend = "glx";
inactiveOpacity = 0.9;
settings = {
blur = {
method = "dual-kawase";
};
};
# This undoes the above command
postShutdown = ''
${pkgs.iptables}/bin/iptables -t nat -D POSTROUTING -s 10.100.0.0/24 -o eno4 -j MASQUERADE
'';
# Path to the private key file.
#
# Note: The private key can also be included inline via the privateKey option,
# but this makes the private key world-readable; thus, using privateKeyFile is
# recommended.
privateKeyFile = "/run/keys/wg-privatekey"; # TODO: Change this to be a sops secret
peers = [
# List of allowed peers.
{ #nub
# Public key of the peer (not a file path).
publicKey = "j2WrE1lX5Pf12Yk61zzCUJCnzVQyR+s+nWw72a4gsik=";
# List of IPs assigned to this peer within the tunnel subnet. Used to configure routing.
allowedIPs = [ "10.100.1.0/24" ];
}
{ # ku
publicKey = "MCPLxi1clVx92gfeq04mm1flgjzS2XqtC3OKN6C0iE8=";
allowedIPs = [ "10.100.2.0/24" ];
}
{ # Jas
publicKey = "Q90Tvst8ZntJPl1WxLOcV108k9SwPIpjXAtxHPE62UM=";
allowedIPs = ["10.100.0.6/32"];
}
{ # skyLaptop
publicKey = "2sg0sgMMGQrCGt0f/5+1kO/B0Ghfb137DTf9nYctZTM=";
allowedIPs = [ "10.100.0.4/32" ];
}
{ # skyDesktop
publicKey = "36tqEexZ8e6ks+qjDpnMzUY9LAJvFvVDe6MLzR9vtEo=";
allowedIPs = [ "10.100.0.5/32" ];
}
{ # melon :>
publicKey = "nJgeRkHd6mRqT/lMUJIApCov4GgSekrkJJxZGTXOVCE=";
allowedIPs = [ "10.100.0.7/32" ];
}
{
publicKey = "gs17DdrtnYe2cA+Jxt6p/qovfCAT7eVn58Pq5eTHmGc=";
allowedIPs = [ "10.100.0.8/32" ];
}
{ # Kitibri
publicKey = "cT95nYaPYkra1Im355EwUXxw9Wef7b1j0YBx6+rnp1s=";
allowedIPs = [ "10.100.0.9/32" ];
}
{ # ken
publicKey = "6FHWDuKLW3QNVNTURIm6bJ1s0+FtzgEO9TtKuS0khhM=";
allowedIPs = [ "10.100.0.10/32" ];
}
{ # Jamie
publicKey = "mF6eLG4VgwVV56PGn+Omg0mvN2UGB8b0i7rq8rJI+l0=";
allowedIPs = [ "10.100.0.11/32" ];
}
{ # saff
publicKey = "3rxyEvAU3I/wdTRJR4qKAHmbmw5abnx1o49jei14FTI=";
allowedIPs = [ "10.100.0.12/32" ];
}
{ # Tech
publicKey = "uD+yrVfZidjwiJjk6y5bHL7xlIozgsSKKGM3idu92BI=";
allowedIPs = [ "10.100.0.13/32" ];
}
{ # meow
publicKey = "Jn3py2rxRuoluUl4eKxK+m+f21wMzQ4xI+NOMt7Oihc=";
allowedIPs = [ "10.100.0.14/32" ];
}
{ # fetti
publicKey = "g92YcBJQK/MOWMbpF8wZV/G8EgKdcIdltfdE/26GgSA=";
allowedIPs = [ "10.100.0.15/32" ];
}
{ # baron
publicKey = "4YQRCZwgdzpPk3Gia+3cl2GByHxjI1Vbup0orlgp8BI=";
allowedIPs = [ "10.100.0.16/32" ];
}
{ # blise
publicKey = "wOOOAtQ5YX4surQGU1aU+JzSV1fI/qFqMLm731z8nTc=";
allowedIPs = [ "10.100.0.17/32" ];
}
{ # baba
publicKey = "il12KBAwODC1TTZgT4JIL0f6AZcYWxylmuVlTlWd80s=";
allowedIPs = [ "10.100.0.18/32" ];
}
{ # Mari
publicKey = "NfEjPn+ZYgB1vfNZ353AQOKPZLKUt4gPoNUSrywXjl0=";
allowedIPs = [ "10.100.0.20/32" ];
}
{ # WiTu
publicKey = "k+PkzHREDszWnzvY79JcBL2XCkwtQ/XSunxNft7pjwY=";
allowedIPs = ["10.100.0.19/32"];
}
{ # Shiro
publicKey = "I4US1u5iR5g8qzVvtVMvK65dgNsnnXbkAac3GBS1PWQ=";
allowedIPs = ["10.100.0.21/32"];
}
];
};
programs.bash = {
enable = true;
shellAliases = {
nv = "nvim";
ccm = "clipcat-menu";
};
};
programs.git = {
enable = true;
userName = "Sky Hearn";
userEmail = "sky.hearn@pm.me";
signing = {
key = "DAB485883AE426EC";
signByDefault = false;
};
};
programs.neovim = {
enable = true;
defaultEditor = true;
extraConfig = ''
set shiftwidth=2 smarttab
set expandtab
set tabstop=8 softtabstop=0
'';
extraPackages = with pkgs; [
# Use the project flake's language server to prevent version mismatches
# clang_12
# rust-analyzer
];
plugins = with pkgs.vimPlugins; [
{
plugin = gruvbox-nvim;
type = "viml";
# Better performance is off until I can figure out a way to make the cache outside the nix store
config = ''
if has('termguicolors')
set termguicolors
endif
colorscheme gruvbox
'';
}
{
plugin = lualine-nvim;
type = "lua";
config = ''
require'lualine'.setup {
options = {
theme = 'gruvbox'
},
sections = {
lualine_c = {'lsp_progress'}
}
}
'';
}
{
plugin = lsp-status-nvim;
type = "lua";
config = ''
require'lsp-status'.register_progress()
'';
}
{
plugin = nvim-lspconfig;
type = "lua";
config = ''
-- Mappings.
-- See `:help vim.diagnostic.*` for documentation on any of the below functions
local opts = { noremap=true, silent=true }
vim.keymap.set('n', '<space>e', vim.diagnostic.open_float, opts)
vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, opts)
vim.keymap.set('n', ']d', vim.diagnostic.goto_next, opts)
vim.keymap.set('n', '<space>q', vim.diagnostic.setloclist, opts)
-- Use an on_attach function to only map the following keys
-- after the language server attaches to the current buffer
local on_attach = function(client, bufnr)
-- Set up status tracking
require'lsp-status'.on_attach(client)
-- Enable completion triggered by <c-x><c-o>
vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc')
-- Mappings.
-- See `:help vim.lsp.*` for documentation on any of the below functions
local bufopts = { noremap=true, silent=true, buffer=bufnr }
vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, bufopts)
vim.keymap.set('n', 'gd', vim.lsp.buf.definition, bufopts)
vim.keymap.set('n', 'K', vim.lsp.buf.hover, bufopts)
vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, bufopts)
vim.keymap.set('n', '<C-k>', vim.lsp.buf.signature_help, bufopts)
vim.keymap.set('n', '<space>wa', vim.lsp.buf.add_workspace_folder, bufopts)
vim.keymap.set('n', '<space>wr', vim.lsp.buf.remove_workspace_folder, bufopts)
vim.keymap.set('n', '<space>wl', function()
print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
end, bufopts)
vim.keymap.set('n', '<space>D', vim.lsp.buf.type_definition, bufopts)
vim.keymap.set('n', '<space>rn', vim.lsp.buf.rename, bufopts)
vim.keymap.set('n', '<space>ca', vim.lsp.buf.code_action, bufopts)
vim.keymap.set('n', 'gr', vim.lsp.buf.references, bufopts)
vim.keymap.set('n', '<space>f', function() vim.lsp.buf.format { async = true } end, bufopts)
end
local lsp_flags = {
-- This is the default in Nvim 0.7+
debounce_text_changes = 150,
}
local servers = { 'clangd', 'rust_analyzer' }
for _, lsp in ipairs(servers) do
require'lspconfig'[lsp].setup(
vim.tbl_extend('keep',
require('coq').lsp_ensure_capabilities({
on_attach = on_attach,
flags = lsp_flags
}) or {},
require'lsp-status'.capabilities
)
)
end
'';
}
{
plugin = coq_nvim;
type = "lua";
config = ''
vim.g.coq_settings = { auto_start = 'shut-up', xdg = true }
'';
}
{
plugin = nvim-treesitter.withAllGrammars;
type = "lua";
config = ''
require'nvim-treesitter.configs'.setup {
-- TODO: Make this use stdpath("data")
-- parser_install_dir = "~/.local/share/nvim/site",
-- ensure_installed = { "nix", "help", "rust", "c", "lua" },
-- auto_install = true,
highlight = {
enable = true
},
incremental_selection = {
enable = true,
keymaps = {
init_selection = "gnn", -- set to `false` to disable one of the mappings
node_incremental = "grn",
scope_incremental = "grc",
node_decremental = "grm",
}
},
indent = {
enable = true
},
}
vim.cmd([[
set foldmethod=expr
set foldexpr=nvim_treesitter#foldexpr()
set nofoldenable
]])
'';
}
{
plugin = telescope-nvim;
}
];
};
home.stateVersion = "23.11";
};
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
wireguard-tools
pinentry
pulseaudio
bash
vim
wget
acpi
dmenu
dunst
libnotify
(pkgs.st.overrideAttrs (_: {
src = ./st;
})
)
(pkgs.slstatus.overrideAttrs (_: {
src = ./slstatus;
})
)
libva-utils
];
# arion setup
virtualisation.podman.enable = true;
virtualisation.podman.dockerSocket.enable = true;
virtualisation.podman.defaultNetwork.settings.dns_enabled = true;
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
programs.mtr.enable = true;
environment.systemPackages = [
pkgs.git
pkgs.bash
pkgs.wget
pkgs.curl
pkgs.vim
pkgs.arion
# Do install the docker CLI to talk to podman.
# Not needed when virtualisation.docker.enable = true;
pkgs.docker-client
];
# List services that you want to enable:
# Enable the OpenSSH daemon.
services.openssh.enable = true;
networking.firewall.allowedTCPPorts = [ 80 443 22 25565 25566 25567];
# https://discourse.nixos.org/t/cant-get-gnupg-to-work-no-pinentry/15373/19
services.pcscd.enable = true;
programs.gnupg.agent = {
services.nginx = {
enable = true;
pinentryFlavor = "tty";
recommendedGzipSettings = true;
recommendedOptimisation = true;
recommendedProxySettings = true;
};
# Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
# networking.firewall.enable = false;
services.postgresql = {
enable = true;
};
# Copy the NixOS configuration file and link it from the resulting system
# (/run/current-system/configuration.nix). This is useful in case you
# accidentally delete configuration.nix.
# system.copySystemConfiguration = true;
# Enable the OpenSSH daemon.
services.openssh = {
enable = true;
settings = {
# Forbid root login through SSH.
PermitRootLogin = "no";
# key authentication
PasswordAuthentication = false;
KbdInteractiveAuthentication = false;
};
};
# This option defines the first version of NixOS you have installed on this particular machine,
# and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
@ -365,5 +221,4 @@ clipcatd &
#
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
system.stateVersion = "23.11"; # Did you read the comment?
}

1
dwm

@ -1 +0,0 @@
Subproject commit 9397c7c7caaf7b08635f15360e7aeaf71f547fff

234
flake.lock Executable file
View File

@ -0,0 +1,234 @@
{
"nodes": {
"arion": {
"inputs": {
"flake-parts": "flake-parts",
"haskell-flake": "haskell-flake",
"hercules-ci-effects": "hercules-ci-effects",
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1709606645,
"narHash": "sha256-yObjAl8deNvx1uIfQn7/vkB9Rnr0kqTo1HVrsk46l30=",
"owner": "hercules-ci",
"repo": "arion",
"rev": "d2d48c9ec304ac80c84ede138b8c6f298d07d995",
"type": "github"
},
"original": {
"id": "arion",
"type": "indirect"
}
},
"flake-parts": {
"inputs": {
"nixpkgs-lib": [
"arion",
"nixpkgs"
]
},
"locked": {
"lastModified": 1709336216,
"narHash": "sha256-Dt/wOWeW6Sqm11Yh+2+t0dfEWxoMxGBvv3JpIocFl9E=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "f7b3c975cf067e56e7cda6cb098ebe3fb4d74ca2",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-parts_2": {
"inputs": {
"nixpkgs-lib": [
"arion",
"hercules-ci-effects",
"nixpkgs"
]
},
"locked": {
"lastModified": 1701473968,
"narHash": "sha256-YcVE5emp1qQ8ieHUnxt1wCZCC3ZfAS+SRRWZ2TMda7E=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "34fed993f1674c8d06d58b37ce1e0fe5eebcb9f5",
"type": "github"
},
"original": {
"id": "flake-parts",
"type": "indirect"
}
},
"haskell-flake": {
"locked": {
"lastModified": 1675296942,
"narHash": "sha256-u1X1sblozi5qYEcLp1hxcyo8FfDHnRUVX3dJ/tW19jY=",
"owner": "srid",
"repo": "haskell-flake",
"rev": "c2cafce9d57bfca41794dc3b99c593155006c71e",
"type": "github"
},
"original": {
"owner": "srid",
"ref": "0.1.0",
"repo": "haskell-flake",
"type": "github"
}
},
"hercules-ci-effects": {
"inputs": {
"flake-parts": "flake-parts_2",
"nixpkgs": [
"arion",
"nixpkgs"
]
},
"locked": {
"lastModified": 1708547820,
"narHash": "sha256-xU/KC1PWqq5zL9dQ9wYhcdgxAwdeF/dJCLPH3PNZEBg=",
"owner": "hercules-ci",
"repo": "hercules-ci-effects",
"rev": "0ca27bd58e4d5be3135a4bef66b582e57abe8f4a",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "hercules-ci-effects",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1709578243,
"narHash": "sha256-hF96D+c2PBmAFhymMw3z8hou++lqKtZ7IzpFbYeL1/Y=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "23ff9821bcaec12981e32049e8687f25f11e5ef3",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1709479366,
"narHash": "sha256-n6F0n8UV6lnTZbYPl1A9q1BS0p4hduAv1mGAP17CVd0=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "b8697e57f10292a6165a20f03d2f42920dfaf973",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-23-11": {
"locked": {
"lastModified": 1709569716,
"narHash": "sha256-iOR44RU4jQ+YPGrn+uQeYAp7Xo7Z/+gT+wXJoGxxLTY=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "617579a787259b9a6419492eaac670a5f7663917",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-23.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1709428628,
"narHash": "sha256-//ZCCnpVai/ShtO2vPjh3AWgo8riXCaret6V9s7Hew4=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "66d65cb00b82ffa04ee03347595aa20e41fe3555",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "release-23.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1709479366,
"narHash": "sha256-n6F0n8UV6lnTZbYPl1A9q1BS0p4hduAv1mGAP17CVd0=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "b8697e57f10292a6165a20f03d2f42920dfaf973",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1709356872,
"narHash": "sha256-mvxCirJbtkP0cZ6ABdwcgTk0u3bgLoIoEFIoYBvD6+4=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "458b097d81f90275b3fdf03796f0563844926708",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"arion": "arion",
"home-manager": "home-manager",
"nixpkgs": "nixpkgs_2",
"nixpkgs-23-11": "nixpkgs-23-11",
"sops-nix": "sops-nix"
}
},
"sops-nix": {
"inputs": {
"nixpkgs": "nixpkgs_3",
"nixpkgs-stable": "nixpkgs-stable"
},
"locked": {
"lastModified": 1709591996,
"narHash": "sha256-0sQcalXSgqlO6mnxBTXkSQChBHy2GQsokB1XY8r+LpQ=",
"owner": "Mic92",
"repo": "sops-nix",
"rev": "291aad29b59ceda517a06e59809f35cb0bb17c6b",
"type": "github"
},
"original": {
"owner": "Mic92",
"repo": "sops-nix",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

43
flake.nix Normal file
View File

@ -0,0 +1,43 @@
{
description = "NixOS configuration";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
sops-nix.url = "github:Mic92/sops-nix";
nixpkgs-23-11.url = "github:nixos/nixpkgs/nixos-23.11";
};
outputs = inputs@{ nixpkgs, nixpkgs-23-11, home-manager, sops-nix, arion, ... }: {
nixosConfigurations = {
rackserver = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./configuration.nix
sops-nix.nixosModules.sops
# https://github.com/hercules-ci/arion/issues/230
({pkgs, ...}:
{
nixpkgs.overlays = [ (final: prev: { arion = nixpkgs-23-11.legacyPackages.x86_64-linux.arion; }) ];
})
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.ku = import ./users/ku.nix;
home-manager.users.nub = import ./users/nub.nix;
home-manager.users.jas = import ./users/jas.nix;
home-manager.users.sky = import ./users/sky.nix;
home-manager.users.podman = import ./users/podman.nix;
# Optionally, use home-manager.extraSpecialArgs to pass
# arguments to home.nix
}
];
};
};
};
}

View File

@ -8,19 +8,19 @@
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
boot.initrd.availableKernelModules = [ "ehci_pci" "ahci" "megaraid_sas" "usb_storage" "usbhid" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/4318-37A8";
fsType = "vfat";
fileSystems."/" =
{ device = "/dev/disk/by-uuid/88bc4e4c-a29d-4e5a-9ed2-8f991c2148a2";
fsType = "btrfs";
};
fileSystems."/" =
{ device = "/dev/disk/by-uuid/0040c110-03d5-4157-89b4-09637d80eb44";
fsType = "btrfs";
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/4791-0457";
fsType = "vfat";
};
swapDevices = [ ];
@ -30,8 +30,11 @@
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp1s0.useDHCP = lib.mkDefault true;
# networking.interfaces.eno1.useDHCP = lib.mkDefault true;
# networking.interfaces.eno2.useDHCP = lib.mkDefault true;
# networking.interfaces.eno3.useDHCP = lib.mkDefault true;
# networking.interfaces.eno4.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

View File

@ -1,28 +0,0 @@
{ lib
, stdenv
, fetchzip
, readline
}:
stdenv.mkDerivation rec {
name = "rolldice";
version = "1.16-1";
src = fetchzip {
url = "https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/rolldice/1.16-1build1/rolldice_1.16.orig.tar.gz";
sha256 = "sha256-gyBwPzO0UO6LvGvaWk5bn1uFUPtedC3Y1/uN3FdyJSQ=";
};
buildInputs = [
readline
];
buildPhase = ''
make
'';
installPhase = ''
mkdir -p $out/bin
mv rolldice $out/bin
'';
}

22
services/duckddns.nix Normal file
View File

@ -0,0 +1,22 @@
{pkgs, ...}:
{
systemd.timers."duckddns" = {
wantedBy = [ "timers.target" ];
timerConfig = {
OnBootSec = "5m";
OnUnitActiveSec = "5m";
Unit = "duckddns.service";
};
};
systemd.services."duckddns"= {
# hiding my token hehe
script = ''
bash /home/sky/duckddns.sh
'';
serviceConfig = {
Type = "oneshot";
User = "root";
};
};
}

33
services/gitea.nix Executable file
View File

@ -0,0 +1,33 @@
{ config, ... }:
{
services.nginx.virtualHosts."git.skymath.duckdns.org" = {
enableACME = true;
forceSSL = true;
locations."/" = {
proxyPass = "http://localhost:3001/";
};
};
services.postgresql = {
ensureDatabases = [ config.services.gitea.user ];
ensureUsers = [
{
name = config.services.gitea.database.user;
ensureDBOwnership = true;
}
];
};
services.gitea = {
enable = true;
appName = "Fallingsky04's Gitea Server <3"; # Give the site a name
database = {
type = "postgres";
passwordFile = "/run/keys/gitea-dbpassword";
};
settings.server = {
HTTP_PORT = 3001;
};
};
}

@ -1 +0,0 @@
Subproject commit f227db9662f3c4f96fdfd0d025e3ed4060ded0a2

1
st

@ -1 +0,0 @@
Subproject commit 7544d3c13dfae83ed19697265daa2ef46882f089

47
users/arion-compose.nix Normal file
View File

@ -0,0 +1,47 @@
{ pkgs, ... }:
{
project.name = "minecraft";
services = {
mc = {
service.image = "itzg/minecraft-server:java17-jdk";
service.volumes = [ "/home/podman/data:/data" ];
service.dns = [ "8.8.8.8" ];
service.network_mode = "host";
service.environment = {
EULA = "true";
TYPE = "FORGE";
VERSION = "1.20.1";
FORGE_VERSION = "47.2.20";
MEMORY = "16G";
};
};
ftb_infinity = {
service.image = "itzg/minecraft-server:java8-multiarch";
service.volumes = [ "/home/podman/ftb_infinity/data:/data" ];
service.dns = [ "8.8.8.8" ];
service.network_mode = "host";
service.environment = {
EULA = "true";
TYPE = "FORGE";
VERSION = "1.7.10";
FORGE_VERSION = "10.13.4.1614";
MEMORY = "16G";
};
};
fabric = {
service.image = "itzg/minecraft-server:java17-jdk";
service.volumes = [ "/home/podman/fabric/data:/data" ];
service.dns = [ "8.8.8.8" ];
service.network_mode = "host";
service.environment = {
EULA = "true";
TYPE = "FABRIC";
VERSION = "1.20.1";
MEMORY = "16G";
OPS = "Fallingsky04";
SERVER_PORT = "25567";
SEED="-2098004362385192995";
};
};
};
}

1
users/arion-pkgs.nix Normal file
View File

@ -0,0 +1 @@
import <nixpkgs> { system = "x86_64-linux"; }

12
users/jas.nix Normal file
View File

@ -0,0 +1,12 @@
{ pkgs, ... }:
{
home.username = "jas";
home.homeDirectory = pkgs.lib.mkForce "/home/jas"; # use force here since vm trys to set it to /var/empty
home.packages = [ ];
programs.bash.enable = true;
# The state version is required and should stay at the version you
# originally installed.
home.stateVersion = "23.11";
}

11
users/ku.nix Normal file
View File

@ -0,0 +1,11 @@
{ pkgs, ... }: {
home.username = "ku";
home.homeDirectory = pkgs.lib.mkForce "/home/ku"; # use force here since vm trys to set it to /var/empty
home.packages = [ ];
programs.bash.enable = true;
# The state version is required and should stay at the version you
# originally installed.
home.stateVersion = "23.11";
}

12
users/nub.nix Normal file
View File

@ -0,0 +1,12 @@
{ pkgs, ... }:
{
home.username = "nub";
home.homeDirectory = pkgs.lib.mkForce "/home/nub"; # use force here since vm trys to set it to /var/empty
home.packages = [ ];
programs.bash.enable = true;
# The state version is required and should stay at the version you
# originally installed.
home.stateVersion = "23.11";
}

20
users/podman.nix Normal file
View File

@ -0,0 +1,20 @@
{ pkgs, ... }: {
home.username = "podman";
home.homeDirectory = pkgs.lib.mkForce "/home/podman";
home.packages = [ ];
programs.bash.enable = true;
home.file = {
"arion-pkgs.nix" = {
source = ./arion-pkgs.nix;
};
"arion-compose.nix" = {
source = ./arion-compose.nix;
};
};
# The state version is required and should stay at the version you
# originally installed.
home.stateVersion = "23.11";
}

24
users/sky.nix Normal file
View File

@ -0,0 +1,24 @@
{ pkgs, ... }:
{
home.username = "sky";
home.homeDirectory = pkgs.lib.mkForce "/home/sky"; # use force here since vm trys to set it to /var/empty
home.packages = [ pkgs.neovim ];
programs.bash = {
enable = true;
shellAliases = {
nv = "nvim";
};
};
programs.git = {
enable = true;
userName = "Sky Hearn";
userEmail = "sky.hearn@pm.me";
};
# The state version is required and should stay at the version you
# originally installed.
home.stateVersion = "23.11";
}

23
users/users.nix Normal file
View File

@ -0,0 +1,23 @@
{ config, lib, pkgs, ...}:
{
users.users.sky.isNormalUser = true;
users.users.ku.isNormalUser = true;
users.users.nub.isNormalUser = true;
users.users.jas.isNormalUser = true;
users.extraUsers.podman.hashedPassword = "";
users.users.podman.isNormalUser = true;
users.users.gitea.isSystemUser = true;
users.groups.keys.members = [ "gitea" ];
users.extraUsers.sky.hashedPassword = "";
users.groups.wheel.members=["sky"];
users.users.sky.openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHTT5oIuXAkJvNzsHQ/RP2OOWb7R7zMjhU0ZmZCStlOX"
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDP1B+iui9JR8u1yBNJ6Eh+7HL+PKuKkpjtOIDhl9uvZ1XsDqKnUJcFNjh7Jx+H4vpxoNMfEQzQB7qdkWnfhjNGiRp/6RxYcj20f71D3nElm1ELYpgzfufRPYaviwK86/0nj/Bjky4NoB5oBh6aQUi4VjECGNq+V/NzBuJ/vDiOY6+SfvlmJxQZ+0/Na+eWNFq+sDV+bP3PJWdVDO6MQR4IhVWHGZJX5Bjvzu+nFfMkCxp82OESCtyxl6BlW5jFN++SJiAFMASU5FkQU8hfLZb7nDr9ftDNmqWtbBFfnQ4E0jYtaxTN9Gx9A/NTU3AIvfICQcpOVbYXkyNYwsCVEarujc+ZV6EiCosic8xD2ONp5P7YT8TNOcSAQzto+OKTcDc3Z7gkIopZifvlNQissMqL8QxwcRpNr8Jg590CrHvnqanB0AO+pE346cNlo6/qEzw4uCGdo+WZAXI1Evg0/6uvklC48wqAbTsLiXGPXQlXsY5T6D6bvUNAF51lreHWYdE="
];
users.groups.podman = {};
users.users.podman.group = "podman";
}

1
wg-publickey Normal file
View File

@ -0,0 +1 @@
HmG6Xcyo4jfE+uhJkEjK+IGref4peV5easEbxx2l0W4=