Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enable k3s for linode #21

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions identity-server/kubernetes.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: hello-world
labels:
app: hello-world
spec:
replicas: 1
selector:
matchLabels:
app: hello-world
template:
metadata:
labels:
app: hello-world
spec:
containers:
- name: nginx
image: nginx:stable
ports:
- containerPort: 80
---
# service.yaml
apiVersion: v1
kind: Service
metadata:
name: hello-world
spec:
type: NodePort
selector:
app: hello-world
ports:
- port: 80
targetPort: 80
nodePort: 30080
25 changes: 25 additions & 0 deletions nix/nixos/home.nix
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,31 @@
programs.home-manager.enable = true;
programs.git.enable = true;

# shell stuff
programs.zsh = {
enable = true;
autosuggestion.enable = true;
enableCompletion = true;
oh-my-zsh.enable = true;
initExtra = ''
set -o vi
'';
envExtra = ''
'';
};

xdg.enable = true;
xdg.configFile = {
"nvim" = {
source = pkgs.fetchFromGitHub {
owner = "thebutlah";
repo = "init.lua";
rev = "5dd312fe5f06e6301baa55f7cf0c70296b03c25f";
hash = "sha256-GR03IkfAHUlVeM1QOlPKDRPw0HboJZ+AcJsQ5ORcAE8=";
};
};
};

# Nicely reload system units when changing configs
systemd.user.startServices = "sd-switch";

Expand Down
5 changes: 5 additions & 0 deletions nix/nixos/servers-us-east-1/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,11 @@

users.groups = {
plugdev = { };
${username} = { };
};
users.users = {
${username} = {
group = username;
isNormalUser = true;
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBLmHbuCMFpOKYvzMOpTOF+iMX9rrY6Y0naarcbWUV8G ryan@ryan-laptop"
Expand Down Expand Up @@ -100,6 +102,9 @@
};
};

services.k3s = {
enable = true;
};

environment.systemPackages = with pkgs; [
neovim
Expand Down