mirror of
https://github.com/Nickiel12/nicks-nix-config.git
synced 2024-11-24 13:45:29 -08:00
Compare commits
No commits in common. "de1444fbf38604768a24a04a67baf2f5ea3f3b17" and "71a013b18b23e20fdc418a3fe0f0562755a1865d" have entirely different histories.
de1444fbf3
...
71a013b18b
15 changed files with 19 additions and 140 deletions
12
flake.lock
12
flake.lock
|
@ -136,11 +136,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1691225770,
|
"lastModified": 1690476848,
|
||||||
"narHash": "sha256-O5slH8nW8msTAqVAS5rkvdHSkjmrO+JauuSDzZCmv2M=",
|
"narHash": "sha256-PSmzyuEbMxEn2uwwLYUN2l1psoJXb7jm/kfHD12Sq0k=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "0a014a729cdd54d9919ff36b714d047909d7a4c8",
|
"rev": "8d243f7da13d6ee32f722a3f1afeced150b6d4da",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -233,11 +233,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1691186842,
|
"lastModified": 1690272529,
|
||||||
"narHash": "sha256-wxBVCvZUwq+XS4N4t9NqsHV4E64cPVqQ2fdDISpjcw0=",
|
"narHash": "sha256-MakzcKXEdv/I4qJUtq/k/eG+rVmyOZLnYNC2w1mB59Y=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "18036c0be90f4e308ae3ebcab0e14aae0336fe42",
|
"rev": "ef99fa5c5ed624460217c31ac4271cfb5cb2502c",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
16
flake.nix
16
flake.nix
|
@ -46,13 +46,7 @@
|
||||||
useGlobalPkgs = true;
|
useGlobalPkgs = true;
|
||||||
useUserPackages = true;
|
useUserPackages = true;
|
||||||
extraSpecialArgs = { inherit user; };
|
extraSpecialArgs = { inherit user; };
|
||||||
users.${user} = {
|
users.${user} = import ./users/${user}.nix;
|
||||||
imports = [
|
|
||||||
(import ./users/${user}.nix)
|
|
||||||
# Add nixvim to the homemanager
|
|
||||||
inputs.nixvim.homeManagerModules.nixvim
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
@ -75,13 +69,7 @@
|
||||||
useGlobalPkgs = true;
|
useGlobalPkgs = true;
|
||||||
useUserPackages = true;
|
useUserPackages = true;
|
||||||
extraSpecialArgs = { inherit user; };
|
extraSpecialArgs = { inherit user; };
|
||||||
users.${user} = {
|
users.${user} = import ./users/${user}.nix;
|
||||||
imports = [
|
|
||||||
(import ./users/${user}.nix)
|
|
||||||
# Add nixvim to the homemanager
|
|
||||||
inputs.nixvim.homeManagerModules.nixvim
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
|
@ -5,12 +5,10 @@
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
(import ./hardware-configuration.nix)
|
(import ./hardware-configuration.nix)
|
||||||
(import ./modules/forgejo.nix)
|
|
||||||
(import ./modules/nginx.nix)
|
(import ./modules/nginx.nix)
|
||||||
(import ./modules/nextcloud.nix)
|
(import ./modules/nextcloud.nix)
|
||||||
(import ./modules/msmtp.nix)
|
(import ./modules/msmtp.nix)
|
||||||
(import ./modules/headscale.nix)
|
(import ./modules/forgejo.nix)
|
||||||
(import ./modules/tailscale.nix)
|
|
||||||
];
|
];
|
||||||
|
|
||||||
environment.systemPackages = [
|
environment.systemPackages = [
|
||||||
|
|
|
@ -1,18 +0,0 @@
|
||||||
{ config, ... }:
|
|
||||||
|
|
||||||
let
|
|
||||||
baseDomain = "nickiel.net";
|
|
||||||
domain = "headscale.${baseDomain}";
|
|
||||||
in {
|
|
||||||
# https://carjorvaz.com/posts/setting-up-headscale-on-nixos/
|
|
||||||
services.headscale = {
|
|
||||||
enable = true;
|
|
||||||
address = "0.0.0.0";
|
|
||||||
port = 8082;
|
|
||||||
settings = {
|
|
||||||
server_url = "https://${domain}";
|
|
||||||
dns_config.base_domain = baseDomain;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
environment.systemPackages = [ config.services.headscale.package ];
|
|
||||||
}
|
|
|
@ -22,13 +22,6 @@
|
||||||
|
|
||||||
virtualHosts = {
|
virtualHosts = {
|
||||||
|
|
||||||
"default" = {
|
|
||||||
default = true;
|
|
||||||
serverName = null;
|
|
||||||
# https://stackoverflow.com/a/42802777
|
|
||||||
locations."/".return = "444";
|
|
||||||
};
|
|
||||||
|
|
||||||
"jellyfin.nickiel.net" = {
|
"jellyfin.nickiel.net" = {
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
|
@ -50,15 +43,6 @@
|
||||||
locations."/".proxyPass = "http://127.0.0.1:3001";
|
locations."/".proxyPass = "http://127.0.0.1:3001";
|
||||||
};
|
};
|
||||||
|
|
||||||
"headscale.nickiel.net" = {
|
|
||||||
forceSSL = true;
|
|
||||||
enableACME = true;
|
|
||||||
locations."/" = {
|
|
||||||
proxyPass = "http://localhost:${ toString config.services.headscale.port }";
|
|
||||||
proxyWebsockets = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,22 +0,0 @@
|
||||||
{ config, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
# to add a new headscale "user", run this command
|
|
||||||
# sudo headscale users create elnuhub
|
|
||||||
# then run this command where headscale_url is the http path
|
|
||||||
# to the server
|
|
||||||
# tailscale up --login-server <headscale_url>
|
|
||||||
# then replace USERNAME with the computer's hostname which you created
|
|
||||||
# an "user" account in the first comment
|
|
||||||
|
|
||||||
# use this for android instructions
|
|
||||||
# https://github.com/juanfont/headscale/blob/main/docs/android-client.md
|
|
||||||
|
|
||||||
services.tailscale.enable = true;
|
|
||||||
# Defined here to indicate the settings are related
|
|
||||||
networking.firewall = {
|
|
||||||
checkReversePath = "loose";
|
|
||||||
trustedInterfaces = [ "tailscale0" ];
|
|
||||||
allowedUDPPorts = [ config.services.tailscale.port ];
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -7,16 +7,8 @@
|
||||||
];
|
];
|
||||||
|
|
||||||
networking.hosts = {
|
networking.hosts = {
|
||||||
"10.0.0.183" = [ "headscale.nickiel.net" ];
|
"10.0.0.183" = [ "files.nickiel.net" "git.nickiel.net" "nickiel.net" "jellyfin.nickiel.net" ];
|
||||||
"100.64.0.1" = ["files.nickiel.net" "git.nickiel.net" "nickiel.net" "jellyfin.nickiel.net" ];
|
|
||||||
};
|
};
|
||||||
services.tailscale.enable = true;
|
|
||||||
networking.firewall = {
|
|
||||||
checkReversePath = "loose";
|
|
||||||
trustedInterfaces = [ "tailscale0" ];
|
|
||||||
allowedUDPPorts = [ config.services.tailscale.port ];
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
services.xserver.videoDrivers = [ "nvidia" ];
|
services.xserver.videoDrivers = [ "nvidia" ];
|
||||||
hardware.opengl.enable = true;
|
hardware.opengl.enable = true;
|
||||||
|
@ -34,22 +26,11 @@
|
||||||
efiSysMountPoint = "/boot";
|
efiSysMountPoint = "/boot";
|
||||||
};
|
};
|
||||||
grub = {
|
grub = {
|
||||||
enable = true;
|
|
||||||
devices = [ "nodev" ];
|
devices = [ "nodev" ];
|
||||||
efiSupport = true;
|
efiSupport = true;
|
||||||
useOSProber = false;
|
enable = true;
|
||||||
|
useOSProber = true;
|
||||||
extraEntries = ''
|
extraEntries = ''
|
||||||
menuentry 'Windows Boot Manager (on /dev/sda2)' --class windows --class os $menuentry_id_option 'osprober-efi-6877-BD74' {
|
|
||||||
insmod part_gpt
|
|
||||||
insmod fat
|
|
||||||
set root='hd0,gpt2'
|
|
||||||
if [ x$feature_platform_search_hint = xy ]; then
|
|
||||||
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2 6877-BD74
|
|
||||||
else
|
|
||||||
search --no-floppy --fs-uuid --set=root 6877-BD74
|
|
||||||
fi
|
|
||||||
chainloader /efi/Microsoft/Boot/bootmgfw.efi
|
|
||||||
}
|
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ config, ... }:
|
{ ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
|
@ -8,17 +8,10 @@
|
||||||
hardware.bluetooth.enable = true;
|
hardware.bluetooth.enable = true;
|
||||||
|
|
||||||
networking.hosts = {
|
networking.hosts = {
|
||||||
"10.0.0.183" = [ "headscale.nickiel.net" ];
|
"10.0.0.183" = [ "files.nickiel.net" "git.nickiel.net" "nickiel.net" "jellyfin.nickiel.net" ];
|
||||||
"100.64.0.1" = ["files.nickiel.net" "git.nickiel.net" "nickiel.net" "jellyfin.nickiel.net" ];
|
|
||||||
};
|
};
|
||||||
services.tailscale.enable = true;
|
|
||||||
networking.firewall = {
|
|
||||||
checkReversePath = "loose";
|
|
||||||
trustedInterfaces = [ "tailscale0" ];
|
|
||||||
allowedUDPPorts = [ config.services.tailscale.port ];
|
|
||||||
};
|
|
||||||
time.hardwareClockInLocalTime = true;
|
|
||||||
|
|
||||||
|
time.hardwareClockInLocalTime = true;
|
||||||
|
|
||||||
boot.loader = {
|
boot.loader = {
|
||||||
efi = {
|
efi = {
|
||||||
|
|
|
@ -2,12 +2,6 @@
|
||||||
let
|
let
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
# Required clipboard provider
|
|
||||||
xclip
|
|
||||||
];
|
|
||||||
|
|
||||||
programs.nixvim = {
|
programs.nixvim = {
|
||||||
enable = true;
|
enable = true;
|
||||||
viAlias = true;
|
viAlias = true;
|
||||||
|
@ -15,7 +9,6 @@ in
|
||||||
|
|
||||||
globals = {
|
globals = {
|
||||||
mapleader = " ";
|
mapleader = " ";
|
||||||
clipboard = "unnamedplus";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
|
@ -29,26 +22,13 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
# https://github.com/pupbrained/nix-config/blob/29af4835f21940af51b86313c451fb572a29874a/pkgs/nixvim.nix#L8
|
# https://github.com/pupbrained/nix-config/blob/29af4835f21940af51b86313c451fb572a29874a/pkgs/nixvim.nix#L8
|
||||||
maps.normal = {
|
# maps.
|
||||||
"<leader>ot" = "<cmd>vs | te<cr>";
|
|
||||||
"<leader>o." = "<cmd>Telescope file_browser<cr>";
|
|
||||||
"<leader>op" = "<cmd>NvimTreeToggle<cr>";
|
|
||||||
};
|
|
||||||
|
|
||||||
plugins = {
|
plugins = {
|
||||||
telescope = {
|
telescope = {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
nvim-tree = {
|
|
||||||
enable = true;
|
|
||||||
openOnSetup = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
presence-nvim = {
|
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
treesitter = {
|
treesitter = {
|
||||||
enable = true;
|
enable = true;
|
||||||
folding = true;
|
folding = true;
|
||||||
|
@ -108,7 +88,6 @@ in
|
||||||
extraConfigLua = builtins.readFile ./../rsrcs/nvim.lua;
|
extraConfigLua = builtins.readFile ./../rsrcs/nvim.lua;
|
||||||
extraPlugins = with pkgs.vimPlugins;
|
extraPlugins = with pkgs.vimPlugins;
|
||||||
[
|
[
|
||||||
telescope-file-browser-nvim
|
|
||||||
monokai-pro-nvim
|
monokai-pro-nvim
|
||||||
nvim-lspconfig
|
nvim-lspconfig
|
||||||
hop-nvim
|
hop-nvim
|
||||||
|
|
|
@ -125,7 +125,7 @@ hop.setup {
|
||||||
keys = 'etovxqpdygfblzhckisuran',
|
keys = 'etovxqpdygfblzhckisuran',
|
||||||
}
|
}
|
||||||
local directions = require('hop.hint').HintDirection
|
local directions = require('hop.hint').HintDirection
|
||||||
vim.keymap.set('', '<leader>ff', function()
|
vim.keymap.set('', '<C-f>', function()
|
||||||
hop.hint_patterns({ multi_windows = true, current_line_only = false })
|
hop.hint_patterns({ multi_windows = true, current_line_only = false })
|
||||||
end, {remap=true})
|
end, {remap=true})
|
||||||
|
|
||||||
|
@ -178,6 +178,3 @@ require("monokai-pro").setup({
|
||||||
})
|
})
|
||||||
|
|
||||||
vim.cmd.colorscheme "monokai-pro-spectrum"
|
vim.cmd.colorscheme "monokai-pro-spectrum"
|
||||||
|
|
||||||
require("telescope").load_extension "file_browser"
|
|
||||||
|
|
||||||
|
|
|
@ -20,11 +20,11 @@ in
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
../modules/discord.nix
|
../modules/discord.nix
|
||||||
#../modules/emacs.nix
|
../modules/emacs.nix
|
||||||
../modules/fusuma.nix
|
../modules/fusuma.nix
|
||||||
../modules/git.nix
|
../modules/git.nix
|
||||||
../modules/neovim.nix
|
|
||||||
../modules/rofi.nix
|
../modules/rofi.nix
|
||||||
|
../modules/neovim.nix
|
||||||
../modules/wezterm.nix
|
../modules/wezterm.nix
|
||||||
../modules/xdg.nix
|
../modules/xdg.nix
|
||||||
../modules/zsh.nix
|
../modules/zsh.nix
|
||||||
|
@ -81,7 +81,6 @@ in
|
||||||
flameshot # screenshot utility
|
flameshot # screenshot utility
|
||||||
fontpreview # utility to preview fonts
|
fontpreview # utility to preview fonts
|
||||||
gitui # command line git tui
|
gitui # command line git tui
|
||||||
helvum # audio sink gui control
|
|
||||||
pandoc # utility for converting between document types
|
pandoc # utility for converting between document types
|
||||||
qmk # QMK utility for compiling qmk firmware
|
qmk # QMK utility for compiling qmk firmware
|
||||||
nextcloud-client # Nextcloud private syncing
|
nextcloud-client # Nextcloud private syncing
|
||||||
|
|
Loading…
Reference in a new issue