From ca50a35521563a99aed01d27d58266d7ecd54316 Mon Sep 17 00:00:00 2001 From: Leni Aniva Date: Fri, 15 Nov 2024 15:12:16 -0800 Subject: [PATCH] feat: Add Nix flake stub --- configuration.nix | 19 +++++++++++++++++++ flake.lock | 48 +++++++++++++++++++++++++++++++++++++++++++++++ flake.nix | 17 +++++++++++++++++ 3 files changed, 84 insertions(+) create mode 100644 configuration.nix create mode 100644 flake.lock create mode 100644 flake.nix diff --git a/configuration.nix b/configuration.nix new file mode 100644 index 0000000..218c90b --- /dev/null +++ b/configuration.nix @@ -0,0 +1,19 @@ +{ config, pkgs, ... }: +{ + # List packages installed in system profile. To search by name, run: + # $ nix-env -qaP | grep wget + environment.systemPackages = [ + pkgs.vim + ]; + + # Auto upgrade nix package and the daemon service. + services.nix-daemon.enable = true; + nix.package = pkgs.nix; + + # Enable alternative shell support in nix-darwin. + programs.fish.enable = true; + + # Used for backwards compatibility, please read the changelog before changing. + # $ darwin-rebuild changelog + system.stateVersion = 5; +} diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..e4fbdc6 --- /dev/null +++ b/flake.lock @@ -0,0 +1,48 @@ +{ + "nodes": { + "nix-darwin": { + "inputs": { + "nixpkgs": [ + "nixpkgs-darwin" + ] + }, + "locked": { + "lastModified": 1731642829, + "narHash": "sha256-vG+O2RZRzYZ8BUMNNJ+BLSj6PUoGW7taDQbp6QNJ3Xo=", + "owner": "LnL7", + "repo": "nix-darwin", + "rev": "f86f158efd4bab8dce3e207e4621f1df3a760b7a", + "type": "github" + }, + "original": { + "owner": "LnL7", + "repo": "nix-darwin", + "type": "github" + } + }, + "nixpkgs-darwin": { + "locked": { + "lastModified": 1730891215, + "narHash": "sha256-i85DPrhDuvzgvIWCpJlbfM2UFtNYbapo20MtQXsvay4=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "c128e44a249d6180740d0a979b6480d5b795c013", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-24.05-darwin", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nix-darwin": "nix-darwin", + "nixpkgs-darwin": "nixpkgs-darwin" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..f114aed --- /dev/null +++ b/flake.nix @@ -0,0 +1,17 @@ +{ + description = "Leni Aniva's Systems"; + + inputs = { + nixpkgs-darwin.url = "github:NixOS/nixpkgs/nixpkgs-24.05-darwin"; + nix-darwin = { + url = "github:LnL7/nix-darwin"; + inputs.nixpkgs.follows = "nixpkgs-darwin"; + }; + }; + + outputs = inputs@{ self, nixpkgs-darwin, nix-darwin }: { + darwinConfigurations."sphalerite" = nix-darwin.lib.darwinSystem { + modules = [ ./configuration.nix ]; + }; + }; +} -- 2.44.1