enabling emacs service

This commit is contained in:
Ivan Dimitrov 2023-08-07 18:37:18 +03:00
parent 1f872a4253
commit da05270443
4 changed files with 99 additions and 10 deletions

View File

@ -1,5 +1,45 @@
{ {
"nodes": { "nodes": {
"emacs-overlay": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": [
"nixpkgs"
],
"nixpkgs-stable": "nixpkgs-stable"
},
"locked": {
"lastModified": 1691405775,
"narHash": "sha256-csVe2tfnr+Gs+L0iPHgV5XhVrX57zAqqXabVx42fAz0=",
"owner": "nix-community",
"repo": "emacs-overlay",
"rev": "47fd556725bcc96a831ef13fc1bb0eccbfd4a895",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "emacs-overlay",
"type": "github"
}
},
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1689068808,
"narHash": "sha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "919d646de7be200f3bf08cb76ae1f09402b6f9b4",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"home-manager": { "home-manager": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -35,11 +75,43 @@
"type": "indirect" "type": "indirect"
} }
}, },
"nixpkgs-stable": {
"locked": {
"lastModified": 1691328192,
"narHash": "sha256-w59N1zyDQ7SupfMJLFvtms/SIVbdryqlw5AS4+DiH+Y=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "61676e4dcfeeb058f255294bcb08ea7f3bc3ce56",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-23.05",
"repo": "nixpkgs",
"type": "github"
}
},
"root": { "root": {
"inputs": { "inputs": {
"emacs-overlay": "emacs-overlay",
"home-manager": "home-manager", "home-manager": "home-manager",
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs"
} }
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
} }
}, },
"root": "root", "root": "root",

View File

@ -5,9 +5,13 @@
url = "github:nix-community/home-manager"; url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
emacs-overlay = {
url = "github:nix-community/emacs-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
}; };
outputs = { self, nixpkgs, home-manager, ... }: { outputs = { self, nixpkgs, home-manager, emacs-overlay, ... }: {
nixosConfigurations = { nixosConfigurations = {
laptop = nixpkgs.lib.nixosSystem { laptop = nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
@ -19,7 +23,7 @@
homeConfigurations = { homeConfigurations = {
ivand = home-manager.lib.homeManagerConfiguration { ivand = home-manager.lib.homeManagerConfiguration {
modules = [ ./home/laptop.nix ]; modules = [ ./home/laptop.nix ];
pkgs = import nixpkgs { system = "x86_64-linux"; }; pkgs = import nixpkgs { system = "x86_64-linux"; overlays = [ emacs-overlay.overlay ]; };
}; };
}; };
}; };

3
home/emacs.nix Normal file
View File

@ -0,0 +1,3 @@
{pkgs, emacs, ...}: {
}

View File

@ -48,10 +48,10 @@
catppuccin catppuccin
]; ];
extraConfig = '' extraConfig = ''
set -g default-command "''${SHELL}" set -g default-command "''${SHELL}"
set -g default-terminal "tmux-256color" set -g default-terminal "tmux-256color"
set -g base-index 1 set -g base-index 1
set -s escape-time 0 set -s escape-time 0
''; '';
}; };
swaylock = { swaylock = {
@ -85,9 +85,9 @@
stylua stylua
]; ];
plugins = with pkgs.vimPlugins; [ plugins = with pkgs.vimPlugins; [
nvim-surround nvim-surround
nvim-ts-autotag nvim-ts-autotag
vim-prisma vim-prisma
autoclose-nvim autoclose-nvim
barbar-nvim barbar-nvim
cmp-nvim-lsp cmp-nvim-lsp
@ -107,6 +107,10 @@
]; ];
extraLuaConfig = lib.fileContents ./cfg/nvim/init.lua; extraLuaConfig = lib.fileContents ./cfg/nvim/init.lua;
}; };
emacs = {
enable = true;
package = pkgs.emacsGit;
};
zsh = { zsh = {
enable = true; enable = true;
syntaxHighlighting.enable = true; syntaxHighlighting.enable = true;
@ -119,7 +123,7 @@
gac = "ga && gc"; gac = "ga && gc";
ga = "git add ."; ga = "git add .";
gc = "git commit"; gc = "git commit";
dev = "nix develop --command $SHELL"; dev = "nix develop --command $SHELL";
}; };
history = { history = {
size = 1000; size = 1000;
@ -176,4 +180,10 @@
''; '';
}; };
}; };
services = {
emacs = {
enable = true;
package = pkgs.emacsGit;
};
};
} }