feat(skadi): add emacs overlay/config.
This commit is contained in:
parent
127940f7ea
commit
05d24399be
8 changed files with 339 additions and 36 deletions
124
flake.lock
generated
124
flake.lock
generated
|
|
@ -246,6 +246,25 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"emacs-overlay": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": "nixpkgs_6",
|
||||||
|
"nixpkgs-stable": "nixpkgs-stable"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1760432944,
|
||||||
|
"narHash": "sha256-4OXXccXsY1sBXTXjYIthdjXLAotozSh4F8StGRuLyMQ=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "emacs-overlay",
|
||||||
|
"rev": "aba8daa237dc07a3bb28a61c252a718e8eb38057",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "emacs-overlay",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"firefox-gnome-theme": {
|
"firefox-gnome-theme": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
|
|
@ -788,7 +807,7 @@
|
||||||
"hb-downloader": {
|
"hb-downloader": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-utils": "flake-utils",
|
"flake-utils": "flake-utils",
|
||||||
"nixpkgs": "nixpkgs_6",
|
"nixpkgs": "nixpkgs_7",
|
||||||
"pre-commit-hooks": "pre-commit-hooks"
|
"pre-commit-hooks": "pre-commit-hooks"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
|
|
@ -1289,7 +1308,7 @@
|
||||||
"iamb": {
|
"iamb": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-utils": "flake-utils_3",
|
"flake-utils": "flake-utils_3",
|
||||||
"nixpkgs": "nixpkgs_8",
|
"nixpkgs": "nixpkgs_9",
|
||||||
"rust-overlay": "rust-overlay_3"
|
"rust-overlay": "rust-overlay_3"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
|
|
@ -1345,7 +1364,7 @@
|
||||||
},
|
},
|
||||||
"nbfc-linux": {
|
"nbfc-linux": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": "nixpkgs_10",
|
"nixpkgs": "nixpkgs_11",
|
||||||
"utils": "utils_2"
|
"utils": "utils_2"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
|
|
@ -1370,7 +1389,7 @@
|
||||||
"git-hooks": "git-hooks_2",
|
"git-hooks": "git-hooks_2",
|
||||||
"hercules-ci-effects": "hercules-ci-effects",
|
"hercules-ci-effects": "hercules-ci-effects",
|
||||||
"neovim-src": "neovim-src",
|
"neovim-src": "neovim-src",
|
||||||
"nixpkgs": "nixpkgs_11",
|
"nixpkgs": "nixpkgs_12",
|
||||||
"treefmt-nix": "treefmt-nix"
|
"treefmt-nix": "treefmt-nix"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
|
|
@ -1562,6 +1581,22 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs-stable": {
|
"nixpkgs-stable": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1760139962,
|
||||||
|
"narHash": "sha256-4xggC56Rub3WInz5eD7EZWXuLXpNvJiUPahGtMkwtuc=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "7e297ddff44a3cc93673bb38d0374df8d0ad73e4",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixos-25.05",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs-stable_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1710695816,
|
"lastModified": 1710695816,
|
||||||
"narHash": "sha256-3Eh7fhEID17pv9ZxrPwCLfqXnYP006RKzSs0JptsN84=",
|
"narHash": "sha256-3Eh7fhEID17pv9ZxrPwCLfqXnYP006RKzSs0JptsN84=",
|
||||||
|
|
@ -1577,7 +1612,7 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs-stable_2": {
|
"nixpkgs-stable_3": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1704874635,
|
"lastModified": 1704874635,
|
||||||
"narHash": "sha256-YWuCrtsty5vVZvu+7BchAxmcYzTMfolSPP5io8+WYCg=",
|
"narHash": "sha256-YWuCrtsty5vVZvu+7BchAxmcYzTMfolSPP5io8+WYCg=",
|
||||||
|
|
@ -1594,6 +1629,22 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_10": {
|
"nixpkgs_10": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1744536153,
|
||||||
|
"narHash": "sha256-awS2zRgF4uTwrOKwwiJcByDzDOdo3Q1rPZbiHQg/N38=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "18dd725c29603f582cf1900e0d25f9f1063dbf11",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixpkgs-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs_11": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1705957679,
|
"lastModified": 1705957679,
|
||||||
"narHash": "sha256-Q8LJaVZGJ9wo33wBafvZSzapYsjOaNjP/pOnSiKVGHY=",
|
"narHash": "sha256-Q8LJaVZGJ9wo33wBafvZSzapYsjOaNjP/pOnSiKVGHY=",
|
||||||
|
|
@ -1609,7 +1660,7 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_11": {
|
"nixpkgs_12": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1759632233,
|
"lastModified": 1759632233,
|
||||||
"narHash": "sha256-krgZxGAIIIKFJS+UB0l8do3sYUDWJc75M72tepmVMzE=",
|
"narHash": "sha256-krgZxGAIIIKFJS+UB0l8do3sYUDWJc75M72tepmVMzE=",
|
||||||
|
|
@ -1625,7 +1676,7 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_12": {
|
"nixpkgs_13": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1759381078,
|
"lastModified": 1759381078,
|
||||||
"narHash": "sha256-gTrEEp5gEspIcCOx9PD8kMaF1iEmfBcTbO0Jag2QhQs=",
|
"narHash": "sha256-gTrEEp5gEspIcCOx9PD8kMaF1iEmfBcTbO0Jag2QhQs=",
|
||||||
|
|
@ -1641,7 +1692,7 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_13": {
|
"nixpkgs_14": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1759386674,
|
"lastModified": 1759386674,
|
||||||
"narHash": "sha256-wg1Lz/1FC5Q13R+mM5a2oTV9TA9L/CHHTm3/PiLayfA=",
|
"narHash": "sha256-wg1Lz/1FC5Q13R+mM5a2oTV9TA9L/CHHTm3/PiLayfA=",
|
||||||
|
|
@ -1657,7 +1708,7 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_14": {
|
"nixpkgs_15": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1709237383,
|
"lastModified": 1709237383,
|
||||||
"narHash": "sha256-cy6ArO4k5qTx+l5o+0mL9f5fa86tYUX3ozE1S+Txlds=",
|
"narHash": "sha256-cy6ArO4k5qTx+l5o+0mL9f5fa86tYUX3ozE1S+Txlds=",
|
||||||
|
|
@ -1673,7 +1724,7 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_15": {
|
"nixpkgs_16": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1704842529,
|
"lastModified": 1704842529,
|
||||||
"narHash": "sha256-OTeQA+F8d/Evad33JMfuXC89VMetQbsU4qcaePchGr4=",
|
"narHash": "sha256-OTeQA+F8d/Evad33JMfuXC89VMetQbsU4qcaePchGr4=",
|
||||||
|
|
@ -1754,6 +1805,22 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_6": {
|
"nixpkgs_6": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1760284886,
|
||||||
|
"narHash": "sha256-TK9Kr0BYBQ/1P5kAsnNQhmWWKgmZXwUQr4ZMjCzWf2c=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "cf3f5c4def3c7b5f1fc012b3d839575dbe552d43",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs_7": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1709703039,
|
"lastModified": 1709703039,
|
||||||
"narHash": "sha256-6hqgQ8OK6gsMu1VtcGKBxKQInRLHtzulDo9Z5jxHEFY=",
|
"narHash": "sha256-6hqgQ8OK6gsMu1VtcGKBxKQInRLHtzulDo9Z5jxHEFY=",
|
||||||
|
|
@ -1769,7 +1836,7 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_7": {
|
"nixpkgs_8": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1710765496,
|
"lastModified": 1710765496,
|
||||||
"narHash": "sha256-p7ryWEeQfMwTB6E0wIUd5V2cFTgq+DRRBz2hYGnJZyA=",
|
"narHash": "sha256-p7ryWEeQfMwTB6E0wIUd5V2cFTgq+DRRBz2hYGnJZyA=",
|
||||||
|
|
@ -1785,7 +1852,7 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_8": {
|
"nixpkgs_9": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1756542300,
|
"lastModified": 1756542300,
|
||||||
"narHash": "sha256-tlOn88coG5fzdyqz6R93SQL5Gpq+m/DsWpekNFhqPQk=",
|
"narHash": "sha256-tlOn88coG5fzdyqz6R93SQL5Gpq+m/DsWpekNFhqPQk=",
|
||||||
|
|
@ -1801,22 +1868,6 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_9": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1744536153,
|
|
||||||
"narHash": "sha256-awS2zRgF4uTwrOKwwiJcByDzDOdo3Q1rPZbiHQg/N38=",
|
|
||||||
"owner": "NixOS",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "18dd725c29603f582cf1900e0d25f9f1063dbf11",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "NixOS",
|
|
||||||
"ref": "nixpkgs-unstable",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nmd": {
|
"nmd": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
|
|
@ -1901,7 +1952,7 @@
|
||||||
"flake-compat": "flake-compat_8",
|
"flake-compat": "flake-compat_8",
|
||||||
"flake-parts": "flake-parts_2",
|
"flake-parts": "flake-parts_2",
|
||||||
"mnw": "mnw",
|
"mnw": "mnw",
|
||||||
"nixpkgs": "nixpkgs_13",
|
"nixpkgs": "nixpkgs_14",
|
||||||
"systems": "systems_9"
|
"systems": "systems_9"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
|
|
@ -1923,8 +1974,8 @@
|
||||||
"flake-compat": "flake-compat_4",
|
"flake-compat": "flake-compat_4",
|
||||||
"flake-utils": "flake-utils_2",
|
"flake-utils": "flake-utils_2",
|
||||||
"gitignore": "gitignore_2",
|
"gitignore": "gitignore_2",
|
||||||
"nixpkgs": "nixpkgs_7",
|
"nixpkgs": "nixpkgs_8",
|
||||||
"nixpkgs-stable": "nixpkgs-stable"
|
"nixpkgs-stable": "nixpkgs-stable_2"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1710843117,
|
"lastModified": 1710843117,
|
||||||
|
|
@ -1968,8 +2019,8 @@
|
||||||
"flake-compat": "flake-compat_9",
|
"flake-compat": "flake-compat_9",
|
||||||
"flake-utils": "flake-utils_5",
|
"flake-utils": "flake-utils_5",
|
||||||
"gitignore": "gitignore_5",
|
"gitignore": "gitignore_5",
|
||||||
"nixpkgs": "nixpkgs_15",
|
"nixpkgs": "nixpkgs_16",
|
||||||
"nixpkgs-stable": "nixpkgs-stable_2"
|
"nixpkgs-stable": "nixpkgs-stable_3"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1708018599,
|
"lastModified": 1708018599,
|
||||||
|
|
@ -1993,6 +2044,7 @@
|
||||||
"chaotic": "chaotic",
|
"chaotic": "chaotic",
|
||||||
"deploy-rs": "deploy-rs",
|
"deploy-rs": "deploy-rs",
|
||||||
"disko": "disko",
|
"disko": "disko",
|
||||||
|
"emacs-overlay": "emacs-overlay",
|
||||||
"git-hooks": "git-hooks",
|
"git-hooks": "git-hooks",
|
||||||
"hb-downloader": "hb-downloader",
|
"hb-downloader": "hb-downloader",
|
||||||
"home-manager": "home-manager_3",
|
"home-manager": "home-manager_3",
|
||||||
|
|
@ -2004,7 +2056,7 @@
|
||||||
"nix-flatpak": "nix-flatpak",
|
"nix-flatpak": "nix-flatpak",
|
||||||
"nix-index-database": "nix-index-database",
|
"nix-index-database": "nix-index-database",
|
||||||
"nix-on-droid": "nix-on-droid",
|
"nix-on-droid": "nix-on-droid",
|
||||||
"nixpkgs": "nixpkgs_12",
|
"nixpkgs": "nixpkgs_13",
|
||||||
"nvf": "nvf",
|
"nvf": "nvf",
|
||||||
"stylix": "stylix",
|
"stylix": "stylix",
|
||||||
"upfast": "upfast"
|
"upfast": "upfast"
|
||||||
|
|
@ -2051,7 +2103,7 @@
|
||||||
},
|
},
|
||||||
"rust-overlay_3": {
|
"rust-overlay_3": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": "nixpkgs_9"
|
"nixpkgs": "nixpkgs_10"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1756694554,
|
"lastModified": 1756694554,
|
||||||
|
|
@ -2403,7 +2455,7 @@
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-utils": "flake-utils_4",
|
"flake-utils": "flake-utils_4",
|
||||||
"gomod2nix": "gomod2nix",
|
"gomod2nix": "gomod2nix",
|
||||||
"nixpkgs": "nixpkgs_14",
|
"nixpkgs": "nixpkgs_15",
|
||||||
"pre-commit-hooks": "pre-commit-hooks_3"
|
"pre-commit-hooks": "pre-commit-hooks_3"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
|
|
|
||||||
|
|
@ -98,6 +98,9 @@
|
||||||
# AAGL
|
# AAGL
|
||||||
aagl.url = "github:ezKEa/aagl-gtk-on-nix";
|
aagl.url = "github:ezKEa/aagl-gtk-on-nix";
|
||||||
aagl.inputs.nixpkgs.follows = "nixpkgs";
|
aagl.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
||||||
|
# Emacs, my enemy let me try to learn you again
|
||||||
|
emacs-overlay.url = "github:nix-community/emacs-overlay";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = {
|
outputs = {
|
||||||
|
|
|
||||||
|
|
@ -210,6 +210,7 @@
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
|
(import inputs.emacs-overlay)
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -43,6 +43,7 @@
|
||||||
crony.home-secrets.enable = true;
|
crony.home-secrets.enable = true;
|
||||||
crony.restic.enable = true;
|
crony.restic.enable = true;
|
||||||
crony.emulators.enable = true;
|
crony.emulators.enable = true;
|
||||||
|
crony.emacs.enable = true;
|
||||||
|
|
||||||
# DO NOT CHANGE ALSO
|
# DO NOT CHANGE ALSO
|
||||||
home.stateVersion = "24.11"; # Please read the comment before changing.
|
home.stateVersion = "24.11"; # Please read the comment before changing.
|
||||||
|
|
|
||||||
|
|
@ -59,6 +59,7 @@
|
||||||
b = "buku -p";
|
b = "buku -p";
|
||||||
# fzf shenanigans
|
# fzf shenanigans
|
||||||
vif = ''nvim $(fzf --preview="bat --color=always {}")'';
|
vif = ''nvim $(fzf --preview="bat --color=always {}")'';
|
||||||
|
emacs = "emacs --init-dir ~/.config/emacs";
|
||||||
};
|
};
|
||||||
|
|
||||||
antidote = {
|
antidote = {
|
||||||
|
|
|
||||||
213
modules/linux/home-manager/configs/emacs/config.org
Normal file
213
modules/linux/home-manager/configs/emacs/config.org
Normal file
|
|
@ -0,0 +1,213 @@
|
||||||
|
#+Title: Crony's Emacs Config
|
||||||
|
#+AUTHOR: Crony Akatsuki
|
||||||
|
#+DESCRIPTION: Crony's personal emacs config
|
||||||
|
#+STARTUP: showeverything
|
||||||
|
#+OPTIONS: toc:2
|
||||||
|
#+PROPERTY: header-args:emacs-lisp :tangle ./config.el
|
||||||
|
|
||||||
|
* GARBAGE COLLECTION
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(defvar file-name-handler-alist-old file-name-handler-alist)
|
||||||
|
|
||||||
|
(setq file-name-handler-alist nil
|
||||||
|
gc-cons-threshold most-positive-fixnum)
|
||||||
|
|
||||||
|
(add-hook 'after-init-hook
|
||||||
|
`(lambda ()
|
||||||
|
(setq file-name-handler-alist file-name-handler-alist-old)
|
||||||
|
(setq gc-cons-threshold (* 2 1000 1000))
|
||||||
|
(setq gc-cons-percentage 0.1))
|
||||||
|
t)
|
||||||
|
#+end_src(defvar file-name-handler-alist-old file-name-handler-alist)
|
||||||
|
|
||||||
|
* BACKUPS
|
||||||
|
|
||||||
|
Move backup files to a diff directory.
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(setq backup-directory-alist '(("." . "~/.cache/emacs/"))
|
||||||
|
backup-by-copying t ; Don't delink hardlinks
|
||||||
|
version-control t ; Use version numbers on backups
|
||||||
|
delete-old-versions t ; Automatically delete excess backups
|
||||||
|
kept-new-versions 20 ; how many of the newest versions to keep
|
||||||
|
kept-old-versions 5 ; and how many of the old
|
||||||
|
)
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
* SANE DEFAULTS
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(delete-selection-mode 1) ;; You can select text and delete it by typing.
|
||||||
|
(electric-indent-mode -1) ;; Turn off the weird indenting that Emacs does by default.
|
||||||
|
(global-auto-revert-mode t) ;; Automatically show changes if the file has changed
|
||||||
|
(setq initial-scratch-message nil) ;; disable the initial scratch message.
|
||||||
|
(setq-default delete-pair-blink-delay 0) ;; remove delay when deleting pairs
|
||||||
|
(prefer-coding-system 'utf-8) ;; utf-8
|
||||||
|
(global-set-key [escape] 'keyboard-escape-quit) ;; escape minibuffers with ESC
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
* GUI TWEAKS
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(global-visual-line-mode t) ;; Enable truncated lines
|
||||||
|
(menu-bar-mode -1) ;; Disable the menu bar
|
||||||
|
(scroll-bar-mode -1) ;; Disable the scroll bar
|
||||||
|
(tool-bar-mode -1) ;; Disable the tool bar
|
||||||
|
(set-fringe-mode 10) ;; Give me some breathing room
|
||||||
|
(fset 'yes-or-no-p 'y-or-n-p) ;; don't ask to spell out "yes"
|
||||||
|
(setq-default frame-resize-pixelwise t) ;; avoid leaving a gap beetween the frame and the screen
|
||||||
|
(column-number-mode) ;; Display line colums
|
||||||
|
;; disable line numbers for following modes
|
||||||
|
(dolist (mode '(org-mode-hook
|
||||||
|
term-mode-hook
|
||||||
|
shell-mode-hook
|
||||||
|
eshell-mode-hook))
|
||||||
|
(add-hook mode (lambda () (display-line-numbers-mode 0))))
|
||||||
|
(global-display-line-numbers-mode 1) ;; Display line numbers
|
||||||
|
(blink-cursor-mode -1) ;; disable blinking cursor
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
* ELECTRIC PAIR
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(electric-pair-mode 1)
|
||||||
|
(add-hook 'org-mode-hook (lambda ()
|
||||||
|
(setq-local electric-pair-inhibit-predicate
|
||||||
|
`(lambda (c)
|
||||||
|
(if (char-equal c ?<) t (,electric-pair-inhibit-predicate c))))))
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
* EVIL MODE
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(use-package evil
|
||||||
|
:init
|
||||||
|
(setq evil-want-integration t
|
||||||
|
evil-want-keybinding nil
|
||||||
|
evil-want-C-u-scroll t
|
||||||
|
evil-want-C-i-jump nil
|
||||||
|
evil-vsplit-window-right t
|
||||||
|
evil-split-window-below t
|
||||||
|
evil-undo-system 'undo-redo)
|
||||||
|
:config
|
||||||
|
(evil-mode 1)
|
||||||
|
(define-key evil-insert-state-map (kbd "C-g") 'evil-normal-state)
|
||||||
|
(define-key evil-insert-state-map (kbd "C-h") 'evil-delete-backward-char-and-join)
|
||||||
|
(evil-set-initial-state 'messages-buffer-mode 'normal)
|
||||||
|
(evil-set-initial-state 'dashboard-mode 'normal))
|
||||||
|
|
||||||
|
(use-package evil-collection
|
||||||
|
:after evil
|
||||||
|
:config
|
||||||
|
(evil-collection-init))
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
* GENERAL KEYBINDINGS
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(use-package general
|
||||||
|
:config
|
||||||
|
)
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
* DIMINISH
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(use-package diminish)
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
ORG MODE
|
||||||
|
|
||||||
|
** Update and setup org mode
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
|
||||||
|
;; fixes a bug where evil mnode bounds return key, so it isn't accesible
|
||||||
|
(with-eval-after-load 'evil-maps
|
||||||
|
(define-key evil-motion-state-map (kbd "RET") nil))
|
||||||
|
|
||||||
|
(defun crony/org-mode-setup ()
|
||||||
|
(org-indent-mode)
|
||||||
|
(visual-line-mode 1))
|
||||||
|
|
||||||
|
;; Replace list hyphen with dot
|
||||||
|
(font-lock-add-keywords 'org-mode
|
||||||
|
'(("^ *\\([-]\\) "
|
||||||
|
(0 (prog1 () (compose-region (match-beginning 1) (match-end 1) "•"))))))
|
||||||
|
|
||||||
|
(use-package org
|
||||||
|
:defer t
|
||||||
|
:init (require 'org-tempo)
|
||||||
|
:hook (org-mode . crony/org-mode-setup)
|
||||||
|
:config
|
||||||
|
(setq org-ellipsis " ▾")
|
||||||
|
(setq org-edit-src-content-indentation 0)
|
||||||
|
|
||||||
|
;; org agenda settings
|
||||||
|
(setq org-agenda-start-with-log-mode t)
|
||||||
|
(setq org-log-done 'time)
|
||||||
|
(setq org-log-into-drawer t)
|
||||||
|
(setq org-agenda-files
|
||||||
|
'("~/docs/notes/tasks.org"
|
||||||
|
"~/docs/notes/birthdays.org"))
|
||||||
|
|
||||||
|
;; refiling
|
||||||
|
(setq org-refile-targets
|
||||||
|
'(("archive.org" :maxlevel . 1)
|
||||||
|
("tasks.org" :maxlevel . 1)))
|
||||||
|
|
||||||
|
;; save after refiling
|
||||||
|
(advice-add 'org-refile :after 'org-save-all-org-buffers)
|
||||||
|
|
||||||
|
(setq org-return-follows-link t))
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
** Column width
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(defun crony/org-mode-visual-fill ()
|
||||||
|
(setq visual-fill-column-width 110
|
||||||
|
visual-fill-column-center-text t)
|
||||||
|
(visual-fill-column-mode 1))
|
||||||
|
|
||||||
|
(use-package visual-fill-column
|
||||||
|
:defer t
|
||||||
|
:hook (org-mode . crony/org-mode-visual-fill))
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
** Enabling Org Bullets
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(use-package org-bullets
|
||||||
|
:after org
|
||||||
|
:hook (org-mode . org-bullets-mode))
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
** Enabling Table of Contents
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(use-package toc-org
|
||||||
|
:after org
|
||||||
|
:commands toc-org-enable
|
||||||
|
:init (add-hook 'org-mode-hook 'toc-org-enable))
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
* THEME
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(use-package gruvbox-theme
|
||||||
|
:config
|
||||||
|
(load-theme 'gruvbox-dark-medium :no-confirm))
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
* HELPFUL
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(use-package helpful
|
||||||
|
:bind
|
||||||
|
([remap describe-function] . helpful-function)
|
||||||
|
([remap describe-command] . helpful-command)
|
||||||
|
([remap describe-variable] . helpful-variable)
|
||||||
|
([remap describe-key] . helpful-key))
|
||||||
|
#+end_src
|
||||||
|
|
@ -19,6 +19,7 @@
|
||||||
./river.nix
|
./river.nix
|
||||||
./pipewire.nix
|
./pipewire.nix
|
||||||
./secrets.nix
|
./secrets.nix
|
||||||
|
./emacs.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
crony.river.enable = lib.mkDefault false;
|
crony.river.enable = lib.mkDefault false;
|
||||||
|
|
@ -40,4 +41,5 @@
|
||||||
crony.xdg-user-dirs.enable = lib.mkDefault true;
|
crony.xdg-user-dirs.enable = lib.mkDefault true;
|
||||||
crony.pipewire.enable = lib.mkDefault true;
|
crony.pipewire.enable = lib.mkDefault true;
|
||||||
crony.home-secrets.enable = lib.mkDefault false;
|
crony.home-secrets.enable = lib.mkDefault false;
|
||||||
|
crony.emacs.enable = lib.mkDefault false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
30
modules/linux/home-manager/emacs.nix
Normal file
30
modules/linux/home-manager/emacs.nix
Normal file
|
|
@ -0,0 +1,30 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
options = {
|
||||||
|
crony.emacs.enable = lib.mkEnableOption "Enable and setup emacs";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf config.crony.emacs.enable {
|
||||||
|
# Disable emacs stylix target
|
||||||
|
stylix.targets.emacs.enable = false;
|
||||||
|
|
||||||
|
# Setup emacs
|
||||||
|
programs.emacs = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.emacsWithPackagesFromUsePackage {
|
||||||
|
package = pkgs.emacs-git;
|
||||||
|
config = ./configs/emacs/config.org;
|
||||||
|
extraEmacsPackages = epkgs: [
|
||||||
|
epkgs.use-package
|
||||||
|
];
|
||||||
|
defaultInitFile = true;
|
||||||
|
alwaysEnsure = true;
|
||||||
|
alwaysTangle = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue