• 0 Posts
  • 40 Comments
Joined 2 years ago
cake
Cake day: June 30th, 2023

help-circle
  • Been using Nix for just over a year.

    Seconding to go with flakes. No idea wtf channels are or whatever the previous system was.

    Documentation can be confusing due to changes in paradigms. The bare “nix <scope>” seems to be the most modern oppose to “nix-<scope>” (e.g., nix store vs nix-store). That said, not every feature can be found in the newer variants.

    This can make following tutorials difficult if they aren’t using the same paradigm.

    Getting comfortable with the nix language will be helpful. Its a functional programming language, which is very different than languages like bash.

    Not everything has to be done the nix-way. My nvim files are in the same repo, but I just outOfStoreSymlink them instead of wrapping them in a derivation.

    Some useful packages I like not already shared.

    Disk partitioning: https://github.com/nix-community/disko

    Immutable: https://github.com/nix-community/impermanence - Pretty much resets the system to a new install every boot. Discourages manual tweaks via sudo as they get wiped out. You can still mark certain directories to be persistent (logs, personal documents, steam games, etc.).

    Nvfetcher: https://github.com/berberman/nvfetcher - Nix has a concept of overlays. You can pretty much override anything with .override (module args or inputs) and .overrideAttrs (module attribute set or outputs). Nvfetcher helps with checking different sources so you can override a packages src attribute. Why is this useful? So you can install any version you want and are not bound to nixpkgs. That doesn’t mean the install script in nixpkgs will always work on newer versions, but those can be overridden as well if needed.

    Note that disko, impermanence, and nvfetcher all have a flake.nix in the root of the repo. Those provide ready to go overlays so you don’t have to deal with writing your own which is really nice if you want to latest version without much work when available.




  • Major desktop environments are KDE as you mentioned and Gnome.

    Arch wiki is a good resource even if not running arch. You may want to look into their dotfiles page to back up your settings: https://wiki.archlinux.org/title/Dotfiles.

    NixOS ended up being my distro of choice for reproducible installs but it has a high learning curve and poor documentation so I wouldn’t recommend to start with. That said you can still use Nix on other distros with home manager to manage dotfiles and install non-system apps.

    Distros just pick the default things to install. You can always use the package manager to install something else like a better file manager.

    A lot of choices are simply subjective so its hard to recommend any one distro. Mint is close to windows, based on Ubuntu and uses Gnome. Ubuntu based on Debian I find to be user friendly. Not used a Fedora based distro in ages but there is also Silverblue I’ve heard mentioned positively.

    Distros like Arch and NixOS are more design your own system setups. Pick what you want. I used arch for a bit, but got annoyed at keeping all my systems in sync. Had a huge wiki of all the tweaks I made. Then scripts to automate some of it. I started looking at automation tooling like ansible when I found nix.



  • You probably don’t want the entire terminal rendered in your UI for the reason you gave that it is intended for monospace.

    Rather, you want the buffer which is markdown and contextual info like cursor position.

    You might hit some challenges like how to handle style elements. For example:

    <cursor>*bold*
    

    Moving the cursor to the right of the b will take two key presses in nvim but would typically be one key press in a WYSIWYG editor.

    There are probably many ways to handle this in nvim through the plugin system, but both paths of embedding vs emulating nvim has a good chunk of dev work to be completed.

    Emulating will likely be more rewarding at the start as you can get incremental improvements pretty quickly.

    Embedding is a cool idea, but likely a ton of upfront work to get your first tangible results.

    You might be interested in reviewing https://github.com/MeanderingProgrammer/render-markdown.nvim which attempts to render Markdown in the terminal. They have logic for rendering things like the bold example in bold while hiding the markup.

    I personally just use https://github.com/iamcco/markdown-preview.nvim to render in a different window when render-markdown.nvim isn’t enough.






  • I use immutable nixos installs. Everything to redeploy my OS is tracked in git including most app configurations. The one exception are some GUI apps I’d have to do manually on reinstall.

    I have a persistence volume for things like:

    • Rollbacks
    • Personal files
    • Git repos
    • Logs
    • Caches / Games

    I have 30 days (or last 5 minimum) of system rollbacks using BTRFS volumes.

    The personal files are backed up hourly to a local server which then backs up nightly to B2 Backblaze using rclone in an encrypted volume using my private keys. The local server has a mishmash of drives in a mirrored LVM setup. While it works well for having mixed drives, I’ll warn I haven’t had a drive failure yet so I’m not sure the difficulty of replacing a drive.

    My phone uses the same flow with RoundSync (rclone + GUI).

    Git repos are backed up in git.

    Logs aren’t backed up. I just persist them for debugging and don’t want them lost after every reboot.

    Caches/Games are persisted but not backed up. Nixos uses symlinks and BTRFS to be immutable. That paradigm doesn’t work well for this case. The one exception is a couple game folders are part of my personal files. WoW plugin folder, EvE online layouts, etc.

    I used to use Dropbox (with rclone to encrypt). It was $20/mo for 2Tb. It is cheaper on paper. I don’t backup nearly that much. Backblaze started at $1/mo for what I use. I’m now up to $2/mo. It will be a few years before I need to clean up my backups for cost reasons.

    The local server is a PC in a case with 8 drive bays plus some NVME drives for fast storage. It has a couple older drives and for the last couple years I typically buy a pair of drives on sale (black Friday, prime day, etc). I have a little over 30TB mirrored, so slightly over 60TB in total. NVME is not counted in that. One NVME is for the system, the others are a caching layer (monero node) or temp storage (transcoding as it also my media server).

    I like the case, but if I were to do it again, I’d probably get a rack mountable case.





  • OS: NixOS (high learning curve but its been worth it). Nix (the config language) is a functional programming language, so it can be difficult to grok. Documentation is shit as its evolved while maintaining backwards compatibility. If you use the new stuff (Nix Flakes) you have to figure what’s old and likely not applicable (channels or w/e).

    BYOD: Just using LVM. All volumes are mirrored across several drives of different sizes. Some HDD volumes have an SSD cache layer on top (e.g., monero node). Some are just on an SSD (e.g., main system). No drive failures yet so can’t speak to how complex restoring is. All managed through NixOS with https://github.com/nix-community/disko.

    I run stuff on a mix of OCI containers (podman or docker, default is podman which is what I use) and native NixOS containers which use systemd-nspawn.

    The OS itself I don’t back up outside of mirroring. I run an immutable OS (every reboot is like a fresh install). I can redeploy from git so no need to backup. I have some persistent BTRFS volumes mounted where logs, caches, and state go. Don’t backup, but I swap the volume every boot and keep the last 30 days of volumes or a min of at least 10 for debugging.

    I just use rclone for backups with some bash scripts. Devices back up to home lab which backs up to cloud (encrypted with my keys) all using rclone (RoundSync for phone).

    Runs Arrs, Jellyfin, Monero node, Tor entry node, wireguard VPN (to get into network from remote), I2C, Mullvad VPN (default), Proton VPN (torrents with port forwarding use this), DNS (forced over VPN using DoT), PiHole in front of that, three of my WiFi vlans route through either Mulvad, I2C, or Tor. I’ll use TailsOS for anything sensitive. WiFi is just to get to I2C or Onion sites where I’m not worried about my device possibly leaking identity.

    Its pretty low level. Everything is configured in NixOS. No GUIs. If its not configured in nix its wiped next reboot since the OS is immutable. All tracked in git including secrets using SOPS. Every device has its own master key setup on first install. I have a personal master key should I need to reinstall which is tracked outside of git in a password manager.

    Took a solid month to get the initial setup done while learning NixOS. I had a very specific setup of LVM > LUKS encryption /w Secure Boot and Hardware Key > BTRFS. Overkill on security but I geek out on that stuff. Been stable but still tinkering with it a year later.




  • sloppy_diffuser@sh.itjust.workstoLinux@lemmy.mllinux as business/ company pc?
    link
    fedilink
    English
    arrow-up
    16
    arrow-down
    1
    ·
    8 months ago

    Most startups I’ve applied to are Linux friendly.

    I currently work for a fortune 100 and managed to get a Linux machine purchased as a “lab” machine.

    I’m fully in control. IT doesn’t even know it exists. I’m not allowed on the corporate network, but I managed to get some internal corporate access through another department’s lab network (IT sanctioned) that has a VPN with a few routes to things like ticketing, time cards, and our internal wiki. Most of the stuff I need to do my job is in AWS and we are allowed to add home IPs to the security groups.

    IT still gives me a MacBook. I use it like once every 6 months.

    nixos-unstable is the only thing I will use currently.

    I’m running bleeding edge stuff like the latest kernel, Hyprland nightly, my own “shell” built from Gnome components and lots of custom stuff using GJS (Gnome JavaScript).

    If you get one, and you are free to do whatever on it, encrypt your drives like your job depends on it. I have a memorized passphrase, pin protected hardware key, and a key in TPM. No biometrics.

    As far as other nice things to have:

    • VPN: https://www.infradead.org/openconnect/ supports some common enterprise VPNs.
    • Communication tools (Teams, WebEx, Zoom, Slack, etc.). I tend to have access to 90% of what I need. My team is thankfully accommodating for the couple features I have issues with. Make sure you test things like Screen Sharing especially in Wayland if you use it.
    • VM: If you can get a corporate licensed image to run a corporate licensed version of Office, I recommend it. Office365 for web is missing a few features and often renders differently from native.
    • Password Manager and encrypt everything. System is encrypted as previously stated. My home volume (BTRFS) is encrypted with a different key/passphrase. My work’s sensitive files are encrypted yet again using rclone with different keys. I try to minimize attack surfaces by unlocking only what I need when I need it.
    • Backups. I use rclone to backup to our corporate OneDrive. Nixos is immutable and I have it setup with impermanence where every reboot is like a fresh install if I didn’t codify it my nixos-config which is tracked in git. I persist a few cache and setting directories in my home directory, but not much. I can restore my setup in like 20 minutes if I ever lost my machine.
    • Virtual mic and camera for noise suppression and blurring for communication tools that don’t have it built in.
    • Evolution EWS works okay as an Exchange email client. I had to hunt some weird settings like tenant ID to get it to work. I’ve been using Webmail or Outlook in a VM more often though as of late.

    I work in software dev as FYI. For the few issues I have, my team has more issues getting stuff working consistently on macOS for our project. I used that as a justification when requesting the laptop: my dev environment should closely match our runtime environment. Most of that is moot now since we use Nix flakes in our repos for local dev envs.