Comments (3)
yadm.distro_family
is populated via the ID_LIKE
value in /etc/os-release.
Do you think it would help to do something like this:
- Set a local class value within your bootstrap by running
yadm config local.class $(awk -F= '$1=="VARIANT_ID" {print $2}' /etc/os-release)
- And then use
yadm.class
in your template?
from yadm.
Thanks for the reply @TheLocehiliosan
While I did not use the solution you proposed it nudged me in the right direction.
After some tinkering I landed on the following solution, which also allows me to rebase my silverblue to kinonite for example. I switched to esh for templating and I think it also makes it easier to document why there is an if:
# WARNING: Do not edit this file.
# It was generated by processing <%= $YADM_SOURCE %>
<% if type rpm-ostree > /dev/null; then -%>
# On rpm-ostree based systems rewrite the npm prefix to avoid trying
# to write to a read only mount.
prefix=<%= $HOME %>/.npm-global
<% fi %>
progress=false
from yadm.
Ah yes. That's a good solution and does make it more clear why that system is treated differently.
The "built-in" templating is very basic and really meant to allow some templating without much need for dependencies. But if you can use a more capable template processor it will open up the possibilities. 👍
from yadm.
Related Issues (20)
- Add support of Python 3.11 to tests HOT 5
- Same files - different locations HOT 4
- Custom default template's directive HOT 5
- yadm doesn't process distro|d properly without lsb_release being available HOT 2
- How do I exclude files to encrypt when trying to encrypt an entire path? HOT 3
- Templates with a matching alternate condition are not used HOT 4
- yadm submodule init not work (my work tree is not $HOME) HOT 2
- yadm add for files in ~/.config/nvim/lua/custom/ doesn't work HOT 2
- Bash completions not working without git from homebrew HOT 2
- YADM pushes to Github using the wrong user credentials? HOT 2
- How can I resolve conflicting files HOT 3
- Release the Fedora 38 repos on openSUSE Build Service HOT 1
- Alt files shoudn't be tracked
- yadm.io is down. HOT 2
- yadm not applying git filter HOT 2
- Deleting symlinks when run under sudo HOT 3
- Fedora 39 repo HOT 2
- document how to check if a variable is unset HOT 2
- linux file being linked on darwin HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yadm.