First commit

This commit is contained in:
2025-09-13 02:38:36 -04:00
commit fec0c2a09f
32 changed files with 1321 additions and 0 deletions

14
modules/home/default.nix Normal file
View File

@@ -0,0 +1,14 @@
{
...
}:
{
imports = [
./firefox.nix
./git.nix
./nvf.nix
./packages.nix
./plasma.nix
# ./vscode.nix
./zsh.nix
];
}

118
modules/home/firefox.nix Normal file
View File

@@ -0,0 +1,118 @@
{
config,
pkgs,
...
}:
{
programs.firefox = {
enable = true;
languagePacks = [ "en-US" ];
nativeMessagingHosts = with pkgs; [
kdePackages.plasma-browser-integration
];
policies = {
DefaultDownloadDirectory = config.xdg.userDirs.download;
DisableFirefoxAccounts = true;
DisableFirefoxStudies = true;
DisablePocket = true;
DisableProfileImport = true;
DisableProfileRefresh = true;
DisableTelemetry = true;
DontCheckDefaultBrowser = true;
EnableTrackingProtection = {
Value = true; # Tracking protection is enabled by default in both the regular browser and private browsing
Locked = true; # Whether or not a user can change tracking protection
Cryptomining = true; # Block cryptomining scripts
Fingerprinting = true; # Block fingerprinting scripts
EmailTracking = true; # Block email tracking pixels and scripts
};
FirefoxHome = {
Search = true;
TopSites = true;
SponsoredTopSites = false;
Highlights = false;
Pocket = false;
Stories = false;
SponsoredPocket = false;
SponsoredStories = false;
Snippets = true;
Locked = true;
};
FirefoxSuggest = {
WebSuggestions = true;
SponsoredSuggestions = false;
ImproveSuggest = false;
Locked = true;
};
Homepage = {
URL = "http://100.78.212.35:30054";
Locked = true;
StartPage = "homepage";
};
OfferToSaveLogins = false;
OverrideFirstRunPage = "";
PasswordManagerEnabled = false;
PopupBlocking = {
Default = false;
Locked = true;
};
PrimaryPassword = false;
SearchBar = "unified";
ShowHomeButton = true;
SkipTermsOfUse = true;
};
profiles.eclypse = {
name = "Eclypse";
isDefault = true;
extensions = {
force = true;
packages = with pkgs.nur.repos.rycee.firefox-addons; [
ublock-origin
bitwarden
plasma-integration
];
settings = {
"uBlock0@raymondhill.net".settings = {
selectedFilterLists = [
"ublock-filters"
"ublock-badware"
"ublock-privacy"
"ublock-unbreak"
"ublock-quick-fixes"
];
};
};
};
search = {
default = "google";
engines = {
nix-packages = {
name = "Nix Packages";
urls = [
{
template = "https://search.nixos.org/packages";
params = [
{
name = "channel";
value = "unstable";
}
{
name = "query";
value = "{searchTerms}";
}
];
}
];
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = [ "@np" ];
};
};
};
settings = {
# Auto-enable extensions
"extensions.autoDisableScopes" = 0;
};
};
};
}

15
modules/home/git.nix Normal file
View File

@@ -0,0 +1,15 @@
{
...
}:
{
programs.git = {
enable = true;
userName = "Eclypsed";
userEmail = "Ec1ypsed@proton.me";
extraConfig = {
init = {
defaultBranch = "main";
};
};
};
}

125
modules/home/nvf.nix Normal file
View File

@@ -0,0 +1,125 @@
{
inputs,
pkgs,
host,
...
}:
{
imports = [
inputs.nvf.homeManagerModules.default
];
programs.nvf = {
enable = true;
settings = {
vim = {
viAlias = false;
vimAlias = true;
options = {
wrap = false;
};
lsp = {
enable = true;
formatOnSave = true;
inlayHints.enable = true;
};
treesitter = {
enable = true;
indent.enable = true;
};
statusline.lualine.enable = true;
telescope.enable = true;
autocomplete.blink-cmp.enable = true;
# Auto-close (, ", `, etc.
mini.pairs = {
enable = true;
};
# File explorer
filetree.neo-tree = {
enable = true;
};
# Formatting files
formatter.conform-nvim = {
enable = true;
setupOpts = {
};
};
binds = {
whichKey.enable = true;
};
keymaps = [
{
key = "<C-e>";
mode = [ "n" ];
silent = true;
action = "<cmd>Neotree toggle<CR>";
}
];
theme = {
enable = true;
name = "catppuccin";
style = "mocha";
};
languages = {
enableTreesitter = true;
enableFormat = true;
nix = {
enable = true;
format = {
enable = true;
package = pkgs.nixfmt;
type = "nixfmt";
};
lsp = {
enable = true;
package = pkgs.nixd;
server = "nixd";
options = {
nixos = {
expr = "(builtins.getFlake (builtins.toString ./.)).nixosConfigurations.${host}.options";
};
home-manager = {
expr = "(builtins.getFlake (builtins.toString ./.)).nixosConfigurations.${host}.options.home-manager.users.type.getSubOptions []";
};
};
};
treesitter.enable = true;
};
python = {
enable = true;
dap = {
enable = true;
debugger = "debugpy";
};
format = {
enable = true;
type = "black-and-isort";
};
lsp = {
enable = true;
};
treesitter.enable = true;
};
};
utility = {
sleuth.enable = true;
};
};
};
};
}

