flake
This commit is contained in:
parent
84ecfa7ffb
commit
b2e355f058
31
flake.nix
31
flake.nix
@ -1,23 +1,24 @@
|
|||||||
{
|
{
|
||||||
description = "My Home Manager flake";
|
description = "My first nix flake";
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-22.05-darwin";
|
||||||
home-manager.url = "github:nix-community/home-manager";
|
home-manager.url = "github:nix-community/home-manager";
|
||||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
# nix will normally use the nixpkgs defined in home-managers inputs, we only want one copy of nixpkgs though
|
||||||
|
darwin.url = "github:lnl7/nix-darwin";
|
||||||
|
darwin.inputs.nixpkgs.follows = "nixpkgs"; # ...
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = inputs: {
|
outputs = { self, nixpkgs, home-manager, darwin }: {
|
||||||
defaultPackage.x86_64-linux = home-manager.defaultPackage.x86_64-linux;
|
darwinConfiguration."ts-tl-mbp" = darwin.lib.darwinSystem {
|
||||||
defaultPackage.x86_64-darwin = home-manager.defaultPackage.x86_64-darwin;
|
system = "x86_64-darwin";
|
||||||
|
modules = [
|
||||||
homeConfigurations = {
|
home-manager.darwinModules.home-manager
|
||||||
"tyrel" = inputs.home-manager.lib.homeManagerConfiguration {
|
./hosts/ts-tl-mbp/default.nix
|
||||||
system = "x86_64-darwin";
|
]; # will be important later
|
||||||
homeDirectory = "/Users/tyrel";
|
|
||||||
username = "tyrel";
|
|
||||||
configuration.imports = [ ./home.nix ];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
36
hosts/ts-tl-mbp/default.nix
Normal file
36
hosts/ts-tl-mbp/default.nix
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
# hosts/ts-tl-mbp/default.nix
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
|
||||||
|
# Make sure the nix daemon always runs
|
||||||
|
services.nix-daemon.enable = true;
|
||||||
|
|
||||||
|
# Installs a version of nix, that dosen't need "experimental-features = nix-command flakes" in /etc/nix/nix.conf
|
||||||
|
services.nix-daemon.package = pkgs.nixFlakes;
|
||||||
|
|
||||||
|
# if you use zsh (the default on new macOS installations),
|
||||||
|
# you'll need to enable this so nix-darwin creates a zshrc sourcing needed environment changes
|
||||||
|
programs.zsh.enable = true;
|
||||||
|
|
||||||
|
homebrew = {
|
||||||
|
enable = true;
|
||||||
|
autoUpdate = true;
|
||||||
|
# updates homebrew packages on activation,
|
||||||
|
# can make darwin-rebuild much slower (otherwise i'd forget to do it ever though)
|
||||||
|
casks = [
|
||||||
|
"alfred"
|
||||||
|
"discord"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
home-manager.useGlobalPkgs = true;
|
||||||
|
home-manager.useUserPackages = true;
|
||||||
|
home-manager.users.tyrel = { pkgs, ... }: {
|
||||||
|
|
||||||
|
stateVersion = "22.11"; # read below
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user