Compare commits
8 Commits
nix
...
5b276081d1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5b276081d1 | ||
|
|
ff1217c65d | ||
|
|
9319fc4bc5 | ||
|
|
b1bea7224f | ||
|
|
28b61ff95a | ||
|
|
abf5f81d21 | ||
|
|
d9150880d3 | ||
|
|
515e910487 |
@@ -53,7 +53,7 @@
|
|||||||
- javascript
|
- javascript
|
||||||
- launch_keyboard
|
- launch_keyboard
|
||||||
- lvfs
|
- lvfs
|
||||||
- restaurant_health_rating
|
# - restaurant_health_rating
|
||||||
- wasm
|
- wasm
|
||||||
- noise_suppression
|
- noise_suppression
|
||||||
|
|
||||||
|
|||||||
@@ -3,34 +3,51 @@
|
|||||||
name = Tom Alexander
|
name = Tom Alexander
|
||||||
signingkey = D3A179C9A53C0EDE
|
signingkey = D3A179C9A53C0EDE
|
||||||
[push]
|
[push]
|
||||||
default = simple
|
default = simple # (default since 2.0)
|
||||||
[alias]
|
[alias]
|
||||||
lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
|
lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
|
||||||
bh = log --oneline --branches=* --remotes=* --graph --decorate
|
bh = log --oneline --branches=* --remotes=* --graph --decorate
|
||||||
amend = commit --amend --no-edit
|
amend = commit --amend --no-edit
|
||||||
authorcount = shortlog --summary --numbered --all --no-merges
|
|
||||||
[core]
|
[core]
|
||||||
excludesfile = ~/.gitignore_global
|
excludesfile = ~/.gitignore_global
|
||||||
[commit]
|
[commit]
|
||||||
gpgsign = true
|
gpgsign = true
|
||||||
|
verbose = true
|
||||||
[pull]
|
[pull]
|
||||||
rebase = true
|
rebase = true
|
||||||
[log]
|
[log]
|
||||||
date = local
|
date = local
|
||||||
[init]
|
[init]
|
||||||
defaultBranch = main
|
defaultBranch = main
|
||||||
|
|
||||||
# Use meld for `git difftool` and `git mergetool`
|
|
||||||
[diff]
|
[diff]
|
||||||
tool = meld
|
tool = meld # Use meld for `git difftool` and `git mergetool`
|
||||||
|
algorithm = histogram
|
||||||
|
colorMoved = plain
|
||||||
|
mnemonicPrefix = true
|
||||||
|
renames = true
|
||||||
[difftool]
|
[difftool]
|
||||||
prompt = false
|
prompt = false
|
||||||
[difftool "meld"]
|
[difftool "meld"]
|
||||||
cmd = meld "$LOCAL" "$REMOTE"
|
cmd = meld "$LOCAL" "$REMOTE"
|
||||||
[merge]
|
[merge]
|
||||||
tool = meld
|
tool = meld
|
||||||
|
conflictStyle = zdiff3
|
||||||
[mergetool "meld"]
|
[mergetool "meld"]
|
||||||
# Make the middle pane start with partially-merged contents:
|
# Make the middle pane start with partially-merged contents:
|
||||||
cmd = meld "$LOCAL" "$MERGED" "$REMOTE" --output "$MERGED"
|
cmd = meld "$LOCAL" "$MERGED" "$REMOTE" --output "$MERGED"
|
||||||
# Make the middle pane start without any merge progress:
|
# Make the middle pane start without any merge progress:
|
||||||
# cmd = meld "$LOCAL" "$BASE" "$REMOTE" --output "$MERGED"
|
# cmd = meld "$LOCAL" "$BASE" "$REMOTE" --output "$MERGED"
|
||||||
|
[column]
|
||||||
|
ui = auto
|
||||||
|
[branch]
|
||||||
|
sort = -committerdate
|
||||||
|
[tag]
|
||||||
|
sort = version:refname
|
||||||
|
[fetch]
|
||||||
|
prune = true
|
||||||
|
pruneTags = true
|
||||||
|
all = true
|
||||||
|
[rebase]
|
||||||
|
autoSquash = true
|
||||||
|
autoStash = true
|
||||||
|
updateRefs = true
|
||||||
|
|||||||
@@ -3,32 +3,35 @@
|
|||||||
name = Tom Alexander
|
name = Tom Alexander
|
||||||
signingkey = D3A179C9A53C0EDE
|
signingkey = D3A179C9A53C0EDE
|
||||||
[push]
|
[push]
|
||||||
default = simple
|
default = simple # (default since 2.0)
|
||||||
[alias]
|
[alias]
|
||||||
lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
|
lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
|
||||||
bh = log --oneline --branches=* --remotes=* --graph --decorate
|
bh = log --oneline --branches=* --remotes=* --graph --decorate
|
||||||
amend = commit --amend --no-edit
|
amend = commit --amend --no-edit
|
||||||
authorcount = shortlog --summary --numbered --all --no-merges
|
|
||||||
[core]
|
[core]
|
||||||
excludesfile = ~/.gitignore_global
|
excludesfile = ~/.gitignore_global
|
||||||
[commit]
|
[commit]
|
||||||
gpgsign = true
|
gpgsign = true
|
||||||
|
verbose = true
|
||||||
[pull]
|
[pull]
|
||||||
rebase = true
|
rebase = true
|
||||||
[log]
|
[log]
|
||||||
date = local
|
date = local
|
||||||
[init]
|
[init]
|
||||||
defaultBranch = main
|
defaultBranch = main
|
||||||
|
|
||||||
# Use meld for `git difftool` and `git mergetool`
|
|
||||||
[diff]
|
[diff]
|
||||||
tool = meld
|
tool = meld # Use meld for `git difftool` and `git mergetool`
|
||||||
|
algorithm = histogram
|
||||||
|
colorMoved = plain
|
||||||
|
mnemonicPrefix = true
|
||||||
|
renames = true
|
||||||
[difftool]
|
[difftool]
|
||||||
prompt = false
|
prompt = false
|
||||||
[difftool "meld"]
|
[difftool "meld"]
|
||||||
cmd = meld "$LOCAL" "$REMOTE"
|
cmd = meld "$LOCAL" "$REMOTE"
|
||||||
[merge]
|
[merge]
|
||||||
tool = meld
|
tool = meld
|
||||||
|
conflictStyle = zdiff3
|
||||||
[mergetool "meld"]
|
[mergetool "meld"]
|
||||||
# Make the middle pane start with partially-merged contents:
|
# Make the middle pane start with partially-merged contents:
|
||||||
cmd = meld "$LOCAL" "$MERGED" "$REMOTE" --output "$MERGED"
|
cmd = meld "$LOCAL" "$MERGED" "$REMOTE" --output "$MERGED"
|
||||||
@@ -36,3 +39,17 @@
|
|||||||
# cmd = meld "$LOCAL" "$BASE" "$REMOTE" --output "$MERGED"
|
# cmd = meld "$LOCAL" "$BASE" "$REMOTE" --output "$MERGED"
|
||||||
[includeIf "gitdir:/bridge/"]
|
[includeIf "gitdir:/bridge/"]
|
||||||
path = /bridge/git/machine_setup/ansible/roles/base/files/gitconfig_home
|
path = /bridge/git/machine_setup/ansible/roles/base/files/gitconfig_home
|
||||||
|
[column]
|
||||||
|
ui = auto
|
||||||
|
[branch]
|
||||||
|
sort = -committerdate
|
||||||
|
[tag]
|
||||||
|
sort = version:refname
|
||||||
|
[fetch]
|
||||||
|
prune = true
|
||||||
|
pruneTags = true
|
||||||
|
all = true
|
||||||
|
[rebase]
|
||||||
|
autoSquash = true
|
||||||
|
autoStash = true
|
||||||
|
updateRefs = true
|
||||||
|
|||||||
@@ -51,17 +51,27 @@
|
|||||||
;; Persist history over Emacs restarts. Vertico sorts by history position.
|
;; Persist history over Emacs restarts. Vertico sorts by history position.
|
||||||
(use-package savehist
|
(use-package savehist
|
||||||
;; This is an emacs built-in but we're pulling the latest version
|
;; This is an emacs built-in but we're pulling the latest version
|
||||||
|
:pin gnu
|
||||||
:config
|
:config
|
||||||
(savehist-mode))
|
(savehist-mode))
|
||||||
|
|
||||||
(use-package which-key
|
(use-package which-key
|
||||||
|
:pin gnu
|
||||||
:diminish
|
:diminish
|
||||||
:config
|
:config
|
||||||
(which-key-mode))
|
(which-key-mode))
|
||||||
|
|
||||||
(use-package windmove
|
(use-package windmove
|
||||||
:config
|
;; This is an emacs built-in but we're pulling the latest version
|
||||||
(windmove-default-keybindings))
|
:pin gnu
|
||||||
|
:bind
|
||||||
|
(
|
||||||
|
("S-<up>" . windmove-up)
|
||||||
|
("S-<right>" . windmove-right)
|
||||||
|
("S-<down>" . windmove-down)
|
||||||
|
("S-<left>" . windmove-left)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
(setq tramp-default-method "ssh")
|
(setq tramp-default-method "ssh")
|
||||||
|
|
||||||
|
|||||||
@@ -63,6 +63,9 @@
|
|||||||
show-trailing-whitespace t
|
show-trailing-whitespace t
|
||||||
;; Remove the line when killing it with ctrl-k
|
;; Remove the line when killing it with ctrl-k
|
||||||
kill-whole-line t
|
kill-whole-line t
|
||||||
|
|
||||||
|
;; Show the current project in the mode line
|
||||||
|
project-mode-line t
|
||||||
)
|
)
|
||||||
|
|
||||||
;; (setq-default fringes-outside-margins t)
|
;; (setq-default fringes-outside-margins t)
|
||||||
|
|||||||
@@ -7,14 +7,14 @@
|
|||||||
:commands nix-mode
|
:commands nix-mode
|
||||||
:hook (
|
:hook (
|
||||||
(nix-mode . (lambda ()
|
(nix-mode . (lambda ()
|
||||||
;; (eglot-ensure)
|
(eglot-ensure)
|
||||||
;; (defclass my/eglot-nix (eglot-lsp-server) ()
|
(defclass my/eglot-nix (eglot-lsp-server) ()
|
||||||
;; :documentation
|
:documentation
|
||||||
;; "Own eglot server class.")
|
"Own eglot server class.")
|
||||||
|
|
||||||
;; (add-to-list 'eglot-server-programs
|
(add-to-list 'eglot-server-programs
|
||||||
;; '(nix-mode . (my/eglot-nix "nixd")))
|
'(nix-mode . (my/eglot-nix "nixd")))
|
||||||
;; (add-hook 'before-save-hook 'eglot-format-buffer nil 'local)
|
(add-hook 'before-save-hook 'eglot-format-buffer nil 'local)
|
||||||
))
|
))
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,16 +1,23 @@
|
|||||||
(use-package org
|
(use-package org
|
||||||
:ensure nil
|
:ensure nil
|
||||||
:commands org-mode
|
:commands org-mode
|
||||||
:bind (
|
:bind (:map org-mode-map
|
||||||
("C-c l" . org-store-link)
|
("C-c l" . org-store-link)
|
||||||
("C-c a" . org-agenda)
|
("C-c a" . org-agenda)
|
||||||
("C--" . org-timestamp-down)
|
("S-<up>" . org-shiftup)
|
||||||
("C-=" . org-timestamp-up)
|
("S-<right>" . org-shiftright)
|
||||||
|
("S-<down>" . org-shiftdown)
|
||||||
|
("S-<left>" . org-shiftleft)
|
||||||
)
|
)
|
||||||
:hook (
|
:hook (
|
||||||
(org-mode . (lambda ()
|
(org-mode . (lambda ()
|
||||||
(org-indent-mode +1)
|
(org-indent-mode +1)
|
||||||
))
|
))
|
||||||
|
;; Make windmove work in Org mode:
|
||||||
|
(org-shiftup-final . windmove-up)
|
||||||
|
(org-shiftleft-final . windmove-left)
|
||||||
|
(org-shiftdown-final . windmove-down)
|
||||||
|
(org-shiftright-final . windmove-right)
|
||||||
)
|
)
|
||||||
:config
|
:config
|
||||||
(require 'org-tempo)
|
(require 'org-tempo)
|
||||||
@@ -38,6 +45,8 @@
|
|||||||
|
|
||||||
;; TODO: There is an option to set the compiler, could be better than manually doing this here https://orgmode.org/manual/LaTeX_002fPDF-export-commands.html
|
;; TODO: There is an option to set the compiler, could be better than manually doing this here https://orgmode.org/manual/LaTeX_002fPDF-export-commands.html
|
||||||
;; (setq org-latex-compiler "lualatex")
|
;; (setq org-latex-compiler "lualatex")
|
||||||
|
;; TODO: nixos latex page recommends this line, figure out what it does / why its needed:
|
||||||
|
;; (setq org-preview-latex-default-process 'dvisvgm)
|
||||||
(setq org-latex-pdf-process
|
(setq org-latex-pdf-process
|
||||||
'("lualatex -shell-escape -interaction nonstopmode -output-directory %o %f"
|
'("lualatex -shell-escape -interaction nonstopmode -output-directory %o %f"
|
||||||
"lualatex -shell-escape -interaction nonstopmode -output-directory %o %f"
|
"lualatex -shell-escape -interaction nonstopmode -output-directory %o %f"
|
||||||
|
|||||||
@@ -38,4 +38,6 @@
|
|||||||
|
|
||||||
(require 'lang-nix)
|
(require 'lang-nix)
|
||||||
|
|
||||||
|
(require 'lang-cmake)
|
||||||
|
|
||||||
(load-directory autoload-directory)
|
(load-directory autoload-directory)
|
||||||
|
|||||||
@@ -47,6 +47,9 @@ rdr pass proto {tcp, udp} from $jail_nat_v4 to ($ext_if) port 65099 tag REDIRINT
|
|||||||
rdr pass proto {tcp, udp} from $not_jail_nat_v4 to ($ext_if) port 53 -> 10.215.1.211 port 53
|
rdr pass proto {tcp, udp} from $not_jail_nat_v4 to ($ext_if) port 53 -> 10.215.1.211 port 53
|
||||||
rdr pass proto {tcp, udp} from $jail_nat_v4 to ($ext_if) port 53 tag REDIRINTERNAL -> 10.215.1.211 port 53
|
rdr pass proto {tcp, udp} from $jail_nat_v4 to ($ext_if) port 53 tag REDIRINTERNAL -> 10.215.1.211 port 53
|
||||||
|
|
||||||
|
rdr pass proto {tcp, udp} from $not_jail_nat_v4 to ($ext_if) port 65122 -> 10.215.1.219 port 22
|
||||||
|
rdr pass proto {tcp, udp} from $jail_nat_v4 to ($ext_if) port 65122 tag REDIRINTERNAL -> 10.215.1.219 port 22
|
||||||
|
|
||||||
nat pass tagged REDIRINTERNAL -> (jail_nat)
|
nat pass tagged REDIRINTERNAL -> (jail_nat)
|
||||||
nat pass tagged REDIREXTERNAL -> ($ext_if)
|
nat pass tagged REDIREXTERNAL -> ($ext_if)
|
||||||
|
|
||||||
|
|||||||
@@ -34,7 +34,7 @@
|
|||||||
|
|
||||||
- name: Configure kernel command line
|
- name: Configure kernel command line
|
||||||
zfs:
|
zfs:
|
||||||
name: "zroot/linux"
|
name: "zroot/linux/archwork/be"
|
||||||
state: present
|
state: present
|
||||||
extra_zfs_properties:
|
extra_zfs_properties:
|
||||||
# amdgpu.abmlevel=3 :: Automatically reduce screen brightness but tweak colors to compensate for power reduction.
|
# amdgpu.abmlevel=3 :: Automatically reduce screen brightness but tweak colors to compensate for power reduction.
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ function by_src {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function by_bin {
|
function by_bin {
|
||||||
DESTRELEASE=13.2-RELEASE
|
DESTRELEASE=14.1-RELEASE
|
||||||
DESTARCH=`uname -m`
|
DESTARCH=`uname -m`
|
||||||
SOURCEURL=http://ftp.freebsd.org/pub/FreeBSD/releases/$DESTARCH/$DESTRELEASE/
|
SOURCEURL=http://ftp.freebsd.org/pub/FreeBSD/releases/$DESTARCH/$DESTRELEASE/
|
||||||
for component in base ports; do fetch $SOURCEURL/$component.txz -o - | tar -xf - -C "$DESTDIR" ; done
|
for component in base ports; do fetch $SOURCEURL/$component.txz -o - | tar -xf - -C "$DESTDIR" ; done
|
||||||
|
|||||||
@@ -94,7 +94,13 @@
|
|||||||
// momlaptop - hard-coded in rc.conf, reproduced here to reserve ip
|
// momlaptop - hard-coded in rc.conf, reproduced here to reserve ip
|
||||||
"hw-address": "06:85:69:c5:6a:d6",
|
"hw-address": "06:85:69:c5:6a:d6",
|
||||||
"ip-address": "10.215.1.218"
|
"ip-address": "10.215.1.218"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
// hydra
|
||||||
|
"hw-address": "06:84:36:68:03:77",
|
||||||
|
"ip-address": "10.215.1.219"
|
||||||
}
|
}
|
||||||
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -1,3 +1,7 @@
|
|||||||
|
profile office {
|
||||||
|
output eDP-1 disable
|
||||||
|
output "Dell Inc. DELL C2722DE 6PH6T83" enable
|
||||||
|
}
|
||||||
profile docked {
|
profile docked {
|
||||||
output eDP-1 disable
|
output eDP-1 disable
|
||||||
output "Dell Inc. DELL U3014 P1V6N35M329L" enable
|
output "Dell Inc. DELL U3014 P1V6N35M329L" enable
|
||||||
|
|||||||
@@ -81,12 +81,6 @@ Include = /etc/pacman.d/mirrorlist
|
|||||||
[extra]
|
[extra]
|
||||||
Include = /etc/pacman.d/mirrorlist
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
#[community-testing]
|
|
||||||
#Include = /etc/pacman.d/mirrorlist
|
|
||||||
|
|
||||||
[community]
|
|
||||||
Include = /etc/pacman.d/mirrorlist
|
|
||||||
|
|
||||||
# If you want to run 32 bit applications on your x86_64 system,
|
# If you want to run 32 bit applications on your x86_64 system,
|
||||||
# enable the multilib repositories as required here.
|
# enable the multilib repositories as required here.
|
||||||
|
|
||||||
|
|||||||
@@ -23,6 +23,9 @@ $ORIGIN fizz.buzz.
|
|||||||
; Allows receivers to know you send your mail via Fastmail, and other servers
|
; Allows receivers to know you send your mail via Fastmail, and other servers
|
||||||
IN TXT v=spf1 include:spf.messagingengine.com ?all
|
IN TXT v=spf1 include:spf.messagingengine.com ?all
|
||||||
|
|
||||||
|
; Tell receivers what to do with fake email
|
||||||
|
_dmarc IN TXT "v=DMARC1; p=none; rua=mailto:postmaster@fizz.buzz;"
|
||||||
|
|
||||||
ns1 IN A 74.80.180.138
|
ns1 IN A 74.80.180.138
|
||||||
ns2 IN A 74.80.180.138
|
ns2 IN A 74.80.180.138
|
||||||
|
|
||||||
|
|||||||
@@ -64,23 +64,6 @@
|
|||||||
# force: true
|
# force: true
|
||||||
# diff: false
|
# diff: false
|
||||||
|
|
||||||
- name: Create directories
|
|
||||||
file:
|
|
||||||
name: "{{ item }}"
|
|
||||||
state: directory
|
|
||||||
mode: 0700
|
|
||||||
owner: nochainstounlock
|
|
||||||
group: nochainstounlock
|
|
||||||
loop:
|
|
||||||
- /home/nochainstounlock/.ssh
|
|
||||||
|
|
||||||
- name: Set authorized keys
|
|
||||||
authorized_key:
|
|
||||||
user: nochainstounlock
|
|
||||||
key: |
|
|
||||||
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMrjXsXjtxEm47XnRZfo67kJULoc0NBLrB0lPYFiS2Ar kodi@neelix
|
|
||||||
exclusive: true
|
|
||||||
|
|
||||||
- import_tasks: tasks/freebsd.yaml
|
- import_tasks: tasks/freebsd.yaml
|
||||||
when: 'os_flavor == "freebsd"'
|
when: 'os_flavor == "freebsd"'
|
||||||
|
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAID0+4zi26M3eYWnIrciR54kOlGxzfgCXG+o4ea1zpzrk openpgp:0x7FF123C8
|
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGu+k5lrirokdW5zVdRVBOqEOAvAPlIkG/MdJNc9g5ky cardno:000611194908
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ set $menu wofi --show drun --gtk-dark
|
|||||||
|
|
||||||
# Do not show a title bar on windows
|
# Do not show a title bar on windows
|
||||||
default_border pixel 2
|
default_border pixel 2
|
||||||
|
hide_edge_borders smart_no_gaps
|
||||||
|
|
||||||
bindsym $mod+grave exec $term
|
bindsym $mod+grave exec $term
|
||||||
|
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
"workbench.editor.showTabs": "none",
|
"workbench.editor.showTabs": "none",
|
||||||
"workbench.activityBar.location": "hidden",
|
"workbench.activityBar.location": "hidden",
|
||||||
"window.menuBarVisibility": "toggle",
|
"window.menuBarVisibility": "toggle",
|
||||||
|
"window.commandCenter": false,
|
||||||
"explorer.autoReveal": false,
|
"explorer.autoReveal": false,
|
||||||
"[python]": {
|
"[python]": {
|
||||||
"editor.defaultFormatter": "ms-python.black-formatter",
|
"editor.defaultFormatter": "ms-python.black-formatter",
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
- name: Install packages
|
- name: Install packages
|
||||||
package:
|
package:
|
||||||
name:
|
name:
|
||||||
# - linux-lts-headers
|
- linux-lts-headers
|
||||||
- linux-headers
|
# - linux-headers
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
- name: Check trusted gpg keys
|
- name: Check trusted gpg keys
|
||||||
@@ -27,7 +27,8 @@
|
|||||||
args:
|
args:
|
||||||
creates: "/var/cache/pacman/custom/{{ item }}-*.pkg.tar.*"
|
creates: "/var/cache/pacman/custom/{{ item }}-*.pkg.tar.*"
|
||||||
loop:
|
loop:
|
||||||
- zfs-dkms-git
|
# - zfs-dkms-git
|
||||||
|
- zfs-dkms
|
||||||
- zfs-utils
|
- zfs-utils
|
||||||
|
|
||||||
- name: Update cache
|
- name: Update cache
|
||||||
@@ -40,7 +41,8 @@
|
|||||||
- name: Install packages
|
- name: Install packages
|
||||||
package:
|
package:
|
||||||
name:
|
name:
|
||||||
- zfs-dkms-git
|
# - zfs-dkms-git
|
||||||
|
- zfs-dkms
|
||||||
- zfs-utils
|
- zfs-utils
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
|
|||||||
1
nix/configuration/.gitignore
vendored
1
nix/configuration/.gitignore
vendored
@@ -1 +0,0 @@
|
|||||||
result
|
|
||||||
@@ -1,293 +0,0 @@
|
|||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
|
|
||||||
let
|
|
||||||
alias_nix_pin_revision = pkgs.writeShellScriptBin "nix-pin-revision" ''
|
|
||||||
# Usage: nix-pin-revision nixpkgs 'github:NixOS/nixpkgs/00c21e4c93d963c50d4c0c89bfa84ed6e0694df2'
|
|
||||||
exec nix flake lock --override-input "''${@}"
|
|
||||||
'';
|
|
||||||
in
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
./roles/2ship2harkinian
|
|
||||||
./roles/alacritty
|
|
||||||
./roles/amd_s2idle
|
|
||||||
./roles/android
|
|
||||||
./roles/ansible
|
|
||||||
./roles/ares
|
|
||||||
./roles/base
|
|
||||||
./roles/bluetooth
|
|
||||||
./roles/boot
|
|
||||||
./roles/build_in_ram
|
|
||||||
./roles/chromecast
|
|
||||||
./roles/chromium
|
|
||||||
./roles/d2
|
|
||||||
./roles/direnv
|
|
||||||
./roles/disko
|
|
||||||
./roles/distributed_build
|
|
||||||
./roles/doas
|
|
||||||
./roles/docker
|
|
||||||
./roles/dont_use_substituters
|
|
||||||
./roles/ecc
|
|
||||||
./roles/emacs
|
|
||||||
./roles/emulate_isa
|
|
||||||
./roles/esim
|
|
||||||
./roles/firefox
|
|
||||||
./roles/firewall
|
|
||||||
./roles/flux
|
|
||||||
./roles/fonts
|
|
||||||
./roles/gcloud
|
|
||||||
./roles/git
|
|
||||||
./roles/global_options
|
|
||||||
./roles/gnome_keyring
|
|
||||||
./roles/gnuplot
|
|
||||||
./roles/gpg
|
|
||||||
./roles/graphics
|
|
||||||
./roles/graphviz
|
|
||||||
./roles/hydra
|
|
||||||
./roles/image_based_appliance
|
|
||||||
./roles/iso
|
|
||||||
./roles/iso_mount
|
|
||||||
./roles/jujutsu
|
|
||||||
./roles/kanshi
|
|
||||||
./roles/kernel
|
|
||||||
./roles/kodi
|
|
||||||
./roles/kubernetes
|
|
||||||
./roles/latex
|
|
||||||
./roles/launch_keyboard
|
|
||||||
./roles/lvfs
|
|
||||||
./roles/media
|
|
||||||
./roles/memtest86
|
|
||||||
./roles/minimal_base
|
|
||||||
./roles/network
|
|
||||||
./roles/nix_index
|
|
||||||
./roles/nix_repl
|
|
||||||
./roles/nix_worker
|
|
||||||
./roles/nixdev
|
|
||||||
./roles/nvme
|
|
||||||
./roles/openpgp_card_tools
|
|
||||||
./roles/optimized_build
|
|
||||||
./roles/pcsx2
|
|
||||||
./roles/podman
|
|
||||||
./roles/postgresql_client
|
|
||||||
./roles/python
|
|
||||||
./roles/qemu
|
|
||||||
./roles/recovery
|
|
||||||
./roles/reset
|
|
||||||
./roles/rpcs3
|
|
||||||
./roles/rust
|
|
||||||
./roles/sequoia
|
|
||||||
./roles/shadps4
|
|
||||||
./roles/shikane
|
|
||||||
./roles/shipwright
|
|
||||||
./roles/sm64ex
|
|
||||||
./roles/sops
|
|
||||||
./roles/sound
|
|
||||||
./roles/spaghettikart
|
|
||||||
./roles/ssh
|
|
||||||
./roles/sshd
|
|
||||||
./roles/steam
|
|
||||||
./roles/steam_run_free
|
|
||||||
./roles/sway
|
|
||||||
./roles/tekton
|
|
||||||
./roles/terraform
|
|
||||||
./roles/thunderbolt
|
|
||||||
./roles/user
|
|
||||||
./roles/uutils
|
|
||||||
./roles/vnc_client
|
|
||||||
./roles/vscode
|
|
||||||
./roles/wasm
|
|
||||||
./roles/waybar
|
|
||||||
./roles/webcam
|
|
||||||
./roles/wine
|
|
||||||
./roles/wireguard
|
|
||||||
./roles/yubikey
|
|
||||||
./roles/zfs
|
|
||||||
./roles/zrepl
|
|
||||||
./roles/zsh
|
|
||||||
./util/install_files
|
|
||||||
./util/unfree_polyfill
|
|
||||||
];
|
|
||||||
|
|
||||||
config = {
|
|
||||||
nix.settings.experimental-features = [
|
|
||||||
"nix-command"
|
|
||||||
"flakes"
|
|
||||||
"ca-derivations"
|
|
||||||
# "blake3-hashes"
|
|
||||||
# "git-hashing"
|
|
||||||
];
|
|
||||||
nix.settings.trusted-users = [ "@wheel" ];
|
|
||||||
nix.settings.connect-timeout = 5;
|
|
||||||
nix.settings.min-free = 128000000;
|
|
||||||
nix.settings.max-free = 1000000000;
|
|
||||||
nix.settings.fallback = true;
|
|
||||||
nix.settings.warn-dirty = false;
|
|
||||||
nix.settings.fsync-metadata = true;
|
|
||||||
# Ensure store paths are durably written to disk before registering the paths so a crash mid-build does not leave us in a corrupted state.
|
|
||||||
nix.settings.fsync-store-paths = true;
|
|
||||||
|
|
||||||
hardware.enableRedistributableFirmware = true;
|
|
||||||
|
|
||||||
# Keep outputs so we can build offline.
|
|
||||||
nix.settings.keep-outputs = true;
|
|
||||||
nix.settings.keep-derivations = true;
|
|
||||||
|
|
||||||
# Automatic garbage collection
|
|
||||||
nix.gc = lib.mkIf (!config.me.buildingPortable) {
|
|
||||||
# Runs nix-collect-garbage --delete-older-than 5d
|
|
||||||
# automatic = true;
|
|
||||||
automatic = false;
|
|
||||||
persistent = true;
|
|
||||||
dates = "monthly";
|
|
||||||
# randomizedDelaySec = "14m";
|
|
||||||
options = "--delete-older-than 30d";
|
|
||||||
};
|
|
||||||
nix.settings.auto-optimise-store = !config.me.buildingPortable;
|
|
||||||
|
|
||||||
environment.systemPackages = [
|
|
||||||
alias_nix_pin_revision
|
|
||||||
];
|
|
||||||
|
|
||||||
environment.persistence."/persist" = lib.mkIf (config.me.mountPersistence) {
|
|
||||||
hideMounts = true;
|
|
||||||
directories = [
|
|
||||||
"/var/lib/nixos" # Contains user information (uids/gids)
|
|
||||||
"/var/lib/systemd" # Systemd state directory for random seed, persistent timers, core dumps, persist hardware state like backlight and rfkill
|
|
||||||
"/var/log/journal" # Logs, alternatively set `services.journald.storage = "volatile";` to write to /run/log/journal
|
|
||||||
];
|
|
||||||
files = [
|
|
||||||
"/etc/machine-id" # Systemd unique machine id "otherwise, the system journal may fail to list earlier boots, etc"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
# Write a list of the currently installed packages to /etc/current-system-packages
|
|
||||||
# environment.etc."current-system-packages".text =
|
|
||||||
# let
|
|
||||||
# packages = builtins.map (p: "${p.name}") config.environment.systemPackages;
|
|
||||||
# sortedUnique = builtins.sort builtins.lessThan (lib.unique packages);
|
|
||||||
# formatted = builtins.concatStringsSep "\n" sortedUnique;
|
|
||||||
# in
|
|
||||||
# formatted;
|
|
||||||
|
|
||||||
# nixpkgs.overlays = [
|
|
||||||
# (final: prev: {
|
|
||||||
# foot = throw "foo";
|
|
||||||
# })
|
|
||||||
# ];
|
|
||||||
|
|
||||||
nixpkgs.overlays =
|
|
||||||
let
|
|
||||||
disableTests = (
|
|
||||||
# Example: (disableTests "coreutils")
|
|
||||||
package_name:
|
|
||||||
(final: prev: {
|
|
||||||
"${package_name}" = prev."${package_name}".overrideAttrs (old: {
|
|
||||||
doCheck = false;
|
|
||||||
doInstallCheck = false;
|
|
||||||
});
|
|
||||||
})
|
|
||||||
);
|
|
||||||
disableTestsPython = (
|
|
||||||
# Example: (disableTestsPython "scipy")
|
|
||||||
package_name:
|
|
||||||
(final: prev: {
|
|
||||||
pythonPackagesExtensions = prev.pythonPackagesExtensions ++ [
|
|
||||||
(python-final: python-prev: {
|
|
||||||
"${package_name}" = python-prev."${package_name}".overridePythonAttrs (oldAttrs: {
|
|
||||||
doCheck = false;
|
|
||||||
});
|
|
||||||
})
|
|
||||||
];
|
|
||||||
})
|
|
||||||
);
|
|
||||||
disableOptimizations = (
|
|
||||||
# Example: (disableOptimizations "coreutils")
|
|
||||||
package_name:
|
|
||||||
(final: prev: {
|
|
||||||
"${package_name}" = final.unoptimized."${package_name}";
|
|
||||||
})
|
|
||||||
);
|
|
||||||
disableOptimizationsScope = (
|
|
||||||
# Example: (disableOptimizationsScope "kdePackages" "qtbase")
|
|
||||||
scope: package_name:
|
|
||||||
(final: prev: {
|
|
||||||
"${scope}" = prev."${scope}".overrideScope (
|
|
||||||
scopeFinal: scopePrev: {
|
|
||||||
"${package_name}" = final.unoptimized."${scope}"."${package_name}";
|
|
||||||
}
|
|
||||||
);
|
|
||||||
})
|
|
||||||
);
|
|
||||||
disableOptimizationsPython3 = (
|
|
||||||
# Example: (disableOptimizationsPython3 "scipy")
|
|
||||||
package_name:
|
|
||||||
(final: prev: {
|
|
||||||
python3Packages = prev.python3Packages.override {
|
|
||||||
overrides = python-final: python-prev: {
|
|
||||||
"${package_name}" = final.unoptimized.python3.pkgs."${package_name}";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
})
|
|
||||||
);
|
|
||||||
in
|
|
||||||
[
|
|
||||||
(disableTests "deno") # Tests use too much disk space
|
|
||||||
(disableOptimizations "libtpms")
|
|
||||||
(disableOptimizationsPython3 "scipy")
|
|
||||||
(disableOptimizations "assimp")
|
|
||||||
(disableOptimizations "gsl")
|
|
||||||
(final: prev: {
|
|
||||||
rpcs3 = prev.rpcs3.override {
|
|
||||||
glew = (final.glew.override { enableEGL = false; });
|
|
||||||
};
|
|
||||||
})
|
|
||||||
(final: prev: {
|
|
||||||
fwupd = prev.fwupd.overrideAttrs (
|
|
||||||
finalAttrs: prevAttrs: {
|
|
||||||
version = "2.1.5";
|
|
||||||
src = final.fetchFromGitHub {
|
|
||||||
owner = "fwupd";
|
|
||||||
repo = "fwupd";
|
|
||||||
tag = finalAttrs.version;
|
|
||||||
hash = "sha256-DzQ+N99ZmFRqZc2rN6PSqmoIMXUyrE8Kkn+KnT/AWPc=";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
);
|
|
||||||
})
|
|
||||||
|
|
||||||
# Works but probably sets python2's scipy to be python3:
|
|
||||||
#
|
|
||||||
# (final: prev: {
|
|
||||||
# pythonPackagesExtensions = prev.pythonPackagesExtensions ++ [
|
|
||||||
# (python-final: python-prev: {
|
|
||||||
# scipy = final.unoptimized.python3Packages.scipy;
|
|
||||||
# })
|
|
||||||
# ];
|
|
||||||
# })
|
|
||||||
];
|
|
||||||
|
|
||||||
# This option defines the first version of NixOS you have installed on this particular machine,
|
|
||||||
# and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
|
|
||||||
#
|
|
||||||
# Most users should NEVER change this value after the initial install, for any reason,
|
|
||||||
# even if you've upgraded your system to a new NixOS release.
|
|
||||||
#
|
|
||||||
# This value does NOT affect the Nixpkgs version your packages and OS are pulled from,
|
|
||||||
# so changing it will NOT upgrade your system - see https://nixos.org/manual/nixos/stable/#sec-upgrading for how
|
|
||||||
# to actually do that.
|
|
||||||
#
|
|
||||||
# This value being lower than the current NixOS release does NOT mean your system is
|
|
||||||
# out of date, out of support, or vulnerable.
|
|
||||||
#
|
|
||||||
# Do NOT change this value unless you have manually inspected all the changes it would make to your configuration,
|
|
||||||
# and migrated your data accordingly.
|
|
||||||
#
|
|
||||||
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
|
|
||||||
system.stateVersion = "24.11"; # Did you read the comment?
|
|
||||||
};
|
|
||||||
}
|
|
||||||
273
nix/configuration/flake.lock
generated
273
nix/configuration/flake.lock
generated
@@ -1,273 +0,0 @@
|
|||||||
{
|
|
||||||
"nodes": {
|
|
||||||
"crane": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1731098351,
|
|
||||||
"narHash": "sha256-HQkYvKvaLQqNa10KEFGgWHfMAbWBfFp+4cAgkut+NNE=",
|
|
||||||
"owner": "ipetkov",
|
|
||||||
"repo": "crane",
|
|
||||||
"rev": "ef80ead953c1b28316cc3f8613904edc2eb90c28",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "ipetkov",
|
|
||||||
"repo": "crane",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"disko": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": [
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1780894562,
|
|
||||||
"narHash": "sha256-c3430xwxwhHipl3jigUGMMBfpaMylDqytW/kdmB3ZGs=",
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "disko",
|
|
||||||
"rev": "24fed06cac83bcc44ac8efbb57cab1a82fa0bedc",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "disko",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"flake-compat": {
|
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1696426674,
|
|
||||||
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
|
|
||||||
"owner": "edolstra",
|
|
||||||
"repo": "flake-compat",
|
|
||||||
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "edolstra",
|
|
||||||
"repo": "flake-compat",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"flake-parts": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs-lib": [
|
|
||||||
"lanzaboote",
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1730504689,
|
|
||||||
"narHash": "sha256-hgmguH29K2fvs9szpq2r3pz2/8cJd2LPS+b4tfNFCwE=",
|
|
||||||
"owner": "hercules-ci",
|
|
||||||
"repo": "flake-parts",
|
|
||||||
"rev": "506278e768c2a08bec68eb62932193e341f55c90",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "hercules-ci",
|
|
||||||
"repo": "flake-parts",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"gitignore": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": [
|
|
||||||
"lanzaboote",
|
|
||||||
"pre-commit-hooks-nix",
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1709087332,
|
|
||||||
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
|
|
||||||
"owner": "hercules-ci",
|
|
||||||
"repo": "gitignore.nix",
|
|
||||||
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "hercules-ci",
|
|
||||||
"repo": "gitignore.nix",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"home-manager": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": [
|
|
||||||
"impermanence",
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1768598210,
|
|
||||||
"narHash": "sha256-kkgA32s/f4jaa4UG+2f8C225Qvclxnqs76mf8zvTVPg=",
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "home-manager",
|
|
||||||
"rev": "c47b2cc64a629f8e075de52e4742de688f930dc6",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "home-manager",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"impermanence": {
|
|
||||||
"inputs": {
|
|
||||||
"home-manager": "home-manager",
|
|
||||||
"nixpkgs": [
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1769548169,
|
|
||||||
"narHash": "sha256-03+JxvzmfwRu+5JafM0DLbxgHttOQZkUtDWBmeUkN8Y=",
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "impermanence",
|
|
||||||
"rev": "7b1d382faf603b6d264f58627330f9faa5cba149",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "impermanence",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"lanzaboote": {
|
|
||||||
"inputs": {
|
|
||||||
"crane": "crane",
|
|
||||||
"flake-compat": "flake-compat",
|
|
||||||
"flake-parts": "flake-parts",
|
|
||||||
"nixpkgs": [
|
|
||||||
"nixpkgs"
|
|
||||||
],
|
|
||||||
"pre-commit-hooks-nix": "pre-commit-hooks-nix",
|
|
||||||
"rust-overlay": "rust-overlay"
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1737639419,
|
|
||||||
"narHash": "sha256-AEEDktApTEZ5PZXNDkry2YV2k6t0dTgLPEmAZbnigXU=",
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "lanzaboote",
|
|
||||||
"rev": "a65905a09e2c43ff63be8c0e86a93712361f871e",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nix-community",
|
|
||||||
"ref": "v0.4.2",
|
|
||||||
"repo": "lanzaboote",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1780749050,
|
|
||||||
"narHash": "sha256-3av0pIjlOWQ6rDbNOmpUSvbNnJkGORQKKjb4LtCZsIY=",
|
|
||||||
"owner": "NixOS",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "a799d3e3886da994fa307f817a6bc705ae538eeb",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "NixOS",
|
|
||||||
"ref": "nixos-unstable",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs-google": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1779893571,
|
|
||||||
"narHash": "sha256-wiwMyVCtmjRjlFCe2zaumCE6LRV9GzzN0ZH25NQkbAU=",
|
|
||||||
"owner": "NixOS",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "45f6cfaa4605b706c870e75bd74bdb5e97eee11e",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "NixOS",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "45f6cfaa4605b706c870e75bd74bdb5e97eee11e",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs-stable": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1730741070,
|
|
||||||
"narHash": "sha256-edm8WG19kWozJ/GqyYx2VjW99EdhjKwbY3ZwdlPAAlo=",
|
|
||||||
"owner": "NixOS",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "d063c1dd113c91ab27959ba540c0d9753409edf3",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "NixOS",
|
|
||||||
"ref": "nixos-24.05",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"pre-commit-hooks-nix": {
|
|
||||||
"inputs": {
|
|
||||||
"flake-compat": [
|
|
||||||
"lanzaboote",
|
|
||||||
"flake-compat"
|
|
||||||
],
|
|
||||||
"gitignore": "gitignore",
|
|
||||||
"nixpkgs": [
|
|
||||||
"lanzaboote",
|
|
||||||
"nixpkgs"
|
|
||||||
],
|
|
||||||
"nixpkgs-stable": "nixpkgs-stable"
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1731363552,
|
|
||||||
"narHash": "sha256-vFta1uHnD29VUY4HJOO/D6p6rxyObnf+InnSMT4jlMU=",
|
|
||||||
"owner": "cachix",
|
|
||||||
"repo": "pre-commit-hooks.nix",
|
|
||||||
"rev": "cd1af27aa85026ac759d5d3fccf650abe7e1bbf0",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "cachix",
|
|
||||||
"repo": "pre-commit-hooks.nix",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"root": {
|
|
||||||
"inputs": {
|
|
||||||
"disko": "disko",
|
|
||||||
"impermanence": "impermanence",
|
|
||||||
"lanzaboote": "lanzaboote",
|
|
||||||
"nixpkgs": "nixpkgs",
|
|
||||||
"nixpkgs-google": "nixpkgs-google"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"rust-overlay": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": [
|
|
||||||
"lanzaboote",
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1731897198,
|
|
||||||
"narHash": "sha256-Ou7vLETSKwmE/HRQz4cImXXJBr/k9gp4J4z/PF8LzTE=",
|
|
||||||
"owner": "oxalica",
|
|
||||||
"repo": "rust-overlay",
|
|
||||||
"rev": "0be641045af6d8666c11c2c40e45ffc9667839b5",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "oxalica",
|
|
||||||
"repo": "rust-overlay",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"root": "root",
|
|
||||||
"version": 7
|
|
||||||
}
|
|
||||||
@@ -1,135 +0,0 @@
|
|||||||
# TODO maybe use `nix eval --raw .#odo.iso.outPath`
|
|
||||||
|
|
||||||
#
|
|
||||||
# Install on a new machine:
|
|
||||||
#
|
|
||||||
# Set
|
|
||||||
# me.disko.enable = true;
|
|
||||||
# me.disko.offline.enable = true;
|
|
||||||
#
|
|
||||||
# Run
|
|
||||||
# doas disko --mode destroy,format,mount hosts/recovery/disk-config.nix
|
|
||||||
# doas nixos-install --substituters "http://10.0.2.2:8080?trusted=1 https://cache.nixos.org/" --flake ".#recovery"
|
|
||||||
|
|
||||||
{
|
|
||||||
description = "My system configuration";
|
|
||||||
|
|
||||||
inputs = {
|
|
||||||
impermanence = {
|
|
||||||
url = "github:nix-community/impermanence";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
||||||
nixpkgs-google.url = "github:NixOS/nixpkgs/45f6cfaa4605b706c870e75bd74bdb5e97eee11e";
|
|
||||||
lanzaboote = {
|
|
||||||
url = "github:nix-community/lanzaboote/v0.4.2";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
disko = {
|
|
||||||
url = "github:nix-community/disko";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
outputs =
|
|
||||||
{
|
|
||||||
self,
|
|
||||||
nixpkgs,
|
|
||||||
nixpkgs-google,
|
|
||||||
disko,
|
|
||||||
impermanence,
|
|
||||||
lanzaboote,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
|
||||||
forAllSystems = nixpkgs.lib.genAttrs nixpkgs.lib.systems.flakeExposed;
|
|
||||||
nodes = {
|
|
||||||
odo = {
|
|
||||||
system = "x86_64-linux";
|
|
||||||
};
|
|
||||||
odowork = {
|
|
||||||
system = "x86_64-linux";
|
|
||||||
};
|
|
||||||
quark = {
|
|
||||||
system = "x86_64-linux";
|
|
||||||
};
|
|
||||||
recovery = {
|
|
||||||
system = "x86_64-linux";
|
|
||||||
};
|
|
||||||
i_only_boot_zfs = {
|
|
||||||
system = "x86_64-linux";
|
|
||||||
};
|
|
||||||
hydra = {
|
|
||||||
system = "x86_64-linux";
|
|
||||||
};
|
|
||||||
family_disks = {
|
|
||||||
system = "x86_64-linux";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
nixosConfigs = builtins.mapAttrs (
|
|
||||||
hostname: nodeConfig: format:
|
|
||||||
nixpkgs.lib.nixosSystem {
|
|
||||||
specialArgs = {
|
|
||||||
inherit self;
|
|
||||||
|
|
||||||
this_nixos_config = self.nixosConfigurations."${hostname}";
|
|
||||||
|
|
||||||
all_nixos_configs = self.nixosConfigurations;
|
|
||||||
};
|
|
||||||
modules = [
|
|
||||||
impermanence.nixosModules.impermanence
|
|
||||||
lanzaboote.nixosModules.lanzaboote
|
|
||||||
disko.nixosModules.disko
|
|
||||||
./configuration.nix
|
|
||||||
(./. + "/hosts/${hostname}")
|
|
||||||
(./. + "/formats/${format}.nix")
|
|
||||||
{
|
|
||||||
config = {
|
|
||||||
nixpkgs.hostPlatform.system = nodeConfig.system;
|
|
||||||
nixpkgs.overlays = [
|
|
||||||
(final: prev: {
|
|
||||||
# stable = nixpkgs-stable.legacyPackages."${prev.stdenv.hostPlatform.system}";
|
|
||||||
unoptimized = import nixpkgs {
|
|
||||||
system = prev.stdenv.hostPlatform.system;
|
|
||||||
hostPlatform.gcc.arch = "default";
|
|
||||||
hostPlatform.gcc.tune = "default";
|
|
||||||
};
|
|
||||||
google = import nixpkgs-google {
|
|
||||||
system = prev.stdenv.hostPlatform.system;
|
|
||||||
};
|
|
||||||
})
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
];
|
|
||||||
}
|
|
||||||
) nodes;
|
|
||||||
installerConfig =
|
|
||||||
hostname: nodeConfig:
|
|
||||||
nixpkgs.lib.nixosSystem {
|
|
||||||
specialArgs = {
|
|
||||||
targetSystem = self.nixosConfigurations."${hostname}";
|
|
||||||
};
|
|
||||||
modules = [
|
|
||||||
./formats/installer.nix
|
|
||||||
({ nixpkgs.hostPlatform.system = nodeConfig.system; })
|
|
||||||
];
|
|
||||||
};
|
|
||||||
in
|
|
||||||
{
|
|
||||||
nixosConfigurations = (builtins.mapAttrs (name: value: value "toplevel") nixosConfigs);
|
|
||||||
}
|
|
||||||
// {
|
|
||||||
packages = (
|
|
||||||
forAllSystems (
|
|
||||||
system:
|
|
||||||
(builtins.mapAttrs (hostname: nodeConfig: {
|
|
||||||
iso = (nixosConfigs."${hostname}" "iso").config.system.build.isoImage;
|
|
||||||
vm_iso = (nixosConfigs."${hostname}" "vm_iso").config.system.build.isoImage;
|
|
||||||
sd = (nixosConfigs."${hostname}" "sd").config.system.build.sdImage;
|
|
||||||
installer = (installerConfig hostname nodes."${hostname}").config.system.build.isoImage;
|
|
||||||
}) (nixpkgs.lib.attrsets.filterAttrs (hostname: nodeConfig: nodeConfig.system == system) nodes))
|
|
||||||
)
|
|
||||||
);
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,74 +0,0 @@
|
|||||||
{
|
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
modulesPath,
|
|
||||||
targetSystem,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
|
||||||
installer = pkgs.writeShellApplication {
|
|
||||||
name = "installer";
|
|
||||||
runtimeInputs = with pkgs; [
|
|
||||||
# clevis
|
|
||||||
dosfstools
|
|
||||||
e2fsprogs
|
|
||||||
gawk
|
|
||||||
nixos-install-tools
|
|
||||||
util-linux
|
|
||||||
config.nix.package
|
|
||||||
];
|
|
||||||
text = ''
|
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
${targetSystem.config.system.build.diskoScript}
|
|
||||||
|
|
||||||
nixos-install --no-channel-copy --no-root-password --option substituters "" --system ${targetSystem.config.system.build.toplevel}
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
installerFailsafe = pkgs.writeShellScript "failsafe" ''
|
|
||||||
${lib.getExe installer} || echo "ERROR: Installation failure!"
|
|
||||||
sleep 3600
|
|
||||||
'';
|
|
||||||
in
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
(modulesPath + "/installer/cd-dvd/iso-image.nix")
|
|
||||||
(modulesPath + "/profiles/all-hardware.nix")
|
|
||||||
];
|
|
||||||
|
|
||||||
boot.kernelPackages = pkgs.linuxPackagesFor pkgs.linux_6_18;
|
|
||||||
# boot.kernelPackages = pkgs.linuxPackagesFor pkgs.linux;
|
|
||||||
boot.zfs.package = pkgs.zfs_unstable;
|
|
||||||
boot.kernelParams = [
|
|
||||||
"quiet"
|
|
||||||
"systemd.unit=getty.target"
|
|
||||||
];
|
|
||||||
boot.supportedFilesystems.zfs = true;
|
|
||||||
boot.initrd.systemd.enable = true;
|
|
||||||
|
|
||||||
networking.hostId = "04581ecf";
|
|
||||||
|
|
||||||
isoImage.makeEfiBootable = true;
|
|
||||||
isoImage.makeUsbBootable = true;
|
|
||||||
isoImage.squashfsCompression = "zstd -Xcompression-level 15";
|
|
||||||
|
|
||||||
environment.systemPackages = [
|
|
||||||
installer
|
|
||||||
];
|
|
||||||
|
|
||||||
systemd.services."getty@tty1" = {
|
|
||||||
overrideStrategy = "asDropin";
|
|
||||||
serviceConfig = {
|
|
||||||
ExecStart = [
|
|
||||||
""
|
|
||||||
installerFailsafe
|
|
||||||
];
|
|
||||||
Restart = "no";
|
|
||||||
StandardInput = "null";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# system.stateVersion = lib.mkDefault lib.trivial.release;
|
|
||||||
system.stateVersion = "24.11";
|
|
||||||
}
|
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
modulesPath,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
(modulesPath + "/installer/cd-dvd/iso-image.nix")
|
|
||||||
];
|
|
||||||
|
|
||||||
config = {
|
|
||||||
isoImage.makeEfiBootable = true;
|
|
||||||
isoImage.makeUsbBootable = true;
|
|
||||||
|
|
||||||
networking.dhcpcd.enable = true;
|
|
||||||
networking.useDHCP = true;
|
|
||||||
|
|
||||||
me.buildingPortable = true;
|
|
||||||
me.disko.enable = true;
|
|
||||||
me.disko.offline.enable = true;
|
|
||||||
me.mountPersistence = lib.mkForce false;
|
|
||||||
# me.optimizations.enable = lib.mkForce false;
|
|
||||||
|
|
||||||
# Not doing image_based_appliance because this might be an install ISO, in which case we'd need nix to do the install.
|
|
||||||
# me.image_based_appliance.enable = true;
|
|
||||||
|
|
||||||
# TODO: Should I use this instead of doing a mkIf for the disk config?
|
|
||||||
# disko.enableConfig = false;
|
|
||||||
|
|
||||||
# Faster image generation for testing/development.
|
|
||||||
isoImage.squashfsCompression = "zstd -Xcompression-level 15";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
{
|
|
||||||
modulesPath,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
(modulesPath + "/installer/sd-card/sd-image.nix")
|
|
||||||
];
|
|
||||||
|
|
||||||
config = {
|
|
||||||
isoImage.makeEfiBootable = true;
|
|
||||||
isoImage.makeUsbBootable = true;
|
|
||||||
|
|
||||||
boot.loader.grub.enable = false;
|
|
||||||
boot.loader.generic-extlinux-compatible.enable = true;
|
|
||||||
|
|
||||||
# TODO: image based appliance?
|
|
||||||
|
|
||||||
# TODO: Maybe this?
|
|
||||||
# fileSystems = {
|
|
||||||
# "/" = {
|
|
||||||
# device = "/dev/disk/by-label/NIXOS_SD";
|
|
||||||
# fsType = "ext4";
|
|
||||||
# options = [
|
|
||||||
# "noatime"
|
|
||||||
# "norelatime"
|
|
||||||
# ];
|
|
||||||
# };
|
|
||||||
# };
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
{ }
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
{
|
|
||||||
lib,
|
|
||||||
modulesPath,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
(modulesPath + "/installer/cd-dvd/iso-image.nix")
|
|
||||||
(modulesPath + "/profiles/qemu-guest.nix") # VirtIO kernel modules
|
|
||||||
];
|
|
||||||
|
|
||||||
config = {
|
|
||||||
isoImage.makeEfiBootable = true;
|
|
||||||
isoImage.makeUsbBootable = true;
|
|
||||||
|
|
||||||
networking.dhcpcd.enable = true;
|
|
||||||
networking.useDHCP = true;
|
|
||||||
|
|
||||||
me.image_based_appliance.enable = true;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
#
|
|
||||||
set -euo pipefail
|
|
||||||
IFS=$'\n\t'
|
|
||||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
||||||
|
|
||||||
: "${JOBS:="1"}"
|
|
||||||
|
|
||||||
TARGET=family_disks
|
|
||||||
|
|
||||||
for f in /persist/manual/manual_add_to_store/*; do nix-store --add-fixed sha256 "$f"; done
|
|
||||||
|
|
||||||
nixos-rebuild boot --flake "$DIR/../../#family_disks" --target-host "$TARGET" --build-host "$TARGET" --sudo --max-jobs "$JOBS" --repair --log-format internal-json -v "${@}" |& nom --json
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
#
|
|
||||||
set -euo pipefail
|
|
||||||
IFS=$'\n\t'
|
|
||||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
||||||
|
|
||||||
: "${JOBS:="1"}"
|
|
||||||
|
|
||||||
TARGET=family_disks
|
|
||||||
|
|
||||||
for f in /persist/manual/manual_add_to_store/*; do nix-store --add-fixed sha256 "$f"; done
|
|
||||||
|
|
||||||
nixos-rebuild switch --flake "$DIR/../../#family_disks" --target-host "$TARGET" --build-host "$TARGET" --sudo --max-jobs "$JOBS" --repair --log-format internal-json -v "${@}" |& nom --json
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
#
|
|
||||||
set -euo pipefail
|
|
||||||
IFS=$'\n\t'
|
|
||||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
||||||
|
|
||||||
: "${JOBS:="1"}"
|
|
||||||
|
|
||||||
for f in /persist/manual/manual_add_to_store/*; do nix-store --add-fixed sha256 "$f"; done
|
|
||||||
nix build --extra-experimental-features nix-command --extra-experimental-features flakes "$DIR/../..#family_disks.iso" --repair --max-jobs "$JOBS" --log-format internal-json -v "${@}" |& nom --json
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
#
|
|
||||||
set -euo pipefail
|
|
||||||
IFS=$'\n\t'
|
|
||||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
||||||
|
|
||||||
: "${JOBS:="1"}"
|
|
||||||
|
|
||||||
for f in /persist/manual/manual_add_to_store/*; do nix-store --add-fixed sha256 "$f"; done
|
|
||||||
nixos-rebuild boot --show-trace --sudo --max-jobs "$JOBS" --flake "$DIR/../../#family_disks" --repair --log-format internal-json -v "${@}" |& nom --json
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
#
|
|
||||||
set -euo pipefail
|
|
||||||
IFS=$'\n\t'
|
|
||||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
||||||
|
|
||||||
: "${JOBS:="1"}"
|
|
||||||
: "${NOM:="true"}"
|
|
||||||
|
|
||||||
for f in /persist/manual/manual_add_to_store/*; do nix-store --add-fixed sha256 "$f"; done
|
|
||||||
|
|
||||||
nixos-rebuild build --show-trace --sudo --max-jobs "$JOBS" --flake "$DIR/../../#family_disks" --repair --log-format internal-json -v "${@}" |& nom --json
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
#
|
|
||||||
set -euo pipefail
|
|
||||||
IFS=$'\n\t'
|
|
||||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
||||||
|
|
||||||
: "${JOBS:="1"}"
|
|
||||||
|
|
||||||
for f in /persist/manual/manual_add_to_store/*; do nix-store --add-fixed sha256 "$f"; done
|
|
||||||
nixos-rebuild switch --show-trace --sudo --max-jobs "$JOBS" --flake "$DIR/../../#family_disks" --repair --log-format internal-json -v "${@}" |& nom --json
|
|
||||||
@@ -1,75 +0,0 @@
|
|||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
./hardware-configuration.nix
|
|
||||||
./wrapped-disk-config.nix
|
|
||||||
./distributed_build.nix
|
|
||||||
./power_management.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
config = {
|
|
||||||
# Generate with `head -c4 /dev/urandom | od -A none -t x4`
|
|
||||||
networking.hostId = "908cbf04";
|
|
||||||
|
|
||||||
networking.hostName = "family_disks"; # Define your hostname.
|
|
||||||
|
|
||||||
time.timeZone = "America/New_York";
|
|
||||||
i18n.defaultLocale = "en_US.UTF-8";
|
|
||||||
|
|
||||||
me.boot.enable = true;
|
|
||||||
me.boot.secure = false;
|
|
||||||
me.mountPersistence = true;
|
|
||||||
|
|
||||||
# Toggle to start writing the extlinux config which will be used by zfsbootmenu
|
|
||||||
boot.loader.generic-extlinux-compatible.enable = true;
|
|
||||||
boot.loader.systemd-boot.enable = lib.mkForce false;
|
|
||||||
|
|
||||||
me.rollback.dataset = [
|
|
||||||
"zroot/linux/nix/root@blank"
|
|
||||||
"zroot/linux/nix/home@blank"
|
|
||||||
];
|
|
||||||
|
|
||||||
me.optimizations = {
|
|
||||||
enable = true;
|
|
||||||
arch = "skylake";
|
|
||||||
# build_arch = "x86-64-v3";
|
|
||||||
system_features = [
|
|
||||||
"gccarch-znver4"
|
|
||||||
"gccarch-skylake"
|
|
||||||
"gccarch-kabylake"
|
|
||||||
# "gccarch-alderlake" missing WAITPKG
|
|
||||||
"gccarch-x86-64-v3"
|
|
||||||
"gccarch-x86-64-v4"
|
|
||||||
"benchmark"
|
|
||||||
"big-parallel"
|
|
||||||
"kvm"
|
|
||||||
"nixos-test"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
# Early KMS
|
|
||||||
# boot.initrd.kernelModules = [ "amdgpu" ];
|
|
||||||
|
|
||||||
# Mount tmpfs at /tmp
|
|
||||||
boot.tmp.useTmpfs = true;
|
|
||||||
|
|
||||||
# Enable light sensor
|
|
||||||
# hardware.sensor.iio.enable = lib.mkDefault true;
|
|
||||||
|
|
||||||
# Enable TRIM
|
|
||||||
# services.fstrim.enable = lib.mkDefault true;
|
|
||||||
|
|
||||||
# Only run nix builders at idle priority for a more responsive system. Do not set on servers, just end-user devices.
|
|
||||||
nix.daemonCPUSchedPolicy = "idle";
|
|
||||||
|
|
||||||
me.build_in_ram.enable = true;
|
|
||||||
me.dont_use_substituters.enable = true;
|
|
||||||
me.minimal_base.enable = true;
|
|
||||||
me.recovery.enable = true;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,155 +0,0 @@
|
|||||||
# Manual Step:
|
|
||||||
# Check if drive supports 4kn: nvme id-ns -H /dev/nvme0n1
|
|
||||||
# Format the drive to 4kn: nvme format --lbaf=1 /dev/nvme0n1
|
|
||||||
|
|
||||||
{
|
|
||||||
disko.devices = {
|
|
||||||
disk = {
|
|
||||||
main = {
|
|
||||||
type = "disk";
|
|
||||||
device = "/dev/nvme0n1";
|
|
||||||
content = {
|
|
||||||
type = "gpt";
|
|
||||||
partitions = {
|
|
||||||
ESP = {
|
|
||||||
size = "1G";
|
|
||||||
type = "EF00";
|
|
||||||
content = {
|
|
||||||
type = "filesystem";
|
|
||||||
format = "vfat";
|
|
||||||
mountpoint = "/efi";
|
|
||||||
mountOptions = [
|
|
||||||
"umask=0077"
|
|
||||||
"noatime"
|
|
||||||
"discard"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
zfs = {
|
|
||||||
size = "100%";
|
|
||||||
content = {
|
|
||||||
type = "zfs";
|
|
||||||
pool = "zroot";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
zpool = {
|
|
||||||
zroot = {
|
|
||||||
type = "zpool";
|
|
||||||
# mode = "mirror";
|
|
||||||
# Workaround: cannot import 'zroot': I/O error in disko tests
|
|
||||||
options.cachefile = "none";
|
|
||||||
options = {
|
|
||||||
ashift = "12";
|
|
||||||
compatibility = "openzfs-2.2-freebsd";
|
|
||||||
autotrim = "on";
|
|
||||||
};
|
|
||||||
rootFsOptions = {
|
|
||||||
acltype = "posixacl";
|
|
||||||
atime = "off";
|
|
||||||
relatime = "off";
|
|
||||||
xattr = "sa";
|
|
||||||
mountpoint = "none";
|
|
||||||
compression = "lz4";
|
|
||||||
canmount = "off";
|
|
||||||
utf8only = "on";
|
|
||||||
dnodesize = "auto";
|
|
||||||
normalization = "formD";
|
|
||||||
};
|
|
||||||
|
|
||||||
datasets = {
|
|
||||||
"linux/nix" = {
|
|
||||||
type = "zfs_fs";
|
|
||||||
options.mountpoint = "none";
|
|
||||||
options = {
|
|
||||||
# encryption = "aes-256-gcm";
|
|
||||||
# keyformat = "passphrase";
|
|
||||||
# # keylocation = "file:///tmp/secret.key";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
"linux/nix/root" = {
|
|
||||||
type = "zfs_fs";
|
|
||||||
options.mountpoint = "legacy";
|
|
||||||
mountpoint = "/";
|
|
||||||
postCreateHook = "zfs list -t snapshot -H -o name | grep -E '^zroot/linux/nix/root@blank$' || zfs snapshot zroot/linux/nix/root@blank";
|
|
||||||
};
|
|
||||||
"linux/nix/boot" = {
|
|
||||||
type = "zfs_fs";
|
|
||||||
options = {
|
|
||||||
mountpoint = "legacy";
|
|
||||||
"org.zfsbootmenu:active" = "on";
|
|
||||||
};
|
|
||||||
mountpoint = "/boot";
|
|
||||||
postCreateHook = "zfs list -t snapshot -H -o name | grep -E '^zroot/linux/nix/boot@blank$' || zfs snapshot zroot/linux/nix/boot@blank";
|
|
||||||
};
|
|
||||||
"linux/nix/nix" = {
|
|
||||||
type = "zfs_fs";
|
|
||||||
options.mountpoint = "legacy";
|
|
||||||
mountpoint = "/nix";
|
|
||||||
postCreateHook = "zfs list -t snapshot -H -o name | grep -E '^zroot/linux/nix/nix@blank$' || zfs snapshot zroot/linux/nix/nix@blank";
|
|
||||||
options = {
|
|
||||||
# recordsize = "16MiB";
|
|
||||||
# compression = "zstd-19";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
"linux/nix/home" = {
|
|
||||||
type = "zfs_fs";
|
|
||||||
options.mountpoint = "legacy";
|
|
||||||
mountpoint = "/home";
|
|
||||||
postCreateHook = "zfs list -t snapshot -H -o name | grep -E '^zroot/linux/nix/home@blank$' || zfs snapshot zroot/linux/nix/home@blank";
|
|
||||||
};
|
|
||||||
"linux/nix/persist" = {
|
|
||||||
type = "zfs_fs";
|
|
||||||
options.mountpoint = "legacy";
|
|
||||||
mountpoint = "/persist";
|
|
||||||
postCreateHook = "zfs list -t snapshot -H -o name | grep -E '^zroot/linux/nix/persist@blank$' || zfs snapshot zroot/linux/nix/persist@blank";
|
|
||||||
};
|
|
||||||
"linux/nix/state" = {
|
|
||||||
type = "zfs_fs";
|
|
||||||
options.mountpoint = "legacy";
|
|
||||||
mountpoint = "/state";
|
|
||||||
postCreateHook = "zfs list -t snapshot -H -o name | grep -E '^zroot/linux/nix/state@blank$' || zfs snapshot zroot/linux/nix/state@blank";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# Make sure all persistent volumes are marked as neededForBoot
|
|
||||||
#
|
|
||||||
# Also mounts /home so it is mounted before the user home directories are created.
|
|
||||||
fileSystems."/persist".neededForBoot = true;
|
|
||||||
fileSystems."/state".neededForBoot = true;
|
|
||||||
fileSystems."/home".neededForBoot = true;
|
|
||||||
|
|
||||||
fileSystems."/".options = [
|
|
||||||
"noatime"
|
|
||||||
"norelatime"
|
|
||||||
];
|
|
||||||
fileSystems."/boot".options = [
|
|
||||||
"noatime"
|
|
||||||
"norelatime"
|
|
||||||
];
|
|
||||||
fileSystems."/nix".options = [
|
|
||||||
"noatime"
|
|
||||||
"norelatime"
|
|
||||||
];
|
|
||||||
fileSystems."/persist".options = [
|
|
||||||
"noatime"
|
|
||||||
"norelatime"
|
|
||||||
];
|
|
||||||
fileSystems."/state".options = [
|
|
||||||
"noatime"
|
|
||||||
"norelatime"
|
|
||||||
];
|
|
||||||
fileSystems."/home".options = [
|
|
||||||
"noatime"
|
|
||||||
"norelatime"
|
|
||||||
];
|
|
||||||
|
|
||||||
# Only attempt to decrypt the main pool. Otherwise it attempts to decrypt pools that aren't even used.
|
|
||||||
boot.zfs.requestEncryptionCredentials = [ "zroot/linux/nix" ];
|
|
||||||
}
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
{
|
|
||||||
imports = [ ];
|
|
||||||
|
|
||||||
config = {
|
|
||||||
me.distributed_build.enable = true;
|
|
||||||
me.distributed_build.machines.quark = {
|
|
||||||
enable = false;
|
|
||||||
additional_config = {
|
|
||||||
speedFactor = 2;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
me.distributed_build.machines.hydra = {
|
|
||||||
enable = true;
|
|
||||||
additional_config = {
|
|
||||||
speedFactor = 2;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
modulesPath,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
(modulesPath + "/installer/scan/not-detected.nix")
|
|
||||||
];
|
|
||||||
|
|
||||||
config = {
|
|
||||||
boot.initrd.availableKernelModules = [
|
|
||||||
"nvme"
|
|
||||||
"xhci_pci"
|
|
||||||
"thunderbolt"
|
|
||||||
];
|
|
||||||
boot.initrd.kernelModules = [ ];
|
|
||||||
boot.kernelModules = [ ];
|
|
||||||
boot.extraModulePackages = [ ];
|
|
||||||
|
|
||||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
|
||||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
|
||||||
# still possible to use this option, but it's recommended to use it in conjunction
|
|
||||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
|
||||||
# networking.useDHCP = lib.mkDefault true;
|
|
||||||
# networking.interfaces.eno1.useDHCP = lib.mkDefault true;
|
|
||||||
# networking.interfaces.wlp58s0.useDHCP = lib.mkDefault true;
|
|
||||||
|
|
||||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,75 +0,0 @@
|
|||||||
{
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
|
|
||||||
{
|
|
||||||
imports = [ ];
|
|
||||||
|
|
||||||
config = {
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
powertop
|
|
||||||
];
|
|
||||||
|
|
||||||
# amdgpu.abmlevel=3 :: Automatically reduce screen brightness but tweak colors to compensate for power reduction.
|
|
||||||
# pcie_aspm=force pcie_aspm.policy=powersupersave :: Enable PCIe active state power management for power reduction.
|
|
||||||
# nowatchdog :: Disable watchdog for power savings (related to disable_sp5100_watchdog above).
|
|
||||||
# amd_pstate=passive :: Fully automated hardware pstate control.
|
|
||||||
# amd_pstate=active :: Same as passive except we can set the energy performance preference (EPP) to suggest how much we prefer performance or energy efficiency.
|
|
||||||
# amd_pstate=guided :: Same as passive except we can set upper and lower frequency bounds.
|
|
||||||
# amdgpu.dcdebugmask=0x10 :: Allegedly disables Panel Replay from https://community.frame.work/t/tracking-freezing-arch-linux-amd/39495/32
|
|
||||||
boot.kernelParams = [
|
|
||||||
"amdgpu.abmlevel=2"
|
|
||||||
"pcie_aspm=force"
|
|
||||||
# "pcie_aspm.policy=powersupersave"
|
|
||||||
"nowatchdog"
|
|
||||||
# I don't see a measurable benefit from these two:
|
|
||||||
# "cpufreq.default_governor=powersave"
|
|
||||||
# "initcall_blacklist=cpufreq_gov_userspace_init"
|
|
||||||
];
|
|
||||||
|
|
||||||
systemd.tmpfiles.rules = [
|
|
||||||
"w- /sys/firmware/acpi/platform_profile - - - - low-power"
|
|
||||||
"w- /sys/devices/system/cpu/cpufreq/policy0/energy_performance_preference - - - - power"
|
|
||||||
"w- /sys/devices/system/cpu/cpufreq/policy1/energy_performance_preference - - - - power"
|
|
||||||
"w- /sys/devices/system/cpu/cpufreq/policy2/energy_performance_preference - - - - power"
|
|
||||||
"w- /sys/devices/system/cpu/cpufreq/policy3/energy_performance_preference - - - - power"
|
|
||||||
"w- /sys/devices/system/cpu/cpufreq/policy4/energy_performance_preference - - - - power"
|
|
||||||
"w- /sys/devices/system/cpu/cpufreq/policy5/energy_performance_preference - - - - power"
|
|
||||||
"w- /sys/devices/system/cpu/cpufreq/policy6/energy_performance_preference - - - - power"
|
|
||||||
"w- /sys/devices/system/cpu/cpufreq/policy7/energy_performance_preference - - - - power"
|
|
||||||
"w- /sys/devices/system/cpu/cpufreq/policy8/energy_performance_preference - - - - power"
|
|
||||||
"w- /sys/devices/system/cpu/cpufreq/policy9/energy_performance_preference - - - - power"
|
|
||||||
"w- /sys/devices/system/cpu/cpufreq/policy10/energy_performance_preference - - - - power"
|
|
||||||
"w- /sys/devices/system/cpu/cpufreq/policy11/energy_performance_preference - - - - power"
|
|
||||||
"w- /sys/devices/system/cpu/cpufreq/policy12/energy_performance_preference - - - - power"
|
|
||||||
"w- /sys/devices/system/cpu/cpufreq/policy13/energy_performance_preference - - - - power"
|
|
||||||
"w- /sys/devices/system/cpu/cpufreq/policy14/energy_performance_preference - - - - power"
|
|
||||||
"w- /sys/devices/system/cpu/cpufreq/policy15/energy_performance_preference - - - - power"
|
|
||||||
"w- /sys/devices/system/cpu/cpu0/cpufreq/boost - - - - 0"
|
|
||||||
"w- /sys/devices/system/cpu/cpu1/cpufreq/boost - - - - 0"
|
|
||||||
"w- /sys/devices/system/cpu/cpu2/cpufreq/boost - - - - 0"
|
|
||||||
"w- /sys/devices/system/cpu/cpu3/cpufreq/boost - - - - 0"
|
|
||||||
"w- /sys/devices/system/cpu/cpu4/cpufreq/boost - - - - 0"
|
|
||||||
"w- /sys/devices/system/cpu/cpu5/cpufreq/boost - - - - 0"
|
|
||||||
"w- /sys/devices/system/cpu/cpu6/cpufreq/boost - - - - 0"
|
|
||||||
"w- /sys/devices/system/cpu/cpu7/cpufreq/boost - - - - 0"
|
|
||||||
"w- /sys/devices/system/cpu/cpu8/cpufreq/boost - - - - 0"
|
|
||||||
"w- /sys/devices/system/cpu/cpu9/cpufreq/boost - - - - 0"
|
|
||||||
"w- /sys/devices/system/cpu/cpu10/cpufreq/boost - - - - 0"
|
|
||||||
"w- /sys/devices/system/cpu/cpu11/cpufreq/boost - - - - 0"
|
|
||||||
"w- /sys/devices/system/cpu/cpu12/cpufreq/boost - - - - 0"
|
|
||||||
"w- /sys/devices/system/cpu/cpu13/cpufreq/boost - - - - 0"
|
|
||||||
"w- /sys/devices/system/cpu/cpu14/cpufreq/boost - - - - 0"
|
|
||||||
"w- /sys/devices/system/cpu/cpu15/cpufreq/boost - - - - 0"
|
|
||||||
];
|
|
||||||
|
|
||||||
boot.extraModprobeConfig = ''
|
|
||||||
# Disable the hardware watchdog inside AMD 700 chipset series for power savings.
|
|
||||||
blacklist sp5100_tco
|
|
||||||
|
|
||||||
# Sound power-saving was causing chat notifications to be inaudible.
|
|
||||||
# options snd_hda_intel power_save=1
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
|
|
||||||
lib.mkIf (!config.me.buildingPortable) (import ./disk-config.nix)
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
#
|
|
||||||
set -euo pipefail
|
|
||||||
IFS=$'\n\t'
|
|
||||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
||||||
|
|
||||||
: "${JOBS:="1"}"
|
|
||||||
|
|
||||||
TARGET=hydra
|
|
||||||
|
|
||||||
for f in /persist/manual/manual_add_to_store/*; do nix-store --add-fixed sha256 "$f"; done
|
|
||||||
|
|
||||||
nixos-rebuild boot --flake "$DIR/../../#hydra" --target-host "$TARGET" --build-host "$TARGET" --sudo --max-jobs "$JOBS" --repair --log-format internal-json -v "${@}" |& nom --json
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
#
|
|
||||||
set -euo pipefail
|
|
||||||
IFS=$'\n\t'
|
|
||||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
||||||
|
|
||||||
: "${JOBS:="1"}"
|
|
||||||
|
|
||||||
TARGET=hydra
|
|
||||||
|
|
||||||
for f in /persist/manual/manual_add_to_store/*; do nix-store --add-fixed sha256 "$f"; done
|
|
||||||
|
|
||||||
nixos-rebuild switch --flake "$DIR/../../#hydra" --target-host "$TARGET" --build-host "$TARGET" --sudo --max-jobs "$JOBS" --repair --log-format internal-json -v "${@}" |& nom --json
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
#
|
|
||||||
set -euo pipefail
|
|
||||||
IFS=$'\n\t'
|
|
||||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
||||||
|
|
||||||
: "${JOBS:="1"}"
|
|
||||||
|
|
||||||
for f in /persist/manual/manual_add_to_store/*; do nix-store --add-fixed sha256 "$f"; done
|
|
||||||
nix build --extra-experimental-features nix-command --extra-experimental-features flakes "$DIR/../..#hydra.iso" --max-jobs "$JOBS" --repair --log-format internal-json -v "${@}" |& nom --json
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
#
|
|
||||||
set -euo pipefail
|
|
||||||
IFS=$'\n\t'
|
|
||||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
||||||
|
|
||||||
: "${JOBS:="1"}"
|
|
||||||
|
|
||||||
for f in /persist/manual/manual_add_to_store/*; do nix-store --add-fixed sha256 "$f"; done
|
|
||||||
nixos-rebuild boot --show-trace --sudo --max-jobs "$JOBS" --flake "$DIR/../../#hydra" --repair --log-format internal-json -v "${@}" |& nom --json
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
#
|
|
||||||
set -euo pipefail
|
|
||||||
IFS=$'\n\t'
|
|
||||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
||||||
|
|
||||||
: "${JOBS:="1"}"
|
|
||||||
|
|
||||||
for f in /persist/manual/manual_add_to_store/*; do nix-store --add-fixed sha256 "$f"; done
|
|
||||||
nixos-rebuild build --show-trace --sudo --max-jobs "$JOBS" --flake "$DIR/../../#hydra" --repair --log-format internal-json -v "${@}" |& nom --json
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
#
|
|
||||||
set -euo pipefail
|
|
||||||
IFS=$'\n\t'
|
|
||||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
||||||
|
|
||||||
: "${JOBS:="1"}"
|
|
||||||
|
|
||||||
for f in /persist/manual/manual_add_to_store/*; do nix-store --add-fixed sha256 "$f"; done
|
|
||||||
nixos-rebuild switch --show-trace --sudo --max-jobs "$JOBS" --flake "$DIR/../../#hydra" --repair --log-format internal-json -v "${@}" |& nom --json
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
#
|
|
||||||
set -euo pipefail
|
|
||||||
IFS=$'\n\t'
|
|
||||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
||||||
|
|
||||||
: "${JOBS:="1"}"
|
|
||||||
|
|
||||||
for f in /persist/manual/manual_add_to_store/*; do nix-store --add-fixed sha256 "$f"; done
|
|
||||||
nix build --extra-experimental-features nix-command --extra-experimental-features flakes "$DIR/../..#hydra.vm_iso" --max-jobs "$JOBS" --repair --log-format internal-json -v "${@}" |& nom --json
|
|
||||||
@@ -1,138 +0,0 @@
|
|||||||
# MANUAL: On client machines generate signing keys:
|
|
||||||
# nix-store --generate-binary-cache-key some-name /persist/manual/nix/nix-cache-key.sec /persist/manual/nix/nix-cache-key.pub
|
|
||||||
#
|
|
||||||
# Trust other machines and add the substituters:
|
|
||||||
# nix.binaryCachePublicKeys = [ "some-name:AzNW1MOlkNEsUAXS1jIFZ1QCFKXjV+Y/LrF37quAZ1A=" ];
|
|
||||||
# nix.binaryCaches = [ "https://test.example/nix-cache" ];
|
|
||||||
|
|
||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
./hardware-configuration.nix
|
|
||||||
./vm_disk.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
config = {
|
|
||||||
networking =
|
|
||||||
let
|
|
||||||
interface = "enp0s2";
|
|
||||||
in
|
|
||||||
{
|
|
||||||
# Generate with `head -c4 /dev/urandom | od -A none -t x4`
|
|
||||||
hostId = "6fbf418b";
|
|
||||||
|
|
||||||
hostName = "hydra"; # Define your hostname.
|
|
||||||
|
|
||||||
interfaces = {
|
|
||||||
"${interface}" = {
|
|
||||||
ipv4.addresses = [
|
|
||||||
{
|
|
||||||
address = "10.215.1.219";
|
|
||||||
prefixLength = 24;
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
ipv6.addresses = [
|
|
||||||
{
|
|
||||||
address = "2620:11f:7001:7:ffff:ffff:0ad7:01db";
|
|
||||||
prefixLength = 64;
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
defaultGateway = "10.215.1.1";
|
|
||||||
defaultGateway6 = {
|
|
||||||
# address = "2620:11f:7001:7::1";
|
|
||||||
address = "2620:11f:7001:7:ffff:ffff:0ad7:0101";
|
|
||||||
inherit interface;
|
|
||||||
};
|
|
||||||
|
|
||||||
dhcpcd.enable = lib.mkForce false;
|
|
||||||
useDHCP = lib.mkForce false;
|
|
||||||
};
|
|
||||||
|
|
||||||
time.timeZone = "America/New_York";
|
|
||||||
i18n.defaultLocale = "en_US.UTF-8";
|
|
||||||
|
|
||||||
me.boot.enable = true;
|
|
||||||
me.boot.secure = false;
|
|
||||||
me.mountPersistence = true;
|
|
||||||
boot.loader.timeout = lib.mkForce 0; # We can always generate a new ISO if we need to access other boot options.
|
|
||||||
|
|
||||||
me.optimizations = {
|
|
||||||
enable = true;
|
|
||||||
arch = "znver4";
|
|
||||||
# build_arch = "x86-64-v3";
|
|
||||||
system_features = [
|
|
||||||
"gccarch-znver4"
|
|
||||||
"gccarch-skylake"
|
|
||||||
"gccarch-kabylake"
|
|
||||||
# "gccarch-alderlake" missing WAITPKG
|
|
||||||
"gccarch-x86-64-v3"
|
|
||||||
"gccarch-x86-64-v4"
|
|
||||||
"benchmark"
|
|
||||||
"big-parallel"
|
|
||||||
"kvm"
|
|
||||||
"nixos-test"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
# Mount tmpfs at /tmp
|
|
||||||
boot.tmp.useTmpfs = true;
|
|
||||||
|
|
||||||
# Enable TRIM
|
|
||||||
# services.fstrim.enable = lib.mkDefault true;
|
|
||||||
|
|
||||||
# nix.optimise.automatic = true;
|
|
||||||
# nix.optimise.dates = [ "03:45" ];
|
|
||||||
# nix.optimise.persistent = true;
|
|
||||||
|
|
||||||
me.image_based_appliance.enable = lib.mkForce false;
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
htop
|
|
||||||
git # for building on hydra
|
|
||||||
tmux # for building on hydra
|
|
||||||
nix-output-monitor # for building on hydra
|
|
||||||
];
|
|
||||||
|
|
||||||
# nix.sshServe.enable = true;
|
|
||||||
# nix.sshServe.keys = [ "ssh-dss AAAAB3NzaC1k... bob@example.org" ];
|
|
||||||
|
|
||||||
# Override garbage collection to keep things longer
|
|
||||||
# Automatic garbage collection
|
|
||||||
nix.gc = lib.mkForce {
|
|
||||||
automatic = true;
|
|
||||||
persistent = true;
|
|
||||||
dates = "weekly";
|
|
||||||
# randomizedDelaySec = "14m";
|
|
||||||
options = "--delete-older-than 60d";
|
|
||||||
};
|
|
||||||
|
|
||||||
# The default limit of files is 1024 which is too low for some nix builds.
|
|
||||||
#
|
|
||||||
# Check with `ulimit -n`
|
|
||||||
security.pam.loginLimits = [
|
|
||||||
{
|
|
||||||
domain = "*";
|
|
||||||
item = "nofile";
|
|
||||||
type = "-";
|
|
||||||
value = "8192";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
# systemd.user.extraConfig = "DefaultLimitNOFILE=8192";
|
|
||||||
# systemd.services."user@11400".serviceConfig.LimitNOFILE = "8192";
|
|
||||||
|
|
||||||
me.build_in_ram.enable = true;
|
|
||||||
me.dont_use_substituters.enable = true;
|
|
||||||
me.hydra.enable = true;
|
|
||||||
me.minimal_base.enable = true;
|
|
||||||
me.nix_worker.enable = true;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
modulesPath,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
(modulesPath + "/installer/scan/not-detected.nix")
|
|
||||||
];
|
|
||||||
|
|
||||||
config = {
|
|
||||||
boot.initrd.availableKernelModules = [
|
|
||||||
"nvme"
|
|
||||||
"xhci_pci"
|
|
||||||
"thunderbolt"
|
|
||||||
];
|
|
||||||
boot.initrd.kernelModules = [ ];
|
|
||||||
boot.kernelModules = [ ];
|
|
||||||
boot.extraModulePackages = [ ];
|
|
||||||
|
|
||||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
|
||||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
|
||||||
# still possible to use this option, but it's recommended to use it in conjunction
|
|
||||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
|
||||||
# networking.useDHCP = lib.mkDefault true;
|
|
||||||
# networking.interfaces.eno1.useDHCP = lib.mkDefault true;
|
|
||||||
# networking.interfaces.wlp58s0.useDHCP = lib.mkDefault true;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,95 +0,0 @@
|
|||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
|
|
||||||
{
|
|
||||||
imports = [ ];
|
|
||||||
|
|
||||||
config = {
|
|
||||||
# environment.systemPackages = with pkgs; [
|
|
||||||
# e2fsprogs # mkfs.ext4
|
|
||||||
# gptfdisk # cgdisk
|
|
||||||
# ];
|
|
||||||
|
|
||||||
# Mount the local disk
|
|
||||||
fileSystems = lib.mkIf config.me.mountPersistence {
|
|
||||||
"/.disk" = lib.mkForce {
|
|
||||||
device = "/dev/nvme0n1p1";
|
|
||||||
fsType = "ext4";
|
|
||||||
options = [
|
|
||||||
"noatime"
|
|
||||||
"discard"
|
|
||||||
];
|
|
||||||
neededForBoot = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
# "/.persist" = lib.mkForce {
|
|
||||||
# device = "bind9p";
|
|
||||||
# fsType = "9p";
|
|
||||||
# options = [
|
|
||||||
# "noatime"
|
|
||||||
# "trans=virtio"
|
|
||||||
# "version=9p2000.L"
|
|
||||||
# "cache=mmap"
|
|
||||||
# "msize=512000"
|
|
||||||
# "uname=root"
|
|
||||||
# "dfltuid=0"
|
|
||||||
# "dfltgid=0"
|
|
||||||
# "nodevmap"
|
|
||||||
# # "noauto"
|
|
||||||
# # "x-systemd.automount"
|
|
||||||
# ];
|
|
||||||
# neededForBoot = true;
|
|
||||||
# };
|
|
||||||
|
|
||||||
"/persist" = {
|
|
||||||
fsType = "none";
|
|
||||||
device = "/.disk/persist";
|
|
||||||
options = [
|
|
||||||
"bind"
|
|
||||||
"rw"
|
|
||||||
];
|
|
||||||
depends = [
|
|
||||||
"/.disk/persist"
|
|
||||||
];
|
|
||||||
neededForBoot = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
"/state" = {
|
|
||||||
fsType = "none";
|
|
||||||
device = "/.disk/state";
|
|
||||||
options = [
|
|
||||||
"bind"
|
|
||||||
"rw"
|
|
||||||
];
|
|
||||||
depends = [
|
|
||||||
"/.disk/state"
|
|
||||||
];
|
|
||||||
neededForBoot = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
# "/nix/store" = lib.mkForce {
|
|
||||||
# overlay = {
|
|
||||||
# lowerdir = [ "/nix/.ro-store" ];
|
|
||||||
# upperdir = "/.disk/persist/store";
|
|
||||||
# workdir = "/.disk/state/work";
|
|
||||||
# };
|
|
||||||
# # fsType = "overlay";
|
|
||||||
# # device = "overlay";
|
|
||||||
# # options = [
|
|
||||||
# # "lowerdir=/nix/.ro-store"
|
|
||||||
# # "upperdir=/.disk/persist/store"
|
|
||||||
# # "workdir=/.disk/state/work"
|
|
||||||
# # ];
|
|
||||||
# depends = [
|
|
||||||
# "/nix/.ro-store"
|
|
||||||
# "/.disk/persist/store"
|
|
||||||
# "/.disk/state/work"
|
|
||||||
# ];
|
|
||||||
# };
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
#
|
|
||||||
set -euo pipefail
|
|
||||||
IFS=$'\n\t'
|
|
||||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
||||||
|
|
||||||
: "${JOBS:="1"}"
|
|
||||||
|
|
||||||
TARGET=i_only_boot_zfs
|
|
||||||
|
|
||||||
for f in /persist/manual/manual_add_to_store/*; do nix-store --add-fixed sha256 "$f"; done
|
|
||||||
|
|
||||||
nixos-rebuild boot --flake "$DIR/../../#i_only_boot_zfs" --target-host "$TARGET" --build-host "$TARGET" --sudo --max-jobs "$JOBS" --repair --log-format internal-json -v "${@}" |& nom --json
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
#
|
|
||||||
set -euo pipefail
|
|
||||||
IFS=$'\n\t'
|
|
||||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
||||||
|
|
||||||
: "${JOBS:="1"}"
|
|
||||||
|
|
||||||
TARGET=i_only_boot_zfs
|
|
||||||
|
|
||||||
for f in /persist/manual/manual_add_to_store/*; do nix-store --add-fixed sha256 "$f"; done
|
|
||||||
|
|
||||||
nixos-rebuild switch --flake "$DIR/../../#i_only_boot_zfs" --target-host "$TARGET" --build-host "$TARGET" --sudo --max-jobs "$JOBS" --repair --log-format internal-json -v "${@}" |& nom --json
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
#
|
|
||||||
set -euo pipefail
|
|
||||||
IFS=$'\n\t'
|
|
||||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
||||||
|
|
||||||
: "${JOBS:="1"}"
|
|
||||||
|
|
||||||
for f in /persist/manual/manual_add_to_store/*; do nix-store --add-fixed sha256 "$f"; done
|
|
||||||
nix build --extra-experimental-features nix-command --extra-experimental-features flakes "$DIR/../..#i_only_boot_zfs.iso" --repair --max-jobs "$JOBS" --log-format internal-json -v "${@}" |& nom --json
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
#
|
|
||||||
set -euo pipefail
|
|
||||||
IFS=$'\n\t'
|
|
||||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
||||||
|
|
||||||
: "${JOBS:="1"}"
|
|
||||||
|
|
||||||
for f in /persist/manual/manual_add_to_store/*; do nix-store --add-fixed sha256 "$f"; done
|
|
||||||
nixos-rebuild boot --show-trace --sudo --max-jobs "$JOBS" --flake "$DIR/../../#i_only_boot_zfs" --repair --log-format internal-json -v "${@}" |& nom --json
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
#
|
|
||||||
set -euo pipefail
|
|
||||||
IFS=$'\n\t'
|
|
||||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
||||||
|
|
||||||
: "${JOBS:="1"}"
|
|
||||||
|
|
||||||
for f in /persist/manual/manual_add_to_store/*; do nix-store --add-fixed sha256 "$f"; done
|
|
||||||
nixos-rebuild build --show-trace --sudo --max-jobs "$JOBS" --flake "$DIR/../../#i_only_boot_zfs" --repair --log-format internal-json -v "${@}" |& nom --json
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
#
|
|
||||||
set -euo pipefail
|
|
||||||
IFS=$'\n\t'
|
|
||||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
||||||
|
|
||||||
: "${JOBS:="1"}"
|
|
||||||
|
|
||||||
for f in /persist/manual/manual_add_to_store/*; do nix-store --add-fixed sha256 "$f"; done
|
|
||||||
nixos-rebuild switch --show-trace --sudo --max-jobs "$JOBS" --flake "$DIR/../../#i_only_boot_zfs" --repair --log-format internal-json -v "${@}" |& nom --json
|
|
||||||
@@ -1,63 +0,0 @@
|
|||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
./hardware-configuration.nix
|
|
||||||
./wrapped-disk-config.nix
|
|
||||||
./distributed_build.nix
|
|
||||||
./power_management.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
config = {
|
|
||||||
# Generate with `head -c4 /dev/urandom | od -A none -t x4`
|
|
||||||
networking.hostId = "6a05d86e";
|
|
||||||
|
|
||||||
networking.hostName = "i_only_boot_zfs"; # Define your hostname.
|
|
||||||
|
|
||||||
time.timeZone = "America/New_York";
|
|
||||||
i18n.defaultLocale = "en_US.UTF-8";
|
|
||||||
|
|
||||||
me.boot.enable = true;
|
|
||||||
me.boot.secure = false;
|
|
||||||
me.mountPersistence = true;
|
|
||||||
|
|
||||||
# Toggle to start writing the extlinux config which will be used by zfsbootmenu
|
|
||||||
# boot.loader.generic-extlinux-compatible.enable = true;
|
|
||||||
# boot.loader.systemd-boot.enable = lib.mkForce false;
|
|
||||||
|
|
||||||
me.optimizations = {
|
|
||||||
# enable = true;
|
|
||||||
# arch = "kabylake";
|
|
||||||
# build_arch = "x86-64-v3";
|
|
||||||
system_features = [
|
|
||||||
# "gccarch-kabylake"
|
|
||||||
"gccarch-x86-64-v3"
|
|
||||||
"benchmark"
|
|
||||||
"big-parallel"
|
|
||||||
"kvm"
|
|
||||||
"nixos-test"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
# Early KMS
|
|
||||||
# boot.initrd.kernelModules = [ "amdgpu" ];
|
|
||||||
|
|
||||||
# Mount tmpfs at /tmp
|
|
||||||
boot.tmp.useTmpfs = true;
|
|
||||||
|
|
||||||
# Enable TRIM
|
|
||||||
# services.fstrim.enable = lib.mkDefault true;
|
|
||||||
|
|
||||||
# Even when installed, we want to dhcp because this is for a VM.
|
|
||||||
networking.dhcpcd.enable = true;
|
|
||||||
networking.useDHCP = true;
|
|
||||||
|
|
||||||
me.build_in_ram.enable = true;
|
|
||||||
me.dont_use_substituters.enable = true;
|
|
||||||
me.minimal_base.enable = true;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,155 +0,0 @@
|
|||||||
# Manual Step:
|
|
||||||
# Check if drive supports 4kn: nvme id-ns -H /dev/nvme0n1
|
|
||||||
# Format the drive to 4kn: nvme format --lbaf=1 /dev/nvme0n1
|
|
||||||
|
|
||||||
{
|
|
||||||
disko.devices = {
|
|
||||||
disk = {
|
|
||||||
main = {
|
|
||||||
type = "disk";
|
|
||||||
device = "/dev/nvme0n1";
|
|
||||||
content = {
|
|
||||||
type = "gpt";
|
|
||||||
partitions = {
|
|
||||||
ESP = {
|
|
||||||
size = "1G";
|
|
||||||
type = "EF00";
|
|
||||||
content = {
|
|
||||||
type = "filesystem";
|
|
||||||
format = "vfat";
|
|
||||||
mountpoint = "/efi";
|
|
||||||
mountOptions = [
|
|
||||||
"umask=0077"
|
|
||||||
"noatime"
|
|
||||||
"discard"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
zfs = {
|
|
||||||
size = "100%";
|
|
||||||
content = {
|
|
||||||
type = "zfs";
|
|
||||||
pool = "zroot";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
zpool = {
|
|
||||||
zroot = {
|
|
||||||
type = "zpool";
|
|
||||||
# mode = "mirror";
|
|
||||||
# Workaround: cannot import 'zroot': I/O error in disko tests
|
|
||||||
options.cachefile = "none";
|
|
||||||
options = {
|
|
||||||
ashift = "12";
|
|
||||||
compatibility = "openzfs-2.2-freebsd";
|
|
||||||
autotrim = "on";
|
|
||||||
};
|
|
||||||
rootFsOptions = {
|
|
||||||
acltype = "posixacl";
|
|
||||||
atime = "off";
|
|
||||||
relatime = "off";
|
|
||||||
xattr = "sa";
|
|
||||||
mountpoint = "none";
|
|
||||||
compression = "lz4";
|
|
||||||
canmount = "off";
|
|
||||||
utf8only = "on";
|
|
||||||
dnodesize = "auto";
|
|
||||||
normalization = "formD";
|
|
||||||
};
|
|
||||||
|
|
||||||
datasets = {
|
|
||||||
"linux/nix" = {
|
|
||||||
type = "zfs_fs";
|
|
||||||
options.mountpoint = "none";
|
|
||||||
options = {
|
|
||||||
# encryption = "aes-256-gcm";
|
|
||||||
# keyformat = "passphrase";
|
|
||||||
# keylocation = "file:///tmp/secret.key";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
"linux/nix/root" = {
|
|
||||||
type = "zfs_fs";
|
|
||||||
options.mountpoint = "legacy";
|
|
||||||
mountpoint = "/";
|
|
||||||
postCreateHook = "zfs list -t snapshot -H -o name | grep -E '^zroot/linux/nix/root@blank$' || zfs snapshot zroot/linux/nix/root@blank";
|
|
||||||
};
|
|
||||||
"linux/nix/boot" = {
|
|
||||||
type = "zfs_fs";
|
|
||||||
options = {
|
|
||||||
mountpoint = "legacy";
|
|
||||||
"org.zfsbootmenu:active" = "on";
|
|
||||||
};
|
|
||||||
mountpoint = "/boot";
|
|
||||||
postCreateHook = "zfs list -t snapshot -H -o name | grep -E '^zroot/linux/nix/boot@blank$' || zfs snapshot zroot/linux/nix/boot@blank";
|
|
||||||
};
|
|
||||||
"linux/nix/nix" = {
|
|
||||||
type = "zfs_fs";
|
|
||||||
options.mountpoint = "legacy";
|
|
||||||
mountpoint = "/nix";
|
|
||||||
postCreateHook = "zfs list -t snapshot -H -o name | grep -E '^zroot/linux/nix/nix@blank$' || zfs snapshot zroot/linux/nix/nix@blank";
|
|
||||||
options = {
|
|
||||||
recordsize = "16MiB";
|
|
||||||
compression = "zstd-19";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
"linux/nix/home" = {
|
|
||||||
type = "zfs_fs";
|
|
||||||
options.mountpoint = "legacy";
|
|
||||||
mountpoint = "/home";
|
|
||||||
postCreateHook = "zfs list -t snapshot -H -o name | grep -E '^zroot/linux/nix/home@blank$' || zfs snapshot zroot/linux/nix/home@blank";
|
|
||||||
};
|
|
||||||
"linux/nix/persist" = {
|
|
||||||
type = "zfs_fs";
|
|
||||||
options.mountpoint = "legacy";
|
|
||||||
mountpoint = "/persist";
|
|
||||||
postCreateHook = "zfs list -t snapshot -H -o name | grep -E '^zroot/linux/nix/persist@blank$' || zfs snapshot zroot/linux/nix/persist@blank";
|
|
||||||
};
|
|
||||||
"linux/nix/state" = {
|
|
||||||
type = "zfs_fs";
|
|
||||||
options.mountpoint = "legacy";
|
|
||||||
mountpoint = "/state";
|
|
||||||
postCreateHook = "zfs list -t snapshot -H -o name | grep -E '^zroot/linux/nix/state@blank$' || zfs snapshot zroot/linux/nix/state@blank";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# Make sure all persistent volumes are marked as neededForBoot
|
|
||||||
#
|
|
||||||
# Also mounts /home so it is mounted before the user home directories are created.
|
|
||||||
fileSystems."/persist".neededForBoot = true;
|
|
||||||
fileSystems."/state".neededForBoot = true;
|
|
||||||
fileSystems."/home".neededForBoot = true;
|
|
||||||
|
|
||||||
fileSystems."/".options = [
|
|
||||||
"noatime"
|
|
||||||
"norelatime"
|
|
||||||
];
|
|
||||||
fileSystems."/boot".options = [
|
|
||||||
"noatime"
|
|
||||||
"norelatime"
|
|
||||||
];
|
|
||||||
fileSystems."/nix".options = [
|
|
||||||
"noatime"
|
|
||||||
"norelatime"
|
|
||||||
];
|
|
||||||
fileSystems."/persist".options = [
|
|
||||||
"noatime"
|
|
||||||
"norelatime"
|
|
||||||
];
|
|
||||||
fileSystems."/state".options = [
|
|
||||||
"noatime"
|
|
||||||
"norelatime"
|
|
||||||
];
|
|
||||||
fileSystems."/home".options = [
|
|
||||||
"noatime"
|
|
||||||
"norelatime"
|
|
||||||
];
|
|
||||||
|
|
||||||
# Only attempt to decrypt the main pool. Otherwise it attempts to decrypt pools that aren't even used.
|
|
||||||
# boot.zfs.requestEncryptionCredentials = [ "zroot/linux/nix" ];
|
|
||||||
}
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
{
|
|
||||||
imports = [ ];
|
|
||||||
|
|
||||||
config = {
|
|
||||||
me.distributed_build.enable = true;
|
|
||||||
me.distributed_build.machines.quark = {
|
|
||||||
enable = true;
|
|
||||||
additional_config = {
|
|
||||||
speedFactor = 2;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
modulesPath,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
(modulesPath + "/installer/scan/not-detected.nix")
|
|
||||||
];
|
|
||||||
|
|
||||||
config = {
|
|
||||||
boot.initrd.availableKernelModules = [
|
|
||||||
"nvme"
|
|
||||||
"xhci_pci"
|
|
||||||
"thunderbolt"
|
|
||||||
];
|
|
||||||
boot.initrd.kernelModules = [ ];
|
|
||||||
boot.kernelModules = [ ];
|
|
||||||
boot.extraModulePackages = [ ];
|
|
||||||
|
|
||||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
|
||||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
|
||||||
# still possible to use this option, but it's recommended to use it in conjunction
|
|
||||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
|
||||||
# networking.useDHCP = lib.mkDefault true;
|
|
||||||
# networking.interfaces.eno1.useDHCP = lib.mkDefault true;
|
|
||||||
# networking.interfaces.wlp58s0.useDHCP = lib.mkDefault true;
|
|
||||||
|
|
||||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,63 +0,0 @@
|
|||||||
{
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
|
|
||||||
{
|
|
||||||
imports = [ ];
|
|
||||||
|
|
||||||
config = {
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
powertop
|
|
||||||
];
|
|
||||||
|
|
||||||
# pcie_aspm=force pcie_aspm.policy=powersupersave :: Enable PCIe active state power management for power reduction.
|
|
||||||
# nowatchdog :: Disable watchdog for power savings (related to disable_sp5100_watchdog above).
|
|
||||||
boot.kernelParams = [
|
|
||||||
"pcie_aspm=force"
|
|
||||||
# "pcie_aspm.policy=powersupersave"
|
|
||||||
"nowatchdog"
|
|
||||||
];
|
|
||||||
|
|
||||||
systemd.tmpfiles.rules = [
|
|
||||||
"w- /sys/firmware/acpi/platform_profile - - - - low-power"
|
|
||||||
"w- /sys/devices/system/cpu/cpufreq/policy0/energy_performance_preference - - - - power"
|
|
||||||
"w- /sys/devices/system/cpu/cpufreq/policy1/energy_performance_preference - - - - power"
|
|
||||||
"w- /sys/devices/system/cpu/cpufreq/policy2/energy_performance_preference - - - - power"
|
|
||||||
"w- /sys/devices/system/cpu/cpufreq/policy3/energy_performance_preference - - - - power"
|
|
||||||
"w- /sys/devices/system/cpu/cpufreq/policy4/energy_performance_preference - - - - power"
|
|
||||||
"w- /sys/devices/system/cpu/cpufreq/policy5/energy_performance_preference - - - - power"
|
|
||||||
"w- /sys/devices/system/cpu/cpufreq/policy6/energy_performance_preference - - - - power"
|
|
||||||
"w- /sys/devices/system/cpu/cpufreq/policy7/energy_performance_preference - - - - power"
|
|
||||||
"w- /sys/devices/system/cpu/cpufreq/policy8/energy_performance_preference - - - - power"
|
|
||||||
"w- /sys/devices/system/cpu/cpufreq/policy9/energy_performance_preference - - - - power"
|
|
||||||
"w- /sys/devices/system/cpu/cpufreq/policy10/energy_performance_preference - - - - power"
|
|
||||||
"w- /sys/devices/system/cpu/cpufreq/policy11/energy_performance_preference - - - - power"
|
|
||||||
"w- /sys/devices/system/cpu/cpufreq/policy12/energy_performance_preference - - - - power"
|
|
||||||
"w- /sys/devices/system/cpu/cpufreq/policy13/energy_performance_preference - - - - power"
|
|
||||||
"w- /sys/devices/system/cpu/cpufreq/policy14/energy_performance_preference - - - - power"
|
|
||||||
"w- /sys/devices/system/cpu/cpufreq/policy15/energy_performance_preference - - - - power"
|
|
||||||
"w- /sys/devices/system/cpu/cpu0/cpufreq/boost - - - - 0"
|
|
||||||
"w- /sys/devices/system/cpu/cpu1/cpufreq/boost - - - - 0"
|
|
||||||
"w- /sys/devices/system/cpu/cpu2/cpufreq/boost - - - - 0"
|
|
||||||
"w- /sys/devices/system/cpu/cpu3/cpufreq/boost - - - - 0"
|
|
||||||
"w- /sys/devices/system/cpu/cpu4/cpufreq/boost - - - - 0"
|
|
||||||
"w- /sys/devices/system/cpu/cpu5/cpufreq/boost - - - - 0"
|
|
||||||
"w- /sys/devices/system/cpu/cpu6/cpufreq/boost - - - - 0"
|
|
||||||
"w- /sys/devices/system/cpu/cpu7/cpufreq/boost - - - - 0"
|
|
||||||
"w- /sys/devices/system/cpu/cpu8/cpufreq/boost - - - - 0"
|
|
||||||
"w- /sys/devices/system/cpu/cpu9/cpufreq/boost - - - - 0"
|
|
||||||
"w- /sys/devices/system/cpu/cpu10/cpufreq/boost - - - - 0"
|
|
||||||
"w- /sys/devices/system/cpu/cpu11/cpufreq/boost - - - - 0"
|
|
||||||
"w- /sys/devices/system/cpu/cpu12/cpufreq/boost - - - - 0"
|
|
||||||
"w- /sys/devices/system/cpu/cpu13/cpufreq/boost - - - - 0"
|
|
||||||
"w- /sys/devices/system/cpu/cpu14/cpufreq/boost - - - - 0"
|
|
||||||
"w- /sys/devices/system/cpu/cpu15/cpufreq/boost - - - - 0"
|
|
||||||
];
|
|
||||||
|
|
||||||
boot.extraModprobeConfig = ''
|
|
||||||
# Sound power-saving was causing chat notifications to be inaudible.
|
|
||||||
# options snd_hda_intel power_save=1
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
|
|
||||||
lib.mkIf (!config.me.buildingPortable) (import ./disk-config.nix)
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
#
|
|
||||||
set -euo pipefail
|
|
||||||
IFS=$'\n\t'
|
|
||||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
||||||
|
|
||||||
: "${JOBS:="1"}"
|
|
||||||
|
|
||||||
#TARGET=10.216.1.14
|
|
||||||
# TARGET=192.168.211.250
|
|
||||||
TARGET=neelix
|
|
||||||
|
|
||||||
for f in /persist/manual/manual_add_to_store/*; do nix-store --add-fixed sha256 "$f"; done
|
|
||||||
|
|
||||||
nixos-rebuild boot --flake "$DIR/../../#neelix" --target-host "$TARGET" --build-host "$TARGET" --sudo --max-jobs "$JOBS" --repair --log-format internal-json -v "${@}" |& nom --json
|
|
||||||
|
|
||||||
# rsync -av --progress --delete --exclude=.git "$DIR/../../../configuration" "talexander@${TARGET}:/persist/manual/" && ssh talexander@${TARGET} 'cd /persist/manual/configuration && nix flake update zsh-histdb && nix flake update ansible-sshjail && doas nice -n 19 nixos-rebuild boot --flake /persist/manual/configuration#neelix'
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
#
|
|
||||||
set -euo pipefail
|
|
||||||
IFS=$'\n\t'
|
|
||||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
||||||
|
|
||||||
: "${JOBS:="1"}"
|
|
||||||
|
|
||||||
#TARGET=10.216.1.14
|
|
||||||
# TARGET=192.168.211.250
|
|
||||||
TARGET=neelix
|
|
||||||
|
|
||||||
for f in /persist/manual/manual_add_to_store/*; do nix-store --add-fixed sha256 "$f"; done
|
|
||||||
|
|
||||||
nixos-rebuild switch --flake "$DIR/../../#neelix" --target-host "$TARGET" --build-host "$TARGET" --sudo --max-jobs "$JOBS" --repair --log-format internal-json -v "${@}" |& nom --json
|
|
||||||
|
|
||||||
# rsync -av --progress --delete --exclude=.git "$DIR/../../../configuration" "talexander@${TARGET}:/persist/manual/" && ssh talexander@${TARGET} 'cd /persist/manual/configuration && nix flake update zsh-histdb && nix flake update ansible-sshjail && doas nice -n 19 nixos-rebuild switch --flake /persist/manual/configuration#neelix'
|
|
||||||
@@ -1,66 +0,0 @@
|
|||||||
{ config, pkgs, ... }:
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
./hardware-configuration.nix
|
|
||||||
./disk-config.nix
|
|
||||||
./power_management.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
config = {
|
|
||||||
# Generate with `head -c4 /dev/urandom | od -A none -t x4`
|
|
||||||
networking.hostId = "bca9d0a5";
|
|
||||||
|
|
||||||
networking.hostName = "neelix"; # Define your hostname.
|
|
||||||
|
|
||||||
time.timeZone = "America/New_York";
|
|
||||||
i18n.defaultLocale = "en_US.UTF-8";
|
|
||||||
|
|
||||||
me.boot.secure = false;
|
|
||||||
me.mountPersistence = true;
|
|
||||||
|
|
||||||
me.optimizations = {
|
|
||||||
enable = false;
|
|
||||||
arch = "alderlake";
|
|
||||||
system_features = [
|
|
||||||
"gccarch-alderlake"
|
|
||||||
"gccarch-x86-64-v3"
|
|
||||||
"gccarch-x86-64-v4"
|
|
||||||
"benchmark"
|
|
||||||
"big-parallel"
|
|
||||||
"kvm"
|
|
||||||
"nixos-test"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
# Early KMS
|
|
||||||
boot.initrd.kernelModules = [ "i915" ];
|
|
||||||
|
|
||||||
# Mount tmpfs at /tmp
|
|
||||||
# boot.tmp.useTmpfs = true;
|
|
||||||
|
|
||||||
me.base.enable = true;
|
|
||||||
me.bluetooth.enable = true;
|
|
||||||
me.boot.enable = true;
|
|
||||||
me.doas.enable = true;
|
|
||||||
me.emacs_flavor = "plainmacs";
|
|
||||||
me.firewall.enable = true;
|
|
||||||
me.font.enable = true;
|
|
||||||
me.git.enable = true;
|
|
||||||
me.graphical = true;
|
|
||||||
me.graphics_card_type = "intel";
|
|
||||||
me.kodi.enable = true;
|
|
||||||
me.lvfs.enable = true;
|
|
||||||
me.memtest.enable = true;
|
|
||||||
me.network.enable = true;
|
|
||||||
me.nvme.enable = true;
|
|
||||||
me.sound.enable = true;
|
|
||||||
me.ssh.enable = true;
|
|
||||||
me.sshd.enable = true;
|
|
||||||
me.user.enable = true;
|
|
||||||
me.wireguard.activated = [ "wgh" ];
|
|
||||||
me.wireguard.deactivated = [ "wgf" ];
|
|
||||||
me.zfs.enable = true;
|
|
||||||
me.zrepl.enable = true;
|
|
||||||
me.zsh.enable = true;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,140 +0,0 @@
|
|||||||
# Manual Step:
|
|
||||||
# Check if drive supports 4kn: nvme id-ns -H /dev/nvme0n1
|
|
||||||
# Format the drive to 4kn: nvme format --lbaf=1 /dev/nvme0n1
|
|
||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
|
|
||||||
lib.mkIf (!config.me.buildingIso) {
|
|
||||||
disko.devices = {
|
|
||||||
disk = {
|
|
||||||
main = {
|
|
||||||
type = "disk";
|
|
||||||
device = "/dev/nvme0n1";
|
|
||||||
content = {
|
|
||||||
type = "gpt";
|
|
||||||
partitions = {
|
|
||||||
ESP = {
|
|
||||||
size = "1G";
|
|
||||||
type = "EF00";
|
|
||||||
content = {
|
|
||||||
type = "filesystem";
|
|
||||||
format = "vfat";
|
|
||||||
mountpoint = "/boot";
|
|
||||||
mountOptions = [
|
|
||||||
"umask=0077"
|
|
||||||
"noatime"
|
|
||||||
"discard"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
zfs = {
|
|
||||||
size = "100%";
|
|
||||||
content = {
|
|
||||||
type = "zfs";
|
|
||||||
pool = "zroot";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
zpool = {
|
|
||||||
zroot = {
|
|
||||||
type = "zpool";
|
|
||||||
# mode = "mirror";
|
|
||||||
# Workaround: cannot import 'zroot': I/O error in disko tests
|
|
||||||
options.cachefile = "none";
|
|
||||||
options = {
|
|
||||||
ashift = "12";
|
|
||||||
compatibility = "openzfs-2.2-freebsd";
|
|
||||||
autotrim = "on";
|
|
||||||
};
|
|
||||||
rootFsOptions = {
|
|
||||||
acltype = "posixacl";
|
|
||||||
atime = "off";
|
|
||||||
relatime = "off";
|
|
||||||
xattr = "sa";
|
|
||||||
mountpoint = "none";
|
|
||||||
compression = "lz4";
|
|
||||||
canmount = "off";
|
|
||||||
utf8only = "on";
|
|
||||||
dnodesize = "auto";
|
|
||||||
normalization = "formD";
|
|
||||||
};
|
|
||||||
|
|
||||||
datasets = {
|
|
||||||
"linux/nix" = {
|
|
||||||
type = "zfs_fs";
|
|
||||||
options.mountpoint = "none";
|
|
||||||
};
|
|
||||||
"linux/nix/root" = {
|
|
||||||
type = "zfs_fs";
|
|
||||||
options.mountpoint = "legacy";
|
|
||||||
mountpoint = "/";
|
|
||||||
postCreateHook = "zfs list -t snapshot -H -o name | grep -E '^zroot/linux/nix/root@blank$' || zfs snapshot zroot/linux/nix/root@blank";
|
|
||||||
};
|
|
||||||
"linux/nix/nix" = {
|
|
||||||
type = "zfs_fs";
|
|
||||||
options.mountpoint = "legacy";
|
|
||||||
mountpoint = "/nix";
|
|
||||||
postCreateHook = "zfs list -t snapshot -H -o name | grep -E '^zroot/linux/nix/nix@blank$' || zfs snapshot zroot/linux/nix/nix@blank";
|
|
||||||
options = {
|
|
||||||
recordsize = "1MiB";
|
|
||||||
compression = "lz4";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
"linux/nix/home" = {
|
|
||||||
type = "zfs_fs";
|
|
||||||
options.mountpoint = "legacy";
|
|
||||||
mountpoint = "/home";
|
|
||||||
postCreateHook = "zfs list -t snapshot -H -o name | grep -E '^zroot/linux/nix/home@blank$' || zfs snapshot zroot/linux/nix/home@blank";
|
|
||||||
};
|
|
||||||
"linux/nix/persist" = {
|
|
||||||
type = "zfs_fs";
|
|
||||||
options.mountpoint = "legacy";
|
|
||||||
mountpoint = "/persist";
|
|
||||||
postCreateHook = "zfs list -t snapshot -H -o name | grep -E '^zroot/linux/nix/persist@blank$' || zfs snapshot zroot/linux/nix/persist@blank";
|
|
||||||
};
|
|
||||||
"linux/nix/state" = {
|
|
||||||
type = "zfs_fs";
|
|
||||||
options.mountpoint = "legacy";
|
|
||||||
mountpoint = "/state";
|
|
||||||
postCreateHook = "zfs list -t snapshot -H -o name | grep -E '^zroot/linux/nix/state@blank$' || zfs snapshot zroot/linux/nix/state@blank";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# Make sure all persistent volumes are marked as neededForBoot
|
|
||||||
#
|
|
||||||
# Also mounts /home so it is mounted before the user home directories are created.
|
|
||||||
fileSystems."/persist".neededForBoot = true;
|
|
||||||
fileSystems."/state".neededForBoot = true;
|
|
||||||
fileSystems."/home".neededForBoot = true;
|
|
||||||
|
|
||||||
fileSystems."/".options = [
|
|
||||||
"noatime"
|
|
||||||
"norelatime"
|
|
||||||
];
|
|
||||||
fileSystems."/nix".options = [
|
|
||||||
"noatime"
|
|
||||||
"norelatime"
|
|
||||||
];
|
|
||||||
fileSystems."/persist".options = [
|
|
||||||
"noatime"
|
|
||||||
"norelatime"
|
|
||||||
];
|
|
||||||
fileSystems."/state".options = [
|
|
||||||
"noatime"
|
|
||||||
"norelatime"
|
|
||||||
];
|
|
||||||
fileSystems."/home".options = [
|
|
||||||
"noatime"
|
|
||||||
"norelatime"
|
|
||||||
];
|
|
||||||
}
|
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
modulesPath,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
(modulesPath + "/installer/scan/not-detected.nix")
|
|
||||||
];
|
|
||||||
|
|
||||||
config = {
|
|
||||||
boot.initrd.availableKernelModules = [
|
|
||||||
"xhci_pci"
|
|
||||||
"nvme"
|
|
||||||
"usbhid"
|
|
||||||
"usb_storage"
|
|
||||||
"sd_mod"
|
|
||||||
"sdhci_pci"
|
|
||||||
];
|
|
||||||
boot.initrd.kernelModules = [ ];
|
|
||||||
boot.kernelModules = [ ];
|
|
||||||
boot.extraModulePackages = [ ];
|
|
||||||
|
|
||||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
|
||||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
|
||||||
# still possible to use this option, but it's recommended to use it in conjunction
|
|
||||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
|
||||||
# networking.useDHCP = lib.mkDefault true;
|
|
||||||
# networking.interfaces.eno1.useDHCP = lib.mkDefault true;
|
|
||||||
# networking.interfaces.wlp58s0.useDHCP = lib.mkDefault true;
|
|
||||||
|
|
||||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,35 +0,0 @@
|
|||||||
{
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
|
|
||||||
{
|
|
||||||
imports = [ ];
|
|
||||||
|
|
||||||
config = {
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
powertop
|
|
||||||
];
|
|
||||||
|
|
||||||
# pcie_aspm=force pcie_aspm.policy=powersupersave :: Enable PCIe active state power management for power reduction.
|
|
||||||
# nowatchdog :: Disable watchdog for power savings (related to disable_sp5100_watchdog above).
|
|
||||||
boot.kernelParams = [
|
|
||||||
"pcie_aspm=force"
|
|
||||||
# "pcie_aspm.policy=powersupersave"
|
|
||||||
"nowatchdog"
|
|
||||||
];
|
|
||||||
|
|
||||||
# default performance balance_performance balance_power power
|
|
||||||
# defaults to balance_performance
|
|
||||||
# systemd.tmpfiles.rules = [
|
|
||||||
# "w- /sys/devices/system/cpu/cpufreq/policy0/energy_performance_preference - - - - power"
|
|
||||||
# "w- /sys/devices/system/cpu/cpufreq/policy1/energy_performance_preference - - - - power"
|
|
||||||
# "w- /sys/devices/system/cpu/cpufreq/policy2/energy_performance_preference - - - - power"
|
|
||||||
# "w- /sys/devices/system/cpu/cpufreq/policy3/energy_performance_preference - - - - power"
|
|
||||||
# ];
|
|
||||||
|
|
||||||
boot.extraModprobeConfig = ''
|
|
||||||
options snd_hda_intel power_save=1
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
#
|
|
||||||
set -euo pipefail
|
|
||||||
IFS=$'\n\t'
|
|
||||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
||||||
|
|
||||||
: "${JOBS:="1"}"
|
|
||||||
|
|
||||||
TARGET=odo
|
|
||||||
|
|
||||||
for f in /persist/manual/manual_add_to_store/*; do nix-store --add-fixed sha256 "$f"; done
|
|
||||||
|
|
||||||
nixos-rebuild boot --flake "$DIR/../../#odo" --target-host "$TARGET" --build-host "$TARGET" --sudo --max-jobs "$JOBS" --repair --log-format internal-json -v "${@}" |& nom --json
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
#
|
|
||||||
set -euo pipefail
|
|
||||||
IFS=$'\n\t'
|
|
||||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
||||||
|
|
||||||
: "${JOBS:="1"}"
|
|
||||||
|
|
||||||
TARGET=odo
|
|
||||||
|
|
||||||
for f in /persist/manual/manual_add_to_store/*; do nix-store --add-fixed sha256 "$f"; done
|
|
||||||
|
|
||||||
nixos-rebuild switch --flake "$DIR/../../#odo" --target-host "$TARGET" --build-host "$TARGET" --sudo --max-jobs "$JOBS" --repair --log-format internal-json -v "${@}" |& nom --json
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
#
|
|
||||||
set -euo pipefail
|
|
||||||
IFS=$'\n\t'
|
|
||||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
||||||
|
|
||||||
: "${JOBS:="1"}"
|
|
||||||
|
|
||||||
for f in /persist/manual/manual_add_to_store/*; do nix-store --add-fixed sha256 "$f"; done
|
|
||||||
nix build --extra-experimental-features nix-command --extra-experimental-features flakes "$DIR/../..#odo.iso" --max-jobs "$JOBS" --repair --log-format internal-json -v "${@}" |& nom --json
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
#
|
|
||||||
set -euo pipefail
|
|
||||||
IFS=$'\n\t'
|
|
||||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
||||||
|
|
||||||
: "${JOBS:="1"}"
|
|
||||||
|
|
||||||
for f in /persist/manual/manual_add_to_store/*; do nix-store --add-fixed sha256 "$f"; done
|
|
||||||
nixos-rebuild boot --show-trace --sudo --max-jobs "$JOBS" --flake "$DIR/../../#odo" --repair --log-format internal-json -v "${@}" |& nom --json
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
#
|
|
||||||
set -euo pipefail
|
|
||||||
IFS=$'\n\t'
|
|
||||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
||||||
|
|
||||||
: "${JOBS:="1"}"
|
|
||||||
|
|
||||||
for f in /persist/manual/manual_add_to_store/*; do nix-store --add-fixed sha256 "$f"; done
|
|
||||||
|
|
||||||
nixos-rebuild build --show-trace --sudo --max-jobs "$JOBS" --flake "$DIR/../../#odo" --repair --log-format internal-json -v "${@}" |& nom --json
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
#
|
|
||||||
set -euo pipefail
|
|
||||||
IFS=$'\n\t'
|
|
||||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
||||||
|
|
||||||
: "${JOBS:="1"}"
|
|
||||||
|
|
||||||
for f in /persist/manual/manual_add_to_store/*; do nix-store --add-fixed sha256 "$f"; done
|
|
||||||
nixos-rebuild switch --show-trace --sudo --max-jobs "$JOBS" --flake "$DIR/../../#odo" --repair --log-format internal-json -v "${@}" |& nom --json
|
|
||||||
@@ -1,171 +0,0 @@
|
|||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
./hardware-configuration.nix
|
|
||||||
./wrapped-disk-config.nix
|
|
||||||
./distributed_build.nix
|
|
||||||
./power_management.nix
|
|
||||||
./screen_brightness.nix
|
|
||||||
./wifi.nix
|
|
||||||
./framework_module.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
config = {
|
|
||||||
# Generate with `head -c4 /dev/urandom | od -A none -t x4`
|
|
||||||
networking.hostId = "908cbf04";
|
|
||||||
|
|
||||||
networking.hostName = "odo"; # Define your hostname.
|
|
||||||
|
|
||||||
time.timeZone = "America/New_York";
|
|
||||||
i18n.defaultLocale = "en_US.UTF-8";
|
|
||||||
|
|
||||||
me.boot.enable = true;
|
|
||||||
me.boot.secure = false;
|
|
||||||
me.mountPersistence = true;
|
|
||||||
|
|
||||||
# Toggle to start writing the extlinux config which will be used by zfsbootmenu
|
|
||||||
boot.loader.generic-extlinux-compatible.enable = true;
|
|
||||||
boot.loader.systemd-boot.enable = lib.mkForce false;
|
|
||||||
|
|
||||||
me.rollback.dataset = [
|
|
||||||
"zroot/linux/nix/root@blank"
|
|
||||||
"zroot/linux/nix/home@blank"
|
|
||||||
];
|
|
||||||
|
|
||||||
me.optimizations = {
|
|
||||||
enable = true;
|
|
||||||
arch = "znver4";
|
|
||||||
# build_arch = "x86-64-v3";
|
|
||||||
system_features = [
|
|
||||||
"gccarch-znver4"
|
|
||||||
"gccarch-skylake"
|
|
||||||
"gccarch-kabylake"
|
|
||||||
# "gccarch-alderlake" missing WAITPKG
|
|
||||||
"gccarch-x86-64-v3"
|
|
||||||
"gccarch-x86-64-v4"
|
|
||||||
"benchmark"
|
|
||||||
"big-parallel"
|
|
||||||
"kvm"
|
|
||||||
"nixos-test"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
# Early KMS
|
|
||||||
boot.initrd.kernelModules = [ "amdgpu" ];
|
|
||||||
|
|
||||||
# Mount tmpfs at /tmp
|
|
||||||
boot.tmp.useTmpfs = true;
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
fw-ectool
|
|
||||||
framework-tool
|
|
||||||
];
|
|
||||||
|
|
||||||
# Enable light sensor
|
|
||||||
# hardware.sensor.iio.enable = lib.mkDefault true;
|
|
||||||
|
|
||||||
# Enable TRIM
|
|
||||||
# services.fstrim.enable = lib.mkDefault true;
|
|
||||||
|
|
||||||
# Only run nix builders at idle priority for a more responsive system. Do not set on servers, just end-user devices.
|
|
||||||
nix.daemonCPUSchedPolicy = "idle";
|
|
||||||
|
|
||||||
me.alacritty.enable = true;
|
|
||||||
me.amd_s2idle.enable = true;
|
|
||||||
me.android.enable = true;
|
|
||||||
me.ansible.enable = true;
|
|
||||||
me.ares.enable = true;
|
|
||||||
me.base.enable = true;
|
|
||||||
me.bluetooth.enable = true;
|
|
||||||
me.build_in_ram.enable = true;
|
|
||||||
me.chromecast.enable = true;
|
|
||||||
me.chromium.enable = true;
|
|
||||||
me.d2.enable = true;
|
|
||||||
me.direnv.enable = true;
|
|
||||||
me.doas.enable = true;
|
|
||||||
me.docker.enable = false;
|
|
||||||
me.dont_use_substituters.enable = true;
|
|
||||||
me.ecc.enable = false;
|
|
||||||
me.emacs_flavor = "full";
|
|
||||||
me.emulate_isa.enable = true;
|
|
||||||
me.esim.enable = true;
|
|
||||||
me.firefox.enable = true;
|
|
||||||
me.firewall.enable = true;
|
|
||||||
me.flux.enable = true;
|
|
||||||
me.font.enable = true;
|
|
||||||
me.gcloud.enable = true;
|
|
||||||
me.git.config = ../../roles/git/files/gitconfig_home;
|
|
||||||
me.git.enable = true;
|
|
||||||
me.gnuplot.enable = true;
|
|
||||||
me.gpg.enable = true;
|
|
||||||
me.graphical = true;
|
|
||||||
me.graphics_card_type = "amd";
|
|
||||||
me.graphviz.enable = true;
|
|
||||||
me.iso_mount.enable = true;
|
|
||||||
me.jujutsu.config = ../../roles/jujutsu/files/jujutsu_config_home.toml;
|
|
||||||
me.jujutsu.enable = true;
|
|
||||||
me.kanshi.enable = false;
|
|
||||||
me.kernel.enable = true;
|
|
||||||
me.kubernetes.enable = true;
|
|
||||||
me.latex.enable = true;
|
|
||||||
me.launch_keyboard.enable = true;
|
|
||||||
me.lvfs.enable = true;
|
|
||||||
me.media.enable = true;
|
|
||||||
me.memtest.enable = true;
|
|
||||||
me.network.enable = true;
|
|
||||||
me.nix_index.enable = true;
|
|
||||||
me.nix_repl.enable = true;
|
|
||||||
me.nixdev.enable = true;
|
|
||||||
me.nvme.enable = true;
|
|
||||||
me.openpgp_card_tools.enable = true;
|
|
||||||
me.pcsx2.enable = true;
|
|
||||||
me.podman.enable = true;
|
|
||||||
me.postgresql_client.enable = true;
|
|
||||||
me.python.enable = true;
|
|
||||||
me.qemu.enable = true;
|
|
||||||
me.recovery.enable = true;
|
|
||||||
me.rpcs3.enable = true;
|
|
||||||
me.rust.enable = true;
|
|
||||||
me.sequoia.enable = true;
|
|
||||||
me.shadps4.enable = false;
|
|
||||||
me.shikane.enable = true;
|
|
||||||
me.sops.enable = true;
|
|
||||||
me.sound.enable = true;
|
|
||||||
me.spaghettikart.enable = true;
|
|
||||||
me.ssh.enable = true;
|
|
||||||
me.sshd.enable = true;
|
|
||||||
me.steam.enable = true;
|
|
||||||
me.steam_run_free.enable = true;
|
|
||||||
me.sway.enable = true;
|
|
||||||
me.tekton.enable = true;
|
|
||||||
me.terraform.enable = true;
|
|
||||||
me.thunderbolt.enable = true;
|
|
||||||
me.user.enable = true;
|
|
||||||
me.uutils.enable = false;
|
|
||||||
me.vnc_client.enable = true;
|
|
||||||
me.vscode.enable = true;
|
|
||||||
me.wasm.enable = true;
|
|
||||||
me.waybar.enable = true;
|
|
||||||
me.webcam.enable = true;
|
|
||||||
me.wine.enable = false;
|
|
||||||
me.wireguard.activated = [
|
|
||||||
"drmario"
|
|
||||||
"wgh"
|
|
||||||
"colo"
|
|
||||||
];
|
|
||||||
me.wireguard.deactivated = [ "wgf" ];
|
|
||||||
me.yubikey.enable = true;
|
|
||||||
me.zfs.enable = true;
|
|
||||||
me.zrepl.enable = true;
|
|
||||||
me.zsh.enable = true;
|
|
||||||
|
|
||||||
me.sm64ex.enable = true;
|
|
||||||
me.shipwright.enable = false;
|
|
||||||
me.ship2harkinian.enable = true;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,155 +0,0 @@
|
|||||||
# Manual Step:
|
|
||||||
# Check if drive supports 4kn: nvme id-ns -H /dev/nvme0n1
|
|
||||||
# Format the drive to 4kn: nvme format --lbaf=1 /dev/nvme0n1
|
|
||||||
|
|
||||||
{
|
|
||||||
disko.devices = {
|
|
||||||
disk = {
|
|
||||||
main = {
|
|
||||||
type = "disk";
|
|
||||||
device = "/dev/nvme0n1";
|
|
||||||
content = {
|
|
||||||
type = "gpt";
|
|
||||||
partitions = {
|
|
||||||
ESP = {
|
|
||||||
size = "1G";
|
|
||||||
type = "EF00";
|
|
||||||
content = {
|
|
||||||
type = "filesystem";
|
|
||||||
format = "vfat";
|
|
||||||
mountpoint = "/efi";
|
|
||||||
mountOptions = [
|
|
||||||
"umask=0077"
|
|
||||||
"noatime"
|
|
||||||
"discard"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
zfs = {
|
|
||||||
size = "100%";
|
|
||||||
content = {
|
|
||||||
type = "zfs";
|
|
||||||
pool = "zroot";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
zpool = {
|
|
||||||
zroot = {
|
|
||||||
type = "zpool";
|
|
||||||
# mode = "mirror";
|
|
||||||
# Workaround: cannot import 'zroot': I/O error in disko tests
|
|
||||||
options.cachefile = "none";
|
|
||||||
options = {
|
|
||||||
ashift = "12";
|
|
||||||
compatibility = "openzfs-2.2-freebsd";
|
|
||||||
autotrim = "on";
|
|
||||||
};
|
|
||||||
rootFsOptions = {
|
|
||||||
acltype = "posixacl";
|
|
||||||
atime = "off";
|
|
||||||
relatime = "off";
|
|
||||||
xattr = "sa";
|
|
||||||
mountpoint = "none";
|
|
||||||
compression = "lz4";
|
|
||||||
canmount = "off";
|
|
||||||
utf8only = "on";
|
|
||||||
dnodesize = "auto";
|
|
||||||
normalization = "formD";
|
|
||||||
};
|
|
||||||
|
|
||||||
datasets = {
|
|
||||||
"linux/nix" = {
|
|
||||||
type = "zfs_fs";
|
|
||||||
options.mountpoint = "none";
|
|
||||||
options = {
|
|
||||||
encryption = "aes-256-gcm";
|
|
||||||
keyformat = "passphrase";
|
|
||||||
# keylocation = "file:///tmp/secret.key";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
"linux/nix/root" = {
|
|
||||||
type = "zfs_fs";
|
|
||||||
options.mountpoint = "legacy";
|
|
||||||
mountpoint = "/";
|
|
||||||
postCreateHook = "zfs list -t snapshot -H -o name | grep -E '^zroot/linux/nix/root@blank$' || zfs snapshot zroot/linux/nix/root@blank";
|
|
||||||
};
|
|
||||||
"linux/nix/boot" = {
|
|
||||||
type = "zfs_fs";
|
|
||||||
options = {
|
|
||||||
mountpoint = "legacy";
|
|
||||||
"org.zfsbootmenu:active" = "on";
|
|
||||||
};
|
|
||||||
mountpoint = "/boot";
|
|
||||||
postCreateHook = "zfs list -t snapshot -H -o name | grep -E '^zroot/linux/nix/boot@blank$' || zfs snapshot zroot/linux/nix/boot@blank";
|
|
||||||
};
|
|
||||||
"linux/nix/nix" = {
|
|
||||||
type = "zfs_fs";
|
|
||||||
options.mountpoint = "legacy";
|
|
||||||
mountpoint = "/nix";
|
|
||||||
postCreateHook = "zfs list -t snapshot -H -o name | grep -E '^zroot/linux/nix/nix@blank$' || zfs snapshot zroot/linux/nix/nix@blank";
|
|
||||||
options = {
|
|
||||||
recordsize = "16MiB";
|
|
||||||
compression = "zstd-19";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
"linux/nix/home" = {
|
|
||||||
type = "zfs_fs";
|
|
||||||
options.mountpoint = "legacy";
|
|
||||||
mountpoint = "/home";
|
|
||||||
postCreateHook = "zfs list -t snapshot -H -o name | grep -E '^zroot/linux/nix/home@blank$' || zfs snapshot zroot/linux/nix/home@blank";
|
|
||||||
};
|
|
||||||
"linux/nix/persist" = {
|
|
||||||
type = "zfs_fs";
|
|
||||||
options.mountpoint = "legacy";
|
|
||||||
mountpoint = "/persist";
|
|
||||||
postCreateHook = "zfs list -t snapshot -H -o name | grep -E '^zroot/linux/nix/persist@blank$' || zfs snapshot zroot/linux/nix/persist@blank";
|
|
||||||
};
|
|
||||||
"linux/nix/state" = {
|
|
||||||
type = "zfs_fs";
|
|
||||||
options.mountpoint = "legacy";
|
|
||||||
mountpoint = "/state";
|
|
||||||
postCreateHook = "zfs list -t snapshot -H -o name | grep -E '^zroot/linux/nix/state@blank$' || zfs snapshot zroot/linux/nix/state@blank";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# Make sure all persistent volumes are marked as neededForBoot
|
|
||||||
#
|
|
||||||
# Also mounts /home so it is mounted before the user home directories are created.
|
|
||||||
fileSystems."/persist".neededForBoot = true;
|
|
||||||
fileSystems."/state".neededForBoot = true;
|
|
||||||
fileSystems."/home".neededForBoot = true;
|
|
||||||
|
|
||||||
fileSystems."/".options = [
|
|
||||||
"noatime"
|
|
||||||
"norelatime"
|
|
||||||
];
|
|
||||||
fileSystems."/boot".options = [
|
|
||||||
"noatime"
|
|
||||||
"norelatime"
|
|
||||||
];
|
|
||||||
fileSystems."/nix".options = [
|
|
||||||
"noatime"
|
|
||||||
"norelatime"
|
|
||||||
];
|
|
||||||
fileSystems."/persist".options = [
|
|
||||||
"noatime"
|
|
||||||
"norelatime"
|
|
||||||
];
|
|
||||||
fileSystems."/state".options = [
|
|
||||||
"noatime"
|
|
||||||
"norelatime"
|
|
||||||
];
|
|
||||||
fileSystems."/home".options = [
|
|
||||||
"noatime"
|
|
||||||
"norelatime"
|
|
||||||
];
|
|
||||||
|
|
||||||
# Only attempt to decrypt the main pool. Otherwise it attempts to decrypt pools that aren't even used.
|
|
||||||
boot.zfs.requestEncryptionCredentials = [ "zroot/linux/nix" ];
|
|
||||||
}
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
{
|
|
||||||
imports = [ ];
|
|
||||||
|
|
||||||
config = {
|
|
||||||
me.distributed_build.enable = true;
|
|
||||||
me.distributed_build.machines.quark = {
|
|
||||||
enable = false;
|
|
||||||
additional_config = {
|
|
||||||
speedFactor = 2;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
me.distributed_build.machines.hydra = {
|
|
||||||
enable = true;
|
|
||||||
additional_config = {
|
|
||||||
speedFactor = 2;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
{
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
|
|
||||||
{
|
|
||||||
imports = [ ];
|
|
||||||
|
|
||||||
config = {
|
|
||||||
boot.extraModulePackages = with config.boot.kernelPackages; [
|
|
||||||
framework-laptop-kmod
|
|
||||||
];
|
|
||||||
# https://github.com/DHowett/framework-laptop-kmod?tab=readme-ov-file#usage
|
|
||||||
boot.kernelModules = [
|
|
||||||
"cros_ec"
|
|
||||||
"cros_ec_lpcs"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
modulesPath,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
(modulesPath + "/installer/scan/not-detected.nix")
|
|
||||||
];
|
|
||||||
|
|
||||||
config = {
|
|
||||||
boot.initrd.availableKernelModules = [
|
|
||||||
"nvme"
|
|
||||||
"xhci_pci"
|
|
||||||
"thunderbolt"
|
|
||||||
];
|
|
||||||
boot.initrd.kernelModules = [ ];
|
|
||||||
boot.kernelModules = [ ];
|
|
||||||
boot.extraModulePackages = [ ];
|
|
||||||
|
|
||||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
|
||||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
|
||||||
# still possible to use this option, but it's recommended to use it in conjunction
|
|
||||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
|
||||||
# networking.useDHCP = lib.mkDefault true;
|
|
||||||
# networking.interfaces.eno1.useDHCP = lib.mkDefault true;
|
|
||||||
# networking.interfaces.wlp58s0.useDHCP = lib.mkDefault true;
|
|
||||||
|
|
||||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,75 +0,0 @@
|
|||||||
{
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
|
|
||||||
{
|
|
||||||
imports = [ ];
|
|
||||||
|
|
||||||
config = {
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
powertop
|
|
||||||
];
|
|
||||||
|
|
||||||
# amdgpu.abmlevel=3 :: Automatically reduce screen brightness but tweak colors to compensate for power reduction.
|
|
||||||
# pcie_aspm=force pcie_aspm.policy=powersupersave :: Enable PCIe active state power management for power reduction.
|
|
||||||
# nowatchdog :: Disable watchdog for power savings (related to disable_sp5100_watchdog above).
|
|
||||||
# amd_pstate=passive :: Fully automated hardware pstate control.
|
|
||||||
# amd_pstate=active :: Same as passive except we can set the energy performance preference (EPP) to suggest how much we prefer performance or energy efficiency.
|
|
||||||
# amd_pstate=guided :: Same as passive except we can set upper and lower frequency bounds.
|
|
||||||
# amdgpu.dcdebugmask=0x10 :: Allegedly disables Panel Replay from https://community.frame.work/t/tracking-freezing-arch-linux-amd/39495/32
|
|
||||||
boot.kernelParams = [
|
|
||||||
"amdgpu.abmlevel=2"
|
|
||||||
"pcie_aspm=force"
|
|
||||||
# "pcie_aspm.policy=powersupersave"
|
|
||||||
"nowatchdog"
|
|
||||||
# I don't see a measurable benefit from these two:
|
|
||||||
# "cpufreq.default_governor=powersave"
|
|
||||||
# "initcall_blacklist=cpufreq_gov_userspace_init"
|
|
||||||
];
|
|
||||||
|
|
||||||
systemd.tmpfiles.rules = [
|
|
||||||
"w- /sys/firmware/acpi/platform_profile - - - - low-power"
|
|
||||||
"w- /sys/devices/system/cpu/cpufreq/policy0/energy_performance_preference - - - - power"
|
|
||||||
"w- /sys/devices/system/cpu/cpufreq/policy1/energy_performance_preference - - - - power"
|
|
||||||
"w- /sys/devices/system/cpu/cpufreq/policy2/energy_performance_preference - - - - power"
|
|
||||||
"w- /sys/devices/system/cpu/cpufreq/policy3/energy_performance_preference - - - - power"
|
|
||||||
"w- /sys/devices/system/cpu/cpufreq/policy4/energy_performance_preference - - - - power"
|
|
||||||
"w- /sys/devices/system/cpu/cpufreq/policy5/energy_performance_preference - - - - power"
|
|
||||||
"w- /sys/devices/system/cpu/cpufreq/policy6/energy_performance_preference - - - - power"
|
|
||||||
"w- /sys/devices/system/cpu/cpufreq/policy7/energy_performance_preference - - - - power"
|
|
||||||
"w- /sys/devices/system/cpu/cpufreq/policy8/energy_performance_preference - - - - power"
|
|
||||||
"w- /sys/devices/system/cpu/cpufreq/policy9/energy_performance_preference - - - - power"
|
|
||||||
"w- /sys/devices/system/cpu/cpufreq/policy10/energy_performance_preference - - - - power"
|
|
||||||
"w- /sys/devices/system/cpu/cpufreq/policy11/energy_performance_preference - - - - power"
|
|
||||||
"w- /sys/devices/system/cpu/cpufreq/policy12/energy_performance_preference - - - - power"
|
|
||||||
"w- /sys/devices/system/cpu/cpufreq/policy13/energy_performance_preference - - - - power"
|
|
||||||
"w- /sys/devices/system/cpu/cpufreq/policy14/energy_performance_preference - - - - power"
|
|
||||||
"w- /sys/devices/system/cpu/cpufreq/policy15/energy_performance_preference - - - - power"
|
|
||||||
"w- /sys/devices/system/cpu/cpu0/cpufreq/boost - - - - 0"
|
|
||||||
"w- /sys/devices/system/cpu/cpu1/cpufreq/boost - - - - 0"
|
|
||||||
"w- /sys/devices/system/cpu/cpu2/cpufreq/boost - - - - 0"
|
|
||||||
"w- /sys/devices/system/cpu/cpu3/cpufreq/boost - - - - 0"
|
|
||||||
"w- /sys/devices/system/cpu/cpu4/cpufreq/boost - - - - 0"
|
|
||||||
"w- /sys/devices/system/cpu/cpu5/cpufreq/boost - - - - 0"
|
|
||||||
"w- /sys/devices/system/cpu/cpu6/cpufreq/boost - - - - 0"
|
|
||||||
"w- /sys/devices/system/cpu/cpu7/cpufreq/boost - - - - 0"
|
|
||||||
"w- /sys/devices/system/cpu/cpu8/cpufreq/boost - - - - 0"
|
|
||||||
"w- /sys/devices/system/cpu/cpu9/cpufreq/boost - - - - 0"
|
|
||||||
"w- /sys/devices/system/cpu/cpu10/cpufreq/boost - - - - 0"
|
|
||||||
"w- /sys/devices/system/cpu/cpu11/cpufreq/boost - - - - 0"
|
|
||||||
"w- /sys/devices/system/cpu/cpu12/cpufreq/boost - - - - 0"
|
|
||||||
"w- /sys/devices/system/cpu/cpu13/cpufreq/boost - - - - 0"
|
|
||||||
"w- /sys/devices/system/cpu/cpu14/cpufreq/boost - - - - 0"
|
|
||||||
"w- /sys/devices/system/cpu/cpu15/cpufreq/boost - - - - 0"
|
|
||||||
];
|
|
||||||
|
|
||||||
boot.extraModprobeConfig = ''
|
|
||||||
# Disable the hardware watchdog inside AMD 700 chipset series for power savings.
|
|
||||||
blacklist sp5100_tco
|
|
||||||
|
|
||||||
# Sound power-saving was causing chat notifications to be inaudible.
|
|
||||||
# options snd_hda_intel power_save=1
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
{
|
|
||||||
imports = [ ];
|
|
||||||
|
|
||||||
config = {
|
|
||||||
systemd.tmpfiles.rules = [
|
|
||||||
"w- /sys/class/backlight/amdgpu_bl1/brightness - - - - 32767"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
{
|
|
||||||
imports = [ ];
|
|
||||||
|
|
||||||
config = {
|
|
||||||
# Enable debug logging for ath12k wifi card.
|
|
||||||
boot.kernelParams = [
|
|
||||||
"ath12k.debug_mask=0xffffffff"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
|
|
||||||
lib.mkIf (!config.me.buildingPortable) (import ./disk-config.nix)
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
#
|
|
||||||
set -euo pipefail
|
|
||||||
IFS=$'\n\t'
|
|
||||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
||||||
|
|
||||||
: "${JOBS:="1"}"
|
|
||||||
|
|
||||||
TARGET=odowork
|
|
||||||
|
|
||||||
nixos-rebuild boot --flake "$DIR/../../#odowork" --target-host "$TARGET" --build-host "$TARGET" --sudo --max-jobs "$JOBS" --repair --log-format internal-json -v "${@}" |& nom --json
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
#
|
|
||||||
set -euo pipefail
|
|
||||||
IFS=$'\n\t'
|
|
||||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
||||||
|
|
||||||
: "${JOBS:="1"}"
|
|
||||||
|
|
||||||
TARGET=odowork
|
|
||||||
|
|
||||||
nixos-rebuild switch --flake "$DIR/../../#odowork" --target-host "$TARGET" --build-host "$TARGET" --sudo --max-jobs "$JOBS" --repair --log-format internal-json -v "${@}" |& nom --json
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
#
|
|
||||||
set -euo pipefail
|
|
||||||
IFS=$'\n\t'
|
|
||||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
||||||
|
|
||||||
: "${JOBS:="1"}"
|
|
||||||
|
|
||||||
nix build --extra-experimental-features nix-command --extra-experimental-features flakes "$DIR/../..#odowork.installer" --repair --max-jobs "$JOBS" --log-format internal-json -v "${@}" |& nom --json
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
#
|
|
||||||
set -euo pipefail
|
|
||||||
IFS=$'\n\t'
|
|
||||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
||||||
|
|
||||||
: "${JOBS:="1"}"
|
|
||||||
|
|
||||||
nix build --extra-experimental-features nix-command --extra-experimental-features flakes "$DIR/../..#odowork.iso" --max-jobs "$JOBS" --repair --log-format internal-json -v "${@}" |& nom --json
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
#
|
|
||||||
set -euo pipefail
|
|
||||||
IFS=$'\n\t'
|
|
||||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
||||||
|
|
||||||
: "${JOBS:="1"}"
|
|
||||||
|
|
||||||
nixos-rebuild boot --show-trace --sudo --max-jobs "$JOBS" --flake "$DIR/../../#odowork" --repair --log-format internal-json -v "${@}" |& nom --json
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
#
|
|
||||||
set -euo pipefail
|
|
||||||
IFS=$'\n\t'
|
|
||||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
||||||
|
|
||||||
: "${JOBS:="1"}"
|
|
||||||
|
|
||||||
nixos-rebuild build --show-trace --sudo --max-jobs "$JOBS" --flake "$DIR/../../#odowork" --repair --log-format internal-json -v "${@}" |& nom --json
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
#
|
|
||||||
set -euo pipefail
|
|
||||||
IFS=$'\n\t'
|
|
||||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
||||||
|
|
||||||
: "${JOBS:="1"}"
|
|
||||||
|
|
||||||
nixos-rebuild switch --show-trace --sudo --max-jobs "$JOBS" --flake "$DIR/../../#odowork" --repair --log-format internal-json -v "${@}" |& nom --json
|
|
||||||
@@ -1,157 +0,0 @@
|
|||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
./hardware-configuration.nix
|
|
||||||
./wrapped-disk-config.nix
|
|
||||||
./distributed_build.nix
|
|
||||||
./power_management.nix
|
|
||||||
./screen_brightness.nix
|
|
||||||
./wifi.nix
|
|
||||||
./framework_module.nix
|
|
||||||
./ssh_config.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
config = {
|
|
||||||
# Generate with `head -c4 /dev/urandom | od -A none -t x4`
|
|
||||||
networking.hostId = "133cb66e";
|
|
||||||
|
|
||||||
networking.hostName = "odowork"; # Define your hostname.
|
|
||||||
|
|
||||||
time.timeZone = "America/New_York";
|
|
||||||
i18n.defaultLocale = "en_US.UTF-8";
|
|
||||||
|
|
||||||
me.boot.enable = true;
|
|
||||||
me.boot.secure = false;
|
|
||||||
me.mountPersistence = true;
|
|
||||||
|
|
||||||
# Toggle to start writing the extlinux config which will be used by zfsbootmenu
|
|
||||||
boot.loader.generic-extlinux-compatible.enable = true;
|
|
||||||
boot.loader.systemd-boot.enable = lib.mkForce false;
|
|
||||||
|
|
||||||
me.rollback.dataset = [
|
|
||||||
"zroot/linux/nixwork/root@blank"
|
|
||||||
"zroot/linux/nixwork/home@blank"
|
|
||||||
];
|
|
||||||
|
|
||||||
me.optimizations = {
|
|
||||||
enable = true;
|
|
||||||
arch = "znver4";
|
|
||||||
# build_arch = "x86-64-v3";
|
|
||||||
system_features = [
|
|
||||||
"gccarch-znver4"
|
|
||||||
"gccarch-skylake"
|
|
||||||
"gccarch-kabylake"
|
|
||||||
# "gccarch-alderlake" missing WAITPKG
|
|
||||||
"gccarch-x86-64-v3"
|
|
||||||
"gccarch-x86-64-v4"
|
|
||||||
"benchmark"
|
|
||||||
"big-parallel"
|
|
||||||
"kvm"
|
|
||||||
"nixos-test"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
# Early KMS
|
|
||||||
boot.initrd.kernelModules = [ "amdgpu" ];
|
|
||||||
|
|
||||||
# Mount tmpfs at /tmp
|
|
||||||
boot.tmp.useTmpfs = true;
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
fw-ectool
|
|
||||||
framework-tool
|
|
||||||
];
|
|
||||||
|
|
||||||
# Enable light sensor
|
|
||||||
# hardware.sensor.iio.enable = lib.mkDefault true;
|
|
||||||
|
|
||||||
# Enable TRIM
|
|
||||||
# services.fstrim.enable = lib.mkDefault true;
|
|
||||||
|
|
||||||
# Only run nix builders at idle priority for a more responsive system. Do not set on servers, just end-user devices.
|
|
||||||
nix.daemonCPUSchedPolicy = "idle";
|
|
||||||
|
|
||||||
fonts.enableDefaultPackages = lib.mkForce true;
|
|
||||||
fonts.packages = with pkgs; [
|
|
||||||
corefonts
|
|
||||||
];
|
|
||||||
allowedUnfree = [ "corefonts" ];
|
|
||||||
|
|
||||||
me.alacritty.enable = true;
|
|
||||||
me.amd_s2idle.enable = true;
|
|
||||||
me.android.enable = true;
|
|
||||||
me.ansible.enable = true;
|
|
||||||
me.base.enable = true;
|
|
||||||
me.bluetooth.enable = true;
|
|
||||||
me.build_in_ram.enable = true;
|
|
||||||
me.chromium.enable = true;
|
|
||||||
me.d2.enable = true;
|
|
||||||
me.direnv.enable = true;
|
|
||||||
me.doas.enable = true;
|
|
||||||
me.docker.enable = false;
|
|
||||||
me.dont_use_substituters.enable = true;
|
|
||||||
me.emacs_flavor = "full";
|
|
||||||
me.firefox.enable = true;
|
|
||||||
me.firewall.enable = true;
|
|
||||||
me.font.enable = true;
|
|
||||||
me.gcloud.enable = true;
|
|
||||||
me.git.config = ../../roles/git/files/gitconfig_work;
|
|
||||||
me.git.enable = true;
|
|
||||||
me.gnome_keyring.enable = true;
|
|
||||||
me.gnuplot.enable = true;
|
|
||||||
me.gpg.enable = true;
|
|
||||||
me.graphical = true;
|
|
||||||
me.graphics_card_type = "amd";
|
|
||||||
me.graphviz.enable = true;
|
|
||||||
me.iso_mount.enable = true;
|
|
||||||
me.jujutsu.config = ../../roles/jujutsu/files/jujutsu_config_home.toml;
|
|
||||||
me.jujutsu.enable = true;
|
|
||||||
me.kernel.enable = true;
|
|
||||||
me.latex.enable = true;
|
|
||||||
me.launch_keyboard.enable = true;
|
|
||||||
me.lvfs.enable = true;
|
|
||||||
me.media.enable = true;
|
|
||||||
me.memtest.enable = true;
|
|
||||||
me.network.enable = true;
|
|
||||||
me.nix_index.enable = true;
|
|
||||||
me.nix_repl.enable = true;
|
|
||||||
me.nixdev.enable = true;
|
|
||||||
me.nvme.enable = true;
|
|
||||||
me.openpgp_card_tools.enable = true;
|
|
||||||
me.podman.enable = true;
|
|
||||||
me.postgresql_client.enable = true;
|
|
||||||
me.python.enable = true;
|
|
||||||
me.rust.enable = true;
|
|
||||||
me.sequoia.enable = true;
|
|
||||||
me.shikane.enable = true;
|
|
||||||
me.sops.enable = true;
|
|
||||||
me.sound.enable = true;
|
|
||||||
me.ssh.enable = true;
|
|
||||||
me.sshd.enable = true;
|
|
||||||
me.steam_run_free.enable = true;
|
|
||||||
me.sway.enable = true;
|
|
||||||
me.terraform.enable = true;
|
|
||||||
me.thunderbolt.enable = true;
|
|
||||||
me.user.enable = true;
|
|
||||||
me.vscode.enable = true;
|
|
||||||
me.vscode.enable_work_profile = true;
|
|
||||||
me.waybar.enable = true;
|
|
||||||
me.webcam.enable = true;
|
|
||||||
me.wireguard.activated = [
|
|
||||||
"wgh"
|
|
||||||
];
|
|
||||||
me.wireguard.deactivated = [
|
|
||||||
"wgf"
|
|
||||||
"colo"
|
|
||||||
];
|
|
||||||
me.yubikey.enable = true;
|
|
||||||
me.zfs.enable = true;
|
|
||||||
me.zrepl.enable = true;
|
|
||||||
me.zsh.enable = true;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,155 +0,0 @@
|
|||||||
# Manual Step:
|
|
||||||
# Check if drive supports 4kn: nvme id-ns -H /dev/nvme0n1
|
|
||||||
# Format the drive to 4kn: nvme format --lbaf=1 /dev/nvme0n1
|
|
||||||
|
|
||||||
{
|
|
||||||
disko.devices = {
|
|
||||||
disk = {
|
|
||||||
main = {
|
|
||||||
type = "disk";
|
|
||||||
device = "/dev/nvme0n1";
|
|
||||||
content = {
|
|
||||||
type = "gpt";
|
|
||||||
partitions = {
|
|
||||||
ESP = {
|
|
||||||
size = "1G";
|
|
||||||
type = "EF00";
|
|
||||||
content = {
|
|
||||||
type = "filesystem";
|
|
||||||
format = "vfat";
|
|
||||||
mountpoint = "/efi";
|
|
||||||
mountOptions = [
|
|
||||||
"umask=0077"
|
|
||||||
"noatime"
|
|
||||||
"discard"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
zfs = {
|
|
||||||
size = "100%";
|
|
||||||
content = {
|
|
||||||
type = "zfs";
|
|
||||||
pool = "zroot";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
zpool = {
|
|
||||||
zroot = {
|
|
||||||
type = "zpool";
|
|
||||||
# mode = "mirror";
|
|
||||||
# Workaround: cannot import 'zroot': I/O error in disko tests
|
|
||||||
options.cachefile = "none";
|
|
||||||
options = {
|
|
||||||
ashift = "12";
|
|
||||||
compatibility = "openzfs-2.2-freebsd";
|
|
||||||
autotrim = "on";
|
|
||||||
};
|
|
||||||
rootFsOptions = {
|
|
||||||
acltype = "posixacl";
|
|
||||||
atime = "off";
|
|
||||||
relatime = "off";
|
|
||||||
xattr = "sa";
|
|
||||||
mountpoint = "none";
|
|
||||||
compression = "lz4";
|
|
||||||
canmount = "off";
|
|
||||||
utf8only = "on";
|
|
||||||
dnodesize = "auto";
|
|
||||||
normalization = "formD";
|
|
||||||
};
|
|
||||||
|
|
||||||
datasets = {
|
|
||||||
"linux/nixwork" = {
|
|
||||||
type = "zfs_fs";
|
|
||||||
options.mountpoint = "none";
|
|
||||||
options = {
|
|
||||||
encryption = "aes-256-gcm";
|
|
||||||
keyformat = "passphrase";
|
|
||||||
# keylocation = "file:///tmp/secret.key";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
"linux/nixwork/root" = {
|
|
||||||
type = "zfs_fs";
|
|
||||||
options.mountpoint = "legacy";
|
|
||||||
mountpoint = "/";
|
|
||||||
postCreateHook = "zfs list -t snapshot -H -o name | grep -E '^zroot/linux/nixwork/root@blank$' || zfs snapshot zroot/linux/nixwork/root@blank";
|
|
||||||
};
|
|
||||||
"linux/nixwork/boot" = {
|
|
||||||
type = "zfs_fs";
|
|
||||||
options = {
|
|
||||||
mountpoint = "legacy";
|
|
||||||
"org.zfsbootmenu:active" = "on";
|
|
||||||
};
|
|
||||||
mountpoint = "/boot";
|
|
||||||
postCreateHook = "zfs list -t snapshot -H -o name | grep -E '^zroot/linux/nixwork/boot@blank$' || zfs snapshot zroot/linux/nixwork/boot@blank";
|
|
||||||
};
|
|
||||||
"linux/nixwork/nix" = {
|
|
||||||
type = "zfs_fs";
|
|
||||||
options.mountpoint = "legacy";
|
|
||||||
mountpoint = "/nix";
|
|
||||||
postCreateHook = "zfs list -t snapshot -H -o name | grep -E '^zroot/linux/nixwork/nix@blank$' || zfs snapshot zroot/linux/nixwork/nix@blank";
|
|
||||||
options = {
|
|
||||||
recordsize = "16MiB";
|
|
||||||
compression = "zstd-19";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
"linux/nixwork/home" = {
|
|
||||||
type = "zfs_fs";
|
|
||||||
options.mountpoint = "legacy";
|
|
||||||
mountpoint = "/home";
|
|
||||||
postCreateHook = "zfs list -t snapshot -H -o name | grep -E '^zroot/linux/nixwork/home@blank$' || zfs snapshot zroot/linux/nixwork/home@blank";
|
|
||||||
};
|
|
||||||
"linux/nixwork/persist" = {
|
|
||||||
type = "zfs_fs";
|
|
||||||
options.mountpoint = "legacy";
|
|
||||||
mountpoint = "/persist";
|
|
||||||
postCreateHook = "zfs list -t snapshot -H -o name | grep -E '^zroot/linux/nixwork/persist@blank$' || zfs snapshot zroot/linux/nixwork/persist@blank";
|
|
||||||
};
|
|
||||||
"linux/nixwork/state" = {
|
|
||||||
type = "zfs_fs";
|
|
||||||
options.mountpoint = "legacy";
|
|
||||||
mountpoint = "/state";
|
|
||||||
postCreateHook = "zfs list -t snapshot -H -o name | grep -E '^zroot/linux/nixwork/state@blank$' || zfs snapshot zroot/linux/nixwork/state@blank";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# Make sure all persistent volumes are marked as neededForBoot
|
|
||||||
#
|
|
||||||
# Also mounts /home so it is mounted before the user home directories are created.
|
|
||||||
fileSystems."/persist".neededForBoot = true;
|
|
||||||
fileSystems."/state".neededForBoot = true;
|
|
||||||
fileSystems."/home".neededForBoot = true;
|
|
||||||
|
|
||||||
fileSystems."/".options = [
|
|
||||||
"noatime"
|
|
||||||
"norelatime"
|
|
||||||
];
|
|
||||||
fileSystems."/boot".options = [
|
|
||||||
"noatime"
|
|
||||||
"norelatime"
|
|
||||||
];
|
|
||||||
fileSystems."/nix".options = [
|
|
||||||
"noatime"
|
|
||||||
"norelatime"
|
|
||||||
];
|
|
||||||
fileSystems."/persist".options = [
|
|
||||||
"noatime"
|
|
||||||
"norelatime"
|
|
||||||
];
|
|
||||||
fileSystems."/state".options = [
|
|
||||||
"noatime"
|
|
||||||
"norelatime"
|
|
||||||
];
|
|
||||||
fileSystems."/home".options = [
|
|
||||||
"noatime"
|
|
||||||
"norelatime"
|
|
||||||
];
|
|
||||||
|
|
||||||
# Only attempt to decrypt the main pool. Otherwise it attempts to decrypt pools that aren't even used.
|
|
||||||
boot.zfs.requestEncryptionCredentials = [ "zroot/linux/nixwork" ];
|
|
||||||
}
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
{
|
|
||||||
imports = [ ];
|
|
||||||
|
|
||||||
config = {
|
|
||||||
me.distributed_build.enable = true;
|
|
||||||
me.distributed_build.machines.quark = {
|
|
||||||
enable = false;
|
|
||||||
additional_config = {
|
|
||||||
speedFactor = 2;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
me.distributed_build.machines.hydra = {
|
|
||||||
enable = true;
|
|
||||||
additional_config = {
|
|
||||||
speedFactor = 2;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
{
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
|
|
||||||
{
|
|
||||||
imports = [ ];
|
|
||||||
|
|
||||||
config = {
|
|
||||||
boot.extraModulePackages = with config.boot.kernelPackages; [
|
|
||||||
framework-laptop-kmod
|
|
||||||
];
|
|
||||||
# https://github.com/DHowett/framework-laptop-kmod?tab=readme-ov-file#usage
|
|
||||||
boot.kernelModules = [
|
|
||||||
"cros_ec"
|
|
||||||
"cros_ec_lpcs"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
modulesPath,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
(modulesPath + "/installer/scan/not-detected.nix")
|
|
||||||
];
|
|
||||||
|
|
||||||
config = {
|
|
||||||
boot.initrd.availableKernelModules = [
|
|
||||||
"nvme"
|
|
||||||
"xhci_pci"
|
|
||||||
"thunderbolt"
|
|
||||||
];
|
|
||||||
boot.initrd.kernelModules = [ ];
|
|
||||||
boot.kernelModules = [ ];
|
|
||||||
boot.extraModulePackages = [ ];
|
|
||||||
|
|
||||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
|
||||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
|
||||||
# still possible to use this option, but it's recommended to use it in conjunction
|
|
||||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
|
||||||
# networking.useDHCP = lib.mkDefault true;
|
|
||||||
# networking.interfaces.eno1.useDHCP = lib.mkDefault true;
|
|
||||||
# networking.interfaces.wlp58s0.useDHCP = lib.mkDefault true;
|
|
||||||
|
|
||||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,75 +0,0 @@
|
|||||||
{
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
|
|
||||||
{
|
|
||||||
imports = [ ];
|
|
||||||
|
|
||||||
config = {
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
powertop
|
|
||||||
];
|
|
||||||
|
|
||||||
# amdgpu.abmlevel=3 :: Automatically reduce screen brightness but tweak colors to compensate for power reduction.
|
|
||||||
# pcie_aspm=force pcie_aspm.policy=powersupersave :: Enable PCIe active state power management for power reduction.
|
|
||||||
# nowatchdog :: Disable watchdog for power savings (related to disable_sp5100_watchdog above).
|
|
||||||
# amd_pstate=passive :: Fully automated hardware pstate control.
|
|
||||||
# amd_pstate=active :: Same as passive except we can set the energy performance preference (EPP) to suggest how much we prefer performance or energy efficiency.
|
|
||||||
# amd_pstate=guided :: Same as passive except we can set upper and lower frequency bounds.
|
|
||||||
# amdgpu.dcdebugmask=0x10 :: Allegedly disables Panel Replay from https://community.frame.work/t/tracking-freezing-arch-linux-amd/39495/32
|
|
||||||
boot.kernelParams = [
|
|
||||||
"amdgpu.abmlevel=2"
|
|
||||||
"pcie_aspm=force"
|
|
||||||
# "pcie_aspm.policy=powersupersave"
|
|
||||||
"nowatchdog"
|
|
||||||
# I don't see a measurable benefit from these two:
|
|
||||||
# "cpufreq.default_governor=powersave"
|
|
||||||
# "initcall_blacklist=cpufreq_gov_userspace_init"
|
|
||||||
];
|
|
||||||
|
|
||||||
systemd.tmpfiles.rules = [
|
|
||||||
"w- /sys/firmware/acpi/platform_profile - - - - low-power"
|
|
||||||
"w- /sys/devices/system/cpu/cpufreq/policy0/energy_performance_preference - - - - power"
|
|
||||||
"w- /sys/devices/system/cpu/cpufreq/policy1/energy_performance_preference - - - - power"
|
|
||||||
"w- /sys/devices/system/cpu/cpufreq/policy2/energy_performance_preference - - - - power"
|
|
||||||
"w- /sys/devices/system/cpu/cpufreq/policy3/energy_performance_preference - - - - power"
|
|
||||||
"w- /sys/devices/system/cpu/cpufreq/policy4/energy_performance_preference - - - - power"
|
|
||||||
"w- /sys/devices/system/cpu/cpufreq/policy5/energy_performance_preference - - - - power"
|
|
||||||
"w- /sys/devices/system/cpu/cpufreq/policy6/energy_performance_preference - - - - power"
|
|
||||||
"w- /sys/devices/system/cpu/cpufreq/policy7/energy_performance_preference - - - - power"
|
|
||||||
"w- /sys/devices/system/cpu/cpufreq/policy8/energy_performance_preference - - - - power"
|
|
||||||
"w- /sys/devices/system/cpu/cpufreq/policy9/energy_performance_preference - - - - power"
|
|
||||||
"w- /sys/devices/system/cpu/cpufreq/policy10/energy_performance_preference - - - - power"
|
|
||||||
"w- /sys/devices/system/cpu/cpufreq/policy11/energy_performance_preference - - - - power"
|
|
||||||
"w- /sys/devices/system/cpu/cpufreq/policy12/energy_performance_preference - - - - power"
|
|
||||||
"w- /sys/devices/system/cpu/cpufreq/policy13/energy_performance_preference - - - - power"
|
|
||||||
"w- /sys/devices/system/cpu/cpufreq/policy14/energy_performance_preference - - - - power"
|
|
||||||
"w- /sys/devices/system/cpu/cpufreq/policy15/energy_performance_preference - - - - power"
|
|
||||||
"w- /sys/devices/system/cpu/cpu0/cpufreq/boost - - - - 0"
|
|
||||||
"w- /sys/devices/system/cpu/cpu1/cpufreq/boost - - - - 0"
|
|
||||||
"w- /sys/devices/system/cpu/cpu2/cpufreq/boost - - - - 0"
|
|
||||||
"w- /sys/devices/system/cpu/cpu3/cpufreq/boost - - - - 0"
|
|
||||||
"w- /sys/devices/system/cpu/cpu4/cpufreq/boost - - - - 0"
|
|
||||||
"w- /sys/devices/system/cpu/cpu5/cpufreq/boost - - - - 0"
|
|
||||||
"w- /sys/devices/system/cpu/cpu6/cpufreq/boost - - - - 0"
|
|
||||||
"w- /sys/devices/system/cpu/cpu7/cpufreq/boost - - - - 0"
|
|
||||||
"w- /sys/devices/system/cpu/cpu8/cpufreq/boost - - - - 0"
|
|
||||||
"w- /sys/devices/system/cpu/cpu9/cpufreq/boost - - - - 0"
|
|
||||||
"w- /sys/devices/system/cpu/cpu10/cpufreq/boost - - - - 0"
|
|
||||||
"w- /sys/devices/system/cpu/cpu11/cpufreq/boost - - - - 0"
|
|
||||||
"w- /sys/devices/system/cpu/cpu12/cpufreq/boost - - - - 0"
|
|
||||||
"w- /sys/devices/system/cpu/cpu13/cpufreq/boost - - - - 0"
|
|
||||||
"w- /sys/devices/system/cpu/cpu14/cpufreq/boost - - - - 0"
|
|
||||||
"w- /sys/devices/system/cpu/cpu15/cpufreq/boost - - - - 0"
|
|
||||||
];
|
|
||||||
|
|
||||||
boot.extraModprobeConfig = ''
|
|
||||||
# Disable the hardware watchdog inside AMD 700 chipset series for power savings.
|
|
||||||
blacklist sp5100_tco
|
|
||||||
|
|
||||||
# Sound power-saving was causing chat notifications to be inaudible.
|
|
||||||
# options snd_hda_intel power_save=1
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
{
|
|
||||||
imports = [ ];
|
|
||||||
|
|
||||||
config = {
|
|
||||||
systemd.tmpfiles.rules = [
|
|
||||||
"w- /sys/class/backlight/amdgpu_bl1/brightness - - - - 32767"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
{
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
imports = [ ];
|
|
||||||
|
|
||||||
config = {
|
|
||||||
me.install.user.talexander.file = {
|
|
||||||
".ssh/config" = {
|
|
||||||
source = lib.mkForce "/persist/manual/ssh/talexander/config";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user