mirror of
https://github.com/oqyude/nixos.git
synced 2026-08-09 08:03:16 +03:00
Compare commits
7
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1856f9e4fd | ||
|
|
6b426eaa55 | ||
|
|
8434688515 | ||
|
|
2a8b15ce01 | ||
|
|
30bf6f8da6 | ||
|
|
c846fa2321 | ||
|
|
38948e0462 |
@@ -1 +1,2 @@
|
|||||||
.vscode
|
.vscode
|
||||||
|
.omo
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
{ inputs, ... }@flakeContext:
|
||||||
|
{
|
||||||
|
nixOnDroidConfigurations = {
|
||||||
|
epral = import ./epral.nix flakeContext; # epral (Android via nix-on-droid)
|
||||||
|
# Alias so a plain `nix-on-droid switch` from a local clone
|
||||||
|
# (~/.config/nix-on-droid) picks up the device config without `#epral`.
|
||||||
|
default = import ./epral.nix flakeContext;
|
||||||
|
};
|
||||||
|
}
|
||||||
+109
@@ -0,0 +1,109 @@
|
|||||||
|
{
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}@flakeContext:
|
||||||
|
let
|
||||||
|
# Host: epral (Android device via nix-on-droid, aarch64-linux)
|
||||||
|
# Integrates with the base defaultModule (imports.self.nixosModules.default),
|
||||||
|
# which is trimmed for the "termux" device type: NixOS-only modules
|
||||||
|
# (essentials, users.nix, home-manager, sops-nix, disko, grub2-themes)
|
||||||
|
# and nixpkgs.overlays are skipped so it evaluates under nix-on-droid's
|
||||||
|
# module system (class = "nixOnDroid").
|
||||||
|
nixOnDroidModule =
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
xlib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
inputs.self.nixosModules.default # base defaultModule (termux-trimmed)
|
||||||
|
];
|
||||||
|
|
||||||
|
xlib.device = {
|
||||||
|
type = "termux";
|
||||||
|
hostname = "epral";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Login shell. nix-on-droid writes /etc/passwd from user.shell on every
|
||||||
|
# activation, so `chsh` is useless here — set it in nix instead.
|
||||||
|
# (default is bashInteractive)
|
||||||
|
user.shell = "${pkgs.zsh}/bin/zsh";
|
||||||
|
|
||||||
|
# Minimal termux settings (nix-on-droid options only:
|
||||||
|
# environment.*, nix.*, time.*, user.*, system.*, android-integration.*)
|
||||||
|
|
||||||
|
# user.userName defaults to "nix-on-droid"; set it to override.
|
||||||
|
# user.home is read-only: /data/data/com.termux.nix/files/home
|
||||||
|
|
||||||
|
# Simply install just the packages
|
||||||
|
environment.packages = with pkgs; [
|
||||||
|
# User-facing stuff that you really really want to have
|
||||||
|
vim # or some other editor, e.g. nano or neovim
|
||||||
|
nano
|
||||||
|
|
||||||
|
# Some common stuff that people expect to have
|
||||||
|
openssh
|
||||||
|
treefmt
|
||||||
|
git
|
||||||
|
procps
|
||||||
|
psmisc # provides killall (attr `killall` was removed from nixpkgs)
|
||||||
|
diffutils
|
||||||
|
findutils
|
||||||
|
util-linux # renamed from utillinux
|
||||||
|
tzdata
|
||||||
|
hostname
|
||||||
|
man
|
||||||
|
gnugrep
|
||||||
|
gnupg
|
||||||
|
gnused
|
||||||
|
gnutar
|
||||||
|
bzip2
|
||||||
|
gzip
|
||||||
|
zip
|
||||||
|
unzip
|
||||||
|
];
|
||||||
|
|
||||||
|
# Backup etc files instead of failing to activate generation if a file already exists in /etc
|
||||||
|
environment.etcBackupExtension = ".bak";
|
||||||
|
|
||||||
|
# Shared userspace home-manager config (same cozy shell as on NixOS hosts).
|
||||||
|
# nix-on-droid forces home.username / home.homeDirectory from user.*,
|
||||||
|
# so the strict module must not set them.
|
||||||
|
home-manager = {
|
||||||
|
useGlobalPkgs = true;
|
||||||
|
backupFileExtension = "hm-bak";
|
||||||
|
config = { ... }: {
|
||||||
|
imports = [
|
||||||
|
../home/shared/strict.nix
|
||||||
|
];
|
||||||
|
home.stateVersion = "24.05";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Read the changelog before changing this value
|
||||||
|
system.stateVersion = "24.05";
|
||||||
|
|
||||||
|
# Set up nix for flakes
|
||||||
|
nix.extraOptions = ''
|
||||||
|
experimental-features = nix-command flakes
|
||||||
|
'';
|
||||||
|
|
||||||
|
# Set your time zone
|
||||||
|
time.timeZone = "Europe/Moscow";
|
||||||
|
|
||||||
|
android-integration.termux-setup-storage.enable = true;
|
||||||
|
};
|
||||||
|
in
|
||||||
|
inputs.nix-on-droid.lib.nixOnDroidConfiguration {
|
||||||
|
pkgs = import inputs.nixpkgs {
|
||||||
|
system = "aarch64-linux";
|
||||||
|
};
|
||||||
|
modules = [
|
||||||
|
nixOnDroidModule
|
||||||
|
];
|
||||||
|
extraSpecialArgs = {
|
||||||
|
deviceType = "termux";
|
||||||
|
};
|
||||||
|
}
|
||||||
Generated
+141
@@ -101,6 +101,60 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nix-formatter-pack": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nix-on-droid",
|
||||||
|
"nixpkgs"
|
||||||
|
],
|
||||||
|
"nmd": [
|
||||||
|
"nix-on-droid",
|
||||||
|
"nmd"
|
||||||
|
],
|
||||||
|
"nmt": "nmt"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1705252799,
|
||||||
|
"narHash": "sha256-HgSTREh7VoXjGgNDwKQUYcYo13rPkltW7IitHrTPA5c=",
|
||||||
|
"owner": "Gerschtli",
|
||||||
|
"repo": "nix-formatter-pack",
|
||||||
|
"rev": "2de39dedd79aab14c01b9e2934842051a160ffa5",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "Gerschtli",
|
||||||
|
"repo": "nix-formatter-pack",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nix-on-droid": {
|
||||||
|
"inputs": {
|
||||||
|
"home-manager": [
|
||||||
|
"home-manager"
|
||||||
|
],
|
||||||
|
"nix-formatter-pack": "nix-formatter-pack",
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
],
|
||||||
|
"nixpkgs-docs": "nixpkgs-docs",
|
||||||
|
"nixpkgs-for-bootstrap": "nixpkgs-for-bootstrap",
|
||||||
|
"nmd": "nmd"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1772387862,
|
||||||
|
"narHash": "sha256-o7q9flWMCsFW2mkz8TQhvPUcwFczO7VX9I6U2u2vN4o=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "nix-on-droid",
|
||||||
|
"rev": "67b105336cb06b764366bfe241afa2352de6a926",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"ref": "testing",
|
||||||
|
"repo": "nix-on-droid",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nixos-hardware": {
|
"nixos-hardware": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs"
|
||||||
@@ -189,6 +243,38 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nixpkgs-docs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1705957679,
|
||||||
|
"narHash": "sha256-Q8LJaVZGJ9wo33wBafvZSzapYsjOaNjP/pOnSiKVGHY=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "9a333eaa80901efe01df07eade2c16d183761fa3",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "release-23.05",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs-for-bootstrap": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1772047000,
|
||||||
|
"narHash": "sha256-7DaQVv4R97cii/Qdfy4tmDZMB2xxtyIvNGSwXBBhSmo=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "1267bb4920d0fc06ea916734c11b0bf004bbe17e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "1267bb4920d0fc06ea916734c11b0bf004bbe17e",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nixpkgs-master": {
|
"nixpkgs-master": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1785744216,
|
"lastModified": 1785744216,
|
||||||
@@ -269,6 +355,44 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nmd": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nix-on-droid",
|
||||||
|
"nixpkgs-docs"
|
||||||
|
],
|
||||||
|
"scss-reset": "scss-reset"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1705050560,
|
||||||
|
"narHash": "sha256-x3zzcdvhJpodsmdjqB4t5mkVW22V3wqHLOun0KRBzUI=",
|
||||||
|
"owner": "~rycee",
|
||||||
|
"repo": "nmd",
|
||||||
|
"rev": "66d9334933119c36f91a78d565c152a4fdc8d3d3",
|
||||||
|
"type": "sourcehut"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "~rycee",
|
||||||
|
"repo": "nmd",
|
||||||
|
"type": "sourcehut"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nmt": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1648075362,
|
||||||
|
"narHash": "sha256-u36WgzoA84dMVsGXzml4wZ5ckGgfnvS0ryzo/3zn/Pc=",
|
||||||
|
"owner": "rycee",
|
||||||
|
"repo": "nmt",
|
||||||
|
"rev": "d83601002c99b78c89ea80e5e6ba21addcfe12ae",
|
||||||
|
"type": "gitlab"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "rycee",
|
||||||
|
"repo": "nmt",
|
||||||
|
"type": "gitlab"
|
||||||
|
}
|
||||||
|
},
|
||||||
"plasma-manager": {
|
"plasma-manager": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"home-manager": [
|
"home-manager": [
|
||||||
@@ -319,6 +443,7 @@
|
|||||||
"flake-compat": "flake-compat",
|
"flake-compat": "flake-compat",
|
||||||
"grub2-themes": "grub2-themes",
|
"grub2-themes": "grub2-themes",
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
|
"nix-on-droid": "nix-on-droid",
|
||||||
"nixos-hardware": "nixos-hardware",
|
"nixos-hardware": "nixos-hardware",
|
||||||
"nixos-wsl": "nixos-wsl",
|
"nixos-wsl": "nixos-wsl",
|
||||||
"nixpkgs": "nixpkgs_2",
|
"nixpkgs": "nixpkgs_2",
|
||||||
@@ -336,6 +461,22 @@
|
|||||||
"zeroq-credentials": "zeroq-credentials"
|
"zeroq-credentials": "zeroq-credentials"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"scss-reset": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1631450058,
|
||||||
|
"narHash": "sha256-muDlZJPtXDIGevSEWkicPP0HQ6VtucbkMNygpGlBEUM=",
|
||||||
|
"owner": "andreymatin",
|
||||||
|
"repo": "scss-reset",
|
||||||
|
"rev": "0cf50e27a4e95e9bb5b1715eedf9c54dee1a5a91",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "andreymatin",
|
||||||
|
"repo": "scss-reset",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"sops-nix": {
|
"sops-nix": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
|
|||||||
@@ -24,6 +24,13 @@
|
|||||||
nixpkgs.follows = "nixpkgs";
|
nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
nix-on-droid = {
|
||||||
|
url = "github:nix-community/nix-on-droid/testing"; # testing branch, used on the device
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.follows = "nixpkgs";
|
||||||
|
home-manager.follows = "home-manager";
|
||||||
|
};
|
||||||
|
};
|
||||||
deploy-rs = {
|
deploy-rs = {
|
||||||
url = "github:serokell/deploy-rs";
|
url = "github:serokell/deploy-rs";
|
||||||
inputs = {
|
inputs = {
|
||||||
@@ -113,6 +120,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)
|
||||||
|
|||||||
@@ -0,0 +1,218 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
# Shared "strict" home-manager module.
|
||||||
|
# Works in BOTH contexts:
|
||||||
|
# - NixOS hosts (via home-manager.sharedModules or homeConfigurations)
|
||||||
|
# - nix-on-droid (via home-manager.config in droid/epral.nix)
|
||||||
|
# Only home-manager options are used here — no systemd.*, no services.*,
|
||||||
|
# no users.*, no environment.systemPackages. All paths are parameterized
|
||||||
|
# through config.home.homeDirectory so /home/oqyude (NixOS) and
|
||||||
|
# /data/data/com.termux.nix/files/home (termux) both work.
|
||||||
|
#
|
||||||
|
# NOTE: intentionally duplicates parts of modules/essentials/{shell,packages}.nix
|
||||||
|
# (which stay NixOS-only for now). When this module is wired into NixOS hosts
|
||||||
|
# via sharedModules, deduplicate those files.
|
||||||
|
{
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
# Lazy (alias lc)
|
||||||
|
lazycli
|
||||||
|
|
||||||
|
# IDE
|
||||||
|
fresh-editor # EDITOR
|
||||||
|
|
||||||
|
# Base utils
|
||||||
|
curl
|
||||||
|
wget
|
||||||
|
fd
|
||||||
|
tree
|
||||||
|
dust
|
||||||
|
gdu
|
||||||
|
mc
|
||||||
|
rsync
|
||||||
|
jq
|
||||||
|
unzip
|
||||||
|
zip
|
||||||
|
zstd
|
||||||
|
|
||||||
|
# Net diagnostic
|
||||||
|
mtr
|
||||||
|
dnsutils
|
||||||
|
|
||||||
|
# Monitoring
|
||||||
|
htop
|
||||||
|
];
|
||||||
|
|
||||||
|
home.sessionVariables = {
|
||||||
|
TUCKR_HOME = "$HOME/Storage/dotfiles";
|
||||||
|
EDITOR = "fresh";
|
||||||
|
};
|
||||||
|
|
||||||
|
home.file.".nanorc".text = ''
|
||||||
|
set nowrap
|
||||||
|
set tabstospaces
|
||||||
|
set tabsize 2
|
||||||
|
'';
|
||||||
|
|
||||||
|
programs = {
|
||||||
|
# ---- Shell: zsh ----
|
||||||
|
zsh = {
|
||||||
|
enable = true;
|
||||||
|
enableCompletion = true;
|
||||||
|
syntaxHighlighting.enable = true;
|
||||||
|
history.size = 10000;
|
||||||
|
oh-my-zsh = {
|
||||||
|
enable = true;
|
||||||
|
theme = "robbyrussell";
|
||||||
|
};
|
||||||
|
loginExtra = "clear && fastfetch";
|
||||||
|
initContent = ''
|
||||||
|
beet-p() {
|
||||||
|
local base="${config.home.homeDirectory}/.config/beets/My"
|
||||||
|
local rel
|
||||||
|
rel=$(realpath --relative-to="$base" "$PWD")
|
||||||
|
beet mod "path:$rel" playlist="$*"
|
||||||
|
}
|
||||||
|
beet-ims() {
|
||||||
|
beet im ./ -S $*
|
||||||
|
}
|
||||||
|
beet-path() {
|
||||||
|
realpath --relative-to="${config.home.homeDirectory}/.config/beets/My" "$1"
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
shellAliases = {
|
||||||
|
# shell
|
||||||
|
ff = "clear && fastfetch";
|
||||||
|
l = "ls -l";
|
||||||
|
lg = "lazygit";
|
||||||
|
lc = "lazycli";
|
||||||
|
gp = "git pull";
|
||||||
|
gp-ns = "gp && ns";
|
||||||
|
gc = "git add . && git commit -m 'dev: автокоммит $(date +'%Y-%m-%d %H:%M:%S')'";
|
||||||
|
y = "yazi";
|
||||||
|
nix-shellp = "nix-shell --run $SHELL -p";
|
||||||
|
beet-path-library = "realpath --relative-to='${config.home.homeDirectory}/.config/beets/My' .";
|
||||||
|
z-proxy = "export ALL_PROXY=socks5://localhost:10808";
|
||||||
|
zh-proxy = "export HTTPS_PROXY=http://localhost:10808 && export HTTP_PROXY=http://localhost:10808";
|
||||||
|
|
||||||
|
# beets
|
||||||
|
beet-ima = "beet im ./ -A";
|
||||||
|
|
||||||
|
# ssh
|
||||||
|
z-s = "ssh sapphira";
|
||||||
|
z-st = "ssh sapphira-tailscale";
|
||||||
|
z-o = "ssh otreca";
|
||||||
|
z-ot = "ssh otreca-tailscale";
|
||||||
|
z-l = "ssh lamet";
|
||||||
|
z-lt = "ssh lamet-tailscale";
|
||||||
|
z-p-1 = "ssh pubray-1";
|
||||||
|
z-map-local-proxy = "ssh -R 10808:localhost:10808";
|
||||||
|
|
||||||
|
# Extras
|
||||||
|
plasma-manager = "nix run github:nix-community/plasma-manager";
|
||||||
|
pip2nix = "nix run github:nix-community/pip2nix --"; # https://github.com/nix-community/pip2nix
|
||||||
|
pip2nix-g = "nix run github:nix-community/pip2nix -- generate -r";
|
||||||
|
json2nix = "nix run github:sempruijs/json2nix";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# ---- Editor ----
|
||||||
|
# NOTE: programs.nano is a NixOS-only module (does not exist in
|
||||||
|
# home-manager); write ~/.nanorc directly instead.
|
||||||
|
# ---- TUI tools ----
|
||||||
|
bat.enable = true;
|
||||||
|
lazygit.enable = true;
|
||||||
|
fzf.enable = true;
|
||||||
|
|
||||||
|
btop.enable = true;
|
||||||
|
broot.enable = true;
|
||||||
|
bottom.enable = true;
|
||||||
|
fastfetch.enable = true;
|
||||||
|
|
||||||
|
yazi = {
|
||||||
|
enable = true;
|
||||||
|
# explicit: shared module must behave identically on NixOS (26.05, "y")
|
||||||
|
# and nix-on-droid (24.05, legacy "yy")
|
||||||
|
shellWrapperName = "y";
|
||||||
|
plugins = {
|
||||||
|
inherit (pkgs.yaziPlugins)
|
||||||
|
gitui
|
||||||
|
git
|
||||||
|
sudo
|
||||||
|
ouch
|
||||||
|
rsync
|
||||||
|
diff
|
||||||
|
mount
|
||||||
|
chmod
|
||||||
|
dupes
|
||||||
|
lazygit
|
||||||
|
toggle-pane
|
||||||
|
rich-preview
|
||||||
|
smart-filter
|
||||||
|
full-border
|
||||||
|
recycle-bin
|
||||||
|
;
|
||||||
|
};
|
||||||
|
flavors = {
|
||||||
|
nord = pkgs.yaziPlugins.nord;
|
||||||
|
};
|
||||||
|
theme = {
|
||||||
|
flavor = {
|
||||||
|
light = "nord";
|
||||||
|
dark = "nord";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
keymap = {
|
||||||
|
mgr.prepend_keymap = [
|
||||||
|
{
|
||||||
|
on = [
|
||||||
|
"M"
|
||||||
|
];
|
||||||
|
run = "plugin mount";
|
||||||
|
desc = "Mount manager";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
on = [
|
||||||
|
"g"
|
||||||
|
"i"
|
||||||
|
];
|
||||||
|
run = "plugin lazygit";
|
||||||
|
desc = "run lazygit";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
run = "plugin ouch --args=zip";
|
||||||
|
on = [
|
||||||
|
"g"
|
||||||
|
"C"
|
||||||
|
];
|
||||||
|
desc = "Compress with ouch";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
settings = {
|
||||||
|
mgr.ratio = [
|
||||||
|
1
|
||||||
|
1
|
||||||
|
4
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# ---- VCS ----
|
||||||
|
git = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
user = {
|
||||||
|
name = "oqyude";
|
||||||
|
email = "oqyude@gmail.com";
|
||||||
|
};
|
||||||
|
pull = {
|
||||||
|
rebase = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
+15
-5
@@ -9,11 +9,18 @@ let
|
|||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
imports = with inputs; [
|
# NixOS-only modules. termux runs nix-on-droid (its own module system,
|
||||||
./essentials
|
# class = "nixOnDroid"): options like services.*, users.*, sops.*, disko.*
|
||||||
./users.nix
|
# and nixpkgs.overlays (flake assertion) do not exist there.
|
||||||
|
imports =
|
||||||
|
with inputs;
|
||||||
|
[
|
||||||
./options.nix
|
./options.nix
|
||||||
(./. + "/${deviceType}") # specific modules
|
(./. + "/${deviceType}") # specific modules
|
||||||
|
]
|
||||||
|
++ lib.optionals (deviceType != "termux") [
|
||||||
|
./essentials
|
||||||
|
./users.nix
|
||||||
|
|
||||||
home-manager.nixosModules.home-manager # home-manager module
|
home-manager.nixosModules.home-manager # home-manager module
|
||||||
# nix-index-database.nixosModules.nix-index # nix-index module
|
# nix-index-database.nixosModules.nix-index # nix-index module
|
||||||
@@ -22,9 +29,12 @@ let
|
|||||||
self.homeConfigurations.default.nixosModule # default homeConfigurations
|
self.homeConfigurations.default.nixosModule # default homeConfigurations
|
||||||
disko.nixosModules.disko # disko module
|
disko.nixosModules.disko # disko module
|
||||||
];
|
];
|
||||||
nixpkgs.overlays = with inputs; [
|
# nix-on-droid asserts that nixpkgs.* stays unset in flake mode.
|
||||||
|
nixpkgs.overlays = lib.mkIf (deviceType != "termux") (
|
||||||
|
with inputs; [
|
||||||
self.nixosOverlays.default
|
self.nixosOverlays.default
|
||||||
];
|
]
|
||||||
|
);
|
||||||
_module.args = {
|
_module.args = {
|
||||||
inputs = inputs;
|
inputs = inputs;
|
||||||
xlib = config.xlib;
|
xlib = config.xlib;
|
||||||
|
|||||||
@@ -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";
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
"vds"
|
"vds"
|
||||||
"vds-new"
|
"vds-new"
|
||||||
"wsl"
|
"wsl"
|
||||||
|
"termux"
|
||||||
];
|
];
|
||||||
default = "minimal";
|
default = "minimal";
|
||||||
description = "Type of device for this host.";
|
description = "Type of device for this host.";
|
||||||
|
|||||||
@@ -1,12 +0,0 @@
|
|||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
xlib,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
environment.systemPackages = [
|
|
||||||
pkgs.aichat
|
|
||||||
];
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
# imports = [
|
||||||
|
# ];
|
||||||
|
}
|
||||||
@@ -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