btw i use nix
1# TODO there has to be a better way of getting this in here
2inputs:
3
4{
5 pkgs,
6 config,
7 lib,
8 ...
9}:
10
11{
12 user.shell = "${pkgs.zsh}/bin/zsh";
13
14 environment.packages = with pkgs; [
15 util-linux # for whereis
16 gawk # for shell history search
17 ledger
18 ];
19 environment.etcBackupExtension = ".bak";
20
21 # Tailscale nameserver https://github.com/nix-community/nix-on-droid/issues/2
22 environment.etc."resolv.conf".text = lib.mkForce ''
23 nameserver 100.100.100.100
24 nameserver 1.1.1.1
25 nameserver 8.8.8.8
26 '';
27
28 home-manager = {
29 useGlobalPkgs = true;
30 extraSpecialArgs = {
31 i3-workspace-history = inputs.i3-workspace-history;
32 timewall = inputs.timewall;
33 };
34 config =
35 { pkgs, lib, ... }:
36 {
37 imports = [ ../home/default.nix ];
38
39 programs.gpg.enable = lib.mkForce false;
40
41 # Use the same overlays as the system packages
42 nixpkgs = { inherit (config.nixpkgs) overlays; };
43
44 nix = {
45 package = pkgs.nix;
46 settings.experimental-features = [
47 "nix-command"
48 "flakes"
49 ];
50 };
51
52 # https://github.com/nix-community/nix-on-droid/issues/185
53 home.shellAliases = {
54 sshd =
55 let
56 config = pkgs.writeText "sshd_config" ''
57 HostKey /data/data/com.termux.nix/files/home/.ssh/id_ed25519
58 Port 9022
59 '';
60 in
61 "$(readlink $(whereis sshd)) -f ${config}";
62 ping = "/android/system/bin/linker64 /android/system/bin/ping";
63 };
64
65 home.file = {
66 ".ssh/authorized_keys".source = ../modules/authorized_keys;
67 };
68
69 programs.ssh = {
70 enable = true;
71 extraConfig = ''
72 User ryan
73 '';
74 };
75
76 home.sessionVariables = {
77 LEDGER_FILE = "~/storage/Documents/vault/finances.ledger";
78 };
79
80 home.stateVersion = "22.05";
81 };
82 };
83 system.stateVersion = "22.05";
84}