25
modules/home/packages.nix Normal file
View File

@@ -0,0 +1,25 @@
{
pkgs,
...
}:
{
home.packages = with pkgs; [
zoom-us
devenv
discord
sqlitebrowser
drawio
# Libre Office
libreoffice-qt
hunspell
hunspellDicts.en_US
# KDE
kdePackages.kate
# CD Stuff
picard
heybrochecklog
];
}

45
modules/home/plasma.nix Normal file
View File

@@ -0,0 +1,45 @@
{
inputs,
...
}:
{
imports = [
inputs.plasma-manager.homeModules.plasma-manager
];
programs = {
plasma = {
enable = true;
kscreenlocker = {
appearance = {
wallpaper = ../../wallpapers/lanterns_of_twilight.png;
};
};
workspace = {
lookAndFeel = "org.kde.breezedark.desktop";
wallpaper = ../../wallpapers/lanterns_of_twilight.png;
wallpaperFillMode = "preserveAspectCrop";
};
};
konsole = {
enable = true;
defaultProfile = "Jade";
profiles = {
jade = {
name = "Jade";
font = {
name = "FiraCode";
};
extraConfig = {
Appearance = {
WordMode = true;
};
};
};
};
};
};
}

65
modules/home/vscode.nix Normal file
View File

@@ -0,0 +1,65 @@
{
pkgs,
# pkgs-stable,
...
}:
# let
# ms-python-stable = pkgs-stable.vscode-extensions.ms-python;
# in
{
programs.vscode = {
enable = true;
package = pkgs.vscode-fhs;
profiles = {
default = {
enableExtensionUpdateCheck = false;
enableUpdateCheck = false;
extensions = with pkgs.vscode-extensions; [
# General
pkief.material-icon-theme
ritwickdey.liveserver
aaron-bond.better-comments
yzane.markdown-pdf
# Nix
bbenoist.nix
jnoortheen.nix-ide
# Python
# ms-python-stable.python
# ms-python-stable.vscode-pylance
# ms-python-stable.debugpy
# ms-python-stable.black-formatter
# ms-python-stable.isort
# ms-python.python # Currently broken, need to manually install
# ms-python.black-formatter
# ms-python.isort
# Rust
rust-lang.rust-analyzer
# Typescript / WebDev
esbenp.prettier-vscode
yoavbls.pretty-ts-errors
svelte.svelte-vscode
];
userSettings = {
# General
"workbench.iconTheme" = "material-icon-theme";
# Python
"[python]" = {
"editor.defaultFormatter" = "ms-python.black-formatter";
"editor.formatOnSave" = true;
"editor.codeActionsOnSave" = {
"source.organizeImports" = "explicit";
};
};
"isort.args" = [ "--profile" "black" ];
"python.analysis.typeCheckingMode" = "strict";
"python.languageServer" = "Pylance";
};
};
};
};
}

29
modules/home/zsh.nix Normal file
View File

@@ -0,0 +1,29 @@
{
pkgs,
...
}:
{
programs = {
direnv = {
enable = true;
enableZshIntegration = true;
};
kitty = {
enable = true;
enableGitIntegration = true;
font = {
name = "FiraCode Nerd Font";
package = pkgs.nerd-fonts.fira-code;
};
shellIntegration = {
enableZshIntegration = true;
};
};
zsh = {
enable = true;
enableCompletion = true;
autosuggestion.enable = true;
syntaxHighlighting.enable = true;
};
};
}

View File

@@ -0,0 +1,8 @@
{
...
}:
{
nixpkgs.overlays = [
(import ./heybrochecklog.nix)
];
}

View File

