updating and adding some better nix management

This commit is contained in:
Chris Cochrun 2024-10-29 13:48:32 -05:00
parent 12c6e36a11
commit 9f406deb53
10 changed files with 436 additions and 607 deletions

View file

@ -1,4 +1,4 @@
{ pkgs, lib, config, ... }:
{ pkgs, lib, config, inputs, ... }:
with lib;
{
@ -14,6 +14,7 @@ with lib;
settings = {
auto-optimise-store = true;
};
nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
};
# nixpkgs.config.allowUnFree = true;
# pkgs.config.allowUnfree = true;

View file

@ -4,9 +4,11 @@
settings = {
substituters = [
"https://nix-community.cachix.org"
"https://cosmic.cachix.org/"
];
trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"cosmic.cachix.org-1:Dya9IyXD4xdBehWjrkPv6rtxpmMdRel02smYzA85dPE="
];
};
};

View file

@ -1,24 +1,23 @@
{ pkgs, lib, config, stable, ... }:
with lib;
{
# nix = {
# package = pkgs.nixVersions.git;
# };
# This adds hyprland cache to cachix and relaxes sandbox
nix.settings = {
substituters = ["https://hyprland.cachix.org"];
trusted-public-keys = ["hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="];
substituters = [ "https://hyprland.cachix.org" ];
trusted-public-keys =
[ "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" ];
sandbox = "relaxed";
};
# Use the systemd-boot EFI boot loader.
boot = {
kernelPackages = pkgs.linuxPackages_zen;
kernelParams = [ "mem_sleep_default=deep" "nvme.noacpi=1"];
kernelParams = [ "mem_sleep_default=deep" "nvme.noacpi=1" ];
# initrd.kernelModules = [ "amdgpu" ];
};
@ -72,24 +71,22 @@ with lib;
# };
fonts.packages = with pkgs; [
nerdfonts
noto-fonts
noto-fonts-cjk
noto-fonts-emoji
liberation_ttf
mplus-outline-fonts.githubRelease
dina-font
proggyfonts
];
nerdfonts
noto-fonts
noto-fonts-cjk-sans
noto-fonts-emoji
liberation_ttf
mplus-outline-fonts.githubRelease
dina-font
proggyfonts
];
hardware = {
keyboard.qmk.enable = true;
};
hardware = { keyboard.qmk.enable = true; };
security.pam.services = {
# sddm.enableKwallet = true;
greetd.enableKwallet = true;
swaylock = {};
swaylock = { };
};
# services.displayManager.sddm = {
@ -107,7 +104,8 @@ with lib;
user = "chris";
};
default_session = {
command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time -r --window-padding 2 --cmd 'dbus-run-session Hyprland' -s /etc/greetd/environments";
command =
"${pkgs.greetd.tuigreet}/bin/tuigreet --time -r --window-padding 2 --cmd 'dbus-run-session Hyprland' -s /etc/greetd/environments";
user = "greeter";
};
plasma_session = {
@ -121,9 +119,7 @@ with lib;
};
};
programs.regreet = {
enable = true;
};
programs.regreet = { enable = true; };
environment.etc."greetd/environments".text = ''
hyprland
@ -153,6 +149,9 @@ with lib;
extraPortals = [ pkgs.xdg-desktop-portal-kde ];
};
# programs.cosmic = {
# };
programs.hyprland = {
enable = true;
xwayland.enable = true;
@ -182,33 +181,33 @@ with lib;
programs.dconf.enable = true;
environment.variables = {
EDITOR = "emacsclient -t -a";
VISUAL = "emacsclient -c -a";
QT_LOGGING_RULES = "js=true; kwin_*.debug=true";
# GTK_USE_PORTAL = "1";
# Fixing Qt apps in other environments
# Thought I needed this but apparently they are working fine without it.
# QT_XCB_GL_INTEGRATION = "xcb_egl";
# QT_QPA_PLATFORM_PLUGIN_PATH = "${pkgs.qt5.qtbase.bin}/lib/qt-${pkgs.qt5.qtbase.qtCompatVersion}/plugins/platforms";
NIXOS_OZONE_WL = "1";
_JAVA_AWT_WM_NONEREPARENTING = "1";
# DISABLE_QT5_COMPAT = "0";
GDK_BACKEND = "wayland";
ANKI_WAYLAND = "1";
WLR_DRM_NO_ATOMIC = "1";
QT_AUTO_SCREEN_SCALE_FACTOR = "1";
QT_QPA_PLATFORM = "wayland";
# QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
# QT_QPA_PLATFORMTHEME = "qt5ct";
MOZ_ENABLE_WAYLAND = "1";
MOZ_DBUS_REMOTE = "1";
WLR_BACKEND = "vulkan";
WLR_RENDERER = "vulkan";
XDG_SESSION_TYPE = "wayland";
# Remember that this causes issues in some games use "unset SDL_VIDEODRIVER &&"
SDL_VIDEODRIVER = "wayland";
CLUTTER_BACKEND = "wayland";
WLR_NO_HARDWARE_CURSORS = "1";
EDITOR = "emacsclient -t -a";
VISUAL = "emacsclient -c -a";
QT_LOGGING_RULES = "js=true; kwin_*.debug=true";
# GTK_USE_PORTAL = "1";
# Fixing Qt apps in other environments
# Thought I needed this but apparently they are working fine without it.
# QT_XCB_GL_INTEGRATION = "xcb_egl";
# QT_QPA_PLATFORM_PLUGIN_PATH = "${pkgs.qt5.qtbase.bin}/lib/qt-${pkgs.qt5.qtbase.qtCompatVersion}/plugins/platforms";
NIXOS_OZONE_WL = "1";
_JAVA_AWT_WM_NONEREPARENTING = "1";
# DISABLE_QT5_COMPAT = "0";
GDK_BACKEND = "wayland";
ANKI_WAYLAND = "1";
WLR_DRM_NO_ATOMIC = "1";
QT_AUTO_SCREEN_SCALE_FACTOR = "1";
QT_QPA_PLATFORM = "wayland";
# QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
# QT_QPA_PLATFORMTHEME = "qt5ct";
MOZ_ENABLE_WAYLAND = "1";
MOZ_DBUS_REMOTE = "1";
WLR_BACKEND = "vulkan";
WLR_RENDERER = "vulkan";
XDG_SESSION_TYPE = "wayland";
# Remember that this causes issues in some games use "unset SDL_VIDEODRIVER &&"
SDL_VIDEODRIVER = "wayland";
CLUTTER_BACKEND = "wayland";
WLR_NO_HARDWARE_CURSORS = "1";
};
programs.partition-manager.enable = true;
@ -223,7 +222,8 @@ with lib;
# Enable CUPS to print documents.
services.printing.enable = true;
services.printing.drivers = [ pkgs.gutenprint pkgs.gutenprintBin pkgs.cnijfilter2 ];
services.printing.drivers =
[ pkgs.gutenprint pkgs.gutenprintBin pkgs.cnijfilter2 ];
services.usbmuxd.enable = true;
services.fstrim.enable = true;
@ -291,7 +291,5 @@ with lib;
programs.adb.enable = true;
services.udev.packages = [ pkgs.android-udev-rules ];
services.esphome = {
enable = true;
};
services.esphome = { enable = true; };
}

