init: macmini nixos configuration.

This commit is contained in:
Sky
2026-01-27 07:44:31 +00:00
commit a4b60e72a8
13 changed files with 352 additions and 0 deletions

View File

@@ -0,0 +1,57 @@
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"blocks": [
{
"alignment": "left",
"segments": [
{
"foreground": "#45F1C2",
"style": "plain",
"template": "\uf313 {{ .UserName }} on",
"type": "session"
},
{
"foreground": "#0CA0D8",
"properties": {
"folder_separator_icon": "/",
"style": "full"
},
"style": "plain",
"template": " \uf07b {{ .Path }} ",
"type": "path"
},
{
"foreground": "#14A5AE",
"powerline_symbol": "\ue0b0",
"properties": {
"fetch_upstream_icon": true
},
"style": "plain",
"template": "{{ .UpstreamIcon }}{{ .HEAD }}{{ if gt .StashCount 0 }} \ueb4b {{ .StashCount }}{{ end }} ",
"type": "git"
}
],
"type": "prompt"
},
{
"alignment": "left",
"newline": true,
"segments": [
{
"foreground": "#cd5e42",
"style": "plain",
"template": "\ue3bf ",
"type": "root"
},
{
"foreground": "#CD4277",
"style": "plain",
"template": "# ",
"type": "text"
}
],
"type": "prompt"
}
],
"version": 3
}

View File

@@ -0,0 +1,24 @@
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [
direnv
fzf
];
programs.direnv = {
enable = true;
};
programs.bash = {
enable = true;
shellInit =
let
theme = ./amro.omp.json;
in
''
eval "$(${pkgs.oh-my-posh}/bin/oh-my-posh init bash --config ${theme})"
eval "$(${pkgs.direnv}/bin/direnv hook bash)"
eval "$(${pkgs.fzf}/bin/fzf --bash)"
'';
};
}

View File

@@ -0,0 +1,11 @@
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [
nil
neovim
wget
git
fastfetch
];
}

View File

@@ -0,0 +1,38 @@
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [
ddns-go
];
systemd.services.ddns-go = {
description = "DDNS-Go";
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
Type = "simple";
ExecStart = "${pkgs.ddns-go}/bin/ddns-go -l [::]:9876 -f 300";
Restart = "always";
RestartSec = 3;
User = "ddns-go";
Group = "ddns-go";
StateDirectory = "ddns-go";
Environment = "HOME=/var/lib/ddns-go";
NoNewPrivileges = true;
PrivateTmp = true;
ProtectSystem = "strict";
ReadWritePaths = "/var/lib/ddns-go";
};
};
users.users.ddns-go = {
isSystemUser = true;
group = "ddns-go";
home = "/var/lib/ddns-go";
createHome = true;
};
users.groups.ddns-go = { };
}

View File

@@ -0,0 +1,38 @@
{ inputs, pkgs, ... }:
{
imports = [
inputs.catppuccin.nixosModules.catppuccin
];
# Catppuccin Mocha Style
catppuccin.gitea = {
enable = true;
accent = "sky";
flavor = "mocha";
};
services.gitea = {
enable = true;
user = "git";
group = "git";
stateDir = "/var/lib/gitea";
database = {
type = "sqlite3";
};
};
users.groups.git = { };
users.users.git = {
isNormalUser = true;
home = "/var/lib/gitea";
extraGroups = [ "git" ];
packages = with pkgs; [
gitea
];
};
}

View File

@@ -0,0 +1,3 @@
{ ... }:
{ }

View File

@@ -0,0 +1,4 @@
{ inputs, ... }:
{
}

16
modules/system/boot.nix Normal file
View File

@@ -0,0 +1,16 @@
{ pkgs, ... }:
{
boot.kernelPackages = pkgs.linuxPackages_latest;
boot.loader = {
efi = {
canTouchEfiVariables = true;
efiSysMountPoint = "/boot";
};
grub = {
enable = true;
device = "nodev";
efiSupport = true;
};
};
}

View File

@@ -0,0 +1,10 @@
{ ... }:
{
services.openssh.enable = true;
networking = {
hostName = "macmini";
firewall.enable = false;
networkmanager.enable = true;
};
}