mirror of
https://github.com/Nickiel12/nicks-nix-config.git
synced 2024-11-24 05:35:29 -08:00
Compare commits
10 commits
3349510def
...
1222576f77
Author | SHA1 | Date | |
---|---|---|---|
1222576f77 | |||
ae5c5d1d2b | |||
d5de5c9ad9 | |||
8954974c75 | |||
25fb35f1cb | |||
6ff92875a0 | |||
fd76980110 | |||
48e6b2ac30 | |||
ce65561523 | |||
f51d472df8 |
11 changed files with 9609 additions and 68 deletions
30
flake.lock
30
flake.lock
|
@ -122,11 +122,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1696446489,
|
"lastModified": 1696737557,
|
||||||
"narHash": "sha256-xSjMKdNR+q/3hdSPyg/LUMsZT/WIoUi8dcm5zT4SMUQ=",
|
"narHash": "sha256-YD/pjDjj/BNmisEvRdM/vspkCU3xyyeGVAUWhvVSi5Y=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "68f7d8c0fb0bfc67d1916dd7f06288424360d43a",
|
"rev": "3c1d8758ac3f55ab96dcaf4d271c39da4b6e836d",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -141,11 +141,11 @@
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"dir": "nix",
|
"dir": "nix",
|
||||||
"lastModified": 1695227806,
|
"lastModified": 1696666273,
|
||||||
"narHash": "sha256-EcChzeEOh2oAZNgvR+kWCBpWomMopK2Zs+0+dvDUJh0=",
|
"narHash": "sha256-hpqcq42oFtQvDst5Rup9U/ejZgTnAJum0+nSgsBQ8Gs=",
|
||||||
"owner": "kmonad",
|
"owner": "kmonad",
|
||||||
"repo": "kmonad",
|
"repo": "kmonad",
|
||||||
"rev": "22da3354e6f629f9294c830d8558875d77b5cffc",
|
"rev": "8440eafdb516a379b4350f3c29a0e919f88cee24",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -192,11 +192,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs-stable": {
|
"nixpkgs-stable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1696524703,
|
"lastModified": 1696788931,
|
||||||
"narHash": "sha256-KqzFNzhq0GpT09h1w2r2h7NxYvxDnzU3qOWYbfbAqyw=",
|
"narHash": "sha256-E19130KVEQaWgP7Wcg/npw/Sd9H+jN0lCP97nn0JNUo=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "ef8e9997fcb37d5c8372dc1349185bd0d31752a6",
|
"rev": "aca9a453afe59a291298957090b79398deaccb2b",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -256,11 +256,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs_4": {
|
"nixpkgs_4": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1696193975,
|
"lastModified": 1696604326,
|
||||||
"narHash": "sha256-mnQjUcYgp9Guu3RNVAB2Srr1TqKcPpRXmJf4LJk6KRY=",
|
"narHash": "sha256-YXUNI0kLEcI5g8lqGMb0nh67fY9f2YoJsILafh6zlMo=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "fdd898f8f79e8d2f99ed2ab6b3751811ef683242",
|
"rev": "87828a0e03d1418e848d3dd3f3014a632e4a4f64",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -294,11 +294,11 @@
|
||||||
"pre-commit-hooks": "pre-commit-hooks"
|
"pre-commit-hooks": "pre-commit-hooks"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1696533984,
|
"lastModified": 1696593451,
|
||||||
"narHash": "sha256-4B7UpA9L8t57RYg801HopuEiipQJKzkEcLgPUaOB5Uw=",
|
"narHash": "sha256-NzEGb281LkgQ5/hYd0zQu3bIqiLE24Zo1A26SbDMlFU=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nixvim",
|
"repo": "nixvim",
|
||||||
"rev": "a0c35acab596530208034aef2e254cf32179268b",
|
"rev": "eb84003a09ade3812b6bfe0d0804249f1847abab",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
(import ./hardware-configuration.nix)
|
(import ./hardware-configuration.nix)
|
||||||
|
(import ./modules/dnsmasq.nix)
|
||||||
(import ./modules/forgejo.nix)
|
(import ./modules/forgejo.nix)
|
||||||
(import ./modules/nginx.nix)
|
(import ./modules/nginx.nix)
|
||||||
(import ./modules/nextcloud.nix)
|
(import ./modules/nextcloud.nix)
|
||||||
|
|
25
hosts/Alaska/modules/dnsmasq.nix
Normal file
25
hosts/Alaska/modules/dnsmasq.nix
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
{ config, lib, pkgs, ...}:
|
||||||
|
|
||||||
|
{
|
||||||
|
|
||||||
|
networking.firewall = {
|
||||||
|
allowedTCPPorts = [53];
|
||||||
|
allowedUDPPorts = [53];
|
||||||
|
};
|
||||||
|
services.dnsmasq = {
|
||||||
|
enable = true;
|
||||||
|
alwaysKeepRunning = true;
|
||||||
|
resolveLocalQueries = true;
|
||||||
|
settings = {
|
||||||
|
listen-address = "::1,127.0.0.1,10.0.0.183";
|
||||||
|
port = 53;
|
||||||
|
server = [ "1.1.1.1" "8.8.8.8" "8.8.4.4" ];
|
||||||
|
# Manual expection for frustrating windows devices to point at headscale server
|
||||||
|
address = "/headscale.nickiel.net/10.0.0.183";
|
||||||
|
bogus-priv = true;
|
||||||
|
domain-needed = true;
|
||||||
|
no-resolv = true;
|
||||||
|
cache-size = 1000;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -3,9 +3,10 @@
|
||||||
{
|
{
|
||||||
# to add a new headscale "user", run this command
|
# to add a new headscale "user", run this command
|
||||||
# sudo headscale users create elnuhub
|
# sudo headscale users create elnuhub
|
||||||
# then run this command where headscale_url is the http path
|
# then run this command where headscale_url is the https path
|
||||||
# to the server
|
# to the server
|
||||||
# tailscale up --login-server <headscale_url>
|
## NOTE: Must Include the HTTPS://
|
||||||
|
# tailscale up --login-server <headscale_url>
|
||||||
# then replace USERNAME with the computer's hostname which you created
|
# then replace USERNAME with the computer's hostname which you created
|
||||||
# an "user" account in the first comment
|
# an "user" account in the first comment
|
||||||
|
|
||||||
|
|
|
@ -3,19 +3,34 @@
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
|
(import ./../../modules/xrdp.nix)
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
networking.hosts = {
|
networking = {
|
||||||
"10.0.0.183" = [ "headscale.nickiel.net" ];
|
firewall = {
|
||||||
"100.64.0.1" = ["files.nickiel.net" "git.nickiel.net" "nickiel.net" "jellyfin.nickiel.net" ];
|
checkReversePath = "loose";
|
||||||
|
trustedInterfaces = [ "tailscale0" ];
|
||||||
|
allowedUDPPorts = [ config.services.tailscale.port ];
|
||||||
|
};
|
||||||
|
|
||||||
|
nameservers = ["10.0.0.183" "1.1.1.1"];
|
||||||
|
|
||||||
|
hosts = {
|
||||||
|
# "10.0.0.183" = [ "headscale.nickiel.net" ];
|
||||||
|
"100.64.0.1" = ["files.nickiel.net" "git.nickiel.net" "nickiel.net" "jellyfin.nickiel.net" ];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
services.tailscale.enable = true;
|
services = {
|
||||||
networking.firewall = {
|
tailscale.enable = true;
|
||||||
checkReversePath = "loose";
|
sshd.enable = true;
|
||||||
trustedInterfaces = [ "tailscale0" ];
|
openssh.settings = {
|
||||||
allowedUDPPorts = [ config.services.tailscale.port ];
|
PasswordAuthentication = false;
|
||||||
|
PermitRootLogin = "no";
|
||||||
|
X11Forwarding = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
systemd.services.sshd.wantedBy = [ "multi-user.target" ];
|
||||||
|
|
||||||
|
|
||||||
services.xserver.videoDrivers = [ "nvidia" ];
|
services.xserver.videoDrivers = [ "nvidia" ];
|
||||||
|
|
|
@ -1,13 +1,14 @@
|
||||||
{ config, ... }:
|
{ config, ... }:
|
||||||
|
|
||||||
{ imports = [
|
{ imports = [
|
||||||
|
(import ./../../modules/xrdp.nix)
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
hardware.bluetooth.enable = true;
|
hardware.bluetooth.enable = true;
|
||||||
|
|
||||||
networking.hosts = {
|
networking.hosts = {
|
||||||
#"10.0.0.183" = [ "headscale.nickiel.net" ];
|
"10.0.0.183" = [ "headscale.nickiel.net" ];
|
||||||
"100.64.0.1" = ["files.nickiel.net" "git.nickiel.net" "nickiel.net"
|
"100.64.0.1" = ["files.nickiel.net" "git.nickiel.net" "nickiel.net"
|
||||||
"jellyfin.nickiel.net" ];
|
"jellyfin.nickiel.net" ];
|
||||||
};
|
};
|
||||||
|
@ -18,7 +19,6 @@
|
||||||
};
|
};
|
||||||
time.hardwareClockInLocalTime = true;
|
time.hardwareClockInLocalTime = true;
|
||||||
|
|
||||||
|
|
||||||
boot.loader = { efi = {
|
boot.loader = { efi = {
|
||||||
canTouchEfiVariables = true; efiSysMountPoint = "/boot";
|
canTouchEfiVariables = true; efiSysMountPoint = "/boot";
|
||||||
};
|
};
|
||||||
|
|
|
@ -29,43 +29,122 @@ in
|
||||||
tabstop = 4;
|
tabstop = 4;
|
||||||
};
|
};
|
||||||
|
|
||||||
# https://github.com/pupbrained/nix-config/blob/29af4835f21940af51b86313c451fb572a29874a/pkgs/nixvim.nix#L8
|
keymaps = [
|
||||||
maps.normal = {
|
# Modes: https://superuser.com/questions/1702308/how-can-i-configure-shortcut-keys-in-all-modes-of-vim
|
||||||
"<leader>ot" = "<cmd>vs | te<cr>";
|
# n - normal
|
||||||
"<leader>op" = "<cmd>NvimTreeToggle<cr>";
|
# i - insert
|
||||||
"<leader>o." = "<cmd>Telescope file_browser<cr>";
|
# c - cmd
|
||||||
"<leader>." = "<cmd>Telescope find_files<cr>"; # cwd full sub-dir fuzzy find
|
# v - visual select
|
||||||
"<leader>of" = "<cmd>Telescope live_grep<cr>"; # cwd search file
|
# x - visual only
|
||||||
|
# s - selection
|
||||||
|
# o - oper
|
||||||
|
# t - terminal
|
||||||
|
# l - lang
|
||||||
|
{
|
||||||
|
# Open new vertical split and starts a new terminal window
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>ot";
|
||||||
|
action = "<cmd>vs | te<cr>";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
# toggle the left tree panel
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>op";
|
||||||
|
action = "<cmd>NvimTreeToggle<cr>";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
# Open cwd filename fuzzy search
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>o.";
|
||||||
|
action = "<cmd>Telescope file_browser<cr>";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
# Open fuzzy filename recursive search
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>.";
|
||||||
|
action = "<cmd>Telescope find_files<cr>";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
# Search file contents of cwd
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>of";
|
||||||
|
action = "<cmd>Telescope live_grep<cr>";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
# Keep cursor centered while navigating
|
||||||
|
mode = "n";
|
||||||
|
key = "<C-d>";
|
||||||
|
action = "<C-d>zz";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
# Keep cursor centered while navigating
|
||||||
|
mode = "n";
|
||||||
|
key = "<C-u>";
|
||||||
|
action = "<C-u>zz";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
# Keep cursor centered while skipping to search results
|
||||||
|
mode = "n";
|
||||||
|
key = "n";
|
||||||
|
action = "nzzzv";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
# Keep cursor centered while skipping to search results
|
||||||
|
mode = "n";
|
||||||
|
key = "N";
|
||||||
|
action = "Nzzzv";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
# Yank to system clipboard
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>y";
|
||||||
|
action = "\"+y";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
# Yank to system clipboard
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>Y";
|
||||||
|
action = "\"+Y";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
# Delete into the void
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>d";
|
||||||
|
action = "\"_d";
|
||||||
|
}
|
||||||
|
|
||||||
# keep cursor centered while navigating
|
{
|
||||||
"<C-d>" = "<C-d>zz";
|
# Move visual selection up one row
|
||||||
"<C-u>" = "<C-u>zz";
|
mode = "v";
|
||||||
"n" = "nzzzv";
|
key = "J";
|
||||||
"N" = "Nzzzv";
|
action = ":m '>+1<CR>gv=gv";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
# Move visual selection down one row
|
||||||
|
mode = "v";
|
||||||
|
key = "K";
|
||||||
|
action = ":m '<-2<CR>gv=gv";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
# Yank selection to system clipboard
|
||||||
|
mode = "v";
|
||||||
|
key = "<leader>y";
|
||||||
|
action = "\"+y";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
# Delete selection into void
|
||||||
|
mode = "v";
|
||||||
|
key = "<leader>d";
|
||||||
|
action = "\"_d";
|
||||||
|
}
|
||||||
|
|
||||||
# yank to system clipboard
|
{
|
||||||
"<leader>y" = "\"+y";
|
# leader+p delete the selection to the void, then paste
|
||||||
"<leader>Y" = "\"+Y";
|
mode = "x";
|
||||||
|
key = "<leader>p";
|
||||||
# perma-delete without putting on any clipboard
|
action = "\"_dP";
|
||||||
"<leader>d" = "\"_d";
|
}
|
||||||
};
|
];
|
||||||
|
|
||||||
maps.visual = {
|
|
||||||
# moves visual selection up and down lines
|
|
||||||
"J" = ":m '>+1<CR>gv=gv";
|
|
||||||
"K" = ":m '<-2<CR>gv=gv";
|
|
||||||
|
|
||||||
# copy to system clipboard
|
|
||||||
"<leader>y" = "\"+y";
|
|
||||||
|
|
||||||
# perma-delete without putting on any clipboard
|
|
||||||
"<leader>d" = "\"_d";
|
|
||||||
};
|
|
||||||
|
|
||||||
maps.visualOnly = {
|
|
||||||
"<leader>p" = "\"_dP"; # leader+p deletes the selection to null, then pastes
|
|
||||||
};
|
|
||||||
|
|
||||||
plugins = {
|
plugins = {
|
||||||
|
|
||||||
|
|
9
modules/xrdp.nix
Normal file
9
modules/xrdp.nix
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
{config, lib, pkgs, ...}:
|
||||||
|
|
||||||
|
{
|
||||||
|
services.xrdp = {
|
||||||
|
enable = true;
|
||||||
|
defaultWindowManager = "startplasma-x11";
|
||||||
|
openFirewall = true;
|
||||||
|
};
|
||||||
|
}
|
|
@ -104,7 +104,7 @@
|
||||||
timewarrior # timewarrior tracking status (https://timewarrior.net/)
|
timewarrior # timewarrior tracking status (https://timewarrior.net/)
|
||||||
taskwarrior # taskwarrior task count (https://taskwarrior.org/)
|
taskwarrior # taskwarrior task count (https://taskwarrior.org/)
|
||||||
time # current time
|
time # current time
|
||||||
battery # internal battery
|
battery # internal battery
|
||||||
# =========================[ Line #2 ]========================= (now like 3)
|
# =========================[ Line #2 ]========================= (now like 3)
|
||||||
# newline
|
# newline
|
||||||
# ip # ip address and bandwidth usage for a specified network interface
|
# ip # ip address and bandwidth usage for a specified network interface
|
||||||
|
@ -1621,7 +1621,7 @@
|
||||||
# Show battery in yellow when it's discharging.
|
# Show battery in yellow when it's discharging.
|
||||||
typeset -g POWERLEVEL9K_BATTERY_DISCONNECTED_FOREGROUND=3
|
typeset -g POWERLEVEL9K_BATTERY_DISCONNECTED_FOREGROUND=3
|
||||||
# Battery pictograms going from low to high level of charge.
|
# Battery pictograms going from low to high level of charge.
|
||||||
typeset -g POWERLEVEL9K_BATTERY_STAGES='\uf58d\uf579\uf57a\uf57b\uf57c\uf57d\uf57e\uf57f\uf580\uf581\uf578'
|
typeset -g POWERLEVEL9K_BATTERY_STAGES='\uf008e\uf007a\uf007b\uf007c\uf007d\uf007e\uf007f\uf0080\uf0081\uf0082\uf0079'
|
||||||
# Don't show the remaining time to charge/discharge.
|
# Don't show the remaining time to charge/discharge.
|
||||||
typeset -g POWERLEVEL9K_BATTERY_VERBOSE=false
|
typeset -g POWERLEVEL9K_BATTERY_VERBOSE=false
|
||||||
typeset -g POWERLEVEL9K_BATTERY_BACKGROUND=236
|
typeset -g POWERLEVEL9K_BATTERY_BACKGROUND=236
|
||||||
|
|
9410
rsrcs/p10k.zsh-new
Normal file
9410
rsrcs/p10k.zsh-new
Normal file
File diff suppressed because it is too large
Load diff
|
@ -106,17 +106,18 @@ in
|
||||||
# Gui application
|
# Gui application
|
||||||
pkgs-stable.darktable # RAW processing
|
pkgs-stable.darktable # RAW processing
|
||||||
pkgs-stable.dbeaver # SQL management tool
|
pkgs-stable.dbeaver # SQL management tool
|
||||||
firefox # Internet access
|
firefox # Internet access
|
||||||
|
freerdp # RDP client
|
||||||
pkgs-stable.inkscape # Vector drawing
|
pkgs-stable.inkscape # Vector drawing
|
||||||
pkgs-stable.kicad # PCB design
|
pkgs-stable.kicad # PCB design
|
||||||
krita # Raster drawing
|
krita # Raster drawing
|
||||||
pkgs-stable.libreoffice-fresh # Office editing
|
pkgs-stable.libreoffice-fresh # Office editing
|
||||||
pkgs-stable.makemkv # blue-ray + dvd -> mkv
|
pkgs-stable.makemkv # blue-ray + dvd -> mkv
|
||||||
pkgs-stable.obsidian # Markdown and notes
|
pkgs-stable.obsidian # Markdown and notes
|
||||||
qalculate-gtk # unit-friendly calculator
|
qalculate-gtk # unit-friendly calculator
|
||||||
pkgs-stable.vscodium # when vim and emacs (somehow) isn't enough
|
pkgs-stable.vscodium # when vim and emacs (somehow) isn't enough
|
||||||
pkgs-stable.dragon # simple audio player
|
pkgs-stable.dragon # simple audio player
|
||||||
obs-studio # for video recording and virtual camera
|
obs-studio # for video recording and virtual camera
|
||||||
|
|
||||||
libsForQt5.kate # kate/kwrite
|
libsForQt5.kate # kate/kwrite
|
||||||
libsForQt5.ark # kde archive manager
|
libsForQt5.ark # kde archive manager
|
||||||
|
|
Loading…
Reference in a new issue