mirror of
https://github.com/cupcakearmy/nix-cli.git
synced 2024-12-22 16:26:31 +00:00
Compare commits
No commits in common. "7ef9a0000d17136ffac14fe162311466eb4219e8" and "08e860823b5a20349080923f89e2f7b1acac0ee7" have entirely different histories.
7ef9a0000d
...
08e860823b
18
README.md
18
README.md
@ -5,24 +5,6 @@ Nix setup for server
|
||||
## Install
|
||||
|
||||
```bash
|
||||
# First time install
|
||||
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install --determinate
|
||||
|
||||
# Install / Update
|
||||
nix run home-manager -- switch --flake github:cupcakearmy/nix-cli#root -b bkp
|
||||
```
|
||||
|
||||
## Update
|
||||
|
||||
This can be run on any machine. Just update and then just rerun on the targets
|
||||
|
||||
```bash
|
||||
nix flake update
|
||||
|
||||
# To test
|
||||
nix run home-manager -- build --flake .#root
|
||||
```
|
||||
|
||||
```
|
||||
|
||||
```
|
||||
|
12
flake.lock
generated
12
flake.lock
generated
@ -7,11 +7,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1734344598,
|
||||
"narHash": "sha256-wNX3hsScqDdqKWOO87wETUEi7a/QlPVgpC/Lh5rFOuA=",
|
||||
"lastModified": 1731235328,
|
||||
"narHash": "sha256-NjavpgE9/bMe/ABvZpyHIUeYF1mqR5lhaep3wB79ucs=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "83ecd50915a09dca928971139d3a102377a8d242",
|
||||
"rev": "60bb110917844d354f3c18e05450606a435d2d10",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -22,11 +22,11 @@
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1734424634,
|
||||
"narHash": "sha256-cHar1vqHOOyC7f1+tVycPoWTfKIaqkoe1Q6TnKzuti4=",
|
||||
"lastModified": 1731139594,
|
||||
"narHash": "sha256-IigrKK3vYRpUu+HEjPL/phrfh7Ox881er1UEsZvw9Q4=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "d3c42f187194c26d9f0309a8ecc469d6c878ce33",
|
||||
"rev": "76612b17c0ce71689921ca12d9ffdc9c23ce40b2",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
117
home.nix
117
home.nix
@ -1,74 +1,73 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
home.username = "root";
|
||||
home.homeDirectory = "/root";
|
||||
home.username = "root";
|
||||
home.homeDirectory = "/root";
|
||||
|
||||
#
|
||||
# You should not change this value, even if you update Home Manager. If you do
|
||||
# want to update the value, then make sure to first check the Home Manager
|
||||
# release notes.
|
||||
home.stateVersion = "24.05"; # Please read the comment before changing.
|
||||
#
|
||||
# You should not change this value, even if you update Home Manager. If you do
|
||||
# want to update the value, then make sure to first check the Home Manager
|
||||
# release notes.
|
||||
home.stateVersion = "24.05"; # Please read the comment before changing.
|
||||
|
||||
home.packages = [
|
||||
pkgs.neovim
|
||||
pkgs.tmux
|
||||
pkgs.oh-my-posh
|
||||
home.packages = [
|
||||
pkgs.neovim
|
||||
pkgs.tmux
|
||||
pkgs.oh-my-posh
|
||||
|
||||
pkgs.git
|
||||
pkgs.gnutar
|
||||
pkgs.btop
|
||||
pkgs.git
|
||||
pkgs.gnutar
|
||||
|
||||
pkgs.nerd-fonts.jetbrains-mono
|
||||
(pkgs.nerdfonts.override { fonts = [ "JetBrainsMono" ]; })
|
||||
|
||||
];
|
||||
];
|
||||
|
||||
home.file = {
|
||||
".config/omp/config.yaml".source = ./files/omp/config.yaml;
|
||||
};
|
||||
home.file = {
|
||||
".config/omp/config.yaml".source= ./files/omp/config.yaml;
|
||||
};
|
||||
|
||||
home.sessionVariables = {
|
||||
EDITOR = "nvim";
|
||||
};
|
||||
home.sessionVariables = {
|
||||
EDITOR = "nvim";
|
||||
};
|
||||
|
||||
programs.home-manager.enable = true;
|
||||
programs.home-manager.enable = true;
|
||||
|
||||
home.shellAliases = {
|
||||
l = "ls -hal";
|
||||
dc = "docker compose";
|
||||
rsync = "rsync -az --info=progress2";
|
||||
t = "tmux new-session -A -s main";
|
||||
e = "nvim";
|
||||
hms = "home-manager switch --flake ~/nix#root -b backup";
|
||||
};
|
||||
home.shellAliases = {
|
||||
l="ls -hal";
|
||||
dc="docker compose";
|
||||
rsync="rsync -az --info=progress2";
|
||||
t="tmux new-session -A -s main";
|
||||
e="nvim";
|
||||
hms="home-manager switch --flake ~/nix#root -b backup";
|
||||
};
|
||||
|
||||
programs.fish = {
|
||||
enable = true;
|
||||
shellInit = ''
|
||||
oh-my-posh init fish --config ~/.config/omp/config.yaml | source
|
||||
'';
|
||||
};
|
||||
programs.bash = {
|
||||
enable = true;
|
||||
};
|
||||
programs.tmux = {
|
||||
enable = true;
|
||||
clock24 = true;
|
||||
mouse = true;
|
||||
extraConfig = ''
|
||||
# switch panes using Alt-arrow without prefix
|
||||
bind -n M-Left select-pane -L
|
||||
bind -n M-Right select-pane -R
|
||||
bind -n M-Up select-pane -U
|
||||
bind -n M-Down select-pane -D
|
||||
programs.fish = {
|
||||
enable=true;
|
||||
shellInit=''
|
||||
oh-my-posh init fish --config ~/.config/omp/config.yaml | source
|
||||
'';
|
||||
};
|
||||
programs.bash = {
|
||||
enable=true;
|
||||
};
|
||||
programs.tmux = {
|
||||
enable=true;
|
||||
clock24=true;
|
||||
mouse=true;
|
||||
extraConfig= ''
|
||||
# switch panes using Alt-arrow without prefix
|
||||
bind -n M-Left select-pane -L
|
||||
bind -n M-Right select-pane -R
|
||||
bind -n M-Up select-pane -U
|
||||
bind -n M-Down select-pane -D
|
||||
|
||||
# switch panes using jkhl
|
||||
bind h select-pane -L
|
||||
bind l select-pane -R
|
||||
bind j select-pane -U
|
||||
bind k select-pane -D
|
||||
'';
|
||||
shell = "${pkgs.fish}/bin/fish";
|
||||
terminal = "tmux-256color";
|
||||
};
|
||||
# switch panes using jkhl
|
||||
bind h select-pane -L
|
||||
bind l select-pane -R
|
||||
bind j select-pane -U
|
||||
bind k select-pane -D
|
||||
'';
|
||||
shell = "${pkgs.fish}/bin/fish";
|
||||
terminal = "tmux-256color";
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user