wip main list
parent
154528cb05
commit
fd81758637
|
@ -2,8 +2,8 @@
|
|||
title: About me
|
||||
---
|
||||
|
||||
I'm a freelancing Mathematician, Full Stack Developer and DevOps.
|
||||
[NixOS](https://nixos.org) is my Operation System of choice.
|
||||
I'm a freelancing Mathematician, Full Stack Developer and DevOps Engineer.
|
||||
[NixOS](https://nixos.org) is my Operating System of choice.
|
||||
|
||||
When I'm not doing stuff on my computer I play video games or make some photos
|
||||
on my journeys. Have a look at my [travel page](http://travel.ingolf-wagner.de).
|
||||
|
|
|
@ -9,9 +9,9 @@ tags:
|
|||
- password-store
|
||||
summary: >
|
||||
krops is an alternative to
|
||||
NixOps trying to solve some of theses flaws,
|
||||
NixOps trying to solve some of these flaws,
|
||||
with some very simple concepts.
|
||||
In this article we will checkout on how to deploy a server
|
||||
In this article we will see on how to deploy a server
|
||||
using krops and discuss all involved parameters and steps.
|
||||
|
||||
---
|
||||
|
@ -20,7 +20,7 @@ summary: >
|
|||
the official DevOps tool of
|
||||
[NixOS ](https://nixos.org) is nice, but it has some flaws.
|
||||
[krops](https://cgit.krebsco.de/krops/about/) is an alternative to
|
||||
[NixOps](https://nixos.org/nixops/) trying to solve some of theses flaws,
|
||||
[NixOps](https://nixos.org/nixops/) trying to solve some of these flaws,
|
||||
with some very simple concepts.
|
||||
|
||||
If you're looking for a good document on how to use
|
||||
|
@ -101,7 +101,7 @@ have a look at
|
|||
## krops Structure by Example
|
||||
|
||||
krops is not an executable like NixOps,
|
||||
it is a library you use to write executables which do the actual deployment.
|
||||
it is a library to write executables which do the actual deployment.
|
||||
|
||||
Let's say you have a very simple `configuration.nix`
|
||||
|
||||
|
@ -210,7 +210,7 @@ to change the ssh port and the target folder it should be copied.
|
|||
{{% /note %}}
|
||||
|
||||
```nix
|
||||
source = lib.evalSource [
|
||||
source = lib.evalSource [
|
||||
{
|
||||
nixpkgs.git = {
|
||||
ref = "nixos-18.03";
|
||||
|
@ -218,7 +218,7 @@ to change the ssh port and the target folder it should be copied.
|
|||
};
|
||||
nixos-config.file = toString ./configuration.nix;
|
||||
}
|
||||
];
|
||||
];
|
||||
```
|
||||
|
||||
The list of folders and files are managed by the `source` parameter.
|
||||
|
@ -316,7 +316,6 @@ source = lib.evalSource [
|
|||
};
|
||||
}
|
||||
];
|
||||
|
||||
```
|
||||
|
||||
This copies `secrets/server01` to `/var/src/secrets` after it is decrypted.
|
||||
|
@ -464,7 +463,7 @@ It is very easy to install packages from different channels.
|
|||
For example add `nixpkgs-unstable` the same way you add `nixpkgs`.
|
||||
|
||||
```nix
|
||||
source = lib.evalSource [
|
||||
source = lib.evalSource [
|
||||
{
|
||||
nixpkgs.git = {
|
||||
ref = "nixos-18.09";
|
||||
|
@ -476,7 +475,7 @@ For example add `nixpkgs-unstable` the same way you add `nixpkgs`.
|
|||
};
|
||||
nixos-config.file = toString ./configuration.nix;
|
||||
}
|
||||
];
|
||||
];
|
||||
```
|
||||
|
||||
To install a package from the `unstable` channel you just have to import the channel
|
||||
|
|
|
@ -36,13 +36,13 @@ but this does not play well with updates and with `customization`.
|
|||
|
||||
Now I'm using [home-manager](https://github.com/rycee/home-manager)
|
||||
to configure files in `~/.spacemacs.d/` and `load` them in
|
||||
the configuration functions inside `~/.spacemacs`. A simple `(load "~/.spacemacs.d/hook-user-config.el")`
|
||||
the configuration functions inside `~/.spacemacs`.
|
||||
A simple `(load "~/.spacemacs.d/hook-user-config.el")`
|
||||
inside the `dotspacemacs/user-config` function is enough, to make it work.
|
||||
|
||||
```nix
|
||||
{ pkgs, lib, config, ... }:
|
||||
let
|
||||
|
||||
user = "mainUser";
|
||||
userName = config.users.users."${user}".name;
|
||||
home = config.users.users."${user}".home;
|
||||
|
@ -52,10 +52,7 @@ let
|
|||
url = "https://github.com/NixOS/nixos-homepage/raw/master/logo/nix-wiki.png";
|
||||
sha256 = "1hrz7wr7i0b2bips60ygacbkmdzv466lsbxi22hycg42kv4m0173";
|
||||
};
|
||||
|
||||
in
|
||||
{
|
||||
|
||||
in {
|
||||
systemd.services =
|
||||
let
|
||||
clone =
|
||||
|
@ -80,13 +77,12 @@ in
|
|||
home.file.".spacemacs.d/hook-init.el".text = ''
|
||||
;; just add (load "~/.spacemacs.d/hook-init.el")
|
||||
;; at the end of dotspacemacs/init function
|
||||
|
||||
;; overrides of dotspacemacs/init ()
|
||||
(setq-default
|
||||
dotspacemacs-themes '(solarized-light solarized-dark)
|
||||
dotspacemacs-startup-banner "${startupBanner}"
|
||||
dotspacemacs-default-font '("Terminus"
|
||||
:size ${toString fontSize}
|
||||
dotspacemacs-default-font
|
||||
'("Terminus" :size ${toString fontSize}
|
||||
:weight normal
|
||||
:width normal
|
||||
:powerline-scale 1.1))
|
||||
|
@ -95,7 +91,6 @@ in
|
|||
home.file.".spacemacs.d/hook-layers.el".text = ''
|
||||
;; just add (load "~/.spacemacs.d/hook-layers.el")
|
||||
;; at the end of dotspacemacs/layers function
|
||||
|
||||
(let
|
||||
((user-layers dotspacemacs-configuration-layers))
|
||||
(setq
|
||||
|
@ -109,7 +104,6 @@ in
|
|||
haskell-enable-hindent-style "gibiansky"
|
||||
haskell-process-type 'cabal-new-repl)
|
||||
))))
|
||||
|
||||
(let
|
||||
((user-packages dotspacemacs-additional-packages ))
|
||||
(setq
|
||||
|
@ -134,7 +128,6 @@ in
|
|||
(add-hook 'haskell-mode-hook #'lsp)
|
||||
(add-hook 'haskell-mode-hook #'direnv-update-environment)
|
||||
'';
|
||||
|
||||
};
|
||||
}
|
||||
```
|
||||
|
@ -150,7 +143,7 @@ You can install the `lsp` (in our case `hie-wrapper`) globally in your `configur
|
|||
I usually do this in my projects (via `lsp.nix`). Here is the part that differs.
|
||||
|
||||
```nix
|
||||
home.file.".spacemacs.d/hook-user-config.el".text =
|
||||
home.file.".spacemacs.d/hook-user-config.el".text =
|
||||
let
|
||||
all-hies = import (fetchTarball "https://github.com/infinisil/all-hies/tarball/master") {};
|
||||
in ''
|
||||
|
|
|
@ -562,7 +562,6 @@ in {
|
|||
# we create hcloud_ssh_keys, if admins exist
|
||||
( mkIf ( length ( attrNames config.admins ) > 0 )
|
||||
adminSshKeys)
|
||||
|
||||
];
|
||||
}
|
||||
```
|
||||
|
|
|
@ -135,8 +135,7 @@ in {
|
|||
|
||||
# for all machines
|
||||
# ----------------
|
||||
default =
|
||||
{config, pkgs, lib, ... }:
|
||||
default = { config, pkgs, lib, ... }:
|
||||
{
|
||||
with lib;
|
||||
services.custom.tinc =
|
||||
|
@ -227,7 +226,6 @@ PING HAL.private (10.1.1.3) 56(84) bytes of data.
|
|||
|
||||
**Awesome!** That was easy!
|
||||
|
||||
|
||||
## Connect 2 sub-networks
|
||||
|
||||
So far so good,
|
||||
|
@ -245,9 +243,7 @@ just add the `tincSubnet` parameter in the `hosts` attribute and your done.
|
|||
|
||||
```nix
|
||||
...
|
||||
|
||||
default =
|
||||
{config, pkgs, lib, ... }:
|
||||
default = { config, pkgs, lib, ... }:
|
||||
{
|
||||
with lib;
|
||||
services.custom.tinc =
|
||||
|
|
|
@ -3,4 +3,5 @@ title: "slides"
|
|||
date: 2021-07-24T21:43:24+02:00
|
||||
---
|
||||
|
||||
Here is a collection of Slides I presented to people. Feel free to use and download them.
|
||||
Here is a collection of Slides I presented to people.
|
||||
Feel free to use and download them.
|
Loading…
Reference in New Issue