formatting

This commit is contained in:
Osman Faruk Bayram 2025-07-12 21:36:18 +03:00
parent 7ce780986b
commit 415715a4f9
58 changed files with 398 additions and 229 deletions

View file

@ -41,18 +41,25 @@
nix-index-database.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = {
outputs =
{
self,
nixpkgs,
nix-on-droid,
deploy-rs,
...
} @ inputs: let
}@inputs:
let
inherit (self) outputs;
supportedSystems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" ];
supportedSystems = [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
];
forAllSystems = f: nixpkgs.lib.genAttrs supportedSystems (system: f system);
makePkgs = system: import nixpkgs { inherit system; };
in {
in
{
nixosConfigurations = {
tartarus = nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs outputs; };

View file

@ -3,7 +3,8 @@
lib,
config,
...
}: {
}:
{
options.enableAlacritty = lib.mkEnableOption "Alacritty terminal emulator";
config = {
programs.alacritty = {
@ -14,7 +15,12 @@
normal.family = "Cascadia Code";
};
terminal.shell = {
args = ["new-session" "-A" "-s" "general"];
args = [
"new-session"
"-A"
"-s"
"general"
];
program = lib.getExe pkgs.tmux;
};
window = {

View file

@ -2,7 +2,8 @@
lib,
config,
...
}: {
}:
{
options.enableFirefox = lib.mkEnableOption "enableFirefox";
config = {
programs.firefox = {
@ -32,7 +33,9 @@
DisplayBookmarksToolbar = "always"; # alternatives: "never" or "newtab"
# DisplayMenuBar = "default-off"; # alternatives: "always", "never" or "default-on"
# SearchBar = "unified"; # alternat
ExtensionSettings = with builtins; let
ExtensionSettings =
with builtins;
let
extension = shortId: uuid: {
name = uuid;
value = {

View file

@ -2,7 +2,8 @@
lib,
config,
...
}: {
}:
{
options.enableGhostty = lib.mkEnableOption "Ghostty terminal emulator";
config = {
programs.ghostty = {

View file

@ -3,7 +3,8 @@
lib,
config,
...
}: {
}:
{
options = {
# Enable the GTK theme
enableGTK = lib.mkEnableOption "enableGTK";

View file

@ -2,7 +2,8 @@
config,
pkgs,
...
}: {
}:
{
imports = [
./alacritty.nix
./tmux

View file

@ -1,4 +1,5 @@
{...}: let
{ ... }:
let
# define a block that just takes a hostname and returns attrset to not repeat the same fields
sshBlock = hostname: {
hostname = hostname;
@ -18,7 +19,8 @@
port = 8022;
# fish not found error ???
};
in {
in
{
programs.ssh = {
enable = true;
hashKnownHosts = true;

View file

@ -2,7 +2,8 @@
pkgs,
lib,
...
}: let
}:
let
wanikani-current-reviews-script = builtins.path { path = ./wanikani-current-reviews.sh; };
wanikani-level-script = builtins.path { path = ./wanikani-level.sh; };
wanikani-progression-script = builtins.path { path = ./wanikani-progression.sh; };
@ -29,7 +30,8 @@
maintainers = with maintainers; [ ethancedwards8 ];
};
};
in {
in
{
programs.tmux = {
enable = true;
historyLimit = 100000;

View file

@ -3,7 +3,8 @@
config,
pkgs,
...
}: {
}:
{
options.enableWezterm = lib.mkEnableOption "Wezterm terminal emulator";
config = {
programs.wezterm = {

View file

@ -2,7 +2,8 @@
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

View file

@ -2,7 +2,8 @@
lib,
inputs,
...
}: {
}:
{
imports = [
./sd-image.nix
"${inputs.nixpkgs}/nixos/modules/installer/sd-card/sd-image-aarch64.nix"

View file

@ -2,12 +2,12 @@
pkgs,
lib,
...
}: {
}:
{
# Some packages (ahci fail... this bypasses that) https://discourse.nixos.org/t/does-pkgs-linuxpackages-rpi3-build-all-required-kernel-modules/42509
nixpkgs.overlays = [
(final: super: {
makeModulesClosure = x:
super.makeModulesClosure (x // {allowMissing = true;});
makeModulesClosure = x: super.makeModulesClosure (x // { allowMissing = true; });
})
];
@ -63,7 +63,11 @@
boot = {
kernelPackages = pkgs.linuxPackages_rpi02w;
initrd.availableKernelModules = ["xhci_pci" "usbhid" "usb_storage"];
initrd.availableKernelModules = [
"xhci_pci"
"usbhid"
"usb_storage"
];
loader = {
grub.enable = false;
generic-extlinux-compatible.enable = true;

View file

@ -4,7 +4,8 @@
config,
lib,
...
}: {
}:
{
options.sdImage = with lib; {
extraFirmwareConfig = mkOption {
type = types.attrs;
@ -25,8 +26,7 @@
keyValueList = lib.mapAttrsToList keyValueMap config.sdImage.extraFirmwareConfig;
extraFirmwareConfigString = lib.concatStringsSep "\n" keyValueList;
in
lib.mkAfter
''
lib.mkAfter ''
config=firmware/config.txt
# The initial file has just been created without write permissions. Add them to be able to append the file.
chmod u+w $config

View file

@ -2,7 +2,8 @@
lib,
inputs,
...
}: {
}:
{
imports = [
./hardware-configuration.nix
../../modules

View file

@ -2,12 +2,12 @@
pkgs,
lib,
...
}: {
}:
{
# Some packages (ahci fail... this bypasses that) https://discourse.nixos.org/t/does-pkgs-linuxpackages-rpi3-build-all-required-kernel-modules/42509
nixpkgs.overlays = [
(final: super: {
makeModulesClosure = x:
super.makeModulesClosure (x // {allowMissing = true;});
makeModulesClosure = x: super.makeModulesClosure (x // { allowMissing = true; });
})
];
@ -49,7 +49,11 @@
boot = {
kernelPackages = pkgs.linuxPackages_rpi02w;
initrd.availableKernelModules = ["xhci_pci" "usbhid" "usb_storage"];
initrd.availableKernelModules = [
"xhci_pci"
"usbhid"
"usb_storage"
];
loader = {
grub.enable = false;
generic-extlinux-compatible.enable = true;

View file

@ -4,7 +4,8 @@
pkgs,
system,
...
}: {
}:
{
imports = [
];

View file

@ -2,7 +2,8 @@
pkgs,
inputs,
...
}: {
}:
{
imports = [
inputs.raspberry-pi-nix.nixosModules.raspberry-pi
inputs.raspberry-pi-nix.nixosModules.sd-image
@ -37,9 +38,15 @@
wget
];
nix.settings.experimental-features = ["nix-command" "flakes"];
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
nix.settings.trusted-users = ["root" "osbm"];
nix.settings.trusted-users = [
"root"
"osbm"
];
nixpkgs.hostPlatform = "aarch64-linux";

View file

@ -3,7 +3,8 @@
lib,
inputs,
...
}: {
}:
{
imports = [
./hardware-configuration.nix
../../modules

View file

@ -5,7 +5,8 @@
lib,
modulesPath,
...
}: {
}:
{
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
@ -23,7 +24,10 @@
fileSystems."/boot/firmware" = {
device = "/dev/disk/by-uuid/2178-694E";
fsType = "vfat";
options = ["fmask=0022" "dmask=0022"];
options = [
"fmask=0022"
"dmask=0022"
];
};
swapDevices = [ ];

View file

@ -3,7 +3,8 @@
pkgs,
inputs,
...
}: {
}:
{
imports = [
./hardware-configuration.nix
../../modules

View file

@ -7,12 +7,19 @@
pkgs,
modulesPath,
...
}: {
}:
{
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod"];
boot.initrd.availableKernelModules = [
"xhci_pci"
"ahci"
"nvme"
"usb_storage"
"sd_mod"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
@ -25,7 +32,10 @@
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/33D0-6524";
fsType = "vfat";
options = ["fmask=0077" "dmask=0077"];
options = [
"fmask=0077"
"dmask=0077"
];
};
swapDevices = [

View file

@ -1,4 +1,5 @@
{lib, ...}: {
{ lib, ... }:
{
imports = [
./hardware-configuration.nix
../../modules

View file

@ -7,12 +7,21 @@
pkgs,
modulesPath,
...
}: {
}:
{
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = ["ahci" "ehci_pci" "megaraid_sas" "nvme" "usbhid" "usb_storage" "sd_mod"];
boot.initrd.availableKernelModules = [
"ahci"
"ehci_pci"
"megaraid_sas"
"nvme"
"usbhid"
"usb_storage"
"sd_mod"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
@ -25,7 +34,10 @@
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/A1EB-43F8";
fsType = "vfat";
options = ["fmask=0077" "dmask=0077"];
options = [
"fmask=0077"
"dmask=0077"
];
};
swapDevices = [

View file

@ -2,7 +2,8 @@
config,
pkgs,
...
}: {
}:
{
imports = [
./hardware-configuration.nix
../../modules
@ -29,7 +30,10 @@
networking.hostName = "ymir"; # Define your hostname.
networking.firewall.allowedTCPPorts = [8889 8000];
networking.firewall.allowedTCPPorts = [
8889
8000
];
# Enable networking
networking.networkmanager.enable = true;

View file

@ -7,12 +7,20 @@
pkgs,
modulesPath,
...
}: {
}:
{
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod"];
boot.initrd.availableKernelModules = [
"xhci_pci"
"ahci"
"nvme"
"usbhid"
"usb_storage"
"sd_mod"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
@ -25,7 +33,10 @@
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/383D-1E8A";
fsType = "vfat";
options = ["fmask=0077" "dmask=0077"];
options = [
"fmask=0077"
"dmask=0077"
];
};
swapDevices = [

View file

@ -1,7 +1,9 @@
{pkgs, ...}: {
{ pkgs, ... }:
{
importList = lib.mapAttrsToList (name: _path: ./. + "/${name}")
(lib.filterAttrs (filename: kind:
filename != "default.nix" && (kind == "regular" || kind == "directory"))
(builtins.readDir ./.));
importList = lib.mapAttrsToList (name: _path: ./. + "/${name}") (
lib.filterAttrs (
filename: kind: filename != "default.nix" && (kind == "regular" || kind == "directory")
) (builtins.readDir ./.)
);
}

View file

@ -2,7 +2,8 @@
lib,
config,
...
}: {
}:
{
options = {
myModules.enableADB = lib.mkOption {
type = lib.types.bool;

View file

@ -3,7 +3,8 @@
lib,
config,
...
}: {
}:
{
options = {
myModules.arduinoSetup = lib.mkOption {
type = lib.types.bool;

View file

@ -2,7 +2,8 @@
pkgs,
inputs,
...
}: {
}:
{
environment.systemPackages = with pkgs; [
inputs.osbm-nvim.packages."${pkgs.stdenv.hostPlatform.system}".default
wget

View file

@ -2,7 +2,8 @@
lib,
config,
...
}: {
}:
{
options = {
myModules = {
blockYoutube = lib.mkOption {

View file

@ -2,7 +2,8 @@
lib,
config,
...
}: {
}:
{
options = {
myModules.disableHibernation = lib.mkOption {
type = lib.types.bool;

View file

@ -2,7 +2,8 @@
lib,
config,
...
}: {
}:
{
options = {
myModules.enableAarch64Emulation = lib.mkOption {
type = lib.types.bool;

View file

@ -3,7 +3,8 @@
lib,
config,
...
}: {
}:
{
options = {
myModules.enableFonts = lib.mkOption {
type = lib.types.bool;
@ -43,9 +44,22 @@
# defaultFonts.emoji = ["Noto Color Emoji"];
# };
fonts.fontconfig.defaultFonts = {
serif = ["Source Han Serif SC" "Source Han Serif TC" "Noto Color Emoji"];
sansSerif = ["Source Han Sans SC" "Source Han Sans TC" "Noto Color Emoji"];
monospace = ["Droid Sans Mono" "DejaVu Sans Mono" "Source Han Mono" "Cascadia Code"];
serif = [
"Source Han Serif SC"
"Source Han Serif TC"
"Noto Color Emoji"
];
sansSerif = [
"Source Han Sans SC"
"Source Han Sans TC"
"Noto Color Emoji"
];
monospace = [
"Droid Sans Mono"
"DejaVu Sans Mono"
"Source Han Mono"
"Cascadia Code"
];
emoji = [ "Noto Color Emoji" ];
};
})

View file

@ -3,7 +3,8 @@
lib,
config,
...
}: {
}:
{
options = {
myModules.enableKDE = lib.mkOption {
type = lib.types.bool;

View file

@ -3,7 +3,8 @@
pkgs,
inputs,
...
}: {
}:
{
imports = [
inputs.home-manager.nixosModules.home-manager
];

View file

@ -1,4 +1,5 @@
{pkgs, ...}: {
{ pkgs, ... }:
{
time.timeZone = "Europe/Istanbul";
# Select internationalisation properties.

View file

@ -4,7 +4,8 @@
lib,
pkgs,
...
}: {
}:
{
# imports = [
# inputs.minegrub-theme.nixosModules.default
# ];
@ -24,9 +25,7 @@
# background = "background_options/1.8 - [Classic Minecraft].png";
# boot-options-count = 4;
# };
theme =
pkgs.fetchFromGitHub
{
theme = pkgs.fetchFromGitHub {
owner = "Lxtharia";
repo = "minegrub-theme";
rev = "193b3a7c3d432f8c6af10adfb465b781091f56b3";

View file

@ -2,13 +2,15 @@
inputs,
lib,
...
}: {
}:
{
imports = [
inputs.nix-index-database.nixosModules.nix-index
];
programs.nix-index-database.comma.enable = true;
# Allow unfree packages
nixpkgs.config.allowUnfreePredicate = pkg:
nixpkgs.config.allowUnfreePredicate =
pkg:
builtins.elem (lib.getName pkg) [
"vscode" # TODO: remove this
"discord"
@ -30,7 +32,10 @@
];
# enable nix flakes
nix.settings.experimental-features = ["nix-command" "flakes"];
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
# nix.nixPath = ["nixpkgs=${inputs.nixpkgs}"];
@ -57,7 +62,10 @@
};
};
nix.settings.trusted-users = ["root" "osbm"];
nix.settings.trusted-users = [
"root"
"osbm"
];
nix.gc = {
automatic = true;

View file

@ -2,7 +2,8 @@
# config,
# outputs,
...
}: {
}:
{
# nix.distributedBuilds = true;
# nix.settings.builders-use-substitutes = true;
# nix.buildMachines = [

View file

@ -4,7 +4,8 @@
inputs,
lib,
...
}: {
}:
{
imports = [
inputs.agenix.nixosModules.default
];

View file

@ -3,7 +3,8 @@
lib,
config,
...
}: {
}:
{
options = {
myModules.enableCaddy = lib.mkOption {
type = lib.types.bool;
@ -58,7 +59,11 @@
};
};
networking.firewall.allowedTCPPorts = [80 443 3000];
networking.firewall.allowedTCPPorts = [
80
443
3000
];
environment.systemPackages = with pkgs; [
nssTools

View file

@ -3,10 +3,13 @@
config,
pkgs,
...
}: let
}:
let
# https://github.com/NixOS/nixpkgs/pull/394352
cloudflare-dyndns-5-3 = pkgs.cloudflare-dyndns.overridePythonAttrs rec {
version = lib.warnIfNot (pkgs.cloudflare-dyndns.version == "5.0") "The cloudflare-dyndns package is updated, you should remove this override" "5.3";
version = lib.warnIfNot (
pkgs.cloudflare-dyndns.version == "5.0"
) "The cloudflare-dyndns package is updated, you should remove this override" "5.3";
src = pkgs.fetchFromGitHub {
owner = "kissgyorgy";
repo = "cloudflare-dyndns";
@ -23,7 +26,8 @@
truststore
];
};
in {
in
{
options = {
myModules.enableCloudflareDyndns = lib.mkOption {
type = lib.types.bool;

View file

@ -2,7 +2,8 @@
config,
lib,
...
}: {
}:
{
options = {
myModules.enableCloudflared = lib.mkOption {
type = lib.types.bool;

View file

@ -2,7 +2,8 @@
lib,
config,
...
}: {
}:
{
options = {
myModules.enableForgejo = lib.mkOption {
type = lib.types.bool;

View file

@ -2,7 +2,8 @@
config,
lib,
...
}: {
}:
{
options = {
myModules.enableJellyfin = lib.mkOption {
type = lib.types.bool;

View file

@ -3,7 +3,8 @@
config,
pkgs,
...
}: {
}:
{
options = {
myModules.enableNextcloud = lib.mkOption {
type = lib.types.bool;

View file

@ -2,7 +2,8 @@
lib,
config,
...
}: {
}:
{
options = {
myModules = {
enableOllama = lib.mkOption {
@ -18,7 +19,10 @@
services.ollama = {
enable = true;
acceleration = "cuda";
loadModels = ["deepseek-r1:7b" "deepseek-r1:14b"];
loadModels = [
"deepseek-r1:7b"
"deepseek-r1:14b"
];
};
services.open-webui = {

View file

@ -3,13 +3,21 @@
config,
lib,
...
}: let
}:
let
system-logger = pkgs.writeShellApplication {
name = "system-logger";
runtimeInputs = with pkgs; [curl jq zip gawk systemd];
runtimeInputs = with pkgs; [
curl
jq
zip
gawk
systemd
];
text = builtins.readFile ./system-logger.sh;
};
in {
in
{
options.services.system-logger = {
enable = lib.mkEnableOption {
description = "Enable System Logger Service";

View file

@ -3,7 +3,8 @@
lib,
pkgs,
...
}: {
}:
{
options = {
myModules.enableTailscale = lib.mkOption {
type = lib.types.bool;

View file

@ -2,7 +2,8 @@
config,
lib,
...
}: {
}:
{
options = {
myModules.enableVaultwarden = lib.mkOption {
type = lib.types.bool;

View file

@ -2,7 +2,8 @@
config,
pkgs,
...
}: {
}:
{
services.code-server = {
# only true if the machine is not pochita
enable = config.networking.hostName != "pochita";
@ -16,7 +17,8 @@
hashedPassword = "$argon2i$v=19$m=4096,t=3,p=1$dGc0TStGMDNzSS9JRkJYUFp3d091Q2p0bXlzPQ$zvdE9BkclkJmyFaenzPy2E99SEqsyDMt4IQNZfcfFFQ";
package = pkgs.vscode-with-extensions.override {
vscode = pkgs.code-server;
vscodeExtensions = with pkgs.vscode-extensions;
vscodeExtensions =
with pkgs.vscode-extensions;
[
bbenoist.nix
catppuccin.catppuccin-vsc

View file

@ -3,10 +3,14 @@
config,
pkgs,
...
}: let
}:
let
waniKani-bypass-lessons = pkgs.writeShellApplication {
name = "wanikani-bypass-lessons";
runtimeInputs = with pkgs; [curl jq];
runtimeInputs = with pkgs; [
curl
jq
];
text = ''
#!/usr/bin/env bash
@ -44,7 +48,8 @@
sleep 3600
'';
};
in {
in
{
options.services.wanikani-bypass-lessons.enable = lib.mkEnableOption {
description = "Enable WaniKani Bypass Lessons";
default = false;

View file

@ -3,13 +3,19 @@
config,
lib,
...
}: let
}:
let
wanikani-fetcher = pkgs.writeShellApplication {
name = "wanikani-fetcher";
runtimeInputs = with pkgs; [curl jq zip];
runtimeInputs = with pkgs; [
curl
jq
zip
];
text = builtins.readFile ./wanikani-fetcher.sh;
};
in {
in
{
options.services.wanikani-fetch-data.enable = lib.mkEnableOption {
description = "Enable WaniKani Fetch Data";
default = false;

View file

@ -2,7 +2,8 @@
lib,
config,
...
}: {
}:
{
options = {
myModules.enableSound = lib.mkOption {
type = lib.types.bool;

View file

@ -1,10 +1,15 @@
{...}: {
{ ... }:
{
users.users = {
osbm = {
isNormalUser = true;
description = "osbm";
initialHashedPassword = "$6$IamAbigfailure$irfkAsWev8CMAr78wUwUggclplXL98sbI21fpGY9nMDz47bU88RZWFLO7FcN5SdRA18ZSidkMqS76uLCMH68f.";
extraGroups = ["networkmanager" "wheel" "docker"];
extraGroups = [
"networkmanager"
"wheel"
"docker"
];
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPfnV+qqUCJf92npNW4Jy0hIiepCJFBDJHXBHnUlNX0k"
];

View file

@ -3,7 +3,8 @@
lib,
config,
...
}: {
}:
{
options = {
myModules.enableWakeOnLan = lib.mkOption {
type = lib.types.bool;

View file

@ -12,7 +12,8 @@ let
pochita
wallfacer
];
in {
in
{
"network-manager.age".publicKeys = machines ++ [ osbm ];
"ssh-key-private.age".publicKeys = machines ++ [ osbm ];
"ssh-key-public.age".publicKeys = machines ++ [ osbm ];