Compare commits

..

No commits in common. "7b54a09af6dbf2bc975375f9a59153868acf2b83" and "480a7c2bfcfe33c59af1744e7bb9185ef3a73fe2" have entirely different histories.

9 changed files with 35 additions and 310 deletions

View File

@ -62,10 +62,9 @@
};
kitty = {
enable = true;
# TODO figure out how to get atau-nixpkgs working from the flake with different systems
# background_image ${atau-nixpkgs.atau-wallpapers}/share/backgrounds/atau-wallpapers/aos1.png
extraConfig = ''
background_tint 0.2
background_image ${pkgs.atau-wallpapers}/share/backgrounds/atau-wallpapers/aos1.png
background_image_layout centered
modify_font cell_width 110%

View File

@ -29,31 +29,32 @@
]
},
"locked": {
"lastModified": 1705708511,
"narHash": "sha256-3f4BkRY70Fj7yvuo87c4QQPAjnt571g2wJ50jY7hnYc=",
"lastModified": 1686693375,
"narHash": "sha256-1Smjo0E8WI9PeVGmmCjpQWRX04aQvz5gAGXfdanIjgw=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "ce4b88c465d928f4f8b75d0920f1788d5b65ca94",
"rev": "61e5d1c38ef04ba30a9119825b159bce9c6010be",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "release-23.05",
"repo": "home-manager",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1705496572,
"narHash": "sha256-rPIe9G5EBLXdBdn9ilGc0nq082lzQd0xGGe092R/5QE=",
"lastModified": 1686921029,
"narHash": "sha256-J1bX9plPCFhTSh6E3TWn9XSxggBh/zDD4xigyaIQBy8=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "842d9d80cfd4560648c785f8a4e6f3b096790e19",
"rev": "c7ff1b9b95620ce8728c0d7bd501c458e6da9e04",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"ref": "nixos-23.05",
"repo": "nixpkgs",
"type": "github"
}

View File

@ -2,35 +2,35 @@
description = "Alex's super mega awesome nixos config";
inputs = {
nixpkgs.url = github:NixOS/nixpkgs/nixos-unstable;
# unstable.url = "nixpkgs/nixos-unstable";
nixpkgs.url = github:NixOS/nixpkgs/nixos-23.05;
atau-nixpkgs.url = "git+https://git.atauno.com/atau/atau-nixpkgs?ref=main&rev=1e72f4b1e9b7a2991e3ccdebbe75d312f016da3b";
atau-nixpkgs.inputs.nixpkgs.follows = "nixpkgs";
home-manager.url = "github:nix-community/home-manager";
home-manager.url = "github:nix-community/home-manager/release-23.05";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = { self, nixpkgs, home-manager, ... }@attrs:
# let
# # system = "x86_64-linux";
# # pkgs = import nixpkgs {
# # # inherit system;
# # config.allowUnfree = true;
# # overlays = [ atau-nixpkgs.overlays.default ];
# # };
# in
outputs = inputs@{ self, nixpkgs, atau-nixpkgs, home-manager, ... }:
let
system = "x86_64-linux";
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
overlays = [ atau-nixpkgs.overlays.default ];
};
in
{
nixosConfigurations.nixos76 = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
inherit pkgs;
inherit system;
modules = [
./nixos76/system/configuration.nix
./system/configuration.nix
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.alex = import ./nixos76/alex/home.nix;
home-manager.users.alex = import ./alex/home.nix;
# Optionally, use home-manager.extraSpecialArgs to pass
# arguments to home.nix
}
@ -38,17 +38,11 @@
};
nixosConfigurations.ursa-minor = nixpkgs.lib.nixosSystem
{
system = "aarch64-linux";
inherit pkgs;
inherit system;
modules = [
./ursa-minor/configuration.nix
];
};
nixosConfigurations.ursa-major = nixpkgs.lib.nixosSystem
{
system = "aarch64-linux";
modules = [
./ursa-major/configuration.nix
];
};
};
}

View File

