lehmanator / nix-configs Goto Github PK
View Code? Open in Web Editor NEWPersonal Nix / NixOS configs
Personal Nix / NixOS configs
neovim
& zsh
zsh
tmuxinator
session configs
tmux
on new shellSee:
hm/profiles/editor/neovim/plugins/gitsigns.nix
Import home-manager configurations by using flake outputs instead of relative paths.
homeConfigurations.<user> = homeManagerConfiguration {
extraSpecialArgs = { inherit inputs self; user="<user>"; };
modules = [ ./hm/users/<user> ];
};
nixosConfigurations.<host> = nixosSystem {
specialArgs = { inherit inputs self; user="<user>";
modules = [
({...}: {
home-manager.users.<user> = self.homeConfigurations.<user>;
})
];
};
Notes:
homeConfigurations
? Would be nice to define:
homeConfigurations."<user>"
homeConfigurations."<user>@<host>"
homeConfigurations
nixpkgs.config
options to all nixpkgs
channelsnixpkgs
channelsnix repl
on steriods.{a = import ./a.nix; b = import ./b.nix; }
nixpkgs
version.NIX_PATH
from inputs./etc/nix/inputs
hostDefaults
:
system
channelName
(of nixpkgs
)extraArgs
(i.e. specialArgs
of nixosSystem
)modules
output
(flake output config goes to: i.e. nixosConfigurations
/darwinConfigurations
/homeConfigurations
builder
(e.g. nixos.lib.nixosSystem
)Quick-n-dirty method:
flake.nix
current outputs
attr with flake-parts.lib.mkFlake
outputs
attrs inside flake
attr of mkFlake
arg attrset.outputs
one-by-one.Use flakeModules
:
inputs.devshells.flakeModule
(numtide/devshells
)inputs.agenix-shell.flakeModule
inputs.treefmt-nix.flakeModule
inputs.precommit-nix.flakeModule
inputs.hercules-ci.flakeModule
To-Dos:
GITHUB_TOKEN
from per-host sops-nix
to agenix-shell
devShells.nix
for Nix-based repos.devShells.nixos
for NixOS config repos.May be possible to tackle:
.iso
images that can partition themselves.Does mobile-nixos
or disko
use this on the backend? If not:
Is this work using over nix-community/disko
?
Should I re-implement nix-community/disko
using these tools?
systemd
tool integration is desirable for compatibility.
Likely will be able to more easily adopt other systemd
utils (like systemd-homed
, systemd-cryptsetup
, systemd-cryptenroll
, systemd-sysext
).
Should I re-implement NixOS/mobile-nixos
using this?
Implement "discoverable partitions spec"?
The ansi
theme is the bat
theme that best handles both light/dark mode in the terminal.
Adjustments:
white
-> medium-dark grayRecolor UI Elements:
numbers
- Line numbersrule
- File delimitersgrid
- Lines separating sidebar & header from contentAll Elements:
Use error/warning glyphs
Git changes don't change line number color
Highlight current line number
Extend cursorline highlights into gutter
Lightbulb either in-line with code or in gutter, but not both.
Big restructure to load many things via POPs
(Pure Object Prototypes) using GTrunSec/omnibus
& divnix/hive
Why:
-Configurations
, -Profiles
, -Suites
, -Modules
, etc.std
/hive
.Goals:
paisano
TUI.TODO: Add more info to this issue.
services.nginx.tailscaleAuth.enable
Attributes for NixOS systems: nixosConfigurations.<name>.config
.iso
: formats.install-iso-hyperv
system.build.top-level
mobile.outputs.android.android-fastboot-images
formats.sd-aarch64
& formats.sd-aarch64-installer
Requirements:
main
programs.nixvim
prefix from all options in nixvim
/neovim
profilesnixvim
config with makeNixvimConfigWithModules
(or whatever the function name is`.home-manager
config.devShells.*
devShells
, home-manager
, or NixOS system?Run on:
Run: nix flake check
nixosConfigurations
: fw
, fajita
, & installer
statix
deadnix
NetworkManager
config to setup network.Hello I just want to know that does defining the bash history file location to .local/share/bash/bash_history do change the location of the file cuz I have also defined it and and clearly see that no folder under the name "bash" in .local/share has been made and the history only shows up on the current terminal session and gets wiped after closing the terminal. Is this also an issue with you or how are you doing it? cuz I can't figure out what to do.
Problems:
access-tokens
in nix.conf
expires, updating NixOS configs to use the new token becomes a pain because nixos-rebuild
wants to fetch data from the GitHub API using the expired token, which fails.access-tokens = github.com=
Possible Solutions:
nixos-rebuild
nixos-rebuild
CLI flag/option to specify one of:
nix.conf
option access-tokens
nix.conf
to run command with?Module: nixosModules.git-tokens
access-tokens
for expiration/revocation before expiration dateaccess-tokens
automatically. Terranix?Module: flakeModules.git-repo-self
nixosConfigurations
with configs to use the tokens/secrets.Parent option: power.ups
Services:
power.ups.upsd
power.ups.upsmon
power.ups.apcupsd
Figure out which service best meets my needs.
Needs:
System: environment.etc."nixos".source = inputs.self;
Home: xdg.configFile."nixos".source = inputs.self
;
Also do this on the nixosConfiguration
for installer images.
firefox-gnome-theme
adaptive-tab-bar-color
firefox-csshacks
firefox-sidebar
firefox-rounded
thunderbird-gnome-theme
tab-preview-on-hover
Many found in fzf
repo: junegunn/fzf
pkgs.writeShellApplication
Example:
fzf-ps = pkgs.writeShellApplication {
name = "fzf-ps";
runtimeInputs = [
pkgs.fzf
pkgs.ps
];
text = ''
ps | fzf
#curl -s 'https://nixos.org' | w3m -dump -T text/html
'';
}
Instead of importing the user profile root into the modules
section of lib.nixosSystem
via ./users/${user}
, import inputs.self.homeConfigurations.${user}
.
Possible to override/extend existing homeConfigurations
?
e.g. homeConfigurations.sam
vs homeConfigurations."sam@fw"
where the latter is refined, extended, overridden, etc. from the former.
... and more.
Using lualine.nvim
with winbar
& tabbar
enabled.
zsh
shell prompt.readline
prompt.tmux
status lines.tmux
statusline instead
user@host
path
a:
b:
c:
x: user@host
,
y: path
, filename
z: branch
, changes
a: mode
b:
c:
dianostic-messages
dianostic-count
x:
y:
z: progress
, position
Features:
Extra:
Discord Rich Presence:
plugins.neocord.enable = true
home.packages = [
pkgs.gtkcord4
];
Make Firefox config less complex & reduce number of files config is spread across.
home-manager
config works as standalone (on non-NixOS systems)home-manager
inherits/overrides system config.base
(to be extended by all other profiles)gnome
, kde
that use DE-specific settings & styles.default
(to match profile of current desktop)hardened
(default
+ hardening settings that might be inconvenient to use in default profile)tor-browser
(match Tor browser settings)adnauseum
| ublock-origin
(ad-blocking)behind-the-overlay-revival
(click to dismiss all overlay popups that block content)bitwarden
| browserpass
| gopass-bridge
| keepassxc-browser
| passff
(password manager & autofill)buster-captcha-solver
(auto-solve captchas)bypass-paywalls-clean
| unpaywall
(bypass paywalls for content)cliget
(allow using FF to login on behalf of CLI programs)cookies-txt
(export cookies for usage in other programs)copy-selected-tabs-to-clipboard
| export-tabs-urls-and-titles
(tab link saving)don-t-fuck-with-paste
| re-enable-right-click
(prevent sites from blocking copy/paste)fastforwardteam
(skip tracking via URL shorteners)firemonkey
| violentmonkey
(userScripts
)fx_cast
(Chromecast Web Sender SDK implementation for FF)hover-zoom-plus
| imagus
(zoom image thumbnails)ipfs-companion
link-gopher
(Extract all links from webpage, sort, dedup, & display in new tab)offline-qr-code-generator
omnisearch
(Supercharge Firefox with commands, shortcuts, and more)overbitewx
(Open Gopher protocol in FF. Requires Floodgap Public Gopher Proxy)profile-switcher
(Create, manage, switch b/w browser profiles)search-engines-helper
sidebery
(Tree style tab sidebar)sponsorblock
tab-counter-plus
tab-session-manager
| tab-stash
wayback-machine
| web-archives
ff2mpv
(Play audio/video in mpv
with native client)firenvim
(FF into Neovim client)gnome-shell-integration
(Use extensions.gnome.org
)gsconnect
(GSConnect)plasma-integration
pywalfox
(Dynamic theming using Pywal colors)textern
(Edit text in favorite external text editor)tridactyl
(Vim in browser)vim-vixen
| vimium
| vimium-c
markdownload
(Web clipper in Markdown using Turndown & Readability.js)video-downloadhelper
enhanced-github
| octotree
| refined-github
(GitHub QoL improvements)laboratory-by-mozilla
(Generate Content Security Policy (CSP) headers for your sites)lovely-forks
(Show GitHub forks)penetration-testing-kit
react-devtools
reduxdevtools
rust-search-extension
sourcegraph
(add code intelligence to GitHub, GitLab, ...)vue-js-devtools
wappalyzer
widegithub
immersive-translate
inkah
(Lookup Chinese/Korean words)lingq-importer2
(Auto import foreign language pages, videos, etc. from web & study w/ LingQ's web/mobile apps)simple-translate
(Translate selected text using DeepL API or Google Translate)to-deepl
consent-o-matic
(auto dismiss consent popups & minimal acceptance)decentraleyes
| localcdn
(cache CDN assets)disable-javascript
| noscript
(disable JS)libredirect
(Redirect shitty services to FOSS frontend proxies)mullvad
(VPN browser extension)multi-account-containers
open-url-in-container
privacy-pass
(privacy-pass anonymous auth protocol support)privacy-possum
(Reduces / falsifies tracking data)private-relay
(Generate email address aliases that forward to your real inbox)skip-redirect
smart-referer
(limit request referer headers)temporary-containers
terms-of-service-didnt-read
ubo-scope
(Measure 3rd-party exposure)umatrix
user-agent-string-switcher
floccus
(Bookmark sync via Nextcloud / WebDAV)wallabagger
(sync w/ wallabag)xbrowsersync
automatic-dark
| dark-mode-webextension
| dark-mode-website-switcher
| darkreader
(dark mode)aw-watcher-web
(provide browser status, history, etc. to ActivityWatch
)stylus
(custom userContent
CSS styles)Missing from rycee's NUR repo.
canvas
elements)programs.firefox.policies
programs.firefox.preferences
programs.firefox.preferencesStatus
programs.firefox.autoConfig
programs.firefox.policies
programs.firefox.profiles.<name>.extensions
programs.firefox.profiles.<name>.settings
(Nix-based user.js
attrs)programs.firefox.profiles.<name>.extraConfig
(Raw user.js
lines)nix-darwin
OptionsBadges:
divnix/std
divnix/hive
zhaofengli/colmena
nix-community/nixos-generators
nix-community/disko
nix-community/home-manager
nixos/nixos-hardware
nixos/mobile-nixos
lehmanator.cachix.org
New Sections:
devShells
agenix
/ sops-nix
nixpkgs
updater / maintainerhandlr
farside
UltimateTrainingModpack
flake-parts
flakeModules
?Problem: Many programs don't support the XDG Base Directory specification. These programs often pollute a user's $HOME
directory or other directories with unwanted files that would be better placed in the appropriate XDG directories.
Solution: Many of these programs can be configured to use alternate files/directories by running the program with CLI options passed, environment variables set, or config files/options set. Wrap these programs with whatever is necessary to get these programs closer to the XDG Base Directory spec.
antidot
rulesantidot
CSVxdg-ninja
program/*.json
filesprogram.<name>.package = pkgs.<name>-xdg-compliant
(or whatever name) to use the wrapped versions while keeping the original programs.xdg-ninja
package / repo / source codeantidot
package / repo / source codepkgs.wrapShellScriptBin
pkgs.wrapShellScript
pkgs.runCommand
pkgs.writeText
pkgs.writeTextFile
pkgs.stdenv
(pkgs.writeScriptBin "htop" ''
#! ${pkgs.bash}/bin/bash
export HTOPRC=${pkgs.writeText "htoprc" ...}
exec ${pkgs.htop}/bin/htop "$@"
'')
writeShellScriptBinAndSymlink = name: text: super.symlinkJoin {
name = name;
paths = [
super."${name}"
(super.writeShellScriptBin name text)
];
};
pkgs.writeShellScriptBin "hello" ''
# Call hello with a traditional greeting
exec ${pkgs.hello}/bin/hello -t
''
pkgs.runCommand "hello" {
buildInputs = [ pkgs.makeWrapper ];
} ''
mkdir $out
# Link every top-level folder from pkgs.hello to our new target
ln -s ${pkgs.hello}/* $out
# Except the bin folder
rm $out/bin
mkdir $out/bin
# We create the bin folder ourselves and link every binary in it
ln -s ${pkgs.hello}/bin/* $out/bin
# Except the hello binary
rm $out/bin/hello
# Because we create this ourself, by creating a wrapper
makeWrapper ${pkgs.hello}/bin/hello $out/bin/hello \
--add-flags "-t"
''
pkgs.symlinkJoin {
name = "hello";
paths = [ pkgs.hello ];
buildInputs = [ pkgs.makeWrapper ];
postBuild = ''
wrapProgram $out/bin/hello \
--add-flags "-t"
'';
}
Figure out which secrets can/should be shared between systems.
Figure out if sops-nix
is a good avenue for keeping sensitive, but not secret data private. (i.e. IP addresses, hostnames, port numbers, anonymous usernames/emails, public keys, etc.)
Method to instantiate any missing secrets automatically.
sops-nix
?.yaml
files for sops
key names & create skeleton .yaml
file for host/user/etc.
Method to insert secrets into strings without adding them to world-readable Nix store & possibly binary caches.
Problem: Unable to use nix search
, nix profile install
, ...
error: unable to download 'true': HTTP error 404
response body:
<html>
<head><title>404 Not Found</title></head>
<body>
<center><h1>404 Not Found</h1></center>
<hr><center>nginx</center>
</body>
</html>
Possible Causes:
nixosModules
from inputs: (Both enabled = conflicts?)
flake-utils-plus
quick-nix-registry
nix.registry
/ nix/registry.json
({hm,nixos}/profiles/nix/registry.nix
)nix.nixPath
/ ``NIX_PATH`environment.etc."nix/inputs"
Working Properly:
/etc/nix/inputs/*
Broken:
~/.config/nix/inputs/*
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.