Giter Club home page Giter Club logo

nixos-config's Introduction

nix & nixOS Configuration / Linux Config

The spiciest config on the market ๐Ÿ˜ณ๐Ÿฅต๐Ÿ’ฆ

My reproducible nix Configuration & other configuration files.
More Documentation (for myself) about nixOS in my TechNotes Repo.

It has my personal configuration for my Lenovo Legion laptop(hyrulecastle), my MS Surface Pro 7(kakariko) and my Oracle aarch64 server(skyloft).

Installing on a new computer

  • You might need to create the home manager folder manually mkdir ~/.local/state/nix/profiles

  • Yo'll have to find the syncthing ID by going to http://127.0.0.1:8384, getting the ID, and adding it in the syncthing config

  • You'll have to add the new machine public key to the secrets for agenix with cat /etc/ssh/ssh_host_rsa_key.pub and add it in the secrets/secrets.nix and rekey the keys cd ~/.setup/secrets and agenix --rekey.

  • Right click on wastebin and configure to delete trash after 7 days, still don't know how to declare this.

  • nix-on-droid: install my flake in app by adding the normal packages and running nix-shell -p git --run "nix-on-droid --flake github:Yeshey/nixOS-Config#nix-on-droid switch"
    Then send the ssh keys through adb, connect adb and on your nixOS PC send the keys with:

      nix-shell -p android-tools --run "sudo adb root; sudo adb push /home/yeshey/.ssh/my_identity /data/data/com.termux.nix/files/home/.ssh/my_identity"
    
      nix-shell -p android-tools --run "sudo adb root; sudo adb push /home/yeshey/.ssh/my_identity.pub /data/data/com.termux.nix/files/home/.ssh/my_identity.pub"
    
      nix-shell -p android-tools --run "sudo adb root; sudo adb push /home/yeshey/.ssh/config /data/data/com.termux.nix/files/home/.ssh/config"

Credits

Highlights:

  • Structure

    • Separation of home manager and nixOS system configuration through a myHome and mySystem modules so it could also be deployed on a home-manager only system the same way LongerHV's nixos-configuration is set up;

    • Unstable packages available at pkgs.unstable.<package>, NUR packages available at pkgs.nur.<package> using overlays. Check Misterio77's standard nix-starter-configs for getting started with this structure.

  • Auto Upgrades On Shutdown - Setting auto upgrades on my desktop PC only on shutdown once every week: autoUpgradesOnShutdown.nix;

  • Syncthing - Declaratively set syncthing, including ignore patterns with userActivationScripts (TODO: set syncthing as a home manager service): syncthing.nix;

  • LUKS on LVM with LVM cache - cache on an SSD for a partition on a microSD on kakariko: boot.nix, my guide on doing this in my TechNotes;

  • pci-passthrough - for passing my NVIDIA GeForce RTX 2060 Mobile to a virt-manager VM and using my intel processor for the host: pci-passthrough.nix, but better yet:

  • VGPU - Unlocked VGPU functionality on my consumer nvidia card: vgpu.nix. Using my module, more details there: nixos-nvidia-vgpu;

  • i2p firefox profile - Home manager auto creates a firefox profile able to access the hidden i2p net when services.i2p.enable is enabled on the host, and makes a .desktop file for easy access, i2pFirefoxProfile option: firefox.nix;

  • Safe-rm - I nuked my PC once by running sudo rm -r /* isntead of sudo -r rm ./*, so i decided to change all my rm calls to safe-rm calls through changing the binary and adding aliases, both in myHome: safe-rm.nix; and in mySystem: safe-rm.nix;

  • OneDriver - home-manager module for onedriver that auto clears cache every 3 days, but Microsoft(๐Ÿซ ) changed the user storage limits, so now we only have 100GB per user instead of 1TB (for my uni account), so it's not as worth anymore ๐Ÿฅฒ, they were just reeling companies in before pulling the rug out, of course: onedriver.nix. Also has a agenix module that adds the json with the credentials to the right place, and takes into account the auto cleanups: onedriver.nix;

  • Substituters - Uses a bunch of substituters for extra caches to hopefully make rebuilds faster: default.nix. Also in my module to activate when home manager is used standalone (untested): non-nixos.nix;

  • Agenix - Using agenix both at system (mySystem - default.nix): and at user (myHome - default.nix) levels, they grab secrets from /secrets.

  • VSCodium - Visual Studio Codium, the open source version of VSC, configuration settings propagated to appropriate locations for VScodium, VSCode and openvscode-server, has a bunch of extensions and configuration for latex nix language server, settings for special characters to work with starship theme in terminal, java, etc: vscodium/default.nix

Gallery

HyruleCastle

hyrulecastle

Kakariko

kakariko

ย 

ย 

ย 

story.md ๐Ÿฅ€

nixos-config's People

Contributors

yeshey avatar

Stargazers

Alex Romanov avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.