Attempt 3

This commit is contained in:
Benson Chu 2024-01-06 11:57:17 -06:00
parent 6b9ff1b8cb
commit ef1fcc1c42
5 changed files with 14 additions and 24 deletions

View file

@ -71,13 +71,6 @@
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
home-manager = {
extraSpecialArgs = { inherit inputs; };
users = {
benson = import ../home/home.nix;
}
};
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
# programs.mtr.enable = true;

View file

@ -2,6 +2,8 @@
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11";
unstable.url = "github:nixos/nixpkgs/nixos-unstable";
emacs-overlay.url = "github:nix-community/emacs-overlay/master";
home-manager = {
url = "github:nix-community/home-manager/release-23.11";
inputs.nixpkgs.follows = "nixpkgs";
@ -10,7 +12,6 @@
url = "github:pestctrl/bash-config/master";
flake = false;
};
emacs-overlay.url = "github:nix-community/emacs-overlay/master";
};
outputs = { self, nixpkgs, unstable, home-manager, ... }@inputs:
@ -41,7 +42,7 @@
NixDawn = nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = { inherit inputs };
specialArgs = { inherit inputs; };
modules = [
home-manager.nixosModule
{ nixpkgs.overlays = [ unstable-overlay ]; }
@ -51,7 +52,7 @@
NixAdvantage = nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = { inherit inputs };
specialArgs = { inherit inputs; };
modules = [
home-manager.nixosModule
{ nixpkgs.overlays = [ unstable-overlay ]; }
@ -67,8 +68,10 @@
homeConfigurations."benson" = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
specialArgs = { inherit inputs };
modules = [ ./home/home.nix ];
extraSpecialArgs = { inherit inputs; };
modules = [
./home/home.nix
];
};
};
}

View file

@ -2,8 +2,9 @@
{
imports = [
./modules/
./modules
];
# Home Manager needs a bit of information about you and the paths it should
# manage.
home.username = "benson";

View file

@ -16,13 +16,10 @@ in
options.my.bash-config.enable = lib.mkEnableOption "Enable bash configuration file";
config = lib.mkIf cfg.enable {
# Why can't I do the following?
# home.file."${config.xdg.configHome}/bash-config/emacs.sh"
xdg.configFile."bash-config/emacs.sh".source = "${bash-drv}/emacs.sh";
home-manager.users.benson = { ... }: {
# Why can't I do the following?
# home.file."${config.xdg.configHome}/bash-config/emacs.sh"
xdg.configFile."bash-config/emacs.sh".source = "${bash-drv}/emacs.sh";
home.file.".bashrc".source = "${bash-drv}/bashrc.sh";
};
home.file.".bashrc".source = "${bash-drv}/bashrc.sh";
};
}

View file

@ -16,10 +16,6 @@ in
networking.hostName = "NixFrame"; # Define your hostname.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
home-manager.users.benson = { ... }: {
home.stateVersion = "23.11";
};
# Enable the X11 windowing system.
services.xserver.enable = true;