mirror of
https://github.com/jbowdre/dotfiles.git
synced 2024-11-25 18:42:19 +00:00
Compare commits
3 commits
f853ed8e8f
...
2e628b7c4d
Author | SHA1 | Date | |
---|---|---|---|
2e628b7c4d | |||
242f6f6c42 | |||
083245002d |
5 changed files with 125 additions and 18 deletions
|
@ -23,11 +23,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1690271650,
|
"lastModified": 1690370995,
|
||||||
"narHash": "sha256-qwdsW8DBY1qH+9luliIH7VzgwvL+ZGI3LZWC0LTiDMI=",
|
"narHash": "sha256-9z//23jGegLJrf3ITStLwVf715O39dq5u48Kr/XW14U=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "6dc93f0daec55ee2f441da385aaf143863e3d671",
|
"rev": "f3fbbc36b4e179a5985b9ab12624e9dfe7989341",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
37
flake.nix
37
flake.nix
|
@ -2,12 +2,21 @@
|
||||||
description = "A Very Flakey Home Manager";
|
description = "A Very Flakey Home Manager";
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
|
# Nixpkgs
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05";
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05";
|
||||||
|
# You can access packages and modules from different nixpkgs revs
|
||||||
|
# at the same time. Here's a working example:
|
||||||
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
|
# Also see the 'unstable-packages' overlay at 'nix/overlays/default.nix'.
|
||||||
|
|
||||||
|
# Home manager
|
||||||
home-manager = {
|
home-manager = {
|
||||||
url = "github:nix-community/home-manager/release-23.05";
|
url = "github:nix-community/home-manager/release-23.05";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# TODO: Add any other flake you might need
|
||||||
|
# hardware.url = "github.com/nixos/nixos-hardware";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs, home-manager, ... }@inputs:
|
outputs = { self, nixpkgs, home-manager, ... }@inputs:
|
||||||
|
@ -19,29 +28,42 @@
|
||||||
];
|
];
|
||||||
in
|
in
|
||||||
rec {
|
rec {
|
||||||
|
# Your custom packages
|
||||||
|
# Accessible through 'nix build', 'nix shell', etc
|
||||||
packages = forAllSystems (system:
|
packages = forAllSystems (system:
|
||||||
let pkgs = nixpkgs.legacyPackages.${system};
|
let pkgs = nixpkgs.legacyPackages.${system};
|
||||||
in import ./nix/pkgs { inherit pkgs; }
|
in import ./nix/pkgs { inherit pkgs; }
|
||||||
);
|
);
|
||||||
|
# Devshell for bootstrapping
|
||||||
|
# Accessible through 'nix develop' or 'nix-shell' (legacy)
|
||||||
devShells = forAllSystems (system:
|
devShells = forAllSystems (system:
|
||||||
let pkgs = nixpkgs.legacyPackages.${system};
|
let pkgs = nixpkgs.legacyPackages.${system};
|
||||||
in import ./nix/shell.nix { inherit pkgs; }
|
in import ./nix/shell.nix { inherit pkgs; }
|
||||||
);
|
);
|
||||||
|
|
||||||
|
# Your custom packages and modifications, exported as overlays
|
||||||
overlays = import ./nix/overlays { inherit inputs; };
|
overlays = import ./nix/overlays { inherit inputs; };
|
||||||
|
# Reusable nixos modules you might want to export
|
||||||
|
# These are usually stuff you would upstream into nixpkgs
|
||||||
nixosModules = import ./nix/modules/nixos;
|
nixosModules = import ./nix/modules/nixos;
|
||||||
|
# Reusable home-manager modules you might want to export
|
||||||
|
# These are usually stuff you would upstream into home-manager
|
||||||
homeManagerModules = import ./nix/modules/home-manager;
|
homeManagerModules = import ./nix/modules/home-manager;
|
||||||
|
|
||||||
|
# NixOS configuration entrypoint
|
||||||
|
# Available through 'nixos-rebuild --flake .#your-hostname'
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
pixnix = nixpkgs.lib.nixosSystem {
|
pixnix = nixpkgs.lib.nixosSystem {
|
||||||
specialArgs = { inherit inputs outputs; };
|
specialArgs = { inherit inputs outputs; };
|
||||||
modules = [
|
modules = [
|
||||||
|
# > Our main nixos configuration file <
|
||||||
./nix/nixos/configuration.nix
|
./nix/nixos/configuration.nix
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Standalone home-manager configuration entrypoint
|
||||||
|
# Available through 'home-manager --flake .#your-username@your-hostname'
|
||||||
homeConfigurations = {
|
homeConfigurations = {
|
||||||
"john@penguin-fw" = home-manager.lib.homeManagerConfiguration {
|
"john@penguin-fw" = home-manager.lib.homeManagerConfiguration {
|
||||||
pkgs = nixpkgs.legacyPackages.x86_64-linux;
|
pkgs = nixpkgs.legacyPackages.x86_64-linux;
|
||||||
|
@ -56,6 +78,19 @@
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
"john@penguin-duet" = home-manager.lib.homeManagerConfiguration {
|
||||||
|
pkgs = nixpkgs.legacyPackages.aarch64-linux;
|
||||||
|
extraSpecialArgs = { inherit inputs outputs; };
|
||||||
|
modules = [
|
||||||
|
./nix/home/penguin-duet.nix
|
||||||
|
{
|
||||||
|
home = {
|
||||||
|
username = "john";
|
||||||
|
homeDirectory = "/home/john";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
|
@ -35,11 +35,10 @@
|
||||||
programs = {
|
programs = {
|
||||||
home-manager.enable = true;
|
home-manager.enable = true;
|
||||||
|
|
||||||
# direnv = {
|
direnv = {
|
||||||
# enable = lib.mkDefault true;
|
enable = lib.mkDefault true;
|
||||||
# # enableFishIntegration = true;
|
nix-direnv.enable = true;
|
||||||
# nix-direnv.enable = true;
|
};
|
||||||
# };
|
|
||||||
|
|
||||||
fish = {
|
fish = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{ pkgs, lib, config, ... }: {
|
{ pkgs, lib, config, ... }: {
|
||||||
imports = [
|
imports = [
|
||||||
./common.nix
|
./common.nix
|
||||||
../lib/vscode.nix
|
../lib/vscode.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
nixpkgs.config = {
|
nixpkgs.config = {
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
{ pkgs, lib, ... }: {
|
{ outputs, pkgs, lib, ... }: {
|
||||||
|
|
||||||
nixpkgs.config = {
|
nixpkgs = {
|
||||||
allowUnfree = true;
|
config = {
|
||||||
allowUnfreePredicate = (_: true);
|
allowUnfree = true;
|
||||||
|
allowUnfreePredicate = (_: true);
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.vscode = {
|
programs.vscode = {
|
||||||
|
@ -22,24 +24,96 @@
|
||||||
vscodevim.vim
|
vscodevim.vim
|
||||||
yzhang.markdown-all-in-one
|
yzhang.markdown-all-in-one
|
||||||
];
|
];
|
||||||
|
keybindings = [
|
||||||
|
{
|
||||||
|
key = "backspace";
|
||||||
|
command = "-markdown.extension.onBackspaceKey";
|
||||||
|
when = "editorTextFocus && !editorHasMultipleSelections && !editorReadonly && !markdown.extension.editor.cursor.inFencedCodeBlock && !markdown.extension.editor.cursor.inMathEnv && !suggestWidgetVisible && vim.mode != 'CommandlineInProgress' && vim.mode != 'EasyMotionInputMode' && vim.mode != 'EasyMotionMode' && vim.mode != 'Normal' && vim.mode != 'Replace' && vim.mode != 'SearchInProgressMode' && vim.mode != 'SurroundInputMode' && vim.mode != 'Visual' && vim.mode != 'VisualBlock' && vim.mode != 'VisualLine' && editorLangId =~ /^markdown$|^rmd$|^quarto$/";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "ctrl+shift+alt+down";
|
||||||
|
command = "-markdown.extension.onCopyLineDown";
|
||||||
|
when = "editorTextFocus && !editorReadonly && !suggestWidgetVisible && editorLangId =~ /^markdown$|^rmd$|^quarto$/";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "ctrl+shift+alt+up";
|
||||||
|
command = "-markdown.extension.onCopyLineUp";
|
||||||
|
when = "editorTextFocus && !editorReadonly && !suggestWidgetVisible && editorLangId =~ /^markdown$|^rmd$|^quarto$/";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "ctrl+enter";
|
||||||
|
command = "-markdown.extension.onCtrlEnterKey";
|
||||||
|
when = "editorTextFocus && !editorHasMultipleSelections && !editorReadonly && !markdown.extension.editor.cursor.inFencedCodeBlock && !markdown.extension.editor.cursor.inMathEnv && !suggestWidgetVisible && editorLangId =~ /^markdown$|^rmd$|^quarto$/";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "enter";
|
||||||
|
command = "-markdown.extension.onEnterKey";
|
||||||
|
when = "editorTextFocus && !editorHasMultipleSelections && !editorReadonly && !markdown.extension.editor.cursor.inFencedCodeBlock && !markdown.extension.editor.cursor.inMathEnv && !suggestWidgetVisible && vim.mode != 'CommandlineInProgress' && vim.mode != 'EasyMotionInputMode' && vim.mode != 'EasyMotionMode' && vim.mode != 'Normal' && vim.mode != 'Replace' && vim.mode != 'SearchInProgressMode' && vim.mode != 'SurroundInputMode' && vim.mode != 'Visual' && vim.mode != 'VisualBlock' && vim.mode != 'VisualLine' && editorLangId =~ /^markdown$|^rmd$|^quarto$/";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "ctrl+]";
|
||||||
|
command = "-markdown.extension.onIndentLines";
|
||||||
|
when = "editorTextFocus && !suggestWidgetVisible && editorLangId =~ /^markdown$|^rmd$|^quarto$/";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "alt+down";
|
||||||
|
command = "-markdown.extension.onMoveLineDown";
|
||||||
|
when = "editorTextFocus && !editorReadonly && !suggestWidgetVisible && editorLangId =~ /^markdown$|^rmd$|^quarto$/";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "alt+up";
|
||||||
|
command = "-markdown.extension.onMoveLineUp";
|
||||||
|
when = "editorTextFocus && !editorReadonly && !suggestWidgetVisible && editorLangId =~ /^markdown$|^rmd$|^quarto$/";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "ctrl+[";
|
||||||
|
command = "-markdown.extension.onOutdentLines";
|
||||||
|
when = "editorTextFocus && !suggestWidgetVisible && editorLangId =~ /^markdown$|^rmd$|^quarto$/";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "shift+enter";
|
||||||
|
command = "-markdown.extension.onShiftEnterKey";
|
||||||
|
when = "editorTextFocus && !editorHasMultipleSelections && !editorReadonly && !markdown.extension.editor.cursor.inFencedCodeBlock && !markdown.extension.editor.cursor.inMathEnv && !suggestWidgetVisible && editorLangId =~ /^markdown$|^rmd$|^quarto$/";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "shift+tab";
|
||||||
|
command = "-markdown.extension.onShiftTabKey";
|
||||||
|
when = "editorTextFocus && markdown.extension.editor.cursor.inList && !editorHasMultipleSelections && !editorReadonly && !editorTabMovesFocus && !hasOtherSuggestions && !hasSnippetCompletions && !inSnippetMode && !markdown.extension.editor.cursor.inFencedCodeBlock && !markdown.extension.editor.cursor.inMathEnv && !suggestWidgetVisible && editorLangId =~ /^markdown$|^rmd$|^quarto$/";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "tab";
|
||||||
|
command = "-markdown.extension.onTabKey";
|
||||||
|
when = "editorTextFocus && markdown.extension.editor.cursor.inList && !editorHasMultipleSelections && !editorReadonly && !editorTabMovesFocus && !hasOtherSuggestions && !hasSnippetCompletions && !inSnippetMode && !inlineSuggestionVisible && !markdown.extension.editor.cursor.inFencedCodeBlock && !markdown.extension.editor.cursor.inMathEnv && !suggestWidgetVisible && editorLangId =~ /^markdown$|^rmd$|^quarto$/";
|
||||||
|
}
|
||||||
|
];
|
||||||
userSettings = {
|
userSettings = {
|
||||||
"diffEditor.ignoreTrimWhitespace" = false;
|
"diffEditor.ignoreTrimWhitespace" = false;
|
||||||
"editor.acceptSuggestionOnCommitCharacter" = false;
|
"editor.acceptSuggestionOnCommitCharacter" = false;
|
||||||
"editor.acceptSuggestionOnEnter" = "off";
|
"editor.acceptSuggestionOnEnter" = "off";
|
||||||
|
"editor.detectIndentation" = false;
|
||||||
|
"editor.inlineSuggest.enabled" = true;
|
||||||
"editor.lineNumbers" = "relative";
|
"editor.lineNumbers" = "relative";
|
||||||
"editor.renderControlCharacters" = true;
|
"editor.renderControlCharacters" = true;
|
||||||
"editor.renderWhitespace" = "boundary";
|
"editor.renderWhitespace" = "all";
|
||||||
"editor.tabCompletion" = "off";
|
"editor.tabCompletion" = "off";
|
||||||
"editor.tabSize" = 2;
|
"editor.tabSize" = 2;
|
||||||
"explorer.confirmDragAndDrop" = false;
|
"explorer.confirmDragAndDrop" = false;
|
||||||
"files.hotExit" = "onExitAndWindowClose";
|
"files.hotExit" = "onExitAndWindowClose";
|
||||||
|
"files.trimTrailingWhitespace" = true;
|
||||||
"git.confirmSync" = false;
|
"git.confirmSync" = false;
|
||||||
"git.ignoreLegacyWarning" = true;
|
"git.ignoreLegacyWarning" = true;
|
||||||
|
"github.copilot.enable" = {
|
||||||
|
"*" = true;
|
||||||
|
"plaintext" = true;
|
||||||
|
"markdown" = true;
|
||||||
|
"scminput" = false;
|
||||||
|
"yaml" = true;
|
||||||
|
};
|
||||||
"powershell.codeFormatting.useCorrectCasing" = true;
|
"powershell.codeFormatting.useCorrectCasing" = true;
|
||||||
"security.workspace.trust.untrustedFiles" = "open";
|
"security.workspace.trust.untrustedFiles" = "open";
|
||||||
"vim.statusBarColorControl" = true;
|
"vim.statusBarColorControl" = true;
|
||||||
"vim.useCtrlKeys" = false;
|
"vim.useCtrlKeys" = false;
|
||||||
"window.restoreWindows" = "all";
|
"window.restoreWindows" = "none";
|
||||||
"workbench.startupEditor" = "none";
|
"workbench.startupEditor" = "none";
|
||||||
"workbench.colorCustomizations" = {
|
"workbench.colorCustomizations" = {
|
||||||
"statusBar.background" = "#005f5f";
|
"statusBar.background" = "#005f5f";
|
||||||
|
@ -55,6 +129,5 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
services.gnome-keyring.enable = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue