gitea repo
This commit is contained in:
commit
f610209aff
66 changed files with 2439 additions and 0 deletions
94
modules/apps/00_tui_base.nix
Normal file
94
modules/apps/00_tui_base.nix
Normal file
|
@ -0,0 +1,94 @@
|
|||
# basic tui apps and configs for headless setup
|
||||
{ config, pkgs, ... }:
|
||||
let
|
||||
mergedBashFiles = pkgs.symlinkJoin {
|
||||
name = "merged-bash-files";
|
||||
paths = [
|
||||
../../dotfiles/bash_files/all_hosts
|
||||
../../dotfiles/bash_files/${config.host}
|
||||
];
|
||||
};
|
||||
in
|
||||
{
|
||||
config = {
|
||||
environment.variables = {
|
||||
NIXHOST = "${config.host}";
|
||||
EDITOR = "nvim";
|
||||
BAT_THEME = "gruvbox-dark";
|
||||
};
|
||||
system.tools.nixos-option.enable = true;
|
||||
|
||||
home-manager.users.${config.user} = { pkgs, ... }: {
|
||||
home.packages = with pkgs; [
|
||||
bat
|
||||
git
|
||||
htop
|
||||
nixpkgs-fmt
|
||||
nodejs # astronvim ls, formatters, etc
|
||||
ripgrep # text search in nvim
|
||||
jq
|
||||
file
|
||||
wget
|
||||
unzip
|
||||
rclone
|
||||
killall
|
||||
tree
|
||||
lm_sensors
|
||||
autogen
|
||||
];
|
||||
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
vimAlias = true;
|
||||
viAlias = true;
|
||||
};
|
||||
|
||||
programs.tmux = {
|
||||
enable = true;
|
||||
plugins = with pkgs; [
|
||||
tmuxPlugins.continuum
|
||||
tmuxPlugins.resurrect
|
||||
tmuxPlugins.sensible
|
||||
];
|
||||
};
|
||||
xdg.configFile.nvim = {
|
||||
recursive = true;
|
||||
source = ../../dotfiles/nvim;
|
||||
};
|
||||
|
||||
home.file = {
|
||||
".profile" = {
|
||||
text = ''
|
||||
source ~/.bashrc
|
||||
'';
|
||||
};
|
||||
};
|
||||
home.file = {
|
||||
".bashrc" = {
|
||||
text = ''
|
||||
BASH_DIR=~/.bash_files
|
||||
|
||||
# Check if the directory exists
|
||||
if [ -d "$BASH_DIR" ]; then
|
||||
# Loop through each file in the directory
|
||||
for file in "$BASH_DIR"/*; do
|
||||
# Check if it's a regular file (not a directory)
|
||||
if [ -f "$file" ]; then
|
||||
# Source the file
|
||||
. "$file"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
'';
|
||||
};
|
||||
};
|
||||
home.file.".bash_files" = {
|
||||
recursive = true;
|
||||
source = mergedBashFiles;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
|
17
modules/apps/01_tui_advance.nix
Normal file
17
modules/apps/01_tui_advance.nix
Normal file
|
@ -0,0 +1,17 @@
|
|||
# advanced tui apps beyond the scope of basic headless
|
||||
{ config, ... }: {
|
||||
|
||||
imports = [ ./00_tui_base.nix ];
|
||||
|
||||
config = {
|
||||
home-manager.users.${config.user} = { pkgs, ... }: {
|
||||
home.packages = with pkgs; [
|
||||
tealdeer
|
||||
gocryptfs
|
||||
pciutils
|
||||
usbutils
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
51
modules/apps/02_gui_base_apps.nix
Normal file
51
modules/apps/02_gui_base_apps.nix
Normal file
|
@ -0,0 +1,51 @@
|
|||
# normal gui apps for any DE
|
||||
{ config, pkgs, ... }: {
|
||||
|
||||
imports = [ ./55_firefox.nix ./01_tui_advance.nix ];
|
||||
|
||||
config = {
|
||||
environment.variables = {
|
||||
GTK_THEME = "Adwaita:dark";
|
||||
QT_STYLE_OVERRIDE = "adwaita-dark";
|
||||
};
|
||||
|
||||
home-manager.users.${config.user} = { pkgs, ... }: {
|
||||
home.packages = with pkgs; [
|
||||
keepassxc
|
||||
solaar
|
||||
obsidian
|
||||
signal-desktop
|
||||
discord
|
||||
steam
|
||||
vlc
|
||||
mpv
|
||||
tigervnc
|
||||
deluge-gtk
|
||||
libreoffice
|
||||
hunspell
|
||||
hunspellDicts.en_US
|
||||
ungoogled-chromium
|
||||
];
|
||||
|
||||
xdg.configFile.solaar = {
|
||||
recursive = true;
|
||||
source = ../../dotfiles/solaar;
|
||||
};
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
input-remapper
|
||||
gparted
|
||||
];
|
||||
|
||||
services.input-remapper.enable = true;
|
||||
hardware.logitech.wireless.enable = true;
|
||||
|
||||
fonts.packages = with pkgs; [
|
||||
nerd-fonts.droid-sans-mono
|
||||
hack-font
|
||||
];
|
||||
|
||||
};
|
||||
}
|
||||
|
93
modules/apps/55_firefox.nix
Normal file
93
modules/apps/55_firefox.nix
Normal file
|
@ -0,0 +1,93 @@
|
|||
{ config, pkgs, firefox-addons, ... }:
|
||||
|
||||
let
|
||||
autoconfigCfg = pkgs.writeText "autoconfig.cfg" ''
|
||||
var {classes:Cc,interfaces:Ci,utils:Cu} = Components;
|
||||
/* set new tab page */
|
||||
try {
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
AboutNewTab: "resource:///modules/AboutNewTab.sys.mjs",
|
||||
});
|
||||
var newTabURL = "https://mainframe.local/mainframe.html";
|
||||
AboutNewTab.newTabURL = newTabURL;
|
||||
} catch(e){Cu.reportError(e);} // report errors in the Browser Console
|
||||
'';
|
||||
|
||||
autoconfigJs = pkgs.writeText "autoconfig.js" ''
|
||||
pref("general.config.filename", "autoconfig.cfg");
|
||||
pref("general.config.obscure_value", 0);
|
||||
pref("general.config.sandbox_enabled", false);
|
||||
'';
|
||||
|
||||
firefoxWithAutoconfig = pkgs.firefox.overrideAttrs (oldAttrs: {
|
||||
buildCommand = oldAttrs.buildCommand + ''
|
||||
# Copy autoconfig files to the Firefox installation
|
||||
cp ${autoconfigJs} $out/lib/firefox/defaults/pref/autoconfig.js
|
||||
cp ${autoconfigCfg} $out/lib/firefox/autoconfig.cfg
|
||||
'';
|
||||
});
|
||||
|
||||
in {
|
||||
config = {
|
||||
home-manager.users.${config.user} = { pkgs, ... }: {
|
||||
programs.firefox = {
|
||||
enable = true;
|
||||
package = firefoxWithAutoconfig;
|
||||
profiles.default = {
|
||||
settings = {
|
||||
"browser.startup.homepage" = "https://mainframe.local/mainframe.html";
|
||||
"sidebar.verticalTabs" = true;
|
||||
"extensions.activeThemeID" = "firefox-compact-dark@mozilla.org";
|
||||
"browser.contentblocking.category" = { Value = "strict"; Status = "locked"; };
|
||||
"toolkit.telemetry.server" = "127.0.0.1";
|
||||
"toolkit.telemetry.server_owner" = "localhost";
|
||||
"extensions.pocket.enabled" = false;
|
||||
"extensions.screenshots.disabled" = true;
|
||||
"browser.topsites.contile.enabled" = false;
|
||||
"browser.formfill.enable" = false;
|
||||
"browser.search.suggest.enabled" = false;
|
||||
"browser.search.suggest.enabled.private" = false;
|
||||
"browser.urlbar.suggest.searches" = false;
|
||||
"browser.urlbar.showSearchSuggestionsFirst" = false;
|
||||
"browser.newtabpage.activity-stream.feeds.section.topstories" = false;
|
||||
"browser.newtabpage.activity-stream.feeds.snippets" = false;
|
||||
"browser.newtabpage.activity-stream.section.highlights.includePocket" = false;
|
||||
"browser.newtabpage.activity-stream.section.highlights.includeBookmarks" = false;
|
||||
"browser.newtabpage.activity-stream.section.highlights.includeDownloads" = false;
|
||||
"browser.newtabpage.activity-stream.section.highlights.includeVisited" = false;
|
||||
"browser.newtabpage.activity-stream.showSponsored" = false;
|
||||
"browser.newtabpage.activity-stream.system.showSponsored" = false;
|
||||
"browser.newtabpage.activity-stream.showSponsoredTopSites" = false;
|
||||
|
||||
};
|
||||
extensions.packages = with firefox-addons; [
|
||||
noscript
|
||||
ublock-origin
|
||||
sponsorblock
|
||||
];
|
||||
};
|
||||
policies = {
|
||||
DisableTelemetry = true;
|
||||
DisableFirefoxStudies = true;
|
||||
EnableTrackingProtection = {
|
||||
Value = true;
|
||||
Locked = true;
|
||||
Cryptomining = true;
|
||||
Fingerprinting = true;
|
||||
};
|
||||
DisablePocket = true;
|
||||
DisableFirefoxAccounts = true;
|
||||
DisableAccounts = true;
|
||||
DisableFirefoxScreenshots = true;
|
||||
OverrideFirstRunPage = "";
|
||||
OverridePostUpdatePage = "";
|
||||
DontCheckDefaultBrowser = true;
|
||||
DisplayBookmarksToolbar = "never"; # alternatives: "always" or "newtab"
|
||||
DisplayMenuBar = "default-off"; # alternatives: "always", "never" or "default-on"
|
||||
SearchBar = "unified"; # alternative: "separate"
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
119
modules/apps/99_i3_config.nix
Normal file
119
modules/apps/99_i3_config.nix
Normal file
|
@ -0,0 +1,119 @@
|
|||
# i3 config
|
||||
{ config, pkgs, lib, ... }: {
|
||||
|
||||
imports = [ ./02_gui_base_apps.nix ];
|
||||
|
||||
config = {
|
||||
|
||||
users.users.${config.user} = {
|
||||
extraGroups = [ "networkmanager" ];
|
||||
};
|
||||
|
||||
security.pam.services.i3lock.enable = true;
|
||||
networking.networkmanager.enable = true;
|
||||
home-manager.users.${config.user} = { pkgs, config, ... }: {
|
||||
home.packages = with pkgs; [
|
||||
xorg.setxkbmap
|
||||
xbindkeys
|
||||
xdotool
|
||||
networkmanagerapplet
|
||||
arandr
|
||||
volumeicon
|
||||
xclip
|
||||
feh
|
||||
xorg.xev
|
||||
xfce.xfce4-screenshooter
|
||||
];
|
||||
|
||||
programs.rofi = {
|
||||
enable = true;
|
||||
plugins = with pkgs; [
|
||||
rofi-calc
|
||||
];
|
||||
};
|
||||
|
||||
xdg.configFile.i3 = {
|
||||
source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/nixos/dotfiles/i3";
|
||||
};
|
||||
|
||||
xdg.configFile.i3blocks = {
|
||||
source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/nixos/dotfiles/i3blocks";
|
||||
};
|
||||
|
||||
xdg.configFile.volumeicon = {
|
||||
source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/nixos/dotfiles/volumeicon";
|
||||
};
|
||||
|
||||
home.file.".xbindkeysrc" = {
|
||||
source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/nixos/dotfiles/xbindkeys/xbindkeysrc";
|
||||
};
|
||||
|
||||
xdg.configFile."gtk-3.0" = {
|
||||
source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/nixos/dotfiles/gtk-3.0";
|
||||
};
|
||||
|
||||
home.file.".xprofile" = {
|
||||
source = ../../dotfiles/xprofile/xprofile;
|
||||
};
|
||||
|
||||
home.file.".config/Thunar/uca.xml" = {
|
||||
source = ../../dotfiles/thunar/uca.xml;
|
||||
};
|
||||
|
||||
home.file.".config/xfce4/xfconf/xfce-perchannel-xml" = {
|
||||
recursive = true;
|
||||
source = ../../dotfiles/xfce-perchannel-xml;
|
||||
};
|
||||
|
||||
home.file = {
|
||||
".Xresources" = {
|
||||
text = ''
|
||||
Xcursor.size: 16
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services = {
|
||||
displayManager = {
|
||||
defaultSession = "xfce+i3"; # move this to host specific config?
|
||||
};
|
||||
|
||||
xserver = {
|
||||
enable = true;
|
||||
videoDrivers = [ "amdgpu" ];
|
||||
xkb.layout = "us";
|
||||
|
||||
desktopManager = {
|
||||
xterm.enable = false;
|
||||
xfce = {
|
||||
enable = true;
|
||||
noDesktop = true;
|
||||
enableXfwm = false;
|
||||
};
|
||||
};
|
||||
|
||||
windowManager = {
|
||||
i3 = {
|
||||
enable = true;
|
||||
extraPackages = with pkgs; [
|
||||
i3status
|
||||
i3lock
|
||||
i3blocks
|
||||
rofi
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
pulseaudio.enable = false;
|
||||
pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
};
|
||||
security.rtkit.enable = true; # needed for pipewire/PA
|
||||
};
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue