add home-manager
This commit is contained in:
84
flake.nix
84
flake.nix
@@ -1,17 +1,85 @@
|
||||
{
|
||||
inputs = {
|
||||
# This is pointing to an unstable release.
|
||||
# If you prefer a stable release instead, you can change the word unstable to the latest number shown here: https://nixos.org/download
|
||||
# i.e. nixos-24.11
|
||||
# Use `nix flake update` to update the flake to the latest revision of the chosen release channel.
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-26.05";
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
noctalia = {
|
||||
url = "github:noctalia-dev/noctalia";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
outputs =
|
||||
inputs@{ self, nixpkgs, ... }:
|
||||
inputs@{
|
||||
self,
|
||||
nixpkgs,
|
||||
home-manager,
|
||||
noctalia,
|
||||
...
|
||||
}:
|
||||
let
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
overlays = [
|
||||
(final: prev: {
|
||||
bitwarden-desktop = prev.bitwarden-desktop // {
|
||||
electron_39 = final.electron_39-bin;
|
||||
};
|
||||
})
|
||||
];
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
allowUnfreePredicate = _: true;
|
||||
};
|
||||
};
|
||||
stateVersion = "26.05";
|
||||
username = "stobbsm";
|
||||
laptop = "demilich";
|
||||
system = "x86_64-linux";
|
||||
email = "matthew@stobbs.ca";
|
||||
in
|
||||
{
|
||||
# NOTE: 'nixos' is the default hostname
|
||||
nixosConfigurations."demilich" = nixpkgs.lib.nixosSystem {
|
||||
modules = [ ./demilich/configuration.nix ];
|
||||
nixosConfigurations = {
|
||||
${laptop} = nixpkgs.lib.nixosSystem {
|
||||
specialArgs =
|
||||
let
|
||||
hostname = "${laptop}";
|
||||
in
|
||||
{
|
||||
inherit
|
||||
inputs
|
||||
self
|
||||
username
|
||||
system
|
||||
stateVersion
|
||||
email
|
||||
hostname
|
||||
;
|
||||
};
|
||||
modules = [ ./${hostname}/configuration.nix ];
|
||||
};
|
||||
};
|
||||
homeConfigurations = {
|
||||
"${username}@${laptop}" = home-manager.lib.homeManagerConfiguration {
|
||||
inherit pkgs;
|
||||
modules = [ ./${laptop}/home.nix ];
|
||||
extraSpecialArgs =
|
||||
let
|
||||
hostname = "${laptop}";
|
||||
in
|
||||
{
|
||||
inherit
|
||||
self
|
||||
inputs
|
||||
username
|
||||
hostname
|
||||
system
|
||||
stateVersion
|
||||
email
|
||||
;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user