Added the 'premier jet' of my nix-darwin config

This commit is contained in:
Alexandre1a 2025-12-02 21:41:53 +01:00
parent e060e6f361
commit 8cfa304ef7
No known key found for this signature in database
GPG Key ID: CE01C28FBC5EEF10
7 changed files with 59 additions and 3 deletions

22
flake.lock generated
View File

@ -380,6 +380,27 @@
"type": "github"
}
},
"nix-darwin": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1764161084,
"narHash": "sha256-HN84sByg9FhJnojkGGDSrcjcbeioFWoNXfuyYfJ1kBE=",
"owner": "nix-darwin",
"repo": "nix-darwin",
"rev": "e95de00a471d07435e0527ff4db092c84998698e",
"type": "github"
},
"original": {
"owner": "nix-darwin",
"ref": "master",
"repo": "nix-darwin",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1763966396,
@ -439,6 +460,7 @@
"inputs": {
"home-manager": "home-manager",
"hyprland": "hyprland",
"nix-darwin": "nix-darwin",
"nixpkgs": "nixpkgs_2"
}
},

View File

@ -1,27 +1,38 @@
{
description = "Nixos config flake";
description = "Alexandre1a's nixOS and macOS config flake";
inputs = {
# NixPKGS unstable
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
# Hyprland
hyprland.url = "github:hyprwm/Hyprland";
nix-darwin = {
url = "github:nix-darwin/nix-darwin/master";
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, ... }@inputs: {
outputs = { self,nix-darwin ,nixpkgs, ... }@inputs: {
# use "nixos", or your hostname as the name of the configuration
# it's a better practice than "default" shown in the video
nixosConfigurations.nixos = nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs;};
modules = [
./hosts/default/configuration.nix
./hosts/nixos/configuration.nix
inputs.home-manager.nixosModules.default
];
};
darwinConfigurations.macOS = nix-darwin.lib.darwinSystem {
modules = [
./hosts/macos/configuration.nix
];
};
};
}

View File

@ -0,0 +1,23 @@
{ pkgs, ... }:
{
# All imports go here
imports =
[
./modules.nix
];
# All System packages
environment.systemPackages =
[
pkgs.vim
];
# Enable required settings
# Flakes
nix.settings.experimental-features = [ "nix-command" "flakes" ];
# Target arch
nixpkgs.hostPlatform = "aarch64-darwin";
# Nix-Darwin State Version
system.stateVersion = 6;
}