fully migrates dnsc-machine
This commit is contained in:
parent
8363764798
commit
7d7f81d9ce
14 changed files with 390 additions and 1 deletions
23
Justfile
Normal file
23
Justfile
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
deploy host:
|
||||
nixos-rebuild switch --flake .#{{host}}
|
||||
|
||||
debug host:
|
||||
nixos-rebuild switch --flake .#{{host}} --show-trace --verbose
|
||||
|
||||
dry host:
|
||||
nix build .#nixosConfigurations.{{host}}.config.system.build.toplevel --dry-run --no-link
|
||||
|
||||
update:
|
||||
nix flake update
|
||||
|
||||
history:
|
||||
nix profile history --profile /nix/var/nix/profiles/system
|
||||
|
||||
repl:
|
||||
nix repl -f flake:nixpkgs
|
||||
|
||||
clean:
|
||||
nix profile wipe-history --profile /nix/var/nix/profiles/system --older-than 7d
|
||||
|
||||
gc:
|
||||
sudo nix-collect-garbage --delete-old
|
||||
57
flake.lock
generated
57
flake.lock
generated
|
|
@ -41,6 +41,27 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"helium": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"utils": "utils"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1772003810,
|
||||
"narHash": "sha256-FfaHvYDfcWZ+0ZPkWDVywkglmQjBq0DoIqzl7TH2hXc=",
|
||||
"owner": "schembriaiden",
|
||||
"repo": "helium-browser-nix-flake",
|
||||
"rev": "9001c8ec8bb3a4b9103eca2f2fc707bda1401977",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "schembriaiden",
|
||||
"repo": "helium-browser-nix-flake",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
|
|
@ -130,7 +151,7 @@
|
|||
"inputs": {
|
||||
"flake-parts": "flake-parts_2",
|
||||
"nixpkgs": "nixpkgs_2",
|
||||
"systems": "systems"
|
||||
"systems": "systems_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1772402258,
|
||||
|
|
@ -149,6 +170,7 @@
|
|||
"root": {
|
||||
"inputs": {
|
||||
"flake-parts": "flake-parts",
|
||||
"helium": "helium",
|
||||
"home-manager": "home-manager",
|
||||
"import-tree": "import-tree",
|
||||
"nix-darwin": "nix-darwin",
|
||||
|
|
@ -173,6 +195,39 @@
|
|||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems_2": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"utils": {
|
||||
"inputs": {
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1731533236,
|
||||
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
|
|
|
|||
|
|
@ -13,6 +13,10 @@
|
|||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
url = "github:LnL7/nix-darwin/master";
|
||||
};
|
||||
helium = {
|
||||
url = "github:schembriaiden/helium-browser-nix-flake";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
nixpkgs.url = "https://channels.nixos.org/nixpkgs-unstable/nixexprs.tar.xz";
|
||||
nixpkgs-lib.follows = "nixpkgs";
|
||||
nixvim.url = "github:nix-community/nixvim";
|
||||
|
|
|
|||
18
modules/browser/default.nix
Normal file
18
modules/browser/default.nix
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
{ inputs, ... }:
|
||||
{
|
||||
flake.modules.nixos.browser =
|
||||
{ pkgs, system, ... }:
|
||||
{
|
||||
environment.systemPackages = [
|
||||
inputs.helium.packages.${system}.default
|
||||
];
|
||||
};
|
||||
|
||||
flake.modules.darwin.browser =
|
||||
{ pkgs, system, ... }:
|
||||
{
|
||||
environment.systemPackages = [
|
||||
inputs.helium.packages.${system}.default
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
@ -10,6 +10,19 @@
|
|||
environment.cosmic.excludePackages = with pkgs; [
|
||||
cosmic-term
|
||||
];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
bibata-cursors
|
||||
nerd-fonts.victor-mono
|
||||
gimp
|
||||
darktable
|
||||
];
|
||||
|
||||
fonts.fontconfig = {
|
||||
enable = true;
|
||||
antialiasing = true;
|
||||
defaultFonts.monospace = [ "VictorMono Nerd Font" ];
|
||||
};
|
||||
};
|
||||
|
||||
# TODO: Persist ~/.config/cosmic after setup
|
||||
|
|
|
|||
|
|
@ -6,5 +6,9 @@
|
|||
hardware.opentabletdriver.enable = true;
|
||||
hardware.uinput.enable = true;
|
||||
boot.kernelModules = [ "uinput" ];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
krita
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,12 +9,14 @@ in
|
|||
home-manager
|
||||
base
|
||||
shell
|
||||
ssh
|
||||
cli-tools
|
||||
nix
|
||||
nvidia-graphics
|
||||
drawing-tablet
|
||||
printing
|
||||
desktop
|
||||
terminal
|
||||
gaming
|
||||
|
||||
{
|
||||
|
|
|
|||
67
modules/ssh/default.nix
Normal file
67
modules/ssh/default.nix
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
{ inputs, ... }:
|
||||
{
|
||||
flake.modules.nixos.ssh =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
services.openssh.enable = true;
|
||||
|
||||
home-manager.sharedModules = [
|
||||
inputs.self.modules.homeManager.ssh
|
||||
];
|
||||
};
|
||||
|
||||
flake.modules.darwin.ssh =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
services.openssh.enable = true;
|
||||
|
||||
home-manager.sharedModules = [
|
||||
inputs.self.modules.homeManager.ssh
|
||||
];
|
||||
};
|
||||
|
||||
flake.modules.homeManager.ssh =
|
||||
{ pkgs, config, ... }:
|
||||
{
|
||||
programs.ssh = {
|
||||
enable = true;
|
||||
enableDefaultConfig = false;
|
||||
matchBlocks = {
|
||||
"*" = {
|
||||
addKeysToAgent = "yes";
|
||||
};
|
||||
"dnsc-machine" = {
|
||||
hostname = "192.168.178.250";
|
||||
user = "dennis";
|
||||
identityFile = "${config.home.homeDirectory}/.ssh/id_ed25519";
|
||||
identitiesOnly = true;
|
||||
};
|
||||
"dnsc-server" = {
|
||||
hostname = "192.168.178.69";
|
||||
user = "dennis";
|
||||
identityFile = "${config.home.homeDirectory}/.ssh/id_ed25519";
|
||||
identitiesOnly = true;
|
||||
};
|
||||
"dnsc-vps-sm" = {
|
||||
hostname = "91.99.21.186";
|
||||
user = "dennis";
|
||||
identityFile = "${config.home.homeDirectory}/.ssh/id_ed25519";
|
||||
identitiesOnly = true;
|
||||
};
|
||||
"dnsc-storage" = {
|
||||
hostname = "u295965.your-storagebox.de";
|
||||
user = "u295965";
|
||||
identityFile = "${config.home.homeDirectory}/.ssh/id_ed25519";
|
||||
identitiesOnly = true;
|
||||
port = 23;
|
||||
};
|
||||
"dnsc-storage-sftp" = {
|
||||
hostname = "u295965.your-storagebox.de";
|
||||
user = "u295965";
|
||||
identityFile = "${config.home.homeDirectory}/.ssh/id_ed25519";
|
||||
port = 22;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
156
modules/terminal/default.nix
Normal file
156
modules/terminal/default.nix
Normal file
|
|
@ -0,0 +1,156 @@
|
|||
{ inputs, ... }:
|
||||
{
|
||||
flake.modules.nixos.terminal =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home-manager.sharedModules = [
|
||||
inputs.self.modules.homeManager.terminal
|
||||
];
|
||||
};
|
||||
|
||||
flake.modules.darwin.terminal =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home-manager.sharedModules = [
|
||||
inputs.self.modules.homeManager.terminal
|
||||
];
|
||||
};
|
||||
|
||||
flake.modules.homeManager.terminal =
|
||||
{ pkgs, config, ... }:
|
||||
{
|
||||
programs.ghostty = {
|
||||
enable = true;
|
||||
enableFishIntegration = true;
|
||||
settings = {
|
||||
font-size = 14;
|
||||
font-family = "VictorMono Nerd Font";
|
||||
font-style = "SemiBold";
|
||||
background-opacity = 0.945;
|
||||
window-padding-x = 0;
|
||||
window-padding-y = 0;
|
||||
window-padding-balance = true;
|
||||
window-inherit-working-directory = true;
|
||||
window-theme = "ghostty";
|
||||
shell-integration-features = true;
|
||||
scrollback-limit = 100000;
|
||||
link-url = true;
|
||||
link-previews = true;
|
||||
title = " ";
|
||||
background = "#0f0b15";
|
||||
foreground = "#ffffff";
|
||||
cursor-color = "#d369af";
|
||||
selection-foreground = "#af85ea";
|
||||
selection-background = "#572454";
|
||||
palette = [
|
||||
"0=#0f0b15"
|
||||
"1=#f47359"
|
||||
"2=#29a444"
|
||||
"3=#b58a52"
|
||||
"4=#3f95f6"
|
||||
"5=#d369af"
|
||||
"6=#4fbaef"
|
||||
"7=#b8c6d5"
|
||||
"8=#807c9f"
|
||||
"9=#ff6a7a"
|
||||
"10=#00a392"
|
||||
"11=#df9080"
|
||||
"12=#029fff"
|
||||
"13=#af85ea"
|
||||
"14=#35afbf"
|
||||
"15=#ffffff"
|
||||
];
|
||||
keybind = [
|
||||
"ctrl+plus=increase_font_size:2"
|
||||
"ctrl+minus=decrease_font_size:2"
|
||||
"ctrl+0=reset_font_size"
|
||||
"ctrl+shift+a=select_all"
|
||||
"ctrl+shift+c=copy_to_clipboard"
|
||||
"ctrl+shift+v=paste_from_clipboard"
|
||||
"cmd+c=copy_to_clipboard"
|
||||
"cmd+v=paste_from_clipboard"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
programs.tmux = {
|
||||
enable = true;
|
||||
package = pkgs.tmux;
|
||||
baseIndex = 1;
|
||||
clock24 = true;
|
||||
disableConfirmationPrompt = true;
|
||||
mouse = true;
|
||||
newSession = true;
|
||||
prefix = "C-b";
|
||||
shell = "${pkgs.fish}/bin/fish";
|
||||
terminal = "screen-256color";
|
||||
keyMode = "vi";
|
||||
escapeTime = 0;
|
||||
plugins = with pkgs; [
|
||||
{
|
||||
plugin = tmuxPlugins.resurrect;
|
||||
extraConfig = ''
|
||||
set -g @resurrect-strategy-nvim 'session'
|
||||
set -g @resurrect-capture-pane-contents 'on'
|
||||
'';
|
||||
}
|
||||
{
|
||||
plugin = tmuxPlugins.continuum;
|
||||
extraConfig = ''
|
||||
set -g @continuum-restore 'on'
|
||||
set -g @continuum-boot 'on'
|
||||
set -g @continuum-save-interval '10'
|
||||
'';
|
||||
}
|
||||
];
|
||||
extraConfig = ''
|
||||
set -g status-position top
|
||||
set -g status-style bg=#1d202f,fg=white
|
||||
set -g status-left ""
|
||||
set -g status-right "#[bg=default,fg=magenta]>> #S << #[bg=default,fg=white]#H "
|
||||
set-window-option -g window-status-style 'fg=magenta,bg=#1d202f'
|
||||
set-window-option -g window-status-format ' #I #[fg=white]#W #[fg=cyan]#F '
|
||||
set-window-option -g window-status-current-style "fg=black,bg=magenta"
|
||||
set-window-option -g window-status-current-format " #I #W #F "
|
||||
set -g pane-border-style fg=#807c9f
|
||||
set -g pane-active-border-style fg=magenta
|
||||
set -g message-style "fg=black,bg=red,bold"
|
||||
|
||||
unbind %
|
||||
bind "|" split-window -h
|
||||
unbind '"'
|
||||
bind - split-window -l 15 -v
|
||||
|
||||
bind r source-file "~/.config/tmux/tmux.conf"
|
||||
|
||||
bind h select-pane -L
|
||||
bind j select-pane -D
|
||||
bind k select-pane -U
|
||||
bind l select-pane -R
|
||||
|
||||
bind -r H resize-pane -L 5
|
||||
bind -r J resize-pane -D 5
|
||||
bind -r K resize-pane -U 5
|
||||
bind -r L resize-pane -R 5
|
||||
|
||||
bind ? list-keys -a
|
||||
|
||||
unbind s
|
||||
bind s display-popup -h 50% -w 80% -E sessionizer
|
||||
|
||||
unbind g
|
||||
bind g display-popup -h 90% -w 95% -E lazygit
|
||||
|
||||
unbind C-x
|
||||
bind C-x kill-session
|
||||
|
||||
unbind v
|
||||
bind v choose-tree -Zw "join-pane -t '%%'"
|
||||
'';
|
||||
};
|
||||
|
||||
xdg.configFile."tmuxinator" = {
|
||||
source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/dev/nix-config/modules/terminal/tmuxinator-layouts";
|
||||
};
|
||||
};
|
||||
}
|
||||
11
modules/terminal/tmuxinator-layouts/dnsc.yml
Normal file
11
modules/terminal/tmuxinator-layouts/dnsc.yml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
name: dnsc-io
|
||||
root: ~/dev/dnsc-io
|
||||
windows:
|
||||
- dev:
|
||||
layout: main-horizontal
|
||||
panes:
|
||||
- nvim +"lua Snacks.picker.files({ hidden = true })"
|
||||
- run:
|
||||
layout: main-vertical
|
||||
panes:
|
||||
- "pnpm dev"
|
||||
7
modules/terminal/tmuxinator-layouts/main.yml
Normal file
7
modules/terminal/tmuxinator-layouts/main.yml
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
name: main
|
||||
root: ~/
|
||||
windows:
|
||||
- default:
|
||||
layout: main-vertical
|
||||
panes:
|
||||
- clear
|
||||
7
modules/terminal/tmuxinator-layouts/nix-config.yml
Normal file
7
modules/terminal/tmuxinator-layouts/nix-config.yml
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
name: nix-config
|
||||
root: ~/dev/nix-config/
|
||||
windows:
|
||||
- code:
|
||||
layout: main-horizontal
|
||||
panes:
|
||||
- nvim +"lua Snacks.picker.files({ hidden = true })"
|
||||
11
modules/terminal/tmuxinator-layouts/notes.yml
Normal file
11
modules/terminal/tmuxinator-layouts/notes.yml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
name: notes
|
||||
root: ~/dev/notes
|
||||
windows:
|
||||
- code:
|
||||
layout: main-horizontal
|
||||
panes:
|
||||
- nvim +"lua Snacks.picker.files({ hidden = true })"
|
||||
- run:
|
||||
layout: even-vertical
|
||||
panes:
|
||||
- clear
|
||||
11
modules/terminal/tmuxinator-layouts/proglog.yml
Normal file
11
modules/terminal/tmuxinator-layouts/proglog.yml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
name: proglog
|
||||
root: ~/dev/proglog
|
||||
windows:
|
||||
- dev:
|
||||
layout: main-horizontal
|
||||
panes:
|
||||
- nvim +"lua Snacks.picker.files({ hidden = true })"
|
||||
- run:
|
||||
layout: main-vertical
|
||||
panes:
|
||||
- echo ">> Run proglog tasks here"
|
||||
Loading…
Add table
Add a link
Reference in a new issue