start work on pinetab

This commit is contained in:
ChaotiCryptidz 2021-12-27 14:26:22 +00:00
parent 24e276fdc8
commit c3d17079aa
5 changed files with 71 additions and 6 deletions

View file

@ -54,6 +54,22 @@
"type": "github"
}
},
"mobile-nixos": {
"flake": false,
"locked": {
"lastModified": 1640614937,
"narHash": "sha256-ymiYJNOVJIZzwUxFpFresjX7glyUxwBTdWiPCAFsP/Y=",
"owner": "chaoticryptidz",
"repo": "mobile-nixos",
"rev": "49c0a0959407415ee3ae4db35525e9aca749cb04",
"type": "github"
},
"original": {
"owner": "chaoticryptidz",
"repo": "mobile-nixos",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1632086102,
@ -86,11 +102,11 @@
},
"nixpkgs_3": {
"locked": {
"lastModified": 1640319671,
"narHash": "sha256-ZkKmakwaOaLiZOpIZWbeJZwap5CzJ30s4UJTfydYIYc=",
"lastModified": 1640408860,
"narHash": "sha256-h2uF3+a8bVfM8SjcS4hLbsOzOuG3qsxuImC0BucWs1Q=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "eac07edbd20ed4908b98790ba299250b5527ecdf",
"rev": "cb372c3b8880e504b06946e8fb2ca9777c685505",
"type": "github"
},
"original": {
@ -104,6 +120,7 @@
"inputs": {
"deploy-rs": "deploy-rs",
"home-manager": "home-manager",
"mobile-nixos": "mobile-nixos",
"nixpkgs": "nixpkgs_3"
}
},

View file

@ -5,7 +5,12 @@
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager.url = "github:nix-community/home-manager";
deploy-rs.url = "github:serokell/deploy-rs";
#mobile-nixos.url = "github:NixOS/mobile-nixos";
mobile-nixos = {
# plz change to NixOS/ when https://github.com/NixOS/mobile-nixos/pull/435 merges
url = "github:chaoticryptidz/mobile-nixos";
flake = false;
};
};
outputs = { ... }@inputs: import ./outputs.nix inputs;

View file

@ -1,4 +1,4 @@
{ home-manager, nixpkgs, tree, ... }@inputs:
{ self, home-manager, nixpkgs, tree, ... }@inputs:
let
defaultModules =
[ home-manager.nixosModules.home-manager tree.impure.profiles.base ];
@ -13,4 +13,11 @@ in {
system = "x86_64-linux";
modules = defaultModules ++ [ ./lappy/lappy.nix ];
};
pinetab_modules = defaultModules ++ [ ./pinetab/pinetab.nix ];
pinetab = nixpkgs.lib.nixosSystem {
specialArgs = defaultSpecialArgs;
system = "aarch64-linux";
modules = self.pinetab_modules;
};
}

29
hosts/pinetab/pinetab.nix Normal file
View file

@ -0,0 +1,29 @@
{ tree, config, pkgs, inputs, lib, ... }:
{
imports = with tree;
[
users.chaoticryptidz
profiles.network_manager
profiles.dnscrypt
profiles.sshd
] ++ [
import
"${inputs.mobile-nixos}/lib/configuration.nix"
{ device = "pine64-pinetab"; }
];
users.users.root.password = "nixos";
services.openssh.permitRootLogin = lib.mkForce "yes";
home-manager.users.root = { imports = with tree; [ home.base ]; };
home-manager.users.chaoticryptidz = {
imports = with tree; [ home.base home.dev home.network_manager ];
};
networking.hostName = "pinetab";
time.timeZone = "Europe/London";
system.stateVersion = "21.11";
}

View file

@ -1,4 +1,4 @@
{ self, nixpkgs, home-manager, deploy-rs, ... }@inputs:
{ self, nixpkgs, home-manager, mobile-nixos, deploy-rs, ... }@inputs:
let
mkTree = import ./tree.nix { inherit (nixpkgs) lib; };
tree = mkTree {
@ -17,6 +17,13 @@ in {
#legacyPackages.tree = tree;
nixosConfigurations = import ./hosts ({ inherit tree; } // inputs);
pinetab-disk-image =
(import "${mobile-nixos}/lib/eval-with-configuration.nix" {
configuration = self.nixosConfigurations.pinetab_modules;
device = "pine64-pinetab";
pkgs = nixpkgs.legacyPackages.aarch64-linux;
}).outputs.disk-image;
deploy.nodes.lappy = {
hostname = "localhost";
profiles.system = {