@@ -0,0 +1,45 @@
self: super: with super.python3Packages;
let
pprp = buildPythonPackage rec {
pname = "pprp";
version = "0.2.7";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-2ednecxSsJONvH9XJ6GV3ExgdcPrUEAlYRpZt2Nrkw0=";
};
format = "setuptools";
doCheck = false;
};
in
{
heybrochecklog = buildPythonApplication {
pname = "heybrochecklog";
version = "1.4.7";
src = super.fetchurl {
url = "https://github.com/doujincafe/hbcl/releases/download/v1.4.7/heybrochecklog-1.4.7.tar.gz";
sha256 = "sha256-nCJJvzw/BoCEGDIX62zZr1ZI/b0W5nnFOZlMw4Btcnw=";
};
format = "pyproject";
doCheck = false;
nativeBuildInputs = [
poetry-core
];
propagatedBuildInputs = [
faust-cchardet
chardet
pprp
];
postPatch = ''
substituteInPlace pyproject.toml \
--replace 'poetry.masonry.api' 'poetry.core.masonry.api' \
--replace 'poetry>=' 'poetry-core>='
'';
};
}

20
modules/system/agenix.nix Normal file
View File

@@ -0,0 +1,20 @@
{
inputs,
pkgs,
...
}:
{
imports = [
inputs.agenix.nixosModules.default
];
environment.systemPackages = [
inputs.agenix.packages.${pkgs.system}.default # CLI Tool
];
age.secrets = {
tailscale-auth.file = ../../secrets/tailscale-auth.age;
eclypsecloud-eclypse.file = ../../secrets/eclypsecloud-eclypse.age;
eclypse-password.file = ../../secrets/eclypse-password.age;
};
}

14
modules/system/boot.nix Normal file
View File

@@ -0,0 +1,14 @@
{
...
}:
{
boot = {
loader = {
systemd-boot = {
enable = true;
configurationLimit = 10;
};
efi.canTouchEfiVariables = true;
};
};
}

View File

@@ -0,0 +1,18 @@
{
...
}:
{
imports = [
./agenix.nix
./boot.nix
./fileSystems.nix
./fonts.nix
./network.nix
./packages.nix
./security.nix
./services.nix
./system.nix
./tailscale.nix
./user.nix
];
}

View File

@@ -0,0 +1,40 @@
{
pkgs,
config,
...
}:
let
automount_opts = [
"x-systemd.automount"
"x-systemd.idle-timeout=60"
"x-systemd.device-timeout=5s"
"x-systemd.mount-timeout=5s"
"noauto"
"user"
"users"
];
in
{
fileSystems = {
"/mnt/EclypseCloud" = {
device = "//100.78.212.35/EclypseCloud";
fsType = "cifs";
options = [
"credentials=${config.age.secrets.eclypsecloud-eclypse.path}"
"uid=${toString config.users.users.eclypse.uid}"
"rw"
] ++ automount_opts;
};
"/mnt/Music" = {
device = "//100.78.212.35/music";
fsType = "cifs";
options = [
"credentials=${config.age.secrets.eclypsecloud-eclypse.path}"
"uid=${toString config.users.users.eclypse.uid}"
"rw"
] ++ automount_opts;
};
};
environment.systemPackages = with pkgs; [ cifs-utils ];
}

13
modules/system/fonts.nix Normal file
View File

@@ -0,0 +1,13 @@
{
pkgs,
...
}:
{
fonts = {
enableDefaultPackages = true;
fontconfig.enable = true;
packages = with pkgs; [
fira-code
];
};
}

View File

@@ -0,0 +1,23 @@
{
host,
...
}:
{
networking = {
hostName = "${host}"; # Define your hostname
# Pick only one of the below networking options.
# wireless.enable = true; # Enables wireless support via wpa_supplicant.
networkmanager.enable = true; # Easiest to use and most distros use this by default.
# Configure network proxy if necessary
# proxy.default = "http://user:password@proxy:port/";
# proxy.noProxy = "127.0.0.1,localhost,internal.domain";
# Open ports in the firewall.
# firewall.allowedTCPPorts = [ ... ];
# firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
# firewall.enable = false;
};
}

View File

@@ -0,0 +1,48 @@
{
inputs,
pkgs,
...
}:
{
imports = [
inputs.nur.modules.nixos.default # Adds the NUR overlay
../overlays
];
programs = {
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
# mtr.enable = true;
# gnupg.agent = {
# enable = true;
# enableSSHSupport = true;
# };
zsh.enable = true;
};
nixpkgs = {
# ? For some reason, doing config.allowUnfree does not work
# ? Maybe becuase it's not an explicit option?
# ? https://search.nixos.org/options?channel=25.05&show=nixpkgs.config&query=nixpkgs.config
config = {
allowUnfree = true;
};
};
# List packages installed in system profile. To search, run:
# $ nix search wget
environment = {
pathsToLink = [ "/share/zsh" ];
systemPackages = with pkgs; [
vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
git
# (catppuccin-sddm.override {
# flavor = "mocha";
# accent = "pink";
# font = "FiraCode";
# background = "${../../wallpapers/lanterns_of_twilight.png}";
# loginBackground = true;
# })
];
};
}

View File

@@ -0,0 +1,8 @@
{
...
}:
{
security = {
rtkit.enable = true;
};
}

