rename raspberry pi hostname and switch to flake
This commit is contained in:
parent
bd3a10eaff
commit
480a7c2bfc
|
@ -36,5 +36,13 @@
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
nixosConfigurations.ursa-minor = nixpkgs.lib.nixosSystem
|
||||||
|
{
|
||||||
|
inherit pkgs;
|
||||||
|
inherit system;
|
||||||
|
modules = [
|
||||||
|
./ursa-minor/configuration.nix
|
||||||
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
"cgroup_enable=memory"
|
"cgroup_enable=memory"
|
||||||
];
|
];
|
||||||
|
|
||||||
networking.hostName = "nixos-rpi"; # Define your hostname.
|
networking.hostName = "ursa-minor"; # Define your hostname.
|
||||||
# Pick only one of the below networking options.
|
# Pick only one of the below networking options.
|
||||||
networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||||
# networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
|
# networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
|
||||||
|
@ -39,67 +39,6 @@
|
||||||
# networking.proxy.default = "http://user:password@proxy:port/";
|
# networking.proxy.default = "http://user:password@proxy:port/";
|
||||||
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||||||
|
|
||||||
# [Unit]
|
|
||||||
# Description=Lightweight Kubernetes
|
|
||||||
# Documentation=https://k3s.io
|
|
||||||
# Wants=network-online.target
|
|
||||||
# After=network-online.target
|
|
||||||
|
|
||||||
# [Install]
|
|
||||||
# WantedBy=multi-user.target
|
|
||||||
|
|
||||||
# [Service]
|
|
||||||
# Type=${SYSTEMD_TYPE}
|
|
||||||
# EnvironmentFile=-/etc/default/%N
|
|
||||||
# EnvironmentFile=-/etc/sysconfig/%N
|
|
||||||
# EnvironmentFile=-${FILE_K3S_ENV}
|
|
||||||
# KillMode=process
|
|
||||||
# Delegate=yes
|
|
||||||
# # Having non-zero Limit*s causes performance problems due to accounting overhead
|
|
||||||
# # in the kernel. We recommend using cgroups to do container-local accounting.
|
|
||||||
# LimitNOFILE=1048576
|
|
||||||
# LimitNPROC=infinity
|
|
||||||
# LimitCORE=infinity
|
|
||||||
# TasksMax=infinity
|
|
||||||
# TimeoutStartSec=0
|
|
||||||
# Restart=always
|
|
||||||
# RestartSec=5s
|
|
||||||
# ExecStartPre=/bin/sh -xc '! /usr/bin/systemctl is-enabled --quiet nm-cloud-setup.service 2>/dev/null'
|
|
||||||
# ExecStartPre=-/sbin/modprobe br_netfilter
|
|
||||||
# ExecStartPre=-/sbin/modprobe overlay
|
|
||||||
# ExecStart=${BIN_DIR}/k3s \\
|
|
||||||
# ${CMD_K3S_EXEC}
|
|
||||||
|
|
||||||
# Adapted from https://get.k3s.io/
|
|
||||||
# systemd.services.k3s = {
|
|
||||||
# description = "Lightweight Kubernetes";
|
|
||||||
# documentation = [ "https://k3s.io" ];
|
|
||||||
# serviceConfig = {
|
|
||||||
# Type = "notify";
|
|
||||||
# # EnvironmentFile = "-/etc/default/%N";
|
|
||||||
# # EnvironmentFile = "-/etc/sysconfig/%N";
|
|
||||||
# # EnvironmentFile = -${FILE_K3S_ENV};
|
|
||||||
# KillMode = "process";
|
|
||||||
# Delegate = "yes";
|
|
||||||
# # Having non-zero Limit*s causes performance problems due to accounting overhead
|
|
||||||
# # in the kernel. We recommend using cgroups to do container-local accounting.
|
|
||||||
# LimitNOFILE = 1048576;
|
|
||||||
# LimitNPROC = "infinity";
|
|
||||||
# LimitCORE = "infinity";
|
|
||||||
# TasksMax = "infinity";
|
|
||||||
# TimeoutStartSec = 0;
|
|
||||||
# Restart = "always";
|
|
||||||
# RestartSec = "5 s";
|
|
||||||
# # ExecStartPre = /bin/sh - xc '! /usr/bin/systemctl is-enabled --quiet nm-cloud-setup.service 2>/dev/null';
|
|
||||||
# # ExecStartPre = -/sbin/modprobe br_netfilter;
|
|
||||||
# # ExecStartPre = -/sbin/modprobe overlay;
|
|
||||||
# ExecStart = "${pkgs.k3s}/bin/k3s server --write-kubeconfig-mode=644";
|
|
||||||
# };
|
|
||||||
# after = [ "network-online.target" ];
|
|
||||||
# wants = [ "network-online.target" ];
|
|
||||||
# wantedBy = [ "multi-user.target" ];
|
|
||||||
# };
|
|
||||||
|
|
||||||
services.k3s.enable = true;
|
services.k3s.enable = true;
|
||||||
services.k3s.role = "server";
|
services.k3s.role = "server";
|
||||||
services.k3s.extraFlags = toString [
|
services.k3s.extraFlags = toString [
|
||||||
|
@ -107,7 +46,7 @@
|
||||||
];
|
];
|
||||||
|
|
||||||
environment.variables = {
|
environment.variables = {
|
||||||
KUBECONFIG = "/home/nixos/.kube/k3s.yaml";
|
KUBECONFIG = "/home/nixos/.kube/config";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
# Define a user account. Don't forget to set a password with ‘passwd’.
|
Loading…
Reference in New Issue