Compare commits
4 Commits
6cc6bd37cc
...
988781de9c
Author | SHA1 | Date | |
---|---|---|---|
988781de9c | |||
216e662dbd | |||
99232cfe9f | |||
bee806ee9b |
38
flake.lock
38
flake.lock
|
@ -1,20 +1,5 @@
|
|||
{
|
||||
"nodes": {
|
||||
"flake-utils": {
|
||||
"locked": {
|
||||
"lastModified": 1667395993,
|
||||
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
|
@ -36,28 +21,6 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"julia2nix": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1669700922,
|
||||
"narHash": "sha256-CSco+BtoWn/O7IJepELzIepmmpXxoR225TVCjMRQzew=",
|
||||
"owner": "codedownio",
|
||||
"repo": "julia2nix",
|
||||
"rev": "3d326d4e3fa6aa026f4e7568327b3fa007ab8cb6",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "codedownio",
|
||||
"ref": "v1.0.0",
|
||||
"repo": "julia2nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1693428224,
|
||||
|
@ -77,7 +40,6 @@
|
|||
"root": {
|
||||
"inputs": {
|
||||
"home-manager": "home-manager",
|
||||
"julia2nix": "julia2nix",
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,11 +6,9 @@
|
|||
nixpkgs.url = "github:NixOs/nixpkgs/nixos-23.05";
|
||||
home-manager.url = "github:nix-community/home-manager/release-23.05";
|
||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||
julia2nix.url = "github:codedownio/julia2nix/v1.0.0";
|
||||
julia2nix.inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, home-manager, julia2nix }: {
|
||||
outputs = { self, nixpkgs, home-manager }: {
|
||||
|
||||
nixosConfigurations.lambda = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
|
@ -25,10 +23,7 @@
|
|||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
users.rachel = import ./home/rachel.nix {
|
||||
inherit pkgs;
|
||||
julia2nix = julia2nix.packages."x86_64-linux".default;
|
||||
} ;
|
||||
users.rachel = import ./home/rachel.nix;
|
||||
};
|
||||
})
|
||||
];
|
||||
|
|
121
home/rachel.nix
121
home/rachel.nix
|
@ -1,4 +1,4 @@
|
|||
{ pkgs, julia2nix, ... }:
|
||||
{ pkgs, ... }:
|
||||
let username = "rachel";
|
||||
homeDir = "/home/${username}";
|
||||
SAX2 = pkgs.fetchurl {
|
||||
|
@ -35,7 +35,6 @@ in
|
|||
arp-scan
|
||||
acpi
|
||||
julia-bin
|
||||
julia2nix
|
||||
python3
|
||||
ghc
|
||||
firefox
|
||||
|
@ -79,6 +78,7 @@ in
|
|||
steam-run
|
||||
rmapi
|
||||
lutris
|
||||
texlive.combined.scheme-full
|
||||
];
|
||||
stateVersion = "23.05";
|
||||
};
|
||||
|
@ -109,7 +109,6 @@ in
|
|||
XAUTHORITY = "${homeDir}/.local/share/Xauthority";
|
||||
PASH_KEYID = "3E4A909C8FEF6E3783699C79DFC26EF8EDAD6D71";
|
||||
QT_AUTO_SCREEN_FACTOR = 1;
|
||||
EDITOR = "emacsclient";
|
||||
PATH = "${homeDir}/bin:$PATH";
|
||||
};
|
||||
shellAliases = {
|
||||
|
@ -142,6 +141,7 @@ in
|
|||
package = pkgs.emacs-gtk;
|
||||
extraPackages = epkgs: with epkgs; with melpaStablePackages; [
|
||||
nix-mode
|
||||
rust-mode
|
||||
pdf-tools
|
||||
dune
|
||||
tuareg
|
||||
|
@ -176,5 +176,120 @@ in
|
|||
init.defaultBranch = "master";
|
||||
};
|
||||
};
|
||||
|
||||
neovim = {
|
||||
defaultEditor = true;
|
||||
enable = true;
|
||||
vimAlias = true;
|
||||
extraLuaConfig = ''
|
||||
require("tmux").setup({ copy_sync = { redirect_to_clipboard = true } });
|
||||
'';
|
||||
extraConfig = ''
|
||||
set rnu nu
|
||||
set ts=2 sw=2 expandtab
|
||||
set clipboard=unnamedplus
|
||||
set laststatus=2 noshowmode
|
||||
let g:lightline = { 'colorscheme': 'gruvbox' }
|
||||
colorscheme gruvbox
|
||||
hi Normal guibg=NONE ctermbg=NONE
|
||||
'';
|
||||
plugins = with pkgs.vimPlugins; [
|
||||
surround-nvim
|
||||
comment-nvim
|
||||
vimtex
|
||||
gruvbox-nvim
|
||||
lightline-vim
|
||||
lightline-gruvbox-vim
|
||||
tmux-nvim
|
||||
];
|
||||
};
|
||||
|
||||
tmux = {
|
||||
enable = true;
|
||||
clock24 = true;
|
||||
escapeTime = 0;
|
||||
keyMode = "vi";
|
||||
mouse = false;
|
||||
shortcut = "a";
|
||||
extraConfig = ''
|
||||
bind h split -hb -c '#{pane_current_path}'
|
||||
bind j split -v -c '#{pane_current_path}'
|
||||
bind k split -vb -c '#{pane_current_path}'
|
||||
bind l split -h -c '#{pane_current_path}'
|
||||
|
||||
is_vim="ps -o state= -o comm= -t '#{pane_tty}' | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?\.?(view|n?vim?x?)(-wrapped)?(diff)?$'"
|
||||
|
||||
bind-key -n 'C-h' if-shell "$is_vim" 'send-keys C-h' 'select-pane -L'
|
||||
bind-key -n 'C-j' if-shell "$is_vim" 'send-keys C-j' 'select-pane -D'
|
||||
bind-key -n 'C-k' if-shell "$is_vim" 'send-keys C-k' 'select-pane -U'
|
||||
bind-key -n 'C-l' if-shell "$is_vim" 'send-keys C-l' 'select-pane -R'
|
||||
|
||||
bind-key -T copy-mode-vi 'C-h' select-pane -L
|
||||
bind-key -T copy-mode-vi 'C-j' select-pane -D
|
||||
bind-key -T copy-mode-vi 'C-k' select-pane -U
|
||||
bind-key -T copy-mode-vi 'C-l' select-pane -R
|
||||
|
||||
bind -n 'M-h' if-shell "$is_vim" 'send-keys M-h' 'resize-pane -L 1'
|
||||
bind -n 'M-j' if-shell "$is_vim" 'send-keys M-j' 'resize-pane -D 1'
|
||||
bind -n 'M-k' if-shell "$is_vim" 'send-keys M-k' 'resize-pane -U 1'
|
||||
bind -n 'M-l' if-shell "$is_vim" 'send-keys M-l' 'resize-pane -R 1'
|
||||
|
||||
bind-key -T copy-mode-vi M-h resize-pane -L 1
|
||||
bind-key -T copy-mode-vi M-j resize-pane -D 1
|
||||
bind-key -T copy-mode-vi M-k resize-pane -U 1
|
||||
bind-key -T copy-mode-vi M-l resize-pane -R 1
|
||||
|
||||
set-option -g status on
|
||||
set-option -g status-style bg=default
|
||||
set-option -g status-style fg="#FF7F50"
|
||||
set-option -g status-interval 2
|
||||
set-option -g status-justify "centre"
|
||||
set-option -g status-right " λ "
|
||||
|
||||
set -g status-interval 1
|
||||
set-window-option -g window-status-separator "-"
|
||||
set-window-option -g window-status-current-format " #[fg=#df73ff bold]!![ #{b:pane_current_path}/ ] #{b:window_index} $ #{b:pane_current_command}!! "
|
||||
set-window-option -g window-status-format " #{b:window_index} [ #{b:pane_current_path}/ ] #{b:pane_current_command} "
|
||||
'';
|
||||
};
|
||||
|
||||
alacritty = {
|
||||
enable = true;
|
||||
settings = {
|
||||
window = {
|
||||
padding.x = 5;
|
||||
padding.y = 5;
|
||||
decoration = "none";
|
||||
};
|
||||
dynamic_title = false;
|
||||
mouse_hide_when_typing = true;
|
||||
draw_bold_text_with_bright_colors = false;
|
||||
scrolling.history = 0;
|
||||
font = {
|
||||
normal.family = "SAX2";
|
||||
size = 11;
|
||||
};
|
||||
shell.program =
|
||||
let tmux-menu = pkgs.writeScript "tmux-menu" ''
|
||||
s="$(tmux ls 2>/dev/null)"
|
||||
[ "$s" ] && s="$s
|
||||
"
|
||||
c=$(${pkgs.fzf}/bin/fzf -1 <<-EOF
|
||||
''${s}New Session
|
||||
Raw Shell
|
||||
EOF
|
||||
) || exit
|
||||
case "$c" in
|
||||
"New Session")
|
||||
read -p "Name? " -r n
|
||||
${pkgs.tmux}/bin/tmux new -s "$n" ;;
|
||||
"Raw Shell")
|
||||
${pkgs.bash}/bin/bash ;;
|
||||
*)
|
||||
${pkgs.tmux}/bin/tmux attach-session -t "''${c%%:*}" ;;
|
||||
esac
|
||||
''; in "${tmux-menu}";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user