Compare commits
70 Commits
d0f78cc24f
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e87b0ddd24 | ||
|
|
18cfc610e1 | ||
|
|
7277d5b080 | ||
|
|
ed00a90dda | ||
|
|
97b58f141a | ||
|
|
d388d2192a | ||
|
|
41d47f6152 | ||
|
|
df6c1c9402 | ||
|
|
fc548af96a | ||
|
|
1b8db86a98 | ||
|
|
e24078ec81 | ||
|
|
411bf5b0f2 | ||
|
|
7312947723 | ||
|
|
428a1756f3 | ||
|
|
f7afbe6973 | ||
|
|
e917ea97c6 | ||
|
|
8378eec1e0 | ||
|
|
a39f38b3f2 | ||
|
|
aef9169245 | ||
|
|
bb7b073fe9 | ||
|
|
b1a8174ea1 | ||
|
|
4518cccec1 | ||
|
|
8da975b098 | ||
|
|
d452ec86dd | ||
|
|
ed305126a2 | ||
|
|
a59c52a2a3 | ||
|
|
ab380782c3 | ||
|
|
5fd64d47cd | ||
|
|
2956327b0c | ||
|
|
40b3eaba12 | ||
|
|
7fe62ab2ce | ||
|
|
2af075c7dd | ||
|
|
a5cd3713e7 | ||
|
|
c62acaa77f | ||
|
|
39cdbaa430 | ||
|
|
228c57679b | ||
|
|
81fedb6261 | ||
|
|
154b7fb9b2 | ||
|
|
0584a50f5f | ||
|
|
7cbf3cb37b | ||
|
|
6ba393d433 | ||
|
|
e4bf731436 | ||
|
|
eef75973d4 | ||
|
|
25a24fe206 | ||
|
|
d49b475e16 | ||
|
|
6ca66905b1 | ||
|
|
8833cb4f7a | ||
|
|
6a4dcadfba | ||
|
|
f2b20c7acd | ||
|
|
d1b63fe326 | ||
|
|
466ddf2cd9 | ||
|
|
95944b2486 | ||
|
|
32654faf98 | ||
|
|
bf8c91e632 | ||
|
|
3d89540ff8 | ||
|
|
4f70bf991c | ||
|
|
2e3dad1c1b | ||
|
|
87a4d79c71 | ||
|
|
3c23709394 | ||
|
|
481914022c | ||
|
|
14e9bcd7c3 | ||
|
|
a09aedab3f | ||
|
|
ae58914cc2 | ||
|
|
ea276bb6d1 | ||
|
|
360adace1e | ||
|
|
3f06ae0cb2 | ||
|
|
5cce9461c1 | ||
|
|
e716f7cb7d | ||
|
|
042e246b1b | ||
|
|
fa12502c6e |
186
README.org
186
README.org
@@ -1,175 +1,13 @@
|
|||||||
* Installing
|
* NixOS
|
||||||
** Fresh system (nixos USB drive)
|
** [[file:docs/install.org][Installing]]
|
||||||
1. Open a nix-shell with git (if not installed):
|
*** Rebuilding
|
||||||
#+BEGIN_SRC bash
|
#+BEGIN_SRC bash
|
||||||
nix-shell -p git
|
sudo nixos-rebuild switch --impure --flake ".#${HOST}"
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
** Modules
|
||||||
2. Clone the flake
|
*** Desktop environment
|
||||||
#+BEGIN_SRC bash
|
**** Themeing
|
||||||
git clone https://git.samfelag.xyz/marc/samfelag.git
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
3. Partition the disk
|
|
||||||
We'll partition the disk in the follwing way:
|
|
||||||
* 512MB at the beginning for the boot partition
|
|
||||||
* 8GB at the end for swap
|
|
||||||
* The rest (at the middle) for the filesystem (/)
|
|
||||||
|
|
||||||
1. Locate the disk
|
|
||||||
#+BEGIN_SRC bash
|
|
||||||
lsblk
|
|
||||||
#+END_SRC
|
|
||||||
2. Create a GPT partition table
|
|
||||||
#+BEGIN_SRC bash
|
|
||||||
sudo parted /dev/nvme0n1 -- mklabel gpt
|
|
||||||
#+END_SRC
|
|
||||||
3. Create the root partition
|
|
||||||
#+BEGIN_SRC bash
|
|
||||||
sudo parted /dev/nvme0n1 -- mkpart primary 512MB -8GB
|
|
||||||
#+END_SRC
|
|
||||||
4. Create the swap partition
|
|
||||||
#+BEGIN_SRC bash
|
|
||||||
sudo parted /dev/nvme0n1 -- mkpart primary linux-swap -8GB 100%
|
|
||||||
#+END_SRC
|
|
||||||
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
|
|
||||||
|
|
||||||
4. Format the partitions
|
|
||||||
1. Root partition
|
|
||||||
#+BEGIN_SRC bash
|
|
||||||
sudo mkfs.ext4 -L nixos /dev/nvme0n1p1
|
|
||||||
#+END_SRC
|
|
||||||
2. Swap partition
|
|
||||||
#+BEGIN_SRC bash
|
|
||||||
sudo mkswap -L swap /dev/nvme0n1p2
|
|
||||||
#+END_SRC
|
|
||||||
3. Boot partition
|
|
||||||
#+BEGIN_SRC bash
|
|
||||||
sudo mkfs.fat -F 32 -n BOOT /dev/nvme0n1p3
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
5. Mount the filesystems
|
|
||||||
1. Root partition
|
|
||||||
#+BEGIN_SRC bash
|
|
||||||
sudo mount /dev/disk/by-label/nixos /mnt
|
|
||||||
#+END_SRC
|
|
||||||
2. Boot partition
|
|
||||||
#+BEGIN_SRC bash
|
|
||||||
sudo mkdir -p /mnt/boot
|
|
||||||
sudo mount /dev/disk/by-label/BOOT /mnt/boot
|
|
||||||
#+END_SRC
|
|
||||||
3. Swap partition (if needed)
|
|
||||||
#+BEGIN_SRC bash
|
|
||||||
sudo swapon /dev/disk/by-label/swap
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
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:
|
|
||||||
#+BEGIN_SRC bash
|
|
||||||
nixos-generate-config --dir <<host directory>> --no-filesystems
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
7. Install nixos!
|
|
||||||
#+BEGIN_SRC bash
|
|
||||||
sudo nixos-install --impure --root /mnt --flake '.#reykjavik'
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
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
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
** Fresh system (vultr)
|
|
||||||
1. [Optional] Set the root password via the Vultr Console, so you can ssh to the instance
|
|
||||||
|
|
||||||
2. Open a nix-shell with git (if not installed):
|
|
||||||
#+BEGIN_SRC bash
|
|
||||||
nix-shell -p git
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
3. Clone the flake
|
|
||||||
#+BEGIN_SRC bash
|
|
||||||
git clone https://git.samfelag.xyz/marc/samfelag.git
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
4. Partition the disk
|
|
||||||
We'll partition the disk in the follwing way:
|
|
||||||
* 512MB at the beginning for the boot partition
|
|
||||||
* 8GB at the end for swap
|
|
||||||
* The rest (at the middle) for the filesystem (/)
|
|
||||||
|
|
||||||
* Locate the disk
|
|
||||||
#+BEGIN_SRC bash
|
|
||||||
lsblk
|
|
||||||
#+END_SRC
|
|
||||||
* Create a MBR partition table
|
|
||||||
#+BEGIN_SRC bash
|
|
||||||
sudo parted /dev/vda -- mklabel msdos
|
|
||||||
#+END_SRC
|
|
||||||
* Create the root partition
|
|
||||||
#+BEGIN_SRC bash
|
|
||||||
sudo parted /dev/vda -- mkpart primary 1MiB -8GiB
|
|
||||||
#+END_SRC
|
|
||||||
* Create the swap partition
|
|
||||||
#+BEGIN_SRC bash
|
|
||||||
sudo parted /dev/vda -- mkpart primary linux-swap -8GiB 100%
|
|
||||||
#+END_SRC
|
|
||||||
* Create the boot partition
|
|
||||||
#+BEGIN_SRC bash
|
|
||||||
sudo parted /dev/vda -- mkpart ESP fat32 1MB 512MB
|
|
||||||
sudo parted /dev/vda -- set 3 esp on
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
5. Format the partitions
|
|
||||||
1. Root partition
|
|
||||||
#+BEGIN_SRC bash
|
|
||||||
sudo mkfs.ext4 -L nixos /dev/vda1
|
|
||||||
#+END_SRC
|
|
||||||
2. Swap partition
|
|
||||||
#+BEGIN_SRC bash
|
|
||||||
sudo mkswap -L swap /dev/vda2
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
6. Mount the filesystems
|
|
||||||
1. Root partition
|
|
||||||
#+BEGIN_SRC bash
|
|
||||||
sudo mount /dev/disk/by-label/nixos /mnt
|
|
||||||
#+END_SRC
|
|
||||||
2. Swap partition (if needed)
|
|
||||||
#+BEGIN_SRC bash
|
|
||||||
sudo swapon /dev/disk/by-label/swap
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
7. 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:
|
|
||||||
#+BEGIN_SRC bash
|
|
||||||
nixos-generate-config --dir <<host directory>> --no-filesystems
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
8. Install nixos!
|
|
||||||
#+BEGIN_SRC bash
|
|
||||||
sudo nixos-install --impure --root /mnt --flake '.#vultr-test'
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
9. 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
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
* Rebuilding
|
|
||||||
#+BEGIN_SRC bash
|
|
||||||
sudo nixos-rebuild switch --impure --flake '.#reykjavik'
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
* Modules
|
|
||||||
** Desktop environment
|
|
||||||
*** Themeing
|
|
||||||
We use [[https://github.com/Misterio77/nix-colors][nix-colors]] to (try to) keep a consistent theme across all applications. This uses [[https://github.com/chriskempson/base16][base-16 themes]] (here is a [[https://github.com/chriskempson/base16/blob/main/styling.md][styiling guide]] for it).
|
We use [[https://github.com/Misterio77/nix-colors][nix-colors]] to (try to) keep a consistent theme across all applications. This uses [[https://github.com/chriskempson/base16][base-16 themes]] (here is a [[https://github.com/chriskempson/base16/blob/main/styling.md][styiling guide]] for it).
|
||||||
|
* Samfelag Mesh
|
||||||
|
** [[file:docs/hosts.org][Hosts]]
|
||||||
|
** [[file:docs/consul.org][Consul]]
|
||||||
|
|||||||
12
config/alacritty/alacritty.toml
Normal file
12
config/alacritty/alacritty.toml
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
[general]
|
||||||
|
import = ["~/.config/alacritty/theme.toml"]
|
||||||
|
|
||||||
|
[font]
|
||||||
|
size = 12
|
||||||
|
|
||||||
|
[font.normal]
|
||||||
|
family = "Iosevka Nerd Font"
|
||||||
|
style = "Regular"
|
||||||
|
|
||||||
|
[window]
|
||||||
|
opacity = 0.85
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
window:
|
|
||||||
opacity: 0.85
|
|
||||||
font:
|
|
||||||
size: 8
|
|
||||||
normal:
|
|
||||||
family: Iosevka Nerd Font
|
|
||||||
style: Regular
|
|
||||||
import:
|
|
||||||
- ~/.config/alacritty/theme.yml
|
|
||||||
15
config/consul.d/client.json
Normal file
15
config/consul.d/client.json
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
"tls": {
|
||||||
|
"defaults": {
|
||||||
|
"verify_incoming": false,
|
||||||
|
"verify_outgoing": true,
|
||||||
|
"ca_file": "/etc/consul.d/certs/consul-agent-ca.pem"
|
||||||
|
},
|
||||||
|
"internal_rpc": {
|
||||||
|
"verify_server_hostname": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"auto_encrypt": {
|
||||||
|
"tls": true
|
||||||
|
}
|
||||||
|
}
|
||||||
25
config/consul.d/common.json
Normal file
25
config/consul.d/common.json
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
{
|
||||||
|
"datacenter": "samfelag",
|
||||||
|
|
||||||
|
"bind_addr": "{{ GetInterfaceIP \"tailscale0\" }}",
|
||||||
|
"advertise_addr": "{{ GetInterfaceIP \"tailscale0\" }}",
|
||||||
|
"client_addr": "{{ GetInterfaceIP \"tailscale0\" }} 127.0.0.1",
|
||||||
|
|
||||||
|
"ports": {
|
||||||
|
"grpc_tls": 8502
|
||||||
|
},
|
||||||
|
|
||||||
|
"acl": {
|
||||||
|
"enabled": true,
|
||||||
|
"default_policy": "allow",
|
||||||
|
"enable_token_persistence": true
|
||||||
|
},
|
||||||
|
|
||||||
|
"connect": {
|
||||||
|
"enabled": true
|
||||||
|
},
|
||||||
|
|
||||||
|
"performance": {
|
||||||
|
"raft_multiplier": 1
|
||||||
|
}
|
||||||
|
}
|
||||||
5
config/consul.d/server-list.json
Normal file
5
config/consul.d/server-list.json
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"retry_join": [
|
||||||
|
"100.99.167.21"
|
||||||
|
]
|
||||||
|
}
|
||||||
22
config/consul.d/server.json
Normal file
22
config/consul.d/server.json
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
{
|
||||||
|
"server": true,
|
||||||
|
"bootstrap_expect": 1,
|
||||||
|
"ui_config": {
|
||||||
|
"enabled": true
|
||||||
|
},
|
||||||
|
"tls": {
|
||||||
|
"defaults": {
|
||||||
|
"verify_incoming": true,
|
||||||
|
"verify_outgoing": true,
|
||||||
|
"ca_file": "/etc/consul.d/certs/consul-agent-ca.pem",
|
||||||
|
"cert_file": "/etc/consul.d/certs/samfelag-server-consul.pem",
|
||||||
|
"key_file": "/etc/consul.d/certs/samfelag-server-consul-key.pem"
|
||||||
|
},
|
||||||
|
"internal_rpc": {
|
||||||
|
"verify_server_hostname": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"auto_encrypt": {
|
||||||
|
"allow_tls": true
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,9 +1,5 @@
|
|||||||
;;; $DOOMDIR/config.el -*- lexical-binding: t; -*-
|
;;; $DOOMDIR/config.el -*- lexical-binding: t; -*-
|
||||||
|
|
||||||
;; Place your private configuration here! Remember, you do not need to run 'doom
|
|
||||||
;; sync' after modifying this file!
|
|
||||||
|
|
||||||
|
|
||||||
;; Some functionality uses this to identify you, e.g. GPG configuration, email
|
;; Some functionality uses this to identify you, e.g. GPG configuration, email
|
||||||
;; clients, file templates and snippets.
|
;; clients, file templates and snippets.
|
||||||
(setq user-full-name "Marc Sastre Rienitz"
|
(setq user-full-name "Marc Sastre Rienitz"
|
||||||
@@ -14,22 +10,23 @@
|
|||||||
(setq display-line-numbers-type t)
|
(setq display-line-numbers-type t)
|
||||||
|
|
||||||
;; Fonts
|
;; Fonts
|
||||||
(setq doom-font (font-spec :family "Iosevka Nerd Font" :size 15))
|
(setq doom-font (font-spec :family "Iosevka Nerd Font" :size 18))
|
||||||
(setq doom-unicode-font (font-spec :family "Iosevka Nerd Font" :size 15))
|
(setq doom-symbol-font (font-spec :family "Iosevka Nerd Font" :size 18))
|
||||||
|
(setq doom-emoji-font (font-spec :family "Noto Color Emoji" :size 18))
|
||||||
|
|
||||||
;; Themeing
|
;; Themeing
|
||||||
;; (use-package base16-theme
|
(use-package base16-theme
|
||||||
;; :init (add-to-list 'custom-theme-load-path "~/.config/doom/themes")
|
:init (add-to-list 'custom-theme-load-path "~/.config/doom/themes")
|
||||||
;; :ensure t
|
:ensure t
|
||||||
;; :config
|
|
||||||
;; (load-theme 'base16-samfelag t))
|
|
||||||
(after! doom-themes
|
|
||||||
(load-theme 'doom-nano-dark t))
|
|
||||||
|
|
||||||
(use-package! doom-nano-modeline
|
|
||||||
:config
|
:config
|
||||||
(doom-nano-modeline-mode 1)
|
(load-theme 'base16-samfelag t))
|
||||||
(global-hide-mode-line-mode 1))
|
;; (after! doom-themes
|
||||||
|
;; (load-theme 'doom-nano-dark t))
|
||||||
|
|
||||||
|
;; (use-package! doom-nano-modeline
|
||||||
|
;; :config
|
||||||
|
;; (doom-nano-modeline-mode 1)
|
||||||
|
;; (global-hide-mode-line-mode 1))
|
||||||
|
|
||||||
;; Here are some additional functions/macros that could help you configure Doom:
|
;; Here are some additional functions/macros that could help you configure Doom:
|
||||||
;;
|
;;
|
||||||
@@ -52,6 +49,18 @@
|
|||||||
|
|
||||||
(setq-default tab-width 4)
|
(setq-default tab-width 4)
|
||||||
|
|
||||||
|
;; -----------------------------------------------------------------------------
|
||||||
|
;; Emojify
|
||||||
|
;; -----------------------------------------------------------------------------
|
||||||
|
(use-package! emojify
|
||||||
|
:config
|
||||||
|
(when (member "Noto Color Emoji" (font-family-list))
|
||||||
|
(set-fontset-font
|
||||||
|
t 'emoji (font-spec :family "Noto Color Emoji") nil 'prepend))
|
||||||
|
(setq emojify-display-style 'image)
|
||||||
|
(setq emojify-emoji-styles '(unicode)))
|
||||||
|
|
||||||
|
|
||||||
;; -----------------------------------------------------------------------------
|
;; -----------------------------------------------------------------------------
|
||||||
;; Projectile
|
;; Projectile
|
||||||
;; -----------------------------------------------------------------------------
|
;; -----------------------------------------------------------------------------
|
||||||
@@ -74,17 +83,19 @@
|
|||||||
(use-package parinfer
|
(use-package parinfer
|
||||||
:defer t)
|
:defer t)
|
||||||
|
|
||||||
|
|
||||||
;; -----------------------------------------------------------------------------
|
;; -----------------------------------------------------------------------------
|
||||||
;; LSP
|
;; LSP
|
||||||
;; -----------------------------------------------------------------------------
|
;; -----------------------------------------------------------------------------
|
||||||
(use-package lsp-mode
|
;; (use-package lsp-mode
|
||||||
:init
|
;; :init
|
||||||
:hook (;;
|
;; :hook (;;
|
||||||
(clojure-mode . lsp-deferred)
|
;; (clojure-mode . lsp-deferred)
|
||||||
(python-mode . lsp-deferred)
|
;; (python-mode . lsp-deferred)
|
||||||
;; if you want which-key integration
|
;; ;; if you want which-key integration
|
||||||
(lsp-mode . lsp-enable-which-key-integration))
|
;; (lsp-mode . lsp-enable-which-key-integration))
|
||||||
:commands (lsp lsp-deferred))
|
;; :commands (lsp lsp-deferred))
|
||||||
|
|
||||||
|
|
||||||
;; -----------------------------------------------------------------------------
|
;; -----------------------------------------------------------------------------
|
||||||
;; Python
|
;; Python
|
||||||
@@ -111,47 +122,22 @@
|
|||||||
;; -----------------------------------------------------------------------------
|
;; -----------------------------------------------------------------------------
|
||||||
;; Web (HTML + CSS)
|
;; Web (HTML + CSS)
|
||||||
;; -----------------------------------------------------------------------------
|
;; -----------------------------------------------------------------------------
|
||||||
(use-package! lsp-tailwindcss)
|
;; (use-package! lsp-tailwindcss)
|
||||||
|
|
||||||
;; -----------------------------------------------------------------------------
|
;; -----------------------------------------------------------------------------
|
||||||
;; Org
|
;; Org
|
||||||
;; -----------------------------------------------------------------------------
|
;; -----------------------------------------------------------------------------
|
||||||
|
(setq org-directory "~/org")
|
||||||
|
(setq org-agenda-files (directory-files-recursively "~/org/agenda" "\\.org$"))
|
||||||
|
|
||||||
(setq org-directory "~/org/")
|
|
||||||
|
|
||||||
; (use-package org-roam
|
;; -----------------------------------------------------------------------------
|
||||||
; :ensure t
|
;; Agenix
|
||||||
; :init
|
;; -----------------------------------------------------------------------------
|
||||||
; (setq org-roam-v2-ack t)
|
(load! "modules/agenix.el")
|
||||||
; :custom
|
(setq agenix-age-program "age")
|
||||||
; (org-roam-directory "~/org-roam")
|
(setq agenix-agenix-program "agenix")
|
||||||
; (org-roam-capture-templates
|
|
||||||
; '(("d" "default" plain "%?"
|
|
||||||
; :target (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title}\n")
|
|
||||||
; :unnarrowed t)
|
|
||||||
; ("m" "màquina" plain (file "~/org-roam/templates/maquina.org")
|
|
||||||
; :target (file "%<%Y%m%d%H%M%S>-${slug}.org")
|
|
||||||
; :unnarrowed t)
|
|
||||||
; ("s" "software" plain (file "~/org-roam/templates/software.org")
|
|
||||||
; :target (file "%<%Y%m%d%H%M%S>-${slug}.org")
|
|
||||||
; :unnarrowed t)))
|
|
||||||
; :config
|
|
||||||
; (org-roam-setup))
|
|
||||||
;
|
|
||||||
; (use-package! websocket
|
|
||||||
; :after org-roam)
|
|
||||||
;
|
|
||||||
; (use-package! org-roam-ui
|
|
||||||
; :after org-roam ;; or :after org
|
|
||||||
; ;; normally we'd recommend hooking orui after org-roam, but since org-roam does not have
|
|
||||||
; ;; a hookable mode anymore, you're advised to pick something yourself
|
|
||||||
; ;; if you don't care about startup time, use
|
|
||||||
; ;; :hook (after-init . org-roam-ui-mode)
|
|
||||||
; :config
|
|
||||||
; (setq org-roam-ui-sync-theme t
|
|
||||||
; org-roam-ui-follow t
|
|
||||||
; org-roam-ui-update-on-save t
|
|
||||||
; org-roam-ui-open-on-start nil))
|
|
||||||
|
|
||||||
;; -----------------------------------------------------------------------------
|
;; -----------------------------------------------------------------------------
|
||||||
;; Appearance - Prettify
|
;; Appearance - Prettify
|
||||||
@@ -159,8 +145,8 @@
|
|||||||
(load! "modules/prettify-utils.el")
|
(load! "modules/prettify-utils.el")
|
||||||
|
|
||||||
(pretty-hook python-mode
|
(pretty-hook python-mode
|
||||||
;; ("def" "")
|
("def" " ")
|
||||||
;; ("class" "𝙘")
|
("class" "𝙘")
|
||||||
("None" "∅")
|
("None" "∅")
|
||||||
("lambda" "λ")
|
("lambda" "λ")
|
||||||
("not in" "∉")
|
("not in" "∉")
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
doom ; what makes DOOM look the way it does
|
doom ; what makes DOOM look the way it does
|
||||||
doom-dashboard ; a nifty splash screen for Emacs
|
doom-dashboard ; a nifty splash screen for Emacs
|
||||||
;; doom-quit ; DOOM quit-message prompts when you quit Emacs
|
;; doom-quit ; DOOM quit-message prompts when you quit Emacs
|
||||||
;;(emoji +unicode) ; 🙂
|
(emoji +unicode) ; 🙂
|
||||||
;; fill-column ; a `fill-column' indicator
|
;; fill-column ; a `fill-column' indicator
|
||||||
hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW
|
hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW
|
||||||
;;hydra
|
;;hydra
|
||||||
@@ -94,7 +94,7 @@
|
|||||||
(eval +overlay) ; run code, run (also, repls)
|
(eval +overlay) ; run code, run (also, repls)
|
||||||
;;gist ; interacting with github gists
|
;;gist ; interacting with github gists
|
||||||
lookup ; navigate your code and its documentation
|
lookup ; navigate your code and its documentation
|
||||||
lsp
|
(lsp +eglot)
|
||||||
magit ; a git porcelain for Emacs
|
magit ; a git porcelain for Emacs
|
||||||
;;make ; run make tasks from Emacs
|
;;make ; run make tasks from Emacs
|
||||||
;;pass ; password manager for nerds
|
;;pass ; password manager for nerds
|
||||||
@@ -155,8 +155,7 @@
|
|||||||
;;plantuml ; diagrams for confusing people more
|
;;plantuml ; diagrams for confusing people more
|
||||||
;;purescript ; javascript, but functional
|
;;purescript ; javascript, but functional
|
||||||
(python
|
(python
|
||||||
+lsp
|
+lsp) ; beautiful is better than ugly
|
||||||
+pyright) ; beautiful is better than ugly
|
|
||||||
;;qt ; the 'cutest' gui framework ever
|
;;qt ; the 'cutest' gui framework ever
|
||||||
;;racket ; a DSL for DSLs
|
;;racket ; a DSL for DSLs
|
||||||
;;raku ; the artist formerly known as perl6
|
;;raku ; the artist formerly known as perl6
|
||||||
|
|||||||
231
config/doom/modules/agenix.el
Normal file
231
config/doom/modules/agenix.el
Normal file
@@ -0,0 +1,231 @@
|
|||||||
|
;;; agenix.el --- Decrypt and encrypt agenix secrets -*- lexical-binding: t -*-
|
||||||
|
|
||||||
|
;; Copyright (C) 2022-2023 Tomasz Maciosowski (t4ccer)
|
||||||
|
|
||||||
|
;; Author: Tomasz Maciosowski <t4ccer@gmail.com>
|
||||||
|
;; Maintainer: Tomasz Maciosowski <t4ccer@gmail.com>
|
||||||
|
;; Package-Requires: ((emacs "27.1"))
|
||||||
|
;; URL: https://github.com/t4ccer/agenix.el
|
||||||
|
;; Version: 1.0
|
||||||
|
;;
|
||||||
|
;; Modified version by Marc Sastre that allows subdirectories in the secrets folder.
|
||||||
|
|
||||||
|
;; This file is NOT part of GNU Emacs.
|
||||||
|
|
||||||
|
;; This program is free software; you can redistribute it and/or modify
|
||||||
|
;; it under the terms of the GNU General Public License as published by
|
||||||
|
;; the Free Software Foundation, either version 3 of the License, or
|
||||||
|
;; (at your option) any later version.
|
||||||
|
|
||||||
|
;; This program is distributed in the hope that it will be useful,
|
||||||
|
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
;; GNU General Public License for more details.
|
||||||
|
|
||||||
|
;; You should have received a copy of the GNU General Public License
|
||||||
|
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
;;; Commentary:
|
||||||
|
|
||||||
|
;; Fully transparent editing of agenix secrets. Open a file, edit it, save it and it will be
|
||||||
|
;; encrypted automatically.
|
||||||
|
|
||||||
|
;;; Code:
|
||||||
|
|
||||||
|
(defcustom agenix-age-program "age"
|
||||||
|
"The age program."
|
||||||
|
:group 'agenix
|
||||||
|
:type 'string)
|
||||||
|
|
||||||
|
(defcustom agenix-key-files '("~/.ssh/id_ed25519" "~/.ssh/id_rsa")
|
||||||
|
"List of age key files."
|
||||||
|
:group 'agenix
|
||||||
|
:type '(repeat string))
|
||||||
|
|
||||||
|
(defcustom agenix-pre-mode-hook nil
|
||||||
|
"Hook to run before entering `agenix-mode'.
|
||||||
|
Can be used to set up age binary path."
|
||||||
|
:group 'agenix
|
||||||
|
:type 'hook)
|
||||||
|
|
||||||
|
(defvar-local agenix--encrypted-fp nil)
|
||||||
|
|
||||||
|
(defvar-local agenix--keys nil)
|
||||||
|
|
||||||
|
(defvar-local agenix--undo-list nil)
|
||||||
|
|
||||||
|
(defvar-local agenix--point nil)
|
||||||
|
|
||||||
|
(define-derived-mode agenix-mode text-mode "agenix"
|
||||||
|
"Major mode for agenix files.
|
||||||
|
Don't use directly, use `agenix-mode-if-with-secrets-nix' to ensure that
|
||||||
|
secrets.nix exists."
|
||||||
|
(read-only-mode 1)
|
||||||
|
|
||||||
|
(run-hooks 'agenix-pre-mode-hook)
|
||||||
|
|
||||||
|
(agenix-decrypt-buffer)
|
||||||
|
(goto-char (point-min))
|
||||||
|
(setq buffer-undo-list nil)
|
||||||
|
|
||||||
|
(setq require-final-newline nil)
|
||||||
|
(setq buffer-auto-save-file-name nil)
|
||||||
|
(setq write-contents-functions '(agenix-save-decrypted))
|
||||||
|
|
||||||
|
;; Reverting loads encrypted file back to the buffer, so we need to decrypt it
|
||||||
|
(add-hook 'after-revert-hook
|
||||||
|
(lambda () (when (eq major-mode 'agenix-mode) (agenix-decrypt-buffer)))))
|
||||||
|
|
||||||
|
|
||||||
|
(defun agenix--file-search-upward (directory file)
|
||||||
|
"Search DIRECTORY for FILE and return its full path if found, or NIL if not.
|
||||||
|
|
||||||
|
If FILE is not found in DIRECTORY, the parent of DIRECTORY will be searched."
|
||||||
|
(let ((parent-dir (file-truename (concat (file-name-directory directory) "../")))
|
||||||
|
(current-path (if (not (string= (substring directory (- (length directory) 1)) "/"))
|
||||||
|
(concat directory "/" file)
|
||||||
|
(concat directory file))))
|
||||||
|
(if (file-exists-p current-path)
|
||||||
|
current-path
|
||||||
|
(when (and (not (string= (file-truename directory) parent-dir))
|
||||||
|
(< (length parent-dir) (length (file-truename directory))))
|
||||||
|
(agenix--file-search-upward parent-dir file)))))
|
||||||
|
|
||||||
|
(defun agenix--secrets-nix-path ()
|
||||||
|
"Search for secrets.nix file in the current directory or any parent directory.
|
||||||
|
Return it if found"
|
||||||
|
(agenix--file-search-upward "./" "secrets.nix"))
|
||||||
|
|
||||||
|
(defun agenix--relative-buffer-path ()
|
||||||
|
"Return the filename of the current buffer relative to the secrets.nix path."
|
||||||
|
(file-relative-name
|
||||||
|
(buffer-file-name)
|
||||||
|
(file-name-directory (agenix--secrets-nix-path))))
|
||||||
|
|
||||||
|
(defun agenix--buffer-string* (buffer)
|
||||||
|
"Like `buffer-string' but read from BUFFER parameter."
|
||||||
|
(with-current-buffer buffer
|
||||||
|
(buffer-substring-no-properties (point-min) (point-max))))
|
||||||
|
|
||||||
|
(defun agenix--with-temp-buffer (func)
|
||||||
|
"Like `with-temp-buffer' but doesn't actually switch the buffer.
|
||||||
|
FUNC takes a temporary buffer that will be disposed after the call."
|
||||||
|
(let* ((age-buf (generate-new-buffer "*age-buf*"))
|
||||||
|
(res (funcall func age-buf)))
|
||||||
|
(kill-buffer age-buf)
|
||||||
|
res))
|
||||||
|
|
||||||
|
(defun agenix--process-exit-code-and-output (program &rest args)
|
||||||
|
"Run PROGRAM with ARGS and return the exit code and output in a list."
|
||||||
|
(agenix--with-temp-buffer
|
||||||
|
(lambda (buf) (list (apply #'call-process program nil buf nil args)
|
||||||
|
(agenix--buffer-string* buf)))))
|
||||||
|
|
||||||
|
;;;###autoload
|
||||||
|
(defun agenix-decrypt-buffer (&optional encrypted-buffer)
|
||||||
|
"Decrypt ENCRYPTED-BUFFER in place.
|
||||||
|
If ENCRYPTED-BUFFER is unset or nil, decrypt the current buffer."
|
||||||
|
(interactive
|
||||||
|
(when current-prefix-arg
|
||||||
|
(list (read-buffer "Encrypted buffer: " (current-buffer) t))))
|
||||||
|
|
||||||
|
(with-current-buffer (or encrypted-buffer (current-buffer))
|
||||||
|
(let* ((nix-res (apply #'agenix--process-exit-code-and-output "nix-instantiate"
|
||||||
|
(list "--strict" "--json" "--eval" "--expr"
|
||||||
|
(format
|
||||||
|
"(import %s).\"%s\".publicKeys"
|
||||||
|
(agenix--secrets-nix-path)
|
||||||
|
(agenix--relative-buffer-path)))))
|
||||||
|
(nix-exit-code (car nix-res))
|
||||||
|
(nix-output (car (cdr nix-res))))
|
||||||
|
|
||||||
|
(if (/= nix-exit-code 0)
|
||||||
|
(warn "Nix evaluation error.
|
||||||
|
Probably file %s is not declared as a secret in 'secrets.nix' file.
|
||||||
|
Error: %s" (buffer-file-name) nix-output)
|
||||||
|
(let* ((keys (json-parse-string nix-output :array-type 'list))
|
||||||
|
(age-flags (list "--decrypt")))
|
||||||
|
|
||||||
|
;; Add all user's keys to the age command
|
||||||
|
(dolist (key-path agenix-key-files)
|
||||||
|
(when (file-exists-p (expand-file-name key-path))
|
||||||
|
(setq age-flags
|
||||||
|
(nconc age-flags (list "--identity" (expand-file-name key-path))))))
|
||||||
|
|
||||||
|
;; Add file-path to decrypt to the age command
|
||||||
|
(setq age-flags (nconc age-flags (list (buffer-file-name))))
|
||||||
|
(setq agenix--encrypted-fp (buffer-file-name))
|
||||||
|
(setq agenix--keys keys)
|
||||||
|
|
||||||
|
;; Check if file already exists
|
||||||
|
(if (not (file-exists-p (buffer-file-name)))
|
||||||
|
(progn
|
||||||
|
(message "Not decrypting. File %s does not exist and will be created when you \
|
||||||
|
will save this buffer." (buffer-file-name))
|
||||||
|
(read-only-mode -1))
|
||||||
|
(let*
|
||||||
|
((age-res
|
||||||
|
(apply #'agenix--process-exit-code-and-output agenix-age-program age-flags))
|
||||||
|
(age-exit-code (car age-res))
|
||||||
|
(age-output (car (cdr age-res))))
|
||||||
|
|
||||||
|
(if (= 0 age-exit-code)
|
||||||
|
(progn
|
||||||
|
;; Replace buffer with decrypted content
|
||||||
|
(read-only-mode -1)
|
||||||
|
(erase-buffer)
|
||||||
|
(insert age-output)
|
||||||
|
|
||||||
|
;; Mark buffer as not modified
|
||||||
|
(set-buffer-modified-p nil)
|
||||||
|
(setq buffer-undo-list agenix--undo-list))
|
||||||
|
(error age-output))))
|
||||||
|
(when agenix--point
|
||||||
|
(goto-char agenix--point)))))))
|
||||||
|
|
||||||
|
;;;###autoload
|
||||||
|
(defun agenix-save-decrypted (&optional unencrypted-buffer)
|
||||||
|
"Encrypt UNENCRYPTED-BUFFER back to the original .age file.
|
||||||
|
If UNENCRYPTED-BUFFER is unset or nil, use the current buffer."
|
||||||
|
(interactive
|
||||||
|
(when current-prefix-arg
|
||||||
|
(list (read-buffer "Unencrypted buffer: " (current-buffer) t))))
|
||||||
|
(with-current-buffer (or unencrypted-buffer (current-buffer))
|
||||||
|
(let* ((age-flags (list "--encrypt")))
|
||||||
|
(progn
|
||||||
|
(dolist (k agenix--keys)
|
||||||
|
(setq age-flags (nconc age-flags (list "--recipient" k))))
|
||||||
|
(setq age-flags (nconc age-flags (list "-o" agenix--encrypted-fp)))
|
||||||
|
(let* ((decrypted-text (buffer-string))
|
||||||
|
(age-res
|
||||||
|
(agenix--with-temp-buffer
|
||||||
|
(lambda (buf)
|
||||||
|
(list
|
||||||
|
(apply #'call-process-region
|
||||||
|
decrypted-text nil
|
||||||
|
agenix-age-program
|
||||||
|
nil
|
||||||
|
buf
|
||||||
|
t
|
||||||
|
age-flags)
|
||||||
|
(agenix--buffer-string* buf))))))
|
||||||
|
(when (/= 0 (car age-res))
|
||||||
|
(error (car (cdr age-res))))
|
||||||
|
(setq agenix--point (point))
|
||||||
|
(setq agenix--undo-list buffer-undo-list)
|
||||||
|
(revert-buffer :ignore-auto :noconfirm :preserve-modes)
|
||||||
|
(set-buffer-modified-p nil)
|
||||||
|
t)))))
|
||||||
|
|
||||||
|
;;;###autoload
|
||||||
|
(defun agenix-mode-if-with-secrets-nix ()
|
||||||
|
"Enable `agenix-mode' if the current buffer is in a directory with secrets.nix."
|
||||||
|
(interactive)
|
||||||
|
(when (agenix--secrets-nix-path)
|
||||||
|
(agenix-mode)))
|
||||||
|
|
||||||
|
;;;###autoload
|
||||||
|
(add-to-list 'auto-mode-alist '("\\.age\\'" . agenix-mode-if-with-secrets-nix))
|
||||||
|
|
||||||
|
(provide 'agenix)
|
||||||
|
;;; agenix.el ends here
|
||||||
@@ -73,3 +73,10 @@
|
|||||||
(package! doom-nano-modeline
|
(package! doom-nano-modeline
|
||||||
:recipe (:host github
|
:recipe (:host github
|
||||||
:repo "ronisbr/doom-nano-modeline"))
|
:repo "ronisbr/doom-nano-modeline"))
|
||||||
|
|
||||||
|
;; Agenix
|
||||||
|
;; (package! agenix
|
||||||
|
;; :recipe (:host github
|
||||||
|
;; :repo "t4ccer/agenix.el"
|
||||||
|
;; :branch "main"
|
||||||
|
;; :files ("*.el")))
|
||||||
|
|||||||
@@ -1,700 +0,0 @@
|
|||||||
;;; doom-nano-dark-theme.el --- Dark theme for Doom Emacs based on N Λ N O -*- lexical-binding: t; -*-
|
|
||||||
|
|
||||||
;; Copyright (C) 2023 Ronan Arraes Jardim Chagas
|
|
||||||
;;
|
|
||||||
;; This package is the implementation of N Λ N O theme by Nicolas P. Rougier
|
|
||||||
;; <Nicolas.Rougier@inria.fr> using doom-themes framework.
|
|
||||||
;;
|
|
||||||
;; Author : Ronan Arraes Jardim Chagas
|
|
||||||
;; Created : February 2023
|
|
||||||
;; Keywords : mode-line, header-line
|
|
||||||
;; Package-Requires : ((emacs "28") (doom-themes "2"))
|
|
||||||
;; URL : https://github.com/ronisbr/doom-nano-themes/
|
|
||||||
;; Version : 0.2.3
|
|
||||||
;;
|
|
||||||
;;; Usage:
|
|
||||||
;; 1. Copy this file to `~/.doom.d/themes/' or `~/.config/doom/themes/`.
|
|
||||||
;; 2. Load the theme using `(setq doom-theme 'doom-nano-dark)'.
|
|
||||||
;;
|
|
||||||
;;; License:
|
|
||||||
;; Permission is hereby granted, free of charge, to any person obtaining
|
|
||||||
;; a copy of this software and associated documentation files (the
|
|
||||||
;; "Software"), to deal in the Software without restriction, including
|
|
||||||
;; without limitation the rights to use, copy, modify, merge, publish,
|
|
||||||
;; distribute, sublicense, and/or sell copies of the Software, and to
|
|
||||||
;; permit persons to whom the Software is furnished to do so, subject to
|
|
||||||
;; the following conditions:
|
|
||||||
;;
|
|
||||||
;; The above copyright notice and this permission notice shall be
|
|
||||||
;; included in all copies or substantial portions of the Software.
|
|
||||||
;;
|
|
||||||
;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
||||||
;; EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
||||||
;; MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
||||||
;; NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
|
|
||||||
;; FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
||||||
;; TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
|
|
||||||
;; THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
;;
|
|
||||||
;;; Commentary:
|
|
||||||
;; This package provides a dark theme for Doom Emacs based on N Λ N O.
|
|
||||||
|
|
||||||
;;; Code:
|
|
||||||
|
|
||||||
(defgroup doom-nano-dark-theme nil
|
|
||||||
"Options for the `doom-nano-dark' theme."
|
|
||||||
:group 'doom-themes)
|
|
||||||
|
|
||||||
(defcustom doom-nano-dark-theme-highlight-tab-whitespaces nil
|
|
||||||
"If non-nil, the tab whitespaces will be highlighted."
|
|
||||||
:group 'doom-nano-dark-theme
|
|
||||||
:type 'boolean)
|
|
||||||
|
|
||||||
(def-doom-theme doom-nano-dark
|
|
||||||
"A dark theme for Doom Emacs based on N Λ N O."
|
|
||||||
|
|
||||||
(;; Colors defined by N Λ N O theme. Some colors for the 256 and 16 modes were
|
|
||||||
;; obtained from the Doom Nord theme.
|
|
||||||
(nano-foreground '("#ECEFF4" "#ECECEC" "white"))
|
|
||||||
(nano-background '("#2E3440" "#2E2E2E" "black"))
|
|
||||||
(nano-highlight '("#3B4252" "#262626" "brightblack"))
|
|
||||||
(nano-subtle '("#434C5E" "#3F3F3F" "brightblack"))
|
|
||||||
(nano-faded '("#677691" "#5699AF" "cyan"))
|
|
||||||
(nano-salient '("#81A1C1" "#51AFEF" "brightblue"))
|
|
||||||
(nano-strong '("#FFFFFF" "#FFFFFF" "brightwhite"))
|
|
||||||
(nano-popout '("#D08770" "#DD8844" "brightred"))
|
|
||||||
(nano-critical '("#EBCB8B" "#ECBE7B" "yellow"))
|
|
||||||
|
|
||||||
;; Required colors for a Doom theme.
|
|
||||||
(bg nano-background)
|
|
||||||
(fg nano-foreground)
|
|
||||||
|
|
||||||
(bg-alt nano-highlight)
|
|
||||||
(fg-alt nano-foreground)
|
|
||||||
|
|
||||||
(base0 '("#191C25" "black" "black" ))
|
|
||||||
(base1 '("#242832" "#1E1E1E" "brightblack" ))
|
|
||||||
(base2 '("#2C333F" "#2E2E2E" "brightblack" ))
|
|
||||||
(base3 '("#373E4C" "#262626" "brightblack" ))
|
|
||||||
(base4 '("#434C5E" "#3F3F3F" "brightblack" ))
|
|
||||||
(base5 '("#4C566A" "#525252" "brightblack" ))
|
|
||||||
(base6 '("#9099AB" "#6B6B6B" "brightblack" ))
|
|
||||||
(base7 '("#D8DEE9" "#979797" "brightblack" ))
|
|
||||||
(base8 '("#F0F4FC" "#DFDFDF" "white" ))
|
|
||||||
|
|
||||||
(bright-blue '("#BBDEFB" "#BBDEFB" "brightblue"))
|
|
||||||
(bright-cyan '("#B2EBF2" "#B2EBF2" "brightcyan"))
|
|
||||||
(bright-green '("#C8E6C9" "#C8E6C9" "brightgreen"))
|
|
||||||
(bright-magenta '("#E1BEE7" "#E1BEE7" "brightmagenta"))
|
|
||||||
(bright-red '("#FFCDD2" "#FFCDD2" "brightred"))
|
|
||||||
(bright-white nano-background)
|
|
||||||
(bright-yellow '("#FFF9C4" "#FFF9C4" "brightyellow"))
|
|
||||||
|
|
||||||
(blue '("#42A5F5" "#42A5F5" "blue"))
|
|
||||||
(cyan '("#26C6DA" "#26C6DA" "cyan"))
|
|
||||||
(dark-blue '("#A0BCF8" "#A0BCF8" "blue"))
|
|
||||||
(dark-cyan '("#005478" "#005478" "cyan"))
|
|
||||||
(green '("#66BB6A" "#66BB6A" "green"))
|
|
||||||
(grey base4)
|
|
||||||
(magenta '("#AB47BC" "#AB47BC" "magenta"))
|
|
||||||
(orange '("#DA8548" "#DD8844" "brightred"))
|
|
||||||
(red '("#EF5350" "#EF5350" "red"))
|
|
||||||
(teal '("#4DB5BD" "#44B9B1" "brightgreen"))
|
|
||||||
(violet '("#B751B6" "#B751B6" "brightmagenta"))
|
|
||||||
(white nano-subtle)
|
|
||||||
(yellow '("#FFEE58" "#FFEE58" "yellow"))
|
|
||||||
|
|
||||||
(highlight nano-highlight)
|
|
||||||
(vertical-bar nano-background)
|
|
||||||
(selection nano-subtle)
|
|
||||||
(builtin nano-salient)
|
|
||||||
(comments nano-faded)
|
|
||||||
(doc-comments nano-faded)
|
|
||||||
(constants nano-salient)
|
|
||||||
(functions nano-strong)
|
|
||||||
(keywords nano-salient)
|
|
||||||
(methods nano-strong)
|
|
||||||
(operators nano-salient)
|
|
||||||
(type nano-salient)
|
|
||||||
(strings nano-faded)
|
|
||||||
(variables nano-salient)
|
|
||||||
(numbers nano-salient)
|
|
||||||
(region nano-subtle)
|
|
||||||
(error nano-critical)
|
|
||||||
(warning nano-popout)
|
|
||||||
(success nano-salient)
|
|
||||||
(vc-modified nano-popout)
|
|
||||||
(vc-added nano-salient)
|
|
||||||
(vc-deleted nano-faded))
|
|
||||||
|
|
||||||
(;; Overwrite faces set by Doom theme framework.
|
|
||||||
|
|
||||||
;; === Base =================================================================
|
|
||||||
|
|
||||||
(cursor :foreground bg :background fg)
|
|
||||||
(mouse :foreground fg :background bg)
|
|
||||||
|
|
||||||
;; === General ==============================================================
|
|
||||||
|
|
||||||
(buffer-menu-buffer :foreground nano-strong :weight 'bold)
|
|
||||||
(completions-annotations :foreground nano-faded)
|
|
||||||
(completions-common-part :foreground nano-strong :weight 'bold)
|
|
||||||
(completions-first-difference :foreground fg)
|
|
||||||
(fill-column-indicator :foreground nano-subtle)
|
|
||||||
(help-argument-name :foreground nano-faded)
|
|
||||||
(isearch :foreground nano-strong :weight 'bold)
|
|
||||||
(isearch-fail :foreground nano-faded)
|
|
||||||
(lazy-highlight :background nano-subtle)
|
|
||||||
(minibuffer-prompt :foreground nano-strong :weight 'bold)
|
|
||||||
(nobreak-hyphen :foreground nano-popout)
|
|
||||||
(nobreak-space :foreground nano-popout)
|
|
||||||
(read-multiple-choice-face :foreground nano-strong :weight 'bold)
|
|
||||||
(secondary-selection :background nano-subtle)
|
|
||||||
(show-paren-match :foreground nano-strong :weight 'bold)
|
|
||||||
(show-paren-mismatch :foreground nano-critical)
|
|
||||||
(tabulated-list-fake-header :foreground nano-strong :weight 'bold)
|
|
||||||
(tool-bar :foreground bg :background nano-faded)
|
|
||||||
(tooltip :background nano-subtle)
|
|
||||||
(trailing-whitespace :background nano-subtle)
|
|
||||||
|
|
||||||
(whitespace-tab :background
|
|
||||||
(if doom-nano-dark-theme-highlight-tab-whitespaces
|
|
||||||
nano-subtle
|
|
||||||
bg))
|
|
||||||
|
|
||||||
;; === Ace window ===========================================================
|
|
||||||
|
|
||||||
(aw-leading-char-face :foreground nano-popout)
|
|
||||||
(aw-background-face :foreground nano-faded :background bg)
|
|
||||||
|
|
||||||
;; === ANSI colors ==========================================================
|
|
||||||
|
|
||||||
(ansi-color-black :foreground fg)
|
|
||||||
(ansi-color-bold :foreground nano-strong :weight 'bold)
|
|
||||||
(ansi-color-bright-black :foreground nano-strong :weight 'bold)
|
|
||||||
(ansi-color-faint :foreground nano-faded)
|
|
||||||
(ansi-color-fast-blink :foreground nano-faded)
|
|
||||||
(ansi-color-slow-blink :foreground nano-faded)
|
|
||||||
(ansi-color-inverse :foreground bg :background fg)
|
|
||||||
(ansi-color-italic :foreground fg :slant 'italic)
|
|
||||||
(ansi-color-underline :foreground nano-faded)
|
|
||||||
(ansi-color-blue :foreground blue)
|
|
||||||
(ansi-color-bright-blue :foreground bright-blue)
|
|
||||||
(ansi-color-cyan :foreground cyan)
|
|
||||||
(ansi-color-bright-cyan :foreground bright-cyan)
|
|
||||||
(ansi-color-green :foreground green)
|
|
||||||
(ansi-color-bright-green :foreground bright-green)
|
|
||||||
(ansi-color-magenta :foreground magenta)
|
|
||||||
(ansi-color-bright-magenta :foreground bright-magenta)
|
|
||||||
(ansi-color-red :foreground red)
|
|
||||||
(ansi-color-bright-red :foreground bright-red)
|
|
||||||
(ansi-color-white :foreground white)
|
|
||||||
(ansi-color-bright-white :foreground bright-white)
|
|
||||||
(ansi-color-yellow :foreground yellow)
|
|
||||||
(ansi-color-bright-yellow :foreground bright-yellow)
|
|
||||||
|
|
||||||
;; === Buttons ==============================================================
|
|
||||||
|
|
||||||
(button :foreground nano-faded :background nano-highlight :box nil)
|
|
||||||
((custom-button &override) :foreground nano-faded :background nano-highlight :box nil)
|
|
||||||
((custom-button-unraised &override) :foreground nano-faded :background nano-highlight :box nil)
|
|
||||||
((custom-button-mouse &override) :foreground fg :background nano-subtle :box nil)
|
|
||||||
((custom-button-pressed &override) :foreground bg :background fg :box nil)
|
|
||||||
|
|
||||||
;; === Custom edit ==========================================================
|
|
||||||
|
|
||||||
(custom-changed :foreground nano-salient)
|
|
||||||
(custom-comment :foreground nano-faded)
|
|
||||||
(custom-comment-tag :foreground nano-faded)
|
|
||||||
(custom-face-tag :foreground nano-strong :weight 'bold)
|
|
||||||
(custom-group-subtitle :foreground nano-strong :weight 'bold)
|
|
||||||
(custom-group-tag :foreground nano-strong :weight 'bold)
|
|
||||||
(custom-group-tag-1 :foreground nano-strong :weight 'bold)
|
|
||||||
(custom-invalid :foreground nano-popout)
|
|
||||||
(custom-link :foreground nano-salient)
|
|
||||||
(custom-modified :foreground nano-salient)
|
|
||||||
(custom-state :foreground nano-salient)
|
|
||||||
(custom-variable-obsolete :foreground nano-faded)
|
|
||||||
(custom-variable-tag :foreground nano-strong :weight 'bold)
|
|
||||||
(custom-visibility :foreground nano-salient)
|
|
||||||
(widget-button :foreground nano-strong :weight 'bold)
|
|
||||||
(widget-field :background base2)
|
|
||||||
(widget-single-line-field :background base2)
|
|
||||||
|
|
||||||
;; === Company tooltip ======================================================
|
|
||||||
|
|
||||||
(company-scrollbar-bg :foreground bg :background nano-faded)
|
|
||||||
(company-scrollbar-fg :foreground bg :background fg)
|
|
||||||
(company-tooltip :background nano-subtle)
|
|
||||||
(company-tooltip-annotation :foreground fg)
|
|
||||||
(company-tooltip-annotation-selection :background nano-salient)
|
|
||||||
(company-tooltip-common :foreground nano-strong :weight 'bold)
|
|
||||||
(company-tooltip-common-selection :foreground bg :background nano-salient :weight 'normal)
|
|
||||||
(company-tooltip-mouse :foreground bg :background nano-faded)
|
|
||||||
(company-tooltip-scrollbar-thumb :foreground bg :background fg)
|
|
||||||
(company-tooltip-scrollbar-track :foreground bg :foreground nano-faded)
|
|
||||||
(company-tooltip-selection :foreground bg :background nano-salient)
|
|
||||||
|
|
||||||
;; === Diff =================================================================
|
|
||||||
|
|
||||||
(diff-header :foreground nano-faded)
|
|
||||||
(diff-file :foreground nano-strong :weight 'bold)
|
|
||||||
(diff-context :foreground fg)
|
|
||||||
(diff-removed :foreground nano-faded)
|
|
||||||
(diff-changed :foreground nano-popout)
|
|
||||||
(diff-added :foreground nano-salient)
|
|
||||||
(diff-refine-added :foreground nano-salient :weight 'bold)
|
|
||||||
(diff-refine-changed :foreground nano-popout)
|
|
||||||
(diff-refine-removed :foreground nano-faded :strike-through t)
|
|
||||||
|
|
||||||
;; === Doom NANO modeline ===================================================
|
|
||||||
|
|
||||||
(doom-nano-modeline-evil-emacs-state-face :foreground bg :background nano-faded)
|
|
||||||
(doom-nano-modeline-evil-insert-state-face :foreground bg :background nano-popout)
|
|
||||||
(doom-nano-modeline-evil-motion-state-face :foreground bg :background nano-faded)
|
|
||||||
(doom-nano-modeline-evil-normal-state-face :foreground bg :background nano-faded)
|
|
||||||
(doom-nano-modeline-evil-operator-state-face :foreground bg :background nano-faded)
|
|
||||||
(doom-nano-modeline-evil-replace-state-face :foreground bg :background nano-critical)
|
|
||||||
(doom-nano-modeline-evil-visual-state-face :foreground bg :background nano-salient)
|
|
||||||
(doom-nano-modeline-inactive-face :foreground nano-faded :background nano-highlight)
|
|
||||||
|
|
||||||
;; === Evil mode ============================================================
|
|
||||||
|
|
||||||
(evil-snipe-first-match-face :background nano-highlight :weight 'bold)
|
|
||||||
(evil-snipe-matches-face :background nano-subtle)
|
|
||||||
|
|
||||||
;; === Flycheck =============================================================
|
|
||||||
|
|
||||||
(flycheck-posframe-background-face :background nano-subtle)
|
|
||||||
|
|
||||||
;; === Font lock ============================================================
|
|
||||||
|
|
||||||
(font-lock-variable-name-face :foreground nano-salient :weight 'bold)
|
|
||||||
(font-lock-function-name-face :foreground nano-strong :weight 'bold)
|
|
||||||
|
|
||||||
;; === Info =================================================================
|
|
||||||
|
|
||||||
(Info-quoted :foreground nano-faded)
|
|
||||||
(info-header-node :foreground fg)
|
|
||||||
(info-index-match :foreground nano-salient)
|
|
||||||
(info-menu-header :foreground nano-strong :weight 'bold)
|
|
||||||
(info-menu-star :foreground fg)
|
|
||||||
(info-node :foreground nano-strong :weight 'bold)
|
|
||||||
(info-title-1 :foreground nano-strong :weight 'bold)
|
|
||||||
(info-title-2 :foreground nano-strong :weight 'bold)
|
|
||||||
(info-title-3 :foreground nano-strong :weight 'bold)
|
|
||||||
(info-title-4 :foreground nano-strong :weight 'bold)
|
|
||||||
|
|
||||||
;; === Helpful ==============================================================
|
|
||||||
|
|
||||||
(helpful-heading :foreground nano-strong :weight 'bold)
|
|
||||||
|
|
||||||
;; === Highlight indent guides ==============================================
|
|
||||||
|
|
||||||
(highlight-indent-guides-f)
|
|
||||||
|
|
||||||
;; === Hydra ================================================================
|
|
||||||
|
|
||||||
(hydra-face-red :foreground nano-popout :weight 'bold)
|
|
||||||
|
|
||||||
;; === Line numbers =========================================================
|
|
||||||
|
|
||||||
(line-number :foreground nano-faded)
|
|
||||||
(line-number-current-line :foreground fg)
|
|
||||||
(line-number-major-tick :foreground nano-faded)
|
|
||||||
(line-number-minor-tick :foreground nano-faded)
|
|
||||||
|
|
||||||
;; === LSP ==================================================================
|
|
||||||
|
|
||||||
(lsp-face-highlight-textual :background base1)
|
|
||||||
|
|
||||||
;; === Markdown =============================================================
|
|
||||||
|
|
||||||
(markdown-blockquote-face :foreground fg)
|
|
||||||
(markdown-bold-face :foreground nano-strong :weight 'bold)
|
|
||||||
(markdown-code-face :foreground fg)
|
|
||||||
(markdown-comment-face :foreground nano-faded)
|
|
||||||
(markdown-footnote-marker-face :foreground fg)
|
|
||||||
(markdown-footnote-text-face :foreground fg)
|
|
||||||
(markdown-gfm-checkbox-face :foreground fg)
|
|
||||||
(markdown-header-delimiter-face :foreground nano-faded)
|
|
||||||
(markdown-header-face :foreground nano-strong :weight 'bold)
|
|
||||||
(markdown-header-face-1 :foreground nano-strong :weight 'bold)
|
|
||||||
(markdown-header-face-2 :foreground nano-strong :weight 'bold)
|
|
||||||
(markdown-header-face-3 :foreground nano-strong :weight 'bold)
|
|
||||||
(markdown-header-face-4 :foreground nano-strong :weight 'bold)
|
|
||||||
(markdown-header-face-5 :foreground nano-strong :weight 'bold)
|
|
||||||
(markdown-header-face-6 :foreground nano-strong :weight 'bold)
|
|
||||||
(markdown-header-rule-face :foreground fg)
|
|
||||||
(markdown-highlight-face :foreground fg)
|
|
||||||
(markdown-hr-face :foreground fg)
|
|
||||||
(markdown-html-attr-name-face :foreground fg)
|
|
||||||
(markdown-html-attr-value-face :foreground fg)
|
|
||||||
(markdown-html-entity-face :foreground fg)
|
|
||||||
(markdown-html-tag-delimiter-face :foreground fg)
|
|
||||||
(markdown-html-tag-name-face :foreground fg)
|
|
||||||
(markdown-inline-code-face :foreground nano-popout)
|
|
||||||
(markdown-italic-face :foreground nano-faded :slant 'italic)
|
|
||||||
(markdown-language-info-face :foreground fg)
|
|
||||||
(markdown-language-keyword-face :foreground fg)
|
|
||||||
(markdown-line-break-face :foreground fg)
|
|
||||||
(markdown-link-face :foreground nano-salient)
|
|
||||||
(markdown-link-title-face :foreground fg)
|
|
||||||
(markdown-list-face :foreground nano-faded)
|
|
||||||
(markdown-markup-face :foreground nano-faded)
|
|
||||||
(markdown-math-face :foreground fg)
|
|
||||||
(markdown-metadata-key-face :foreground nano-faded)
|
|
||||||
(markdown-metadata-value-face :foreground nano-faded)
|
|
||||||
(markdown-missing-link-face :foreground fg)
|
|
||||||
(markdown-plain-url-face :foreground fg)
|
|
||||||
(markdown-pre-face :foreground nano-popout)
|
|
||||||
(markdown-reference-face :foreground nano-salient)
|
|
||||||
(markdown-strike-through-face :foreground nano-faded)
|
|
||||||
(markdown-table-face :foreground fg)
|
|
||||||
(markdown-url-face :foreground nano-salient)
|
|
||||||
|
|
||||||
;; === Magit ================================================================
|
|
||||||
|
|
||||||
(magit-bisect-bad :foreground fg)
|
|
||||||
(magit-bisect-good :foreground fg)
|
|
||||||
(magit-bisect-skip :foreground fg)
|
|
||||||
(magit-blame-date :foreground fg)
|
|
||||||
(magit-blame-dimmed :foreground fg)
|
|
||||||
(magit-blame-hash :foreground nano-faded)
|
|
||||||
(magit-blame-heading :background nano-subtle :weight 'bold)
|
|
||||||
(magit-blame-highlight :background highlight)
|
|
||||||
(magit-blame-margin :foreground fg)
|
|
||||||
(magit-blame-name :foreground fg)
|
|
||||||
(magit-blame-summary :foreground fg)
|
|
||||||
(magit-branch-current :foreground nano-salient :weight 'bold)
|
|
||||||
(magit-branch-local :foreground nano-salient)
|
|
||||||
(magit-branch-remote :foreground nano-salient)
|
|
||||||
(magit-branch-remote-head :foreground nano-salient)
|
|
||||||
(magit-branch-upstream :foreground nano-salient)
|
|
||||||
(magit-cherry-equivalent :foreground fg)
|
|
||||||
(magit-cherry-unmatched :foreground fg)
|
|
||||||
(magit-diff-added :foreground nano-salient :weight 'bold)
|
|
||||||
(magit-diff-added-highlight :foreground nano-salient :weight 'bold)
|
|
||||||
(magit-diff-base :foreground fg)
|
|
||||||
(magit-diff-base-highlight :background highlight)
|
|
||||||
(magit-diff-conflict-heading :background nano-subtle :weight 'bold)
|
|
||||||
(magit-diff-context :foreground nano-faded)
|
|
||||||
(magit-diff-context-highlight :foreground nano-faded)
|
|
||||||
(magit-diff-file-heading :foreground nano-strong :weight 'bold)
|
|
||||||
(magit-diff-file-heading-highlight :background highlight :weight 'bold)
|
|
||||||
(magit-diff-file-heading-selection :foreground fg)
|
|
||||||
(magit-diff-hunk-heading :background nano-subtle)
|
|
||||||
(magit-diff-hunk-heading-highlight :foreground fg)
|
|
||||||
(magit-diff-hunk-heading-selection :foreground fg)
|
|
||||||
(magit-diff-hunk-region :foreground fg)
|
|
||||||
(magit-diff-lines-boundary :foreground fg)
|
|
||||||
(magit-diff-lines-heading :background nano-subtle :weight 'bold)
|
|
||||||
(magit-diff-our :foreground fg)
|
|
||||||
(magit-diff-our-highlight :background highlight)
|
|
||||||
(magit-diff-removed :foreground nano-popout :weight 'bold)
|
|
||||||
(magit-diff-removed-highlight :foreground nano-popout :weight 'bold)
|
|
||||||
(magit-diff-revision-summary :foreground nano-popout)
|
|
||||||
(magit-diff-revision-summary-highlight :foreground fg)
|
|
||||||
(magit-diff-their :foreground fg)
|
|
||||||
(magit-diff-their-highlight :background highlight)
|
|
||||||
(magit-diff-whitespace-warning :background nano-subtle)
|
|
||||||
(magit-diffstat-added :foreground fg)
|
|
||||||
(magit-diffstat-removed :foreground fg)
|
|
||||||
(magit-dimmed :foreground nano-faded)
|
|
||||||
(magit-filename :foreground fg)
|
|
||||||
(magit-hash :foreground nano-faded)
|
|
||||||
(magit-head :foreground fg)
|
|
||||||
(magit-header-line :foreground fg)
|
|
||||||
(magit-header-line-key :foreground fg)
|
|
||||||
(magit-header-line-log-select :foreground fg)
|
|
||||||
(magit-keyword :foreground nano-salient)
|
|
||||||
(magit-keyword-squash :foreground nano-salient)
|
|
||||||
(magit-log-author :foreground fg)
|
|
||||||
(magit-log-date :foreground fg)
|
|
||||||
(magit-log-graph :foreground fg)
|
|
||||||
(magit-mode-line-process :foreground fg)
|
|
||||||
(magit-mode-line-process-error :foreground nano-critical)
|
|
||||||
(magit-process-ng :foreground fg)
|
|
||||||
(magit-process-ok :foreground fg)
|
|
||||||
(magit-reflog-amend :foreground fg)
|
|
||||||
(magit-reflog-checkout :foreground fg)
|
|
||||||
(magit-reflog-cherry-pick :foreground fg)
|
|
||||||
(magit-reflog-commit :foreground fg)
|
|
||||||
(magit-reflog-merge :foreground fg)
|
|
||||||
(magit-reflog-other :foreground fg)
|
|
||||||
(magit-reflog-rebase :foreground fg)
|
|
||||||
(magit-reflog-remote :foreground fg)
|
|
||||||
(magit-reflog-reset :foreground fg)
|
|
||||||
(magit-refname :foreground fg)
|
|
||||||
(magit-refname-pullreq :foreground fg)
|
|
||||||
(magit-refname-stash :foreground fg)
|
|
||||||
(magit-refname-wip :foreground fg)
|
|
||||||
(magit-section-heading :foreground nano-salient :weight 'bold)
|
|
||||||
(magit-section-heading-selection :foreground fg)
|
|
||||||
(magit-section-highlight :background highlight)
|
|
||||||
(magit-section-secondary-heading :foreground fg)
|
|
||||||
(magit-sequence-done :foreground fg)
|
|
||||||
(magit-sequence-drop :foreground fg)
|
|
||||||
(magit-sequence-exec :foreground fg)
|
|
||||||
(magit-sequence-head :foreground fg)
|
|
||||||
(magit-sequence-onto :foreground fg)
|
|
||||||
(magit-sequence-part :foreground fg)
|
|
||||||
(magit-sequence-pick :foreground fg)
|
|
||||||
(magit-sequence-stop :foreground fg)
|
|
||||||
(magit-signature-bad :foreground fg)
|
|
||||||
(magit-signature-error :foreground fg)
|
|
||||||
(magit-signature-expired :foreground fg)
|
|
||||||
(magit-signature-expired-key :foreground fg)
|
|
||||||
(magit-signature-good :foreground fg)
|
|
||||||
(magit-signature-revoked :foreground fg)
|
|
||||||
(magit-signature-untrusted :foreground fg)
|
|
||||||
(magit-tag :foreground nano-strong)
|
|
||||||
|
|
||||||
;; === Marginalia ===========================================================
|
|
||||||
|
|
||||||
(marginalia-archive :foreground nano-faded)
|
|
||||||
(marginalia-char :foreground nano-faded)
|
|
||||||
(marginalia-date :foreground nano-faded)
|
|
||||||
(marginalia-documentation :foreground nano-faded)
|
|
||||||
(marginalia-file-name :foreground nano-faded)
|
|
||||||
(marginalia-file-owner :foreground nano-faded)
|
|
||||||
(marginalia-file-priv-dir :foreground nano-faded)
|
|
||||||
(marginalia-file-priv-exec :foreground nano-faded)
|
|
||||||
(marginalia-file-priv-link :foreground nano-faded)
|
|
||||||
(marginalia-file-priv-no :foreground nano-faded)
|
|
||||||
(marginalia-file-priv-other :foreground nano-faded)
|
|
||||||
(marginalia-file-priv-rare :foreground nano-faded)
|
|
||||||
(marginalia-file-priv-read :foreground nano-faded)
|
|
||||||
(marginalia-file-priv-write :foreground nano-faded)
|
|
||||||
(marginalia-function :foreground nano-faded)
|
|
||||||
(marginalia-installed :foreground nano-faded)
|
|
||||||
(marginalia-key :foreground nano-faded)
|
|
||||||
(marginalia-lighter :foreground nano-faded)
|
|
||||||
(marginalia-list :foreground nano-faded)
|
|
||||||
(marginalia-mode :foreground nano-faded)
|
|
||||||
(marginalia-modified :foreground nano-faded)
|
|
||||||
(marginalia-null :foreground nano-faded)
|
|
||||||
(marginalia-number :foreground nano-faded)
|
|
||||||
(marginalia-off :foreground nano-faded)
|
|
||||||
(marginalia-on :foreground nano-faded)
|
|
||||||
(marginalia-size :foreground nano-faded)
|
|
||||||
(marginalia-string :foreground nano-faded)
|
|
||||||
(marginalia-symbol :foreground nano-faded)
|
|
||||||
(marginalia-true :foreground nano-faded)
|
|
||||||
(marginalia-type :foreground nano-faded)
|
|
||||||
(marginalia-value :foreground nano-faded)
|
|
||||||
(marginalia-version :foreground nano-faded)
|
|
||||||
|
|
||||||
;; === Message ==============================================================
|
|
||||||
|
|
||||||
(message-cited-text :foreground nano-faded)
|
|
||||||
(message-cited-text-1 :foreground nano-faded)
|
|
||||||
(message-cited-text-2 :foreground nano-faded)
|
|
||||||
(message-cited-text-3 :foreground nano-faded)
|
|
||||||
(message-cited-text-4 :foreground nano-faded)
|
|
||||||
(message-header-cc :foreground fg)
|
|
||||||
(message-header-name :foreground nano-strong :weight 'bold)
|
|
||||||
(message-header-newsgroups :foreground fg)
|
|
||||||
(message-header-other :foreground fg)
|
|
||||||
(message-header-subject :foreground nano-salient)
|
|
||||||
(message-header-to :foreground nano-salient)
|
|
||||||
(message-header-xheader :foreground fg)
|
|
||||||
(message-mml :foreground nano-popout)
|
|
||||||
(message-separator :foreground nano-faded)
|
|
||||||
|
|
||||||
;; === Modeline =============================================================
|
|
||||||
|
|
||||||
(mode-line :foreground fg :background nano-subtle)
|
|
||||||
(mode-line-inactive :foreground nano-strong :background nano-highlight)
|
|
||||||
(mode-line-emphasis :foreground nano-strong :weight 'bold)
|
|
||||||
|
|
||||||
;; === Packages =============================================================
|
|
||||||
|
|
||||||
(package-description :foreground fg)
|
|
||||||
(package-help-section-name :foreground fg)
|
|
||||||
(package-name :foreground nano-salient)
|
|
||||||
(package-status-avail-obso :foreground nano-faded)
|
|
||||||
(package-status-available :foreground fg)
|
|
||||||
(package-status-built-in :foreground nano-salient)
|
|
||||||
(package-status-dependency :foreground nano-salient)
|
|
||||||
(package-status-disabled :foreground nano-faded)
|
|
||||||
(package-status-external :foreground fg)
|
|
||||||
(package-status-held :foreground fg)
|
|
||||||
(package-status-incompat :foreground nano-faded)
|
|
||||||
(package-status-installed :foreground nano-salient)
|
|
||||||
(package-status-new :foreground fg)
|
|
||||||
(package-status-unsigned :foreground fg)
|
|
||||||
|
|
||||||
;; === Orderless ============================================================
|
|
||||||
|
|
||||||
(orderless-match-face-0 :foreground nano-salient :weight 'bold)
|
|
||||||
(orderless-match-face-1 :foreground nano-strong :weight 'bold)
|
|
||||||
(orderless-match-face-2 :foreground nano-strong :weight 'bold)
|
|
||||||
(orderless-match-face-3 :foreground nano-strong :weight 'bold)
|
|
||||||
|
|
||||||
;; === Org mode =============================================================
|
|
||||||
|
|
||||||
(org-archived :foreground nano-faded)
|
|
||||||
(org-block :background highlight)
|
|
||||||
(org-block-begin-line :background nano-subtle :foreground nano-faded)
|
|
||||||
(org-block-end-line :background nano-subtle :foreground nano-faded)
|
|
||||||
(org-checkbox :foreground nano-faded)
|
|
||||||
(org-checkbox-statistics-done :foreground nano-faded)
|
|
||||||
(org-checkbox-statistics-todo :foreground nano-faded)
|
|
||||||
(org-clock-overlay :foreground nano-faded)
|
|
||||||
(org-code :foreground nano-salient)
|
|
||||||
(org-column :foreground nano-faded)
|
|
||||||
(org-column-title :foreground nano-faded)
|
|
||||||
(org-date :foreground nano-faded)
|
|
||||||
(org-date-selected :foreground nano-popout)
|
|
||||||
(org-default :foreground nano-faded)
|
|
||||||
(org-document-info :foreground nano-faded)
|
|
||||||
(org-document-info-keyword :foreground nano-faded)
|
|
||||||
(org-document-title :foreground nano-faded)
|
|
||||||
(org-done :foreground nano-faded)
|
|
||||||
(org-drawer :foreground nano-faded)
|
|
||||||
(org-ellipsis :foreground nano-faded)
|
|
||||||
(org-footnote :foreground nano-faded)
|
|
||||||
(org-formula :foreground nano-faded)
|
|
||||||
(org-headline-done :foreground nano-faded)
|
|
||||||
(org-latex-and-related :foreground nano-faded)
|
|
||||||
(org-level-1 :foreground nano-strong :weight 'bold)
|
|
||||||
(org-level-2 :foreground nano-strong :weight 'bold)
|
|
||||||
(org-level-3 :foreground nano-strong :weight 'bold)
|
|
||||||
(org-level-4 :foreground nano-strong :weight 'bold)
|
|
||||||
(org-level-5 :foreground nano-strong :weight 'bold)
|
|
||||||
(org-level-6 :foreground nano-strong :weight 'bold)
|
|
||||||
(org-level-7 :foreground nano-strong :weight 'bold)
|
|
||||||
(org-level-8 :foreground nano-strong :weight 'bold)
|
|
||||||
(org-link :foreground nano-salient)
|
|
||||||
(org-list-dt :foreground nano-faded)
|
|
||||||
(org-macro :foreground nano-faded)
|
|
||||||
(org-meta-line :foreground nano-faded)
|
|
||||||
(org-mode-line-clock :foreground nano-faded)
|
|
||||||
(org-mode-line-clock-overrun :foreground nano-faded)
|
|
||||||
(org-priority :foreground nano-faded)
|
|
||||||
(org-property-value :foreground nano-faded)
|
|
||||||
(org-quote :foreground nano-faded)
|
|
||||||
(org-scheduled :foreground nano-faded)
|
|
||||||
(org-scheduled-previously :foreground nano-faded)
|
|
||||||
(org-scheduled-today :foreground nano-faded)
|
|
||||||
(org-sexp-date :foreground nano-faded)
|
|
||||||
(org-special-keyword :foreground nano-faded)
|
|
||||||
(org-table :foreground nano-faded)
|
|
||||||
(org-tag :foreground nano-popout)
|
|
||||||
(org-tag-group :foreground nano-faded)
|
|
||||||
(org-target :foreground nano-faded)
|
|
||||||
(org-time-grid :foreground nano-faded)
|
|
||||||
(org-todo :foreground nano-salient)
|
|
||||||
(org-upcoming-deadline :foreground nano-popout)
|
|
||||||
(org-verbatim :foreground nano-popout)
|
|
||||||
(org-verse :foreground nano-faded)
|
|
||||||
(org-warning :foreground nano-popout)
|
|
||||||
|
|
||||||
;; === Org-agenda ===========================================================
|
|
||||||
|
|
||||||
(org-agenda-calendar-event :foreground fg)
|
|
||||||
(org-agenda-calendar-sexp :foreground nano-salient)
|
|
||||||
(org-agenda-clocking :foreground nano-faded)
|
|
||||||
(org-agenda-column-dateline :foreground nano-faded)
|
|
||||||
(org-agenda-current-time :foreground nano-salient :weight 'bold)
|
|
||||||
(org-agenda-date :foreground nano-strong :weight 'bold)
|
|
||||||
(org-agenda-date-today :foreground nano-salient :weight 'bold)
|
|
||||||
(org-agenda-date-weekend :foreground nano-faded)
|
|
||||||
(org-agenda-diary :foreground nano-faded)
|
|
||||||
(org-agenda-dimmed-todo-face :foreground nano-faded)
|
|
||||||
(org-agenda-done :foreground nano-faded)
|
|
||||||
(org-agenda-filter-category :foreground nano-faded)
|
|
||||||
(org-agenda-filter-effort :foreground nano-faded)
|
|
||||||
(org-agenda-filter-regexp :foreground nano-faded)
|
|
||||||
(org-agenda-filter-tags :foreground nano-faded)
|
|
||||||
(org-agenda-property-face :foreground nano-faded)
|
|
||||||
(org-agenda-restriction-lock :foreground nano-faded)
|
|
||||||
(org-agenda-structure :foreground nano-strong :weight 'bold)
|
|
||||||
|
|
||||||
;; === Popup ================================================================
|
|
||||||
|
|
||||||
(popup-face :foreground highlight)
|
|
||||||
(popup-isearch-match :foreground nano-popout)
|
|
||||||
(popup-menu-face :foreground nano-subtle)
|
|
||||||
(popup-menu-mouse-face :foreground bg :background nano-faded)
|
|
||||||
(popup-menu-selection-face :foreground bg :background nano-salient)
|
|
||||||
(popup-menu-summary-face :foreground nano-faded)
|
|
||||||
(popup-scroll-bar-background-face :foreground nano-subtle)
|
|
||||||
(popup-scroll-bar-foreground-face :foreground nano-subtle)
|
|
||||||
(popup-summary-face :foreground nano-faded)
|
|
||||||
(popup-tip-face :foreground bg :background nano-popout)
|
|
||||||
|
|
||||||
;; === Semantics ============================================================
|
|
||||||
|
|
||||||
(match :foreground nano-popout)
|
|
||||||
(shadow :foreground nano-faded)
|
|
||||||
|
|
||||||
;; === smerge ===============================================================
|
|
||||||
|
|
||||||
(smerge-lower :background bg)
|
|
||||||
(smerge-markers :background nano-subtle :weight 'bold :distant-foreground 'unspecified)
|
|
||||||
(smerge-refined-added :foreground nano-salient :weight 'bold)
|
|
||||||
(smerge-refined-changed :foreground nano-popout)
|
|
||||||
(smerge-refined-removed :foreground nano-faded :strike-through t)
|
|
||||||
(smerge-upper :background bg)
|
|
||||||
|
|
||||||
;; === Structural ===========================================================
|
|
||||||
|
|
||||||
(bold :foreground nano-strong :weight 'bold)
|
|
||||||
(bold-italic :foreground nano-strong :weight 'bold)
|
|
||||||
(fixed-pitch :foreground fg)
|
|
||||||
(fixed-pitch-serif :foreground fg)
|
|
||||||
(fringe :foreground nano-faded)
|
|
||||||
(hl-line :background highlight)
|
|
||||||
(italic :foreground nano-faded :slant 'italic)
|
|
||||||
(link :foreground nano-salient)
|
|
||||||
(region :background nano-subtle :distant-foreground 'unspecified)
|
|
||||||
|
|
||||||
;; === Terminal =============================================================
|
|
||||||
|
|
||||||
(term-bold :foreground nano-strong :weight 'bold)
|
|
||||||
(term-color-black :foreground fg)
|
|
||||||
(term-color-blue :foreground blue :background bright-blue)
|
|
||||||
(term-color-cyan :foreground cyan :background bright-cyan)
|
|
||||||
(term-color-green :foreground green :background bright-green)
|
|
||||||
(term-color-magenta :foreground magenta :background bright-magenta)
|
|
||||||
(term-color-red :foreground red :background bright-red)
|
|
||||||
(term-color-yellow :foreground yellow :background bright-yellow)
|
|
||||||
|
|
||||||
;; === Transient ============================================================
|
|
||||||
|
|
||||||
;; Set only faces that influence Magit.
|
|
||||||
(transient-value :foreground fg)
|
|
||||||
|
|
||||||
;; === Vertico ==============================================================
|
|
||||||
|
|
||||||
(vertico-current :background nano-subtle :weight 'bold)
|
|
||||||
(vertico-group-separator :foreground nano-faded)
|
|
||||||
(vertico-group-title :foreground nano-faded)
|
|
||||||
(vertico-multiline :foreground nano-faded)
|
|
||||||
|
|
||||||
;;; === Vterm ===============================================================
|
|
||||||
|
|
||||||
(vterm-color-black :foreground fg :background fg)
|
|
||||||
(vterm-color-blue :foreground blue :background bright-blue)
|
|
||||||
(vterm-color-cyan :foreground cyan :background bright-cyan)
|
|
||||||
(vterm-color-green :foreground green :background bright-green)
|
|
||||||
(vterm-color-magenta :foreground magenta :background bright-magenta)
|
|
||||||
(vterm-color-red :foreground red :background bright-red)
|
|
||||||
(vterm-color-yellow :foreground yellow :background bright-yellow)
|
|
||||||
(vterm-color-white :foreground white :background white)
|
|
||||||
|
|
||||||
;; === Workspaces ===========================================================
|
|
||||||
|
|
||||||
(+workspace-tab-selected-face :foreground nano-salient :weight 'bold)
|
|
||||||
|
|
||||||
;; === Which key ============================================================
|
|
||||||
|
|
||||||
(which-key-command-description-face :foreground fg)
|
|
||||||
(which-key-key-face :foreground nano-strong :weight 'bold)
|
|
||||||
(which-key-key-group-description-face :foreground nano-salient)))
|
|
||||||
|
|
||||||
(provide 'doom-nano-dark-theme)
|
|
||||||
|
|
||||||
;;; doom-nano-dark-theme.el ends here
|
|
||||||
149
config/eww/bars/top-bar.scss
Normal file
149
config/eww/bars/top-bar.scss
Normal file
@@ -0,0 +1,149 @@
|
|||||||
|
*{
|
||||||
|
all: unset;
|
||||||
|
font-family: Iosevka;
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Top bar **/
|
||||||
|
.top-bar {
|
||||||
|
padding-left: 16px;
|
||||||
|
padding-right: 24px;
|
||||||
|
}
|
||||||
|
|
||||||
|
tooltip.background {
|
||||||
|
background-color: $base00;
|
||||||
|
border-radius: 10px;
|
||||||
|
color: $base07;
|
||||||
|
}
|
||||||
|
|
||||||
|
tooltip label {
|
||||||
|
margin: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.module {
|
||||||
|
margin: 0px 0px 0px 0px;
|
||||||
|
border-radius: 0px 0px 0px 0px;
|
||||||
|
padding-left: 8px;
|
||||||
|
padding-right: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon {
|
||||||
|
font-size: 24px;
|
||||||
|
padding-right: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.separator {
|
||||||
|
padding-left: 4px;
|
||||||
|
padding-right: 4px;
|
||||||
|
color: $base02;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Bluetooth **/
|
||||||
|
.bluetooth {
|
||||||
|
color: $base0D;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bluetooth.icon {
|
||||||
|
padding-right: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bluetooth-text {
|
||||||
|
padding-left: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Wifi **/
|
||||||
|
.wifi {
|
||||||
|
color: $base0D;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wifi.icon {
|
||||||
|
padding-right: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wifi-text {
|
||||||
|
padding-left: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Volume **/
|
||||||
|
.volume {
|
||||||
|
color: $base0A;
|
||||||
|
}
|
||||||
|
|
||||||
|
.volume-mute {
|
||||||
|
color: $base04;
|
||||||
|
}
|
||||||
|
|
||||||
|
.volume-bar {
|
||||||
|
padding-left: 8px;
|
||||||
|
highlight {
|
||||||
|
background-color: $base0A;
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
trough {
|
||||||
|
background-color: $base04;
|
||||||
|
min-height: 10px;
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Battery **/
|
||||||
|
.battery.charging {
|
||||||
|
color: $base0B;
|
||||||
|
}
|
||||||
|
|
||||||
|
.battery.discharging {
|
||||||
|
padding-right: 0px;
|
||||||
|
color: $base04;
|
||||||
|
}
|
||||||
|
|
||||||
|
.battery-bar {
|
||||||
|
padding-left: 8px;
|
||||||
|
progress {
|
||||||
|
background-color: $base0B;
|
||||||
|
border-radius: 10px;
|
||||||
|
min-height: 10px;
|
||||||
|
}
|
||||||
|
trough {
|
||||||
|
background-color: $base04;
|
||||||
|
border-radius: 10px;
|
||||||
|
min-height: 10px;
|
||||||
|
min-width: 60px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Clock **/
|
||||||
|
.clock {
|
||||||
|
color: $base05;
|
||||||
|
}
|
||||||
|
|
||||||
|
.clock-time {
|
||||||
|
padding-left: 4px;
|
||||||
|
padding-right: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.clock-date {
|
||||||
|
padding-left: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.clock-year {
|
||||||
|
padding-bottom: 8px;
|
||||||
|
font-size: 75%;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Workspaces **/
|
||||||
|
|
||||||
|
.workspace-entry {
|
||||||
|
padding-left: 8px;
|
||||||
|
padding-right: 8px;
|
||||||
|
}
|
||||||
|
.workspace-entry.occupied {
|
||||||
|
color: $base06;
|
||||||
|
}
|
||||||
|
|
||||||
|
.workspace-entry.empty {
|
||||||
|
color: $base02;
|
||||||
|
}
|
||||||
|
|
||||||
|
.workspace-entry.current {
|
||||||
|
color: $base0C;
|
||||||
|
}
|
||||||
44
config/eww/bars/top-bar.yuck
Normal file
44
config/eww/bars/top-bar.yuck
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
(include "./widgets/common.yuck")
|
||||||
|
|
||||||
|
(include "./widgets/battery.yuck")
|
||||||
|
(include "./widgets/bluetooth.yuck")
|
||||||
|
(include "./widgets/clock.yuck")
|
||||||
|
(include "./widgets/volume.yuck")
|
||||||
|
(include "./widgets/workspaces.yuck")
|
||||||
|
(include "./widgets/wifi.yuck")
|
||||||
|
|
||||||
|
(defwindow top-bar
|
||||||
|
:monitor 0
|
||||||
|
:geometry (geometry :x "0%"
|
||||||
|
:y "8px"
|
||||||
|
:width "100%"
|
||||||
|
:height "40px"
|
||||||
|
:anchor "top center")
|
||||||
|
:stacking "fg"
|
||||||
|
:exclusive "true"
|
||||||
|
(box :class "top-bar"
|
||||||
|
:orientation "h"
|
||||||
|
:space-evenly "true"
|
||||||
|
(bar-left)
|
||||||
|
(bar-center)
|
||||||
|
(bar-right)))
|
||||||
|
|
||||||
|
(defwidget bar-left []
|
||||||
|
(box :halign "start"
|
||||||
|
:orientation "h"
|
||||||
|
(workspaces-module)))
|
||||||
|
|
||||||
|
(defwidget bar-center []
|
||||||
|
(box :halign "center"
|
||||||
|
:orientation "h"))
|
||||||
|
|
||||||
|
(defwidget bar-right []
|
||||||
|
(box :halign "end"
|
||||||
|
:orientation "h"
|
||||||
|
:space-evenly "false"
|
||||||
|
(bluetooth-module)
|
||||||
|
(wifi-module)
|
||||||
|
(battery-module)
|
||||||
|
(volume-module)
|
||||||
|
(sep)
|
||||||
|
(clock-module)))
|
||||||
2
config/eww/eww.scss
Normal file
2
config/eww/eww.scss
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
@import './colour-scheme.scss'
|
||||||
|
@import './bars/top-bar.scss'
|
||||||
1
config/eww/eww.yuck
Normal file
1
config/eww/eww.yuck
Normal file
@@ -0,0 +1 @@
|
|||||||
|
(include "./bars/top-bar.yuck")
|
||||||
6
config/eww/scripts/get-active-workspace.sh
Normal file
6
config/eww/scripts/get-active-workspace.sh
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
hyprctl monitors -j | jq '.[] | select(.focused) | .activeWorkspace.id'
|
||||||
|
|
||||||
|
socat -u UNIX-CONNECT:$XDG_RUNTIME_DIR/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock - |
|
||||||
|
stdbuf -o0 awk -F '>>|,' -e '/^workspace>>/ {print $2}' -e '/^focusedmon>>/ {print $3}'
|
||||||
7
config/eww/scripts/get-volume-info.sh
Normal file
7
config/eww/scripts/get-volume-info.sh
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
#!/bin/env bash
|
||||||
|
|
||||||
|
amixer sget Master | \
|
||||||
|
grep 'Left:' | \
|
||||||
|
sed -e 's/[^[]*\[\([0-9]*\)%\][^[]\[\(\w*\)\]/{"volume": \1, "muted": \2}/' \
|
||||||
|
-e 's/on/false/' \
|
||||||
|
-e 's/off/true/'
|
||||||
8
config/eww/scripts/get-wifi-info.sh
Normal file
8
config/eww/scripts/get-wifi-info.sh
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/env bash
|
||||||
|
|
||||||
|
CONN_INFO=$(nmcli -g in-use,ssid,signal dev wifi list | \
|
||||||
|
grep "^*" | \
|
||||||
|
sed -e 's/\*:\([^:]*\):\([0-9]*\)/ ,"ssid": "\1", "signal": \2/')
|
||||||
|
CONNECTED=$([[ -z $CONN_INFO ]] && echo "false" || echo "true")
|
||||||
|
|
||||||
|
echo "{\"connected\": \"$CONNECTED\"$CONN_INFO}"
|
||||||
11
config/eww/scripts/get-workspaces.sh
Normal file
11
config/eww/scripts/get-workspaces.sh
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
#!/bin/env bash
|
||||||
|
|
||||||
|
spaces (){
|
||||||
|
WORKSPACE_WINDOWS=$(hyprctl workspaces -j | jq 'map({key: .id | tostring, value: .windows}) | from_entries')
|
||||||
|
seq 1 6 | jq --argjson windows "${WORKSPACE_WINDOWS}" --slurp -Mc 'map(tostring) | map({id: ., windows: ($windows[.]//0)})'
|
||||||
|
}
|
||||||
|
|
||||||
|
spaces
|
||||||
|
socat -u UNIX-CONNECT:$XDG_RUNTIME_DIR/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock - | while read -r line; do
|
||||||
|
spaces
|
||||||
|
done
|
||||||
21
config/eww/widgets/battery.yuck
Normal file
21
config/eww/widgets/battery.yuck
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
(defvar battery-reveal false)
|
||||||
|
|
||||||
|
(defwidget battery-module []
|
||||||
|
(eventbox :onhover "${EWW_CMD} update battery-reveal=true"
|
||||||
|
:onhoverlost "${EWW_CMD} update battery-reveal=false"
|
||||||
|
(box :class "module battery ${EWW_BATTERY.BAT0.status == "Discharging" ? "discharging" : "charging"}"
|
||||||
|
:orientation "h"
|
||||||
|
:space-evenly "false"
|
||||||
|
:tooltip "Battery: ${EWW_BATTERY.BAT0.capacity}%"
|
||||||
|
(label :text {EWW_BATTERY.BAT0.status == "Discharging" ?
|
||||||
|
EWW_BATTERY.BAT0.capacity < 10 ? "" : EWW_BATTERY.BAT0.capacity < 30 ? "" : EWW_BATTERY.BAT0.capacity < 70 ? "" : "" :
|
||||||
|
EWW_BATTERY.BAT0.capacity < 10 ? "" : EWW_BATTERY.BAT0.capacity < 30 ? "" : EWW_BATTERY.BAT0.capacity < 70 ? "" : ""}
|
||||||
|
:class "battery icon")
|
||||||
|
(revealer :transition "slideleft"
|
||||||
|
:duration "750ms"
|
||||||
|
:reveal {battery-reveal}
|
||||||
|
(progress :class "battery-bar"
|
||||||
|
:orientation "h"
|
||||||
|
:valign "center"
|
||||||
|
:width 60
|
||||||
|
:value {EWW_BATTERY.BAT0.capacity})))))
|
||||||
29
config/eww/widgets/bluetooth.yuck
Normal file
29
config/eww/widgets/bluetooth.yuck
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
(defvar bluetooth-reveal false)
|
||||||
|
(defpoll bluetooth-status
|
||||||
|
:initial ""
|
||||||
|
:interval "10s"
|
||||||
|
"bluetoothctl show | grep -q \"Powered: yes\" && { [[ $(bluetoothctl devices Connected) ]] && echo \"connected\" || echo \"on\"; } || echo \"off\"")
|
||||||
|
(defpoll bluetooth-devices
|
||||||
|
:initial ""
|
||||||
|
:interval "20s"
|
||||||
|
"for device in $(bluetoothctl devices Connected | grep Device | cut -d ' ' -f 2); do bluetoothctl info $device | grep \"Alias\" | cut -d ' ' -f 2-; done;")
|
||||||
|
|
||||||
|
|
||||||
|
(defwidget bluetooth-module []
|
||||||
|
(eventbox :onhover "${EWW_CMD} update bluetooth-reveal=true"
|
||||||
|
:onhoverlost "${EWW_CMD} update bluetooth-reveal=false"
|
||||||
|
:onclick "$HOME/.config/rofi/menus/bluetooth/bluetooth.sh &"
|
||||||
|
(box :class "module bluetooth"
|
||||||
|
:orientation "h"
|
||||||
|
:space-evenly "false"
|
||||||
|
:tooltip {bluetooth-status == "connected" ? bluetooth-devices :
|
||||||
|
bluetooth-status == "on" ? "Bluetooth: On" : "Bluetooth: Off"}
|
||||||
|
(label :text {bluetooth-status == "connected" ? "" :
|
||||||
|
bluetooth-status == "on" ? "" : ""}
|
||||||
|
:class "bluetooth icon")
|
||||||
|
(revealer :transition "slideleft"
|
||||||
|
:duration "750ms"
|
||||||
|
:reveal {bluetooth-reveal && winfo.connected}
|
||||||
|
(label :class "bluetooth-text"
|
||||||
|
:text {bluetooth-status == "connected" ? "Connected" :
|
||||||
|
bluetooth-status == "on" ? "On" : "Off"})))))
|
||||||
21
config/eww/widgets/clock.yuck
Normal file
21
config/eww/widgets/clock.yuck
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
(defpoll clock-time :interval "1s" "date +\"%H:%M:%S\"")
|
||||||
|
(defpoll clock-date :interval "1m" "date +\"%d/%m\"")
|
||||||
|
(defpoll clock-year :interval "1h" "date +\"%Y\"")
|
||||||
|
(defvar date-reveal false)
|
||||||
|
|
||||||
|
(defwidget clock-module []
|
||||||
|
(eventbox :onhover "${EWW_CMD} update date-reveal=true"
|
||||||
|
:onhoverlost "${EWW_CMD} update date-reveal=false"
|
||||||
|
(box :class "module clock"
|
||||||
|
:orientation "h"
|
||||||
|
:space-evenly "false"
|
||||||
|
(label :text clock-time
|
||||||
|
:class "clock-time")
|
||||||
|
(revealer :transition "slideleft"
|
||||||
|
:duration "750ms"
|
||||||
|
:reveal {date-reveal}
|
||||||
|
(box :orientation "h"
|
||||||
|
(label :text clock-date
|
||||||
|
:class "clock-date")
|
||||||
|
(label :text clock-year
|
||||||
|
:class "clock-year"))))))
|
||||||
3
config/eww/widgets/common.yuck
Normal file
3
config/eww/widgets/common.yuck
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
(defwidget sep []
|
||||||
|
(label :text "|"
|
||||||
|
:class "separator"))
|
||||||
26
config/eww/widgets/volume.yuck
Normal file
26
config/eww/widgets/volume.yuck
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
(defpoll vinfo
|
||||||
|
:initial "{\"volume\": 0, \"muted\": false}"
|
||||||
|
:interval "1s"
|
||||||
|
"bash ~/.config/eww/scripts/get-volume-info.sh")
|
||||||
|
(defvar volume-reveal false)
|
||||||
|
|
||||||
|
(defwidget volume-module []
|
||||||
|
(eventbox :onhover "${EWW_CMD} update volume-reveal=true"
|
||||||
|
:onhoverlost "${EWW_CMD} update volume-reveal=false"
|
||||||
|
(box :class "module volume"
|
||||||
|
:orientation "h"
|
||||||
|
:space-evenly false
|
||||||
|
:tooltip {vinfo.muted? "muted" : "Volume: ${vinfo.volume}%"}
|
||||||
|
(label :text {vinfo.muted ? "" : vinfo.volume < 10 ? "" : vinfo.volume < 70 ? "" : ""}
|
||||||
|
:class "volume icon ${vinfo.muted ? "volume-mute" : ""}")
|
||||||
|
(revealer :transition "slideleft"
|
||||||
|
:duration "750ms"
|
||||||
|
:reveal {volume-reveal && !vinfo.muted}
|
||||||
|
(scale :class "volume-bar"
|
||||||
|
:orientation "h"
|
||||||
|
:valign "center"
|
||||||
|
:width 60
|
||||||
|
:min 0
|
||||||
|
:max 101
|
||||||
|
:value {vinfo.volume}
|
||||||
|
:onchange "amixer sset Master {}% > /dev/null")))))
|
||||||
25
config/eww/widgets/wifi.yuck
Normal file
25
config/eww/widgets/wifi.yuck
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
(defvar wifi-reveal false)
|
||||||
|
(defpoll winfo
|
||||||
|
:initial "{\"connected\": \"false\"}"
|
||||||
|
:interval "10s"
|
||||||
|
"bash ~/.config/eww/scripts/get-wifi-info.sh")
|
||||||
|
|
||||||
|
|
||||||
|
(defwidget wifi-module []
|
||||||
|
(eventbox :onhover "${EWW_CMD} update wifi-reveal=true"
|
||||||
|
:onhoverlost "${EWW_CMD} update wifi-reveal=false"
|
||||||
|
:onclick "$HOME/.config/rofi/menus/wifi/wifi.sh &"
|
||||||
|
(box :class "module wifi"
|
||||||
|
:orientation "h"
|
||||||
|
:space-evenly "false"
|
||||||
|
:tooltip {winfo.connected ? "Signal: ${winfo.signal}%" : "Disconnected"}
|
||||||
|
(label :text { !winfo.connected ? "" :
|
||||||
|
winfo.signal < 25 ? "" :
|
||||||
|
winfo.signal < 50 ? "" :
|
||||||
|
winfo.signal < 75 ? "" : ""}
|
||||||
|
:class "wifi icon")
|
||||||
|
(revealer :transition "slideleft"
|
||||||
|
:duration "750ms"
|
||||||
|
:reveal {wifi-reveal && winfo.connected}
|
||||||
|
(label :class "wifi-text"
|
||||||
|
:text {winfo.connected ? winfo.ssid : "Disconnected"})))))
|
||||||
10
config/eww/widgets/workspaces.yuck
Normal file
10
config/eww/widgets/workspaces.yuck
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
(deflisten workspaces :initial "[]" "bash ~/.config/eww/scripts/get-workspaces.sh")
|
||||||
|
(deflisten current_workspace :initial "1" "bash ~/.config/eww/scripts/get-active-workspace.sh")
|
||||||
|
(defwidget workspaces-module []
|
||||||
|
(box :space-evenly true
|
||||||
|
(label :text "${workspaces}${current_workspace}"
|
||||||
|
:visible false)
|
||||||
|
(for workspace in workspaces
|
||||||
|
(eventbox :onclick "hyprctl dispatch workspace ${workspace.id}"
|
||||||
|
(label :text "${workspace.id == current_workspace ? "" : ""}"
|
||||||
|
:class "workspace-entry ${workspace.id == current_workspace ? "current" : ""} ${workspace.windows > 0 ? "occupied" : "empty"}")))))
|
||||||
72
config/grapheio/scripts/brightness.sh
Executable file
72
config/grapheio/scripts/brightness.sh
Executable file
@@ -0,0 +1,72 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Dependencies:
|
||||||
|
# - amixer
|
||||||
|
# - pactl
|
||||||
|
# - jq
|
||||||
|
# - libnotify
|
||||||
|
|
||||||
|
ACTION=$1
|
||||||
|
|
||||||
|
get_brightness() {
|
||||||
|
brightnessctl | \
|
||||||
|
grep "Current brightness" | \
|
||||||
|
sed -e 's/^\s\+Current brightness: [0-9]\+ (\([0-9]\+\)%).*$/\1/'
|
||||||
|
}
|
||||||
|
|
||||||
|
get_kb_brightness() {
|
||||||
|
brightnessctl -d platform::kbd_backlight | \
|
||||||
|
grep "Current brightness" | \
|
||||||
|
sed -e 's/^\s\+Current brightness: [0-9]\+ (\([0-9]\+\)%).*$/\1/'
|
||||||
|
}
|
||||||
|
|
||||||
|
notify() {
|
||||||
|
notify-send "$1" "$2" -e -t 1500 -h string:x-canonical-private-synchronous:brightness
|
||||||
|
}
|
||||||
|
|
||||||
|
set_brightness() {
|
||||||
|
# Set the brightness
|
||||||
|
TARGET=$1
|
||||||
|
brightnessctl set $TARGET > /dev/null
|
||||||
|
|
||||||
|
# Send a notification
|
||||||
|
BRIGHTNESS=$(get_brightness)
|
||||||
|
ACTION=$([[ ${TARGET:0:1} == "+" ]] && echo "Brightness Up" || echo "Brightness Down")
|
||||||
|
|
||||||
|
BRIGHTNESS_ICON=""
|
||||||
|
|
||||||
|
TITLE=$(echo "$BRIGHTNESS_ICON $ACTION")
|
||||||
|
BODY=$(echo "$BRIGHTNESS%")
|
||||||
|
notify "$TITLE" "$BODY"
|
||||||
|
}
|
||||||
|
|
||||||
|
set_kb_brightness() {
|
||||||
|
# Set the brightness
|
||||||
|
TARGET=$1
|
||||||
|
brightnessctl -d platform::kbd_backlight set $TARGET > /dev/null
|
||||||
|
|
||||||
|
# Send a notification
|
||||||
|
BRIGHTNESS=$(get_kb_brightness)
|
||||||
|
ACTION=$([[ ${TARGET:0:1} == "+" ]] && echo "Keyboard brightness Up" || echo "Keyboard brightness Down")
|
||||||
|
|
||||||
|
BRIGHTNESS_ICON=""
|
||||||
|
|
||||||
|
TITLE=$(echo "$BRIGHTNESS_ICON $ACTION")
|
||||||
|
BODY=$(echo "$BRIGHTNESS%")
|
||||||
|
notify "$TITLE" "$BODY"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
case $ACTION in
|
||||||
|
set)
|
||||||
|
set_brightness $2
|
||||||
|
;;
|
||||||
|
kb_set)
|
||||||
|
set_kb_brightness $2
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Unknown action"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
27
config/grapheio/scripts/screenshot.sh
Executable file
27
config/grapheio/scripts/screenshot.sh
Executable file
@@ -0,0 +1,27 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Dependencies:
|
||||||
|
# - slurp
|
||||||
|
# - grim
|
||||||
|
|
||||||
|
ACTION=$1
|
||||||
|
|
||||||
|
DATESTAMP=$(date +"%Y%m%d%H%M%S")
|
||||||
|
OUT_DIR="${HOME}/screenshots"
|
||||||
|
OUT_FILE="capture-${ACTION}-${DATESTAMP}.png"
|
||||||
|
|
||||||
|
case $ACTION in
|
||||||
|
region)
|
||||||
|
[[ ! -d "${OUT_DIR}" ]] && mkdir $OUT_DIR
|
||||||
|
slurp | grim -t png -g - "${OUT_DIR}/${OUT_FILE}"
|
||||||
|
;;
|
||||||
|
screen)
|
||||||
|
[[ ! -d "${OUT_DIR}" ]] && mkdir $OUT_DIR
|
||||||
|
grim -t png "${OUT_DIR}/${OUT_FILE}"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Unknown action"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
79
config/grapheio/scripts/volume.sh
Executable file
79
config/grapheio/scripts/volume.sh
Executable file
@@ -0,0 +1,79 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Dependencies:
|
||||||
|
# - amixer
|
||||||
|
# - pactl
|
||||||
|
# - jq
|
||||||
|
# - libnotify
|
||||||
|
|
||||||
|
ACTION=$1
|
||||||
|
|
||||||
|
get_volume_info() {
|
||||||
|
amixer sget Master | \
|
||||||
|
grep 'Left:' | \
|
||||||
|
sed -e 's/[^[]*\[\([0-9]*\)%\][^[]\[\(\w*\)\]/{"volume": \1, "muted": \2}/' \
|
||||||
|
-e 's/on/false/' \
|
||||||
|
-e 's/off/true/'
|
||||||
|
}
|
||||||
|
|
||||||
|
notify() {
|
||||||
|
notify-send "$1" "$2" -e -t 1500 -h string:x-canonical-private-synchronous:volume
|
||||||
|
}
|
||||||
|
|
||||||
|
mute() {
|
||||||
|
pactl set-sink-mute @DEFAULT_SINK@ toggle
|
||||||
|
|
||||||
|
VOLUME_INFO=$(get_volume_info)
|
||||||
|
VOLUME=$(echo $VOLUME_INFO | jq .volume)
|
||||||
|
if [ $(echo $VOLUME_INFO | jq .muted) == "true" ]
|
||||||
|
then
|
||||||
|
AUDIO_ICON=""
|
||||||
|
MUTED_STR="Muted"
|
||||||
|
BODY=""
|
||||||
|
else
|
||||||
|
AUDIO_ICON=""
|
||||||
|
MUTED_STR="Unmuted"
|
||||||
|
BODY=$(echo "$VOLUME%")
|
||||||
|
fi
|
||||||
|
|
||||||
|
TITLE=$(echo "$AUDIO_ICON $MUTED_STR")
|
||||||
|
notify "$TITLE" "$BODY"
|
||||||
|
}
|
||||||
|
|
||||||
|
set_volume() {
|
||||||
|
# Set the volume
|
||||||
|
TARGET=$1
|
||||||
|
pactl set-sink-volume @DEFAULT_SINK@ $TARGET
|
||||||
|
|
||||||
|
# Send a notification
|
||||||
|
VOLUME_INFO=$(get_volume_info)
|
||||||
|
ACTION=$([[ ${TARGET:0:1} == "+" ]] && echo "Volume Up" || echo "Volume Down")
|
||||||
|
VOLUME=$(echo $VOLUME_INFO | jq .volume)
|
||||||
|
|
||||||
|
if [ $(echo $VOLUME_INFO | jq .muted) == "true" ]
|
||||||
|
then
|
||||||
|
AUDIO_ICON=""
|
||||||
|
MUTED_STR="[muted]"
|
||||||
|
else
|
||||||
|
AUDIO_ICON=""
|
||||||
|
MUTED_STR=""
|
||||||
|
fi
|
||||||
|
|
||||||
|
TITLE=$(echo "$AUDIO_ICON $ACTION")
|
||||||
|
BODY=$(echo "$VOLUME% $MUTED_STR")
|
||||||
|
notify "$TITLE" "$BODY"
|
||||||
|
}
|
||||||
|
|
||||||
|
case $ACTION in
|
||||||
|
mute)
|
||||||
|
mute
|
||||||
|
;;
|
||||||
|
set)
|
||||||
|
set_volume $2
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Unknown action"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
70
config/kanata/kanata.kbd
Normal file
70
config/kanata/kanata.kbd
Normal file
@@ -0,0 +1,70 @@
|
|||||||
|
(defcfg
|
||||||
|
linux-dev-names-exclude (
|
||||||
|
"ZSA Technology Labs Voyager"
|
||||||
|
"ZSA Technology Labs Voyager Consumer Control"
|
||||||
|
"ZSA Technology Labs Voyager Keyboard"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
(deflocalkeys-linux
|
||||||
|
ImpPt 99
|
||||||
|
º 41
|
||||||
|
' 12
|
||||||
|
¡ 13
|
||||||
|
` 26
|
||||||
|
+ 27
|
||||||
|
ñ 39
|
||||||
|
´ 40
|
||||||
|
ç 43
|
||||||
|
< 86
|
||||||
|
- 53
|
||||||
|
)
|
||||||
|
|
||||||
|
(defsrc
|
||||||
|
esc f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 ins ImpPt del home end pgup pgdn
|
||||||
|
º 1 2 3 4 5 6 7 8 9 0 ' ¡ Backspace nlck kp/ kp* kp-
|
||||||
|
tab q w e r t y u i o p ` + kp7 kp8 kp9
|
||||||
|
caps a s d f g h j k l ñ ´ ç ret kp4 kp5 kp6 kp+
|
||||||
|
lsft < z x c v b n m , . - rsft kp1 kp2 kp3
|
||||||
|
lctl lmet lalt spc ralt rctl up kp0 kp. kprt
|
||||||
|
left down rght
|
||||||
|
)
|
||||||
|
|
||||||
|
(defvar
|
||||||
|
tap-time 200
|
||||||
|
hold-time 250
|
||||||
|
)
|
||||||
|
|
||||||
|
(defalias
|
||||||
|
caps (tap-hold $tap-time $hold-time caps (layer-while-held layer1))
|
||||||
|
a (tap-hold $tap-time $hold-time a lalt)
|
||||||
|
s (tap-hold $tap-time $hold-time s lsft)
|
||||||
|
d (tap-hold $tap-time $hold-time d lmet)
|
||||||
|
f (tap-hold $tap-time $hold-time f lctl)
|
||||||
|
g (tap-hold $tap-time $hold-time g (layer-while-held layer1))
|
||||||
|
h (tap-hold $tap-time $hold-time h rctl)
|
||||||
|
j (tap-hold $tap-time $hold-time j rmet)
|
||||||
|
k (tap-hold $tap-time $hold-time k rsft)
|
||||||
|
l (tap-hold $tap-time $hold-time l ralt)
|
||||||
|
)
|
||||||
|
|
||||||
|
(deflayer base
|
||||||
|
esc mute vold volu - brdn brup - - - - - - ins ImpPt del home end pgup pgdn
|
||||||
|
º 1 2 3 4 5 6 7 8 9 0 ' ¡ Backspace nlck kp/ kp* kp-
|
||||||
|
tab q w e r t y u i o p ` + kp7 kp8 kp9
|
||||||
|
@caps @a @s @d @f @g @h @j @k @l ñ ´ ç ret kp4 kp5 kp6 kp+
|
||||||
|
lsft < z x c v b n m , . - rsft kp1 kp2 kp3
|
||||||
|
lctl lmet lalt spc ralt rctl up kp0 kp. kprt
|
||||||
|
left down rght
|
||||||
|
)
|
||||||
|
|
||||||
|
(deflayer layer1
|
||||||
|
_ f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 _ _ _ _ _ _ _
|
||||||
|
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
|
||||||
|
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
|
||||||
|
_ _ _ _ _ _ left down up right _ _ _ _ _ _ _ _
|
||||||
|
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
|
||||||
|
_ _ _ _ _ _ _ _ _ _
|
||||||
|
_ _ _
|
||||||
|
)
|
||||||
13
config/nomad.d/client.json
Normal file
13
config/nomad.d/client.json
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
"client": {
|
||||||
|
"enabled": true,
|
||||||
|
"network_interface": "tailscale0",
|
||||||
|
|
||||||
|
"options": {
|
||||||
|
"docker.volumes.enabled": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"consul": {
|
||||||
|
"address": "127.0.0.1:8500"
|
||||||
|
}
|
||||||
|
}
|
||||||
11
config/nomad.d/common.json
Normal file
11
config/nomad.d/common.json
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"datacenter": "samfelag",
|
||||||
|
|
||||||
|
"bind_addr": "{{ GetInterfaceIP \"tailscale0\" }}",
|
||||||
|
|
||||||
|
"advertise": {
|
||||||
|
"http": "{{ GetInterfaceIP \"tailscale0\" }}",
|
||||||
|
"rpc": "{{ GetInterfaceIP \"tailscale0\" }}",
|
||||||
|
"serf": "{{ GetInterfaceIP \"tailscale0\" }}"
|
||||||
|
}
|
||||||
|
}
|
||||||
10
config/nomad.d/host-reykjavik.json
Normal file
10
config/nomad.d/host-reykjavik.json
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"client": {
|
||||||
|
"host_volume": {
|
||||||
|
"test": {
|
||||||
|
"path": "/mnt/raid1/nomad_volumes/nextcloud/nextcloud",
|
||||||
|
"read_only": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
40
config/nomad.d/host-thingvellir.hcl
Normal file
40
config/nomad.d/host-thingvellir.hcl
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
client {
|
||||||
|
# --- Network ---
|
||||||
|
|
||||||
|
host_network "public" {
|
||||||
|
interface = "ens3"
|
||||||
|
}
|
||||||
|
|
||||||
|
# --- Volumes ---
|
||||||
|
# DNS
|
||||||
|
host_volume "dns-pihole" {
|
||||||
|
path = "/var/lib/nomad_volumes/dns/pihole/etc-pihole"
|
||||||
|
read_only = false
|
||||||
|
}
|
||||||
|
host_volume "dns-dnsmasq" {
|
||||||
|
path = "/var/lib/nomad_volumes/dns/pihole/etc-dnsmasq.d"
|
||||||
|
read_only = false
|
||||||
|
}
|
||||||
|
|
||||||
|
# Caddy
|
||||||
|
host_volume "caddyfile" {
|
||||||
|
path = "/var/lib/nomad_volumes/caddy/Caddyfile"
|
||||||
|
read_only = false
|
||||||
|
}
|
||||||
|
host_volume "caddy-data" {
|
||||||
|
path = "/var/lib/nomad_volumes/caddy/data"
|
||||||
|
read_only = false
|
||||||
|
}
|
||||||
|
|
||||||
|
# Gitea
|
||||||
|
host_volume "gitea" {
|
||||||
|
path = "/mnt/vatnajokull/nomad_volumes/gitea/data"
|
||||||
|
read_only = false
|
||||||
|
}
|
||||||
|
|
||||||
|
# Folkugat
|
||||||
|
host_volume "folkugat" {
|
||||||
|
path = "/var/lib/nomad_volumes/folkugat"
|
||||||
|
read_only = false
|
||||||
|
}
|
||||||
|
}
|
||||||
6
config/nomad.d/server.json
Normal file
6
config/nomad.d/server.json
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"server": {
|
||||||
|
"enabled": true,
|
||||||
|
"bootstrap_expect": 1
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
|
|
||||||
@import "../../theme.rasi"
|
@import "~/.config/rofi/theme.rasi"
|
||||||
|
|
||||||
/*****----- Configuration -----*****/
|
/*****----- Configuration -----*****/
|
||||||
configuration {
|
configuration {
|
||||||
|
|||||||
147
config/rofi/menus/cliphist/cliphist.rasi
Executable file
147
config/rofi/menus/cliphist/cliphist.rasi
Executable file
@@ -0,0 +1,147 @@
|
|||||||
|
/**
|
||||||
|
*
|
||||||
|
* Author : Marc Sastre, based on Aditya Shakya (adi1090x, Github : @adi1090x)
|
||||||
|
*
|
||||||
|
**/
|
||||||
|
|
||||||
|
@import "~/.config/rofi/theme.rasi"
|
||||||
|
|
||||||
|
/*****----- Configuration -----*****/
|
||||||
|
configuration {
|
||||||
|
show-icons: false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*****----- Main Window -----*****/
|
||||||
|
window {
|
||||||
|
/* properties for window widget */
|
||||||
|
transparency: "real";
|
||||||
|
location: center;
|
||||||
|
anchor: center;
|
||||||
|
fullscreen: false;
|
||||||
|
width: 800px;
|
||||||
|
x-offset: 0px;
|
||||||
|
y-offset: 0px;
|
||||||
|
|
||||||
|
/* properties for all widgets */
|
||||||
|
enabled: true;
|
||||||
|
margin: 0px;
|
||||||
|
padding: 0px;
|
||||||
|
border: 2px solid;
|
||||||
|
border-radius: 15px;
|
||||||
|
border-color: @background-alt;
|
||||||
|
cursor: "default";
|
||||||
|
background-color: @background;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*****----- Main Box -----*****/
|
||||||
|
mainbox {
|
||||||
|
enabled: true;
|
||||||
|
spacing: 15px;
|
||||||
|
margin: 0px;
|
||||||
|
padding: 30px;
|
||||||
|
border: 0px solid;
|
||||||
|
border-radius: 0px;
|
||||||
|
border-color: @selected;
|
||||||
|
background-color: transparent;
|
||||||
|
children: [ "inputbar", "listview" ];
|
||||||
|
}
|
||||||
|
message {
|
||||||
|
enabled: true;
|
||||||
|
margin: 0px;
|
||||||
|
padding: 10px;
|
||||||
|
border: 0px solid;
|
||||||
|
border-radius: 10px;
|
||||||
|
border-color: @selected;
|
||||||
|
background-color: @background-alt;
|
||||||
|
text-color: @foreground;
|
||||||
|
}
|
||||||
|
textbox {
|
||||||
|
background-color: inherit;
|
||||||
|
text-color: inherit;
|
||||||
|
vertical-align: 0.5;
|
||||||
|
horizontal-align: 0.0;
|
||||||
|
placeholder-color: @foreground;
|
||||||
|
blink: true;
|
||||||
|
markup: true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*****----- Inputbar -----*****/
|
||||||
|
inputbar {
|
||||||
|
enabled: true;
|
||||||
|
spacing: 10px;
|
||||||
|
padding: 15px;
|
||||||
|
border-radius: 10px;
|
||||||
|
background-color: @background-alt;
|
||||||
|
text-color: @foreground;
|
||||||
|
children: [ "textbox-prompt-colon", "entry" ];
|
||||||
|
}
|
||||||
|
textbox-prompt-colon {
|
||||||
|
enabled: true;
|
||||||
|
expand: false;
|
||||||
|
str: "";
|
||||||
|
background-color: inherit;
|
||||||
|
text-color: inherit;
|
||||||
|
}
|
||||||
|
entry {
|
||||||
|
enabled: true;
|
||||||
|
background-color: inherit;
|
||||||
|
text-color: inherit;
|
||||||
|
cursor: text;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*****----- Listview -----*****/
|
||||||
|
listview {
|
||||||
|
enabled: true;
|
||||||
|
columns: 1;
|
||||||
|
lines: 5;
|
||||||
|
cycle: true;
|
||||||
|
dynamic: true;
|
||||||
|
scrollbar: false;
|
||||||
|
layout: vertical;
|
||||||
|
reverse: false;
|
||||||
|
fixed-height: true;
|
||||||
|
fixed-columns: true;
|
||||||
|
|
||||||
|
spacing: 5px;
|
||||||
|
margin: 0px;
|
||||||
|
padding: 0px;
|
||||||
|
border: 0px solid;
|
||||||
|
border-radius: 0px;
|
||||||
|
border-color: @selected;
|
||||||
|
background-color: transparent;
|
||||||
|
text-color: @foreground;
|
||||||
|
cursor: "default";
|
||||||
|
}
|
||||||
|
|
||||||
|
/*****----- Elements -----*****/
|
||||||
|
element {
|
||||||
|
enabled: true;
|
||||||
|
spacing: 0px;
|
||||||
|
margin: 0px;
|
||||||
|
padding: 12px;
|
||||||
|
border: 0px solid;
|
||||||
|
border-radius: 100%;
|
||||||
|
border-color: @selected;
|
||||||
|
background-color: transparent;
|
||||||
|
text-color: @foreground;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
element-text {
|
||||||
|
background-color: transparent;
|
||||||
|
text-color: inherit;
|
||||||
|
cursor: inherit;
|
||||||
|
vertical-align: 0.5;
|
||||||
|
horizontal-align: 0.0;
|
||||||
|
}
|
||||||
|
element selected.normal {
|
||||||
|
background-color: var(selected);
|
||||||
|
text-color: var(background);
|
||||||
|
}
|
||||||
|
element active {
|
||||||
|
background-color: var(active);
|
||||||
|
text-color: var(background);
|
||||||
|
}
|
||||||
|
element selected.active {
|
||||||
|
background-color: var(selected);
|
||||||
|
text-color: var(background);
|
||||||
|
}
|
||||||
12
config/rofi/menus/cliphist/cliphist.sh
Executable file
12
config/rofi/menus/cliphist/cliphist.sh
Executable file
@@ -0,0 +1,12 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# For debugging/development purposes
|
||||||
|
# PREFIX=projects/samfelag/config/
|
||||||
|
|
||||||
|
# Rofi command to pipe into, can add any options here
|
||||||
|
dir="$HOME/$PREFIX.config/rofi/menus/cliphist/"
|
||||||
|
theme='cliphist'
|
||||||
|
|
||||||
|
rofi_command="rofi -dmenu -i -theme ${dir}/${theme}.rasi"
|
||||||
|
|
||||||
|
cliphist list | $rofi_command | cliphist decode | wl-copy
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
|
|
||||||
@import "../../theme.rasi"
|
@import "~/.config/rofi/theme.rasi"
|
||||||
|
|
||||||
/*****----- Configuration -----*****/
|
/*****----- Configuration -----*****/
|
||||||
configuration {
|
configuration {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
|
|
||||||
@import "../../theme.rasi"
|
@import "~/.config/rofi/theme.rasi"
|
||||||
|
|
||||||
/*****----- Configuration -----*****/
|
/*****----- Configuration -----*****/
|
||||||
configuration {
|
configuration {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
|
|
||||||
@import "../../theme.rasi"
|
@import "~/.config/rofi/theme.rasi"
|
||||||
|
|
||||||
/*****----- Configuration -----*****/
|
/*****----- Configuration -----*****/
|
||||||
configuration {
|
configuration {
|
||||||
|
|||||||
@@ -58,14 +58,10 @@ run_cmd() {
|
|||||||
elif [[ $1 == '--suspend' ]]; then
|
elif [[ $1 == '--suspend' ]]; then
|
||||||
systemctl suspend
|
systemctl suspend
|
||||||
elif [[ $1 == '--logout' ]]; then
|
elif [[ $1 == '--logout' ]]; then
|
||||||
if [[ "$DESKTOP_SESSION" == 'openbox' ]]; then
|
if [[ "$DESKTOP_SESSION" == 'i3' ]]; then
|
||||||
openbox --exit
|
|
||||||
elif [[ "$DESKTOP_SESSION" == 'bspwm' ]]; then
|
|
||||||
bspc quit
|
|
||||||
elif [[ "$DESKTOP_SESSION" == 'i3' ]]; then
|
|
||||||
i3-msg exit
|
i3-msg exit
|
||||||
elif [[ "$DESKTOP_SESSION" == 'plasma' ]]; then
|
elif [[ ! -z $HYPRLAND_INSTANCE_SIGNATURE ]]; then
|
||||||
qdbus org.kde.ksmserver /KSMServer logout 0 0 0
|
hyprctl dispatch exit
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
@@ -85,8 +81,8 @@ case ${chosen} in
|
|||||||
$lock)
|
$lock)
|
||||||
if command -v i3lock-color; then
|
if command -v i3lock-color; then
|
||||||
i3lock-color -c 808F85 && sleep 1
|
i3lock-color -c 808F85 && sleep 1
|
||||||
# elif command -v betterlockscreen; then
|
elif command -v hyprlock; then
|
||||||
# betterlockscreen -l
|
hyprlock
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
$suspend)
|
$suspend)
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
|
|
||||||
@import "../../theme.rasi"
|
@import "~/.config/rofi/theme.rasi"
|
||||||
|
|
||||||
/*****----- Configuration -----*****/
|
/*****----- Configuration -----*****/
|
||||||
configuration {
|
configuration {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
[[ -x "$(command -v eza)" ]] && {
|
[[ -x "$(command -v eza)" ]] && {
|
||||||
alias ll="eza --group-directories-first --color=auto --git -la"
|
alias ll="eza --group-directories-first --color=auto --icons=auto --git -la"
|
||||||
} || {
|
} || {
|
||||||
alias ll="ls -alh --color=always --group-directories-first"
|
alias ll="ls -alh --color=always --group-directories-first"
|
||||||
}
|
}
|
||||||
|
|||||||
1
config/shell/zsh/003-p10k-fix.zsh
Normal file
1
config/shell/zsh/003-p10k-fix.zsh
Normal file
@@ -0,0 +1 @@
|
|||||||
|
unset ZSH_AUTOSUGGEST_USE_ASYNC
|
||||||
1
config/shell/zsh/004-zoxide.zsh
Normal file
1
config/shell/zsh/004-zoxide.zsh
Normal file
@@ -0,0 +1 @@
|
|||||||
|
[[ -x "$(command -v zoxide)" ]] && eval "$(zoxide init --cmd cd zsh)"
|
||||||
1723
config/zsh/.p10k.zsh
1723
config/zsh/.p10k.zsh
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
description = "Development flake for this python project";
|
description = "Development flake for this python project";
|
||||||
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
|
||||||
inputs.flake-utils.url = "github:numtide/flake-utils";
|
inputs.flake-utils.url = "github:numtide/flake-utils";
|
||||||
|
|
||||||
outputs = { self, nixpkgs, flake-utils }:
|
outputs = { self, nixpkgs, flake-utils }:
|
||||||
@@ -8,8 +8,8 @@
|
|||||||
|
|
||||||
pkgs = nixpkgs.legacyPackages.${system};
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
|
|
||||||
python = pkgs.python39;
|
python = pkgs.python312;
|
||||||
pythonPackages = pkgs.python39Packages;
|
pythonPackages = pkgs.python312Packages;
|
||||||
|
|
||||||
projectDependencies = with pythonPackages; [
|
projectDependencies = with pythonPackages; [
|
||||||
];
|
];
|
||||||
8
data/devenv/templates/rust/Cargo.toml
Normal file
8
data/devenv/templates/rust/Cargo.toml
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
[package]
|
||||||
|
name = ""
|
||||||
|
version = "0.1.0"
|
||||||
|
edition = "2021"
|
||||||
|
|
||||||
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
100
data/nomad/caddy.nomad
Normal file
100
data/nomad/caddy.nomad
Normal file
@@ -0,0 +1,100 @@
|
|||||||
|
job "caddy" {
|
||||||
|
region = "global"
|
||||||
|
datacenters = ["samfelag"]
|
||||||
|
type = "service"
|
||||||
|
|
||||||
|
group "caddy" {
|
||||||
|
count = 1
|
||||||
|
|
||||||
|
volume "caddyfile" {
|
||||||
|
type = "host"
|
||||||
|
read_only = false
|
||||||
|
source = "caddyfile"
|
||||||
|
}
|
||||||
|
|
||||||
|
volume "caddy-data" {
|
||||||
|
type = "host"
|
||||||
|
read_only = false
|
||||||
|
source = "caddy-data"
|
||||||
|
}
|
||||||
|
|
||||||
|
restart {
|
||||||
|
attempts = 2
|
||||||
|
interval = "2m"
|
||||||
|
delay = "1m"
|
||||||
|
mode = "fail"
|
||||||
|
}
|
||||||
|
|
||||||
|
network {
|
||||||
|
port "http" {
|
||||||
|
static = 80
|
||||||
|
to = 80
|
||||||
|
host_network = "public"
|
||||||
|
}
|
||||||
|
|
||||||
|
port "https" {
|
||||||
|
static = 443
|
||||||
|
to = 443
|
||||||
|
host_network = "public"
|
||||||
|
}
|
||||||
|
|
||||||
|
port "config" {
|
||||||
|
static = 2019
|
||||||
|
to = 2019
|
||||||
|
}
|
||||||
|
|
||||||
|
dns {
|
||||||
|
servers = ["100.80.195.56"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
###
|
||||||
|
# CADDY
|
||||||
|
###
|
||||||
|
|
||||||
|
task "caddy" {
|
||||||
|
driver = "docker"
|
||||||
|
|
||||||
|
volume_mount {
|
||||||
|
volume = "caddyfile"
|
||||||
|
destination = "/etc/caddy/Caddyfile"
|
||||||
|
read_only = false
|
||||||
|
}
|
||||||
|
|
||||||
|
volume_mount {
|
||||||
|
volume = "caddy-data"
|
||||||
|
destination = "/data"
|
||||||
|
read_only = false
|
||||||
|
}
|
||||||
|
|
||||||
|
env {
|
||||||
|
}
|
||||||
|
|
||||||
|
config {
|
||||||
|
image = "caddy:2.3.0-alpine"
|
||||||
|
ports = ["http", "https", "config"]
|
||||||
|
volumes = [
|
||||||
|
"/mnt/vatnajokull/lajuntament-web:/sites/lajuntament-web",
|
||||||
|
"/mnt/vatnajokull/folkugat-web:/sites/folkugat-web",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
resources {
|
||||||
|
cpu = 500
|
||||||
|
memory = 128
|
||||||
|
}
|
||||||
|
|
||||||
|
service {
|
||||||
|
name = "caddy"
|
||||||
|
|
||||||
|
check {
|
||||||
|
type = "tcp"
|
||||||
|
port = "http"
|
||||||
|
interval = "30s"
|
||||||
|
timeout = "2s"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
112
data/nomad/dns.nomad
Normal file
112
data/nomad/dns.nomad
Normal file
@@ -0,0 +1,112 @@
|
|||||||
|
job "dns" {
|
||||||
|
region = "global"
|
||||||
|
datacenters = ["samfelag"]
|
||||||
|
type = "service"
|
||||||
|
|
||||||
|
group "dns" {
|
||||||
|
count = 1
|
||||||
|
|
||||||
|
restart {
|
||||||
|
attempts = 10
|
||||||
|
delay = "15s"
|
||||||
|
}
|
||||||
|
|
||||||
|
# VOLUMES
|
||||||
|
## pihole
|
||||||
|
|
||||||
|
volume "pihole" {
|
||||||
|
type = "host"
|
||||||
|
read_only = false
|
||||||
|
source = "dns-pihole"
|
||||||
|
}
|
||||||
|
|
||||||
|
volume "dnsmasq" {
|
||||||
|
type = "host"
|
||||||
|
read_only = false
|
||||||
|
source = "dns-dnsmasq"
|
||||||
|
}
|
||||||
|
|
||||||
|
## unbound
|
||||||
|
|
||||||
|
volume "unbound" {
|
||||||
|
type = "host"
|
||||||
|
read_only = false
|
||||||
|
source = "dns-unbound"
|
||||||
|
}
|
||||||
|
|
||||||
|
# NETWORK
|
||||||
|
|
||||||
|
network {
|
||||||
|
port "dns" {
|
||||||
|
static = 53
|
||||||
|
}
|
||||||
|
port "http" {
|
||||||
|
to = 80
|
||||||
|
}
|
||||||
|
port "unbound" {
|
||||||
|
static = 5533
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# TASKS
|
||||||
|
|
||||||
|
task "pihole" {
|
||||||
|
driver = "docker"
|
||||||
|
|
||||||
|
volume_mount {
|
||||||
|
volume = "pihole"
|
||||||
|
destination = "/etc/pihole"
|
||||||
|
read_only = false
|
||||||
|
}
|
||||||
|
|
||||||
|
volume_mount {
|
||||||
|
volume = "dnsmasq"
|
||||||
|
destination = "/etc/dnsmasq.d"
|
||||||
|
read_only = false
|
||||||
|
}
|
||||||
|
|
||||||
|
env {
|
||||||
|
TZ = "Europe/Amsterdam"
|
||||||
|
WEBPASSWORD = "elbonfeix"
|
||||||
|
ServerIP = "100.80.195.56"
|
||||||
|
}
|
||||||
|
|
||||||
|
config {
|
||||||
|
image = "pihole/pihole:v5.7"
|
||||||
|
ports = ["dns", "http"]
|
||||||
|
}
|
||||||
|
|
||||||
|
resources {
|
||||||
|
cpu = 100
|
||||||
|
memory = 32
|
||||||
|
}
|
||||||
|
|
||||||
|
service {
|
||||||
|
name = "pihole-gui"
|
||||||
|
port = "http"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
task "unbound" {
|
||||||
|
driver = "docker"
|
||||||
|
|
||||||
|
volume_mount {
|
||||||
|
volume = "unbound"
|
||||||
|
destination = "/opt/unbound/etc/unbound/"
|
||||||
|
read_only = false
|
||||||
|
}
|
||||||
|
|
||||||
|
config {
|
||||||
|
image = "mvance/unbound:latest"
|
||||||
|
ports = ["unbound"]
|
||||||
|
}
|
||||||
|
|
||||||
|
resources {
|
||||||
|
cpu = 50
|
||||||
|
memory = 32
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
62
data/nomad/folkugat.nomad
Normal file
62
data/nomad/folkugat.nomad
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
job "folkugat" {
|
||||||
|
region = "global"
|
||||||
|
datacenters = ["samfelag"]
|
||||||
|
type = "service"
|
||||||
|
|
||||||
|
group "folkugat" {
|
||||||
|
count = 1
|
||||||
|
|
||||||
|
restart {
|
||||||
|
attempts = 5
|
||||||
|
delay = "15s"
|
||||||
|
}
|
||||||
|
|
||||||
|
network {
|
||||||
|
port "http" {
|
||||||
|
to = 80
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# Volumes
|
||||||
|
|
||||||
|
volume "folkugat" {
|
||||||
|
type = "host"
|
||||||
|
read_only = false
|
||||||
|
source = "folkugat"
|
||||||
|
}
|
||||||
|
|
||||||
|
# FOLKUGAT WEB
|
||||||
|
task "folkugat" {
|
||||||
|
driver = "docker"
|
||||||
|
|
||||||
|
env {
|
||||||
|
JWT_SECRET = "12345"
|
||||||
|
ADMIN_PASSWORD = "banshee"
|
||||||
|
URL_SCHEME = "https"
|
||||||
|
DB_DIR = "/folkugat/db"
|
||||||
|
}
|
||||||
|
|
||||||
|
config {
|
||||||
|
image = "marc.sastre.cat/folkugat-web:latest"
|
||||||
|
ports = ["http"]
|
||||||
|
}
|
||||||
|
|
||||||
|
volume_mount {
|
||||||
|
volume = "folkugat"
|
||||||
|
destination = "/folkugat/db"
|
||||||
|
read_only = false
|
||||||
|
}
|
||||||
|
|
||||||
|
resources {
|
||||||
|
cpu = 100
|
||||||
|
memory = 512
|
||||||
|
}
|
||||||
|
|
||||||
|
service {
|
||||||
|
name = "folkugat"
|
||||||
|
port = "http"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
71
data/nomad/gitea.nomad
Normal file
71
data/nomad/gitea.nomad
Normal file
@@ -0,0 +1,71 @@
|
|||||||
|
job "gitea" {
|
||||||
|
region = "global"
|
||||||
|
datacenters = ["samfelag"]
|
||||||
|
type = "service"
|
||||||
|
|
||||||
|
group "gitea" {
|
||||||
|
count = 1
|
||||||
|
|
||||||
|
restart {
|
||||||
|
attempts = 5
|
||||||
|
delay = "1m"
|
||||||
|
}
|
||||||
|
|
||||||
|
network {
|
||||||
|
port "http" {
|
||||||
|
to = 3000
|
||||||
|
}
|
||||||
|
port "ssh" {
|
||||||
|
static = 2222
|
||||||
|
to = 22
|
||||||
|
host_network = "public"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
task "gitea" {
|
||||||
|
driver = "docker"
|
||||||
|
|
||||||
|
env {
|
||||||
|
USER_UID = "1001"
|
||||||
|
USER_GID = "1001"
|
||||||
|
}
|
||||||
|
|
||||||
|
config {
|
||||||
|
image = "gitea/gitea:latest"
|
||||||
|
ports = ["http", "ssh"]
|
||||||
|
volumes = ["/mnt/vatnajokull/nomad_volumes/gitea/data:/data"]
|
||||||
|
}
|
||||||
|
|
||||||
|
resources {
|
||||||
|
cpu = 1000
|
||||||
|
memory = 400
|
||||||
|
}
|
||||||
|
|
||||||
|
service {
|
||||||
|
name = "gitea"
|
||||||
|
port = "http"
|
||||||
|
|
||||||
|
check {
|
||||||
|
type = "tcp"
|
||||||
|
port = "http"
|
||||||
|
interval = "30s"
|
||||||
|
timeout = "2s"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
service {
|
||||||
|
name = "gitea-ssh"
|
||||||
|
port = "ssh"
|
||||||
|
|
||||||
|
check {
|
||||||
|
type = "tcp"
|
||||||
|
port = "ssh"
|
||||||
|
interval = "30s"
|
||||||
|
timeout = "2s"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
188
data/nomad/nextcloud.nomad
Normal file
188
data/nomad/nextcloud.nomad
Normal file
@@ -0,0 +1,188 @@
|
|||||||
|
job "nextcloud" {
|
||||||
|
region = "global"
|
||||||
|
datacenters = ["samfelag"]
|
||||||
|
type = "service"
|
||||||
|
|
||||||
|
group "nextcloud" {
|
||||||
|
count = 1
|
||||||
|
|
||||||
|
restart {
|
||||||
|
attempts = 5
|
||||||
|
delay = "1m"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Network
|
||||||
|
|
||||||
|
network {
|
||||||
|
port "nextcloud" {
|
||||||
|
static = 8080
|
||||||
|
to = 80
|
||||||
|
}
|
||||||
|
port "mariadb" {
|
||||||
|
static = 3306
|
||||||
|
to = 3306
|
||||||
|
}
|
||||||
|
# port "collabora" {
|
||||||
|
# to = 9980
|
||||||
|
# }
|
||||||
|
}
|
||||||
|
|
||||||
|
# Volumes
|
||||||
|
|
||||||
|
volume "nextcloud" {
|
||||||
|
type = "host"
|
||||||
|
read_only = false
|
||||||
|
source = "nextcloud"
|
||||||
|
}
|
||||||
|
|
||||||
|
volume "mariadb" {
|
||||||
|
type = "host"
|
||||||
|
read_only = false
|
||||||
|
source = "mariadb"
|
||||||
|
}
|
||||||
|
|
||||||
|
# volume "collabora" {
|
||||||
|
# type = "host"
|
||||||
|
# read_only = false
|
||||||
|
# source = "collabora"
|
||||||
|
# }
|
||||||
|
|
||||||
|
###
|
||||||
|
# NEXTCLOUD
|
||||||
|
###
|
||||||
|
|
||||||
|
task "nextcloud" {
|
||||||
|
driver = "docker"
|
||||||
|
|
||||||
|
user = 1001
|
||||||
|
|
||||||
|
env {
|
||||||
|
MYSQL_PASSWORD = "hxKOD13MUh"
|
||||||
|
MYSQL_DATABASE = "nextcloud"
|
||||||
|
MYSQL_USER = "nextcloud"
|
||||||
|
MYSQL_HOST = "${NOMAD_ADDR_mariadb}"
|
||||||
|
NEXTCLOUD_TRUSTED_DOMAINS = "nextcloud.samfelag.xyz"
|
||||||
|
OVERWRITEPROTOCOL = "https"
|
||||||
|
}
|
||||||
|
|
||||||
|
volume_mount {
|
||||||
|
volume = "nextcloud"
|
||||||
|
destination = "/var/www/html"
|
||||||
|
read_only = false
|
||||||
|
}
|
||||||
|
|
||||||
|
config {
|
||||||
|
image = "nextcloud:latest"
|
||||||
|
ports = ["nextcloud"]
|
||||||
|
}
|
||||||
|
|
||||||
|
resources {
|
||||||
|
cpu = 2000
|
||||||
|
memory = 512
|
||||||
|
}
|
||||||
|
|
||||||
|
service {
|
||||||
|
name = "nextcloud"
|
||||||
|
port = "nextcloud"
|
||||||
|
|
||||||
|
check {
|
||||||
|
type = "tcp"
|
||||||
|
port = "nextcloud"
|
||||||
|
interval = "30s"
|
||||||
|
timeout = "2s"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
###
|
||||||
|
# MARIADB
|
||||||
|
###
|
||||||
|
|
||||||
|
task "mariadb" {
|
||||||
|
driver = "docker"
|
||||||
|
|
||||||
|
user = 1001
|
||||||
|
|
||||||
|
env {
|
||||||
|
MYSQL_ROOT_PASSWORD = "hxKOD13MUh"
|
||||||
|
MYSQL_ROOT_HOST = "${NOMAD_IP_mariadb}"
|
||||||
|
MYSQL_PASSWORD = "hxKOD13MUh"
|
||||||
|
MYSQL_DATABASE = "nextcloud"
|
||||||
|
MYSQL_USER = "nextcloud"
|
||||||
|
}
|
||||||
|
|
||||||
|
volume_mount {
|
||||||
|
volume = "mariadb"
|
||||||
|
destination = "/var/lib/mysql"
|
||||||
|
read_only = false
|
||||||
|
}
|
||||||
|
|
||||||
|
config {
|
||||||
|
image = "mariadb:10.5"
|
||||||
|
ports = ["mariadb"]
|
||||||
|
}
|
||||||
|
|
||||||
|
resources {
|
||||||
|
cpu = 1000
|
||||||
|
memory = 256
|
||||||
|
}
|
||||||
|
|
||||||
|
service {
|
||||||
|
name = "mariadb"
|
||||||
|
tags = ["mariadb"]
|
||||||
|
|
||||||
|
port = "mariadb"
|
||||||
|
|
||||||
|
check {
|
||||||
|
type = "tcp"
|
||||||
|
port = "mariadb"
|
||||||
|
interval = "30s"
|
||||||
|
timeout = "2s"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
###
|
||||||
|
# COLLABORA
|
||||||
|
###
|
||||||
|
|
||||||
|
# task "collabora" {
|
||||||
|
# driver = "docker"
|
||||||
|
|
||||||
|
# env {
|
||||||
|
# aliasgroup1 = "https://nextcloud.lajuntament.space:443"
|
||||||
|
# username = "lajuntament"
|
||||||
|
# password = "eLn1lIm4rc"
|
||||||
|
# }
|
||||||
|
|
||||||
|
# volume_mount {
|
||||||
|
# volume = "collabora"
|
||||||
|
# destination = "/etc/loolwsd"
|
||||||
|
# read_only = false
|
||||||
|
# }
|
||||||
|
|
||||||
|
# config {
|
||||||
|
# image = "collabora/code:latest"
|
||||||
|
# ports = ["collabora"]
|
||||||
|
# }
|
||||||
|
|
||||||
|
# resources {
|
||||||
|
# cpu = 2000
|
||||||
|
# memory = 1024
|
||||||
|
# }
|
||||||
|
|
||||||
|
# service {
|
||||||
|
# name = "collabora"
|
||||||
|
# port = "collabora"
|
||||||
|
|
||||||
|
# check {
|
||||||
|
# type = "tcp"
|
||||||
|
# port = "collabora"
|
||||||
|
# interval = "30s"
|
||||||
|
# timeout = "2s"
|
||||||
|
# }
|
||||||
|
# }
|
||||||
|
|
||||||
|
# }
|
||||||
|
}
|
||||||
|
}
|
||||||
67
data/nomad/old/collabora.nomad
Normal file
67
data/nomad/old/collabora.nomad
Normal file
@@ -0,0 +1,67 @@
|
|||||||
|
job "collabora" {
|
||||||
|
region = "global"
|
||||||
|
datacenters = ["samfelag"]
|
||||||
|
type = "service"
|
||||||
|
|
||||||
|
group "collabora" {
|
||||||
|
count = 1
|
||||||
|
|
||||||
|
restart {
|
||||||
|
attempts = 5
|
||||||
|
delay = "1m"
|
||||||
|
}
|
||||||
|
|
||||||
|
network {
|
||||||
|
port "http" {
|
||||||
|
to = 9980
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
volume "collabora" {
|
||||||
|
type = "host"
|
||||||
|
read_only = false
|
||||||
|
source = "collabora"
|
||||||
|
}
|
||||||
|
|
||||||
|
task "collabora" {
|
||||||
|
driver = "docker"
|
||||||
|
|
||||||
|
env {
|
||||||
|
domain = "nextcloud\\.lajuntament\\.space"
|
||||||
|
username = "lajuntament"
|
||||||
|
password = "eLn1lIm4rc"
|
||||||
|
extra_params = "--o:ssl.enable=false"
|
||||||
|
}
|
||||||
|
|
||||||
|
volume_mount {
|
||||||
|
volume = "collabora"
|
||||||
|
destination = "/etc/loolwsd"
|
||||||
|
read_only = false
|
||||||
|
}
|
||||||
|
|
||||||
|
config {
|
||||||
|
image = "collabora/code:latest"
|
||||||
|
ports = ["http"]
|
||||||
|
}
|
||||||
|
|
||||||
|
resources {
|
||||||
|
cpu = 1500
|
||||||
|
memory = 1024
|
||||||
|
}
|
||||||
|
|
||||||
|
service {
|
||||||
|
name = "collabora"
|
||||||
|
port = "http"
|
||||||
|
|
||||||
|
check {
|
||||||
|
type = "tcp"
|
||||||
|
port = "http"
|
||||||
|
interval = "30s"
|
||||||
|
timeout = "2s"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
46
data/nomad/old/cua-quinto.nomad
Normal file
46
data/nomad/old/cua-quinto.nomad
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
job "cua-quinto" {
|
||||||
|
region = "global"
|
||||||
|
datacenters = ["samfelag"]
|
||||||
|
type = "service"
|
||||||
|
|
||||||
|
group "cua-quinto" {
|
||||||
|
count = 1
|
||||||
|
|
||||||
|
restart {
|
||||||
|
attempts = 5
|
||||||
|
delay = "15s"
|
||||||
|
}
|
||||||
|
|
||||||
|
network {
|
||||||
|
port "http" {
|
||||||
|
to = 80
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# CUA-QUINTO APP
|
||||||
|
task "cua-quinto" {
|
||||||
|
driver = "docker"
|
||||||
|
|
||||||
|
env {
|
||||||
|
API_PREFIX = "/cua-quinto"
|
||||||
|
API_SCHEME = "https"
|
||||||
|
}
|
||||||
|
|
||||||
|
config {
|
||||||
|
image = "marc.sastre.cat/quinto-cua:latest"
|
||||||
|
ports = ["http"]
|
||||||
|
}
|
||||||
|
|
||||||
|
resources {
|
||||||
|
cpu = 50
|
||||||
|
memory = 64
|
||||||
|
}
|
||||||
|
|
||||||
|
service {
|
||||||
|
name = "cua-quinto"
|
||||||
|
port = "http"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
106
data/nomad/old/lwt.nomad
Normal file
106
data/nomad/old/lwt.nomad
Normal file
@@ -0,0 +1,106 @@
|
|||||||
|
job "lwt" {
|
||||||
|
region = "global"
|
||||||
|
datacenters = ["samfelag"]
|
||||||
|
type = "service"
|
||||||
|
|
||||||
|
group "lwt" {
|
||||||
|
count = 1
|
||||||
|
|
||||||
|
restart {
|
||||||
|
attempts = 10
|
||||||
|
delay = "30s"
|
||||||
|
}
|
||||||
|
|
||||||
|
# VOLUMES
|
||||||
|
|
||||||
|
volume "lwt-mariadb" {
|
||||||
|
type = "host"
|
||||||
|
read_only = false
|
||||||
|
source = "lwt-mariadb"
|
||||||
|
}
|
||||||
|
|
||||||
|
volume "lwt" {
|
||||||
|
type = "host"
|
||||||
|
read_only = false
|
||||||
|
source = "lwt"
|
||||||
|
}
|
||||||
|
|
||||||
|
# NETWORK
|
||||||
|
|
||||||
|
network {
|
||||||
|
port "lwt" {
|
||||||
|
to = 80
|
||||||
|
}
|
||||||
|
port "mariadb" {
|
||||||
|
static = 33306
|
||||||
|
to = 3306
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# TASKS
|
||||||
|
|
||||||
|
task "mariadb" {
|
||||||
|
driver = "docker"
|
||||||
|
|
||||||
|
user = 1001
|
||||||
|
|
||||||
|
volume_mount {
|
||||||
|
volume = "lwt-mariadb"
|
||||||
|
destination = "/var/lib/mysql"
|
||||||
|
read_only = false
|
||||||
|
}
|
||||||
|
|
||||||
|
env {
|
||||||
|
MYSQL_ALLOW_EMPTY_PASSWORD = "no"
|
||||||
|
MYSQL_ROOT_PASSWORD = "root"
|
||||||
|
}
|
||||||
|
|
||||||
|
config {
|
||||||
|
image = "mariadb:10.7"
|
||||||
|
ports = ["mariadb"]
|
||||||
|
}
|
||||||
|
|
||||||
|
resources {
|
||||||
|
cpu = 100
|
||||||
|
memory = 128
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
task "lwt" {
|
||||||
|
driver = "docker"
|
||||||
|
|
||||||
|
config {
|
||||||
|
image = "ghcr.io/hugofara/lwt:master"
|
||||||
|
ports = ["lwt"]
|
||||||
|
}
|
||||||
|
|
||||||
|
volume_mount {
|
||||||
|
volume = "lwt"
|
||||||
|
destination = "/var/www/html/media"
|
||||||
|
read_only = false
|
||||||
|
}
|
||||||
|
|
||||||
|
env {
|
||||||
|
DB_HOST = "${attr.unique.network.ip-address}:33306" # "100.91.225.117"
|
||||||
|
}
|
||||||
|
|
||||||
|
resources {
|
||||||
|
cpu = 100
|
||||||
|
memory = 128
|
||||||
|
}
|
||||||
|
|
||||||
|
service {
|
||||||
|
name = "lwt"
|
||||||
|
port = "lwt"
|
||||||
|
|
||||||
|
check {
|
||||||
|
type = "tcp"
|
||||||
|
port = "lwt"
|
||||||
|
interval = "30s"
|
||||||
|
timeout = "10s"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
71
data/nomad/old/minecraft.nomad
Normal file
71
data/nomad/old/minecraft.nomad
Normal file
@@ -0,0 +1,71 @@
|
|||||||
|
job "minecraft" {
|
||||||
|
region = "global"
|
||||||
|
datacenters = ["samfelag"]
|
||||||
|
type = "service"
|
||||||
|
|
||||||
|
group "minecraft" {
|
||||||
|
count = 1
|
||||||
|
|
||||||
|
volume "minecraft" {
|
||||||
|
type = "host"
|
||||||
|
read_only = false
|
||||||
|
source = "minecraft"
|
||||||
|
}
|
||||||
|
|
||||||
|
restart {
|
||||||
|
attempts = 2
|
||||||
|
interval = "2m"
|
||||||
|
delay = "1m"
|
||||||
|
mode = "fail"
|
||||||
|
}
|
||||||
|
|
||||||
|
network {
|
||||||
|
port "server" {
|
||||||
|
static = 25565
|
||||||
|
to = 25565
|
||||||
|
host_network = "minecraft"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
###
|
||||||
|
# MINECRAFT SERVER
|
||||||
|
###
|
||||||
|
|
||||||
|
task "minecraft" {
|
||||||
|
driver = "docker"
|
||||||
|
|
||||||
|
volume_mount {
|
||||||
|
volume = "minecraft"
|
||||||
|
destination = "/data"
|
||||||
|
read_only = false
|
||||||
|
}
|
||||||
|
|
||||||
|
env {
|
||||||
|
EULA = "TRUE"
|
||||||
|
TZ = "Europe/Madrid"
|
||||||
|
}
|
||||||
|
|
||||||
|
config {
|
||||||
|
image = "itzg/minecraft-server"
|
||||||
|
ports = ["server"]
|
||||||
|
}
|
||||||
|
|
||||||
|
resources {
|
||||||
|
cpu = 2800
|
||||||
|
memory = 1900
|
||||||
|
}
|
||||||
|
|
||||||
|
service {
|
||||||
|
name = "minecraft"
|
||||||
|
|
||||||
|
check {
|
||||||
|
type = "tcp"
|
||||||
|
port = "server"
|
||||||
|
interval = "30s"
|
||||||
|
timeout = "2s"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
133
data/nomad/old/moimoin.nomad
Normal file
133
data/nomad/old/moimoin.nomad
Normal file
@@ -0,0 +1,133 @@
|
|||||||
|
job "moimoin" {
|
||||||
|
region = "global"
|
||||||
|
datacenters = ["samfelag"]
|
||||||
|
type = "service"
|
||||||
|
|
||||||
|
group "moimoin" {
|
||||||
|
count = 1
|
||||||
|
|
||||||
|
restart {
|
||||||
|
attempts = 10
|
||||||
|
delay = "30s"
|
||||||
|
}
|
||||||
|
|
||||||
|
# VOLUMES
|
||||||
|
|
||||||
|
volume "mysql" {
|
||||||
|
type = "host"
|
||||||
|
read_only = false
|
||||||
|
source = "moimoin"
|
||||||
|
}
|
||||||
|
|
||||||
|
# NETWORK
|
||||||
|
|
||||||
|
network {
|
||||||
|
port "moimoin-front" {
|
||||||
|
to = 5000
|
||||||
|
}
|
||||||
|
port "moimoin-back" {
|
||||||
|
to = 3000
|
||||||
|
}
|
||||||
|
port "mysql" {
|
||||||
|
static = 33306
|
||||||
|
to = 3306
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# TASKS
|
||||||
|
|
||||||
|
task "mysql" {
|
||||||
|
driver = "docker"
|
||||||
|
|
||||||
|
user = 1001
|
||||||
|
|
||||||
|
volume_mount {
|
||||||
|
volume = "mysql"
|
||||||
|
destination = "/var/lib/mysql"
|
||||||
|
read_only = false
|
||||||
|
}
|
||||||
|
|
||||||
|
env {
|
||||||
|
MYSQL_DATABASE = "xat-osr"
|
||||||
|
MYSQL_ROOT_PASSWORD = "estrell4galicia"
|
||||||
|
}
|
||||||
|
|
||||||
|
config {
|
||||||
|
image = "arm64v8/mysql:latest"
|
||||||
|
ports = ["mysql"]
|
||||||
|
}
|
||||||
|
|
||||||
|
resources {
|
||||||
|
cpu = 500
|
||||||
|
memory = 512
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
task "moimoin-back" {
|
||||||
|
driver = "docker"
|
||||||
|
|
||||||
|
config {
|
||||||
|
image = "marc.sastre.cat/moimoin-back:latest"
|
||||||
|
ports = ["moimoin-back"]
|
||||||
|
}
|
||||||
|
|
||||||
|
env {
|
||||||
|
MYSQL_HOST = "${attr.unique.network.ip-address}" # "100.91.225.117"
|
||||||
|
MYSQL_PORT = "33306"
|
||||||
|
MYSQL_USER = "root"
|
||||||
|
MYSQL_PASSWORD = "estrell4galicia"
|
||||||
|
MYSQL_NAME = "xat-osr"
|
||||||
|
CHAT_ADMIN_PSWD = "cervesaEspecial"
|
||||||
|
CLIENT_HOST = "marc.sastre.cat/moimoin"
|
||||||
|
}
|
||||||
|
|
||||||
|
resources {
|
||||||
|
cpu = 100
|
||||||
|
memory = 128
|
||||||
|
}
|
||||||
|
|
||||||
|
service {
|
||||||
|
name = "moimoin-back"
|
||||||
|
port = "moimoin-back"
|
||||||
|
|
||||||
|
check {
|
||||||
|
type = "tcp"
|
||||||
|
port = "moimoin-back"
|
||||||
|
interval = "30s"
|
||||||
|
timeout = "10s"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
task "moimoin-front" {
|
||||||
|
driver = "docker"
|
||||||
|
|
||||||
|
config {
|
||||||
|
image = "marc.sastre.cat/moimoin-front:latest"
|
||||||
|
ports = ["moimoin-front"]
|
||||||
|
}
|
||||||
|
|
||||||
|
env {
|
||||||
|
CLIENT_PORT = "5000"
|
||||||
|
}
|
||||||
|
|
||||||
|
resources {
|
||||||
|
cpu = 100
|
||||||
|
memory = 128
|
||||||
|
}
|
||||||
|
|
||||||
|
service {
|
||||||
|
name = "moimoin-front"
|
||||||
|
port = "moimoin-front"
|
||||||
|
|
||||||
|
check {
|
||||||
|
type = "tcp"
|
||||||
|
port = "moimoin-front"
|
||||||
|
interval = "30s"
|
||||||
|
timeout = "10s"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
52
data/nomad/old/organice.nomad
Normal file
52
data/nomad/old/organice.nomad
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
job "organice" {
|
||||||
|
region = "global"
|
||||||
|
datacenters = ["samfelag"]
|
||||||
|
type = "service"
|
||||||
|
|
||||||
|
group "organice" {
|
||||||
|
count = 1
|
||||||
|
|
||||||
|
restart {
|
||||||
|
attempts = 5
|
||||||
|
delay = "1m"
|
||||||
|
}
|
||||||
|
|
||||||
|
network {
|
||||||
|
port "http" {
|
||||||
|
to = 5000
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
task "organice" {
|
||||||
|
driver = "docker"
|
||||||
|
|
||||||
|
env {
|
||||||
|
ORGANICE_WEBDAV_URL = "https://nextcloud.lajuntament.space/remote.php/dav/files/marc/"
|
||||||
|
}
|
||||||
|
|
||||||
|
config {
|
||||||
|
image = "twohundredok/organice:latest"
|
||||||
|
ports = ["http"]
|
||||||
|
}
|
||||||
|
|
||||||
|
resources {
|
||||||
|
cpu = 100
|
||||||
|
memory = 128
|
||||||
|
}
|
||||||
|
|
||||||
|
service {
|
||||||
|
name = "organice"
|
||||||
|
port = "http"
|
||||||
|
|
||||||
|
check {
|
||||||
|
type = "tcp"
|
||||||
|
port = "http"
|
||||||
|
interval = "30s"
|
||||||
|
timeout = "2s"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
70
data/nomad/old/pasta.nomad
Normal file
70
data/nomad/old/pasta.nomad
Normal file
@@ -0,0 +1,70 @@
|
|||||||
|
job "pasta" {
|
||||||
|
region = "global"
|
||||||
|
datacenters = ["samfelag"]
|
||||||
|
type = "service"
|
||||||
|
|
||||||
|
group "pasta" {
|
||||||
|
count = 1
|
||||||
|
|
||||||
|
restart {
|
||||||
|
attempts = 5
|
||||||
|
delay = "15s"
|
||||||
|
}
|
||||||
|
|
||||||
|
network {
|
||||||
|
port "backend" {
|
||||||
|
to = 3000
|
||||||
|
}
|
||||||
|
port "client" {
|
||||||
|
to = 80
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# PASTA SERVER
|
||||||
|
task "pasta-server" {
|
||||||
|
driver = "docker"
|
||||||
|
|
||||||
|
env {
|
||||||
|
PASTA_PORT = "3000"
|
||||||
|
PASTA_DIR = "/pasta"
|
||||||
|
}
|
||||||
|
|
||||||
|
config {
|
||||||
|
image = "marc.sastre.cat/pasta-server"
|
||||||
|
ports = ["backend"]
|
||||||
|
volumes = ["/mnt/vatnajokull/nomad_volumes/pasta:/pasta"]
|
||||||
|
}
|
||||||
|
|
||||||
|
resources {
|
||||||
|
cpu = 100
|
||||||
|
memory = 256
|
||||||
|
}
|
||||||
|
|
||||||
|
service {
|
||||||
|
name = "pasta-server"
|
||||||
|
port = "backend"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# PASTA CLIENT
|
||||||
|
task "pasta-client" {
|
||||||
|
driver = "docker"
|
||||||
|
|
||||||
|
config {
|
||||||
|
image = "marc.sastre.cat/pasta-client"
|
||||||
|
ports = ["client"]
|
||||||
|
}
|
||||||
|
|
||||||
|
resources {
|
||||||
|
cpu = 50
|
||||||
|
memory = 32
|
||||||
|
}
|
||||||
|
|
||||||
|
service {
|
||||||
|
name = "pasta-client"
|
||||||
|
port = "client"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
73
data/nomad/old/pihole.nomad
Normal file
73
data/nomad/old/pihole.nomad
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
job "pihole" {
|
||||||
|
region = "global"
|
||||||
|
datacenters = ["samfelag"]
|
||||||
|
type = "service"
|
||||||
|
|
||||||
|
group "pihole" {
|
||||||
|
count = 1
|
||||||
|
|
||||||
|
volume "pihole" {
|
||||||
|
type = "host"
|
||||||
|
read_only = false
|
||||||
|
source = "dns-pihole"
|
||||||
|
}
|
||||||
|
|
||||||
|
volume "dnsmasq" {
|
||||||
|
type = "host"
|
||||||
|
read_only = false
|
||||||
|
source = "dns-dnsmasq"
|
||||||
|
}
|
||||||
|
|
||||||
|
restart {
|
||||||
|
attempts = 5
|
||||||
|
delay = "15s"
|
||||||
|
}
|
||||||
|
|
||||||
|
network {
|
||||||
|
port "dns" {
|
||||||
|
static = 53
|
||||||
|
}
|
||||||
|
port "http" {
|
||||||
|
to = 80
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
task "pihole" {
|
||||||
|
driver = "docker"
|
||||||
|
|
||||||
|
volume_mount {
|
||||||
|
volume = "pihole"
|
||||||
|
destination = "/etc/pihole"
|
||||||
|
read_only = false
|
||||||
|
}
|
||||||
|
|
||||||
|
volume_mount {
|
||||||
|
volume = "dnsmasq"
|
||||||
|
destination = "/etc/dnsmasq.d"
|
||||||
|
read_only = false
|
||||||
|
}
|
||||||
|
|
||||||
|
env {
|
||||||
|
TZ = "Europe/Amsterdam"
|
||||||
|
WEBPASSWORD = "elbonfeix"
|
||||||
|
ServerIP = "100.107.148.47"
|
||||||
|
}
|
||||||
|
|
||||||
|
config {
|
||||||
|
image = "pihole/pihole:v5.7"
|
||||||
|
ports = ["dns", "http"]
|
||||||
|
}
|
||||||
|
|
||||||
|
resources {
|
||||||
|
cpu = 100
|
||||||
|
memory = 64
|
||||||
|
}
|
||||||
|
|
||||||
|
service {
|
||||||
|
name = "pihole-gui"
|
||||||
|
port = "http"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
41
data/nomad/old/presencia.nomad
Normal file
41
data/nomad/old/presencia.nomad
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
job "presencia" {
|
||||||
|
region = "global"
|
||||||
|
datacenters = ["samfelag"]
|
||||||
|
type = "service"
|
||||||
|
|
||||||
|
group "presencia" {
|
||||||
|
count = 1
|
||||||
|
|
||||||
|
restart {
|
||||||
|
attempts = 5
|
||||||
|
delay = "15s"
|
||||||
|
}
|
||||||
|
|
||||||
|
network {
|
||||||
|
port "http" {
|
||||||
|
to = 5000
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# PRESENCIA APP
|
||||||
|
task "presencia" {
|
||||||
|
driver = "docker"
|
||||||
|
|
||||||
|
config {
|
||||||
|
image = "marc.sastre.cat/presencia"
|
||||||
|
ports = ["http"]
|
||||||
|
}
|
||||||
|
|
||||||
|
resources {
|
||||||
|
cpu = 50
|
||||||
|
memory = 64
|
||||||
|
}
|
||||||
|
|
||||||
|
service {
|
||||||
|
name = "presencia"
|
||||||
|
port = "http"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
47
data/nomad/old/unbound.nomad
Normal file
47
data/nomad/old/unbound.nomad
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
job "unbound" {
|
||||||
|
region = "global"
|
||||||
|
datacenters = ["samfelag"]
|
||||||
|
type = "service"
|
||||||
|
|
||||||
|
group "unbound" {
|
||||||
|
count = 1
|
||||||
|
|
||||||
|
volume "unbound" {
|
||||||
|
type = "host"
|
||||||
|
read_only = false
|
||||||
|
source = "dns-unbound"
|
||||||
|
}
|
||||||
|
|
||||||
|
restart {
|
||||||
|
attempts = 5
|
||||||
|
delay = "15s"
|
||||||
|
}
|
||||||
|
|
||||||
|
network {
|
||||||
|
port "dns" {
|
||||||
|
static = 5533
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
task "unbound" {
|
||||||
|
driver = "docker"
|
||||||
|
|
||||||
|
volume_mount {
|
||||||
|
volume = "unbound"
|
||||||
|
destination = "/opt/unbound/etc/unbound/"
|
||||||
|
read_only = false
|
||||||
|
}
|
||||||
|
|
||||||
|
config {
|
||||||
|
image = "mvance/unbound:latest"
|
||||||
|
ports = ["dns"]
|
||||||
|
}
|
||||||
|
|
||||||
|
resources {
|
||||||
|
cpu = 50
|
||||||
|
memory = 64
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
52
data/nomad/old/webhooks.nomad
Normal file
52
data/nomad/old/webhooks.nomad
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
job "webhooks" {
|
||||||
|
region = "global"
|
||||||
|
datacenters = ["samfelag"]
|
||||||
|
type = "service"
|
||||||
|
|
||||||
|
group "webhooks" {
|
||||||
|
count = 1
|
||||||
|
|
||||||
|
restart {
|
||||||
|
attempts = 5
|
||||||
|
delay = "1m"
|
||||||
|
}
|
||||||
|
|
||||||
|
network {
|
||||||
|
port "http" {
|
||||||
|
to = 6000
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
task "webhooks" {
|
||||||
|
driver = "docker"
|
||||||
|
|
||||||
|
env {
|
||||||
|
CONFIG_FILE = "/app/data/config.json"
|
||||||
|
}
|
||||||
|
|
||||||
|
config {
|
||||||
|
image = "marc.sastre.cat/webhooks:latest"
|
||||||
|
ports = ["http"]
|
||||||
|
volumes = ["/mnt/vatnajokull/nomad_volumes/webhooks:/app/data"]
|
||||||
|
}
|
||||||
|
|
||||||
|
resources {
|
||||||
|
cpu = 100
|
||||||
|
memory = 128
|
||||||
|
}
|
||||||
|
|
||||||
|
service {
|
||||||
|
name = "webhooks"
|
||||||
|
port = "http"
|
||||||
|
|
||||||
|
check {
|
||||||
|
type = "tcp"
|
||||||
|
port = "http"
|
||||||
|
interval = "30s"
|
||||||
|
timeout = "2s"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
52
data/nomad/registry.nomad
Normal file
52
data/nomad/registry.nomad
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
job "registry" {
|
||||||
|
region = "global"
|
||||||
|
datacenters = ["samfelag"]
|
||||||
|
type = "service"
|
||||||
|
|
||||||
|
group "registry" {
|
||||||
|
count = 1
|
||||||
|
|
||||||
|
restart {
|
||||||
|
attempts = 5
|
||||||
|
delay = "1m"
|
||||||
|
}
|
||||||
|
|
||||||
|
network {
|
||||||
|
port "http" {
|
||||||
|
to = 5000
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
task "registry" {
|
||||||
|
driver = "docker"
|
||||||
|
|
||||||
|
env {
|
||||||
|
REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY = "/data"
|
||||||
|
}
|
||||||
|
|
||||||
|
config {
|
||||||
|
image = "registry:2"
|
||||||
|
ports = ["http"]
|
||||||
|
volumes = ["/mnt/vatnajokull/nomad_volumes/registry:/data"]
|
||||||
|
}
|
||||||
|
|
||||||
|
resources {
|
||||||
|
cpu = 100
|
||||||
|
memory = 256
|
||||||
|
}
|
||||||
|
|
||||||
|
service {
|
||||||
|
name = "registry"
|
||||||
|
port = "http"
|
||||||
|
|
||||||
|
check {
|
||||||
|
type = "tcp"
|
||||||
|
port = "http"
|
||||||
|
interval = "30s"
|
||||||
|
timeout = "2s"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
BIN
data/wallpapers/wallhaven/canyon.jpg
Normal file
BIN
data/wallpapers/wallhaven/canyon.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.0 MiB |
BIN
data/wallpapers/wallhaven/ciutat.jpg
Normal file
BIN
data/wallpapers/wallhaven/ciutat.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 880 KiB |
BIN
data/wallpapers/wallhaven/desert.jpg
Normal file
BIN
data/wallpapers/wallhaven/desert.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.5 MiB |
BIN
data/wallpapers/wallhaven/muntanya.png
Normal file
BIN
data/wallpapers/wallhaven/muntanya.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.0 MiB |
87
docs/consul.org
Normal file
87
docs/consul.org
Normal file
@@ -0,0 +1,87 @@
|
|||||||
|
#+title: Consul
|
||||||
|
* Server setup
|
||||||
|
** Create a server keypair <<create_keypair>>
|
||||||
|
Decrypt the CA (from the agenix secrets)
|
||||||
|
#+begin_src bash
|
||||||
|
agenix -i ~/.ssh/id_reykjavik -d consul.d/consul-agent-ca.pem.age > ~/tmp/consul-agent-ca.pem
|
||||||
|
agenix -i ~/.ssh/id_reykjavik -d consul.d/consul-agent-ca-key.pem.age > ~/tmp/consul-agent-ca-key.pem
|
||||||
|
#+end_src
|
||||||
|
Create the keypair using consul:
|
||||||
|
#+begin_src bash
|
||||||
|
nix-shell -p consul
|
||||||
|
consul tls cert create -server -dc samfelag
|
||||||
|
#+end_src
|
||||||
|
* ACLs
|
||||||
|
** Policies
|
||||||
|
*** Node Policy
|
||||||
|
Policy for agent tokens
|
||||||
|
#+begin_src hcl
|
||||||
|
agent_prefix "" {
|
||||||
|
policy = "write"
|
||||||
|
}
|
||||||
|
node_prefix "" {
|
||||||
|
policy = "write"
|
||||||
|
}
|
||||||
|
service_prefix "" {
|
||||||
|
policy = "read"
|
||||||
|
}
|
||||||
|
session_prefix "" {
|
||||||
|
policy = "read"
|
||||||
|
}
|
||||||
|
#+end_src
|
||||||
|
*** Nomad client
|
||||||
|
Policy for nomad clients (to be added in the consul.token field in the nomad config)
|
||||||
|
#+begin_src hcl
|
||||||
|
agent_prefix "" {
|
||||||
|
policy = "read"
|
||||||
|
}
|
||||||
|
|
||||||
|
node_prefix "" {
|
||||||
|
policy = "read"
|
||||||
|
}
|
||||||
|
|
||||||
|
service_prefix "" {
|
||||||
|
policy = "write"
|
||||||
|
}
|
||||||
|
#+end_src
|
||||||
|
*** Nomad server
|
||||||
|
Policy for nomad servers (to be added in the consul.token field in the nomad config)
|
||||||
|
#+begin_src hcl
|
||||||
|
agent_prefix "" {
|
||||||
|
policy = "read"
|
||||||
|
}
|
||||||
|
|
||||||
|
node_prefix "" {
|
||||||
|
policy = "read"
|
||||||
|
}
|
||||||
|
|
||||||
|
service_prefix "" {
|
||||||
|
policy = "write"
|
||||||
|
}
|
||||||
|
|
||||||
|
acl = "write"
|
||||||
|
#+end_src
|
||||||
|
** Node Agent Token
|
||||||
|
Create a token at http://hvannadal:8500/ui/samfelag/acls/tokens with the node policy.
|
||||||
|
Create the consul config file and encrypt it via agenix:
|
||||||
|
#+begin_src bash
|
||||||
|
agenix -e consul.d/agent-token-<host>.json.age
|
||||||
|
#+end_src
|
||||||
|
JSON config:
|
||||||
|
#+begin_src json
|
||||||
|
{
|
||||||
|
"acl": {
|
||||||
|
"tokens": {
|
||||||
|
"default": "<AGENT_TOKEN>",
|
||||||
|
"agent": "<AGENT_TOKEN>"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#+end_src
|
||||||
|
* Renew expired certificates
|
||||||
|
** Find the expired certificate
|
||||||
|
#+begin_src
|
||||||
|
openssl x509 -in /etc/consul.d/certs/samfelag-server-consul.pem -enddate -noout
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
Follow the steps described in [[create_keypair][Create a server keypair]].
|
||||||
64
docs/hosts.org
Normal file
64
docs/hosts.org
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
#+title: Hosts
|
||||||
|
* Setting up a new vult host
|
||||||
|
** Generate a password for your host
|
||||||
|
#+begin_src bash
|
||||||
|
pass generate samfelag/<host>
|
||||||
|
#+end_src
|
||||||
|
** Change the password in the host
|
||||||
|
Enter into the host via the vultr dashboard "View Console"
|
||||||
|
#+begin_src bash
|
||||||
|
passwd
|
||||||
|
#+end_src
|
||||||
|
** You can now ssh into the host with the new password
|
||||||
|
#+begin_src bash
|
||||||
|
ssh nixos@<host_public_ip>
|
||||||
|
#+end_src
|
||||||
|
* Setting up a new host
|
||||||
|
** Generate a host ssh key pair
|
||||||
|
Generate the key pair (we'll use the name `id_<host>`)
|
||||||
|
#+BEGIN_SRC bash
|
||||||
|
ssh-keygen -f id_<host>
|
||||||
|
#+END_SRC
|
||||||
|
Encrypt the private key if you want to put it in the repo:
|
||||||
|
#+begin_src bash
|
||||||
|
gpg -r marc@sastre.cat -e id_<host>
|
||||||
|
#+end_src
|
||||||
|
You can decrypt it later with:
|
||||||
|
#+begin_src bash
|
||||||
|
gpg -d id_<host>.gpg > id_<host>
|
||||||
|
#+end_src
|
||||||
|
** Deploy the ssh keypair
|
||||||
|
You can use scp:
|
||||||
|
#+begin_src bash
|
||||||
|
scp id_<host> <user>@<host>:.ssh/id_<host>
|
||||||
|
scp id_<host>.pub <user>@<host>:.ssh/id_<host>.pub
|
||||||
|
#+end_src
|
||||||
|
Create a symbolic link for the host key (so we can use uniform naming in other parts):
|
||||||
|
#+begin_src bash
|
||||||
|
ln -s ~/.ssh/id_<host> ~/.ssh/id_ed25519
|
||||||
|
#+end_src
|
||||||
|
** Add the public key to secrets.nix
|
||||||
|
In the [[file:../secrets/secrets.nix][agenix secrets file]] add the public key, and give access to the necessary secrets.
|
||||||
|
Remember to rekey the secrets afterwards:
|
||||||
|
#+begin_src bash
|
||||||
|
agenix --rekey
|
||||||
|
#+end_src
|
||||||
|
** SSH public key authentication
|
||||||
|
Setting up authentication from localhost (client) to remotehost (server). On localhost run:
|
||||||
|
#+BEGIN_SRC bash
|
||||||
|
ssh-keygen -f ~/.ssh/remotehost
|
||||||
|
ssh-copy-id -i ~/.ssh/remotehost remotehost-or-ip
|
||||||
|
#+END_SRC
|
||||||
|
We may want to edit the ssh config file to use this ssh key when connection to remotehost:
|
||||||
|
#+BEGIN_SRC
|
||||||
|
Host remotehost
|
||||||
|
# HostName 192.168.1.105
|
||||||
|
# Port 22
|
||||||
|
# User user
|
||||||
|
|
||||||
|
IdentitiesOnly yes
|
||||||
|
IdentityFile ~/.ssh/remotehost
|
||||||
|
#+END_SRC
|
||||||
|
* List of hosts
|
||||||
|
** [[file:../hosts/reykjavik/README.org][Reykjavik]]
|
||||||
|
** [[file:../hosts/kopavogur/README.org][Kopavogur]]
|
||||||
115
docs/install.org
Normal file
115
docs/install.org
Normal file
@@ -0,0 +1,115 @@
|
|||||||
|
#+title: Installing
|
||||||
|
* Set up
|
||||||
|
** If new host, follow [[file:hosts.org][Setting up a new host]]
|
||||||
|
** Open a nix-shell with dependencies
|
||||||
|
#+BEGIN_SRC bash
|
||||||
|
nix-shell -p git
|
||||||
|
#+END_SRC
|
||||||
|
** Obtain the flake
|
||||||
|
+ Via git clone
|
||||||
|
#+BEGIN_SRC bash
|
||||||
|
git clone https://git.samfelag.xyz/marc/samfelag.git
|
||||||
|
#+END_SRC
|
||||||
|
+ Via scp (in this case, from local to remote)
|
||||||
|
#+BEGIN_SRC bash
|
||||||
|
scp samfelag marc@remotehost:samfelag
|
||||||
|
#+END_SRC
|
||||||
|
** Copy the host ssh key
|
||||||
|
Obtain the host ssh *private* key. You can decrypt it using gpg:
|
||||||
|
#+begin_src bash
|
||||||
|
gpg -d secrets/ssh-keys/id_<host>.gpg > /etc/ssh/id_<host>
|
||||||
|
#+end_src
|
||||||
|
Copy the ssh keys to `/etc/ssh`
|
||||||
|
* Partition the disk
|
||||||
|
We'll partition the disk in the follwing way:
|
||||||
|
+ 512MB at the beginning for the boot partition
|
||||||
|
+ 8GB at the end for swap
|
||||||
|
+ The rest (at the middle) for the filesystem (/)
|
||||||
|
** Locate the disk
|
||||||
|
#+BEGIN_SRC bash
|
||||||
|
lsblk
|
||||||
|
#+END_SRC
|
||||||
|
** UEFI Boot
|
||||||
|
1. Create a GPT partition table
|
||||||
|
#+BEGIN_SRC bash
|
||||||
|
sudo parted /dev/nvme0n1 -- mklabel gpt
|
||||||
|
#+END_SRC
|
||||||
|
2. Create the root partition
|
||||||
|
#+BEGIN_SRC bash
|
||||||
|
sudo parted /dev/nvme0n1 -- mkpart primary 512MB -8GB
|
||||||
|
#+END_SRC
|
||||||
|
3. Create the swap partition
|
||||||
|
#+BEGIN_SRC bash
|
||||||
|
sudo parted /dev/nvme0n1 -- mkpart primary linux-swap -8GB 100%
|
||||||
|
#+END_SRC
|
||||||
|
4. 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
|
||||||
|
** MBR boot
|
||||||
|
1. Create a MBR partition table
|
||||||
|
#+BEGIN_SRC bash
|
||||||
|
sudo parted /dev/vda -- mklabel msdos
|
||||||
|
#+END_SRC
|
||||||
|
2. Create the root partition
|
||||||
|
#+BEGIN_SRC bash
|
||||||
|
sudo parted /dev/vda -- mkpart primary 1MiB -8GiB
|
||||||
|
#+END_SRC
|
||||||
|
3. Create the swap partition
|
||||||
|
#+BEGIN_SRC bash
|
||||||
|
sudo parted /dev/vda -- mkpart primary linux-swap -8GiB 100%
|
||||||
|
#+END_SRC
|
||||||
|
* Format the partitions
|
||||||
|
1. Root partition
|
||||||
|
#+BEGIN_SRC bash
|
||||||
|
sudo mkfs.ext4 -L nixos /dev/nvme0n1p1
|
||||||
|
#+END_SRC
|
||||||
|
2. Swap partition
|
||||||
|
#+BEGIN_SRC bash
|
||||||
|
sudo mkswap -L swap /dev/nvme0n1p2
|
||||||
|
#+END_SRC
|
||||||
|
3. Boot partition (if UEFI boot)
|
||||||
|
#+BEGIN_SRC bash
|
||||||
|
sudo mkfs.fat -F 32 -n BOOT /dev/nvme0n1p3
|
||||||
|
#+END_SRC
|
||||||
|
* Mount the filesystems
|
||||||
|
1. Root partition
|
||||||
|
#+BEGIN_SRC bash
|
||||||
|
sudo mount /dev/disk/by-label/nixos /mnt
|
||||||
|
#+END_SRC
|
||||||
|
2. Boot partition (if UEFI boot)
|
||||||
|
#+BEGIN_SRC bash
|
||||||
|
sudo mkdir -p /mnt/boot
|
||||||
|
sudo mount /dev/disk/by-label/BOOT /mnt/boot
|
||||||
|
#+END_SRC
|
||||||
|
3. Swap partition (if needed)
|
||||||
|
#+BEGIN_SRC bash
|
||||||
|
sudo swapon /dev/disk/by-label/swap
|
||||||
|
#+END_SRC
|
||||||
|
* Create the host nix configuration
|
||||||
|
If the host is not present under system/hosts, create a new folder for the host.
|
||||||
|
Check [[Setting up a new host]] for further documentation.
|
||||||
|
Generate the hardware configuration file, you can use nixos-generate-config as a base:
|
||||||
|
#+BEGIN_SRC bash
|
||||||
|
nixos-generate-config --dir <<host directory>> --no-filesystems
|
||||||
|
#+END_SRC
|
||||||
|
* Install nixos!
|
||||||
|
#+BEGIN_SRC bash
|
||||||
|
sudo nixos-install --impure --root /mnt --flake '.#reykjavik'
|
||||||
|
#+END_SRC
|
||||||
|
* Copy the ssh deploy key (again)
|
||||||
|
#+begin_src bash
|
||||||
|
cp ~/.ssh/id_<hostname> /mnt/home/marc/.ssh/id_<hostname>
|
||||||
|
#+end_src
|
||||||
|
* Initialization
|
||||||
|
Steps after reboot
|
||||||
|
** 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 (via vultr dashboard) and set the password for your user:
|
||||||
|
#+BEGIN_SRC bash
|
||||||
|
passwd marc
|
||||||
|
#+END_SRC
|
||||||
|
** Log into tailscale
|
||||||
|
#+begin_src bash
|
||||||
|
sudo tailscale up
|
||||||
|
#+end_src
|
||||||
772
flake.lock
generated
772
flake.lock
generated
@@ -1,32 +1,88 @@
|
|||||||
{
|
{
|
||||||
"nodes": {
|
"nodes": {
|
||||||
"base16-schemes": {
|
"agenix": {
|
||||||
"flake": false,
|
"inputs": {
|
||||||
|
"darwin": [],
|
||||||
|
"home-manager": "home-manager",
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
],
|
||||||
|
"systems": "systems"
|
||||||
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1654895891,
|
"lastModified": 1723293904,
|
||||||
"narHash": "sha256-xYYmZkHnyLCUBAkqkZ7v1Lc5m39857MukQLMRtGuvdk=",
|
"narHash": "sha256-b+uqzj+Wa6xgMS9aNbX4I+sXeb5biPDi39VgvSFqFvU=",
|
||||||
"owner": "base16-project",
|
"owner": "ryantm",
|
||||||
"repo": "base16-schemes",
|
"repo": "agenix",
|
||||||
"rev": "7c247f734eac7f04518c6e28d098635ee8dcabf5",
|
"rev": "f6291c5935fdc4e0bef208cfc0dcab7e3f7a1c41",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "base16-project",
|
"owner": "ryantm",
|
||||||
|
"repo": "agenix",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"aquamarine": {
|
||||||
|
"inputs": {
|
||||||
|
"hyprutils": [
|
||||||
|
"hyprland",
|
||||||
|
"hyprutils"
|
||||||
|
],
|
||||||
|
"hyprwayland-scanner": [
|
||||||
|
"hyprland",
|
||||||
|
"hyprwayland-scanner"
|
||||||
|
],
|
||||||
|
"nixpkgs": [
|
||||||
|
"hyprland",
|
||||||
|
"nixpkgs"
|
||||||
|
],
|
||||||
|
"systems": [
|
||||||
|
"hyprland",
|
||||||
|
"systems"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1747864449,
|
||||||
|
"narHash": "sha256-PIjVAWghZhr3L0EFM2UObhX84UQxIACbON0IC0zzSKA=",
|
||||||
|
"owner": "hyprwm",
|
||||||
|
"repo": "aquamarine",
|
||||||
|
"rev": "389372c5f4dc1ac0e7645ed29a35fd6d71672ef5",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "hyprwm",
|
||||||
|
"repo": "aquamarine",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"base16-schemes": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1696158499,
|
||||||
|
"narHash": "sha256-5yIHgDTPjoX/3oDEfLSQ0eJZdFL1SaCfb9d6M0RmOTM=",
|
||||||
|
"owner": "tinted-theming",
|
||||||
|
"repo": "base16-schemes",
|
||||||
|
"rev": "a9112eaae86d9dd8ee6bb9445b664fba2f94037a",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "tinted-theming",
|
||||||
"repo": "base16-schemes",
|
"repo": "base16-schemes",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"emacs-overlay": {
|
"emacs-overlay": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-utils": "flake-utils",
|
"nixpkgs": "nixpkgs",
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs-stable": "nixpkgs-stable"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1669120813,
|
"lastModified": 1733127808,
|
||||||
"narHash": "sha256-00O/dvvcELCdpuFPde+bsJ9Bw974b/VunUArWlJ+lQA=",
|
"narHash": "sha256-UJUFsa1jmYSgAhrii1HVEl//ggT3Nzaw6kDN6TnkGXM=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "emacs-overlay",
|
"repo": "emacs-overlay",
|
||||||
"rev": "a9c2a436757f09abc4c7bc0abc4d2529b312e42b",
|
"rev": "51d6aafb5e3bbf10a29bd8ff417b617e35b14d0e",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -35,73 +91,448 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"flake-utils": {
|
"flake-compat": {
|
||||||
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1667395993,
|
"lastModified": 1696426674,
|
||||||
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
|
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
|
||||||
"owner": "numtide",
|
"owner": "edolstra",
|
||||||
"repo": "flake-utils",
|
"repo": "flake-compat",
|
||||||
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
|
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "numtide",
|
"owner": "edolstra",
|
||||||
"repo": "flake-utils",
|
"repo": "flake-compat",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"grub2-themes": {
|
"gitignore": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
|
"hyprland",
|
||||||
|
"pre-commit-hooks",
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1668213765,
|
"lastModified": 1709087332,
|
||||||
"narHash": "sha256-mTx1jAy6AOY4moWRGvCHYnUNX4qBL/ba47ZcIkhczJM=",
|
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
|
||||||
"owner": "vinceliuice",
|
"owner": "hercules-ci",
|
||||||
"repo": "grub2-themes",
|
"repo": "gitignore.nix",
|
||||||
"rev": "c106dfb9b5b18ad092ff0f952f2b734933e8283e",
|
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "vinceliuice",
|
"owner": "hercules-ci",
|
||||||
"repo": "grub2-themes",
|
"repo": "gitignore.nix",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"home-manager": {
|
"home-manager": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
|
"agenix",
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1703367386,
|
"lastModified": 1703113217,
|
||||||
"narHash": "sha256-FMbm48UGrBfOWGt8+opuS+uLBLQlRfhiYXhHNcYMS5k=",
|
"narHash": "sha256-7ulcXOk63TIT2lVDSExj7XzFx09LpdSAPtvgtM7yQPE=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "d5824a76bc6bb93d1dce9ebbbcb09a9b6abcc224",
|
"rev": "3bfaacf46133c037bb356193bd2f1765d9dc82c1",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"ref": "release-23.11",
|
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"home-manager_2": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1747556831,
|
||||||
|
"narHash": "sha256-Qb84nbYFFk0DzFeqVoHltS2RodAYY5/HZQKE8WnBDsc=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"rev": "d0bbd221482c2713cccb80220f3c9d16a6e20a33",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"ref": "release-25.05",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"hy3": {
|
||||||
|
"inputs": {
|
||||||
|
"hyprland": [
|
||||||
|
"hyprland"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1747077256,
|
||||||
|
"narHash": "sha256-ryaXKevnISRiJb93QIAv7tGc6ZJqSkwETKm4oGh8HWI=",
|
||||||
|
"owner": "outfoxxed",
|
||||||
|
"repo": "hy3",
|
||||||
|
"rev": "567dc9dd20e15d95a56a81c516a70dba30bc2c9c",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "outfoxxed",
|
||||||
|
"repo": "hy3",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"hyprcursor": {
|
||||||
|
"inputs": {
|
||||||
|
"hyprlang": [
|
||||||
|
"hyprland",
|
||||||
|
"hyprlang"
|
||||||
|
],
|
||||||
|
"nixpkgs": [
|
||||||
|
"hyprland",
|
||||||
|
"nixpkgs"
|
||||||
|
],
|
||||||
|
"systems": [
|
||||||
|
"hyprland",
|
||||||
|
"systems"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1745948457,
|
||||||
|
"narHash": "sha256-lzTV10FJTCGNtMdgW5YAhCAqezeAzKOd/97HbQK8GTU=",
|
||||||
|
"owner": "hyprwm",
|
||||||
|
"repo": "hyprcursor",
|
||||||
|
"rev": "ac903e80b33ba6a88df83d02232483d99f327573",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "hyprwm",
|
||||||
|
"repo": "hyprcursor",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"hyprcursor-rose-pine": {
|
||||||
|
"inputs": {
|
||||||
|
"hyprlang": "hyprlang",
|
||||||
|
"nixpkgs": "nixpkgs_2",
|
||||||
|
"utils": "utils"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1718180692,
|
||||||
|
"narHash": "sha256-J5IYvKcdGRL/sBuST5WaoESEIl7KPv8aJK8aLY6C91E=",
|
||||||
|
"owner": "ndom91",
|
||||||
|
"repo": "rose-pine-hyprcursor",
|
||||||
|
"rev": "40ce26cb29206722ff73839ead0d871d94751e90",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "ndom91",
|
||||||
|
"repo": "rose-pine-hyprcursor",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"hyprgraphics": {
|
||||||
|
"inputs": {
|
||||||
|
"hyprutils": [
|
||||||
|
"hyprland",
|
||||||
|
"hyprutils"
|
||||||
|
],
|
||||||
|
"nixpkgs": [
|
||||||
|
"hyprland",
|
||||||
|
"nixpkgs"
|
||||||
|
],
|
||||||
|
"systems": [
|
||||||
|
"hyprland",
|
||||||
|
"systems"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1745015490,
|
||||||
|
"narHash": "sha256-apEJ9zoSzmslhJ2vOKFcXTMZLUFYzh1ghfB6Rbw3Low=",
|
||||||
|
"owner": "hyprwm",
|
||||||
|
"repo": "hyprgraphics",
|
||||||
|
"rev": "60754910946b4e2dc1377b967b7156cb989c5873",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "hyprwm",
|
||||||
|
"repo": "hyprgraphics",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"hyprland": {
|
||||||
|
"inputs": {
|
||||||
|
"aquamarine": "aquamarine",
|
||||||
|
"hyprcursor": "hyprcursor",
|
||||||
|
"hyprgraphics": "hyprgraphics",
|
||||||
|
"hyprland-protocols": "hyprland-protocols",
|
||||||
|
"hyprland-qtutils": "hyprland-qtutils",
|
||||||
|
"hyprlang": "hyprlang_2",
|
||||||
|
"hyprutils": "hyprutils",
|
||||||
|
"hyprwayland-scanner": "hyprwayland-scanner",
|
||||||
|
"nixpkgs": "nixpkgs_3",
|
||||||
|
"pre-commit-hooks": "pre-commit-hooks",
|
||||||
|
"systems": "systems_4",
|
||||||
|
"xdph": "xdph"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1748036495,
|
||||||
|
"narHash": "sha256-kYyrhoxu8pZ/YHd2Yy2VNaRGeqydOh1OTayvknhweGg=",
|
||||||
|
"owner": "hyprwm",
|
||||||
|
"repo": "Hyprland",
|
||||||
|
"rev": "81cd526f923f4a9074bbfef59b4c7e9f3350c349",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "hyprwm",
|
||||||
|
"repo": "Hyprland",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"hyprland-plugins": {
|
||||||
|
"inputs": {
|
||||||
|
"hyprland": [
|
||||||
|
"hyprland"
|
||||||
|
],
|
||||||
|
"nixpkgs": [
|
||||||
|
"hyprland-plugins",
|
||||||
|
"hyprland",
|
||||||
|
"nixpkgs"
|
||||||
|
],
|
||||||
|
"systems": [
|
||||||
|
"hyprland-plugins",
|
||||||
|
"hyprland",
|
||||||
|
"systems"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1748089895,
|
||||||
|
"narHash": "sha256-XS2inFEyCsA91E2yRUlylHN7DUBwbLpqX1og4JDSXoE=",
|
||||||
|
"owner": "hyprwm",
|
||||||
|
"repo": "hyprland-plugins",
|
||||||
|
"rev": "c04dee3d0cd92423a2b970614ec4b423cf5a3f9c",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "hyprwm",
|
||||||
|
"repo": "hyprland-plugins",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"hyprland-protocols": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"hyprland",
|
||||||
|
"nixpkgs"
|
||||||
|
],
|
||||||
|
"systems": [
|
||||||
|
"hyprland",
|
||||||
|
"systems"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1743714874,
|
||||||
|
"narHash": "sha256-yt8F7NhMFCFHUHy/lNjH/pjZyIDFNk52Q4tivQ31WFo=",
|
||||||
|
"owner": "hyprwm",
|
||||||
|
"repo": "hyprland-protocols",
|
||||||
|
"rev": "3a5c2bda1c1a4e55cc1330c782547695a93f05b2",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "hyprwm",
|
||||||
|
"repo": "hyprland-protocols",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"hyprland-qt-support": {
|
||||||
|
"inputs": {
|
||||||
|
"hyprlang": [
|
||||||
|
"hyprland",
|
||||||
|
"hyprland-qtutils",
|
||||||
|
"hyprlang"
|
||||||
|
],
|
||||||
|
"nixpkgs": [
|
||||||
|
"hyprland",
|
||||||
|
"hyprland-qtutils",
|
||||||
|
"nixpkgs"
|
||||||
|
],
|
||||||
|
"systems": [
|
||||||
|
"hyprland",
|
||||||
|
"hyprland-qtutils",
|
||||||
|
"systems"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1737634706,
|
||||||
|
"narHash": "sha256-nGCibkfsXz7ARx5R+SnisRtMq21IQIhazp6viBU8I/A=",
|
||||||
|
"owner": "hyprwm",
|
||||||
|
"repo": "hyprland-qt-support",
|
||||||
|
"rev": "8810df502cdee755993cb803eba7b23f189db795",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "hyprwm",
|
||||||
|
"repo": "hyprland-qt-support",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"hyprland-qtutils": {
|
||||||
|
"inputs": {
|
||||||
|
"hyprland-qt-support": "hyprland-qt-support",
|
||||||
|
"hyprlang": [
|
||||||
|
"hyprland",
|
||||||
|
"hyprlang"
|
||||||
|
],
|
||||||
|
"hyprutils": [
|
||||||
|
"hyprland",
|
||||||
|
"hyprland-qtutils",
|
||||||
|
"hyprlang",
|
||||||
|
"hyprutils"
|
||||||
|
],
|
||||||
|
"nixpkgs": [
|
||||||
|
"hyprland",
|
||||||
|
"nixpkgs"
|
||||||
|
],
|
||||||
|
"systems": [
|
||||||
|
"hyprland",
|
||||||
|
"systems"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1745951494,
|
||||||
|
"narHash": "sha256-2dModE32doiyQMmd6EDAQeZnz+5LOs6KXyE0qX76WIg=",
|
||||||
|
"owner": "hyprwm",
|
||||||
|
"repo": "hyprland-qtutils",
|
||||||
|
"rev": "4be1d324faf8d6e82c2be9f8510d299984dfdd2e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "hyprwm",
|
||||||
|
"repo": "hyprland-qtutils",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"hyprlang": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"hyprcursor-rose-pine",
|
||||||
|
"nixpkgs"
|
||||||
|
],
|
||||||
|
"systems": "systems_2"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1709914708,
|
||||||
|
"narHash": "sha256-bR4o3mynoTa1Wi4ZTjbnsZ6iqVcPGriXp56bZh5UFTk=",
|
||||||
|
"owner": "hyprwm",
|
||||||
|
"repo": "hyprlang",
|
||||||
|
"rev": "a685493fdbeec01ca8ccdf1f3655c044a8ce2fe2",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "hyprwm",
|
||||||
|
"repo": "hyprlang",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"hyprlang_2": {
|
||||||
|
"inputs": {
|
||||||
|
"hyprutils": [
|
||||||
|
"hyprland",
|
||||||
|
"hyprutils"
|
||||||
|
],
|
||||||
|
"nixpkgs": [
|
||||||
|
"hyprland",
|
||||||
|
"nixpkgs"
|
||||||
|
],
|
||||||
|
"systems": [
|
||||||
|
"hyprland",
|
||||||
|
"systems"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1747484975,
|
||||||
|
"narHash": "sha256-+LAQ81HBwG0lwshHlWe0kfWg4KcChIPpnwtnwqmnoEU=",
|
||||||
|
"owner": "hyprwm",
|
||||||
|
"repo": "hyprlang",
|
||||||
|
"rev": "163c83b3db48a17c113729c220a60b94596c9291",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "hyprwm",
|
||||||
|
"repo": "hyprlang",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"hyprutils": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"hyprland",
|
||||||
|
"nixpkgs"
|
||||||
|
],
|
||||||
|
"systems": [
|
||||||
|
"hyprland",
|
||||||
|
"systems"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1746635225,
|
||||||
|
"narHash": "sha256-W9G9bb0zRYDBRseHbVez0J8qVpD5QbizX67H/vsudhM=",
|
||||||
|
"owner": "hyprwm",
|
||||||
|
"repo": "hyprutils",
|
||||||
|
"rev": "674ea57373f08b7609ce93baff131117a0dfe70d",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "hyprwm",
|
||||||
|
"repo": "hyprutils",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"hyprwayland-scanner": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"hyprland",
|
||||||
|
"nixpkgs"
|
||||||
|
],
|
||||||
|
"systems": [
|
||||||
|
"hyprland",
|
||||||
|
"systems"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1747584298,
|
||||||
|
"narHash": "sha256-PH9qZqWLHvSBQiUnA0NzAyQA3tu2no2z8kz0ZeHWj4w=",
|
||||||
|
"owner": "hyprwm",
|
||||||
|
"repo": "hyprwayland-scanner",
|
||||||
|
"rev": "e511882b9c2e1d7a75d45d8fddd2160daeafcbc3",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "hyprwm",
|
||||||
|
"repo": "hyprwayland-scanner",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nix-colors": {
|
"nix-colors": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"base16-schemes": "base16-schemes",
|
"base16-schemes": "base16-schemes",
|
||||||
"nixpkgs-lib": "nixpkgs-lib"
|
"nixpkgs-lib": "nixpkgs-lib"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1667165773,
|
"lastModified": 1707825078,
|
||||||
"narHash": "sha256-47gEPN7UKrNM+a3OKAFtNQeyc1/sSPgDm3OGCgphCyo=",
|
"narHash": "sha256-hTfge2J2W+42SZ7VHXkf4kjU+qzFqPeC9k66jAUBMHk=",
|
||||||
"owner": "misterio77",
|
"owner": "misterio77",
|
||||||
"repo": "nix-colors",
|
"repo": "nix-colors",
|
||||||
"rev": "a58fb210eb285920ec10f204d007185b3629cadc",
|
"rev": "b01f024090d2c4fc3152cd0cf12027a7b8453ba1",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -112,25 +543,27 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1669076005,
|
"lastModified": 1733015953,
|
||||||
"narHash": "sha256-uzMji2q9Pk3jUH+e5nEFtoOZCP4VV1PDRJRLVmriY0M=",
|
"narHash": "sha256-t4BBVpwG9B4hLgc6GUBuj3cjU7lP/PJfpTHuSqE+crk=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "69335c46c48a73f291d5c6f332fb9fe8b8e22b30",
|
"rev": "ac35b104800bff9028425fec3b6e8a41de2bbfff",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"id": "nixpkgs",
|
"owner": "NixOS",
|
||||||
"type": "indirect"
|
"ref": "nixos-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs-lib": {
|
"nixpkgs-lib": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1655599917,
|
"lastModified": 1697935651,
|
||||||
"narHash": "sha256-kjZbt5WdTrnjMxL79okg9TCoRUdADG50x/TWozbyTsE=",
|
"narHash": "sha256-qOfWjQ2JQSQL15KLh6D7xQhx0qgZlYZTYlcEiRuAMMw=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nixpkgs.lib",
|
"repo": "nixpkgs.lib",
|
||||||
"rev": "5fb55578aa2f1a502d636a8ac71aece57cb730bb",
|
"rev": "e1e11fdbb01113d85c7f41cada9d2847660e3902",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -139,29 +572,93 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nixpkgs-stable": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1732981179,
|
||||||
|
"narHash": "sha256-F7thesZPvAMSwjRu0K8uFshTk3ZZSNAsXTIFvXBT+34=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "62c435d93bf046a5396f3016472e8f7c8e2aed65",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixos-24.11",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1703467016,
|
"lastModified": 1710272261,
|
||||||
"narHash": "sha256-/5A/dNPhbQx/Oa2d+Get174eNI3LERQ7u6WTWOlR1eQ=",
|
"narHash": "sha256-g0bDwXFmTE7uGDOs9HcJsfLFhH7fOsASbAuOzDC+fhQ=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "0ad13a6833440b8e238947e47bea7f11071dc2b2",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs_3": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1747744144,
|
||||||
|
"narHash": "sha256-W7lqHp0qZiENCDwUZ5EX/lNhxjMdNapFnbErcbnP11Q=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "2795c506fe8fb7b03c36ccb51f75b6df0ab2553f",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs_4": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1747953325,
|
||||||
|
"narHash": "sha256-y2ZtlIlNTuVJUZCqzZAhIw5rrKP4DOSklev6c8PyCkQ=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "d02d818f22c777aa4e854efc3242ec451e5d462a",
|
"rev": "55d1f923c480dadce40f5231feb472e81b0bab48",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"ref": "nixos-23.11",
|
"ref": "nixos-25.05",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs_5": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1727348695,
|
||||||
|
"narHash": "sha256-J+PeFKSDV+pHL7ukkfpVzCOO7mBSrrpJ3svwBFABbhI=",
|
||||||
|
"owner": "nixos",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "1925c603f17fc89f4c8f6bf6f631a802ad85d784",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nixos",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nur": {
|
"nur": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1669288341,
|
"lastModified": 1733136078,
|
||||||
"narHash": "sha256-lGwsFdSDb+IBXSJwKhNLOP2yt7PDXxbL0uxN9ZVOy8I=",
|
"narHash": "sha256-F+gLv1YTOfP5BP0kHPEOLtrJWL1s3XGoaBhfwDsndNw=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "NUR",
|
"repo": "NUR",
|
||||||
"rev": "107aad385e04edf5b4bd4136bf8defcd890ecfc7",
|
"rev": "aadc32a2305cd303d1866be1d500ad6f7b344b82",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -170,14 +667,179 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"pre-commit-hooks": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-compat": "flake-compat",
|
||||||
|
"gitignore": "gitignore",
|
||||||
|
"nixpkgs": [
|
||||||
|
"hyprland",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1747372754,
|
||||||
|
"narHash": "sha256-2Y53NGIX2vxfie1rOW0Qb86vjRZ7ngizoo+bnXU9D9k=",
|
||||||
|
"owner": "cachix",
|
||||||
|
"repo": "git-hooks.nix",
|
||||||
|
"rev": "80479b6ec16fefd9c1db3ea13aeb038c60530f46",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "cachix",
|
||||||
|
"repo": "git-hooks.nix",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
|
"agenix": "agenix",
|
||||||
"emacs-overlay": "emacs-overlay",
|
"emacs-overlay": "emacs-overlay",
|
||||||
"grub2-themes": "grub2-themes",
|
"home-manager": "home-manager_2",
|
||||||
"home-manager": "home-manager",
|
"hy3": "hy3",
|
||||||
|
"hyprcursor-rose-pine": "hyprcursor-rose-pine",
|
||||||
|
"hyprland": "hyprland",
|
||||||
|
"hyprland-plugins": "hyprland-plugins",
|
||||||
"nix-colors": "nix-colors",
|
"nix-colors": "nix-colors",
|
||||||
"nixpkgs": "nixpkgs_2",
|
"nixpkgs": "nixpkgs_4",
|
||||||
"nur": "nur"
|
"nur": "nur",
|
||||||
|
"zen-browser": "zen-browser"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"systems": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1681028828,
|
||||||
|
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"systems_2": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1689347949,
|
||||||
|
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default-linux",
|
||||||
|
"rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default-linux",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"systems_3": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1681028828,
|
||||||
|
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"systems_4": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1689347949,
|
||||||
|
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default-linux",
|
||||||
|
"rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default-linux",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"utils": {
|
||||||
|
"inputs": {
|
||||||
|
"systems": "systems_3"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1710146030,
|
||||||
|
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"xdph": {
|
||||||
|
"inputs": {
|
||||||
|
"hyprland-protocols": [
|
||||||
|
"hyprland",
|
||||||
|
"hyprland-protocols"
|
||||||
|
],
|
||||||
|
"hyprlang": [
|
||||||
|
"hyprland",
|
||||||
|
"hyprlang"
|
||||||
|
],
|
||||||
|
"hyprutils": [
|
||||||
|
"hyprland",
|
||||||
|
"hyprutils"
|
||||||
|
],
|
||||||
|
"hyprwayland-scanner": [
|
||||||
|
"hyprland",
|
||||||
|
"hyprwayland-scanner"
|
||||||
|
],
|
||||||
|
"nixpkgs": [
|
||||||
|
"hyprland",
|
||||||
|
"nixpkgs"
|
||||||
|
],
|
||||||
|
"systems": [
|
||||||
|
"hyprland",
|
||||||
|
"systems"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1745871725,
|
||||||
|
"narHash": "sha256-M24SNc2flblWGXFkGQfqSlEOzAGZnMc9QG3GH4K/KbE=",
|
||||||
|
"owner": "hyprwm",
|
||||||
|
"repo": "xdg-desktop-portal-hyprland",
|
||||||
|
"rev": "76bbf1a6b1378e4ab5230bad00ad04bc287c969e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "hyprwm",
|
||||||
|
"repo": "xdg-desktop-portal-hyprland",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"zen-browser": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": "nixpkgs_5"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1739222645,
|
||||||
|
"narHash": "sha256-6FsTAjrO0TN5+gVxx3hmWqEJWs1sJ1p3E8DKWHdlN6M=",
|
||||||
|
"owner": "youwen5",
|
||||||
|
"repo": "zen-browser-flake",
|
||||||
|
"rev": "7e60ade066a54797b376ebaf554bc2efa255ff8a",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "youwen5",
|
||||||
|
"repo": "zen-browser-flake",
|
||||||
|
"type": "github"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
39
flake.nix
39
flake.nix
@@ -4,12 +4,18 @@
|
|||||||
inputs = {
|
inputs = {
|
||||||
|
|
||||||
# - Nixpkgs ----------------------------------
|
# - Nixpkgs ----------------------------------
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11";
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.05";
|
||||||
|
|
||||||
# - Home-Manager -----------------------------
|
# - Home Manager -----------------------------
|
||||||
home-manager.url = "github:nix-community/home-manager/release-23.11";
|
home-manager.url = "github:nix-community/home-manager/release-25.05";
|
||||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
||||||
|
# - Agenix -----------------------------------
|
||||||
|
agenix.url = "github:ryantm/agenix";
|
||||||
|
agenix.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
# optionally choose not to download darwin deps (saves some resources on Linux)
|
||||||
|
agenix.inputs.darwin.follows = "";
|
||||||
|
|
||||||
# - NUR --------------------------------------
|
# - NUR --------------------------------------
|
||||||
nur.url = "github:nix-community/NUR";
|
nur.url = "github:nix-community/NUR";
|
||||||
|
|
||||||
@@ -17,11 +23,23 @@
|
|||||||
emacs-overlay.url = "github:nix-community/emacs-overlay";
|
emacs-overlay.url = "github:nix-community/emacs-overlay";
|
||||||
|
|
||||||
# - Themeing ---------------------------------
|
# - Themeing ---------------------------------
|
||||||
grub2-themes.url = "github:vinceliuice/grub2-themes";
|
|
||||||
grub2-themes.inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
|
|
||||||
nix-colors.url = "github:misterio77/nix-colors";
|
nix-colors.url = "github:misterio77/nix-colors";
|
||||||
|
|
||||||
|
# - Hyprland ---------------------------------
|
||||||
|
hyprland.url = "github:hyprwm/Hyprland";
|
||||||
|
hyprland-plugins = {
|
||||||
|
url = "github:hyprwm/hyprland-plugins";
|
||||||
|
inputs.hyprland.follows = "hyprland";
|
||||||
|
};
|
||||||
|
hy3 = {
|
||||||
|
url = "github:outfoxxed/hy3";
|
||||||
|
inputs.hyprland.follows = "hyprland";
|
||||||
|
};
|
||||||
|
hyprcursor-rose-pine.url = "github:ndom91/rose-pine-hyprcursor";
|
||||||
|
|
||||||
|
# - More stuff -------------------------------
|
||||||
|
zen-browser.url = "github:youwen5/zen-browser-flake";
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = inputs @ { self, nixpkgs, home-manager, ... }:
|
outputs = inputs @ { self, nixpkgs, home-manager, ... }:
|
||||||
@@ -48,7 +66,14 @@
|
|||||||
[
|
[
|
||||||
inputs.home-manager.nixosModules.home-manager
|
inputs.home-manager.nixosModules.home-manager
|
||||||
inputs.nix-colors.homeManagerModule
|
inputs.nix-colors.homeManagerModule
|
||||||
inputs.grub2-themes.nixosModule
|
# Agenix
|
||||||
|
inputs.agenix.nixosModules.default
|
||||||
|
{
|
||||||
|
environment.systemPackages = [
|
||||||
|
inputs.agenix.packages.${system}.default
|
||||||
|
pkgs.age
|
||||||
|
];
|
||||||
|
}
|
||||||
]
|
]
|
||||||
# All my personal modules
|
# All my personal modules
|
||||||
++ (lib.my.mapModulesRec' (toString ./modules) import);
|
++ (lib.my.mapModulesRec' (toString ./modules) import);
|
||||||
|
|||||||
@@ -4,15 +4,20 @@ with lib;
|
|||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./hardware.nix
|
./hardware.nix
|
||||||
|
./secrets.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
# - Basic --------------------------------------
|
# - Basic --------------------------------------
|
||||||
|
|
||||||
user.name = "marc";
|
user.name = "marc";
|
||||||
user.shell = pkgs.zsh;
|
user.shell = pkgs.zsh;
|
||||||
networking.hostName = "hvannadal";
|
networking = {
|
||||||
networking.firewall = {
|
hostName = "quinto";
|
||||||
enable = true;
|
firewall = {
|
||||||
|
enable = false;
|
||||||
|
allowedUDPPorts = [
|
||||||
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# - Bootloader ---------------------------------
|
# - Bootloader ---------------------------------
|
||||||
@@ -22,6 +27,12 @@ with lib;
|
|||||||
device = "/dev/vda";
|
device = "/dev/vda";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# - Agenix ---------------------------------
|
||||||
|
|
||||||
|
age.identityPaths = [
|
||||||
|
"/home/marc/.ssh/id_ed25519"
|
||||||
|
];
|
||||||
|
|
||||||
# - Modules ------------------------------------
|
# - Modules ------------------------------------
|
||||||
|
|
||||||
samfelag.modules = {
|
samfelag.modules = {
|
||||||
@@ -30,10 +41,9 @@ with lib;
|
|||||||
|
|
||||||
# - System -----------------------------------
|
# - System -----------------------------------
|
||||||
system.utils.enable = true;
|
system.utils.enable = true;
|
||||||
system.gpg.enable = true;
|
|
||||||
system.pass.enable = true;
|
|
||||||
system.ssh.enable = true;
|
system.ssh.enable = true;
|
||||||
system.sshfs.enable = true;
|
|
||||||
|
# - Server ----------------------------------
|
||||||
|
|
||||||
# - Editors and development ------------------
|
# - Editors and development ------------------
|
||||||
dev.git.userName = "marc";
|
dev.git.userName = "marc";
|
||||||
35
hosts/quinto/hardware.nix
Normal file
35
hosts/quinto/hardware.nix
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
{ config, lib, pkgs, modulesPath, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [ ];
|
||||||
|
|
||||||
|
boot = {
|
||||||
|
initrd = {
|
||||||
|
availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "sr_mod" "virtio_blk" ];
|
||||||
|
kernelModules = [ ];
|
||||||
|
};
|
||||||
|
kernelModules = [ ];
|
||||||
|
extraModulePackages = [ ];
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems = {
|
||||||
|
"/" = {
|
||||||
|
device = "/dev/disk/by-label/nixos";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
swapDevices = [
|
||||||
|
{ device = "/dev/disk/by-label/swap"; }
|
||||||
|
];
|
||||||
|
|
||||||
|
networking = {
|
||||||
|
useDHCP = lib.mkDefault true;
|
||||||
|
interfaces = {
|
||||||
|
ens3.useDHCP = lib.mkDefault true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
virtualisation.hypervGuest.enable = true;
|
||||||
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
}
|
||||||
2
hosts/quinto/quinto.org
Normal file
2
hosts/quinto/quinto.org
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
* Quinto
|
||||||
|
Servidor a Vultr per a la cua del quinto
|
||||||
6
hosts/quinto/secrets.nix
Normal file
6
hosts/quinto/secrets.nix
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{ ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
age.secrets = {
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
with lib;
|
with lib;
|
||||||
let
|
let
|
||||||
nix-colors-lib = inputs.nix-colors.lib-contrib { inherit pkgs; };
|
nix-colors-lib = inputs.nix-colors.lib-contrib { inherit pkgs; };
|
||||||
wallpaper = ../../data/wallpapers/simple/tarmac.png;
|
wallpaper = ../../data/wallpapers/globus.jpg;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
@@ -39,6 +39,12 @@ in
|
|||||||
kind = "dark";
|
kind = "dark";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# - Agenix ---------------------------------
|
||||||
|
|
||||||
|
age.identityPaths = [
|
||||||
|
"/home/marc/.ssh/id_ed25519"
|
||||||
|
];
|
||||||
|
|
||||||
# - Modules ------------------------------------
|
# - Modules ------------------------------------
|
||||||
|
|
||||||
samfelag.modules = {
|
samfelag.modules = {
|
||||||
@@ -57,11 +63,26 @@ in
|
|||||||
system.pass.enable = true;
|
system.pass.enable = true;
|
||||||
system.sshfs.enable = true;
|
system.sshfs.enable = true;
|
||||||
|
|
||||||
|
server.vatnajokull.enable = true;
|
||||||
|
|
||||||
|
# - Keyboards -
|
||||||
|
system.kanata.enable = true;
|
||||||
|
system.devices.voyager.enable = true;
|
||||||
|
|
||||||
|
system.input = {
|
||||||
|
japanese.enable = true;
|
||||||
|
greek.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
# - Desktop ----------------------------------
|
# - Desktop ----------------------------------
|
||||||
desktop = {
|
desktop = {
|
||||||
inherit wallpaper;
|
inherit wallpaper;
|
||||||
enable = true;
|
|
||||||
laptop = true;
|
# Use Γραφείο (custom) desktop environment
|
||||||
|
grapheio.enable = true;
|
||||||
|
|
||||||
|
# # Add greek keyboard layout -- currently commented as fcitx5 adds greek support
|
||||||
|
# wm.hyprland.kb_layout = "es,gr";
|
||||||
};
|
};
|
||||||
|
|
||||||
# - Editors and development ------------------
|
# - Editors and development ------------------
|
||||||
@@ -75,9 +96,11 @@ in
|
|||||||
dev.docker.users = ["marc"];
|
dev.docker.users = ["marc"];
|
||||||
|
|
||||||
# - Other apps -------------------------------
|
# - Other apps -------------------------------
|
||||||
|
app.anki.enable = true;
|
||||||
app.spotify.enable = true;
|
app.spotify.enable = true;
|
||||||
app.skype.enable = true;
|
# app.skype.enable = true;
|
||||||
app.nextcloud.enable = true;
|
app.nextcloud.enable = true;
|
||||||
|
app.yazi.enable = true;
|
||||||
|
|
||||||
# - Gaming -----------------------------------
|
# - Gaming -----------------------------------
|
||||||
gaming.lutris.enable = true;
|
gaming.lutris.enable = true;
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
};
|
};
|
||||||
kernelModules = [ "kvm-intel" ];
|
kernelModules = [ "kvm-intel" ];
|
||||||
extraModulePackages = [ ];
|
extraModulePackages = [ ];
|
||||||
|
supportedFilesystems = [ "ntfs" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems = {
|
fileSystems = {
|
||||||
@@ -22,13 +23,6 @@
|
|||||||
device = "/dev/disk/by-label/BOOT";
|
device = "/dev/disk/by-label/BOOT";
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
};
|
};
|
||||||
|
|
||||||
"/mnt/vatnajokull" = {
|
|
||||||
device = "vatnajokull:/mnt/raid1";
|
|
||||||
fsType = "nfs";
|
|
||||||
options = [ "x-systemd.automount" "noauto" "noatime" "x-systemd.idle-timeout=600"];
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
swapDevices = [
|
swapDevices = [
|
||||||
|
|||||||
12
hosts/reykjavik/secrets.nix
Normal file
12
hosts/reykjavik/secrets.nix
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
{ ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
age.secrets = {
|
||||||
|
"consul.d/agent-token-reykjavik.json" = {
|
||||||
|
file = ../../secrets/consul.d/agent-token-reykjavik.json.age;
|
||||||
|
owner = "consul";
|
||||||
|
group = "consul";
|
||||||
|
mode = "644";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
73
hosts/thingvellir/default.nix
Normal file
73
hosts/thingvellir/default.nix
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
{ config, pkgs, lib, inputs, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./hardware.nix
|
||||||
|
./secrets.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
# - Basic --------------------------------------
|
||||||
|
|
||||||
|
user.name = "marc";
|
||||||
|
user.shell = pkgs.zsh;
|
||||||
|
networking = {
|
||||||
|
hostName = "thingvellir";
|
||||||
|
firewall = {
|
||||||
|
enable = false;
|
||||||
|
allowedUDPPorts = [
|
||||||
|
53 # DNS (pihole + unbound)
|
||||||
|
8600 # Consul DNS
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# - Bootloader ---------------------------------
|
||||||
|
|
||||||
|
boot.loader.grub = {
|
||||||
|
enable = true;
|
||||||
|
device = "/dev/vda";
|
||||||
|
};
|
||||||
|
|
||||||
|
# - Agenix ---------------------------------
|
||||||
|
|
||||||
|
age.identityPaths = [
|
||||||
|
"/home/marc/.ssh/id_ed25519"
|
||||||
|
];
|
||||||
|
|
||||||
|
# - Modules ------------------------------------
|
||||||
|
|
||||||
|
samfelag.modules = {
|
||||||
|
# - Common -----------------------------------
|
||||||
|
# See modules/common.nix for common packages installed
|
||||||
|
|
||||||
|
# - System -----------------------------------
|
||||||
|
system.utils.enable = true;
|
||||||
|
system.gpg.enable = true;
|
||||||
|
system.pass.enable = true;
|
||||||
|
system.ssh.enable = true;
|
||||||
|
system.sshfs.enable = true;
|
||||||
|
|
||||||
|
# - Server ----------------------------------
|
||||||
|
server.consul = {
|
||||||
|
enable = true;
|
||||||
|
server = true;
|
||||||
|
agent-token = config.age.secrets."consul.d/agent-token-thingvellir.json".path;
|
||||||
|
server-cert = config.age.secrets."consul.d/samfelag-server-thingvellir.pem".path;
|
||||||
|
server-cert-key = config.age.secrets."consul.d/samfelag-server-thingvellir-key.pem".path;
|
||||||
|
};
|
||||||
|
server.nomad = {
|
||||||
|
enable = true;
|
||||||
|
server = true;
|
||||||
|
host-config = ../../config/nomad.d/host-thingvellir.hcl;
|
||||||
|
};
|
||||||
|
server.vatnajokull.enable = true;
|
||||||
|
|
||||||
|
# - Editors and development ------------------
|
||||||
|
dev.git.userName = "marc";
|
||||||
|
dev.git.userEmail = "marc@sastre.cat";
|
||||||
|
|
||||||
|
dev.docker.enable = true;
|
||||||
|
dev.docker.users = ["marc"];
|
||||||
|
};
|
||||||
|
}
|
||||||
24
hosts/thingvellir/secrets.nix
Normal file
24
hosts/thingvellir/secrets.nix
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
{ ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
age.secrets = {
|
||||||
|
"consul.d/agent-token-thingvellir.json" = {
|
||||||
|
file = ../../secrets/consul.d/agent-token-thingvellir.json.age;
|
||||||
|
owner = "consul";
|
||||||
|
group = "consul";
|
||||||
|
mode = "644";
|
||||||
|
};
|
||||||
|
"consul.d/samfelag-server-thingvellir.pem" = {
|
||||||
|
file = ../../secrets/consul.d/samfelag-server-thingvellir.pem.age;
|
||||||
|
owner = "consul";
|
||||||
|
group = "consul";
|
||||||
|
mode = "644";
|
||||||
|
};
|
||||||
|
"consul.d/samfelag-server-thingvellir-key.pem" = {
|
||||||
|
file = ../../secrets/consul.d/samfelag-server-thingvellir-key.pem.age;
|
||||||
|
owner = "consul";
|
||||||
|
group = "consul";
|
||||||
|
mode = "600";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,2 +1,2 @@
|
|||||||
* Hvanndal
|
* Thingvellir
|
||||||
Servidor a Vultr
|
Servidor a Vultr
|
||||||
@@ -2,7 +2,8 @@
|
|||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.samfelag.modules.app.alacritty;
|
cfg = config.samfelag.modules.app.alacritty;
|
||||||
i3Cfg = config.samfelag.modules.desktop.i3;
|
i3Cfg = config.samfelag.modules.desktop.wm.i3;
|
||||||
|
hyprCfg = config.samfelag.modules.desktop.wm.hyprland;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.samfelag.modules.app.alacritty = {
|
options.samfelag.modules.app.alacritty = {
|
||||||
@@ -17,44 +18,54 @@ in
|
|||||||
|
|
||||||
fonts.packages = with pkgs; [
|
fonts.packages = with pkgs; [
|
||||||
iosevka
|
iosevka
|
||||||
(nerdfonts.override { fonts = [ "Iosevka" ]; })
|
pkgs.nerd-fonts.iosevka
|
||||||
];
|
];
|
||||||
|
|
||||||
hm.xdg.configFile."alacritty/alacritty.yml".source = ../../config/alacritty/alacritty.yml;
|
hm.xdg.configFile."alacritty/alacritty.toml".source = ../../config/alacritty/alacritty.toml;
|
||||||
|
|
||||||
# - Themeing ---------------------------------
|
# - Themeing ---------------------------------
|
||||||
hm.xdg.configFile."alacritty/theme.yml".text = ''
|
hm.xdg.configFile."alacritty/theme.toml".text = ''
|
||||||
colors:
|
[colors]
|
||||||
primary:
|
draw_bold_text_with_bright_colors = false
|
||||||
background: '0x${config.colorScheme.colors.base00}'
|
|
||||||
foreground: '0x${config.colorScheme.colors.base05}'
|
[colors.primary]
|
||||||
cursor:
|
background = "0x${config.colorScheme.palette.base00}"
|
||||||
text: '0x${config.colorScheme.colors.base00}'
|
foreground = "0x${config.colorScheme.palette.base05}"
|
||||||
cursor: '0x${config.colorScheme.colors.base05}'
|
|
||||||
normal:
|
[colors.cursor]
|
||||||
black: '0x${config.colorScheme.colors.base00}'
|
text = "0x${config.colorScheme.palette.base00}"
|
||||||
red: '0x${config.colorScheme.colors.base08}'
|
cursor = "0x${config.colorScheme.palette.base05}"
|
||||||
green: '0x${config.colorScheme.colors.base0B}'
|
|
||||||
yellow: '0x${config.colorScheme.colors.base0A}'
|
[colors.normal]
|
||||||
blue: '0x${config.colorScheme.colors.base0D}'
|
black = "0x${config.colorScheme.palette.base00}"
|
||||||
magenta: '0x${config.colorScheme.colors.base0E}'
|
red = "0x${config.colorScheme.palette.base08}"
|
||||||
cyan: '0x${config.colorScheme.colors.base0C}'
|
green = "0x${config.colorScheme.palette.base0B}"
|
||||||
white: '0x${config.colorScheme.colors.base05}'
|
yellow = "0x${config.colorScheme.palette.base0A}"
|
||||||
bright:
|
blue = "0x${config.colorScheme.palette.base0D}"
|
||||||
black: '0x${config.colorScheme.colors.base03}'
|
magenta = "0x${config.colorScheme.palette.base0E}"
|
||||||
red: '0x${config.colorScheme.colors.base09}'
|
cyan = "0x${config.colorScheme.palette.base0C}"
|
||||||
green: '0x${config.colorScheme.colors.base01}'
|
white = "0x${config.colorScheme.palette.base05}"
|
||||||
yellow: '0x${config.colorScheme.colors.base02}'
|
|
||||||
blue: '0x${config.colorScheme.colors.base04}'
|
[colors.bright]
|
||||||
magenta: '0x${config.colorScheme.colors.base06}'
|
black = "0x${config.colorScheme.palette.base03}"
|
||||||
cyan: '0x${config.colorScheme.colors.base0F}'
|
red = "0x${config.colorScheme.palette.base09}"
|
||||||
white: '0x${config.colorScheme.colors.base07}'
|
green = "0x${config.colorScheme.palette.base01}"
|
||||||
draw_bold_text_with_bright_colors: false
|
yellow = "0x${config.colorScheme.palette.base02}"
|
||||||
|
blue = "0x${config.colorScheme.palette.base04}"
|
||||||
|
magenta = "0x${config.colorScheme.palette.base06}"
|
||||||
|
cyan = "0x${config.colorScheme.palette.base0F}"
|
||||||
|
white = "0x${config.colorScheme.palette.base07}"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
samfelag.modules.desktop.i3.extraKeybindings = lib.mkIf i3Cfg.enable {
|
samfelag.modules.desktop.wm.i3.extraKeybindings = lib.mkIf i3Cfg.enable {
|
||||||
"${i3Cfg.mod}+Return" = "exec ${pkgs.alacritty}/bin/alacritty";
|
"${i3Cfg.mod}+Return" = "exec ${pkgs.alacritty}/bin/alacritty";
|
||||||
"${i3Cfg.mod}+Shift+Return" = "exec ${pkgs.alacritty}/bin/alacritty -t floating-term";
|
"${i3Cfg.mod}+Shift+Return" = "exec ${pkgs.alacritty}/bin/alacritty -t floating-term";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
samfelag.modules.desktop.wm.hyprland.extraKeybindings = lib.mkIf hyprCfg.enable [
|
||||||
|
"${hyprCfg.mod}, Return, exec, ${pkgs.alacritty}/bin/alacritty"
|
||||||
|
"${hyprCfg.mod} SHIFT, Return, exec, [float] ${pkgs.alacritty}/bin/alacritty"
|
||||||
|
];
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
15
modules/app/anki.nix
Normal file
15
modules/app/anki.nix
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.samfelag.modules.app.anki;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.samfelag.modules.app.anki = {
|
||||||
|
enable = lib.mkEnableOption "anki";
|
||||||
|
};
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
hm.home.packages = with pkgs; [
|
||||||
|
anki
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -2,7 +2,8 @@
|
|||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.samfelag.modules.app.firefox;
|
cfg = config.samfelag.modules.app.firefox;
|
||||||
i3Cfg = config.samfelag.modules.desktop.i3;
|
i3Cfg = config.samfelag.modules.desktop.wm.i3;
|
||||||
|
hyprCfg = config.samfelag.modules.desktop.wm.hyprland;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.samfelag.modules.app.firefox = {
|
options.samfelag.modules.app.firefox = {
|
||||||
@@ -13,10 +14,6 @@ in
|
|||||||
firefox
|
firefox
|
||||||
];
|
];
|
||||||
|
|
||||||
samfelag.modules.desktop.i3.extraKeybindings = lib.mkIf i3Cfg.enable {
|
|
||||||
"${i3Cfg.mod}+Shift+i" = "exec ${pkgs.firefox}/bin/firefox";
|
|
||||||
};
|
|
||||||
|
|
||||||
hm.programs.firefox = {
|
hm.programs.firefox = {
|
||||||
enable = true;
|
enable = true;
|
||||||
# extensions = with pkgs.nur.repos.rycee.firefox-addons; [
|
# extensions = with pkgs.nur.repos.rycee.firefox-addons; [
|
||||||
@@ -30,5 +27,12 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
samfelag.modules.desktop.wm.i3.extraKeybindings = lib.mkIf i3Cfg.enable {
|
||||||
|
"${i3Cfg.mod}+Shift+i" = "exec ${pkgs.firefox}/bin/firefox";
|
||||||
|
};
|
||||||
|
|
||||||
|
samfelag.modules.desktop.wm.hyprland.extraKeybindings = lib.mkIf hyprCfg.enable [
|
||||||
|
"${hyprCfg.mod} SHIFT, i, exec, ${pkgs.firefox}/bin/firefox"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
44
modules/app/ghostty.nix
Normal file
44
modules/app/ghostty.nix
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.samfelag.modules.app.ghostty;
|
||||||
|
i3Cfg = config.samfelag.modules.desktop.wm.i3;
|
||||||
|
hyprCfg = config.samfelag.modules.desktop.wm.hyprland;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.samfelag.modules.app.ghostty = {
|
||||||
|
enable = lib.mkEnableOption "ghostty";
|
||||||
|
};
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
hm.home.packages = with pkgs; [
|
||||||
|
ghostty
|
||||||
|
];
|
||||||
|
|
||||||
|
fonts.fontconfig.enable = true;
|
||||||
|
|
||||||
|
fonts.packages = with pkgs; [
|
||||||
|
iosevka
|
||||||
|
pkgs.nerd-fonts.iosevka
|
||||||
|
];
|
||||||
|
|
||||||
|
hm.xdg.configFile."ghostty/config".text = ''
|
||||||
|
background = "${config.colorScheme.palette.base00}"
|
||||||
|
foreground = "${config.colorScheme.palette.base05}"
|
||||||
|
|
||||||
|
font-family = "Iosevka Nerd Font"
|
||||||
|
background-opacity = 0.85
|
||||||
|
background-blur = true
|
||||||
|
'';
|
||||||
|
|
||||||
|
samfelag.modules.desktop.wm.i3.extraKeybindings = lib.mkIf i3Cfg.enable {
|
||||||
|
"${i3Cfg.mod}+Return" = "exec ${pkgs.ghostty}/bin/ghostty";
|
||||||
|
# "${i3Cfg.mod}+Shift+Return" = "exec ${pkgs.ghostty}/bin/ghostty -t floating-term";
|
||||||
|
};
|
||||||
|
|
||||||
|
samfelag.modules.desktop.wm.hyprland.extraKeybindings = lib.mkIf hyprCfg.enable [
|
||||||
|
"${hyprCfg.mod}, Return, exec, ${pkgs.ghostty}/bin/ghostty"
|
||||||
|
"${hyprCfg.mod} SHIFT, Return, exec, [float] ${pkgs.ghostty}/bin/ghostty"
|
||||||
|
];
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -2,7 +2,8 @@
|
|||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.samfelag.modules.app.spotify;
|
cfg = config.samfelag.modules.app.spotify;
|
||||||
i3Cfg = config.samfelag.modules.desktop.i3;
|
i3Cfg = config.samfelag.modules.desktop.wm.i3;
|
||||||
|
hyprCfg = config.samfelag.modules.desktop.wm.hyprland;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.samfelag.modules.app.spotify = {
|
options.samfelag.modules.app.spotify = {
|
||||||
@@ -13,8 +14,12 @@ in
|
|||||||
spotify
|
spotify
|
||||||
];
|
];
|
||||||
|
|
||||||
samfelag.modules.desktop.i3.extraKeybindings = lib.mkIf i3Cfg.enable {
|
samfelag.modules.desktop.wm.i3.extraKeybindings = lib.mkIf i3Cfg.enable {
|
||||||
"${i3Cfg.mod}+Shift+m" = "exec ${pkgs.spotify}/bin/spotify";
|
"${i3Cfg.mod}+Shift+m" = "exec ${pkgs.spotify}/bin/spotify";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
samfelag.modules.desktop.wm.hyprland.extraKeybindings = lib.mkIf hyprCfg.enable [
|
||||||
|
"${hyprCfg.mod} SHIFT, m, exec, ${pkgs.spotify}/bin/spotify"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
34
modules/app/yazi.nix
Normal file
34
modules/app/yazi.nix
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.samfelag.modules.app.yazi;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.samfelag.modules.app.yazi = {
|
||||||
|
enable = lib.mkEnableOption "yazi";
|
||||||
|
};
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
hm.home.packages = with pkgs; [
|
||||||
|
yazi
|
||||||
|
ffmpeg
|
||||||
|
ffmpegthumbnailer
|
||||||
|
jq
|
||||||
|
poppler
|
||||||
|
fd
|
||||||
|
ripgrep
|
||||||
|
fzf
|
||||||
|
zoxide
|
||||||
|
imagemagick
|
||||||
|
wl-clipboard
|
||||||
|
];
|
||||||
|
|
||||||
|
fonts.fontconfig.enable = true;
|
||||||
|
|
||||||
|
fonts.packages = with pkgs; [
|
||||||
|
iosevka
|
||||||
|
pkgs.nerd-fonts.iosevka
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
26
modules/app/zen-browser.nix
Normal file
26
modules/app/zen-browser.nix
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
{ config, lib, pkgs, inputs, system, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.samfelag.modules.app.zen-browser;
|
||||||
|
i3Cfg = config.samfelag.modules.desktop.wm.i3;
|
||||||
|
hyprCfg = config.samfelag.modules.desktop.wm.hyprland;
|
||||||
|
zen-pkg = inputs.zen-browser.packages."${system}".default;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.samfelag.modules.app.zen-browser = {
|
||||||
|
enable = lib.mkEnableOption "zen-browser";
|
||||||
|
};
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
zen-pkg
|
||||||
|
];
|
||||||
|
|
||||||
|
samfelag.modules.desktop.wm.i3.extraKeybindings = lib.mkIf i3Cfg.enable {
|
||||||
|
"${i3Cfg.mod}+Shift+i" = "exec ${zen-pkg}/bin/zen";
|
||||||
|
};
|
||||||
|
|
||||||
|
samfelag.modules.desktop.wm.hyprland.extraKeybindings = lib.mkIf hyprCfg.enable [
|
||||||
|
"${hyprCfg.mod} SHIFT, i, exec, ${zen-pkg}/bin/zen"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -11,9 +11,9 @@
|
|||||||
system.stateVersion = "22.05";
|
system.stateVersion = "22.05";
|
||||||
|
|
||||||
nix = {
|
nix = {
|
||||||
package = pkgs.nixFlakes;
|
package = pkgs.nixVersions.stable;
|
||||||
|
|
||||||
extraOptions = lib.optionalString (config.nix.package == pkgs.nixFlakes)
|
extraOptions = lib.optionalString (config.nix.package == pkgs.nixVersions.stable)
|
||||||
"experimental-features = nix-command flakes";
|
"experimental-features = nix-command flakes";
|
||||||
|
|
||||||
gc = {
|
gc = {
|
||||||
@@ -27,11 +27,11 @@
|
|||||||
# - Locale -------------------------------------
|
# - Locale -------------------------------------
|
||||||
|
|
||||||
time.timeZone = "Europe/Madrid";
|
time.timeZone = "Europe/Madrid";
|
||||||
i18n.defaultLocale = "ca_ES.utf8";
|
i18n.defaultLocale = "ca_ES.UTF-8";
|
||||||
console.keyMap = "es";
|
console.keyMap = "es";
|
||||||
services.xserver = {
|
services.xserver.xkb = {
|
||||||
layout = "es";
|
layout = "es";
|
||||||
xkbVariant = "cat";
|
variant = "cat";
|
||||||
};
|
};
|
||||||
|
|
||||||
# - Packages -----------------------------------
|
# - Packages -----------------------------------
|
||||||
|
|||||||
@@ -3,75 +3,11 @@
|
|||||||
with lib;
|
with lib;
|
||||||
let
|
let
|
||||||
cfg = config.samfelag.modules.desktop;
|
cfg = config.samfelag.modules.desktop;
|
||||||
laptopPkgs = with pkgs; [
|
|
||||||
];
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.samfelag.modules.desktop = {
|
options.samfelag.modules.desktop = {
|
||||||
|
# Define generic desktop options to be used by the environments
|
||||||
enable = mkEnableOption "desktop environment";
|
|
||||||
|
|
||||||
laptop = mkOption {
|
|
||||||
description = "Enable features for a laptop (trackpad, battery, etc...)";
|
|
||||||
type = types.bool;
|
|
||||||
default = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
wallpaper = my.mkOpt' types.path ../../data/wallpaper/flors "Path to wallpaper(s)";
|
wallpaper = my.mkOpt' types.path ../../data/wallpaper/flors "Path to wallpaper(s)";
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
|
||||||
|
|
||||||
# - Packages ---------------------------------
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
pamixer
|
|
||||||
i3lock-blur
|
|
||||||
brightnessctl
|
|
||||||
playerctl
|
|
||||||
feh
|
|
||||||
] ++ optionals cfg.laptop laptopPkgs;
|
|
||||||
|
|
||||||
# - Audio ------------------------------------
|
|
||||||
|
|
||||||
sound.enable = true;
|
|
||||||
|
|
||||||
hardware = {
|
|
||||||
pulseaudio = {
|
|
||||||
enable = true;
|
|
||||||
support32Bit = true;
|
|
||||||
package = pkgs.pulseaudioFull;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# - Compositor -------------------------------
|
|
||||||
|
|
||||||
services.picom.enable = true;
|
|
||||||
|
|
||||||
# - Modules ----------------------------------
|
|
||||||
|
|
||||||
samfelag.modules = {
|
|
||||||
|
|
||||||
app.alacritty.enable = true;
|
|
||||||
desktop.rofi.enable = true;
|
|
||||||
desktop.polybar.enable = true;
|
|
||||||
app.firefox.enable = true;
|
|
||||||
|
|
||||||
desktop.i3 = {
|
|
||||||
enable = true;
|
|
||||||
laptop = cfg.laptop;
|
|
||||||
|
|
||||||
extraStartup = [
|
|
||||||
{ command = "systemctl --user restart polybar"; always = true; notification = false; }
|
|
||||||
{ command = "feh --bg-fill -B \"#${config.colorScheme.colors.base00}\" -z --no-fehbg ${cfg.wallpaper}"; always = true; notification = false; }
|
|
||||||
];
|
|
||||||
|
|
||||||
extraKeybindings = {
|
|
||||||
"${cfg.i3.mod}+space" = "exec $HOME/.config/rofi/menus/launcher/launcher.sh";
|
|
||||||
"${cfg.i3.mod}+End" = "exec $HOME/.config/rofi/menus/powermenu/powermenu.sh";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|||||||
130
modules/desktop/grapheio.nix
Normal file
130
modules/desktop/grapheio.nix
Normal file
@@ -0,0 +1,130 @@
|
|||||||
|
{ config, lib, pkgs, inputs, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
let
|
||||||
|
cfg = config.samfelag.modules.desktop.grapheio;
|
||||||
|
hyprCfg = config.samfelag.modules.desktop.wm.hyprland;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.samfelag.modules.desktop.grapheio = {
|
||||||
|
enable = mkEnableOption "Γραφείο desktop environment - hyprland based";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
|
||||||
|
# - Packages ---------------------------------
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
# - Tools ----------------------------------
|
||||||
|
jq
|
||||||
|
# - Appearance -----------------------------
|
||||||
|
rose-pine-gtk-theme
|
||||||
|
rose-pine-icon-theme
|
||||||
|
# - Cursor
|
||||||
|
inputs.hyprcursor-rose-pine.packages.${pkgs.system}.default
|
||||||
|
rose-pine-cursor
|
||||||
|
];
|
||||||
|
|
||||||
|
# - Data files -------------------------------
|
||||||
|
hm.xdg.configFile."grapheio".source = ../../config/grapheio;
|
||||||
|
|
||||||
|
# - Cursor -----------------------------------
|
||||||
|
hm.home.pointerCursor = {
|
||||||
|
gtk.enable = true;
|
||||||
|
package = pkgs.rose-pine-cursor;
|
||||||
|
name = "BreezeX Cursor";
|
||||||
|
size = 24;
|
||||||
|
};
|
||||||
|
|
||||||
|
hm.gtk = {
|
||||||
|
enable = true;
|
||||||
|
theme = {
|
||||||
|
package = pkgs.rose-pine-gtk-theme;
|
||||||
|
name = "rose-pine-gtk-theme";
|
||||||
|
};
|
||||||
|
iconTheme = {
|
||||||
|
package = pkgs.rose-pine-icon-theme;
|
||||||
|
name = "rose-pine-icons";
|
||||||
|
};
|
||||||
|
cursorTheme = {
|
||||||
|
package = pkgs.rose-pine-cursor;
|
||||||
|
name = "BreezeX-RoséPine";
|
||||||
|
size = 24;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# - Hyprland keybindings ---------------------
|
||||||
|
hm.wayland.windowManager.hyprland.settings = lib.mkIf hyprCfg.enable {
|
||||||
|
bind = [
|
||||||
|
# Pulse Audio controls (mute)
|
||||||
|
", XF86AudioMute, exec, $HOME/.config/grapheio/scripts/volume.sh mute"
|
||||||
|
|
||||||
|
# Media player controls
|
||||||
|
", XF86AudioPlay, exec, playerctl play-pause"
|
||||||
|
", XF86AudioPause, exec, playerctl play-pause"
|
||||||
|
", XF86AudioNext, exec, playerctl next"
|
||||||
|
", XF86AudioPrev, exec, playerctl previous"
|
||||||
|
", XF86AudioStop, exec, playerctl stop"
|
||||||
|
|
||||||
|
# Keyboard brightness control
|
||||||
|
"${hyprCfg.mod}, XF86MonBrightnessUp, exec, brightnessctl -d platform::kbd_backlight set +1"
|
||||||
|
"${hyprCfg.mod}, XF86MonBrightnessDown, exec, brightnessctl -d platform::kbd_backlight set -1"
|
||||||
|
];
|
||||||
|
|
||||||
|
binde = [
|
||||||
|
# Pulse Audio controls (keep button pressed)
|
||||||
|
", XF86AudioRaiseVolume, exec, $HOME/.config/grapheio/scripts/volume.sh set +5%"
|
||||||
|
", XF86AudioLowerVolume, exec, $HOME/.config/grapheio/scripts/volume.sh set -5%"
|
||||||
|
|
||||||
|
# Brightness control (keep button pressed)
|
||||||
|
", XF86MonBrightnessUp, exec, $HOME/.config/grapheio/scripts/brightness.sh set +5%"
|
||||||
|
", XF86MonBrightnessDown, exec, $HOME/.config/grapheio/scripts/brightness.sh set 5%-"
|
||||||
|
|
||||||
|
# Keyboard brightness control (keep button pressed)
|
||||||
|
"${hyprCfg.mod}, XF86MonBrightnessUp, exec, $HOME/.config/grapheio/scripts/brightness.sh kb_set +1"
|
||||||
|
"${hyprCfg.mod}, XF86MonBrightnessDown, exec, $HOME/.config/grapheio/scripts/brightness.sh kb_set 1-"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
# - Modules ----------------------------------
|
||||||
|
|
||||||
|
samfelag.modules = {
|
||||||
|
|
||||||
|
system.audio.enable = true;
|
||||||
|
system.brightness.enable = true;
|
||||||
|
|
||||||
|
desktop = {
|
||||||
|
# Window Manager
|
||||||
|
wm.hyprland.enable = true;
|
||||||
|
|
||||||
|
tools = {
|
||||||
|
# Greeter (login screen)
|
||||||
|
greetd = {
|
||||||
|
enable = true;
|
||||||
|
wm_cmd = "Hyprland";
|
||||||
|
};
|
||||||
|
# Locker
|
||||||
|
hyprlock.enable = true;
|
||||||
|
# Status bars
|
||||||
|
eww.enable = true;
|
||||||
|
# Wallpapper
|
||||||
|
hyprpaper.enable = true;
|
||||||
|
# Launcher
|
||||||
|
rofi.enable = true;
|
||||||
|
# Notification center
|
||||||
|
swaync.enable = true;
|
||||||
|
# Clipboard manager (history)
|
||||||
|
cliphist.enable = true;
|
||||||
|
# Take screenshots
|
||||||
|
screenshot.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
app = {
|
||||||
|
ghostty.enable = true;
|
||||||
|
zen-browser.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,88 +0,0 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
|
||||||
|
|
||||||
let
|
|
||||||
cfg = config.samfelag.modules.desktop.polybar;
|
|
||||||
i3Cfg = config.samfelag.modules.desktop.i3;
|
|
||||||
polybar_pkg = pkgs.polybar.override {
|
|
||||||
i3Support = true;
|
|
||||||
pulseSupport = true;
|
|
||||||
};
|
|
||||||
script = ''
|
|
||||||
polybar top &
|
|
||||||
polybar bottom &
|
|
||||||
'';
|
|
||||||
# Paths
|
|
||||||
paths = {
|
|
||||||
config = ../../config/polybar/config.ini;
|
|
||||||
bars = ../../config/polybar/bars;
|
|
||||||
scripts = ../../config/polybar/scripts;
|
|
||||||
};
|
|
||||||
in {
|
|
||||||
|
|
||||||
options.samfelag.modules.desktop.polybar = {
|
|
||||||
enable = lib.mkEnableOption "polybar";
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
|
||||||
|
|
||||||
# - Configuration ----------------------------
|
|
||||||
|
|
||||||
environment.systemPackages = [
|
|
||||||
polybar_pkg
|
|
||||||
];
|
|
||||||
|
|
||||||
hm.xdg.configFile."polybar/config.ini".source = paths.config;
|
|
||||||
hm.xdg.configFile."polybar/bars".source = paths.bars;
|
|
||||||
hm.xdg.configFile."polybar/scripts".source = paths.scripts;
|
|
||||||
|
|
||||||
# - Themeing ---------------------------------
|
|
||||||
hm.xdg.configFile."polybar/colour-scheme.ini".text = ''
|
|
||||||
[colour-scheme]
|
|
||||||
base00 = #${config.colorScheme.colors.base00}
|
|
||||||
base01 = #${config.colorScheme.colors.base01}
|
|
||||||
base02 = #${config.colorScheme.colors.base02}
|
|
||||||
base03 = #${config.colorScheme.colors.base03}
|
|
||||||
base04 = #${config.colorScheme.colors.base04}
|
|
||||||
base05 = #${config.colorScheme.colors.base05}
|
|
||||||
base06 = #${config.colorScheme.colors.base06}
|
|
||||||
base07 = #${config.colorScheme.colors.base07}
|
|
||||||
base08 = #${config.colorScheme.colors.base08}
|
|
||||||
base09 = #${config.colorScheme.colors.base09}
|
|
||||||
base0A = #${config.colorScheme.colors.base0A}
|
|
||||||
base0B = #${config.colorScheme.colors.base0B}
|
|
||||||
base0C = #${config.colorScheme.colors.base0C}
|
|
||||||
base0D = #${config.colorScheme.colors.base0D}
|
|
||||||
base0E = #${config.colorScheme.colors.base0E}
|
|
||||||
base0F = #${config.colorScheme.colors.base0F}
|
|
||||||
'';
|
|
||||||
|
|
||||||
# - Dependencies -----------------------------
|
|
||||||
|
|
||||||
# The polybar modules use rofi
|
|
||||||
samfelag.modules.desktop.rofi.enable = true;
|
|
||||||
samfelag.modules.desktop.i3.extraKeybindings = lib.mkIf i3Cfg.enable {
|
|
||||||
"${i3Cfg.mod}+Shift+w" = "exec $HOME/.config/rofi/menus/wifi/wifi.sh";
|
|
||||||
};
|
|
||||||
|
|
||||||
# - Services ---------------------------------
|
|
||||||
|
|
||||||
hm.systemd.user.services.polybar = {
|
|
||||||
Unit = {
|
|
||||||
Description = "Polybar status bar";
|
|
||||||
PartOf = [ "tray.target" ];
|
|
||||||
X-Restart-Triggers = [ "${paths.config}" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
Service = {
|
|
||||||
Type = "forking";
|
|
||||||
PassEnvironment = "PATH";
|
|
||||||
ExecStart =
|
|
||||||
let scriptPkg = pkgs.writeShellScriptBin "polybar-start" script;
|
|
||||||
in "${scriptPkg}/bin/polybar-start";
|
|
||||||
Restart = "on-failure";
|
|
||||||
};
|
|
||||||
|
|
||||||
Install = { WantedBy = [ "tray.target" ]; };
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user