mirror of
https://github.com/softinio/nix-config.git
synced 2025-09-01 07:06:41 -07:00
updates and added devenv as a package
This commit is contained in:
parent
cc54218e6c
commit
850b39c9b6
3 changed files with 74 additions and 72 deletions
119
flake.nix
119
flake.nix
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
description = "Nix and home-manager configurations for Softinio's macbook";
|
||||
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
nix-darwin = {
|
||||
|
@ -13,73 +13,74 @@
|
|||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs = {self, nix-darwin, home-manager, nur, nixpkgs, ...}:
|
||||
|
||||
outputs = { self, nix-darwin, home-manager, nur, nixpkgs, ... }:
|
||||
let
|
||||
homeManagerConfFor = config: { ... }: {
|
||||
nixpkgs.overlays = [ nur.overlay ];
|
||||
imports = [ config ];
|
||||
};
|
||||
|
||||
|
||||
m3maxConfiguration = { pkgs, ... }: {
|
||||
environment.systemPackages = with pkgs;
|
||||
[
|
||||
home-manager
|
||||
];
|
||||
|
||||
fonts = {
|
||||
fontDir.enable = true;
|
||||
fonts = with pkgs; [
|
||||
fira-code
|
||||
];
|
||||
};
|
||||
|
||||
services.nix-daemon.enable = true;
|
||||
|
||||
nix = {
|
||||
nixPath = nixpkgs.lib.mkForce [
|
||||
"nixpkgs=${nixpkgs}"
|
||||
];
|
||||
|
||||
package = pkgs.nixUnstable;
|
||||
settings = {
|
||||
experimental-features = "nix-command flakes repl-flake";
|
||||
extra-platforms = [ "x86_64-darwin" "aarch64-darwin" ];
|
||||
trusted-users = [ "root" "salar" ];
|
||||
[
|
||||
home-manager
|
||||
];
|
||||
|
||||
fonts = {
|
||||
fontDir.enable = true;
|
||||
fonts = with pkgs; [
|
||||
fira-code
|
||||
];
|
||||
};
|
||||
distributedBuilds = false;
|
||||
};
|
||||
|
||||
programs.fish.enable = true;
|
||||
|
||||
system.configurationRevision = self.rev or self.dirtyRev or null;
|
||||
|
||||
system.stateVersion = 4;
|
||||
|
||||
nixpkgs.hostPlatform = "aarch64-darwin";
|
||||
|
||||
users = {
|
||||
users.salar = {
|
||||
home = /Users/salar;
|
||||
|
||||
services.nix-daemon.enable = true;
|
||||
|
||||
nix = {
|
||||
nixPath = nixpkgs.lib.mkForce [
|
||||
"nixpkgs=${nixpkgs}"
|
||||
];
|
||||
|
||||
package = pkgs.nixUnstable;
|
||||
settings = {
|
||||
experimental-features = "nix-command flakes";
|
||||
extra-platforms = [ "x86_64-darwin" "aarch64-darwin" ];
|
||||
trusted-users = [ "root" "salar" ];
|
||||
};
|
||||
distributedBuilds = false;
|
||||
};
|
||||
|
||||
programs.fish.enable = true;
|
||||
|
||||
system.configurationRevision = self.rev or self.dirtyRev or null;
|
||||
|
||||
system.stateVersion = 4;
|
||||
|
||||
nixpkgs.hostPlatform = "aarch64-darwin";
|
||||
|
||||
users = {
|
||||
users.salar = {
|
||||
home = /Users/salar;
|
||||
};
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
darwinConfigurations.salarm3max = nix-darwin.lib.darwinSystem {
|
||||
system = "aarc64-darwin";
|
||||
modules = [
|
||||
m3maxConfiguration
|
||||
home-manager.darwinModules.home-manager
|
||||
{
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.users.salar = homeManagerConfFor ./home.nix;
|
||||
}
|
||||
];
|
||||
specialArgs = { inherit nixpkgs; };
|
||||
};
|
||||
|
||||
darwinPackages = self.darwinConfigurations.salarm3max.pkgs;
|
||||
|
||||
defaultPackage.aarch64-darwin = self.darwinConfigurations.salarm3max.system;
|
||||
};
|
||||
in
|
||||
{
|
||||
darwinConfigurations.salarm3max = nix-darwin.lib.darwinSystem {
|
||||
system = "aarc64-darwin";
|
||||
modules = [
|
||||
m3maxConfiguration
|
||||
home-manager.darwinModules.home-manager {
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.users.salar = homeManagerConfFor ./home.nix;
|
||||
}
|
||||
];
|
||||
specialArgs = { inherit nixpkgs; };
|
||||
};
|
||||
|
||||
darwinPackages = self.darwinConfigurations.salarm3max.pkgs;
|
||||
|
||||
defaultPackage.aarch64-darwin = self.darwinConfigurations.salarm3max.system;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue