Separate system from home-manager again
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
./direnv.nix
|
||||
./git.nix
|
||||
./ssh.nix
|
||||
./vim.nix
|
||||
./vim
|
||||
./xonsh.nix
|
||||
];
|
||||
}
|
||||
@@ -10,7 +10,7 @@
|
||||
fonts.fontconfig.enable = true;
|
||||
home.packages = with pkgs.nerd-fonts; [ hack ];
|
||||
|
||||
programs.nixvim = (import ./vim/config.nix { inherit config pkgs lib; }) // {
|
||||
programs.nixvim = (import ./config.nix { inherit config pkgs lib; }) // {
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
+22
-22
@@ -1,27 +1,26 @@
|
||||
{ top, overlays, ... }:
|
||||
|
||||
rec {
|
||||
greghellings =
|
||||
{
|
||||
overlays,
|
||||
top,
|
||||
...
|
||||
}:
|
||||
let
|
||||
pkgs =
|
||||
system:
|
||||
(import top.nixunstable {
|
||||
inherit system overlays;
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
allowUnfreePredicate = _: true;
|
||||
};
|
||||
});
|
||||
ivr =
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
pkgs = (
|
||||
import top.nixunstable {
|
||||
inherit system overlays;
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
allowUnfreePredicate = _: true;
|
||||
};
|
||||
}
|
||||
);
|
||||
system = "aarch64-darwin";
|
||||
in
|
||||
top.hmunstable.lib.homeManagerConfiguration {
|
||||
inherit pkgs;
|
||||
pkgs = pkgs system;
|
||||
modules = [
|
||||
(import ../modules/nix-conf.nix {
|
||||
inherit pkgs;
|
||||
inherit (pkgs) lib;
|
||||
cache = false;
|
||||
})
|
||||
../modules/nix-conf.nix
|
||||
./home.nix
|
||||
];
|
||||
extraSpecialArgs = {
|
||||
@@ -33,6 +32,7 @@ rec {
|
||||
username = "gregory.hellings";
|
||||
};
|
||||
};
|
||||
|
||||
"gregory.hellings" = greghellings;
|
||||
in
|
||||
{
|
||||
inherit ivr;
|
||||
}
|
||||
|
||||
+11
-9
@@ -9,18 +9,12 @@
|
||||
{
|
||||
imports = [
|
||||
top.nixvimunstable.homeManagerModules.nixvim
|
||||
./modules
|
||||
top.self.modules.homeManagerModule
|
||||
./baseline
|
||||
] ++ lib.optionals (builtins.pathExists ./hosts/${host}) [ ./hosts/${host} ];
|
||||
|
||||
programs.tmux = {
|
||||
enable = true;
|
||||
keyMode = "vi";
|
||||
terminal = "xterm-256color";
|
||||
customPaneNavigationAndResize = true;
|
||||
extraConfig = (lib.strings.concatStringsSep "\n" [ "bind P paste-buffer" ]);
|
||||
};
|
||||
|
||||
home.stateVersion = "25.05";
|
||||
|
||||
home.packages = with pkgs; [
|
||||
copier
|
||||
diffutils
|
||||
@@ -43,4 +37,12 @@
|
||||
wget
|
||||
zip
|
||||
];
|
||||
|
||||
programs.tmux = {
|
||||
enable = true;
|
||||
keyMode = "vi";
|
||||
terminal = "xterm-256color";
|
||||
customPaneNavigationAndResize = true;
|
||||
extraConfig = (lib.strings.concatStringsSep "\n" [ "bind P paste-buffer" ]);
|
||||
};
|
||||
}
|
||||
|
||||
@@ -22,6 +22,7 @@ in
|
||||
greg = {
|
||||
development = true;
|
||||
gui = true;
|
||||
nix.cache = false;
|
||||
pypackage.enable = false;
|
||||
vscodium = true;
|
||||
};
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./baseline
|
||||
./development.nix
|
||||
./gnome.nix
|
||||
./gui.nix
|
||||
./python.nix
|
||||
./sway.nix
|
||||
./vscodium.nix
|
||||
./xonsh.nix
|
||||
./zed.nix
|
||||
];
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
packages = with pkgs; [
|
||||
bruno # but let's not talk about it
|
||||
bruno-cli
|
||||
cargo
|
||||
gh-copilot
|
||||
gnumake
|
||||
nix-eval-jobs
|
||||
nix-fast-build
|
||||
nix-output-monitor
|
||||
nix-update
|
||||
nixfmt-rfc-style
|
||||
nixpkgs-review
|
||||
nodejs
|
||||
process-compose
|
||||
];
|
||||
in
|
||||
with lib;
|
||||
{
|
||||
options.greg.development = mkEnableOption "Setup necessary development packages";
|
||||
|
||||
config = mkIf config.greg.development { home.packages = packages; };
|
||||
}
|
||||
@@ -1,138 +0,0 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
cfg = config.greg.gnome;
|
||||
in
|
||||
{
|
||||
options.greg.gnome = lib.mkEnableOption "Enable Gnome support and settings";
|
||||
|
||||
config = (
|
||||
lib.mkIf cfg {
|
||||
programs.gnome-terminal = lib.mkIf (pkgs.system != "x86_64-darwin") {
|
||||
enable = true;
|
||||
showMenubar = true;
|
||||
themeVariant = "dark";
|
||||
profile."95f3c68e-82f3-4f44-ac85-6e075fed80b0" = {
|
||||
default = true;
|
||||
customCommand = "xonsh -st best";
|
||||
loginShell = true;
|
||||
scrollbackLines = 65535;
|
||||
transparencyPercent = 50;
|
||||
visibleName = "greg";
|
||||
};
|
||||
};
|
||||
|
||||
dconf.settings = {
|
||||
"org/gnome/Disks" = {
|
||||
image-dir-uri = "file:///home/greg/Downloads";
|
||||
};
|
||||
"org/gnome/desktop/interface" = {
|
||||
clock-show-weekday = true;
|
||||
color-scheme = "default";
|
||||
cursor-size = 24;
|
||||
toolbar-style = "text";
|
||||
};
|
||||
"org/gnome/desktop/screensaver" = {
|
||||
lock-delay = "uint32 0";
|
||||
lock-enabled = false;
|
||||
};
|
||||
"org/gnome/desktop/wm/keybindings" = {
|
||||
switch-applications = [ ];
|
||||
switch-applications-backward = [ ];
|
||||
switch-windows = [ "<Alt>Tab" ];
|
||||
switch-windows-backward = [ "<Shift><Alt>Tab" ];
|
||||
};
|
||||
"org/gnome/desktop/wm/preferences" = {
|
||||
button-layout = "icon:minimize,maximize,close";
|
||||
};
|
||||
"org/gnome/file-roller/listing" = {
|
||||
list-mode = "as-folder";
|
||||
name-coloumn-width = 302;
|
||||
show-path = true;
|
||||
sort-method = "name";
|
||||
sort-type = "ascending";
|
||||
};
|
||||
"org/gnome/mutter" = {
|
||||
# Enables quarter-point scaling options
|
||||
experimental-features = [ "scale-monitor-framebuffer" ];
|
||||
};
|
||||
"org/gnome/nautilus/preferences" = {
|
||||
default-folder-viewer = "icon-view";
|
||||
search-filter-time-type = "last_modified";
|
||||
search-view = "list-view";
|
||||
};
|
||||
"org/gnome/shell" = {
|
||||
enabled-extensions = [
|
||||
"appindicatorsupport@rgcjonas.gmail.com"
|
||||
"Vitals@CoreCoding.com"
|
||||
"window-list@gnome-shell-extensions.gcampax.github.com"
|
||||
"gsconnect@andyholmes.github.io"
|
||||
];
|
||||
favorite-apps = [
|
||||
"org.gnome.Calendar.desktop"
|
||||
"org.gnome.Nautilus.desktop"
|
||||
"org.gnome.Terminal.desktop"
|
||||
"firefox.desktop"
|
||||
"vlc.desktop"
|
||||
];
|
||||
remember-mount-password = true;
|
||||
};
|
||||
"org/gnome/shell/extensions/vitals" = {
|
||||
hot-sensors = [
|
||||
"_memory_usage_"
|
||||
"_system_load_1m_"
|
||||
"__network-rx_max__"
|
||||
"_temperature_k10temp_tccd1_"
|
||||
"_temperature_k10temp_tctl_"
|
||||
];
|
||||
};
|
||||
"org/gnome/shell/overrides" = {
|
||||
attach-modal-dialogs = true;
|
||||
dynamic-workspaces = true;
|
||||
edge-tiling = true;
|
||||
focus-change-on-pointer-rest = true;
|
||||
workspaces-only-on-primary = true;
|
||||
};
|
||||
"org/gnome/shell/weather" = {
|
||||
automation-location = true;
|
||||
locations = "[<(uint32 2, <('Midlothian / Waxahachie, Mid-Way Regional Airport', 'KJWY', false, [(0.5664611473274288, -1.691437359323684)], @a(dd) [])>)>]";
|
||||
};
|
||||
"org/gnome/shell/window-switcher" = {
|
||||
app-icon-mode = "both";
|
||||
current-workspace-only = true;
|
||||
};
|
||||
"org/gtk/settings/file-chooser" = {
|
||||
location-mode = "path-bar";
|
||||
show-hidden = false;
|
||||
show-size-column = true;
|
||||
sort-column = "modified";
|
||||
sort-directories-first = false;
|
||||
sort-order = "descending";
|
||||
};
|
||||
"org/virt-manager/virt-manager/confirm" = {
|
||||
delete-storage = true;
|
||||
forcepoweroff = false;
|
||||
};
|
||||
"org/virt-manager/virt-manager/details" = {
|
||||
show-toolbar = true;
|
||||
};
|
||||
"org/virt-manager/virt-manager/connections" = {
|
||||
autoconnect = [
|
||||
"qemu:///session"
|
||||
"qemu:///system"
|
||||
];
|
||||
uris = [
|
||||
"qemu:///session"
|
||||
"qemu:///system"
|
||||
"qemu+ssh://root@isaiah/system"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
||||
@@ -1,175 +0,0 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
cfg = config.greg.gui;
|
||||
|
||||
excludes = systems: opts: (if (builtins.all (x: pkgs.system != x) systems) then opts else [ ]);
|
||||
|
||||
vars = {
|
||||
XDG_CURRENT_DESKTOP = "GNOME";
|
||||
};
|
||||
in
|
||||
{
|
||||
options.greg.gui = lib.mkEnableOption "Enable GUI programs";
|
||||
|
||||
config = (
|
||||
lib.mkIf cfg {
|
||||
# These packages are Linux only
|
||||
home.packages =
|
||||
with pkgs;
|
||||
(excludes
|
||||
[
|
||||
"x86_64-darwin"
|
||||
"aarch64-darwin"
|
||||
]
|
||||
[
|
||||
cdrtools
|
||||
element-desktop
|
||||
freetube
|
||||
onlyoffice-bin
|
||||
qpwgraph
|
||||
vlc
|
||||
x265
|
||||
]
|
||||
)
|
||||
++
|
||||
|
||||
# x86_64-linux only
|
||||
(excludes
|
||||
[
|
||||
"x86_64-darwin"
|
||||
"aarch64-darwin"
|
||||
"aarch64-linux"
|
||||
]
|
||||
[
|
||||
bitwarden
|
||||
endeavour
|
||||
jellyfin-media-player
|
||||
nextcloud-client
|
||||
slack
|
||||
(pkgs.zoom-us.overrideAttrs {
|
||||
version = "6.2.11.5069";
|
||||
src = pkgs.fetchurl {
|
||||
url = "https://zoom.us/client/6.2.11.5069/zoom_x86_64.pkg.tar.xz";
|
||||
hash = "sha256-k8T/lmfgAFxW1nwEyh61lagrlHP5geT2tA7e5j61+qw=";
|
||||
};
|
||||
})
|
||||
]
|
||||
)
|
||||
++
|
||||
|
||||
# Items that are not supported on ARM/Linux
|
||||
(excludes [ "aarch64-linux" ] [
|
||||
synology-drive-client
|
||||
]);
|
||||
|
||||
programs.firefox = {
|
||||
enable = true; #(!pkgs.stdenv.hostPlatform.isDarwin);
|
||||
package = pkgs.firefox-bin;
|
||||
policies = {
|
||||
DisableAppUpdate = true;
|
||||
};
|
||||
profiles = {
|
||||
default = {
|
||||
bookmarks = {
|
||||
force = true;
|
||||
settings = import ./gui/bookmarks.nix;
|
||||
};
|
||||
id = 0;
|
||||
isDefault = true;
|
||||
search = {
|
||||
default = "ddg";
|
||||
force = true;
|
||||
engines = {
|
||||
google.metaData.alias = "@g";
|
||||
"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" ];
|
||||
};
|
||||
"Nix Options" = {
|
||||
urls = [
|
||||
{
|
||||
template = "https://search.nixos.org/options";
|
||||
params = [
|
||||
{
|
||||
name = "type";
|
||||
value = "packages";
|
||||
}
|
||||
{
|
||||
name = "query";
|
||||
value = "{searchTerms}";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
|
||||
definedAliases = [ "@no" ];
|
||||
};
|
||||
"Noogle" = {
|
||||
urls = [
|
||||
{
|
||||
template = "https://noogle.dev/q";
|
||||
params = [
|
||||
{
|
||||
name = "term";
|
||||
value = "{searchTerms}";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
|
||||
definedAliases = [ "@nl" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
settings = {
|
||||
"app.update.auto" = false;
|
||||
"browser.ctrlTab.sortByRecentlyUsed" = true;
|
||||
"browser.startup.page" = 3;
|
||||
"browser.startup.homepage" = "https://thehellings.com";
|
||||
"doh-rollout.doorhanger-decision" = "UIDisabled";
|
||||
"doh-rollout.doneFirstRun" = true;
|
||||
"signon.rememberSignons" = false;
|
||||
};
|
||||
extensions.packages = with pkgs.nur.repos.rycee.firefox-addons; [
|
||||
bitwarden
|
||||
gsconnect
|
||||
foxyproxy-standard
|
||||
multi-account-containers
|
||||
octotree
|
||||
okta-browser-plugin
|
||||
refined-github
|
||||
sponsorblock
|
||||
tree-style-tab
|
||||
ublock-origin
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# This is supposed to be in support of Firefox, but I dunno...
|
||||
programs.bash.sessionVariables = vars;
|
||||
programs.xonsh.sessionVariables = vars;
|
||||
}
|
||||
);
|
||||
}
|
||||
@@ -1,256 +0,0 @@
|
||||
[
|
||||
{
|
||||
name = "Toolbar";
|
||||
toolbar = true;
|
||||
bookmarks = [
|
||||
{
|
||||
name = "Ansible";
|
||||
bookmarks = [
|
||||
{
|
||||
name = "Collection Index";
|
||||
url = "https://docs.ansible.com/ansible/latest/collections/index.html";
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
name = "Church";
|
||||
bookmarks = [
|
||||
{
|
||||
name = "DC4K";
|
||||
url = "https://www.dc4k.org/leaderzone/articles";
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
name = "IVR";
|
||||
bookmarks = [
|
||||
{
|
||||
name = "Dev";
|
||||
bookmarks = [
|
||||
{
|
||||
name = "Core Survey";
|
||||
url = "https://webdev5.ivrtechnology.com/coreservices/survey/admin/";
|
||||
}
|
||||
{
|
||||
name = "Audio";
|
||||
url = "https://apidev1.ivrtechnology.com/coreservices/audio/admin/";
|
||||
}
|
||||
{
|
||||
name = "Tower";
|
||||
url = "https://towerrd1.ivrtechnology.com";
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
name = "HC";
|
||||
bookmarks = [
|
||||
{
|
||||
name = "Audio";
|
||||
url = "https://hcweb3.ivrtechnology.com/coreservices/audio/admin/";
|
||||
}
|
||||
{
|
||||
name = "Survey";
|
||||
url = "https://hcweb2.ivrtechnology.com/coreservices/survey/admin/";
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
name = "PCI";
|
||||
bookmarks = [
|
||||
{
|
||||
name = "Audio";
|
||||
url = "https://pciweb3.ivrtechnology.com/coreservices/audio/admin/";
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
name = "Processes";
|
||||
bookmarks = [
|
||||
{
|
||||
name = "Change Management";
|
||||
url = "https://ivrtg.atlassian.net/wiki/spaces/ITS/pages/13094842/Executing+Change+Management";
|
||||
}
|
||||
{
|
||||
name = "Okta";
|
||||
url = "https://engagesmart.okta.com/";
|
||||
}
|
||||
{
|
||||
name = "DB Request";
|
||||
url = "https://ivrtg.aha.io/develop/features/INFR-1073";
|
||||
}
|
||||
{
|
||||
name = "Server list";
|
||||
url = "https://ivrtg.atlassian.net/wiki/spaces/ITS/pages/13009166/350+Main";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
name = "Katie";
|
||||
bookmarks = [
|
||||
{
|
||||
name = "Sports Forms";
|
||||
url = "https://midlothianisd.rankone.com/New/NewStudentList.aspx";
|
||||
}
|
||||
{
|
||||
name = "Skyward";
|
||||
url = "https://skyward.iscorp.com/MidlothianISDTXStuSTS/Session/Signin?area=Home&controller=Home&action=Index&logoutreason=TimedOut";
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
name = "Nix";
|
||||
bookmarks = [
|
||||
{
|
||||
name = "Package Versions";
|
||||
url = "https://lazamar.co.uk/nix-versions/?channel=nixpkgs-unstable&package=python3";
|
||||
}
|
||||
{
|
||||
name = "Channel status";
|
||||
url = "https://status.nixos.org/";
|
||||
}
|
||||
{
|
||||
name = "Home Manager options";
|
||||
url = "https://nix-community.github.io/home-manager/options.xhtml";
|
||||
}
|
||||
{
|
||||
name = "Flake Parts";
|
||||
url = "https://community.flake.parts/";
|
||||
}
|
||||
{
|
||||
name = "Language ref";
|
||||
url = "https://nix.dev/manual/nix/latest/language/index.html";
|
||||
}
|
||||
{
|
||||
name = "Builtin functions";
|
||||
url = "https://nix.dev/manual/nix/latest/language/builtins.html";
|
||||
}
|
||||
{
|
||||
name = "Nixpkgs functions";
|
||||
url = "https://ryantm.github.io/nixpkgs/functions/library/strings/#sec-functions-library-strings";
|
||||
}
|
||||
{
|
||||
name = "Noogle";
|
||||
url = "https://noogle.dev/";
|
||||
}
|
||||
{
|
||||
name = "NUR search";
|
||||
url = "https://nur.nix-community.org/";
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
name = "Rust";
|
||||
bookmarks = [
|
||||
{
|
||||
name = "Learn Rust";
|
||||
url = "https://www.rust-lang.org/learn";
|
||||
}
|
||||
{
|
||||
name = "Rust by Example";
|
||||
url = "https://doc.rust-lang.org/rust-by-example/hello.html";
|
||||
}
|
||||
{
|
||||
name = "Iced";
|
||||
url = "https://docs.rs/iced/latest/iced/";
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
name = "Shopping";
|
||||
bookmarks = [
|
||||
{
|
||||
name = "Cables";
|
||||
url = "https://www.pchcables.com";
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
name = "SubTo";
|
||||
bookmarks = [
|
||||
{
|
||||
name = "Kajabi";
|
||||
url = "https://www.subtocourse.com/login";
|
||||
}
|
||||
{
|
||||
name = "SubTo Fund";
|
||||
url = "https://frontend.koreconx.com/auth/login";
|
||||
}
|
||||
{
|
||||
name = "Creive Title";
|
||||
url = "https://getcreativetitle.com/";
|
||||
}
|
||||
{
|
||||
name = "REI Scripts";
|
||||
url = "https://reiconveyorbelt.com/no-excuses/";
|
||||
}
|
||||
{
|
||||
name = "Ellis foreclosures";
|
||||
url = "https://co.ellis.tx.us/Archive.aspx?AMID=60";
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
name = "Tools";
|
||||
bookmarks = [
|
||||
{
|
||||
name = "Proxmoxes";
|
||||
bookmarks = [
|
||||
{
|
||||
name = "PVE1";
|
||||
url = "https://10.42.1.1:8006/";
|
||||
}
|
||||
{
|
||||
name = "Isaiah";
|
||||
url = "https://isaiah.home:8006/";
|
||||
}
|
||||
{
|
||||
name = "Jeremiah";
|
||||
url = "https://jeremiah.home:8006/";
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
name = "PGAdmin4";
|
||||
url = "http://pgadmin.kubernetes/";
|
||||
}
|
||||
{
|
||||
name = "Password Hash";
|
||||
url = "https://unix4lyfe.org/crypt/";
|
||||
}
|
||||
{
|
||||
name = "Keymap editor";
|
||||
url = "https://nickcoutsos.github.io/keymap-editor/";
|
||||
}
|
||||
{
|
||||
name = "Bitcoin dashboard";
|
||||
url = "http://hosea.home:60845";
|
||||
}
|
||||
{
|
||||
name = "Syncthing - nas";
|
||||
url = "http://nas.home:8384/#";
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
name = "REI";
|
||||
bookmarks = [
|
||||
{
|
||||
name = "Door Loop";
|
||||
url = "https://btrgpm.app.doorloop.com/home";
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
name = "Docs";
|
||||
bookmarks = [
|
||||
{
|
||||
name = "CloudNative PG";
|
||||
url = "https://cloudnative-pg.io/documentation/1.26/";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
}
|
||||
]
|
||||
@@ -1,27 +0,0 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.greg.pypackage;
|
||||
in
|
||||
{
|
||||
options.greg.pypackage = {
|
||||
enable = lib.mkOption {
|
||||
description = "Enable installing my Python package here";
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
};
|
||||
package = lib.mkOption {
|
||||
description = "Enable Gnome support and settings";
|
||||
type = lib.types.package;
|
||||
default = pkgs.gregpy;
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
home.packages = [ cfg.package ];
|
||||
};
|
||||
}
|
||||
@@ -1,115 +0,0 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
cfg = config.greg.sway;
|
||||
file_browser = {
|
||||
pkg = pkgs.krusader;
|
||||
path = "${pkgs.krusader}/bin/krusader";
|
||||
};
|
||||
term = "${pkgs.alacritty}/bin/alacritty";
|
||||
msg = "${pkgs.sway}/bin/swaymsg";
|
||||
sleep = "${pkgs.coreutils}/bin/sleep";
|
||||
workstation1 = pkgs.writeScriptBin "workstation1" (
|
||||
builtins.concatStringsSep "\n" [
|
||||
"${msg} \"workspace 1 ; exec ${pkgs.firefox}/bin/firefox ; split horizontal ; exec ${pkgs.element-desktop}/bin/element-desktop \""
|
||||
"${sleep} 1"
|
||||
"${msg} '[app_id=\"firefox\"]' move left"
|
||||
"${msg} '[instance=\"element\"]' \"layout tabbed ; exec ${term} \""
|
||||
"${msg} '[app_id=\"firefox\"]' move left"
|
||||
"${sleep} 0.3"
|
||||
"${msg} '[app_id=\"Alacritty\" workspace=\"1\"]' move right"
|
||||
"${msg} '[app_id=\"firefox\"]' resize grow width 300 px"
|
||||
]
|
||||
);
|
||||
workstation2 = pkgs.writeScriptBin "workstation2" (
|
||||
builtins.concatStringsSep "\n" [
|
||||
"${sleep} 5"
|
||||
"${msg} \"workspace 2 ; exec ${term} ; layout tabbed\""
|
||||
]
|
||||
);
|
||||
in
|
||||
{
|
||||
options.greg.sway = lib.mkEnableOption "Enable Sway support and settings";
|
||||
|
||||
config = (
|
||||
lib.mkIf cfg {
|
||||
programs.swaylock.enable = true;
|
||||
|
||||
wayland.windowManager.sway =
|
||||
let
|
||||
mod = config.wayland.windowManager.sway.config.modifier;
|
||||
in
|
||||
{
|
||||
enable = true;
|
||||
config = rec {
|
||||
#fonts.size = 10.0;
|
||||
keybindings = lib.mkOptionDefault {
|
||||
"Mod4+l" = "exec ${pkgs.swaylock}/bin/swaylock -c 000000";
|
||||
"Mod4+h" = "exec ${pkgs.qpwgraph}/bin/qpwgraph -x /home/greg/sound/headphones.qpwgraph -m";
|
||||
"Mod4+m" = "exec ${pkgs.qpwgraph}/bin/qpwgraph -x /home/greg/sound/monitor.qpwgraph -m";
|
||||
"Mod4+b" = "exec ${pkgs.qpwgraph}/bin/qpwgraph -x /home/greg/sound/both.qpwgraph -m";
|
||||
|
||||
"${mod}+Shift+Return" = file_browser.path;
|
||||
};
|
||||
modifier = "Mod1";
|
||||
output = {
|
||||
"Samsung Electric Company S24E650 H4ZN600985" = {
|
||||
mode = "1920x1200";
|
||||
transform = "90";
|
||||
pos = "0 0";
|
||||
};
|
||||
"ViewSonic Corporation VA2252 Series VMT201800925" = {
|
||||
mode = "1920x1080";
|
||||
pos = "200 1920";
|
||||
};
|
||||
};
|
||||
terminal = term;
|
||||
startup = [
|
||||
{ command = "${workstation1}/bin/workstation1"; }
|
||||
{ command = "${workstation2}/bin/workstation2"; }
|
||||
];
|
||||
};
|
||||
extraOptions = [ "--unsupported-gpu" ];
|
||||
extraSessionCommands = ''
|
||||
export WLR_NO_HARDWARE_CURSORS=1
|
||||
'';
|
||||
systemd.enable = true;
|
||||
wrapperFeatures = {
|
||||
base = true;
|
||||
gtk = true;
|
||||
};
|
||||
};
|
||||
|
||||
home.pointerCursor = {
|
||||
name = "Adwaita";
|
||||
package = pkgs.gnome.adwaita-icon-theme;
|
||||
size = 12;
|
||||
x11 = {
|
||||
enable = true;
|
||||
defaultCursor = "Adwaita";
|
||||
};
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
arj
|
||||
dpkg
|
||||
kate
|
||||
kget
|
||||
krename
|
||||
file_browser.pkg
|
||||
p7zip
|
||||
plocate
|
||||
rpm
|
||||
qpwgraph
|
||||
xorg.xev
|
||||
xorg.xmodmap
|
||||
xxdiff
|
||||
];
|
||||
}
|
||||
);
|
||||
}
|
||||
@@ -1,77 +0,0 @@
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
cfg = config.greg.vscodium;
|
||||
in
|
||||
{
|
||||
options.greg.vscodium = lib.mkEnableOption "Enable installation of VSCodium on the host";
|
||||
|
||||
config = lib.mkIf cfg {
|
||||
home.packages = with pkgs; [
|
||||
buildifier
|
||||
gopls
|
||||
nixd # nix language server
|
||||
];
|
||||
|
||||
# An alternative editor to vim, when I need it for some things
|
||||
programs.vscode = {
|
||||
enable = true;
|
||||
profiles.default = {
|
||||
extensions =
|
||||
with pkgs.vscode-marketplace;
|
||||
[
|
||||
arrterian.nix-env-selector
|
||||
asvetliakov.vscode-neovim
|
||||
batisteo.vscode-django
|
||||
donjayamanne.python-environment-manager
|
||||
golang.go
|
||||
kevinrose.vsc-python-indent
|
||||
jnoortheen.nix-ide
|
||||
mkhl.direnv
|
||||
ms-python.python
|
||||
ms-vscode.makefile-tools
|
||||
ms-vscode-remote.remote-ssh
|
||||
njpwerner.autodocstring
|
||||
rust-lang.rust-analyzer
|
||||
tamasfe.even-better-toml
|
||||
vadimcn.vscode-lldb
|
||||
vscjava.vscode-java-test
|
||||
vscjava.vscode-java-dependency
|
||||
vscjava.vscode-java-debug
|
||||
wholroyd.jinja
|
||||
]
|
||||
++ (with pkgs.vscode-marketplace-release; [
|
||||
github.copilot
|
||||
github.copilot-chat
|
||||
]);
|
||||
userSettings = {
|
||||
"direnv.restart.automatic" = true;
|
||||
"direnv.path.executable" = (lib.getExe pkgs.direnv);
|
||||
"extensions.autoUpdate" = false;
|
||||
"extensions.experimental.affinity" = {
|
||||
"asvetliakov.vscode-neovim" = 1;
|
||||
};
|
||||
"git.openRepositoryInParentFolders" = "always";
|
||||
"github.copilot.enable" = {
|
||||
"*" = false;
|
||||
"plaintext" = false;
|
||||
"markdown" = false;
|
||||
"scminput" = false;
|
||||
};
|
||||
"search.exclude" = {
|
||||
"**/.tox" = true;
|
||||
};
|
||||
"terminal.integrated.defaultProfile.linux" = "tmux";
|
||||
"vscode-neovim.neovimInitVimPaths.darwin" = "~/.config/nvim/init.lua";
|
||||
"vscode-neovim.neovimInitVimPaths.linux" = "~/.config/nvim/init.lua";
|
||||
"workbench.settings.applyToAllProfiles" = [ "direnv.path.executable" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,100 +0,0 @@
|
||||
{ config, lib, ... }:
|
||||
|
||||
let
|
||||
cfg = config.programs.xonsh;
|
||||
|
||||
in
|
||||
with lib;
|
||||
{
|
||||
options = {
|
||||
programs.xonsh = {
|
||||
enable = mkEnableOption "Enable the xonsh program";
|
||||
|
||||
sessionVariables = mkOption {
|
||||
type = types.attrs;
|
||||
default = { };
|
||||
example = {
|
||||
XONSH_TRACE_SUBPROC = true;
|
||||
};
|
||||
description = ''
|
||||
Environment variables that will be set for the Xonsh session.
|
||||
'';
|
||||
};
|
||||
|
||||
aliases = mkOption {
|
||||
type = types.attrsOf types.str;
|
||||
default = { };
|
||||
example = literalExpression ''
|
||||
{
|
||||
ll = "ls -l";
|
||||
la = "ls -a";
|
||||
}
|
||||
'';
|
||||
description = ''
|
||||
An attribute set that maps aliases (the top level attribute names in
|
||||
this option) to command strings or directly to build outputs.
|
||||
'';
|
||||
};
|
||||
|
||||
configHeader = mkOption {
|
||||
type = types.lines;
|
||||
default = "";
|
||||
example = literalExpression ''
|
||||
import os
|
||||
import sys
|
||||
'';
|
||||
description = "An arbitrary string to put at the top of the config file";
|
||||
};
|
||||
|
||||
configFooter = mkOption {
|
||||
type = types.lines;
|
||||
default = "";
|
||||
example = literalExpression ''
|
||||
def _some_method(args):
|
||||
do_command()
|
||||
some_other_thing()
|
||||
aliases['some_method'] = _some_method
|
||||
'';
|
||||
description = "An arbitrary string to put at the end of the config file";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config =
|
||||
let
|
||||
shortAliases = concatStringsSep "\n" (mapAttrsToList (k: v: "aliases['${k}']=r'${v}'") cfg.aliases);
|
||||
|
||||
listToPythonList =
|
||||
let
|
||||
listInternals = args: concatStringsSep "\n" (map (v: "'${v}'") args);
|
||||
in
|
||||
list: "[${listInternals list}]";
|
||||
|
||||
sessionVars = concatStringsSep "\n" (
|
||||
mapAttrsToList (
|
||||
k: v:
|
||||
if builtins.typeOf v == "string" then
|
||||
"\$${k} = '${v}'"
|
||||
else if builtins.typeOf v == "list" then
|
||||
"\$${k} = ${listToPythonList}"
|
||||
else if builtins.typeOf v == "int" then
|
||||
"\$${k} = ${toString v}"
|
||||
else
|
||||
""
|
||||
) cfg.sessionVariables
|
||||
);
|
||||
|
||||
in
|
||||
mkIf cfg.enable {
|
||||
|
||||
home.file.".xonshrc".text = ''
|
||||
${cfg.configHeader}
|
||||
|
||||
${sessionVars}
|
||||
|
||||
${shortAliases}
|
||||
|
||||
${cfg.configFooter}
|
||||
'';
|
||||
};
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
cfg = config.greg.zed;
|
||||
in
|
||||
{
|
||||
options.greg.zed = lib.mkEnableOption "Whether to install the Zed editor";
|
||||
|
||||
config = lib.mkIf cfg {
|
||||
home.packages = with pkgs; [
|
||||
nil
|
||||
zed-editor
|
||||
];
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user