i fucking hate this shit already
This commit is contained in:
commit
69ad8d41af
5 changed files with 295 additions and 0 deletions
61
modules/hosts/nerv/configuration.nix
Normal file
61
modules/hosts/nerv/configuration.nix
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
# Use latest kernel.
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
|
||||
networking.hostName = "nerv"; # Define your hostname.
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
# use proprietary nvidia drivers
|
||||
hardware.graphics.enable = true;
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
hardware.nvidia = {
|
||||
modesetting.enable = true;
|
||||
powerManagement.enable = false;
|
||||
open = true;
|
||||
nvidiaSettings = true;
|
||||
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||
};
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "Europe/Berlin";
|
||||
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
services.desktopManager.gnome.enable = true;
|
||||
services.displayManager.gdm.enable = true;
|
||||
services.xserver.xkb.layout = "us";
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
users.users.lucy = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user.
|
||||
packages = with pkgs; [
|
||||
vesktop
|
||||
google-chrome
|
||||
];
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
fastfetch
|
||||
wget
|
||||
git
|
||||
clang
|
||||
];
|
||||
system.stateVersion = "26.05"; # Did you read the comment?
|
||||
|
||||
}
|
||||
|
||||
31
modules/hosts/nerv/hardware-configuration.nix
Normal file
31
modules/hosts/nerv/hardware-configuration.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "nvme" "ahci" "xhci_pci" "usb_storage" "usbhid" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/a91a4338-b1a9-4964-879f-3908b44c4636";
|
||||
fsType = "xfs";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/B318-A112";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0077" "dmask=0077" ];
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
79
modules/programs/emacs/emacs.nix
Normal file
79
modules/programs/emacs/emacs.nix
Normal file
|
|
@ -0,0 +1,79 @@
|
|||
{ inputs, ... }: {
|
||||
flake.wrappers.emacs = { pkgs, wlib, lib, ... }: {
|
||||
imports = [ wlib.wrapperModules.emacs ];
|
||||
emacsPackages =
|
||||
epkgs: with epkgs.melpaPackages; [
|
||||
corfu
|
||||
cape
|
||||
qml-mode
|
||||
lua-mode
|
||||
elcord
|
||||
nix-mode
|
||||
];
|
||||
|
||||
runtimePkgs = with pkgs; [
|
||||
nixd
|
||||
nixfmt
|
||||
qt6.qtdeclarative
|
||||
];
|
||||
constructFiles.early-init.content = lib.mkBefore ";;; -*- lexical-binding: t; -*-";
|
||||
configFile = ''
|
||||
;;; -*- lexical-binding: t; -*-
|
||||
(setq make-backup-files nil)
|
||||
(use-package
|
||||
corfu
|
||||
:init
|
||||
(setq
|
||||
corfu-auto t
|
||||
corfu-auto-prefix 1
|
||||
corfu-auto-delay 0.2)
|
||||
(global-corfu-mode))
|
||||
|
||||
(setq tab-always-indent 'complete)
|
||||
(use-package
|
||||
cape
|
||||
:bind ("C-c p" . cape-prefix-map) ;; Alternative key: M-<tab>, M-p, M-+
|
||||
:init (add-hook 'completion-at-point-functions #'cape-file))
|
||||
(setq corfu-auto-prefix 2)
|
||||
(use-package qml-mode :ensure t)
|
||||
(use-package lua-mode :ensure t)
|
||||
(use-package elcord :ensure t :init (elcord-mode))
|
||||
|
||||
(add-to-list
|
||||
'display-buffer-alist
|
||||
'("\\*compilation\\*" (display-buffer-reuse-window
|
||||
display-buffer-below-selected)
|
||||
(window-height . 0.3)))
|
||||
|
||||
|
||||
;; remove useless shit and set default opts
|
||||
(setq ring-bell-function 'ignore)
|
||||
(menu-bar-mode -1)
|
||||
(tool-bar-mode -1)
|
||||
(setq display-line-numbers-type 'relative)
|
||||
(global-display-line-numbers-mode +1)
|
||||
(global-tab-line-mode 1)
|
||||
(scroll-bar-mode -1)
|
||||
(setq inhibit-splash-screen 1)
|
||||
(setq custom-file "~/.emacs.d/custom.el")
|
||||
(load custom-file 'noerror)
|
||||
|
||||
|
||||
;; lsp shit
|
||||
(add-hook 'nix-mode-hook #'eglot-ensure)
|
||||
(add-hook 'c-mode-hook #'eglot-ensure)
|
||||
(add-hook 'qml-mode-hook #'eglot-ensure)
|
||||
(with-eval-after-load 'eglot
|
||||
(add-to-list 'eglot-server-programs '(nix-mode . ("nixd")))
|
||||
(add-to-list 'eglot-server-programs '(qml-mode . ("qmlls"))))
|
||||
|
||||
;; keybindings
|
||||
(keymap-global-set "C-c f" 'eglot-format)
|
||||
(keymap-global-set "C-c t" 'term)
|
||||
(keymap-global-set "C-c c" 'compile)
|
||||
(keymap-global-set "C-c k b" 'kill-current-buffer)
|
||||
(keymap-global-set "C-c k w" 'kill-buffer-and-window)
|
||||
(windmove-default-keybindings)
|
||||
'';
|
||||
};
|
||||
}
|
||||
Loading…
Reference in a new issue