Compare commits

..

No commits in common. "e945e2bbe8fd6f0513b9cbc13332b5a96865a5fc" and "0ccb9390893d95fa12090643bf1c3e28fdeebe9c" have entirely different histories.

6 changed files with 135 additions and 11 deletions

View file

@ -1,4 +1,4 @@
# nix{os,-darwin} config
# nix{os,-darwin,-on-droid} config
It just works™

View file

@ -283,6 +283,42 @@
"type": "github"
}
},
"nix-on-droid": {
"inputs": {
"home-manager": [
"home-manager"
],
"nix-formatter-pack": [
"nix-formatter-pack"
],
"nixpkgs": [
"nixpkgs"
],
"nixpkgs-docs": [
"nixpkgs"
],
"nixpkgs-for-bootstrap": [
"nixpkgs"
],
"nmd": [
"nmd"
]
},
"locked": {
"lastModified": 1709879753,
"narHash": "sha256-zEpy3eweBus/cW/oRMBINps6Bnlazpa7TadonwWibHA=",
"owner": "nix-community",
"repo": "nix-on-droid",
"rev": "7b3cc6e3f9919b2d23003cfafb60c146c3f45793",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "release-23.11",
"repo": "nix-on-droid",
"type": "github"
}
},
"nixos-hardware": {
"locked": {
"lastModified": 1722114937,
@ -443,6 +479,7 @@
"neovim": "neovim",
"nix-darwin": "nix-darwin",
"nix-formatter-pack": "nix-formatter-pack",
"nix-on-droid": "nix-on-droid",
"nixos-hardware": "nixos-hardware",
"nixos-sensible": "nixos-sensible",
"nixpkgs": "nixpkgs",

View file

@ -56,6 +56,15 @@
nixos-sensible = {
url = "github:Guanran928/nixos-sensible";
};
nix-on-droid = {
url = "github:nix-community/nix-on-droid/release-23.11";
inputs.nixpkgs.follows = "nixpkgs";
inputs.nixpkgs-for-bootstrap.follows = "nixpkgs";
inputs.nixpkgs-docs.follows = "nixpkgs";
inputs.home-manager.follows = "home-manager";
inputs.nix-formatter-pack.follows = "nix-formatter-pack";
inputs.nmd.follows = "nmd";
};
nur = {
url = "github:nix-community/NUR";
};
@ -159,6 +168,12 @@
inherit system modules;
specialArgs = {inherit inputs;};
};
mkDroid = modules:
inputs.nix-on-droid.lib.nixOnDroidConfiguration {
inherit modules;
extraSpecialArgs = {inherit inputs;};
};
in {
### imports = [];
nixosModules.default = ./nixos/modules;
@ -180,6 +195,10 @@
"whitesteel" = mkDarwin "x86_64-darwin" [./hosts/whitesteel];
};
nixOnDroidConfigurations = {
"enchilada" = mkDroid [./hosts/enchilada];
};
colmena = {
meta = {
specialArgs = {inherit inputs;};

View file

@ -6,10 +6,15 @@
...
}: {
home = {
username = "guanranwang";
homeDirectory = if pkgs.stdenv.hostPlatform.isDarwin
then "/Users/${config.home.username}"
else "/home/${config.home.username}";
# for nix-on-droid
username = lib.mkDefault "guanranwang";
homeDirectory =
lib.mkDefault
(
if pkgs.stdenv.hostPlatform.isDarwin
then "/Users/${config.home.username}"
else "/home/${config.home.username}"
);
# This value determines the Home Manager release that your
# configuration is compatible with. This helps avoid breakage

View file

@ -0,0 +1,69 @@
{
config,
lib,
pkgs,
inputs,
...
}: {
environment.packages = with pkgs; [
git
openssh
curl
diffutils
findutils
utillinux
tzdata
hostname
man
gnugrep
gnupg
gnused
gnutar
bzip2
gzip
xz
zip
unzip
];
# Backup etc files instead of failing to activate generation if a file already exists in /etc
environment.etcBackupExtension = ".bak";
# Read the changelog before changing this value
system.stateVersion = "24.05";
# Set up nix for flakes
nix.extraOptions = ''
experimental-features = nix-command flakes
'';
# Set your time zone
time.timeZone = "Asia/Shanghai";
# Set termux font
# NOTE: Use "Mono" variation, or Termux will cut your icons in half
terminal.font = "${pkgs.nerdfonts.override {fonts = ["JetBrainsMono"];}}/share/fonts/truetype/NerdFonts/JetBrainsMonoNerdFontMono-Regular.ttf";
# Set user shell
user.shell = lib.getExe pkgs.fish;
environment.sessionVariables."SHELL" = lib.getExe pkgs.fish;
# Set up HM
home-manager = {
backupFileExtension = "hmbak";
useGlobalPkgs = true;
extraSpecialArgs = {
inherit inputs;
osConfig = config;
};
config = ../../home;
sharedModules = [
({...}: {
imports = [
../../home/applications/nix
];
})
];
};
}

View file

@ -21,12 +21,6 @@ in {
'';
};
# HACK: no more qt5
libsForQt5 = prev.libsForQt5.overrideScope (_qt5final: _qt5prev: {
fcitx5-with-addons = prev.qt6Packages.fcitx5-with-addons;
fcitx5-qt = prev.emptyDirectory;
});
sway-unwrapped = addPatches prev.sway-unwrapped [
# text_input: Implement input-method popups
# https://github.com/swaywm/sway/pull/7226