mirror of
https://github.com/oqyude/nixos.git
synced 2026-08-08 23:53:11 +03:00
Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c846fa2321 | ||
|
|
38948e0462 |
@@ -0,0 +1,6 @@
|
|||||||
|
{ inputs, ... }@flakeContext:
|
||||||
|
{
|
||||||
|
nixOnDroidConfigurations = {
|
||||||
|
epral = import ./epral.nix flakeContext; # epral (Android via nix-on-droid)
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -0,0 +1,66 @@
|
|||||||
|
{ inputs, ... }@flakeContext:
|
||||||
|
let
|
||||||
|
# Host: epral (Android device via nix-on-droid, aarch64-linux)
|
||||||
|
# NOTE: nix-on-droid uses its own module system (class = "nixOnDroid").
|
||||||
|
# Only options defined by nix-on-droid are available here:
|
||||||
|
# environment.*, nix.*, time.*, networking.hosts, user.*, home-manager.*, system.stateVersion
|
||||||
|
# NixOS-only options (boot.*, services.*, hardware.*, fileSystems.*, ...) do NOT exist here.
|
||||||
|
nixOnDroidModule =
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
# user.home is read-only and always /data/data/com.termux.nix/files/home
|
||||||
|
user.userName = "oqyude"; # matches xlib.device.username used by the NixOS hosts
|
||||||
|
|
||||||
|
environment = {
|
||||||
|
# Base CLI packages
|
||||||
|
packages = with pkgs; [
|
||||||
|
vim
|
||||||
|
git
|
||||||
|
ripgrep
|
||||||
|
htop
|
||||||
|
file
|
||||||
|
tmux
|
||||||
|
];
|
||||||
|
# Backup existing files in /etc instead of failing activation
|
||||||
|
etcBackupExtension = ".bak";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Set up nix for flakes
|
||||||
|
nix.extraOptions = ''
|
||||||
|
experimental-features = nix-command flakes
|
||||||
|
'';
|
||||||
|
|
||||||
|
time.timeZone = "Europe/Moscow";
|
||||||
|
|
||||||
|
# Read the changelog before changing this value.
|
||||||
|
# nix-on-droid currently supports state versions only up to "24.05".
|
||||||
|
system.stateVersion = "24.05";
|
||||||
|
|
||||||
|
# home-manager is built in; point it at this repo's home-manager input
|
||||||
|
# and keep the config self-contained (repo home.nix depends on NixOS-only xlib.dirs).
|
||||||
|
# home-manager = {
|
||||||
|
# backupFileExtension = "hm-bak";
|
||||||
|
# useGlobalPkgs = true;
|
||||||
|
# config = { config, lib, pkgs, ... }: {
|
||||||
|
# home.stateVersion = "24.05";
|
||||||
|
# home.packages = with pkgs; [ ];
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
};
|
||||||
|
in
|
||||||
|
inputs.nix-on-droid.lib.nixOnDroidConfiguration {
|
||||||
|
pkgs = import inputs.nixpkgs {
|
||||||
|
system = "aarch64-linux";
|
||||||
|
};
|
||||||
|
modules = [
|
||||||
|
nixOnDroidModule
|
||||||
|
];
|
||||||
|
extraSpecialArgs = {
|
||||||
|
inherit inputs;
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -24,6 +24,10 @@
|
|||||||
nixpkgs.follows = "nixpkgs";
|
nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
nix-on-droid = {
|
||||||
|
url = "github:nix-community/nix-on-droid/master";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
deploy-rs = {
|
deploy-rs = {
|
||||||
url = "github:serokell/deploy-rs";
|
url = "github:serokell/deploy-rs";
|
||||||
inputs = {
|
inputs = {
|
||||||
@@ -113,6 +117,7 @@
|
|||||||
}
|
}
|
||||||
// (import ./configurations flakeContext)
|
// (import ./configurations flakeContext)
|
||||||
// (import ./deploy flakeContext)
|
// (import ./deploy flakeContext)
|
||||||
|
// (import ./droid flakeContext)
|
||||||
// (import ./home flakeContext)
|
// (import ./home flakeContext)
|
||||||
// (import ./modules flakeContext)
|
// (import ./modules flakeContext)
|
||||||
// (import ./overlays flakeContext)
|
// (import ./overlays flakeContext)
|
||||||
|
|||||||
@@ -19,15 +19,18 @@
|
|||||||
theme = "robbyrussell";
|
theme = "robbyrussell";
|
||||||
};
|
};
|
||||||
shellInit = ''
|
shellInit = ''
|
||||||
beet-n() {
|
|
||||||
echo "$*" | aichat -cer beets
|
|
||||||
}
|
|
||||||
beet-p() {
|
beet-p() {
|
||||||
beet mod path:. playlist="$*"
|
local base="/home/oqyude/.config/beets/My"
|
||||||
|
local rel
|
||||||
|
rel=$(realpath --relative-to="$base" "$PWD")
|
||||||
|
beet mod "path:$rel" playlist="$*"
|
||||||
}
|
}
|
||||||
beet-ims() {
|
beet-ims() {
|
||||||
beet im ./ -S $*
|
beet im ./ -S $*
|
||||||
}
|
}
|
||||||
|
beet-path() {
|
||||||
|
realpath --relative-to="/home/oqyude/.config/beets/My" "$1"
|
||||||
|
}
|
||||||
'';
|
'';
|
||||||
shellAliases = {
|
shellAliases = {
|
||||||
# shell
|
# shell
|
||||||
@@ -42,7 +45,9 @@
|
|||||||
gc = "git add . && git commit -m 'dev: автокоммит $(date +'%Y-%m-%d %H:%M:%S')'";
|
gc = "git add . && git commit -m 'dev: автокоммит $(date +'%Y-%m-%d %H:%M:%S')'";
|
||||||
y = "yazi";
|
y = "yazi";
|
||||||
nix-shellp = "nix-shell --run $SHELL -p";
|
nix-shellp = "nix-shell --run $SHELL -p";
|
||||||
|
beet-path-library = "realpath --relative-to='/home/oqyude/.config/beets/My' .";
|
||||||
z-proxy = "export ALL_PROXY=socks5://localhost:10808";
|
z-proxy = "export ALL_PROXY=socks5://localhost:10808";
|
||||||
|
zh-proxy = "export HTTPS_PROXY=http://localhost:10808 && export HTTP_PROXY=http://localhost:10808";
|
||||||
|
|
||||||
# beets
|
# beets
|
||||||
beet-ima = "beet im ./ -A";
|
beet-ima = "beet im ./ -A";
|
||||||
|
|||||||
@@ -1,12 +0,0 @@
|
|||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
xlib,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
environment.systemPackages = [
|
|
||||||
pkgs.aichat
|
|
||||||
];
|
|
||||||
}
|
|
||||||
@@ -6,7 +6,6 @@
|
|||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
../software/aichat.nix
|
|
||||||
../software/beets
|
../software/beets
|
||||||
../software/whisper.nix
|
../software/whisper.nix
|
||||||
./containers
|
./containers
|
||||||
|
|||||||
Reference in New Issue
Block a user