@ -145,14 +145,14 @@
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
# atau-wallpapers
atau-wallpapers
blueman
dxvk
envsubst
font-manager
gparted
lshw
mesa
mesa_22_3
nodejs_20
pavucontrol
unzip
@ -167,7 +167,7 @@
services.avahi = {
enable = true;
nssmdns4 = true;
nssmdns = true;
openFirewall = true;
};

View File

@ -1,171 +0,0 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page, on
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
{ config, lib, pkgs, ... }:
{
imports =
[
# Include the results of the hardware scan.
./hardware-configuration.nix
];
nix.settings.experimental-features = [ "nix-command" "flakes" ];
nixpkgs.config.allowUnfree = true;
# Use the extlinux boot loader. (NixOS wants to enable GRUB by default)
boot.loader.grub.enable = false;
# Enables the generation of /boot/extlinux/extlinux.conf
boot.loader.generic-extlinux-compatible.enable = true;
# For k3s
boot.kernel.sysctl = { "net.ipv4.ip_forward" = 1; };
boot.kernelParams = [
"cgroup_enable=cpuset"
"cgroup_memory=1"
"cgroup_enable=memory"
];
networking.hostName = "ursa-major"; # Define your hostname.
# Pick only one of the below networking options.
networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
# networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
# Set your time zone.
time.timeZone = "America/New_York";
# Configure network proxy if necessary
# networking.proxy.default = "http://user:password@proxy:port/";
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
# services.earlyoom.enable = true;
services.k3s.enable = true;
services.k3s.role = "server";
services.k3s.extraFlags = toString [
# "--kubelet-arg=v=4" # Optionally add additional args to k3s
];
environment.variables = {
KUBECONFIG = "/home/nixos/.kube/config";
};
services.influxdb.enable = true;
services.telegraf.enable = true;
services.telegraf.extraConfig = {
outputs.influxdb = {
urls = [ "http://127.0.0.1:8086" ];
database = "telegraf";
};
inputs.net = { };
inputs.netstat = { };
inputs.file = {
files = [ "/sys/class/thermal/thermal_zone0/temp" ];
name_override = "cpu_temperature";
data_format = "value";
data_type = "integer";
};
inputs.exec = {
commands = [ "${pkgs.libraspberrypi}/bin/vcgencmd measure_temp" ];
name_override = "gpu_temperature";
data_format = "grok";
grok_patterns = [ "%{NUMBER:value:float}" ];
};
inputs.cpu = {
## Whether to report per-cpu stats or not
percpu = true;
## Whether to report total system cpu stats or not
totalcpu = true;
## Comment this line if you want the raw CPU time metrics
fielddrop = [ "time_*" ];
};
inputs.disk = {
## By default, telegraf gather stats for all mountpoints.
## Setting mountpoints will restrict the stats to the specified mountpoints.
# mount_points = ["/"]
## Ignore some mountpoints by filesystem type. For example (dev)tmpfs (usually
## present on /run, /var/run, /dev/shm or /dev).
ignore_fs = [ "tmpfs" "devtmpfs" ];
};
inputs.diskio = {
## By default, telegraf will gather stats for all devices including
## disk partitions.
## Setting devices will restrict the stats to the specified devices.
# devices = ["sda", "sdb"]
## Uncomment the following line if you need disk serial numbers.
# skip_serial_number = false
};
inputs.kernel = { };
inputs.mem = { };
inputs.processes = { };
inputs.swap = { };
inputs.system = { };
inputs.interrupts = { };
inputs.linux_sysctl_fs = { };
};
# Define a user account. Don't forget to set a password with passwd.
users.users.nixos = {
isNormalUser = true;
extraGroups = [ "wheel" ]; # Enable sudo for the user.
packages = with pkgs; [ ];
};
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
git
htop
libraspberrypi
slirp4netns # required by k3s
vim
];
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
# programs.mtr.enable = true;
# programs.gnupg.agent = {
# enable = true;
# enableSSHSupport = true;
# };
# List services that you want to enable:
# Enable the OpenSSH daemon.
services.openssh.enable = true;
# Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
networking.firewall.enable = false;
# Copy the NixOS configuration file and link it from the resulting system
# (/run/current-system/configuration.nix). This is useful in case you
# accidentally delete configuration.nix.
# system.copySystemConfiguration = true;
# This option defines the first version of NixOS you have installed on this particular machine,
# and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
#
# Most users should NEVER change this value after the initial install, for any reason,
# even if you've upgraded your system to a new NixOS release.
#
# This value does NOT affect the Nixpkgs version your packages and OS are pulled from,
# so changing it will NOT upgrade your system - see https://nixos.org/manual/nixos/stable/#sec-upgrading for how
# to actually do that.
#
# This value being lower than the current NixOS release does NOT mean your system is
# out of date, out of support, or vulnerable.
#
# Do NOT change this value unless you have manually inspected all the changes it would make to your configuration,
# and migrated your data accordingly.
#
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
system.stateVersion = "24.05"; # Did you read the comment?
}

