Fleek - "Home as Code" for Humans
Fleek is an all-in-one management system for everything you need to be productive on your computer.
Status: BETA. Probably won't eat your computer. Probably won't break your system, at least beyond simple recoverability.
What follows is a brief overview and quick start. See full documentation at https://getfleek.dev.
Fleek v0.9.0 introduced some changes to how it should be installed. If you already have fleek installed, see upgrade instructions on the website.
Own your $HOME
Instant Productivity
Fleek takes you from an empty slate to a fully productive working environment in less than five minutes.
Take It With You
No matter whether you work on a shiny new M2 MacBook Air, a well-loved ThinkPad running Linux, or Windows with WSL, Fleek lets you take the exact same environment, tools, and configuration wherever you go.
Zero Learning Curve To Start
You don't need to master a fancy DSL or spelunk through pages of online manuals to get started with Fleek. Answer two questions and you're instantly off to the races. Fleek gives you opinionated starter configurations for bash
and zsh
in four different levels of BLING. You can choose a standard close-to-stock experience, or dial your environment to 11 with all the latest desktop and terminal bling. And switching between them takes less than a minute when you change your mind.
Every Tool At Your Fingertips
Whether you need to install a new programming language's toolset or the latest social media application, Fleek has you covered with the largest set of programs and packages in the world. Add a line to your .fleek.yml
file and fleek apply
yourself into freedom.
Eject Button Optional
If you reach a point where you've grown beyond Fleek's opinions and you want more, just fleek eject
and manage your configurations manually.
Party in the Front, Business in the Back
Fleek is a user-friendly wrapper around Nix and Nix Home Manager, but the friendly fleek
command hides all the complexity from you. Edit a 10 line YAML file and Fleek harnesses the power of Nix behind the scenes.
Getting Started
You need nix
. We love the Determinate Systems Installer, but any nix
installer is good. If you're on Fedora Silverblue, this script is the good stuff.
After Nix is installed you need to enable flakes and the nix command. It can be as simple as this:
mkdir -p ~/.config/nix
echo "experimental-features = nix-command flakes" >> ~/.config/nix/nix.conf
Install fleek
:
curl -fsSL https://getfleek.dev/installer | bash
Run fleek init
:
fleek init
This will create your configuration file and symlink it to $HOME/.fleek.yml
. Open it with your favorite editor and take a look.
Make any changes to the ~/.fleek.yml
file you want... we recommend Bling Level high
for the best experience.
Now let's apply your configuration:
fleek apply
It will take a bit to download and install everything, but when it's done you should see something like this:
... more text above this ...
Activating onFilesChange
Activating reloadSystemd
[✓] Operation completed successfully
What happened here? We just installed Nix Home Manager, configured it with your preferences, and applied it to your system.
You may need to close and re-open your terminal or even log out to see the changes.
~/.fleek.yml
Here's what mine looks like:
───────┬───────────────────────────────────────────────────
│ File: .fleek.yml
───────┼───────────────────────────────────────────────────
1 │ aliases:
2 │ fleeks: cd ~/.local/share/fleek
3 │ bling: high
4 │ ejected: false
5 │ flakedir: .local/share/fleek
6 │ git:
7 │ autocommit: true
8 │ autopull: true
9 │ autopush: true
10 │ enabled: true
11 │ min_version: 0.8.4
12 │ name: Fleek Configuration
13 │ packages:
14 │ - helix
15 │ - go
16 │ - gcc
17 │ - nodejs
18 │ - yarn
19 │ - rustup
20 │ - vhs
21 │ - rnix-lsp
22 │ - duf
23 │ paths:
24 │ - $HOME/bin
25 │ - $HOME/.local/bin
26 │ - $HOME/go/bin
27 │ programs:
28 │ - dircolors
29 │ shell: zsh
30 │ systems:
31 │ - arch: aarch64
32 │ hostname: f84d89911e5d.ant.amazon.com
33 │ os: darwin
34 │ username: brianjk
35 │ - arch: x86_64
36 │ hostname: beast
37 │ os: linux
38 │ username: bjk
39 │ unfree: true
40 │ users:
41 │ - email: [email protected]
42 │ name: Brian Ketelsen
43 │ ssh_private_key_file: ~/.ssh/id_rsa
44 │ ssh_public_key_file: ~/.ssh/id_rsa.pub
45 │ username: brianjk
46 │ - email: [email protected]
47 │ name: Brian Ketelsen
48 │ ssh_private_key_file: ~/.ssh/id_rsa
49 │ ssh_public_key_file: ~/.ssh/id_rsa.pub
50 │ username: bjk
───────┴──────────────────────────────────────────
I removed some of the aliases and systems just to make the example shorter.
Line 3: bling: high
tells fleek
how many extras I want in my $HOME setup. If you don't have a strong opinion I recommend high
, because it isn't a really much stuff and the set we chose to add is really strong. Options are none
, low
, default
, high
.
Line 13: packages:
starts a list of the packages I want installed. Mine are mostly focused around software development, but any package available in nixpkgs is available. You can search for packages to install with the fleek search
command.
Line 23: paths:
starts a list of directories I want to add to my $PATH.
Line 27: programs:
- starts a list of programs to install. Programs are packages, but with optional configuration. See the documentation for more information.
Line 29: shell: zsh
- this line isn't currently used, but will may be in the future. For now, it's just a placeholder.
Line 30: systems:
These are added by fleek
when you run fleek init
, you shouldn't need to edit this part manually. Note that fleek
and nix
support macOS, Linux and WSL on Windows, so your configurations are fully portable.
Now that you've seen some of the possibile changes you can make, edit your ~/.fleek.yml
file and save it.
To apply your changes run fleek apply
. fleek
spins for a bit, and makes all the changes you requested. You may need to close and re-open your terminal application to see some of the changes, particularly if you add or remove fonts.
That's the quick start! From here, you can try fleek add
to add packages from the CLI, fleek search
to search for available packages. The full documentation is on the fleek website.
Behind the Scenes
Fancy animated gifs and long-winded README's are great, but what really happens when you run fleek apply
the first time? I'm glad you asked...
fleek
creates a nix home-manager configuration based on the templates here.fleek
compiles the templates and writes them to disk at~/.local/share/fleek
by default.fleek
calls thenix
command, which doesnix
things to download and install all the packages in your.fleek.yml
file.- The libraries and binaries you specify get installed in the
/nix
folder, and symlinked into your very own personalnix
profile. This is stored in your $HOME directory under~/.nix-profile
. - The
home-manager
command in the configuration assembles shell scripts and configurations for you based on the shell specified in your.fleek.yml
file. - Your existing shell configuration files get renamed with a
.bak
extension, so you can go back to your business iffleek
isn't for you. - New configurations are written, either
.zshrc
or.bashrc
, and these configuration files add your~/.nix-profile
and the packages you've installed to your $PATH
Fleek's goal is to give you 90% of the power of a fully customized, hand-written, artisinally crafted home-manager
configuration -- without forcing you to learn nix
, which can be (ok, it IS) intimidating.
You may like fleek
and use it on one or more of your machines to install the things you need and use every day.
You might eventually be curious about how it all works. If that's the case you can always look at the nix flake that's generated for you and see what's going on behind the scenes. Cool! There's a lot you can do with nix
that fleek
doesn't even attempt.
Or you might be a practical pragmatist sort of computer user and not care about what's happening behind the curtain. That's fine with fleek
. We're just here to help you go from zero to productive faster, more reliably, without a bunch of fuss.
Motivation
fleek
is born out of frustration.
It's annoying setting up a new computer just right. It's annoying having completely different configurations and tools each place I need to work. It's nearly impossible to configure a Mac and an Ubuntu server to have the same look & feel, much less the same tools.
It's a huge time sink spending time configuring everything, and even worse when you try to do it in a way you can share it between computers.
It wasn't until I was talking with Jorge Castro and he pointed out how complex my home-manager
config was compared to a simple YAML file.
Jorge is a smart dude. That night the first bits of fleek
were written.
Within 24 hours I took the plunge and dog-fooded fleek
on my development laptop. That was a great moment. A day later I added fleek remote
commands to push my configs to GitHub, then added the code to detect your arch & os and change the flake accordingly.
I spent the next two weeks tweaking the user experience and testing over and over. Countless virtual machines were provisioned and destroyed.
| countless
And now we're here. fleek
is ready for a broader audience than me and Jorge - who is the biggest inspriation for all the features fleek
has, and maybe just as importantly, doesn't have.
Shoulders
Standing on the shoulders of giants:
This flake template was the thing that got everything started!
In my third rewrite, I looked at devbox and loved how they organized everything. I borrowed a LOT from this. And by borrowed I mean outright copy & pasted. Many supporting functions in this code were written by the JetPack team, and very lightly modified by me.
Tasty release shell script inspired by and copied from ssh-to-age.
Fleek's development flake was created by Luc Perkins.
Great terminal display code inspired by and copied from pcli.
None of this is possible without Nix and Nix Home Manager:
home-manager switch does not work
Describe the bug When I run:
I got the following error:
Environment
deprecated location
During a fleek update, I can see the following message:
This is quite scary as new user. Are there some precise steps to follow here?
Error when running apply
I'm getting this error
warning: not writing modified lock file of flake 'flake:home-manager/master':
when runningfleek apply
.More details:
`fleek add` doesn't
Describe the bug
fleek apply
doesn't install any of thefleek add
ed packages or make any of the custom aliases available.To Reproduce
fleek init
fleek add neovim
fleek apply -v
fleeks
alias
which nvim
nix profile list
cat ~/.fleek.yaml
Actual behavior
fleeks
reports the command is unknown.alias
reports thefleeks
alias doesn't exist.which nvim
reports no such command is found.nix profile list
reports that onlyhome-manager-path
is installed and notneovim
.Expected behavior
The default
fleeks
alias should exist and work.The
nvim
command, which is installed as part ofneovim
should be installed in the nix profile.Environment
Additional context
The
~/.fleek.yaml
listsneovim
in thepackages
section after thefleek add neovim
, and thealiases
section does include the defaultfleeks
alias.EDIT: It turns out the issue is
fleek add
adding to the wrong list in the.fleek.yaml
so the package isn't usable (not sure what thepackage
list can even be used for, it seems to be completely non-functional).Install is f@#kd up.
Could not find suitable profile directory, tried /var/home/muchhustle-/.local/state/home-manager/profiles and /nix/var/nix/profiles/per-user/muchhustle- ERROR
ERROR Error: exit status 1 ERROR
ERROR
ERROR Error: ERROR
ERROR There was an internal error. Run with FLEEK_DEBUG=1 for a detailed error message, and consider reporting it at https://github.com/ublue-os/fleek/issues
Fedora Kinoite Konsole/Bash yada yada
`fleek apply` on MacOS 13.3.1 errors out with no details
Describe the bug
fleek apply
on MacOS errors out with no detailsTo Reproduce Steps to reproduce the behavior:
fleek apply
after first installation on MacOS 13.3.1Expected behavior At least output an error message?
Environment
Additional context
The first time it failed with:
Following the advice from the comment, here's the output of
FLEEK_DEBUG=1 fleek apply
:fleek init --force (doesn't seem to work/exist)
When running certain
init
command we may receive a message likesource: cowardly refusing to overwrite config file without --force flag
However the --force switch does not seem to exist, nor does it make any difference using the flag.I assume when we use the flag with init, it should not warn us and should overwrite the config files? Thanks
How do I upgrade all my stuff?
Is your feature request related to a problem? Please describe.
I don't know how to upgrade Fleek. I don't know how to upgrade packages installed by Fleek.
Describe the solution you'd like
I'd like to run
$ fleek upgrade
and have it upgrade Fleek and upgrade all the packages Fleek manages.Describe alternatives you've considered
This will update Fleek itself:
This will update "iterm2", which is an app I installed using Fleek:
I note that:
didn't seem to update iterm2 to the latest version, only removing it then adding it did. I guess I'm unclear what
fleek update --apply
is supposed to do...get the latest list of available apps but not upgrade anything that's already installed?Additional context
none
allow git to be not managed by fleek
Is your feature request related to a problem? Please describe. Currently git 2.40 has some buggy behaviour that emerges with rust, see https://github.com/arxanas/git-branchless/issues/894 and https://github.com/libgit2/libgit2/issues/6531
Describe the solution you'd like Allowing git to be not managed by fleek -- this is a bit of a toe stubber and being able to have a system git used would be nice
Describe alternatives you've considered Having git version be able to be tightly controlled by fleek e.g, being able to rollback to git 2.39.2 would work, however this doesn't seem to be a natural use case of nix
"Error: system not found" with apply
To Reproduce
With verbose info:
Environment
After installing fleek the fleek command is not available
Describe the bug After installing fleek, the only way to interact with it through nix run because the fleek command itself is unavailable
To Reproduce Steps to reproduce the behavior:
Expected behavior Users should be able to just type
fleek apply
rather than having to usenix run github:ublue-os/fleek -- apply
Environment
`fleek apply` reverts(?) unfetched upstream changes as part of new commit
Describe the bug
When fleek is used on multiple systems, if changes are made to the local
fleek
repo but there are unfetched changes in the upstream, fleek overwrites the upstream with the new state and loses the unfetched upstream changes.To Reproduce
fleek apply
themfleek apply
themExpected behavior
Machine 2 changes are attempted to be applied on top of machine 1 changes pulled from upstream, or an error requesting manual resolution occurs.
Actual behavior
Fleek commits the local changes and force pushes it upstream. All unfetched upstream changes are present in the log, but not in HEAD. HEAD of the upstream no longer contains the previously unfetched changes either.
Environment
Additional context
When I encountered this I actually had 2 commits from machine 1 pushed, but not pulled onto machine 2.
I was working on machine 2 and forgot that I had upstream changes to pull. I added an alias on machine 2 and
fleek apply
d it. A minute or two later I discovered I didn't have a command on machine 2 I thought I should, and then realized I didn't have the 2 machine 1 commits. I checked machine 1 and saw the addition of the command, so I assumed I'd forgotten tofleek apply
it somehow. I didfleek apply
on machine 1, which reported no changes, so then went to machine 2. Looking at thegit
history on machine 2, I found the two commits I had pushed from machine 1 as HEAD~2 and HEAD~1, but HEAD seemed to have reverted both of these and then added the alias. Checking the upstream, I saw the same thing. I force moved themain
branch reference to point to HEAD~1, and force pushed it upstream, then ranfleek apply
on machine 2 again. Suddenly I had what I expected (everything except the alias I'd added). I then re-made the alias addition andfleek apply
d it without issue.I'm honestly not even sure how you end up accidentally getting the equivalent of a revert of all unfetched upstream commits when creating a new commit. Any standard git workflow doesn't do this, a
pull
defaults to trying to merge or rebase the changes, and apush --force
without a pull wouldn't have the prior commits in the git log for the branch anymore.chore(deps): bump github.com/erikgeiser/promptkit from 0.8.0 to 0.9.0
Bumps github.com/erikgeiser/promptkit from 0.8.0 to 0.9.0.
Release notes
Sourced from github.com/erikgeiser/promptkit's releases.
Commits
050a37d
Add deprecation warningd89be77
Update dependenciesac5b8e3
Update dependenciesab12626
Improve handling of large choice lists in selectiondaa7019
fix initial window height redraw issue0bcdbe8
Fix CI53b2e1c
Correct typos in prompt.goDependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebase
will rebase this PR@dependabot recreate
will recreate this PR, overwriting any edits that have been made to it@dependabot merge
will merge this PR after your CI passes on it@dependabot squash and merge
will squash and merge this PR after your CI passes on it@dependabot cancel merge
will cancel a previously requested merge and block automerging@dependabot reopen
will reopen this PR if it is closed@dependabot close
will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot show <dependency name> ignore conditions
will show all of the ignore conditions of the specified dependency@dependabot ignore this major version
will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor version
will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependency
will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)chore(deps): bump golang.org/x/term from 0.10.0 to 0.11.0
Bumps golang.org/x/term from 0.10.0 to 0.11.0.
Commits
19e73c2
go.mod: update golang.org/x dependenciesDependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebase
will rebase this PR@dependabot recreate
will recreate this PR, overwriting any edits that have been made to it@dependabot merge
will merge this PR after your CI passes on it@dependabot squash and merge
will squash and merge this PR after your CI passes on it@dependabot cancel merge
will cancel a previously requested merge and block automerging@dependabot reopen
will reopen this PR if it is closed@dependabot close
will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot ignore this major version
will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor version
will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependency
will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)chore(deps): bump github.com/pterm/pterm from 0.12.63 to 0.12.65
Bumps github.com/pterm/pterm from 0.12.63 to 0.12.65.
Release notes
Sourced from github.com/pterm/pterm's releases.
Changelog
Sourced from github.com/pterm/pterm's changelog.
Commits
fb42a69
docs: autoupdate7864cb6
fix: buggy basic text input (#551)5a1be41
docs: autoupdatefc446d0
fix(textinput): fixed buggy behavior (#550)a6d2935
docs: autoupdatef059892
chore(deps): bump atomicgo.dev/cursor from 0.1.3 to 0.2.0 (#546)f7562e9
docs: autoupdate3466040
feat: add custom delimiters to select printers (#545)19261c5
docs: autoupdate2bbcaeb
Merge pull request #542 from pterm/dependabot/go_modules/github.com/mattn/go-...Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebase
will rebase this PR@dependabot recreate
will recreate this PR, overwriting any edits that have been made to it@dependabot merge
will merge this PR after your CI passes on it@dependabot squash and merge
will squash and merge this PR after your CI passes on it@dependabot cancel merge
will cancel a previously requested merge and block automerging@dependabot reopen
will reopen this PR if it is closed@dependabot close
will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot ignore this major version
will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor version
will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependency
will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)Help when nix list responds in error
Not having this means users see a blank output on most commands with no way to identify why.
I mangled my nix installation, being new to nix.
nix list profiles
was returning an error due to a file being empty.Fleek stopped responding to commands and I traced it to this. Instead of exiting, we should warn in some want to check on the nix installation.
I'm not sure what the best message would be and defer to a nix knower.