Compare commits

...

2 Commits

Author SHA1 Message Date
49e9fad614
Add preliminary multi-user to homeManagerInit 2024-01-23 15:37:55 +01:00
922cbe5378
add nix-index-database to inputs 2024-01-23 15:17:18 +01:00
2 changed files with 31 additions and 2 deletions

21
flake.lock generated
View File

@ -21,6 +21,26 @@
"type": "github"
}
},
"nix-index-database": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1705806513,
"narHash": "sha256-FcOmNjhHFfPz2udZbRpZ1sfyhVMr+C2O8kOxPj+HDDk=",
"owner": "nix-community",
"repo": "nix-index-database",
"rev": "f8e04fbcebcc24cebc91989981bd45f69b963ed7",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nix-index-database",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1705641746,
@ -72,6 +92,7 @@
"root": {
"inputs": {
"home-manager": "home-manager",
"nix-index-database": "nix-index-database",
"nixpkgs": "nixpkgs",
"nixpkgs-unstable": "nixpkgs-unstable",
"pkg-android-tools": "pkg-android-tools"

View File

@ -14,6 +14,12 @@
# 33.0.3p2 as suggested by https://xdaforums.com/t/guide-january-3-2024-root-pixel-7-pro-unlock-bootloader-pass-safetynet-both-slots-bootable-more.4505353/
# android tools versions [ 34.0.0, 34.0.5 ) causes bootloops somehow and 34.0.5 isn't in nixpkgs yet
pkg-android-tools.url = "github:NixOS/nixpkgs/55070e598e0e03d1d116c49b9eff322ef07c6ac6";
# provides an up-to-date database for comma
nix-index-database = {
url = "github:nix-community/nix-index-database";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, nixpkgs-unstable, ... }@inputs:
@ -47,7 +53,7 @@
# This function produces a module that adds the home-manager module to the
# system and configures the given module to the user's Home Manager
# configuration
homeManagerInit = {system, username ? _username , module ? _ : {}, userModules ? { ${username} = [ module ] ;}, stateVersion }:
homeManagerInit = {system, username ? _username , module ? _ : {}, rootModule ? _:{}, userModules ? { ${username} = [ module ] ; root = [ rootModule ]; }, stateVersion }:
{ config, lib, pkgs, ... }:
let
mapUserModules = lib.attrsets.mapAttrs (user: modules: {...}:
@ -128,9 +134,11 @@
./system/android.nix
# ./system/hyprland.nix
(homeManagerInit {
module = import ./hosts/slab/home.nix;
# module = import ./hosts/slab/home.nix;
inherit system;
stateVersion = "23.11";
# rootModule = import ./home/root.nix;
userModules = { ${username} = [(import ./hosts/slab/home.nix)]; root = [(import ./home/root.nix)]; };
})
];
specialArgs = {