View File

@ -1,38 +0,0 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{
device = "/dev/disk/by-uuid/44444444-4444-4444-8888-888888888888";
fsType = "ext4";
};
swapDevices = [{
device = "/var/lib/swapfile";
size = 16 * 1024;
}];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enu1u1.useDHCP = lib.mkDefault true;
# networking.interfaces.wlan0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux";
}

View File

@ -1,8 +1,3 @@
currently this just contains a copy of the rpi nixos config, not tied to `../quick-switch.sh` which is for the system76 galago laptop.
eventually find a way to modularize and reuse config chunks across both systems!
other node hostname ideas:
- cepheus
- delphinus

View File

@ -39,8 +39,6 @@
# networking.proxy.default = "http://user:password@proxy:port/";
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
# services.earlyoom.enable = true;
services.k3s.enable = true;
services.k3s.role = "server";
services.k3s.extraFlags = toString [
@ -51,63 +49,6 @@
KUBECONFIG = "/home/nixos/.kube/config";
};
services.influxdb.enable = true;
services.telegraf.enable = true;
services.telegraf.extraConfig = {
outputs.influxdb = {
urls = [ "http://127.0.0.1:8086" ];
database = "telegraf";
};
inputs.net = { };
inputs.netstat = { };
inputs.file = {
files = [ "/sys/class/thermal/thermal_zone0/temp" ];
name_override = "cpu_temperature";
data_format = "value";
data_type = "integer";
};
inputs.exec = {
commands = [ "${pkgs.libraspberrypi}/bin/vcgencmd measure_temp" ];
name_override = "gpu_temperature";
data_format = "grok";
grok_patterns = [ "%{NUMBER:value:float}" ];
};
inputs.cpu = {
## Whether to report per-cpu stats or not
percpu = true;
## Whether to report total system cpu stats or not
totalcpu = true;
## Comment this line if you want the raw CPU time metrics
fielddrop = [ "time_*" ];
};
inputs.disk = {
## By default, telegraf gather stats for all mountpoints.
## Setting mountpoints will restrict the stats to the specified mountpoints.
# mount_points = ["/"]
## Ignore some mountpoints by filesystem type. For example (dev)tmpfs (usually
## present on /run, /var/run, /dev/shm or /dev).
ignore_fs = [ "tmpfs" "devtmpfs" ];
};
inputs.diskio = {
## By default, telegraf will gather stats for all devices including
## disk partitions.
## Setting devices will restrict the stats to the specified devices.
# devices = ["sda", "sdb"]
## Uncomment the following line if you need disk serial numbers.
# skip_serial_number = false
};
inputs.kernel = { };
inputs.mem = { };
inputs.processes = { };
inputs.swap = { };
inputs.system = { };
inputs.interrupts = { };
inputs.linux_sysctl_fs = { };
};
# Define a user account. Don't forget to set a password with passwd.
users.users.nixos = {
isNormalUser = true;
@ -118,9 +59,13 @@
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
docker
git
htop
libraspberrypi
k3s
nodejs_21
nodePackages.pnpm
pulumi
pulumiPackages.pulumi-language-nodejs
slirp4netns # required by k3s
vim
];