beautifuru
This commit is contained in:
parent
677c85e171
commit
d05e6e0863
21 changed files with 16 additions and 16 deletions
152
hosts/darwinHosts/prometheus/configuration.nix
Normal file
152
hosts/darwinHosts/prometheus/configuration.nix
Normal file
|
|
@ -0,0 +1,152 @@
|
|||
{
|
||||
pkgs,
|
||||
inputs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
# ../../modules
|
||||
../../modules/common-packages.nix
|
||||
# inputs.home-manager-darwin.darwinModules.home-manager
|
||||
inputs.home-manager.darwinModules.home-manager
|
||||
./dummy-module.nix
|
||||
];
|
||||
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
verbose = true;
|
||||
backupFileExtension = "hmbak";
|
||||
users.osbm = import ../../home/home.nix {
|
||||
inherit config pkgs;
|
||||
username = "osbm";
|
||||
homeDirectory = "/Users/osbm";
|
||||
stateVersion = "24.11";
|
||||
enableGTK = false;
|
||||
enableGhostty = false;
|
||||
};
|
||||
};
|
||||
|
||||
services.tailscale = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
# Allow unfree packages
|
||||
nixpkgs.config.allowUnfreePredicate =
|
||||
pkg:
|
||||
builtins.elem (lib.getName pkg) [
|
||||
"vscode" # TODO: remove this
|
||||
"discord"
|
||||
"obsidian"
|
||||
"steam"
|
||||
"steam-unwrapped"
|
||||
"open-webui"
|
||||
"vscode-extension-github-copilot"
|
||||
"spotify"
|
||||
"cursor"
|
||||
# nvidia related (i have to)
|
||||
"nvidia-x11"
|
||||
"cuda_cudart"
|
||||
"libcublas"
|
||||
"cuda_cccl"
|
||||
"cuda_nvcc"
|
||||
"nvidia-settings"
|
||||
"cuda-merged"
|
||||
];
|
||||
nixpkgs.config.allowAliases = false;
|
||||
|
||||
# enable nix flakes
|
||||
nix.settings.experimental-features = [
|
||||
"nix-command"
|
||||
"flakes"
|
||||
];
|
||||
|
||||
# nix.nixPath = ["nixpkgs=${inputs.nixpkgs}"];
|
||||
|
||||
nix.channel.enable = false;
|
||||
|
||||
|
||||
nix.registry = {
|
||||
self.flake = inputs.self;
|
||||
nixpkgs.flake = inputs.nixpkgs;
|
||||
# nixpkgs = {
|
||||
# from = { type = "indirect"; id = "nixpkgs"; };
|
||||
# to = {
|
||||
# path = inputs.nixpkgs.outPath;
|
||||
# type = "path";
|
||||
# };
|
||||
# };
|
||||
|
||||
# Commented out because i want to make sure it works if i switch a system
|
||||
# to another nixpkgs with a different flake input name
|
||||
# nixpkgs = {
|
||||
# from = { type = "indirect"; id = "nixpkgs"; };
|
||||
# to = {
|
||||
# path = pkgs.path;
|
||||
# type = "path";
|
||||
# };
|
||||
# };
|
||||
|
||||
osbm-nvim.flake = inputs.osbm-nvim;
|
||||
my-nixpkgs = {
|
||||
from = { type = "indirect"; id = "my-nixpkgs"; };
|
||||
to = {
|
||||
owner = "osbm";
|
||||
repo = "nixpkgs";
|
||||
type = "github";
|
||||
};
|
||||
};
|
||||
osbm-dev = {
|
||||
from = { type = "indirect"; id = "osbm-dev"; };
|
||||
to = {
|
||||
owner = "osbm";
|
||||
repo = "osbm.dev";
|
||||
type = "github";
|
||||
};
|
||||
};
|
||||
devshells = {
|
||||
from = { type = "indirect"; id = "devshells"; };
|
||||
to = {
|
||||
owner = "osbm";
|
||||
repo = "devshells";
|
||||
type = "github";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
nix.settings.trusted-users = [
|
||||
"root"
|
||||
"osbm"
|
||||
"mac" # TODO change mac user to osbm
|
||||
];
|
||||
|
||||
# nix.nixPath = ["nixpkgs=${pkgs.path}"];
|
||||
|
||||
system.configurationRevision = inputs.self.rev or "dirty";
|
||||
|
||||
programs.fish.enable = true;
|
||||
|
||||
# myModules.setUsers = false;
|
||||
users.users.osbm = {
|
||||
description = "osbm";
|
||||
shell = pkgs.fish;
|
||||
home = "/Users/osbm";
|
||||
};
|
||||
environment.systemPackages = with pkgs; [
|
||||
alacritty
|
||||
# ghostty
|
||||
kitty
|
||||
vscode
|
||||
git
|
||||
lazygit
|
||||
# blender
|
||||
# libreoffice
|
||||
# ungoogled-chromium
|
||||
code-cursor
|
||||
ollama
|
||||
];
|
||||
system.stateVersion = 6;
|
||||
nixpkgs.hostPlatform = "x86_64-darwin";
|
||||
}
|
||||
10
hosts/darwinHosts/prometheus/dummy-module.nix
Normal file
10
hosts/darwinHosts/prometheus/dummy-module.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
{ lib, ... }:
|
||||
{
|
||||
options = {
|
||||
myModules.enableKDE = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = "Enable KDE Plasma";
|
||||
};
|
||||
};
|
||||
}
|
||||
105
hosts/nixOnDroidHosts/atreus/configuration.nix
Normal file
105
hosts/nixOnDroidHosts/atreus/configuration.nix
Normal file
|
|
@ -0,0 +1,105 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
user.userName = lib.mkForce "osbm"; # fuck i hate unmaintained projects
|
||||
environment.packages = with pkgs; [
|
||||
vim # or some other editor, e.g. nano or neovim
|
||||
|
||||
# Some common stuff that people expect to have
|
||||
procps
|
||||
#killall
|
||||
#diffutils
|
||||
inetutils
|
||||
findutils
|
||||
utillinux
|
||||
tzdata
|
||||
hostname
|
||||
man
|
||||
gnugrep
|
||||
#gnupg
|
||||
#gnused
|
||||
#gnutar
|
||||
#bzip2
|
||||
#gzip
|
||||
#xz
|
||||
zip
|
||||
unzip
|
||||
fish
|
||||
tmux
|
||||
nano
|
||||
ripgrep
|
||||
git
|
||||
openssh
|
||||
just
|
||||
nh
|
||||
(pkgs.writeShellScriptBin "lg-rerouting" ''
|
||||
${pkgs.lazygit}/bin/lazygit --path /storage/emulated/0/Documents/rerouting
|
||||
'')
|
||||
(pkgs.writeShellScriptBin "sshd-start" ''
|
||||
echo "Starting sshd on port 8022"
|
||||
${pkgs.openssh}/bin/sshd
|
||||
'')
|
||||
(pkgs.writeShellScriptBin "wake-ymir" ''
|
||||
echo waking up ymir
|
||||
${pkgs.wakeonlan}/bin/wakeonlan 04:7c:16:e6:d9:13
|
||||
'')
|
||||
# obsidian tools
|
||||
# i need a background process that can just keep pulling and pushing changes just like the obsidian git plugin
|
||||
# (pkgs.writeShellScriptBin "rerouting-sync-start" ''
|
||||
# cd /storage/emulated/0/Documents/rerouting
|
||||
# git pull
|
||||
# git add --all
|
||||
# git commit -m "Android sync"
|
||||
# git push
|
||||
# '')
|
||||
(pkgs.writeShellScriptBin "rerouting-status" ''
|
||||
cd /storage/emulated/0/Documents/rerouting
|
||||
git fetch
|
||||
git status
|
||||
'')
|
||||
(pkgs.writeShellScriptBin "rerouting-pull" ''
|
||||
cd /storage/emulated/0/Documents/rerouting
|
||||
git pull
|
||||
'')
|
||||
(pkgs.writeShellScriptBin "rerouting-push" ''
|
||||
cd /storage/emulated/0/Documents/rerouting
|
||||
git add --all
|
||||
git commit -m "Android sync"
|
||||
git push
|
||||
'')
|
||||
ani-cli
|
||||
];
|
||||
|
||||
# Backup etc files instead of failing to activate generation if a file already exists in /etc
|
||||
environment.etcBackupExtension = ".bak";
|
||||
|
||||
# Read the changelog before changing this value
|
||||
system.stateVersion = "24.05";
|
||||
# Set up nix for flakes
|
||||
nix.extraOptions = ''
|
||||
experimental-features = nix-command flakes
|
||||
'';
|
||||
|
||||
build.activation.sshd = ''
|
||||
if [ ! -e /etc/ssh/ssh_host_ed25519_key ]; then
|
||||
$VERBOSE_ECHO "Generating host keys..."
|
||||
$DRY_RUN_CMD ${pkgs.openssh}/bin/ssh-keygen -t ed25519 -a 32 -f "/etc/ssh/ssh_host_ed25519_key" -N ""
|
||||
fi
|
||||
'';
|
||||
|
||||
environment.etc."ssh/sshd_config".text = ''
|
||||
AcceptEnv LANG LC_*
|
||||
KbdInteractiveAuthentication no
|
||||
PasswordAuthentication no
|
||||
PermitRootLogin no
|
||||
Port 8022
|
||||
PrintMotd no
|
||||
AuthorizedKeysFile /etc/ssh/authorized_keys.d/%u
|
||||
'';
|
||||
environment.etc."ssh/authorized_keys.d/osbm".text = ''
|
||||
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPfnV+qqUCJf92npNW4Jy0hIiepCJFBDJHXBHnUlNX0k
|
||||
'';
|
||||
}
|
||||
|
|
@ -6,10 +6,10 @@
|
|||
{
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
../../modules/common-packages.nix
|
||||
../../../modules/common-packages.nix
|
||||
# ../../modules/services/tailscale.nix
|
||||
# ../../modules/services/openssh.nix
|
||||
../../modules/nix-settings.nix
|
||||
../../../modules/nix-settings.nix
|
||||
inputs.disko.nixosModules.disko
|
||||
inputs.impermanence.nixosModules.impermanence
|
||||
];
|
||||
|
|
@ -56,7 +56,7 @@
|
|||
# Network driver for initrd - change to match your hardware
|
||||
# Common options: "virtio_pci" (VMs), "e1000e", "igb", "r8169"
|
||||
availableKernelModules = [ "virtio_pci" ];
|
||||
|
||||
|
||||
network = {
|
||||
enable = true;
|
||||
ssh = {
|
||||
|
|
@ -65,7 +65,7 @@
|
|||
# Generate with: ssh-keygen -t ed25519 -N "" -f /persist/etc/ssh/ssh_host_ed25519_key_initrd
|
||||
hostKeys = [ "/persist/etc/ssh/ssh_host_ed25519_key_initrd" ];
|
||||
# Add your SSH public key here
|
||||
authorizedKeys = [
|
||||
authorizedKeys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPfnV+qqUCJf92npNW4Jy0hIiepCJFBDJHXBHnUlNX0k"
|
||||
];
|
||||
};
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
./sd-image.nix
|
||||
"${inputs.nixpkgs}/nixos/modules/installer/sd-card/sd-image-aarch64.nix"
|
||||
./hardware-configuration.nix
|
||||
../../modules
|
||||
../../../modules
|
||||
];
|
||||
|
||||
myModules = {
|
||||
|
|
@ -6,7 +6,7 @@
|
|||
{
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
../../modules
|
||||
../../../modules
|
||||
];
|
||||
|
||||
myModules = {
|
||||
|
|
@ -7,7 +7,7 @@
|
|||
{
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
../../modules
|
||||
../../../modules
|
||||
inputs.raspberry-pi-nix.nixosModules.raspberry-pi
|
||||
inputs.nixos-hardware.nixosModules.raspberry-pi-5
|
||||
];
|
||||
|
|
@ -7,7 +7,7 @@
|
|||
{
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
../../modules
|
||||
../../../modules
|
||||
];
|
||||
|
||||
myModules = {
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
{
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
../../modules
|
||||
../../../modules
|
||||
];
|
||||
myModules = {
|
||||
enableKDE = false;
|
||||
|
|
@ -6,7 +6,7 @@
|
|||
{
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
../../modules
|
||||
../../../modules
|
||||
];
|
||||
|
||||
myModules = {
|
||||
Loading…
Add table
Add a link
Reference in a new issue