View file

@ -1,183 +1,184 @@
{ pkgs, lib, config, ... }:
with lib;
{
services.emacs = {
enable = true;
package = with pkgs; ((emacsPackagesFor pkgs.emacs-pgtk).emacsWithPackages
(epkgs: with epkgs; [
vterm
melpaPackages.magit
pdf-tools
consult-eglot
org
bluetooth
melpaPackages.org-roam
melpaPackages.org-ql
melpaPackages.dired-sidebar
melpaPackages.lab
posframe
vertico-posframe
chatgpt-shell
denote
nushell-ts-mode
nushell-mode
hydra
pretty-hydra
# geiser-guile
# flymake-guile
# flycheck-guile
denote-refs
command-log-mode
all-the-icons
doom-modeline
doom-themes
ligature
rec-mode
melpaPackages.mini-echo
llm
rainbow-delimiters
smartparens
paredit
aggressive-indent
adaptive-wrap
which-key
exec-path-from-shell
no-littering
languagetool
rustic
melpaPackages.slint-mode
flycheck-clj-kondo
clojure-mode
cider
melpaPackages.evil
melpaPackages.evil-collection
melpaPackages.ellama
general
evil-escape
evil-surround
evil-org
org-super-agenda
websocket
org-roam-ui
org-present
org-modern
# (org-re-reveal.overrideAttrs (o: {
# src = pkgs.fetchgit {
# url = "https://gitlab.com/oer/org-re-reveal";
# rev = "7c39d15b841c7a8d197a24c89e5fef5d54e271aa";
# sha256 = "/1eXxIY8SqLLC10ekGs7G3o7U7MIA01mtsl2C6lo7us=";
# };
# }))
# org-re-reveal
melpaPackages.org-re-reveal
# melpaPackages.org-re-reveal-ref
# melpaPackages.org-re-reveal-citeproc
org-web-tools
org-transclusion
# ox-reveal
ox-hugo
# oer-reveal
unicode-fonts
emojify
undo-tree
visual-fill-column
toc-org
pulsar
vertico
melpaPackages.consult
melpaPackages.marginalia
all-the-icons-completion
melpaPackages.embark
melpaPackages.embark-consult
corfu
jinx
eat
kind-icon
melpaPackages.orderless
melpaPackages.cape
devdocs
nano-theme
nano-modeline
nano-agenda
yasnippet
wgrep
tempel
tempel-collection
eglot-tempel
projectile
simple-httpd
avy
evil-avy
ace-link
ace-window
helpful
format-all
web-mode
php-mode
lua-mode
nix-mode
nix-update
cmake-mode
fennel-mode
yaml-mode
typescript-mode
docker
# docker-tramp
fish-mode
markdown-mode
qml-mode
csv-mode
restclient
ob-restclient
dart-mode
flutter
hover
direnv
all-the-icons-dired
dired-single
dired-rainbow
diredfl
dired-rsync
fd-dired
ledger-mode
org-msg
calfw
calfw-org
calfw-ical
org-caldav
org-wild-notifier
sly
nov
elfeed
elfeed-org
elfeed-protocol
bongo
empv
emms
transmission
hass
pass
password-store
password-store-otp
plz
elpaPackages.ement
mastodon
qrencode
just-mode
justl
gcmh
mu4e
use-package
esh-autosuggest
eshell-syntax-highlighting
melpaPackages.org-ai
melpaPackages.gptel
pkgs.ispell
pkgs.mu
pkgs.openjdk
pkgs.languagetool
pkgs.emacs-all-the-icons-fonts
]));
package = with pkgs;
((emacsPackagesFor pkgs.emacs-pgtk).emacsWithPackages (epkgs:
with epkgs; [
vterm
melpaPackages.magit
pdf-tools
consult-eglot
org
bluetooth
melpaPackages.org-roam
melpaPackages.org-ql
melpaPackages.dired-sidebar
melpaPackages.lab
posframe
vertico-posframe
chatgpt-shell
denote
nushell-ts-mode
nushell-mode
hydra
pretty-hydra
# geiser-guile
# flymake-guile
# flycheck-guile
denote-refs
command-log-mode
all-the-icons
doom-modeline
doom-themes
ligature
rec-mode
melpaPackages.mini-echo
llm
rainbow-delimiters
smartparens
paredit
aggressive-indent
adaptive-wrap
which-key
exec-path-from-shell
no-littering
languagetool
rustic
melpaPackages.slint-mode
flycheck-clj-kondo
clojure-mode
cider
melpaPackages.evil
melpaPackages.evil-collection
melpaPackages.ellama
general
evil-escape
evil-surround
evil-org
org-super-agenda
websocket
org-roam-ui
org-present
org-modern
# (org-re-reveal.overrideAttrs (o: {
# src = pkgs.fetchgit {
# url = "https://gitlab.com/oer/org-re-reveal";
# rev = "7c39d15b841c7a8d197a24c89e5fef5d54e271aa";
# sha256 = "/1eXxIY8SqLLC10ekGs7G3o7U7MIA01mtsl2C6lo7us=";
# };
# }))
# org-re-reveal
melpaPackages.org-re-reveal
# melpaPackages.org-re-reveal-ref
# melpaPackages.org-re-reveal-citeproc
org-web-tools
org-transclusion
# ox-reveal
ox-hugo
# oer-reveal
unicode-fonts
emojify
undo-tree
visual-fill-column
toc-org
pulsar
vertico
melpaPackages.consult
melpaPackages.marginalia
all-the-icons-completion
melpaPackages.embark
melpaPackages.embark-consult
corfu
jinx
eat
kind-icon
melpaPackages.orderless
melpaPackages.cape
devdocs
nano-theme
nano-modeline
nano-agenda
yasnippet
wgrep
tempel
tempel-collection
eglot-tempel
projectile
simple-httpd
avy
evil-avy
ace-link
ace-window
helpful
format-all
web-mode
php-mode
lua-mode
nix-mode
nix-update
cmake-mode
fennel-mode
yaml-mode
typescript-mode
# docker
# docker-tramp
fish-mode
markdown-mode
qml-mode
csv-mode
restclient
ob-restclient
dart-mode
flutter
hover
direnv
all-the-icons-dired
dired-single
dired-rainbow
diredfl
dired-rsync
fd-dired
ledger-mode
org-msg
calfw
calfw-org
calfw-ical
org-caldav
org-wild-notifier
sly
nov
elfeed
elfeed-org
elfeed-protocol
bongo
empv
emms
transmission
hass
pass
password-store
password-store-otp
plz
elpaPackages.ement
mastodon
qrencode
just-mode
justl
gcmh
mu4e
use-package
esh-autosuggest
eshell-syntax-highlighting
melpaPackages.org-ai
melpaPackages.gptel
pkgs.ispell
pkgs.mu
pkgs.openjdk
pkgs.languagetool
pkgs.emacs-all-the-icons-fonts
]));
defaultEditor = true;
};
}