144 lines
6.7 KiB
HTML
144 lines
6.7 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title> Getting Web-Services to run on NixOS | Kitaab</title>
|
|
<meta property="og:title" content=" Getting Web-Services to run on NixOS | Kitaab">
|
|
<meta property="og:type" content="website">
|
|
<meta property="og:description"
|
|
content="config.site_meta_description">
|
|
<meta property="og:site_name" content="Kitaab">
|
|
<meta property="og:url" content="build_url">
|
|
<meta property="og:image" content="build_urlassets/social.png">
|
|
<meta property="og:image:height" content="300">
|
|
<meta property="og:image:width" content="300">
|
|
<meta property="og:image:type" content="image/jpeg">
|
|
<link rel="stylesheet" href="asset/style.css" type="text/css"
|
|
media="screen" title="no title" charset="utf-8">
|
|
<!-- Mastodon stuff should go here
|
|
<meta name="twitter:site" content="config.twitter_name">
|
|
<meta name="twitter:title" content="page_title | config.name_of_site">
|
|
<meta name="twitter:image" content="build_urlassets/social.png">
|
|
<meta name="twitter:image:alt" content="page_title | config.name_of_site">
|
|
--!>
|
|
<link rel="apple-touch-icon" sizes="57x57" href="build_urlassets/apple-icon-57x57.png">
|
|
<link rel="apple-touch-icon" sizes="60x60" href="build_urlassets/apple-icon-60x60.png">
|
|
<link rel="apple-touch-icon" sizes="72x72" href="build_urlassets/apple-icon-72x72.png">
|
|
<link rel="apple-touch-icon" sizes="76x76" href="build_urlassets/apple-icon-76x76.png">
|
|
<link rel="apple-touch-icon" sizes="114x114" href="build_urlassets/apple-icon-114x114.png">
|
|
<link rel="apple-touch-icon" sizes="120x120" href="build_urlassets/apple-icon-120x120.png">
|
|
<link rel="apple-touch-icon" sizes="144x144" href="build_urlassets/apple-icon-144x144.png">
|
|
<link rel="apple-touch-icon" sizes="152x152" href="build_urlassets/apple-icon-152x152.png">
|
|
<link rel="apple-touch-icon" sizes="180x180" href="build_urlassets/apple-icon-180x180.png">
|
|
<link rel="icon" type="image/png" sizes="192x192" href="build_urlassets/android-icon-192x192.png">
|
|
<link rel="icon" type="image/png" sizes="32x32" href="build_urlassets/favicon-32x32.png">
|
|
<link rel="icon" type="image/png" sizes="96x96" href="build_urlassets/favicon-96x96.png">
|
|
<link rel="icon" type="image/png" sizes="16x16" href="build_urlassets/favicon-16x16.png">
|
|
<meta name="msapplication-TileColor" content="#5927e0">
|
|
<meta name="msapplication-TileImage" content="build_urlassets/ms-icon-144x144.png">
|
|
<meta name="theme-color" content="#5927e0">
|
|
<link rel="canonical" href="Raw">
|
|
<link rel="stylesheet" href="assets/main.css">
|
|
</head>
|
|
|
|
<body class="flow-large container">
|
|
<header>
|
|
<a style='display:flex;padding-top:10px' href="home.html" aria-label="Kitaab">Kitaab</a>
|
|
</header>
|
|
<main>
|
|
<div id='navigation' style="float: right;">
|
|
<nav>
|
|
<h2> <a href='tag_index.html'> Index </a> </h2>
|
|
<ul>
|
|
<li> <a href='recents.html'>recents</a></li>
|
|
|
|
<li> <a href='dev_index.html'>dev</a></li>
|
|
|
|
<li> <a href='way_index.html'>way</a></li>
|
|
|
|
<li> <a href='recipe_index.html'>recipe</a></li>
|
|
|
|
<li> <a href='ops_index.html'>ops</a></li>
|
|
|
|
<li> <a href='blog_index.html'>blog</a></li>
|
|
|
|
<li> <a href='rock_index.html'>rock</a></li>
|
|
|
|
<li> <a href='phil_index.html'>phil</a></li>
|
|
|
|
<li> <a href='story_index.html'>story</a></li>
|
|
|
|
<li> <a href='blog_index.html'>blog</a></li>
|
|
|
|
<li> <a href='untagged_index.html'>untagged</a></li>
|
|
|
|
</ul>
|
|
</nav>
|
|
</div>
|
|
<h1> Getting Web-Services to run on NixOS </h1>
|
|
<div style='max-width:660px;'>
|
|
<article class="flow">
|
|
|
|
|
|
<a href="ops_index.html">
|
|
ops
|
|
</a>
|
|
|
|
<a href="bowl_index.html">
|
|
bowl
|
|
</a>
|
|
|
|
<a href="nix_index.html">
|
|
nix
|
|
</a>
|
|
|
|
<a href="reflection_index.html">
|
|
reflection
|
|
</a>
|
|
|
|
|
|
|
|
<date> 2020-11-18 15:22</date>
|
|
|
|
<h3>Summary</h3>
|
|
<p>Shaarli</p>
|
|
<ul>
|
|
<li>Haven't configured a systemd service to ln -s the nix derivation yet</li>
|
|
</ul>
|
|
<p>Wallabag</p>
|
|
<ul>
|
|
<li>Upstream seems broken</li>
|
|
<li>Docker works, but data is not persistent</li>
|
|
<li>Find a way to use overlay so I can use an older version</li>
|
|
</ul>
|
|
<p>Wireguard</p>
|
|
<ul>
|
|
<li>broken on 20.09</li>
|
|
<li>not sure what to do</li>
|
|
</ul>
|
|
<p>LUKS / LVM</p>
|
|
<ul>
|
|
<li>does not mount the big partition</li>
|
|
<li>not sure why</li>
|
|
</ul>
|
|
<p>Borg</p>
|
|
<ul>
|
|
<li>Unconfigured</li>
|
|
<li>Need to restore nextcloud data</li>
|
|
<li>Most other data is missing</li>
|
|
</ul>
|
|
<p>Basically I've learnt that running php web-apps are a nightmare, and that I don't really understand nginx, fastcgi, phpfpm at all really.
|
|
For the past ~2 weeks I've been trying to rebuild <a href='bowl.html' >bowl</a> to be running on NixOS, and I've come up against many difficulties, and lost all the data in both of these services...</p>
|
|
<p>I had issues with getting shaarli to read the environment variable as defined in it's nix derivation. So instead, Timo (the package maintainer) told me another solution is to just <code>ln -s</code> the package directory into somewhere it can read/write to since that's what the environment variable is supposed to do anyway. Once I did this it was easy enough to get Shaarli running. I did have to be careful with the nginx config because I'd accidentally disabled the API. Currently my Shaarli install</p>
|
|
<p>Wallabag has been another story. It seems like upstream is broken because it's overwriting a php function (<code>mb_string</code> is the package and <code>mb_str_replace</code> is the function) that php says it can't overwrite.</p>
|
|
<p>Before I managed to get these to run on bare metal, I was using docker once again to run the services. But since Nix is declarative, and I have no idea how docker volumes work, it wiped everytime I ran <code>nixos-rebuild switch</code>, which remains a problem I haven't quite solved. I somehow managed to get the docker install working, but I don't believe it to be declarative because I did exec into the docker container and ran some esoteric database migration in order to get it to work.</p>
|
|
<p>Further more my main issue currently is that in order to do anything in nixOS I need to be able to write the language, understand the options, and then all the services that the options declaratively define. The way I currently run any of the infrastructure is through googling around and hoping to find a module or someone else trying to run the same software, but more profficient at nixOS than I am. That needs to change, since even for services written in easy to run languages like Go, I can't write the nix file to get them to work.</p>
|
|
|
|
</article>
|
|
</div>
|
|
</main>
|
|
</body>
|
|
|
|
</html> |