View File

@@ -0,0 +1,56 @@
{
...
}:
{
services = {
xserver = {
# Enable the X11 windowing system.
# You can disable this if you're only using the Wayland session.
enable = true;
# Configure keymap in X11
xkb = {
layout = "us";
variant = "";
};
# Enable touchpad support (enabled default in most desktopManager).
# libinput.enable = true;
};
# Enable the KDE Plasma Desktop Environment.
displayManager.sddm = {
enable = true;
# theme = "catppuccin-mocha-pink";
};
desktopManager.plasma6.enable = true;
# Enable CUPS to print documents.
printing.enable = true;
# Enable sound with pipewire.
pulseaudio.enable = false;
pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
# If you want to use JACK applications, uncomment this
# jack.enable = true;
# use the example session manager (no others are packaged yet so this is enabled by default,
# no need to redefine it in your config for now)
# media-session.enable = true;
};
# Enable the OpenSSH daemon. (Look into Fail2Ban in the future)
openssh = {
enable = true;
settings = {
PasswordAuthentication = false;
PermitRootLogin = "prohibit-password";
AllowUsers = [ "eclypse" ];
};
};
};
}

70
modules/system/system.nix Normal file
View File

@@ -0,0 +1,70 @@
{
inputs,
...
}:
{
nix = {
nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
settings = {
experimental-features = [
"nix-command"
"flakes"
];
substituters = [
"https://cache.nixos.org"
"https://nix-community.cachix.org"
"https://devenv.cachix.org"
];
trusted-public-keys = [
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw="
];
};
};
# Set your time zone.
time.timeZone = "America/New_York";
# Select internationalisation properties.
i18n = {
defaultLocale = "en_US.UTF-8";
extraLocaleSettings = {
LC_ADDRESS = "en_US.UTF-8";
LC_IDENTIFICATION = "en_US.UTF-8";
LC_MEASUREMENT = "en_US.UTF-8";
LC_MONETARY = "en_US.UTF-8";
LC_NAME = "en_US.UTF-8";
LC_NUMERIC = "en_US.UTF-8";
LC_PAPER = "en_US.UTF-8";
LC_TELEPHONE = "en_US.UTF-8";
LC_TIME = "en_US.UTF-8";
};
};
# Select internationalisation properties.
# console = {
# font = "Lat2-Terminus16";
# keyMap = "us";
# useXkbConfig = true; # use xkb.options in tty.
# };
# 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.
#
# Most users should NEVER change this value after the initial install, for any reason,
# even if you've upgraded your system to a new NixOS release.
#
# This value does NOT affect the Nixpkgs version your packages and OS are pulled from,
# so changing it will NOT upgrade your system - see https://nixos.org/manual/nixos/stable/#sec-upgrading for how
# to actually do that.
#
# This value being lower than the current NixOS release does NOT mean your system is
# out of date, out of support, or vulnerable.
#
# Do NOT change this value unless you have manually inspected all the changes it would make to your configuration,
# and migrated your data accordingly.
#
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
system.stateVersion = "25.05"; # Did you read the comment?
}

View File

@@ -0,0 +1,31 @@
{
config,
pkgs,
...
}:
{
services.tailscale = {
enable = true;
useRoutingFeatures = "client";
authKeyFile = config.age.secrets.tailscale-auth.path;
# * Only applied if `authKeyFile` is specified
extraUpFlags = [
"--ssh"
"--accept-routes=true"
];
extraSetFlags = [
"--operator=eclypse"
];
};
# Taildrop
systemd.user.services.taildrop = {
description = "Taildrop File Receiver Service";
wantedBy = [ "default.target" ];
serviceConfig = {
Type = "simple";
ExecStart = "${pkgs.bash}/bin/bash -c '${pkgs.tailscale}/bin/tailscale file get --verbose --loop $HOME/Downloads/'";
};
};
}

41
modules/system/user.nix Normal file
View File

@@ -0,0 +1,41 @@
{
inputs,
pkgs,
host,
config,
...
}:
{
imports = [ inputs.home-manager.nixosModules.home-manager ];
home-manager = {
useUserPackages = true;
useGlobalPkgs = true;
extraSpecialArgs = { inherit inputs host; };
users.eclypse = {
imports = [ ../home ];
home = {
username = "eclypse";
homeDirectory = "/home/eclypse";
stateVersion = "25.05";
};
programs.home-manager.enable = true;
};
backupFileExtension = "backup3";
};
users.mutableUsers = false;
users.users.eclypse = {
isNormalUser = true;
uid = 1000;
description = "Eclypse";
extraGroups = [
"networkmanager"
"wheel"
];
hashedPasswordFile = config.age.secrets.eclypse-password.path;
shell = pkgs.zsh;
};
}