Skip to content

Commit

Permalink
💄 Customized emacs with a minimal configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
theobori committed Nov 19, 2024
1 parent 890cc66 commit 5b08244
Show file tree
Hide file tree
Showing 3 changed files with 128 additions and 1 deletion.
120 changes: 120 additions & 0 deletions #flake.nix#
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
{
description = "theobori's Nix/NixOS Config";

inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11-small";

# We assume this version of nixpkgs is more updated than the `nixpkgs` input.
# Will be used within overlay to get the latest version of specific packages.
unstable.url = "github:nixos/nixpkgs";

home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};

nur = {
url = "github:nix-community/NUR";
};

snowfall-lib = {
url = "github:snowfallorg/lib";
inputs.nixpkgs.follows = "nixpkgs";
};

nixos-hardware = {
url = "github:nixos/nixos-hardware";
};

sops-nix = {
url = "github:mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
};

stylix.url = "github:danth/stylix";
nixgl.url = "github:nix-community/nixGL";
nix-index-database.url = "github:nix-community/nix-index-database";

disko = {
url = "github:nix-community/disko";
inputs.nixpkgs.follows = "nixpkgs";
};

nixos-anywhere = {
url = "github:numtide/nixos-anywhere";
inputs.nixpkgs.follows = "nixpkgs";
inputs.disko.follows = "disko";
};

nixos-generators = {
url = "github:nix-community/nixos-generators";
inputs.nixpkgs.follows = "nixpkgs";
};

pre-commit-hooks-nix.url = "github:cachix/pre-commit-hooks.nix";

mkdocs-flake.url = "github:applicative-systems/mkdocs-flake";

nixcord.url = "github:kaylorben/nixcord";

plasma-manager = {
url = "github:nix-community/plasma-manager";
inputs.nixpkgs.follows = "nixpkgs";
inputs.home-manager.follows = "home-manager";
};
};

outputs =
inputs:
let
lib = inputs.snowfall-lib.mkLib {
inherit inputs;
src = ./.;

snowfall = {
metadata = "theobori-nix";
namespace = "theobori-nix";
meta = {
name = "theobori-nix";
title = "theobori's Nix Flake";
};
};
};
in
lib.mkFlake {
channels-config = {
allowUnfree = true;
};

overlays = with inputs; [
nur.overlay
nixgl.overlay
];

homes.modules = with inputs; [
nix-index-database.hmModules.nix-index
stylix.homeManagerModules.stylix
sops-nix.homeManagerModules.sops
nixcord.homeManagerModules.nixcord
plasma-manager.homeManagerModules.plasma-manager
];

systems = {
modules = {
nixos = with inputs; [
stylix.nixosModules.stylix
home-manager.nixosModules.home-manager
disko.nixosModules.disko
];
};
};

outputs-builder = channels: { formatter = channels.nixpkgs.nixfmt-rfc-style; };

templates = {
xdp-c.description = "My template for building a XDP program in C";
python.description = "My template for a base project in Python";
latex.description = "My template for a base project in Latex";
};
};
}
2 changes: 1 addition & 1 deletion docs/docs/tasks.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ Here are a non-exhaustive list of tasks.
- [x] Fix `gpg-agent` not finding a pinetry binary
- [x] Support multi-user on my user nixos module
- [ ] Install Steam
- [ ] Customize emacs
- [x] Customize emacs
- [ ] Better email accounts management
7 changes: 7 additions & 0 deletions modules/home/editors/emacs/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ in
enable = true;

package = pkgs.emacs-nox;

extraConfig = ''
(menu-bar-mode -1)
(global-display-line-numbers-mode)
(setq standard-indent 2)
(setq font-lock-maximum-decoration t)
'';
};
};
}

0 comments on commit 5b08244

Please sign in to comment.