pinephone-img target which boots phosh with nmcli support
This commit is contained in:
parent
a4fd43c1ae
commit
79ca636ac7
36
flake.lock
36
flake.lock
|
@ -1,5 +1,24 @@
|
|||
{
|
||||
"nodes": {
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1654113405,
|
||||
"narHash": "sha256-VpK+0QaWG2JRgB00lw77N9TjkE3ec0iMYIX1TzGpxa4=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "ac2287df5a2d6f0a44bbcbd11701dbbf6ec43675",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"ref": "release-22.05",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"mobile-nixos": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
|
@ -18,6 +37,20 @@
|
|||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1655239344,
|
||||
"narHash": "sha256-5Va2Qmy50AspTfyHvoWrwCpTuqArOg9LnvRPe8YW5no=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "9ef09e06806e79e32e30d17aee6879d69c011037",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"id": "nixpkgs",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1653060744,
|
||||
"narHash": "sha256-kfRusllRumpt33J1hPV+CeCCylCXEU7e0gn2/cIM7cY=",
|
||||
|
@ -34,8 +67,9 @@
|
|||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"home-manager": "home-manager",
|
||||
"mobile-nixos": "mobile-nixos",
|
||||
"nixpkgs": "nixpkgs"
|
||||
"nixpkgs": "nixpkgs_2"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -7,18 +7,18 @@
|
|||
url = "github:nixos/mobile-nixos/efbe2c3c5409c868309ae0770852638e623690b5";
|
||||
flake = false;
|
||||
};
|
||||
home-manager.url = "github:nix-community/home-manager/release-22.05";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, mobile-nixos }: {
|
||||
outputs = { self, nixpkgs, mobile-nixos, home-manager }: {
|
||||
pinephone-img = (nixpkgs.lib.nixosSystem {
|
||||
system = "aarch64-linux";
|
||||
specialArgs = { inherit home-manager; };
|
||||
modules = [
|
||||
(import "${mobile-nixos}/lib/configuration.nix" {
|
||||
device = "pine64-pinephone";
|
||||
})
|
||||
({ ... }: {
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
})
|
||||
./modules/default.nix
|
||||
];
|
||||
}).config.mobile.outputs.u-boot.disk-image;
|
||||
};
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./hardware.nix
|
||||
./home-manager.nix
|
||||
./phosh.nix
|
||||
./users.nix
|
||||
];
|
||||
|
||||
system.stateVersion = "22.05";
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
{ ... }:
|
||||
{
|
||||
## enable the hardware rotation sensor
|
||||
hardware.sensor.iio.enable = true;
|
||||
|
||||
hardware.opengl.enable = true;
|
||||
hardware.opengl.driSupport = true;
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
{ pkgs, home-manager, ... }:
|
||||
{
|
||||
imports = [
|
||||
home-manager.nixosModule
|
||||
];
|
||||
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
|
||||
home-manager.users.colin = {
|
||||
home.stateVersion = "21.11";
|
||||
home.username = "colin";
|
||||
home.homeDirectory = "/home/colin";
|
||||
|
||||
programs = {
|
||||
home-manager.enable = true;
|
||||
firefox.enable = true;
|
||||
git.enable = true;
|
||||
};
|
||||
|
||||
# a few useful packages to start with
|
||||
home.packages = with pkgs; [
|
||||
# useful CLI/admin tools to have during setup
|
||||
fatresize
|
||||
gptfdisk
|
||||
networkmanager
|
||||
sudo
|
||||
vim
|
||||
wget
|
||||
|
||||
# it's good to have a variety of terminals (x11, Qt, GTK) to handle more failures
|
||||
xterm
|
||||
plasma5Packages.konsole
|
||||
gnome.gnome-terminal
|
||||
];
|
||||
};
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
{ ... }:
|
||||
{
|
||||
services.xserver.desktopManager.phosh = {
|
||||
enable = true;
|
||||
user = "colin";
|
||||
group = "users";
|
||||
};
|
||||
|
||||
environment.variables = {
|
||||
# Qt apps won't always start unless this env var is set
|
||||
QT_QPA_PLATFORM = "wayland";
|
||||
};
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
{ ... }:
|
||||
{
|
||||
users.mutableUsers = false;
|
||||
|
||||
users.users.colin = {
|
||||
isNormalUser = true;
|
||||
home = "/home/colin";
|
||||
uid = 1000;
|
||||
# make this numeric so that you can enter it in the phosh lockscreen.
|
||||
# DON'T leave this empty: not all greeters support passwordless users.
|
||||
initialPassword = "147147";
|
||||
extraGroups = [ "wheel" ];
|
||||
};
|
||||
|
||||
security.sudo = {
|
||||
enable = true;
|
||||
wheelNeedsPassword = false;
|
||||
};
|
||||
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
permitRootLogin = "no";
|
||||
passwordAuthentication = true;
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue