Nix overhaul; Zsh/starship and vm update

This commit is contained in:
2024-10-13 16:56:25 +01:00
parent e10e3a76da
commit 63d14dcdfa
5 changed files with 484 additions and 391 deletions

View File

@@ -47,7 +47,6 @@ case $main_menu in
sudo nixos-rebuild switch --flake /etc/nixos#default sudo nixos-rebuild switch --flake /etc/nixos#default
;; ;;
3) 3)
chsh -s /bin/bash
mkdir -p ~/.config/nix-darwin/ mkdir -p ~/.config/nix-darwin/
cp -rf ./nix/macOS/* ~/.config/nix-darwin/ cp -rf ./nix/macOS/* ~/.config/nix-darwin/
cp -f ./nix/home.nix ~/.config/nix-darwin/ cp -f ./nix/home.nix ~/.config/nix-darwin/

View File

@@ -11,7 +11,7 @@ pkgs.mkShellNoCC {
shellHook = '' shellHook = ''
mkdir -p macos-vm mkdir -p macos-vm
cd macos-vm cd macos-vm
quickget macos ventura quickget macos sonoma
quickemu --vm macos-ventura.conf quickemu --vm macos-sonoma.conf
''; '';
} }

View File

@@ -375,330 +375,383 @@ in
# =========================================================== # ===========================================================
# Autostart services on boot # Autostart services on boot
services.gnome-keyring.enable = isLinux; services = {
programs.home-manager.enable = true; gnome-keyring.enable = isLinux;
};
programs.firefox = { programs = {
enable = false; home-manager.enable = true;
policies = {
DisableTelemetry = true;
DisableFirefoxStudies = true;
DontCheckDefaultBrowser = true;
DisablePocket = true;
SearchBar = "unified";
Preferences = { firefox = {
# Privacy settings enable = false;
"extensions.pocket.enabled" = false; policies = {
"browser.topsites.contile.enabled" = false; DisableTelemetry = true;
"browser.newtabpage.activity-stream.showSponsored" = false; DisableFirefoxStudies = true;
"browser.newtabpage.activity-stream.system.showSponsored" = false; DontCheckDefaultBrowser = true;
"browser.newtabpage.activity-stream.showSponsoredTopSites" = false; DisablePocket = true;
SearchBar = "unified";
Preferences = {
# Privacy settings
"extensions.pocket.enabled" = false;
"browser.topsites.contile.enabled" = false;
"browser.newtabpage.activity-stream.showSponsored" = false;
"browser.newtabpage.activity-stream.system.showSponsored" = false;
"browser.newtabpage.activity-stream.showSponsoredTopSites" = false;
};
ExtensionSettings = {
"uBlock0@raymondhill.net" = {
install_url = "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi";
installation_mode = "force_installed";
};
"jid1-MnnxcxisBPnSXQ@jetpack" = {
install_url = "https://addons.mozilla.org/firefox/downloads/latest/privacy-badger17/latest.xpi";
installation_mode = "force_installed";
};
};
}; };
ExtensionSettings = { profiles.default = {
"uBlock0@raymondhill.net" = { id = 0;
install_url = "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi"; name = "TrudeEH";
installation_mode = "force_installed"; isDefault = true;
settings = {
"browser.startup.homepage" = "about:newtab";
"browser.search.defaultenginename" = "DuckDuckGo";
"browser.search.order.1" = "DuckDuckGo";
"general.smoothScroll" = true;
"browser.disableResetPrompt" = true;
"browser.download.panel.shown" = true;
"browser.download.useDownloadDir" = false;
"browser.newtabpage.activity-stream.showSponsoredTopSites" = false;
"browser.shell.checkDefaultBrowser" = false;
"browser.shell.defaultBrowserCheckCount" = 1;
"dom.security.https_only_mode" = true;
"identity.fxaccounts.enabled" = false;
"privacy.trackingprotection.enabled" = true;
"signon.rememberSignons" = false;
}; };
"jid1-MnnxcxisBPnSXQ@jetpack" = { search = {
install_url = "https://addons.mozilla.org/firefox/downloads/latest/privacy-badger17/latest.xpi"; force = true;
installation_mode = "force_installed"; default = "Startpage";
order = [ "Startpage" "DuckDuckGo" "Google" ];
engines = {
"Startpage" = {
urls = [{
template = "https://www.startpage.com/do/search?query={searchTerms}";
}];
definedAliases = [ "@s" ];
};
"Nix Packages" = {
urls = [{
template = "https://search.nixos.org/packages";
params = [
{ name = "type"; value = "packages"; }
{ name = "query"; value = "{searchTerms}"; }
];
}];
icon = "''${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = [ "@np" ];
};
"NixOS Wiki" = {
urls = [{ template = "https://nixos.wiki/index.php?search={searchTerms}"; }];
iconUpdateURL = "https://nixos.wiki/favicon.png";
updateInterval = 24 * 60 * 60 * 1000; # every day
definedAliases = [ "@nw" ];
};
"Bing".metaData.hidden = true;
"Google".metaData.alias = "@g"; # builtin engines only support specifying one additional alias
};
}; };
bookmarks = [
{
name = "Toolbar";
toolbar = true;
bookmarks = [
{
name = "YouTube";
url = "https://www.youtube.com/";
}
{
name = "Arch Linux";
tags = [ "news" "wiki" "arch" ];
url = "https://archlinux.org/";
}
{
name = "NixOS Discourse";
tags = [ "wiki" "nix" ];
url = "https://discourse.nixos.org/";
}
{
name = "GitHub";
url = "https://github.com/";
}
{
name = "WOL";
url = "https://wol.jw.org/pt-PT/";
}
{
name = "Rust Book";
url = "https://doc.rust-lang.org/stable/book/";
}
{
name = "Rust by example";
url = "https://doc.rust-lang.org/stable/rust-by-example/";
}
{
name = "Rustlings";
url = "https://github.com/rust-lang/rustlings/";
}
];
}
];
}; };
}; };
profiles.default = { neovim = {
id = 0; enable = true;
name = "TrudeEH"; defaultEditor = true;
isDefault = true; viAlias = true;
settings = { vimAlias = true;
"browser.startup.homepage" = "about:newtab"; vimdiffAlias = true;
"browser.search.defaultenginename" = "DuckDuckGo"; plugins = with pkgs.vimPlugins; [
"browser.search.order.1" = "DuckDuckGo"; nvim-treesitter.withAllGrammars
"general.smoothScroll" = true;
"browser.disableResetPrompt" = true;
"browser.download.panel.shown" = true;
"browser.download.useDownloadDir" = false;
"browser.newtabpage.activity-stream.showSponsoredTopSites" = false;
"browser.shell.checkDefaultBrowser" = false;
"browser.shell.defaultBrowserCheckCount" = 1;
"dom.security.https_only_mode" = true;
"identity.fxaccounts.enabled" = false;
"privacy.trackingprotection.enabled" = true;
"signon.rememberSignons" = false;
};
search = {
force = true;
default = "Startpage";
order = [ "Startpage" "DuckDuckGo" "Google" ];
engines = {
"Startpage" = {
urls = [{
template = "https://www.startpage.com/do/search?query={searchTerms}";
}];
definedAliases = [ "@s" ];
};
"Nix Packages" = {
urls = [{
template = "https://search.nixos.org/packages";
params = [
{ name = "type"; value = "packages"; }
{ name = "query"; value = "{searchTerms}"; }
];
}];
icon = "''${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = [ "@np" ];
};
"NixOS Wiki" = {
urls = [{ template = "https://nixos.wiki/index.php?search={searchTerms}"; }];
iconUpdateURL = "https://nixos.wiki/favicon.png";
updateInterval = 24 * 60 * 60 * 1000; # every day
definedAliases = [ "@nw" ];
};
"Bing".metaData.hidden = true;
"Google".metaData.alias = "@g"; # builtin engines only support specifying one additional alias
};
};
bookmarks = [
{
name = "Toolbar";
toolbar = true;
bookmarks = [
{
name = "YouTube";
url = "https://www.youtube.com/";
}
{
name = "Arch Linux";
tags = [ "news" "wiki" "arch" ];
url = "https://archlinux.org/";
}
{
name = "NixOS Discourse";
tags = [ "wiki" "nix" ];
url = "https://discourse.nixos.org/";
}
{
name = "GitHub";
url = "https://github.com/";
}
{
name = "WOL";
url = "https://wol.jw.org/pt-PT/";
}
{
name = "Rust Book";
url = "https://doc.rust-lang.org/stable/book/";
}
{
name = "Rust by example";
url = "https://doc.rust-lang.org/stable/rust-by-example/";
}
{
name = "Rustlings";
url = "https://github.com/rust-lang/rustlings/";
}
];
}
]; ];
# Use the Nix package search engine to find
# even more plugins : https://search.nixos.org/packages
}; };
};
programs.neovim = { tmux = {
enable = true; enable = true;
defaultEditor = true; aggressiveResize = true;
viAlias = true; baseIndex = 1;
vimAlias = true; disableConfirmationPrompt = true;
vimdiffAlias = true; escapeTime = 250;
plugins = with pkgs.vimPlugins; [ keyMode = "vi";
nvim-treesitter.withAllGrammars mouse = true;
]; plugins = with pkgs; [ tmuxPlugins.cpu ];
# Use the Nix package search engine to find prefix = "C-s";
# even more plugins : https://search.nixos.org/packages terminal = "tmux-256color";
}; shell = "${pkgs.zsh}/bin/zsh";
programs.tmux = { extraConfig = ''
enable = true; bind-key C command-prompt -p "Name of new window: " "new-window -n '%%'"
aggressiveResize = true;
baseIndex = 1;
disableConfirmationPrompt = true;
escapeTime = 250;
keyMode = "vi";
mouse = true;
plugins = with pkgs; [ tmuxPlugins.cpu ];
prefix = "C-s";
terminal = "tmux-256color";
extraConfig = '' # hjkl pane traversal
bind-key C command-prompt -p "Name of new window: " "new-window -n '%%'" bind-key h select-pane -L
bind-key j select-pane -D
bind-key k select-pane -U
bind-key l select-pane -R
# hjkl pane traversal # easy reload config
bind-key h select-pane -L bind-key r source-file ~/.config/tmux/tmux.conf \; display-message "Config reloaded."
bind-key j select-pane -D
bind-key k select-pane -U
bind-key l select-pane -R
# easy reload config # set window split
bind-key r source-file ~/.config/tmux/tmux.conf \; display-message "Config reloaded." bind-key v split-window -h -c "#{pane_current_path}"
bind-key b split-window -v -c "#{pane_current_path}"
# set window split # Styling
bind-key v split-window -h -c "#{pane_current_path}" set-option -g status-position top
bind-key b split-window -v -c "#{pane_current_path}" set -g mode-style "fg=black,bg=orange"
set-option -g pane-border-style fg=colour236
set-option -g pane-active-border-style fg=orange
set-window-option -g window-status-current-style fg=orange,bg=default,bright
set-window-option -g window-status-style fg=colour244,bg=default
set-window-option -g clock-mode-colour orange
set-option -g status-style "bg=default,fg=white"
set-option -g status-left ""
set-option -g status-right '[Session: #S] [CPU: #{cpu_fg_color}#{cpu_percentage}#[default]] [RAM: #{ram_fg_color}#{ram_percentage}#[default]] %d#[dim]/#[default]%m#[dim]/#[default]%Y %I:%M#[dim]%P#[default]'
set -g status-interval 1
set -g status-right-length 60
# Styling set -g @cpu_high_fg_color "#[fg=#FF0000]"
set-option -g status-position top set -g @ram_high_fg_color "#[fg=#FF0000]"
set -g mode-style "fg=black,bg=orange" run-shell ${pkgs.tmuxPlugins.cpu}/share/tmux-plugins/cpu/cpu.tmux
set-option -g pane-border-style fg=colour236 '';
set-option -g pane-active-border-style fg=orange
set-window-option -g window-status-current-style fg=orange,bg=default,bright
set-window-option -g window-status-style fg=colour244,bg=default
set-window-option -g clock-mode-colour orange
set-option -g status-style "bg=default,fg=white"
set-option -g status-left ""
set-option -g status-right '[Session: #S] [CPU: #{cpu_fg_color}#{cpu_percentage}#[default]] [RAM: #{ram_fg_color}#{ram_percentage}#[default]] %d#[dim]/#[default]%m#[dim]/#[default]%Y %I:%M#[dim]%P#[default]'
set -g status-interval 1
set -g status-right-length 60
set -g @cpu_high_fg_color "#[fg=#FF0000]"
set -g @ram_high_fg_color "#[fg=#FF0000]"
run-shell ${pkgs.tmuxPlugins.cpu}/share/tmux-plugins/cpu/cpu.tmux
'';
};
programs.git = {
enable = true;
userName = "TrudeEH";
userEmail = "ehtrude@gmail.com";
aliases = {
a = "add";
c = "commit";
ca = "commit --amend";
can = "commit --amend --no-edit";
cl = "clone";
cm = "commit -m";
co = "checkout";
cp = "cherry-pick";
cpx = "cherry-pick -x";
d = "diff";
f = "fetch";
fo = "fetch origin";
fu = "fetch upstream";
lol = "log --graph --decorate --pretty=oneline --abbrev-commit";
lola = "log --graph --decorate --pretty=oneline --abbrev-commit --all";
pl = "pull";
pr = "pull -r";
ps = "push";
psf = "push -f";
rb = "rebase";
rbi = "rebase -i";
r = "remote";
ra = "remote add";
rr = "remote rm";
rv = "remote -v";
rs = "remote show";
st = "status";
}; };
extraConfig = {
pull = { git = {
rebase=true; enable = true;
userName = "TrudeEH";
userEmail = "ehtrude@gmail.com";
aliases = {
a = "add";
c = "commit";
ca = "commit --amend";
can = "commit --amend --no-edit";
cl = "clone";
cm = "commit -m";
co = "checkout";
cp = "cherry-pick";
cpx = "cherry-pick -x";
d = "diff";
f = "fetch";
fo = "fetch origin";
fu = "fetch upstream";
lol = "log --graph --decorate --pretty=oneline --abbrev-commit";
lola = "log --graph --decorate --pretty=oneline --abbrev-commit --all";
pl = "pull";
pr = "pull -r";
ps = "push";
psf = "push -f";
rb = "rebase";
rbi = "rebase -i";
r = "remote";
ra = "remote add";
rr = "remote rm";
rv = "remote -v";
rs = "remote show";
st = "status";
};
extraConfig = {
pull = {
rebase=true;
};
}; };
}; };
};
programs.bash = { starship = {
enable = true; enable = true;
enableCompletion = true; enableBashIntegration = true;
shellAliases = { enableZshIntegration = true;
l = "ls -alh"; settings = {
ls = "ls --color=auto"; add_newline = true;
ll = "ls -lhi"; };
grep = "grep --color=auto";
ta = "tmux attach";
t = "tmux";
v = "nvim";
cpp = "rsync -ah --progress";
code = "codium --enable-features=UseOzonePlatform --ozone-platform=wayland";
neofetch = "fastfetch";
sudo = "sudo -i";
ns = "nix-shell";
}; };
initExtra = "set completion-ignore-case On";
bashrcExtra = ''
set -o vi
export EDITOR="nvim";
export PS1="\n[\[\e[37m\]\u\[\e[0m\]@\[\e[37;2m\]\h\[\e[0m\]] \[\e[1m\]\w \[\e[0;2m\]J:\[\e[0m\]\j\n\$ ";
if [[ -z $TMUX ]]; then bash = {
tmux attach enable = true;
if [[ $? == 1 ]]; then enableCompletion = true;
tmux new -s main shellAliases = {
l = "ls -alh";
ls = "ls --color=auto";
ll = "ls -lhi";
grep = "grep --color=auto";
ta = "tmux attach";
t = "tmux";
v = "nvim";
cpp = "rsync -ah --progress";
code = "codium --enable-features=UseOzonePlatform --ozone-platform=wayland";
neofetch = "fastfetch";
sudo = "sudo -i";
ns = "nix-shell";
};
initExtra = "set completion-ignore-case On";
bashrcExtra = ''
set -o vi
export EDITOR="nvim";
export PS1="\n[\[\e[37m\]\u\[\e[0m\]@\[\e[37;2m\]\h\[\e[0m\]] \[\e[1m\]\w \[\e[0;2m\]J:\[\e[0m\]\j\n\$ ";
if [[ -z $TMUX ]]; then
tmux attach
if [[ $? == 1 ]]; then
tmux new -s main
fi
fi fi
fi '';
''; };
};
programs.vscode = { zsh = {
enable = true; enable = true;
package = pkgs.vscodium; enableCompletion = true;
enableUpdateCheck = false; autosuggestion.enable = true;
enableExtensionUpdateCheck = false; syntaxHighlighting.enable = true;
mutableExtensionsDir = false;
# Extensions shellAliases = {
extensions = (with pkgs.vscode-extensions; [ l = "ls -alh";
ms-vscode-remote.remote-ssh ls = "ls --color=auto";
mhutchie.git-graph ll = "ls -lhi";
pkief.material-icon-theme grep = "grep --color=auto";
oderwat.indent-rainbow ta = "tmux attach";
jnoortheen.nix-ide t = "tmux";
ritwickdey.liveserver v = "nvim";
github.vscode-pull-request-github cpp = "rsync -ah --progress";
arrterian.nix-env-selector code = "codium --enable-features=UseOzonePlatform --ozone-platform=wayland";
piousdeer.adwaita-theme neofetch = "fastfetch";
llvm-vs-code-extensions.vscode-clangd sudo = "sudo -i";
formulahendry.code-runner ns = "nix-shell";
]); };
# Settings initExtra = ''
userSettings = { # Case-insensitive completion
# General autoload -Uz compinit && compinit
"editor.fontSize" = 14; zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}'
"editor.fontFamily" = "'JetBrainsMono Nerd Font', 'monospace', monospace";
"terminal.integrated.fontSize" = 12; set -o vi
"terminal.integrated.fontFamily" = "'JetBrainsMono Nerd Font', 'monospace', monospace"; export EDITOR="nvim";
"window.zoomLevel" = 0.1;
"editor.multiCursorModifier" = "ctrlCmd"; if [[ -z $TMUX ]]; then
"workbench.startupEditor" = "none"; tmux attach
"explorer.compactFolders" = false; if [[ $? == 1 ]]; then
"workbench.tree.indent" = 12; tmux new -s main
# Whitespace fi
"files.trimTrailingWhitespace" = true; fi
"files.trimFinalNewlines" = true; '';
"files.insertFinalNewline" = true; };
"diffEditor.ignoreTrimWhitespace" = false;
# Git vscode = {
"git.enableCommitSigning" = false; enable = true;
"git.enableSmartCommit" = true; package = pkgs.vscodium;
"git.confirmSync" = false; enableUpdateCheck = false;
"git.autofetch" = true; enableExtensionUpdateCheck = false;
# Styling mutableExtensionsDir = false;
"window.autoDetectColorScheme" = true;
"workbench.colorTheme" = "Adwaita Dark"; # Extensions
"workbench.preferredDarkColorTheme" = "Adwaita Dark"; extensions = (with pkgs.vscode-extensions; [
"workbench.preferredLightColorTheme" = "Adwaita Light"; ms-vscode-remote.remote-ssh
"workbench.iconTheme" = "material-icon-theme"; mhutchie.git-graph
"material-icon-theme.activeIconPack" = "none"; pkief.material-icon-theme
"material-icon-theme.folders.theme" = "classic"; oderwat.indent-rainbow
"editor.fontLigatures" = true; jnoortheen.nix-ide
"window.commandCenter" = true; ritwickdey.liveserver
"workbench.productIconTheme" = "adwaita"; github.vscode-pull-request-github
"editor.renderLineHighlight" = "none"; arrterian.nix-env-selector
# Other piousdeer.adwaita-theme
"telemetry.telemetryLevel" = "off"; llvm-vs-code-extensions.vscode-clangd
"update.showReleaseNotes" = false; formulahendry.code-runner
"window.titleBarStyle" = "custom"; ]);
"explorer.confirmDelete" = false;
# Settings
userSettings = {
# General
"editor.fontSize" = 14;
"editor.fontFamily" = "'JetBrainsMono Nerd Font', 'monospace', monospace";
"terminal.integrated.fontSize" = 12;
"terminal.integrated.fontFamily" = "'JetBrainsMono Nerd Font', 'monospace', monospace";
"window.zoomLevel" = 0.1;
"editor.multiCursorModifier" = "ctrlCmd";
"workbench.startupEditor" = "none";
"explorer.compactFolders" = false;
"workbench.tree.indent" = 12;
# Whitespace
"files.trimTrailingWhitespace" = true;
"files.trimFinalNewlines" = true;
"files.insertFinalNewline" = true;
"diffEditor.ignoreTrimWhitespace" = false;
# Git
"git.enableCommitSigning" = false;
"git.enableSmartCommit" = true;
"git.confirmSync" = false;
"git.autofetch" = true;
# Styling
"window.autoDetectColorScheme" = true;
"workbench.colorTheme" = "Adwaita Dark";
"workbench.preferredDarkColorTheme" = "Adwaita Dark";
"workbench.preferredLightColorTheme" = "Adwaita Light";
"workbench.iconTheme" = "material-icon-theme";
"material-icon-theme.activeIconPack" = "none";
"material-icon-theme.folders.theme" = "classic";
"editor.fontLigatures" = true;
"window.commandCenter" = true;
"workbench.productIconTheme" = "adwaita";
"editor.renderLineHighlight" = "none";
# Other
"telemetry.telemetryLevel" = "off";
"update.showReleaseNotes" = false;
"window.titleBarStyle" = "custom";
"explorer.confirmDelete" = false;
};
}; };
}; };
} }

View File

@@ -30,84 +30,115 @@
system.configurationRevision = self.rev or self.dirtyRev or null; system.configurationRevision = self.rev or self.dirtyRev or null;
system.stateVersion = 5; system.stateVersion = 5;
# Home-manager module
users.users.trude = { users.users.trude = {
name = "trude"; name = "trude";
home = "/Users/trude"; home = "/Users/trude";
}; };
home-manager = { home-manager = {
extraSpecialArgs = {inherit inputs;}; extraSpecialArgs = {inherit inputs;};
backupFileExtension = "backup"; backupFileExtension = "backup";
users = { users = {
"trude" = import ./home.nix; "trude" = import ./home.nix;
}; };
sharedModules = [
mac-app-util.homeManagerModules.default
];
}; };
home-manager.sharedModules = [
mac-app-util.homeManagerModules.default
];
# System packages
environment.systemPackages = []; environment.systemPackages = [];
# Configure macOS
security.pam.enableSudoTouchIdAuth = true; security.pam.enableSudoTouchIdAuth = true;
system.defaults = { system.defaults = {
# https://daiderd.com/nix-darwin/manual/index.html # https://daiderd.com/nix-darwin/manual/index.html
ActivityMonitor.IconType = 5;
ActivityMonitor.SortColumn = "CPUUsage"; ActivityMonitor = {
ActivityMonitor.SortDirection = 0; IconType = 5;
SortColumn = "CPUUsage";
SortDirection = 0;
};
CustomUserPreferences = { CustomUserPreferences = {
"com.apple.Safari" = { "com.apple.Safari" = {
"com.apple.Safari.ContentPageGroupIdentifier.WebKit2DeveloperExtrasEnabled" = true; "com.apple.Safari.ContentPageGroupIdentifier.WebKit2DeveloperExtrasEnabled" = true;
}; };
}; };
NSGlobalDomain.AppleICUForce24HourTime = false;
NSGlobalDomain.AppleInterfaceStyle = "Dark"; NSGlobalDomain = {
NSGlobalDomain.AppleScrollerPagingBehavior = true; AppleICUForce24HourTime = false;
NSGlobalDomain.AppleShowAllExtensions = true; AppleInterfaceStyle = "Dark";
NSGlobalDomain.AppleShowAllFiles = true; AppleScrollerPagingBehavior = true;
NSGlobalDomain.NSDocumentSaveNewDocumentsToCloud = false; AppleShowAllExtensions = true;
NSGlobalDomain.NSWindowShouldDragOnGesture = true; AppleShowAllFiles = true;
NSGlobalDomain.KeyRepeat = 2; NSDocumentSaveNewDocumentsToCloud = false;
NSGlobalDomain."com.apple.mouse.tapBehavior" = 1; #Tap to click on mouse. NSWindowShouldDragOnGesture = true;
NSGlobalDomain."com.apple.swipescrolldirection" = false; #Normal scrolling. KeyRepeat = 2;
WindowManager.EnableStandardClickToShowDesktop = true; "com.apple.mouse.tapBehavior" = 1; #Tap to click on mouse.
WindowManager.StandardHideDesktopIcons = false; "com.apple.swipescrolldirection" = false; #Normal scrolling.
alf.globalstate = 1; #Firewall
alf.stealthenabled = 1; #Drop incoming ping requests };
dock.autohide = false;
dock.autohide-delay = 0.0; WindowManager = {
dock.autohide-time-modifier = 0.5; #Dock autohide animation speed EnableStandardClickToShowDesktop = true;
dock.expose-animation-duration = 0.5; #Mission Control animation speed StandardHideDesktopIcons = false;
dock.minimize-to-application = true; #Minimize windows into their application icon };
dock.persistent-apps = [ #Dock apps
"/Applications/Safari.app"
"/System/Applications/Utilities/Terminal.app" alf = {
]; globalstate = 1; #Firewall
dock.persistent-others = [ #Dock folders stealthenabled = 1; #Drop incoming ping requests
"~/Downloads" };
];
dock.show-recents = false; #Dock show ecent apps dock = {
dock.showhidden = true; autohide = false;
dock.static-only = true; #Show only open apps in dock autohide-delay = 0.0;
dock.tilesize = 32; #Dock icon size autohide-time-modifier = 0.5; #Dock autohide animation speed
finder.AppleShowAllExtensions = true; expose-animation-duration = 0.5; #Mission Control animation speed
finder.AppleShowAllFiles = true; minimize-to-application = true; #Minimize windows into their application icon
finder.FXDefaultSearchScope = "SCcf"; #Search defaults to current folder
finder.FXEnableExtensionChangeWarning = false; persistent-apps = [ #Dock apps
finder.FXPreferredViewStyle = "Nlsv"; #Default to list view "/Applications/Safari.app"
finder.ShowPathbar = true; "/System/Applications/Utilities/Terminal.app"
finder.ShowStatusBar = true; ];
finder._FXSortFoldersFirst = true;
persistent-others = [ #Dock folders
"~/Downloads"
];
show-recents = false; #Dock show ecent apps
showhidden = true;
static-only = true; #Show only open apps in dock
tilesize = 32; #Dock icon size
};
finder = {
AppleShowAllExtensions = true;
AppleShowAllFiles = true;
FXDefaultSearchScope = "SCcf"; #Search defaults to current folder
FXEnableExtensionChangeWarning = false;
FXPreferredViewStyle = "Nlsv"; #Default to list view
ShowPathbar = true;
ShowStatusBar = true;
_FXSortFoldersFirst = true;
};
loginwindow.GuestEnabled = false; loginwindow.GuestEnabled = false;
menuExtraClock.Show24Hour = false;
menuExtraClock.ShowAMPM = true; menuExtraClock = {
menuExtraClock.ShowDayOfMonth = true; Show24Hour = false;
ShowAMPM = true;
ShowDayOfMonth = true;
};
screencapture.disable-shadow = true; screencapture.disable-shadow = true;
screensaver.askForPassword = true; screensaver.askForPassword = true;
trackpad.Clicking = true; #Tap to click trackpad.Clicking = true; #Tap to click
trackpad.Dragging = true; trackpad.Dragging = true;
}; };
system.keyboard = { system.keyboard = {
enableKeyMapping = true; enableKeyMapping = true;
remapCapsLockToControl = true; remapCapsLockToControl = true;

View File

@@ -13,19 +13,28 @@
outputs = { self, nixpkgs, ... }@inputs: outputs = { self, nixpkgs, ... }@inputs:
let let
configuration = { lib, config, pkgs, inputs, ... }: { configuration = { lib, config, pkgs, inputs, ... }: {
nix.settings.experimental-features = [ "nix-command" "flakes" ]; nix.settings = {
experimental-features = [ "nix-command" "flakes" ];
auto-optimise-store = true;
};
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
environment.systemPackages = with pkgs; [ ]; environment = {
systemPackages = with pkgs; [ ];
users.users.trude = { shells = with pkgs; [ zsh ];
isNormalUser = true;
initialPassword = "trude";
description = "TrudeEH";
extraGroups = [ "networkmanager" "wheel" ];
}; };
# Home-manager module. users = {
defaultUserShell = pkgs.zsh;
users.trude = {
isNormalUser = true;
initialPassword = "trude";
description = "TrudeEH";
extraGroups = [ "networkmanager" "wheel" ];
};
};
programs.zsh.enable = true;
home-manager = { home-manager = {
extraSpecialArgs = {inherit inputs;}; extraSpecialArgs = {inherit inputs;};
backupFileExtension = "backup"; backupFileExtension = "backup";
@@ -34,39 +43,44 @@
}; };
}; };
# Network. networking = {
networking.hostName = "trudeDev"; hostName = "trudeDev";
networking.networkmanager.enable = true; networkmanager.enable = true;
#firewall.allowedTCPPorts = [ ... ];
# GNOME. #firewall.allowedUDPPorts = [ ... ];
services.xserver.enable = true;
services.xserver.displayManager.gdm.enable = true;
services.xserver.desktopManager.gnome.enable = true;
# Enable CUPS to print documents.
services.printing.enable = true;
# Enable sound with pipewire.
hardware.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
#jack.enable = true;
}; };
# System Services. services = {
# services.openssh.enable = true; xserver = {
enable = true;
displayManager.gdm.enable = true;
desktopManager.gnome.enable = true;
xkb = {
layout = "pt";
variant = "";
};
};
printing.enable = true;
pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
#jack.enable = true;
};
#openssh.enable = true;
};
# Firewall. hardware.pulseaudio.enable = false;
# networking.firewall.allowedTCPPorts = [ ... ]; security.rtkit.enable = true;
# networking.firewall.allowedUDPPorts = [ ... ]; virtualisation.libvirtd.enable = true;
boot = {
loader.systemd-boot.enable = true;
loader.efi.canTouchEfiVariables = true;
supportedFilesystems = ["ntfs"];
};
# System options.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
time.timeZone = "Europe/Lisbon"; time.timeZone = "Europe/Lisbon";
i18n.defaultLocale = "en_US.UTF-8"; i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = { i18n.extraLocaleSettings = {
@@ -80,10 +94,6 @@
LC_TELEPHONE = "pt_PT.UTF-8"; LC_TELEPHONE = "pt_PT.UTF-8";
LC_TIME = "pt_PT.UTF-8"; LC_TIME = "pt_PT.UTF-8";
}; };
services.xserver.xkb = {
layout = "pt";
variant = "";
};
system.stateVersion = "24.05"; system.stateVersion = "24.05";
}; };
in in