Compare commits
2 Commits
4577adc53f
...
e22078b34a
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e22078b34a | ||
|
|
f2f5227384 |
31
README.org
31
README.org
@@ -7,72 +7,72 @@
|
||||
nix-shell -p git
|
||||
#+END_SRC
|
||||
|
||||
1. Clone the flake
|
||||
2. Clone the flake
|
||||
#+BEGIN_SRC bash
|
||||
git clone https://git.lajuntament.space/marc/samfelag.git
|
||||
#+END_SRC
|
||||
|
||||
1. Partition the disk
|
||||
3. Partition the disk
|
||||
1. Locate the disk
|
||||
#+BEGIN_SRC bash
|
||||
lsblk
|
||||
#+END_SRC
|
||||
|
||||
1. Create a GPT partition table
|
||||
2. Create a GPT partition table
|
||||
#+BEGIN_SRC bash
|
||||
sudo parted /dev/nvme0n1 -- mklabel gpt
|
||||
#+END_SRC
|
||||
|
||||
1. Create the root partition
|
||||
3. Create the root partition
|
||||
#+BEGIN_SRC bash
|
||||
sudo parted /dev/nvme0n1 -- mkpart primary 512MB -8GB
|
||||
#+END_SRC
|
||||
|
||||
1. Create the swap partition
|
||||
4. Create the swap partition
|
||||
#+BEGIN_SRC bash
|
||||
sudo parted /dev/nvme0n1 -- mkpart primary linux-swap -8GB 100%
|
||||
#+END_SRC
|
||||
|
||||
1. Create the boot partition
|
||||
5. Create the boot partition
|
||||
#+BEGIN_SRC bash
|
||||
sudo parted /dev/nvme0n1 -- mkpart ESP fat32 1MB 512MB
|
||||
sudo parted /dev/nvme0n1 -- set 3 esp on
|
||||
#+END_SRC
|
||||
|
||||
1. Format the partitions
|
||||
4. Format the partitions
|
||||
1. Root partition
|
||||
#+BEGIN_SRC bash
|
||||
sudo mkfs.ext4 -L nixos /dev/nvme0n1p1
|
||||
#+END_SRC
|
||||
|
||||
1. Swap partition
|
||||
2. Swap partition
|
||||
#+BEGIN_SRC bash
|
||||
sudo mkswap -L swap /dev/nvme0n1p2
|
||||
#+END_SRC
|
||||
|
||||
1. Boot partition
|
||||
3. Boot partition
|
||||
#+BEGIN_SRC bash
|
||||
sudo mkfs.fat -F 32 -n BOOT /dev/nvme0n1p3
|
||||
#+END_SRC
|
||||
|
||||
1. Mount the filesystems
|
||||
5. Mount the filesystems
|
||||
1. Root partition
|
||||
#+BEGIN_SRC bash
|
||||
sudo mount /dev/disk/by-label/nixos /mnt
|
||||
#+END_SRC
|
||||
|
||||
1. Boot partition
|
||||
2. Boot partition
|
||||
#+BEGIN_SRC bash
|
||||
sudo mkdir -p /mnt/boot
|
||||
sudo mount /dev/disk/by-label/BOOT /mnt/boot
|
||||
#+END_SRC
|
||||
|
||||
1. Swap partition (if needed)
|
||||
3. Swap partition (if needed)
|
||||
#+BEGIN_SRC bash
|
||||
sudo swapon /dev/disk/by-label/swap
|
||||
#+END_SRC
|
||||
|
||||
1. Create the host nix configuration
|
||||
6. Create the host nix configuration
|
||||
If the host is not present under system/hosts, create a new folder for the host.
|
||||
Generate the hardware configuration file, you can use nixos-generate-config as a base:
|
||||
|
||||
@@ -80,13 +80,12 @@ Generate the hardware configuration file, you can use nixos-generate-config as a
|
||||
nixos-generate-config --dir <<host directory>> --no-filesystems
|
||||
#+END_SRC
|
||||
|
||||
1. Install nixos!
|
||||
|
||||
7. Install nixos!
|
||||
#+BEGIN_SRC bash
|
||||
sudo nixos-install --impure --root /mnt --flake .#reykjavik
|
||||
#+END_SRC
|
||||
|
||||
1. Set up the user
|
||||
8. Set up the user
|
||||
You'll set the root password during the installation. You can then reboot and use the installed OS. First thing you'll have to do is log in as root and set the password for your user:
|
||||
#+BEGIN_SRC bash
|
||||
passwd marc
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
;; -----------------------------------------------------------------------------
|
||||
(use-package vterm
|
||||
:config
|
||||
(setq vterm-shell "fish"))
|
||||
(setq vterm-shell "zsh"))
|
||||
|
||||
|
||||
;; -----------------------------------------------------------------------------
|
||||
@@ -93,7 +93,6 @@
|
||||
:config
|
||||
(setq py-autopep8-options '("--max-line-length=120")))
|
||||
|
||||
|
||||
(use-package pipenv
|
||||
:config
|
||||
(setq pipenv-with-projectile t)
|
||||
@@ -106,17 +105,6 @@
|
||||
|
||||
(setq org-directory "~/org/")
|
||||
|
||||
(defun org-set-trello-mode ()
|
||||
(let ((filename (buffer-file-name (current-buffer))))
|
||||
(when (and filename (string= "trello" (file-name-extension filename)))
|
||||
(org-trello-mode))))
|
||||
|
||||
(use-package org
|
||||
:config
|
||||
(add-to-list 'auto-mode-alist '("\\.trello$" . org-mode))
|
||||
(add-hook! 'org-mode-hook 'org-set-trello-mode))
|
||||
|
||||
|
||||
(use-package org-roam
|
||||
:ensure t
|
||||
:init
|
||||
@@ -136,37 +124,6 @@
|
||||
:config
|
||||
(org-roam-setup))
|
||||
|
||||
(use-package org-trello
|
||||
:config
|
||||
;; (setq org-trello-current-prefix-keybinding "SPC r")
|
||||
(defun org-trello-bindings ()
|
||||
"Set the keybindings for org-trello mode"
|
||||
(defun set-key (key fn)
|
||||
(evil-define-key* 'normal org-trello-mode-map
|
||||
(kbd (concat "SPC r" " " key)) fn))
|
||||
(set-key "v" 'org-trello-version)
|
||||
(set-key "i" 'org-trello-install-key-and-token)
|
||||
(set-key "I" 'org-trello-install-board-metadata)
|
||||
(set-key "c" 'org-trello-sync-card)
|
||||
(set-key "s" 'org-trello-sync-buffer)
|
||||
(set-key "a" 'org-trello-assign-me)
|
||||
(set-key "d" 'org-trello-check-setup)
|
||||
(set-key "D" 'org-trello-delete-setup)
|
||||
(set-key "b" 'org-trello-create-board-and-install-metadata)
|
||||
(set-key "k" 'org-trello-kill-entity)
|
||||
(set-key "K" 'org-trello-kill-cards)
|
||||
(set-key "a" 'org-trello-archive-card)
|
||||
(set-key "A" 'org-trello-archive-cards)
|
||||
(set-key "j" 'org-trello-jump-to-trello-card)
|
||||
(set-key "J" 'org-trello-jump-to-trello-board)
|
||||
(set-key "C" 'org-trello-add-card-comments)
|
||||
(set-key "o" 'org-trello-show-card-comments)
|
||||
(set-key "l" 'org-trello-show-card-labels)
|
||||
(set-key "u" 'org-trello-update-board-metadata)
|
||||
(set-key "h" 'org-trello-help-describing-bindings))
|
||||
|
||||
(add-hook! 'org-trello-mode-hook 'org-trello-bindings))
|
||||
|
||||
(use-package! websocket
|
||||
:after org-roam)
|
||||
|
||||
@@ -203,12 +160,9 @@
|
||||
("not in" "∉")
|
||||
("in" "∈"))
|
||||
|
||||
|
||||
(pretty-hook emacs-lisp-mode)
|
||||
;; ("defun" "𝙛")
|
||||
|
||||
|
||||
(pretty-hook org-mode
|
||||
("[ ]" "☐")
|
||||
("[X]" "☑"))
|
||||
|
||||
;; (pretty-hook org-mode
|
||||
;; ("[ ]" "☐")
|
||||
;; ("[X]" "☑"))
|
||||
|
||||
@@ -35,7 +35,8 @@
|
||||
hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW
|
||||
;;hydra
|
||||
;;indent-guides ; highlighted indent columns
|
||||
(ligatures +iosevka) ; ligatures and symbols to make your code pretty again
|
||||
(ligatures
|
||||
+iosevka) ; ligatures and symbols to make your code pretty again
|
||||
;;minimap ; show a map of the code on the side
|
||||
modeline ; snazzy, Atom-inspired modeline, plus API
|
||||
;;nav-flash ; blink cursor line after big motions
|
||||
@@ -144,7 +145,7 @@
|
||||
;;lua ; one-based indices? one-based indices
|
||||
markdown ; writing docs for people to ignore
|
||||
;;nim ; python + lisp at the speed of c
|
||||
;;nix ; I hereby declare "nix geht mehr!"
|
||||
nix ; I hereby declare "nix geht mehr!"
|
||||
;;ocaml ; an objective camel
|
||||
(org
|
||||
+journal
|
||||
|
||||
@@ -58,7 +58,6 @@
|
||||
(package! py-autopep8)
|
||||
|
||||
;; Org
|
||||
(package! org-trello)
|
||||
|
||||
;; Org-Roam UI
|
||||
(unpin! org-roam)
|
||||
|
||||
17
flake.lock
generated
17
flake.lock
generated
@@ -1,5 +1,21 @@
|
||||
{
|
||||
"nodes": {
|
||||
"doom-emacs": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1667229496,
|
||||
"narHash": "sha256-SURAFrtblyvkflQz1cEQogfo31UzSvKd+UOgczUyJ8k=",
|
||||
"owner": "doomemacs",
|
||||
"repo": "doomemacs",
|
||||
"rev": "9d4d5b756a8598c4b5c842e9f1f33148af2af8fd",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "doomemacs",
|
||||
"repo": "doomemacs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"emacs-overlay": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
@@ -87,6 +103,7 @@
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"doom-emacs": "doom-emacs",
|
||||
"emacs-overlay": "emacs-overlay",
|
||||
"home-manager": "home-manager",
|
||||
"nixpkgs": "nixpkgs_2"
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, home-manager, ... }:
|
||||
outputs = inputs @ { self, nixpkgs, home-manager, ... }:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
pkgs = import nixpkgs {
|
||||
@@ -53,6 +53,7 @@
|
||||
reykjavik = lib.nixosSystem {
|
||||
inherit system;
|
||||
inherit pkgs;
|
||||
specialArgs = { inherit inputs; };
|
||||
modules = [
|
||||
|
||||
./system/modules
|
||||
@@ -60,6 +61,7 @@
|
||||
./system/hosts/reykjavik
|
||||
|
||||
home-manager.nixosModules.home-manager {
|
||||
home-manager.extraSpecialArgs = { inherit inputs; };
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.users.marc = {
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
discord.enable = true;
|
||||
spotify.enable = true;
|
||||
};
|
||||
editors.emacs.enable = true;
|
||||
};
|
||||
profiles = {
|
||||
desktop.enable = true;
|
||||
|
||||
@@ -2,5 +2,6 @@
|
||||
|
||||
{
|
||||
imports = [
|
||||
./emacs.nix
|
||||
];
|
||||
}
|
||||
|
||||
14
home/modules/editors/emacs.nix
Normal file
14
home/modules/editors/emacs.nix
Normal file
@@ -0,0 +1,14 @@
|
||||
{ config, inputs, lib, options, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.samfelag.modules.editors.emacs;
|
||||
in {
|
||||
options.samfelag.modules.editors.emacs = {
|
||||
enable = mkEnableOption "emacs";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
# xdg.configFile."doom".src = ../../../config/doom;
|
||||
};
|
||||
}
|
||||
@@ -17,6 +17,7 @@
|
||||
samfelag.modules = {
|
||||
user.name = "marc";
|
||||
bluetooth.enable = true;
|
||||
editors.emacs.enable = true;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -2,5 +2,6 @@
|
||||
|
||||
{
|
||||
imports = [
|
||||
./emacs.nix
|
||||
];
|
||||
}
|
||||
|
||||
119
system/modules/editors/emacs.nix
Normal file
119
system/modules/editors/emacs.nix
Normal file
@@ -0,0 +1,119 @@
|
||||
{ config, inputs, lib, options, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.samfelag.modules.editors.emacs;
|
||||
in {
|
||||
options.samfelag.modules.editors.emacs = {
|
||||
enable = mkEnableOption "emacs";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
nixpkgs.overlays = [ inputs.emacs-overlay.overlay ];
|
||||
|
||||
# home.file.doom-emacs = {
|
||||
# source = ./doom-emacs;
|
||||
# target = ".config/doom";
|
||||
# recursive = true;
|
||||
# # onChange = "doom upgrade";
|
||||
# };
|
||||
|
||||
# home.programs.emacs = {
|
||||
# enable = true;
|
||||
# # package = pkgs.emacsPgtkGcc;
|
||||
# extraPackages = epkgs: [ epkgs.vterm ];
|
||||
# };
|
||||
|
||||
# home.services.emacs = {
|
||||
# enable = true;
|
||||
# client.enable = true;
|
||||
# socketActivation.enable = true;
|
||||
# };
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
## Emacs itself
|
||||
binutils
|
||||
emacs
|
||||
# emacsPgtkGcc
|
||||
|
||||
## Doom dependencies
|
||||
git
|
||||
(ripgrep.override { withPCRE2 = true; })
|
||||
gnutls
|
||||
|
||||
## Opt deps
|
||||
fd
|
||||
imagemagick
|
||||
pinentry_emacs
|
||||
zstd
|
||||
|
||||
# ## Modules deps
|
||||
# # :lang cc
|
||||
# ccls
|
||||
# cmake
|
||||
# gcc
|
||||
# glslang
|
||||
# # :lang haskell
|
||||
# stack
|
||||
# haskellPackages.ghcide
|
||||
# haskellPackages.hoogle
|
||||
# # :lang latex && :lang org (latex preview)
|
||||
# (texlive.combine { inherit (texlive) scheme-full; })
|
||||
# # biber
|
||||
# # :lang nix
|
||||
# nixfmt
|
||||
# # :lang python
|
||||
# black
|
||||
# python3
|
||||
# python3Packages.isort
|
||||
# # python3Packages.python-language-server
|
||||
# python3Packages.pytest
|
||||
# python3Packages.setuptools
|
||||
# nodePackages.pyright
|
||||
# # :tools lookup & :lang org +roam
|
||||
# sqlite
|
||||
# # :tools direnv
|
||||
# direnv
|
||||
# # :tools vterm
|
||||
# gcc
|
||||
# gnumake
|
||||
# libtool
|
||||
|
||||
# Fonts
|
||||
emacs-all-the-icons-fonts
|
||||
# fira-code
|
||||
# fira-code-symbols
|
||||
|
||||
graphviz
|
||||
];
|
||||
|
||||
fonts.fonts = [ pkgs.emacs-all-the-icons-fonts ];
|
||||
|
||||
# env.PATH = [ "$XDG_CONFIG_HOME/emacs/bin" ];
|
||||
|
||||
environment.sessionVariables = rec {
|
||||
XDG_CACHE_HOME = "$HOME/.cache";
|
||||
XDG_CONFIG_HOME = "$HOME/.config";
|
||||
XDG_BIN_HOME = "$HOME/.local/bin";
|
||||
XDG_DATA_HOME = "$HOME/.local/share";
|
||||
|
||||
PATH = [
|
||||
"$HOME/.config/emacs/bin"
|
||||
];
|
||||
};
|
||||
|
||||
home-manager.users.marc.xdg.configFile."doom".source = ../../../config/doom;
|
||||
|
||||
system.userActivationScripts = {
|
||||
installDoomEmacs = ''
|
||||
EMACS_FOLDER="$HOME/.config/emacs"
|
||||
echo $XDG_CONFIG_HOME
|
||||
echo $EMACS_FOLDER
|
||||
if [ ! -d "$EMACS_FOLDER" ]; then
|
||||
${pkgs.git}/bin/git clone --depth=1 --single-branch "https://github.com/doomemacs/doomemacs" "$EMACS_FOLDER"
|
||||
fi
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
@@ -12,7 +12,7 @@
|
||||
gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
options = "--delete-older-than 30d";
|
||||
options = "--delete-older-than 14d";
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user