combine home-manager and system configs

This commit is contained in:
Noah Masur 2022-04-28 21:15:47 -04:00
parent b922cd8f09
commit 7296c0fefc
4 changed files with 21 additions and 22 deletions

View File

@ -32,19 +32,30 @@
nixosConfigurations = {
desktop = nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = { inherit user fullName font; };
specialArgs = {
gui = true;
inherit user fullName font;
};
modules = [
./nixos/configuration.nix
./nixos/hardware-configuration.nix
./modules/system/timezone.nix
./modules/system/doas.nix
./modules/gaming
./modules/services/keybase.nix
./modules/applications/firefox.nix
home-manager.nixosModules.home-manager
{
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
extraSpecialArgs = { inherit user fullName font; };
extraSpecialArgs = {
gui = true;
inherit user fullName font;
};
users.${user} = {
imports = [
./nixos/home.nix
./modules/applications/firefox.nix
./modules/applications/alacritty.nix
./modules/shell/fish.nix
./modules/shell/utilities.nix

View File

@ -1,5 +1,5 @@
{ pkgs, ... }:
{ pkgs, lib, user, gui, ... }:
{
home.packages = with pkgs; [ firefox ];
home-manager.users.${user}.home.packages = [ (lib.mkIf gui pkgs.firefox) ];
}

View File

@ -1,13 +1,9 @@
{ config, pkgs, lib, ... }:
{ pkgs, lib, user, gui, ... }: {
let gui = config.gui;
in {
config = {
services.keybase.enable = true;
services.kbfs.enable = true;
# home.packages = with lib; with pkgs; [ (mkIf gui.enable keybase-gui) ];
};
home-manager.users.${user}.home.packages =
[ (lib.mkIf gui pkgs.keybase-gui) ];
}

View File

@ -5,14 +5,6 @@
{ config, pkgs, user, ... }:
{
imports = [ # Include the results of the hardware scan.
./hardware-configuration.nix
../modules/system/timezone.nix
../modules/system/doas.nix
../modules/gaming
../modules/services/keybase.nix
];
nixpkgs.config.allowUnfree = true;
nix.extraOptions = "experimental-features = nix-command flakes";