Compare commits

..

10 commits

Author SHA1 Message Date
1222576f77 moved package to user programs 2023-10-08 18:07:24 -07:00
ae5c5d1d2b added rdp servers and clients to both devices 2023-10-08 18:01:58 -07:00
d5de5c9ad9 moved firewall rules next to required module 2023-10-08 17:35:03 -07:00
8954974c75 got dnsmasq working as lan dns 2023-10-08 17:30:00 -07:00
25fb35f1cb updated keymaps to new nixvim format 2023-10-08 13:28:49 -07:00
6ff92875a0 enabled ssh server on desktop 2023-10-08 12:58:09 -07:00
fd76980110 added important note to setup instructions 2023-10-08 12:58:09 -07:00
48e6b2ac30 flake.lock: Update
Flake lock file updates:

• Updated input 'home-manager':
    'github:nix-community/home-manager/b2a2133c9a0b0aa4d06d72b5891275f263ee08df' (2023-10-06)
  → 'github:nix-community/home-manager/3c1d8758ac3f55ab96dcaf4d271c39da4b6e836d' (2023-10-08)
• Updated input 'nixpkgs':
    'github:nixos/nixpkgs/81e8f48ebdecf07aab321182011b067aafc78896' (2023-10-03)
  → 'github:nixos/nixpkgs/87828a0e03d1418e848d3dd3f3014a632e4a4f64' (2023-10-06)
• Updated input 'nixpkgs-stable':
    'github:NixOS/nixpkgs/79c53a21aaec7f03f6b77e00769c491759139c67' (2023-10-07)
  → 'github:NixOS/nixpkgs/aca9a453afe59a291298957090b79398deaccb2b' (2023-10-08)
2023-10-08 12:51:21 -07:00
ce65561523 flake.lock: Update
Flake lock file updates:

• Updated input 'home-manager':
    'github:nix-community/home-manager/68f7d8c0fb0bfc67d1916dd7f06288424360d43a' (2023-10-04)
  → 'github:nix-community/home-manager/b2a2133c9a0b0aa4d06d72b5891275f263ee08df' (2023-10-06)
• Updated input 'kmonad':
    'github:kmonad/kmonad/22da3354e6f629f9294c830d8558875d77b5cffc?dir=nix' (2023-09-20)
  → 'github:kmonad/kmonad/8440eafdb516a379b4350f3c29a0e919f88cee24?dir=nix' (2023-10-07)
• Updated input 'nixpkgs':
    'github:nixos/nixpkgs/fdd898f8f79e8d2f99ed2ab6b3751811ef683242' (2023-10-01)
  → 'github:nixos/nixpkgs/81e8f48ebdecf07aab321182011b067aafc78896' (2023-10-03)
• Updated input 'nixpkgs-stable':
    'github:NixOS/nixpkgs/ef8e9997fcb37d5c8372dc1349185bd0d31752a6' (2023-10-05)
  → 'github:NixOS/nixpkgs/79c53a21aaec7f03f6b77e00769c491759139c67' (2023-10-07)
• Updated input 'nixvim':
    'github:nix-community/nixvim/a0c35acab596530208034aef2e254cf32179268b' (2023-10-05)
  → 'github:nix-community/nixvim/eb84003a09ade3812b6bfe0d0804249f1847abab' (2023-10-06)
2023-10-08 12:51:21 -07:00
f51d472df8 laptop stuff 2023-10-05 16:59:12 -07:00
11 changed files with 9609 additions and 68 deletions

View file

@ -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": {

View file

@ -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)

View 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;
};
};
}

View file

@ -3,8 +3,9 @@
{ {
# 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
## NOTE: Must Include the HTTPS://
# tailscale up --login-server <headscale_url> # 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

View file

@ -3,20 +3,35 @@
{ {
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" ];
};
services.tailscale.enable = true;
networking.firewall = {
checkReversePath = "loose"; checkReversePath = "loose";
trustedInterfaces = [ "tailscale0" ]; trustedInterfaces = [ "tailscale0" ];
allowedUDPPorts = [ config.services.tailscale.port ]; 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;
sshd.enable = true;
openssh.settings = {
PasswordAuthentication = false;
PermitRootLogin = "no";
X11Forwarding = true;
};
};
systemd.services.sshd.wantedBy = [ "multi-user.target" ];
services.xserver.videoDrivers = [ "nvidia" ]; services.xserver.videoDrivers = [ "nvidia" ];
hardware.opengl.enable = true; hardware.opengl.enable = true;

View file

@ -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";
}; };

View file

@ -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
View file

@ -0,0 +1,9 @@
{config, lib, pkgs, ...}:
{
services.xrdp = {
enable = true;
defaultWindowManager = "startplasma-x11";
openFirewall = true;
};
}

View file

@ -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

File diff suppressed because it is too large Load diff

View file

@ -107,6 +107,7 @@ in
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