Nix-on-droid fixes
This commit is contained in:
parent
c6a0a4f631
commit
44a4ac95a9
7 changed files with 108 additions and 47 deletions
|
@ -102,10 +102,7 @@
|
|||
};
|
||||
|
||||
# Setup nix-on-droid configurations
|
||||
nixOnDroidConfigurations.default = nix-on-droid.lib.nixOnDroidConfiguration {
|
||||
pkgs = import nixpkgs { system = "aarch64-linux"; };
|
||||
modules = [ ./nix-on-droid/ty-pixel ];
|
||||
};
|
||||
nixOnDroidConfigurations.default = utils.createDroidSystem { entrypoint = ./nix-on-droid/ty-pixel; };
|
||||
|
||||
# Enable direct flake support for colmena
|
||||
colmenaHive = colmena.lib.makeHive self.outputs.colmena;
|
||||
|
|
|
@ -1,26 +1,10 @@
|
|||
{ inputs, system, secrets, lib, config, ... }:
|
||||
{ inputs, system, secrets, config, lib, ... }:
|
||||
{
|
||||
imports = [ ./meta.nix ];
|
||||
|
||||
config = {
|
||||
# Allow user installation of packages
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.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
|
||||
home-manager.extraSpecialArgs = {
|
||||
inherit inputs system secrets;
|
||||
};
|
||||
|
||||
# Hopefully avoid file conflicts
|
||||
home-manager.backupFileExtension = "backup";
|
||||
|
||||
home-manager.users.ty = {
|
||||
home-manager = let
|
||||
entrypoint = {
|
||||
imports = [
|
||||
# Import meta options for configuring the configuration
|
||||
./meta.nix
|
||||
|
@ -33,5 +17,35 @@
|
|||
# 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
|
||||
|
||||
(if (config.meta.home-manager.interface == "nixos") then {
|
||||
users.ty = entrypoint;
|
||||
} else {
|
||||
config = entrypoint;
|
||||
})
|
||||
];
|
||||
};
|
||||
}
|
|
@ -30,6 +30,13 @@
|
|||
firefox.enable = lib.mkEnableOption "firefox configuration";
|
||||
rescrobbled.enable = lib.mkEnableOption "rescrobbled 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
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
{
|
||||
networking.hostName = "ty-nixos";
|
||||
|
||||
# networking.hosts = { "23.95.137.176" = [ "s.optifine.net" ]; };
|
||||
|
||||
# Enable firewall
|
||||
networking.firewall.enable = true;
|
||||
|
||||
|
|
|
@ -1,15 +1,25 @@
|
|||
{ ... }: {
|
||||
system.stateVersion = "24.05";
|
||||
{ inputs, system, secrets, pkgs, ... }: {
|
||||
imports = [
|
||||
./environment.nix
|
||||
|
||||
home-manager.config = {
|
||||
imports = [ ../../home-manager ];
|
||||
# Import full home-manager config
|
||||
../../home-manager
|
||||
];
|
||||
|
||||
meta.home-manager.preset = "cli";
|
||||
};
|
||||
meta.home-manager = { preset = "cli"; interface = "nix-on-droid"; };
|
||||
|
||||
environment.etcBackupExtension = ".bak";
|
||||
|
||||
nix.extraOptions = ''
|
||||
nix = {
|
||||
extraOptions = ''
|
||||
experimental-features = nix-command flakes
|
||||
'';
|
||||
nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
|
||||
};
|
||||
|
||||
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";
|
||||
};
|
||||
|
||||
system.stateVersion = "24.05";
|
||||
}
|
||||
|
|
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
|
||||
);
|
||||
|
||||
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