Added nix on droid
This commit is contained in:
parent
dadac02455
commit
14c7d85a57
9 changed files with 195 additions and 18 deletions
20
README.md
20
README.md
|
|
@ -1,32 +1,32 @@
|
||||||
# NixOS Config
|
# NixOS Config
|
||||||
|
|
||||||
Apply cloned config
|
Apply cloned config
|
||||||
~~~
|
```bash
|
||||||
sudo nixos-rebuild switch --flake ~/nixos-config#kylekrein-homepc
|
sudo nixos-rebuild switch --flake ~/nixos-config#kylekrein-homepc
|
||||||
~~~
|
```
|
||||||
|
|
||||||
Rebuild system
|
Rebuild system
|
||||||
~~~
|
```bash
|
||||||
nh os switch
|
nh os switch
|
||||||
~~~
|
```
|
||||||
|
|
||||||
Generate hardware report
|
Generate hardware report
|
||||||
~~~
|
```bash
|
||||||
sudo nix run \
|
sudo nix run \
|
||||||
--option experimental-features "nix-command flakes" \
|
--option experimental-features "nix-command flakes" \
|
||||||
--option extra-substituters https://numtide.cachix.org \
|
--option extra-substituters https://numtide.cachix.org \
|
||||||
--option extra-trusted-public-keys numtide.cachix.org-1:2ps1kLBUWjxIneOy1Ik6cQjb41X0iXVXeHigGmycPPE= \
|
--option extra-trusted-public-keys numtide.cachix.org-1:2ps1kLBUWjxIneOy1Ik6cQjb41X0iXVXeHigGmycPPE= \
|
||||||
github:numtide/nixos-facter -- -o facter.json
|
github:numtide/nixos-facter -- -o facter.json
|
||||||
~~~
|
```
|
||||||
|
|
||||||
## Install system
|
## Install system
|
||||||
Assuming that you're in nixos installer
|
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
|
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
|
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
|
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
152
flake.lock
generated
|
|
@ -772,6 +772,32 @@
|
||||||
"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-gaming": {
|
"nix-gaming": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-parts": "flake-parts",
|
"flake-parts": "flake-parts",
|
||||||
|
|
@ -792,6 +818,33 @@
|
||||||
"type": "github"
|
"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": {
|
"nixos-facter-modules": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1734596637,
|
"lastModified": 1734596637,
|
||||||
|
|
@ -823,6 +876,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": 1720244366,
|
||||||
|
"narHash": "sha256-WrDV0FPMVd2Sq9hkR5LNHudS3OSMmUrs90JUTN+MXpA=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "49ee0e94463abada1de470c9c07bfc12b36dcf40",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "49ee0e94463abada1de470c9c07bfc12b36dcf40",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nixpkgs-lib": {
|
"nixpkgs-lib": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1733096140,
|
"lastModified": 1733096140,
|
||||||
|
|
@ -946,11 +1031,11 @@
|
||||||
"treefmt-nix": "treefmt-nix"
|
"treefmt-nix": "treefmt-nix"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1735802549,
|
"lastModified": 1735934313,
|
||||||
"narHash": "sha256-aS03+IGLexQt5HL+tLZqSko6Jpxa+eozqcide/pab34=",
|
"narHash": "sha256-l7P53BL86pnpyQunMGuNtIvDM3IN3pjHuIYyxd7RZ7Y=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nixvim",
|
"repo": "nixvim",
|
||||||
"rev": "3285bbda0aa0151c3b1914758e6950dfb554962f",
|
"rev": "93b5fb04783b58afa691977dcbb90b58483b3d82",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -959,6 +1044,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"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nuschtosSearch": {
|
"nuschtosSearch": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-utils": "flake-utils",
|
"flake-utils": "flake-utils",
|
||||||
|
|
@ -1015,6 +1138,7 @@
|
||||||
"impermanence": "impermanence",
|
"impermanence": "impermanence",
|
||||||
"nix-darwin": "nix-darwin",
|
"nix-darwin": "nix-darwin",
|
||||||
"nix-gaming": "nix-gaming",
|
"nix-gaming": "nix-gaming",
|
||||||
|
"nix-on-droid": "nix-on-droid",
|
||||||
"nixos-facter-modules": "nixos-facter-modules",
|
"nixos-facter-modules": "nixos-facter-modules",
|
||||||
"nixpkgs": "nixpkgs_4",
|
"nixpkgs": "nixpkgs_4",
|
||||||
"nixvim": "nixvim",
|
"nixvim": "nixvim",
|
||||||
|
|
@ -1038,6 +1162,22 @@
|
||||||
"type": "github"
|
"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": {
|
"sops-nix": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": "nixpkgs_5"
|
"nixpkgs": "nixpkgs_5"
|
||||||
|
|
@ -1073,11 +1213,11 @@
|
||||||
"tinted-tmux": "tinted-tmux"
|
"tinted-tmux": "tinted-tmux"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1735864066,
|
"lastModified": 1735933801,
|
||||||
"narHash": "sha256-V1JmPXW3vmxCuvf+IItGlLgBH8rolUahCMFyglxy19s=",
|
"narHash": "sha256-SbkFaIYzfoasvu6GN5fdlaltrcEtUcoPsTRulWNkH7E=",
|
||||||
"owner": "danth",
|
"owner": "danth",
|
||||||
"repo": "stylix",
|
"repo": "stylix",
|
||||||
"rev": "0ce2a52decf36d815065f8cda06586ed59ed3ef7",
|
"rev": "e0a41d3a2562ce1b43cad8560333673d04b111b8",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
||||||
13
flake.nix
13
flake.nix
|
|
@ -36,6 +36,11 @@
|
||||||
url = "github:LnL7/nix-darwin";
|
url = "github:LnL7/nix-darwin";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
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:
|
outputs = { self, nixpkgs, ... }@inputs:
|
||||||
|
|
@ -54,6 +59,14 @@
|
||||||
first-nixos-install = "1729112485"; #stat -c %W /
|
first-nixos-install = "1729112485"; #stat -c %W /
|
||||||
in
|
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 = {
|
darwinConfigurations = {
|
||||||
"kylekrein-air" = inputs.nix-darwin.lib.darwinSystem {
|
"kylekrein-air" = inputs.nix-darwin.lib.darwinSystem {
|
||||||
specialArgs = { inherit self; };
|
specialArgs = { inherit self; };
|
||||||
|
|
|
||||||
|
|
@ -120,6 +120,9 @@
|
||||||
#background;
|
#background;
|
||||||
loginBackground = false;
|
loginBackground = false;
|
||||||
})
|
})
|
||||||
|
joplin-desktop
|
||||||
|
kdenlive
|
||||||
|
super-productivity
|
||||||
helvum
|
helvum
|
||||||
killall
|
killall
|
||||||
nix-output-monitor
|
nix-output-monitor
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@
|
||||||
./modules/tmux/home.nix
|
./modules/tmux/home.nix
|
||||||
] ++ lib.optional (hwconfig.useImpermanence) (import ./modules/impermanence/home.nix { inherit username; inherit inputs; } )
|
] ++ 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 (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
|
# Home Manager needs a bit of information about you and the paths it should
|
||||||
# manage.
|
# manage.
|
||||||
home.username = username;
|
home.username = username;
|
||||||
|
|
|
||||||
13
nixos/hosts/android/default.nix
Normal file
13
nixos/hosts/android/default.nix
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
environment.packages = with pkgs;[
|
||||||
|
neovim
|
||||||
|
git
|
||||||
|
fastfetch
|
||||||
|
];
|
||||||
|
|
||||||
|
home-manager.config = (import home.nix);
|
||||||
|
|
||||||
|
system.stateVersion = "24.05";
|
||||||
|
}
|
||||||
6
nixos/hosts/android/home.nix
Normal file
6
nixos/hosts/android/home.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
../../modules/nixvim
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
@ -11,6 +11,7 @@
|
||||||
#libsForQt5.kio-extras #extra protocols support (sftp, fish and more)
|
#libsForQt5.kio-extras #extra protocols support (sftp, fish and more)
|
||||||
kdePackages.kio-fuse #to mount remote filesystems via FUSE
|
kdePackages.kio-fuse #to mount remote filesystems via FUSE
|
||||||
kdePackages.kio-extras #extra protocols support (sftp, fish and more)
|
kdePackages.kio-extras #extra protocols support (sftp, fish and more)
|
||||||
|
kdePackages.kio-admin
|
||||||
waybar
|
waybar
|
||||||
swaynotificationcenter
|
swaynotificationcenter
|
||||||
libnotify
|
libnotify
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@
|
||||||
enable = true;
|
enable = true;
|
||||||
colorschemes.catppuccin.enable = true;
|
colorschemes.catppuccin.enable = true;
|
||||||
plugins = {
|
plugins = {
|
||||||
|
markview.enable = true;
|
||||||
tmux-navigator = {
|
tmux-navigator = {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue