Nix-on-droid fixes
This commit is contained in:
parent
c6a0a4f631
commit
8a8a2f0472
7 changed files with 110 additions and 47 deletions
|
@ -102,10 +102,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
# Setup nix-on-droid configurations
|
# Setup nix-on-droid configurations
|
||||||
nixOnDroidConfigurations.default = nix-on-droid.lib.nixOnDroidConfiguration {
|
nixOnDroidConfigurations.default = utils.createDroidSystem { entrypoint = ./nix-on-droid/ty-pixel; };
|
||||||
pkgs = import nixpkgs { system = "aarch64-linux"; };
|
|
||||||
modules = [ ./nix-on-droid/ty-pixel ];
|
|
||||||
};
|
|
||||||
|
|
||||||
# Enable direct flake support for colmena
|
# Enable direct flake support for colmena
|
||||||
colmenaHive = colmena.lib.makeHive self.outputs.colmena;
|
colmenaHive = colmena.lib.makeHive self.outputs.colmena;
|
||||||
|
|
|
@ -1,37 +1,53 @@
|
||||||
{ inputs, system, secrets, lib, config, ... }:
|
{ inputs, system, secrets, config, lib, ... }:
|
||||||
{
|
{
|
||||||
imports = [ ./meta.nix ];
|
imports = [ ./meta.nix ];
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
# Allow user installation of packages
|
home-manager = let
|
||||||
home-manager.useGlobalPkgs = true;
|
entrypoint = {
|
||||||
home-manager.useUserPackages = true;
|
imports = [
|
||||||
home-manager.sharedModules = [
|
# Import meta options for configuring the configuration
|
||||||
# Import plasma manager and all of my custom modules for use
|
./meta.nix
|
||||||
inputs.plasma-manager.homeManagerModules.plasma-manager
|
# Import all of my config
|
||||||
inputs.flatpaks.homeManagerModules.declarative-flatpak
|
./config
|
||||||
./modules
|
];
|
||||||
|
|
||||||
|
home.stateVersion = "24.05";
|
||||||
|
|
||||||
|
# Inherit my home manager config options
|
||||||
|
meta.home-manager = config.meta.home-manager;
|
||||||
|
};
|
||||||
|
in lib.mkMerge [
|
||||||
|
## General home-manager.* options
|
||||||
|
{
|
||||||
|
# Allow user installation of packages
|
||||||
|
useGlobalPkgs = true;
|
||||||
|
useUserPackages = true;
|
||||||
|
sharedModules = [
|
||||||
|
# Import plasma manager and all of my custom modules for use
|
||||||
|
inputs.plasma-manager.homeManagerModules.plasma-manager
|
||||||
|
inputs.flatpaks.homeManagerModules.declarative-flatpak
|
||||||
|
./modules
|
||||||
|
];
|
||||||
|
# Inherit all of my nixos config custom arguments
|
||||||
|
extraSpecialArgs = {
|
||||||
|
inherit inputs system secrets;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Hopefully avoid file conflicts
|
||||||
|
backupFileExtension = "bak";
|
||||||
|
}
|
||||||
|
|
||||||
|
# The nixos home-manager module and the nix-on-droid compatibility have different options,
|
||||||
|
# so this handles both in the same file
|
||||||
|
|
||||||
|
(lib.mkIf (config.meta.home-manager.interface == "nixos") {
|
||||||
|
users.ty = entrypoint;
|
||||||
|
})
|
||||||
|
|
||||||
|
(lib.mkIf (config.meta.home-manager.interface == "nix-on-droid") {
|
||||||
|
config = entrypoint;
|
||||||
|
})
|
||||||
];
|
];
|
||||||
# Inherit all of my nixos config custom arguments
|
|
||||||
home-manager.extraSpecialArgs = {
|
|
||||||
inherit inputs system secrets;
|
|
||||||
};
|
|
||||||
|
|
||||||
# Hopefully avoid file conflicts
|
|
||||||
home-manager.backupFileExtension = "backup";
|
|
||||||
|
|
||||||
home-manager.users.ty = {
|
|
||||||
imports = [
|
|
||||||
# Import meta options for configuring the configuration
|
|
||||||
./meta.nix
|
|
||||||
# Import all of my config
|
|
||||||
./config
|
|
||||||
];
|
|
||||||
|
|
||||||
home.stateVersion = "24.05";
|
|
||||||
|
|
||||||
# Inherit my home manager config options
|
|
||||||
meta.home-manager = config.meta.home-manager;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
|
@ -30,6 +30,13 @@
|
||||||
firefox.enable = lib.mkEnableOption "firefox configuration";
|
firefox.enable = lib.mkEnableOption "firefox configuration";
|
||||||
rescrobbled.enable = lib.mkEnableOption "rescrobbled configuration";
|
rescrobbled.enable = lib.mkEnableOption "rescrobbled configuration";
|
||||||
vscode.enable = lib.mkEnableOption "vscode configuration";
|
vscode.enable = lib.mkEnableOption "vscode configuration";
|
||||||
|
|
||||||
|
interface = lib.mkOption {
|
||||||
|
type = lib.types.enum [ "nixos" "nix-on-droid" ];
|
||||||
|
default = "nixos";
|
||||||
|
defaultText = lib.literalExpression ''"nixos"'';
|
||||||
|
description = "The interface to use for configuring home-manger as a module";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# Handle preset logic
|
# Handle preset logic
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
{
|
{
|
||||||
networking.hostName = "ty-nixos";
|
networking.hostName = "ty-nixos";
|
||||||
|
|
||||||
|
# networking.hosts = { "23.95.137.176" = [ "s.optifine.net" ]; };
|
||||||
|
|
||||||
# Enable firewall
|
# Enable firewall
|
||||||
networking.firewall.enable = true;
|
networking.firewall.enable = true;
|
||||||
|
|
||||||
|
|
|
@ -1,15 +1,25 @@
|
||||||
{ ... }: {
|
{ inputs, system, secrets, pkgs, ... }: {
|
||||||
system.stateVersion = "24.05";
|
imports = [
|
||||||
|
./environment.nix
|
||||||
|
|
||||||
home-manager.config = {
|
# Import full home-manager config
|
||||||
imports = [ ../../home-manager ];
|
../../home-manager
|
||||||
|
];
|
||||||
|
|
||||||
meta.home-manager.preset = "cli";
|
meta.home-manager = { preset = "cli"; interface = "nix-on-droid"; };
|
||||||
|
|
||||||
|
nix = {
|
||||||
|
extraOptions = ''
|
||||||
|
experimental-features = nix-command flakes
|
||||||
|
'';
|
||||||
|
nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.etcBackupExtension = ".bak";
|
user.shell = "${pkgs.zsh}/bin/zsh";
|
||||||
|
time.timeZone = "America/Denver";
|
||||||
|
terminal = {
|
||||||
|
font = "${pkgs.nerd-fonts.fira-code}/share/fonts/truetype/NerdFonts/FiraCode/FiraCodeNerdFont-Regular.ttf";
|
||||||
|
};
|
||||||
|
|
||||||
nix.extraOptions = ''
|
system.stateVersion = "24.05";
|
||||||
experimental-features = nix-command flakes
|
|
||||||
'';
|
|
||||||
}
|
}
|
||||||
|
|
20
nix-on-droid/ty-pixel/environment.nix
Normal file
20
nix-on-droid/ty-pixel/environment.nix
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
environment = {
|
||||||
|
etcBackupExtension = ".bak";
|
||||||
|
|
||||||
|
packages = with pkgs; [
|
||||||
|
# Basic necessities
|
||||||
|
wget
|
||||||
|
curl
|
||||||
|
neovim
|
||||||
|
# Nix tools
|
||||||
|
nvd
|
||||||
|
# VCS
|
||||||
|
git
|
||||||
|
jujutsu
|
||||||
|
];
|
||||||
|
|
||||||
|
motd = "";
|
||||||
|
};
|
||||||
|
}
|
|
@ -77,4 +77,15 @@
|
||||||
{}
|
{}
|
||||||
hostConfigs
|
hostConfigs
|
||||||
);
|
);
|
||||||
|
|
||||||
|
createDroidSystem = {
|
||||||
|
system ? "aarch64-linux",
|
||||||
|
entrypoint
|
||||||
|
}: inputs.nix-on-droid.lib.nixOnDroidConfiguration {
|
||||||
|
pkgs = import inputs.nixpkgs { inherit system; };
|
||||||
|
modules = [ entrypoint ];
|
||||||
|
extraSpecialArgs = {
|
||||||
|
inherit inputs system secrets;
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
Loading…
Reference in a new issue