holy oh my what the heck, home-manager is SETUP

This commit is contained in:
Benson Chu 2024-01-04 08:39:16 -06:00
parent 59fdb3111f
commit 0cef6bf546
4 changed files with 19 additions and 5 deletions

View file

@ -46,15 +46,16 @@
]
},
"locked": {
"lastModified": 1702124454,
"narHash": "sha256-+lwBEFPxQ8VM3ht6qEcR92A/M9GF6mDtAwKgPI3YgXQ=",
"lastModified": 1704099619,
"narHash": "sha256-QRVMkdxLmv+aKGjcgeEg31xtJEIsYq4i1Kbyw5EPS6g=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "fa91c109b0dd12e680dd29010e262884f7b26186",
"rev": "7e398b3d76bc1503171b1364c9d4a07ac06f3851",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "release-23.11",
"repo": "home-manager",
"type": "github"
}

View file

@ -3,13 +3,13 @@
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11";
unstable.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager";
url = "github:nix-community/home-manager/release-23.11";
inputs.nixpkgs.follows = "nixpkgs";
};
emacs-overlay.url = "github:nix-community/emacs-overlay/master";
};
outputs = { self, nixpkgs, unstable, ... }:
outputs = { self, nixpkgs, unstable, home-manager, ... }:
let
system = "x86_64-linux";
unstable-overlay = final: prev: {
@ -23,6 +23,7 @@
nixosConfigurations.NixFrame = nixpkgs.lib.nixosSystem {
inherit system;
modules = [
home-manager.nixosModule
{ nixpkgs.overlays = [ unstable-overlay ]; }
./hosts/NixFrame/configuration.nix
];

View file

@ -18,6 +18,10 @@ in
my.bash-config.enable = true;
home-manager.users.benson = { ... }: {
home.stateVersion = "23.11";
};
# Enable the X11 windowing system.
services.xserver.enable = true;

View file

@ -7,5 +7,13 @@ in
options.my.bash-config.enable = lib.mkEnableOption "Enable bash configuration file";
config = lib.mkIf cfg.enable {
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 = ./emacs.sh;
home.file.".bashrc".source = ./bashrc.sh;
};
};
}