Code Monkey home page Code Monkey logo

nixfiles's Introduction

nix deploy

my nixOS flake

this is where my configuration for everything is related.

what is included

  • system configuration definitions:
    • my desktop (bastion)
    • my laptop (voyager)
    • my home server (quasar)
    • my steam deck (deck)
    • custom installation/recovery media (nixiso)
  • automatic deployments via github actions and cachix-deploy (also deploy-rs)
  • secrets management via sops-nix
  • custom package definitions
  • custom nixos & home-manager modules and service definitions
    • modules and configurations for many nas/homelab related services
    • configurable base & desktop modules for consistency across systems
    • custom desktop, window manager, cli, and editor configurations
    • modules for software that doesn't exist in nixpkgs/home-manager
  • custom shell, accessible from anywhere with nix develop --impure github:redxtech/nixfiles#remote
    • includes important cli tools
    • configures nix to use flakes and nix-command
    • starship prompt

highlights:

  • multi-system nixOS & home-manager configuration with flake-parts for easy composition
  • rebuild locally with nrs (alias for nh os switch, improved nixos-rebuild), and remotely with nix run .#deploy [<target>|all]
  • deployment secrets using sops-nix
  • mesh networked hosts with tailscale
  • extensively configured window manager (hyprland), cli (fish with custom starship prompt), and editor (neovim)

structure

this section is not updated in-sync with the actual repository, but should give a decent idea of what to expect

  • flake.nix: entrypoint for hosts and home configurations. also exposes a devshell for boostrapping (nix develop).
  • hosts: nixOS Configurations, accessible via nixos-rebuild --flake.
    • common: shared configurations consumed by each host. users, etc.
    • bastion: desktop - 32GB RAM, R9 5900X, RX 7900XT | hyprland
    • voyager: framework 16 - 32GB RAM, R9 7940HS, RX 7700S | hyprland
    • quasar: home server - 32GB RAM, i7 6700K, GTX 970 | headless
    • deck: steam deck - 16 GB RAM, custom AMD APU | steamOS & gnome
  • home: home-manager configuration, acessible via home-manager --flake each host has a file, and there's a shared.nix file for shared configurations.
  • modules: module definitions consumed by the hosts.
    • nixos: nixOS modules, such as custom services, hardware configurations, etc.
      • base, desktop, nas, and backup modules.
    • home-manager: home-manager modules, such as custom desktop, window manager, cli, and editor configurations.
    • flake: flake-parts modules used for composition, such as shells, overlays, nix config, deployments, etc.
  • pkgs: my custom packages. also accessible via nix build. you can compose these into your own configuration by using my flake's overlay (github:redxtech/nixfiles#overlays.default), or consume them through NUR (soon ??).

should I use this ?

learning curve

it's definitely not for everyone, but it happens to be exactly what i've been looking for in a distro. if you're not turned off by the initial learning curve, the cryptic error messages, and the occasional stress-induced-baldness, you might be able to see how powerful nixOS can be.

how to bootstrap

all you need is nix 2.4+, git, and to have already enabled flakes and nix-command, you can also use the command:

nix develop

nixos-rebuild --flake . To build system configurations

home-manager --flake . To build user configurations

nix build (or shell or run) To build and use packages

sops To manage secrets

secrets

for deployment secrets (such as user passwords and server service secrets), I'm using the awesome sops-nix. All secrets are encrypted with my personal PGP key (stored on a YubiKey), as well as the relevant systems's SSH host keys.

tooling and applications I use

most relevant user apps daily drivers:

  • hyprland + hypridle + hyprlock
  • limbo (my custom status bar)
  • neovim
  • fish
  • kitty
  • firefox
  • tailscale
  • podman
  • fuzzel/tofi
  • bat + fd + rg

let me know if you have any questions about them :)

unixpornish stuff

fakebusy clean

this is how my hyprland desktop setup looks (as of july 2024).

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.