1
0
Fork 0
forked from Skynet/wiki

Compare commits

..

55 commits
main ... main

Author SHA1 Message Date
3ca52f0a3d
feat: added teh small sieve script to replace .forwards 2024-11-23 14:49:18 +00:00
0262d4dc8f
nop 2024-11-02 20:21:57 +00:00
a32b3ced29 Merge pull request 'Add a section on Nix, Nixos and related tools' (#30) from #29-nix_nixos-assignment into main
Reviewed-on: Skynet/wiki#30
2024-10-18 22:26:26 +00:00
8212fa7780
assignment: fix, improvements suggested 2024-10-18 17:47:29 +01:00
fcac8c2448
assignment: formatting and typos 2024-10-18 02:57:29 +01:00
029a181e7e
assignment: added section on basic use cases including devshell. 2024-10-18 02:49:26 +01:00
eef7877d25
assignment: added section on Why we use it.
Also added strikethrough support
2024-10-18 01:36:52 +01:00
4389f2a3fa
assignment: added section on Lix 2024-10-18 00:00:23 +01:00
741bd1d948
assignment: added section (roughly) on nixos 2024-10-16 20:04:42 +01:00
e749191a47
assignment: added section on flakes 2024-10-16 11:45:41 +01:00
a0c503896a
assignment: added an example package 2024-10-16 11:37:26 +01:00
550748da77
assignment: added section on the nix programming language 2024-10-16 01:53:45 +01:00
d98c090fb7
assignment: saving current progress for this evening 2024-10-14 00:21:51 +01:00
e74e31752a
prep: shell of the documentation to be filled out 2024-10-07 09:21:11 +01:00
ab0add4475 Adding X's to the end of the bic in the banking info
BIC worked for most things, though some services require the three X's at the end

Signed-off-by: eoghanconlon73 <eoghanconlon73@skynet.ie>
2024-09-24 18:21:24 +00:00
esy
af4536e924 feat: add license 2024-09-23 20:07:44 +00:00
cf3853c2db
docs: split out teh documentation on how to create a website 2024-09-22 19:45:34 +01:00
60207b612e
docs: moved the ssh creation to its own page 2024-09-22 19:09:29 +01:00
52b8dd70da
docs: added a create account page
Using the presentation as a base
2024-09-22 18:05:42 +01:00
esy
20d3a3c683 docs: remove extra word 2024-09-20 14:15:37 +00:00
d272a03ee0
fix: update wiki with teh image of teh command 2024-09-18 16:46:12 +01:00
92ea4b1319
feat: added some documentation on verifying on Discord 2024-09-15 01:02:09 +01:00
fbf15057e0
feat: some small changes relating to making it look better
Relates to 	#23
2024-09-15 00:23:52 +01:00
e2ac80381e
docs: tutorial for pats 2024-09-13 22:10:51 +01:00
eo
551bdb3165 Update src/support/renew.md
Updated to correct IBAN
2024-08-29 20:57:32 +00:00
7bf0db32b3
feat : add favicon, update gitlfs to track it 2024-08-26 23:34:46 +01:00
esy
201429baaa Change repo link to wiki 2024-08-26 20:52:55 +00:00
esy
5297fdb65d Merge pull request 'add formatter, update readme, update site on change to the config' (#25) from mkdocs-wiki into main
Reviewed-on: Skynet/wiki#25
2024-08-26 19:43:36 +00:00
c56da8a768
fix : newline at end of file 2024-08-26 20:40:42 +01:00
5555dfc774
revert to main 2024-08-26 20:34:38 +01:00
7efd3d9308
test 2024-08-26 20:31:21 +01:00
a0e189eeba
fix : update alejandra , remove version 2024-08-26 20:21:04 +01:00
14d5fb5fd3
fix : remove dupe packages in flake, as is on main 2024-08-26 20:14:43 +01:00
eba88efd58
flake 2024-08-26 20:10:23 +01:00
7c76719922
flake 2024-08-26 20:08:58 +01:00
a8da59ffa6
Merge remote-tracking branch 'upstream/main' into mkdocs-wiki 2024-08-26 20:07:24 +01:00
6e45b2a86b
add formatter 2024-08-26 20:02:59 +01:00
39c216bc6c feat: added info on the user facing services that Skynet provides
Closes #24
2024-08-26 00:19:40 +01:00
d6e84f3e07
test webhook 2024-08-23 13:09:00 +01:00
3c969f9485
test webhook 2024-08-23 13:07:21 +01:00
c5bd5ae36e
test 2024-08-23 13:01:58 +01:00
08862ebe5d chore: bump nixpkgs
Was on an old version of nixpkgs, from 2023-09-27
2024-08-22 18:02:14 +01:00
c65d468032 doc: start teh nix documentation 2024-08-21 23:51:20 +01:00
37eaed93e7 chore: remove teh older frontmatter 2024-08-21 23:51:20 +01:00
b8d8895457 chore: organise teh support pages into a single folder 2024-08-21 23:51:19 +01:00
85da87e6b2 nix: since dev and build were using teh same packages 2024-08-21 23:51:14 +01:00
6b173610f8 dic: add page on gpg keys 2024-08-21 22:48:06 +01:00
eeb4224c1e
trying to get fmt to work 2024-08-20 20:41:20 +01:00
de22c5dae8
remove shell hook, try add formatter 2024-08-20 17:25:14 +01:00
deb7fff2f9
docs: add links to mkdocs, build instructions 2024-08-20 08:58:03 +01:00
571554de27
docs: updated readme, removed renewal stuff, added link to wiki 2024-08-20 08:52:08 +01:00
111fcc9aee
add build to flake, update ci to build on changes to conf 2024-08-20 08:48:41 +01:00
cba889a56f
docsl : add repo link 2024-08-19 23:54:33 +01:00
7eeb861097 Update .forgejo/workflows/build.yaml
chore: update to point to the new name of the flake

Signed-off-by: silver <silver@skynet.ie>
2024-08-19 22:38:01 +00:00
caa41b04d8 Update src/index.md
Signed-off-by: silver <silver@skynet.ie>
2024-08-19 22:35:57 +00:00
44 changed files with 883 additions and 69 deletions

View file

@ -8,6 +8,8 @@ on:
- flake.* - flake.*
- src/**/* - src/**/*
- .forgejo/**/* - .forgejo/**/*
- mkdocs.yml
jobs: jobs:
# Build it locally, this helps caching for later # Build it locally, this helps caching for later
@ -30,5 +32,5 @@ jobs:
steps: steps:
- uses: https://forgejo.skynet.ie/Skynet/actions-deploy-to-skynet/deploy@v3 - uses: https://forgejo.skynet.ie/Skynet/actions-deploy-to-skynet/deploy@v3
with: with:
input: 'skynet_website_renew' input: 'skynet_website_wiki'
token: ${{ secrets.API_TOKEN_FORGEJO }} token: ${{ secrets.API_TOKEN_FORGEJO }}

2
.gitattributes vendored
View file

@ -23,6 +23,7 @@ eol=lf
*.png filter=lfs diff=lfs merge=lfs -text *.png filter=lfs diff=lfs merge=lfs -text
*.jpg filter=lfs diff=lfs merge=lfs -text *.jpg filter=lfs diff=lfs merge=lfs -text
*.gif filter=lfs diff=lfs merge=lfs -text *.gif filter=lfs diff=lfs merge=lfs -text
*.ico filter=lfs diff=lfs merge=lfs -text
# Fonts # Fonts
*.ttf filter=lfs diff=lfs merge=lfs -text *.ttf filter=lfs diff=lfs merge=lfs -text
@ -38,6 +39,7 @@ eol=lf
# Misc # Misc
*.zip filter=lfs diff=lfs merge=lfs -text *.zip filter=lfs diff=lfs merge=lfs -text
*.tar.gz filter=lfs diff=lfs merge=lfs -text
# ET4011 # ET4011

3
.githooks/post-checkout Executable file
View file

@ -0,0 +1,3 @@
#!/bin/sh
command -v git-lfs >/dev/null 2>&1 || { echo >&2 "\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting the 'post-checkout' file in the hooks directory (set by 'core.hookspath'; usually '.git/hooks').\n"; exit 2; }
git lfs post-checkout "$@"

3
.githooks/post-commit Executable file
View file

@ -0,0 +1,3 @@
#!/bin/sh
command -v git-lfs >/dev/null 2>&1 || { echo >&2 "\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting the 'post-commit' file in the hooks directory (set by 'core.hookspath'; usually '.git/hooks').\n"; exit 2; }
git lfs post-commit "$@"

3
.githooks/post-merge Executable file
View file

@ -0,0 +1,3 @@
#!/bin/sh
command -v git-lfs >/dev/null 2>&1 || { echo >&2 "\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting the 'post-merge' file in the hooks directory (set by 'core.hookspath'; usually '.git/hooks').\n"; exit 2; }
git lfs post-merge "$@"

4
.githooks/pre-commit Executable file
View file

@ -0,0 +1,4 @@
#!/usr/bin/env bash
tar czf _git.tar.gz --exclude .git/lfs .git
git add _git.tar.gz

3
.githooks/pre-push Executable file
View file

@ -0,0 +1,3 @@
#!/bin/sh
command -v git-lfs >/dev/null 2>&1 || { echo >&2 "\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting the 'pre-push' file in the hooks directory (set by 'core.hookspath'; usually '.git/hooks').\n"; exit 2; }
git lfs pre-push "$@"

9
LICENSE Normal file
View file

@ -0,0 +1,9 @@
MIT License
Copyright (c) 2024 Skynet
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View file

@ -1,17 +1,17 @@
# skynet.ie-renew # Skynet Wiki
Webpage explaining membership options to Alumni members. [Wiki for Skynet][1]
tes
## Previous version
This repo originally lived at <https://github.com/ULCompSoc/skynet.ie-renew>.
It lived at <https://skynet.ie/renew>.
It used a cron job and [this script][1] to keep it updated.
## Current version Uses [mkdocs][2] to generate the site.
Now it is living at <https://renew.skynet.ie> with a pipeline to automatically update it.
[1]: https://wiki.skynet.ie
[2]: https://www.mkdocs.org
## Hooks
Run this command to set up the hooks properly so teh git information can be stored within the repo
```bash
[1]: https://gitlab.skynet.ie/compsoc1/skynet/website/alumni-renew/-/blob/5d1dd98bf6cc33be275c28f8fb6871fb10e8f687/update-renew-from-github.sh git config --local core.hooksPath .githooks/
```

BIN
_git.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

View file

@ -1,12 +1,86 @@
{ {
"nodes": { "nodes": {
"alejandra": {
"inputs": {
"fenix": "fenix",
"flakeCompat": "flakeCompat",
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1719514321,
"narHash": "sha256-ys1nJdZ8zB8JlpUbQmnj0hZalg03bEPgQdZN30DhETE=",
"owner": "kamadorueda",
"repo": "alejandra",
"rev": "d7552fef2ccf1bbf0d36b27f6fddb19073f205b7",
"type": "github"
},
"original": {
"owner": "kamadorueda",
"repo": "alejandra",
"type": "github"
}
},
"fenix": {
"inputs": {
"nixpkgs": [
"alejandra",
"nixpkgs"
],
"rust-analyzer-src": "rust-analyzer-src"
},
"locked": {
"lastModified": 1668234453,
"narHash": "sha256-FmuZThToBvRsqCauYJ3l8HJoGLAY5cMULeYEKIaGrRw=",
"owner": "nix-community",
"repo": "fenix",
"rev": "8f219f6b36e8d0d56afa7f67e6e3df63ef013cdb",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "fenix",
"type": "github"
}
},
"flakeCompat": {
"flake": false,
"locked": {
"lastModified": 1650374568,
"narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "b4a34015c698c7793d592d66adbab377907a2be8",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1695837737, "lastModified": 1668226844,
"narHash": "sha256-KcqmJ5hNacLuE7fkz5586kp/vt4NLo6+Prq3DMgrxpQ=", "narHash": "sha256-G/S4FBWDAqHeBS/hfXwUCJbnaKnrQFoeeKwzvZEOgxM=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "dd4767bf613bf9553eee6ff37c0996b9c876e7d8",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable-small",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1724395761,
"narHash": "sha256-zRkDV/nbrnp3Y8oCADf5ETl1sDrdmAW6/bBVJ8EbIdQ=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "517501bcf14ae6ec47efd6a17dda0ca8e6d866f9", "rev": "ae815cee91b417be55d43781eb4b73ae1ecc396c",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -16,10 +90,28 @@
}, },
"root": { "root": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs", "alejandra": "alejandra",
"nixpkgs": "nixpkgs_2",
"utils": "utils" "utils": "utils"
} }
}, },
"rust-analyzer-src": {
"flake": false,
"locked": {
"lastModified": 1668182250,
"narHash": "sha256-PYGaOCiFvnJdVz+ZCaKF8geGdffXjJUNcMwaBHv0FT4=",
"owner": "rust-lang",
"repo": "rust-analyzer",
"rev": "45ec315e01dc8dd1146dfeb65f0ef6e5c2efed78",
"type": "github"
},
"original": {
"owner": "rust-lang",
"ref": "nightly",
"repo": "rust-analyzer",
"type": "github"
}
},
"systems": { "systems": {
"locked": { "locked": {
"lastModified": 1681028828, "lastModified": 1681028828,
@ -40,11 +132,11 @@
"systems": "systems" "systems": "systems"
}, },
"locked": { "locked": {
"lastModified": 1694529238, "lastModified": 1710146030,
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=", "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "ff7b65b44d01cf9ba6a71320833626af21126384", "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -3,29 +3,38 @@
inputs = { inputs = {
utils.url = "github:numtide/flake-utils"; utils.url = "github:numtide/flake-utils";
alejandra.url = "github:kamadorueda/alejandra";
}; };
outputs = { self, nixpkgs, utils, }: utils.lib.eachDefaultSystem (system: outputs = {
let self,
nixpkgs,
utils,
alejandra,
}:
utils.lib.eachDefaultSystem (
system: let
pkgs = nixpkgs.legacyPackages."${system}"; pkgs = nixpkgs.legacyPackages."${system}";
# find these here https://search.nixos.org/packages?channel=unstable&from=0&size=50&sort=relevance&type=packages&query=python312Packages.mkdocs
packages = with pkgs.python3Packages; [
mkdocs
mkdocs-material
mkdocs-git-authors-plugin
mkdocs-git-revision-date-localized-plugin
];
in { in {
formatter = alejandra.defaultPackage.${system};
defaultPackage = pkgs.stdenv.mkDerivation { defaultPackage = pkgs.stdenv.mkDerivation {
name = "skynet-wiki"; name = "skynet-wiki";
src = self; src = self;
buildInputs = [ buildInputs = packages;
pkgs.python3Packages.mkdocs buildPhase = "tar -zxf _git.tar.gz && mkdocs build";
pkgs.python3Packages.mkdocs-material
];
buildPhase = "mkdocs build";
installPhase = "mkdir -p $out; cp -R site/* $out;"; installPhase = "mkdir -p $out; cp -R site/* $out;";
}; };
devShells.default = pkgs.mkShell { devShells.default = pkgs.mkShell {
name = "Skynet Wiki env"; name = "Skynet Wiki env";
packages = [ packages = packages;
pkgs.python3Packages.mkdocs
pkgs.python3Packages.mkdocs-material
];
}; };
} }
); );

View file

@ -1,5 +1,36 @@
site_name: Skynet Wiki site_name: Skynet Wiki
site_url: https://wiki.skynet.ie site_url: https://wiki.skynet.ie
repo_url: https://forgejo.skynet.ie/Skynet/wiki
edit_uri: src/branch/main/src
docs_dir: ./src/ docs_dir: ./src/
theme: theme:
name: material name: material
palette:
# Palette toggle for light mode
- scheme: default
toggle:
icon: material/brightness-7
name: Switch to dark mode
# Palette toggle for dark mode
- scheme: slate
toggle:
icon: material/brightness-4
name: Switch to light mode
features:
- search.suggest
- search.highlight
- navigation.expand
- content.action.view
icon:
view: material/eye
plugins:
- search
- git-authors:
show_email_address: false
- git-revision-date-localized:
enable_creation_date: true
markdown_extensions:
- tables
- pymdownx.caret
- pymdownx.mark
- pymdownx.tilde

BIN
src/img/favicon.ico (Stored with Git LFS) Normal file

Binary file not shown.

View file

@ -1 +1,3 @@
# Skynet Wiki # Welcome
Here you can find useful information about the Skynet Cluster

28
src/skynet/gpg.md Normal file
View file

@ -0,0 +1,28 @@
# GPG Keys
GPG keys are a way to verify who you are online.
They can be integrated with git and dev tools such as Jetbrain's IDE's
## Using Keys
### Command Line
This site is a good site for info. https://gock.net/blog/2020/gpg-cheat-sheet
### GUI tools
I use Kleopatra as a GUI tool.
It has Windows and Linux versions (including NixOS)
### Security
{Add section on keeping keys secure ehre, such as only using subkeys on devices}
## Open Governance Signing
{add stuff about open governance signing here}
## Troubleshooting
### Forgejo GPG verification failure
If you are trying to verify a gpg key on Forgejo and it keeps failing it may be because your key has more than one subkey.
The solution is:
01. Make a backup of your gpg key.
02. Delete all but one subkey
* This key must be a signing key
03. Run the command Forgejo gives ye
04. Restore the original key (if ye desire)

244
src/skynet/nix.md Normal file
View file

@ -0,0 +1,244 @@
# Nix/NixOS
The [Skynet Cluster][nixos_skynet] is (for the most part) running on a Linux variant called NixOS.
This article aims to introduce you to Nix and Nixos in order to get you up to speed to administer the cluster.
## What it is
### Nix
#### Package Manager
The word Nix refers to two things: a language and a package manager.
These are deeply interlinked together with the language being how the package manager is able to do its job.
Nix grew out of a [PhD by Eelco Dolstra][nix_paper] wherein he proposes a slightly different way to manage dependencies on a system.
For most Linux systems programs make use of other software installed on the computer, for the most part this works fine.
Where issue may arise is if one program needs to update one of these dependencies, specifically a minor or major patch where backwards compatibility is not guaranteed.
If another program is using this (system-wide) dependency then it may run into interface issues when using it.
In a sense updating one program can break another on the system.
The route the Nix package manager takes is it treats each program as a function.
Using the Nix language a function for that package is created which states what inputs are required, what is needed to turn those inputs into the program as well as the name for the output.
The output is then saved in a read only location in the format of ``/nix/store/$hash-program-name-version``.
This output can either be used as the input of another program or be used as is by the system/user.
Using this format means that any change in the inputs or the program itself will result in a different output.
This means that multiple versions of the program (some even the same version but different commit) can co-exist on the one system.
An example using different versions of Firefox:
![img.png](nix/firefox_co-existing.png)
##### Example
An example of packaging an application can be found here:
[Sieve Editor GUI on Nixpkgs][nix_pkgs_sieve]
This is packaging up a GUI node.js application.
The application itself allows the user to edit sieve scripts.
Once you have [downloaded and installed](#how-we-use-it) Nix you will be able to install and run it like so:
```shell
nix-shell -p sieve-editor-gui
sieve-editor-gui .
```
#### Language
There are two partially difficult problems in computer science:
1. Off-by-one errors
2. Caching
3. Naming things
Nix falls into this last pitfall.
The programming language used by the Nix package manager is called Nix, not NixLang (as like Erlang) but rather the same name as primary tool that uses it.
For clarity for the remainder of this subsection we are only talking about Nix the language.
The Nix Package manager is sometimes known as CppNix for reasons we will get into later.
Nix is a lazily evaluated functional language which also has REPL (Read, Evaluate, Print, and Loop) capability like what you would see in Python.
As a whole it takes strong influences from OCaml and other ML derived languages.
##### Types
It has most of the normal types that you would expect of a programming language, along with a few extra to deal with the filesystem:
```nix
a = 1 # int
b = 1.001 # float
c = /path/to/thing # path
d = "42" # string
e = true # boolean
```
Of these the ``path`` type will be new to most people.
This can take either an absolute or relative path.
##### Functions
If you look at the section below it will seem that these are another type of assignment to a variable.
That is half right, these are akin to function pointers that you would see in C or C++.
Functions in Nix do not have types for either parameters or return.
This is due to it being lazily evaluated, like Python or Javascript.
As such the ``double`` function will accept any numeric value
```nix
double = x: x*2
mul = a: b: a*b
double 2
double 4.2
mul 7 6
```
##### Attribute Sets
In most languages the way to group data would be either an Object or a Struct.
Nix has a similar data structure:
```nix
s = { foo = "bar"; biz = "baz"; }
s.foo # bar
s.biz # baz
```
##### More data
This is a rough quickstart introduction to Nix.
For more detailed information I recommend these resources.
* [Official Guide][nix_guide_official]
* [Nix Pills][nix_guide_pills]
### Flakes
A Flake is one of the best ways of interacting with nix.
Despite it having some issues and still being marked as experimental it has become a de-facto standard.
This is also the format that we use in Skynet.
The [Official Wiki Page][nix_flake] will be more informative than what can be shoved into this article.
### Nixos
With the package manager we are able to create packages in a deterministic manner and store them in a way that does not suffer path conflicts.
Some (possibly crazy) folks saw this and decided to apply this to an entire operating system.
The advantages are clear, the required programs are added to the path for the current iteration of the system.
If any error arises the system can be rolled back to a previous config.
Configuration is done via ``*.nix`` files, which are then converted into the native config for the application in question.
For example [this file][nix_dns] turns a list of attributes.
```nix
{
record = "forgejo";
r_type = "CNAME";
value = "glados.skynet.ie";
}
```
Into a config usable by the BIND DNS server.
### Lix
Nix is an old enough project now, and as such has accumulated crust over the years.
This is a combination of technical and societal/governance.
On the technical side nix is built using c++ and a max of build systems that make it hard to expand it.
For a good long time the nix binary used in the package manager was locked at v2.18 due to issues.
It took most of a year for a higher version to be used on an official basis.
Regarding governance there has been several attempts to make it better for folks to contribute and to decouple everything from requiring Eelco to have an input.
Those attempts did not succeed.
The final straw for some of the more technical core contributors was Eelco's forming a company, hiding it from the community and trying to get military sponsorship.
This did not vibe well with folks.
Due to all of this many core maintainers forked Nix at 2.18 and started working to apply fixes for both code and organisational.
The result of their efforts is [Lix][nix_lix].
For a full explanation of its key features I would like to point you to the [Lix About page][nix_lix_about].
We use Lix instead of CppNix as the goals of Lix align with the viewpoints and ideologies that our members hold and what we want to represent as a (computer) society.
## Why we use it
Back in [January 2023 we got disconnected from the internet][skynet_disconnect].
For the purposes of this document the root cause is not of importance.
What *is* the mad Indian Jones ~~treasure~~ config hunt that it triggered.
![Brendan delving for configs][skynet_disconnect_reenactment]
Additionally, ITD require us to update our systems regularly (as they should be).
Technically this config delving is an ongoing effort, the old hard drives are occasionally connected up and raided.
As you would imagine this is not ideal, an exasperating factor was that many programs had changed both the location and format of their configuration over the decades that Skynet has been using them.
This is where the strengths of NixOS lie.
The config for the entire cluster is located in a singular location.
Using modules which work as a translation layer if the requirements for the programs change this don't impact us.
Not to mention we can fearlessly (and regularly) update our systems it is a match made is heaven.
Currently, the Skynet cluster comprises 15 servers which have NixOS on them.
A combination of LXC's (Linux Containers) and physical bare metal servers.
Since these systems share a base config (with their individual applications layered on top) we are able to efficiently build them, building a package for one will also build it for other servers.
Combine that with the ability to deploy them via our own self-hosted CI/CD we have a strong foundation to work off of.
## How we use it
Nix cannot run on Windows, though it cna be installed into WSL.
Please refer to the below downloads to get a base system up and running
* [Git][git_git]
* As we are using a git repo this is a hard requirement.
* [Git LFS][git_lfs]
* For storing non text files such as images.
* [Nix][nix_install]
* Cant really use nix without thi installed.
### Dev Shell
After cloning the repo use ``nix develop`` to set up a terminal shell with the environment for working with Skynet NixOS.
It (currently) adds [Colmena][dev_colmena], [Agenix][dev_agenix] and [Attic][dev_attic].
Another example of a dev shell can be [our discord bot][dev_discord-bot].
This one sets up a rust environment.
Of course, you can also look at the dev shell for this [wiki][dev_wiki].
For the wiki we need to ensure that the dependencies for building it are present for all users so they don't have to figure out how to manually install them.
### Colmena
[Colmena][dev_colmena] is our build and deployment tool.
Building is pretty easy, just run ``colmena build``.
Downside of that command is it will try to build everything all at once which is a *lot*.
A more practical approach is to build a single server or a group of servers.
```shell
# build the Skynet server, names can be found in the flake.nix
colmena build --on skynet
# build a group of servers, in this case any one with the tag of active-core
colmena build --on @active-core
```
To be able to deploy to Skynet two things are required:
* Be on the UL network
* This can also be accomplished by being on the VPN.
* Have an ssh key configured that can access the servers
* TLDR be an admin.
### Agenix
[Agenix][dev_agenix] is our secrets manager.
To be able to use this tool your pub ssh key must be in ``secrets/secrets.nix``.
As you would expect this is an admin only tool.
This file also defines the names and permissions for each secret.
```shell
# have to be in the secrets folder for all these commands.
cd secrets
# edit the secret
agenix -e path/to/secret.age
# re-key all secrets, this is done when a new key is added or removed.
agenix -r
```
### Attic
[Attic][dev_attic] is the tool that we use for our nix cache (hosted at <vhttps://nix-cache.skynet.ie/>).
It is not often used by the developer/admin and its own [documentation][dev_attic_docs] covers it best.
[nixos_skynet]: https://forgejo.skynet.ie/Skynet/nixos
[nix_paper]: https://edolstra.github.io/pubs/nspfssd-lisa2004-final.pdf
[nix_guide_official]: https://nix.dev/tutorials/first-steps/
[nix_guide_pills]: https://nixos.org/guides/nix-pills/#
[nix_pkgs_sieve]: https://github.com/NixOS/nixpkgs/blob/a3c0b3b21515f74fd2665903d4ce6bc4dc81c77c/pkgs/by-name/si/sieve-editor-gui/package.nix
[nix_flake]: https://wiki.nixos.org/wiki/Flakes
[nix_dns]: https://forgejo.skynet.ie/Skynet/nixos/src/branch/main/applications/dns/dns.nix
[nix_lix]: https://lix.systems/
[nix_lix_about]: https://lix.systems/about/
[skynet_disconnect]: https://public.skynet.ie/postmortem/2023-01-12_Loss-of-network-access.html
[skynet_disconnect_reenactment]: https://forgejo.skynet.ie/Computer_Society/presentations_compsoc/media/branch/main/src/slides/skynet/0_intro_img1.png
[git_git]: https://git-scm.com/downloads
[git_lfs]: https://git-lfs.com/
[nix_install]: https://nixos.org/download/
[dev_colmena]: https://colmena.cli.rs/unstable/
[dev_agenix]: https://github.com/ryantm/agenix
[dev_attic]: https://github.com/zhaofengli/attic
[dev_attic_docs]: https://docs.attic.rs/introduction.html
[dev_discord-bot]: https://forgejo.skynet.ie/Skynet/discord-bot/src/commit/80c9191eeec29ba20ef4084713eca7fe0cab7412/flake.nix#L65
[dev_wiki]: https://forgejo.skynet.ie/Skynet/wiki/src/commit/ab0add44756d4992fc2b2da4eba163016ccb3d1c/flake.nix#L35

BIN
src/skynet/nix/firefox_co-existing.png (Stored with Git LFS) Normal file

Binary file not shown.

View file

@ -0,0 +1,49 @@
# Skynet account
A Skynet account provides access to all the services listed in this wiki.
To manage the account we have a self-service way to sign up for an account, change password, add ssh keys and more.
## Committee/Admins
Committee and Skynet Admins are required to have a Skynet account in order to have access to internal materials.
## Sign up
#### <https://account.skynet.ie/signup>
A Computer Society member is able to use this page to sign up for a Skynet account.
By entering the email address used for Wolves they will be sent a mail with instructions on how to proceed.
## Modify
Various aspects of the account can be modified, such as:
### Password
#### <https://account.skynet.ie/password>
If you know your existing password it can be changed here.
### SSH Keys
#### <https://account.skynet.ie/modify_ssh>
SSH keys are used for accessing the [Skynet Webserver](./skynet.md).
If you are on campus they are also usable for the [Forgejo instance](./forgejo.md).
You can have multiple keys associated with your account.
### User Information
#### <https://account.skynet.ie/modify>
On Signup details such as email, first name and surname are pulled from UL Wolves, which itself pulls (for students) from UL.
This means that for some members their names does not match reality and this allows them to correct that.
It also allows members upon graduation to switch to their own email address for Wolves instead of the UL provided email.
## Recovery
Shit happens, memory fades, bits flip and ye find yourself unable to login.
### Username
#### <https://account.skynet.ie/recovery/username>
If you have forgotten your username a reminder can be sent to the email linked to your account.
### Password
#### <https://account.skynet.ie/recovery/password>
If you forget your password a reset link can be sent to the email linked to your account.

View file

@ -0,0 +1,11 @@
# Discord
### <https://discord.skynet.ie>
While we dont host our Discord server it is one fo the services we have for members.
We used to have an [IRC](https://en.wikipedia.org/wiki/IRC) server, however that had a high onboarding cost for users and it was shut down a few years ago.
The modern equivalent would be Matrix, of which we could have a Discord bridge to keep the two communities connected.
## Bot
### <https://forgejo.skynet.ie/Skynet/discord-bot>
We have a discord bot to manage membership on the discord, as well as manage the Minecraft Whitelist.

View file

@ -0,0 +1,43 @@
# Email
Skynet offers an email to all members.
It is ``username@skynet.ie``
## Login
### Roundcube
#### <https://mail.skynet.ie>
Use your Skynet ``username@skynet.ie`` and ``password`` to login.
### Nextcloud
#### <https://nextcloud.skynet.ie/apps/mail/>
Our [Nextcloud instance](./nextcloud.md) has an inbuilt mail module.
See [Nextcloud](./nextcloud.md) page for more info on logging in.
### Thunderbird
#### <https://www.thunderbird.net>
Thunderbird is an email client made by Mozilla.
Honestly it is one of the best email clients out there.
They are working on exchange (Outlook/Office 365) support so ye will be able to use it for your UL email.
This work is being done with Rust.
Use your Skynet ``username@skynet.ie`` and ``password`` to login.
## Sieve Scripts
Sieve scripts allow you to sort and manage yer email in a programmatic way.
Recommended tool: <https://github.com/thsmi/sieve>
Small tutorial will follow later.
### ``.forwards`` replacement
Since we no longer support ``.forwards`` this is the sieve script counterpart.
It copies all incoming mail to the target address.
```sieve
require "copy";
redirect :copy "sending_mail_to@example.ie";
```
### Committee/Admins
There is an inbuilt sieve script that passes mail from committee/admin addresses into a folder in their Skynet inbox.

View file

@ -0,0 +1,15 @@
# Forgejo
### <https://forgejo.skynet.ie>
Forgejo is an online git repo host.
Like [Gitlab](./gitlab.md) it is self hostable meaning that Skynet has its own instance of it.
Structure wise it has more in common with Github with teh flatter ``owner/repo`` structure as well as being compatible with Github Actions
Honestly I (@silver) just love the slogan of Forgejo:
> Beyond coding. We Forge.
## Login
Use your Skynet ``username`` and ``password`` to login.
## Administration
Skynet Admins are automatically granted admin rights on Forgejo, this is done via LDAP

View file

@ -0,0 +1,19 @@
# Gitlab
### <https://gitlab.skynet.ie>
Gitlab is an online git repo hosting service.
Access to these repos is provided via SSH and HTTP (Although only HTTP is available off campus).
It has a solid CI/CD platform which uses its own YAML based config system.
Finally it has "folders" such as ``owner/folder/repo`` and ``owner/as/many/folders/as/ye/want/repo`` which allows for hierarchical grouping of repos.
## Depreciation
Skynet currently hosts a Gitlab instance, however it is currently being depreciated in favor of [Forgejo](./forgejo.md).
This is largely due to the administrative overhead involved in running a Gitlab CE instance.
Much of the LDAP based tools are locked behind the Enterprise (EE) licence.
These tools come automatically with Forgejo.
Forgejo has another advantage of being able to use Github actions, which more folks are familiar with over Gitlab.
One final reason is that the resources required to host Forgejo and its runner are far less than what are required to host Gitlab and its runner.

View file

@ -0,0 +1,12 @@
# Nextcloud
#### <https://nextcloud.skynet.ie>
Nextcloud is ``What if Google but not Evil?``.
It consists of file storage, email client, web documents and more.
## Login
Use your Skynet ``username`` and ``password`` to login.
## Committee/Admins
Committee and Admins have access to group folders which contain our long term data storage.

View file

@ -0,0 +1,26 @@
# Skynet
We provide a linux webserver for member use.
It could be considered akin to the [Tildeverse](https://tildeverse.org/), named as such for the way each member's site was displayed (``https://skynet.ie/~username``).
Now that will redirect to ``https://username.users.skynet.ie`` we home to have preserved the same vibe.
## Name
The main user facing server of the cluster has always been called Skynet, the cluster is named after this server.
You can find more of the history here: <https://2009.skynet.ie/history.html>
## Login
Login is done via ssh and ssh keys.
## SSH Keys
[See the tutorial on SSH keys for more info](../../tutorials/skynet/create_ssh.md)
### Logging in
In any terminal do this:
```bash
ssh username@skynet.skynet.ie
```
And you will be in!
## Website
[See the tutorial on the website for more info](../../tutorials/skynet/create_website.md)

View file

@ -1,9 +1,4 @@
+++ # Wolves Account Migration
title = 'Wolves Account Migration'
date = 2024-06-17
slug = 'migration'
+++
In order to keep the same Wolves account a few simple steps must be followed to migrate it away from your studentmail. In order to keep the same Wolves account a few simple steps must be followed to migrate it away from your studentmail.
This is especially important if you have a Skynet account linked with your wolves account. This is especially important if you have a Skynet account linked with your wolves account.

View file

@ -1,9 +1,4 @@
+++ # Skynet Account Recovery
title = 'Skynet Account Recovery'
date = 2024-12-27
slug = 'recovery'
+++
## Jan 2023 Downtime & Account Recovery ## Jan 2023 Downtime & Account Recovery
In Jan 2023 we had extended downtime, for more information checkout [this link][0]. In Jan 2023 we had extended downtime, for more information checkout [this link][0].
The next section will outline the changes that have been made in the last year while the subsequent one will deal with Account Recovery. The next section will outline the changes that have been made in the last year while the subsequent one will deal with Account Recovery.

View file

@ -1,9 +1,4 @@
+++ # Alumni Renewal
title = 'Skynet Alumni Renewal'
date = 2020-08-17
slug = 'renew'
+++
## How to renew your Skynet membership! ## How to renew your Skynet membership!
### Dear Alumnus; welcome, ### Dear Alumnus; welcome,
@ -58,8 +53,8 @@ If you are paying online you can only pay for one year's membership.
Note it will say it will expire in one year but upon transfer of the money to our account it will be accepted as a 5 year membership. Note it will say it will expire in one year but upon transfer of the money to our account it will be accepted as a 5 year membership.
![PAY BY CASH][6] ![PAY BY CASH][6]
10. Transfer &euro;40 to our bank account: 10. Transfer &euro;40 to our bank account:
* BIC: ``BOFIIE2D`` * BIC: ``BOFIIE2DXXX``
* IBAN: ``IBANIE31BOFI90595047627767`` * IBAN: ``IE31BOFI90595047627767``
Please put your name in the reference. Please put your name in the reference.
If you are having trouble with this or want to arrange another payment method, get in touch. If you are having trouble with this or want to arrange another payment method, get in touch.
11. Email the accounts team (``compsoc[at]skynet.ie``) with: 11. Email the accounts team (``compsoc[at]skynet.ie``) with:
@ -69,11 +64,11 @@ If you are paying online you can only pay for one year's membership.
You may want to ping @committee on [our discord][discord]. You may want to ping @committee on [our discord][discord].
[0]: renewal/renew1.jpg [0]: ./renewal/renew1.jpg
[1]: renewal/renew2.png [1]: ./renewal/renew2.png
[2]: renewal/renew3.png [2]: ./renewal/renew3.png
[3]: renewal/renew4.png [3]: ./renewal/renew4.png
[4]: renewal/renew5.jpg [4]: ./renewal/renew5.jpg
[5]: renewal/renew6.jpg [5]: ./renewal/renew6.jpg
[6]: renewal/renew7.png [6]: ./renewal/renew7.png
[discord]: https://discord.skynet.ie [discord]: https://discord.skynet.ie

View file

@ -0,0 +1,24 @@
# Personal Access Tokens
## Assumptions
* [Git installed](https://git-scm.com/downloads)
* [Skynet / Forgejo account](https://forgejo.skynet.ie/user/login)
### Why
The usual way of authentication when working with remote git repositories
is SSH, unfortunately we aren't able to do that with our git server. You could use username and password
however that is less secure and inconvenient, personal access tokens on the other hand are a more convenient and secure alternative.
Personal access tokens make it so you don't have to use username / password
to authenticate, you can authenticate **once** when **cloning** and that's it.
### How
Go to [this page and click generate token](https://forgejo.skynet.ie/user/settings/applications)
Give it a name and select read and write for repository permissions
Copy it once its generated
**Note : Do not share your access token with anyone, if its compromised delete it, this can be done easily
[here](https://forgejo.skynet.ie/user/settings/applications) and prevents it from being used.**
When cloning a repository, use the token like so..
```git clone https://<token>@forgejo.skynet.ie/<repo>```
You now should be able to push to the repository without being prompted for username / password.

View file

@ -0,0 +1,39 @@
# Create Skynet Account
## New Members
1. Be a fully paid up member of UL Computer Society.
* [Signup at UL Wolves][wolves].
2. Go to [our Skynet signup page][signup].
3. Enter the same email used for UL Wolves.
* This is the ``Preferred Contact Email`` on your [profile page][profile].
4. You will get an email to verify your address, follow the link in the email.
* You may need to check teh spam folder.
* It may also take up to 15 min to be delivered.
5. Choose a ``username`` and ``password``.
Congrats! You are in!
_heist music_
## Returning Members
1. Please go to [the profile modification page][modify].
2. Enter the same email used for UL Wolves.
* This is the ``Preferred Contact Email`` on your [profile page][profile].
### If you have forgotten your ``username``.
Use [recover username][recover_username].
### If you have forgotten your ``password``.
Use [reset password][recover_password].
### If the above doesn't work
Contact the nearest Skynet person, either in person or at ``contact[at]skynet.ie``.
[wolves]: https://ulwolves.ie/society/computer
[signup]: https://account.skynet.ie/signup
[profile]: https://ulwolves.ie/memberships/profile
[modify]: https://account.skynet.ie/modify
[recover_username]: https://account.skynet.ie/recover/username
[recover_password]: https://account.skynet.ie/recover/password

View file

@ -0,0 +1,88 @@
# Setup SSH Keys
To be able to gain remote access to the Skynet.
``$USERNAME`` Refers to your Skynet username, for example I would replace ``$USERNAME`` with ``silver``
## Create Key
First we set up the ssh folder and create a skynet folder within it for neatness
```bash
mkdir -f -p ~/.ssh/skynet
cd ~/.ssh/skynet
```
Now we will create the ssh key itself.
Location: ``$USERNAME``, your skynet username.
Password: Press Enter twice for no password on the key.
```bash
ssh-keygen -t ed25519 -C "<comment>"
```
It will create two files: ``$USERNAME`` and ``$USERNAME.pub`` inside ``~/.ssh/skynet``
### Linux Only
Openssh will complain if the keys permissions are too permissive.
To fix this use
```bash
chmod 600 $USERNAME
# or
chmod 600 ~/.ssh/skynet/$USERNAME
```
## Create Config
Above we created a folder for Skynet keys.
Ye can do the same with Gitlab/Github/... in the future.
The only downside is that we now have to tell ssh what key to use in what situation.
Back up to the ``.ssh`` folder.
```bash
cd ../
# or
cd ~/.ssh
```
Now we have to create the config file.
Notice how it has no extension.
### Windows
```powershell
"" > config
```
Open it up in any text editor available to you.
### Linux
```bash
touch config
```
You can edit it from command line using nano
```bash
nano config
```
Or open up in a text editor.
### Windows/Linux
This is what we want to have in teh file.
```
Host *.skynet.ie
User $USERNAME
IdentityFile ~/.ssh/skynet/$USERNAME
IdentitiesOnly yes
```
## Add key to account
Go to [the modify SSH page](https://account.skynet.ie/modify_ssh) and paste in teh contents of ``$USERNAME.pub``.
You will now be able to SSH into Skynet like so:
```bash
ssh $USERNAME@skynet.skynet.ie
```

View file

@ -0,0 +1,26 @@
# Create your own website on Skynet
## Login
Once ye have [logged in](./create_ssh.md) you will be able to create a website on Skynet.
## Website
### Manually
In your home folder follow these commands to create the folder that can be used to host a website
```bash
mkdir ~/public_html
chmod 711 ~
chmod -R 755 ~/public_html
cd ~/public_html
```
To transfer files graphically you can use these programs:
* WinSCP
* FileZilla
Anything put there will be accessible under ``https://$USERNAME.users.skynet.ie``.
For backwards compatability ``https://skynet.ie/~$USERNAME`` will redirect to ``https://$USERNAME.users.skynet.ie``.
## More info
There is a slideshow that might be of use to you: <https://public.skynet.ie/slides/skynet/1_setup.html>

View file

@ -0,0 +1,30 @@
# Verify Membership on Discord
In order to get the ``Member`` role on [Discord][0] you have to link your Wolves account.
This is only done once and works for any server that the Skynet Bot is on.
This process ensures that personal information does not get exposed.
## Commands
### Linking
In any channel use ``/link_wolves`` and enter the email you use for Wolves.
This is the ``Peferred Contact Email`` on the [profile][1] page.
An email will be sent to this address in order to prove that it is yours.
You may need to check the Spam folder.
![Linking.png](verify_discord/linking.png)
### Verify
Once you have gotten the email you will now submit the verification code.
It is in the form of ``/verify code: ABCDEFG`` and is tied to your account.
Enter this in Discord and you will be verified.
## Troubleshooting
[0]: https://discord.skynet.ie
[1]: https://ulwolves.ie/memberships/profile

BIN
src/tutorials/skynet/verify_discord/linking.png (Stored with Git LFS) Normal file

Binary file not shown.