[-] rutrum@programming.dev 9 points 1 year ago

Those leaves tricked me

8

For example, compose2nix lets you build nixos configuration for containers defined in a docker compose compose.yml. But this step happens offline. You have to first ad hoc generate the config from the compose.yml and then use that generated output in your config.

It seems obvious to me that the best user experience would be to write a flake/module that let's you just point to a compose file directly in your config. On rebuild, it would parse the compose file and build the appropriate config.

But I've not really seen that. These projects that convert from one package mamagement scheme or config file to another (xxx2nix projects) work using this preprocessing step. More examples include pip2nix and cargo2nix.

Given how common this pattern is, I suspect there is something preventing generating at rebuild time from being feasible, or at least easy. Does anyone have ideas for why this is? Thanks.

22

I'm looking to spec out a new NAS. I have a relatively small media collection, that I hope to grow as I digitize more family VHS tapes etc. Right now I have around 4 TB of data, shared across an external drive and my internal ssd.

Whats the best path forward on drives in this new NAS? I've heard advice for buying one big 20TB drive over multiple smaller drives. What's best for mitigation of drive failure? Is that even a concern? If I do multiple drives, should I use RAID?

I'm a little new to this. If you have resources for learning some best practices I'm all ears.

[-] rutrum@programming.dev 12 points 1 year ago

Jumping in over your head is how you learn. Just be patient!

[-] rutrum@programming.dev 14 points 1 year ago

Congratulations! I'm glad it worked well for you. Mint is a great choice as well.

58
[-] rutrum@programming.dev 7 points 1 year ago* (last edited 1 year ago)

Theres three things at play here: nix, nixpkgs, and NixOS.

Nix is a programming language. Its designed as its primary purpose to configure, build, and install software.

Nixpkgs is a collections of mamy bundles of premade nix code called derivations. These derivations include the build instructions for applications and the configuration options for those applications. This part is most equivalent to a package repository, but it does not contain prebuilt packages. It only contains the instructions for building it.

Nix has a wide variety of tools for managing these derivations. This includes downloading derivations from nixpkgs and building them locally on your machine (or finding prebuilt packages from a cache). Nix shell is one of those tools that downloads a package temporarily, and makes it available in your shell. You wouldnt use nix shell for installing things permanently.

The OS built with nix as the primary package manager is NixOS. It allows you to define your entire system state as a derivation: your systemd units, installed packages, user configuration, graphical environment, etc.

The best part of NixOS is that it takes the OS and represents the state of the computer as a single repository of code. If you look up someones nixos configuration on GitHub, you'll see a single collection of files (filled with derivations!) that completely and totally define the state of the system.

[-] rutrum@programming.dev 32 points 1 year ago

I use borg backup. It, and another tool called restic, are meant for creating encrypted backups. Further, it can create backups regularly and only backup differences. This means you could take a daily backup without making new copies of your entire library. They also allow you to, as part of compressing and encrypting, make a backup to a remote machine over ssh. I think you should start with either of those.

One provider thats built for being a cloud backup is borgbase. It can be a location you backup a borg (or restic I think) repository. There are others that are made to be easily accessed with these backup tools.

Lastly, I'll mention that borg handles making a backup, but doesn't handle the scheduling. Borgmatic is another tool that, given a yml configuration file, will perform the borgbackup commands on a schedule with the defined arguments. You could also use something like systemd/cron to run a schedule.

Personally, I use borgbackup configured in NixOS (which makes the systemd units for making daily backups) and I back up to a different computer in my house and to borgbase. I have 3 copies, 1 cloud and 2 in my home.

[-] rutrum@programming.dev 35 points 1 year ago* (last edited 1 year ago)

Its all local. Ollama is the application, deepseek and llama and qwen and whatever else are just model weights. The models arent executables, nor do the models ping external services or whatever. The models are safe. Ollama itself is meant for hosting models locally, and I dont believe it even has capability of doing anything besides run local models.

Where it gets more complicated is "agentic" assistants, that can read files or execute things at the terminal. The most advanced code assistance are doing this. But this is NOT a function of ollama or the model, its a function of the chat UI or code editor plugin that glues the model output together with a web search, filesystem, terminal session, etc.

So in short, ollama just runs models. Its all local and private, no worries.

[-] rutrum@programming.dev 22 points 1 year ago

NixOS. My primary reason for switching was wanting a single list of programs that I had installed. After using ubuntu for 5 years I just lost track of all the tools and versions of software that I had installed...and that didnt even count my laptop. Now all my machines have a single list of applications, and they are all in sync.

[-] rutrum@programming.dev 7 points 1 year ago* (last edited 1 year ago)

Very exciting! You're layout looks fine as is. As it grows it might change, but for what you have now its a great schema.

On themes: catppuccin has a dedicated flake for applying the catppuccin style to a lot of different terminal apps and gnome/kde I think. I prefer this over stylix, a general purpose themer, because I want explicit control over which color scheme is enabled on each app. Stylix is cool, but doesnt make it easy (or possible?) to apply different themes to different apps.

Declarative flatpak by ~~germanbread~~ in-a-dil-emma is a nice flake. Occassionally theres a flatpak I need that isnt already packaged. This takes care of that. https://github.com/in-a-dil-emma/declarative-flatpak

If you want to work with secrets, look into sops-nix. Vimjoyer on youtube has a great video on how to get it setup.

[-] rutrum@programming.dev 12 points 1 year ago

Just because its run locally, doesnt mean it still isnt a web server. The software could run anywhere and be accessed over the network. The image optimization happens at the server, so download and upload are more accurate.

[-] rutrum@programming.dev 12 points 1 year ago

Love him. His lego island port has been a pleasure to watch.

[-] rutrum@programming.dev 12 points 1 year ago

Really looking forward to this:

Making pro-quality text got easier, too. Style your text, apply outlines, shadows, bevels, and more, and you can still edit your text, change font and size, and even tweak the style settings.

[-] rutrum@programming.dev 9 points 2 years ago

Vimjoyer on youtube has very concise and well made videos on nix.

361
submitted 2 years ago* (last edited 2 years ago) by rutrum@programming.dev to c/programming@programming.dev

The gist is you write macros/automations/scripts to play the MMO based on your logic.

I decided to do it in bash/curl/jq to make it extra fun and learn some tools I use occasionally but only withheavy man page referencing. After some playing I might be a bash-scripting pro.

view more: next ›

rutrum

0 post score
0 comment score
joined 2 years ago