From 8bdd0a3a746bfaacee2bbaec9612c674ff822fa4 Mon Sep 17 00:00:00 2001 From: Elias Almqvist Date: Thu, 25 Jul 2024 13:51:20 -0700 Subject: [PATCH] nix-darwin fixes --- nix-darwin/flake.lock | 48 +++++++++++++++++++++++++++++++++++++++++++ nix-darwin/flake.nix | 30 +++++++++++++-------------- nix-darwin/home.nix | 12 +++++------ 3 files changed, 67 insertions(+), 23 deletions(-) create mode 100644 nix-darwin/flake.lock diff --git a/nix-darwin/flake.lock b/nix-darwin/flake.lock new file mode 100644 index 0000000..4d351a9 --- /dev/null +++ b/nix-darwin/flake.lock @@ -0,0 +1,48 @@ +{ + "nodes": { + "home-manager": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1721852138, + "narHash": "sha256-JH8N5uoqoVA6erV4O40VtKKHsnfmhvMGbxMNDLtim5o=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "304a011325b7ac7b8c9950333cd215a7aa146b0e", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1721782431, + "narHash": "sha256-UNDpwjYxNXQet/g3mgRLsQ9zxrbm9j2JEvP4ijF3AWs=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "4f02464258baaf54992debfd010a7a3662a25536", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "home-manager": "home-manager", + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/nix-darwin/flake.nix b/nix-darwin/flake.nix index 451533c..6434606 100644 --- a/nix-darwin/flake.nix +++ b/nix-darwin/flake.nix @@ -1,29 +1,27 @@ { - description = "Home Manager configuration"; + description = "elal darwin nix config"; inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; - home-manager.url = "github:nix-community/home-manager"; - home-manager.inputs.nixpkgs.follows = "nixpkgs"; + home-manager = { + url = "github:nix-community/home-manager"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; outputs = { self, nixpkgs, home-manager }: let - system = "x86_64-darwin"; + system = "aarch64-darwin"; + pkgs = import nixpkgs { inherit system; }; in { - homeConfigurations = { - username = home-manager.lib.homeManagerConfiguration { - pkgs = import nixpkgs { inherit system; }; - modules = [ - home-manager.homeManagerConfiguration { - home.stateVersion = "23.05"; - imports = [ - ./home.nix - ]; - } - ]; - }; + homeConfigurations.elal = home-manager.lib.homeManagerConfiguration { + inherit pkgs; + modules = [ + ./home.nix + ]; }; + + packages.${system}.default = self.homeConfigurations.elal.activationPackage; }; } diff --git a/nix-darwin/home.nix b/nix-darwin/home.nix index b012f6e..8ed6a51 100644 --- a/nix-darwin/home.nix +++ b/nix-darwin/home.nix @@ -64,12 +64,10 @@ programs.neovim = { enable = true; viAlias = true; - settings = { - neovim.init.vimrc = '' - " Example Neovim configuration - set number - syntax on - ''; - }; + extraConfig = '' + " Example Neovim configuration + set number + syntax on + ''; }; }