Added nix on droid

This commit is contained in:
Aleksandr Lebedev 2025-01-06 18:58:09 +01:00
parent dadac02455
commit 14c7d85a57
9 changed files with 195 additions and 18 deletions

View file

@ -1,32 +1,32 @@
# NixOS Config
Apply cloned config
~~~
```bash
sudo nixos-rebuild switch --flake ~/nixos-config#kylekrein-homepc
~~~
```
Rebuild system
~~~
```bash
nh os switch
~~~
```
Generate hardware report
~~~
```bash
sudo nix run \
--option experimental-features "nix-command flakes" \
--option extra-substituters https://numtide.cachix.org \
--option extra-trusted-public-keys numtide.cachix.org-1:2ps1kLBUWjxIneOy1Ik6cQjb41X0iXVXeHigGmycPPE= \
github:numtide/nixos-facter -- -o facter.json
~~~
```
## Install system
Assuming that you're in nixos installer
~~~
```bash
sudo nix --extra-experimental-features "flakes nix-command" run github:nix-community/disko -- --mode zap_create_mount --flake github:KyleKrein/nixos-config#kylekrein-homepc
~~~
```
Copy sops age keys to `/persist/sops/age/keys.txt` or to `/var/lib/sops/age/keys.txt` if not using impermanence
~~~
```bash
sudo mkdir /mnt/tmp && TMPDIR=/mnt/tmp sudo nixos-install --flake github:KyleKrein/nixos-config#kylekrein-homepc --no-root-passwd && sudo rm -rf /mnt/tmp
~~~
```

152
flake.lock generated
View file

@ -772,6 +772,32 @@
"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-gaming": {
"inputs": {
"flake-parts": "flake-parts",
@ -792,6 +818,33 @@
"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": 1725658585,
"narHash": "sha256-P29z4Gt89n5ps1U7+qmIrj0BuRXGZQSIaOe2+tsPgfw=",
"owner": "nix-community",
"repo": "nix-on-droid",
"rev": "5d88ff2519e4952f8d22472b52c531bb5f1635fc",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nix-on-droid",
"type": "github"
}
},
"nixos-facter-modules": {
"locked": {
"lastModified": 1734596637,
@ -823,6 +876,38 @@
"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": 1720244366,
"narHash": "sha256-WrDV0FPMVd2Sq9hkR5LNHudS3OSMmUrs90JUTN+MXpA=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "49ee0e94463abada1de470c9c07bfc12b36dcf40",
"type": "github"
},
"original": {
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "49ee0e94463abada1de470c9c07bfc12b36dcf40",
"type": "github"
}
},
"nixpkgs-lib": {
"locked": {
"lastModified": 1733096140,
@ -946,11 +1031,11 @@
"treefmt-nix": "treefmt-nix"
},
"locked": {
"lastModified": 1735802549,
"narHash": "sha256-aS03+IGLexQt5HL+tLZqSko6Jpxa+eozqcide/pab34=",
"lastModified": 1735934313,
"narHash": "sha256-l7P53BL86pnpyQunMGuNtIvDM3IN3pjHuIYyxd7RZ7Y=",
"owner": "nix-community",
"repo": "nixvim",
"rev": "3285bbda0aa0151c3b1914758e6950dfb554962f",
"rev": "93b5fb04783b58afa691977dcbb90b58483b3d82",
"type": "github"
},
"original": {
@ -959,6 +1044,44 @@
"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"
}
},
"nuschtosSearch": {
"inputs": {
"flake-utils": "flake-utils",
@ -1015,6 +1138,7 @@
"impermanence": "impermanence",
"nix-darwin": "nix-darwin",
"nix-gaming": "nix-gaming",
"nix-on-droid": "nix-on-droid",
"nixos-facter-modules": "nixos-facter-modules",
"nixpkgs": "nixpkgs_4",
"nixvim": "nixvim",
@ -1038,6 +1162,22 @@
"type": "github"
}
},
"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": {
"inputs": {
"nixpkgs": "nixpkgs_5"
@ -1073,11 +1213,11 @@
"tinted-tmux": "tinted-tmux"
},
"locked": {
"lastModified": 1735864066,
"narHash": "sha256-V1JmPXW3vmxCuvf+IItGlLgBH8rolUahCMFyglxy19s=",
"lastModified": 1735933801,
"narHash": "sha256-SbkFaIYzfoasvu6GN5fdlaltrcEtUcoPsTRulWNkH7E=",
"owner": "danth",
"repo": "stylix",
"rev": "0ce2a52decf36d815065f8cda06586ed59ed3ef7",
"rev": "e0a41d3a2562ce1b43cad8560333673d04b111b8",
"type": "github"
},
"original": {

View file

@ -36,7 +36,12 @@
url = "github:LnL7/nix-darwin";
inputs.nixpkgs.follows = "nixpkgs";
};
};
nix-on-droid = {
url = "github:nix-community/nix-on-droid";
inputs.nixpkgs.follows = "nixpkgs";
inputs.home-manager.follows = "home-manager";
};
};
outputs = { self, nixpkgs, ... }@inputs:
let
@ -54,6 +59,14 @@
first-nixos-install = "1729112485"; #stat -c %W /
in
{
nixOnDroidConfigurations.default = inputs.nix-on-droid.lib.nixOnDroidConfiguration {
pkgs = import nixpkgs { system = "aarch64-linux"; overlays = [ inputs.nix-on-droid.overlays.default ]; };
modules = [ ./nixos/hosts/android ];
home-manager-path = inputs.home-manager.outPath;
extraSpecialArgs = {
inherit first-nixos-install;
};
};
darwinConfigurations = {
"kylekrein-air" = inputs.nix-darwin.lib.darwinSystem {
specialArgs = { inherit self; };

View file

@ -120,6 +120,9 @@
#background;
loginBackground = false;
})
joplin-desktop
kdenlive
super-productivity
helvum
killall
nix-output-monitor

View file

@ -10,7 +10,7 @@
./modules/tmux/home.nix
] ++ lib.optional (hwconfig.useImpermanence) (import ./modules/impermanence/home.nix { inherit username; inherit inputs; } )
++ lib.optional (config.programs.hyprland.enable) ./modules/hyprland/home.nix
++ lib.optional (builtins.pathExists ./homes/${username}) ./homes/${username};
++ lib.optional (builtins.pathExists ./homes/${username}) (import ./homes/${username} { inherit username; });
# Home Manager needs a bit of information about you and the paths it should
# manage.
home.username = username;

View file

@ -0,0 +1,13 @@
{ pkgs, ... }:
{
environment.packages = with pkgs;[
neovim
git
fastfetch
];
home-manager.config = (import home.nix);
system.stateVersion = "24.05";
}

View file

@ -0,0 +1,6 @@
{ pkgs, ... }:
{
imports = [
../../modules/nixvim
];
}

View file

@ -11,6 +11,7 @@
#libsForQt5.kio-extras #extra protocols support (sftp, fish and more)
kdePackages.kio-fuse #to mount remote filesystems via FUSE
kdePackages.kio-extras #extra protocols support (sftp, fish and more)
kdePackages.kio-admin
waybar
swaynotificationcenter
libnotify

View file

@ -8,6 +8,7 @@
enable = true;
colorschemes.catppuccin.enable = true;
plugins = {
markview.enable = true;
tmux-navigator = {
enable = true;
};