use top level imports for programs packages and emacs

This commit is contained in:
willemml 2022-12-29 10:51:36 -08:00
parent 6e52ff7f3c
commit b582ed09a7
Signed by: willemml
GPG key ID: C3DE5DF6198DACBD
6 changed files with 113 additions and 15 deletions

View file

@ -1,4 +1,4 @@
{ pkgs, isDarwin, homeDir, lib, config, inputs, nurNoPkgs, ... }:
{ config, pkgs, inputs, nurNoPkgs, ... }:
let
pcfg = config.programs.emacs.init.usePackage;

97
flake.lock generated Normal file
View file

@ -0,0 +1,97 @@
{
"nodes": {
"home-manager": {
"inputs": {
"nixpkgs": [
"nixpkgs-22_11"
],
"utils": "utils"
},
"locked": {
"lastModified": 1672318366,
"narHash": "sha256-DBUVFooXtE4boZk1LvJ8sTg3nxMmJvNAJQ4lpjxDH5U=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "cbacdaba3c7b361defb36e1cdfa03ae4e74eb4a8",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"nixpkgs-22_11": {
"locked": {
"lastModified": 1672170105,
"narHash": "sha256-RabUtQyG7VCTlWgSu8/nzfF48sWaoO9xAPpRRoVDd18=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "619a61fcfde0cce679708b8644d136e455e84eac",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-22.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1672262501,
"narHash": "sha256-ZNXqX9lwYo1tOFAqrVtKTLcJ2QMKCr3WuIvpN8emp7I=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "e182da8622a354d44c39b3d7a542dc12cd7baa5f",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nur": {
"locked": {
"lastModified": 1672325070,
"narHash": "sha256-KOMgKYCUTTCKsTQ2+N0IkcgiXKuugIVGzfTN6UEZSoU=",
"owner": "nix-community",
"repo": "NUR",
"rev": "e914bcdc68da7d0b96ea4645a3996e0efd735dcc",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "NUR",
"type": "github"
}
},
"root": {
"inputs": {
"home-manager": "home-manager",
"nixpkgs-22_11": "nixpkgs-22_11",
"nixpkgs-unstable": "nixpkgs-unstable",
"nur": "nur"
}
},
"utils": {
"locked": {
"lastModified": 1667395993,
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

View file

@ -6,12 +6,12 @@
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
inputs.nixpkgs.follows = "nixpkgs-22_11";
};
nur.url = "github:nix-community/NUR";
};
outputs = { self, nixpkgs-unstable, nixpkgs-22_11, home-manager, nur, ... }:
outputs = { self, nixpkgs-unstable, nixpkgs-22_11, home-manager, nur, ... }@inputs:
let
system = "aarch64-darwin";

View file

@ -4,14 +4,16 @@ let
inherit (lib.systems.elaborate { system = builtins.currentSystem; }) isLinux isDarwin;
homeDirectory = config.home.homeDirectory;
in {
imports = [
./emacs.nix
./packages.nix
./programs.nix
];
nixpkgs.config = {
allowUnfree = true;
};
programs = import ./programs.nix {inherit lib config pkgs isDarwin homeDirectory; };
home.packages = import ./packages.nix { inherit lib config pkgs isDarwin; };
home.language = {
base = "en_CA.UTF-8";
messages = "en_US.UTF-8";

View file

@ -72,9 +72,11 @@ let
(import ./python-packages.nix { inherit pkgs; })
];
in
sharedPackages
{
home.packages = sharedPackages
++ (lib.optionals isDarwin darwinPackages)
++ guiPackages
++ editingPackages
++ nodePackages
++ dockerPackages
++ dockerPackages ;
}

View file

@ -1,8 +1,7 @@
{ lib, config, pkgs, isDarwin, homeDir, ... }:
{ lib, config, pkgs, ... }:
{
imports = [./emacs.nix];
programs = {
direnv = {
enable = true;
nix-direnv = {
@ -12,7 +11,6 @@
gpg = {
enable = true;
homedir = "${homeDir}/.gnupg";
settings = {
use-agent = true;
default-key = "860B5C62BF1FCE4272D26BF8C3DE5DF6198DACBD";
@ -24,8 +22,6 @@
package = pkgs.jdk;
};
home-manager.enable = true;
git = {
enable = true;
delta = {
@ -91,4 +87,5 @@
}
];
};
};
}