From a642918e5d9df38ee172d37aefe42f40bad80309 Mon Sep 17 00:00:00 2001 From: tom barrett Date: Sat, 11 May 2024 21:31:48 +0200 Subject: good starting point --- home.nix | 200 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 200 insertions(+) create mode 100644 home.nix (limited to 'home.nix') diff --git a/home.nix b/home.nix new file mode 100644 index 0000000..6bbe0fb --- /dev/null +++ b/home.nix @@ -0,0 +1,200 @@ +{ + config, + lib, + nixvim, + pkgs, + ... +}: let + vars = { + BEMENU_OPTS = + "--fn 'Hermit 12' --line-height 25 " + + "--hb #a1b56c --hf #f8f8f8 --nf #b8b8b8 --af #b8b8b8 " + + "--tf #f8f8f8 --fbf #f8f8f8 --ff #f8f8f8 --cf #f8f8f8 " + + "--sf #f8f8f8 --scf #f8f8f8 --hp 10"; + }; +in { + home = { + username = "tom"; + homeDirectory = "/home/tom"; + stateVersion = "23.11"; + packages = with pkgs; [ + acpi + binutils + bemenu + feh + file + ghc + gimp + haskellPackages.fourmolu + htop + ncmpcpp + nixvim.packages.x86_64-linux.default + tmux + tree + vim + xmobar + ]; + sessionVariables = + vars + // { + LESS = "-R"; + EDITOR = "vim"; + }; + + file.".xinitrc".text = '' + xmonad + ''; + # todo find better solution for + # restarting without nixos switch + file.".config/xmonad/xmonad.hs".source = + config.lib.file.mkOutOfStoreSymlink + "${config.home.homeDirectory}/src/nixos/xmonad.hs"; + file.".xmobarrc".source = + config.lib.file.mkOutOfStoreSymlink + "${config.home.homeDirectory}/src/nixos/xmobarrc"; + }; + programs = { + home-manager.enable = true; + alacritty = { + enable = true; + settings = { + font = { + bold.family = "Hermit"; + bold_italic.family = "Hermit"; + italic.family = "Hermit"; + normal.family = "Hermit"; + size = 10; + }; + keyboard.bindings = [ + { + key = "="; + mods = "ALT"; + action = "IncreaseFontSize"; + } + { + key = "-"; + mods = "ALT"; + action = "DecreaseFontSize"; + } + ]; + }; + }; + firefox = { + enable = true; + profiles.tom = { + search = { + default = "DuckDuckGo"; + force = true; + }; + bookmarks = [ + { + toolbar = true; + bookmarks = [ + { + name = "home-manager"; + url = "https://nix-community.github.io/home-manager/options.xhtml"; + } + { + name = "nixpkgs"; + url = "https://search.nixos.org/packages"; + } + ]; + } + ]; + settings = { + "browser.startup.homepage" = "https://duckduckgo.com"; + "browser.newtabpage.enabled" = false; + "browser.toolbars.bookmarks.visibility" = "always"; + "extensions.activeThemeID" = "firefox-compact-dark@mozilla.org"; + "general.autoScroll" = true; + "browser.bookmarks.addedImportButton" = true; + "browser.uiCustomization.state" = { + "placements" = { + "widget-overflow-fixed-list" = []; + "unified-extensions-area" = []; + "nav-bar" = [ + "back-button" + "forward-button" + "stop-reload-button" + "urlbar-container" + "downloads-button" + "unified-extensions-button" + ]; + "toolbar-menubar" = ["menubar-items"]; + "TabsToolbar" = ["tabbrowser-tabs" "new-tab-button" "alltabs-button"]; + "PersonalToolbar" = ["personal-bookmarks"]; + }; + "seen" = ["save-to-pocket-button" "developer-button"]; + "dirtyAreaCache" = ["nav-bar" "PersonalToolbar" "toolbar-menubar" "TabsToolbar"]; + "currentVersion" = 20; + "newElementCount" = 3; + }; + "privacy.sanitize.sanitizeOnShutdown" = true; + "privacy.clearOnShutdown.cookies" = true; + "privacy.clearOnShutdown.cache" = true; + "privacy.clearOnShutdown.downloads" = true; + "privacy.clearOnShutdown.history" = true; + "privacy.clearOnShutdown.formData" = true; + "privacy.clearOnShutdown.offlineApps" = true; + "privacy.clearOnShutdown.sessions" = true; + "privacy.clearOnShutdown.siteSettings" = true; + }; + }; + }; + git = { + enable = true; + userName = "tom barrett"; + userEmail = "tom@tombarrett.xyz"; + extraConfig = { + init.defaultBranch = "master"; + }; + }; + gpg.enable = true; + password-store = { + enable = true; + package = pkgs.pass.withExtensions (exts: [exts.pass-otp]); + }; + zsh = { + enable = true; + autosuggestion.enable = true; + syntaxHighlighting.enable = true; + autocd = true; + }; + }; + systemd.user.settings.Manager.DefaultEnvironment = vars; + xsession.windowManager.xmonad = { + enable = true; + enableContribAndExtras = true; + }; + services = { + xscreensaver = { + enable = true; + settings = { + mode = "blank"; + }; + }; + gpg-agent = { + enable = true; + enableSshSupport = true; + pinentryPackage = pkgs.pinentry-bemenu; + # from gpg --list-secret-keys --with-keygrip ([A] keygrip) + sshKeys = []; + }; + }; + xdg.userDirs = { + enable = true; + extraConfig = let + downloads = "${config.home.homeDirectory}/downloads"; + in { + XDG_DESKTOP_DIR = downloads; + XDG_DOCUMENTS_DIR = downloads; + XDG_DOWNLOAD_DIR = downloads; + XDG_MISC_DIR = downloads; + XDG_MUSIC_DIR = downloads; + XDG_PICTURES_DIR = downloads; + XDG_PUBLICSHARE_DIR = downloads; + XDG_TEMPLATES_DIR = downloads; + XDG_VIDEOS_DIR = downloads; + }; + }; +} -- cgit v1.2.3