restructure config
This commit is contained in:
parent
1c6a1a4305
commit
ef0c9157f4
46 changed files with 656 additions and 716 deletions
278
system/servers/rhizome-vps/configuration.nix
Normal file
278
system/servers/rhizome-vps/configuration.nix
Normal file
|
@ -0,0 +1,278 @@
|
|||
# Edit this configuration file to define what should be installed on
|
||||
# your system. Help is available in the configuration.nix(5) man page
|
||||
# and in the NixOS manual (accessible by running `nixos-help`).
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
nix.settings.experimental-features = ["nix-command" "flakes"];
|
||||
nix.extraOptions = ''
|
||||
keep-outputs = true
|
||||
keep-derivations = true
|
||||
'';
|
||||
|
||||
environment.pathsToLink = ["/share/zsh"];
|
||||
programs.zsh.enable = true;
|
||||
users.defaultUserShell = pkgs.zsh;
|
||||
|
||||
users.users.felix = {
|
||||
isSystemUser = true;
|
||||
group = "www";
|
||||
extraGroups = ["docker"];
|
||||
};
|
||||
|
||||
users.users.spore = {
|
||||
isSystemUser = true;
|
||||
home = "/home/spore";
|
||||
createHome = true;
|
||||
useDefaultShell = true;
|
||||
group = "www";
|
||||
extraGroups = ["docker"];
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIL9VRcCnmjCyV7DpCm8ir3+xPTbyMDBJhgSkhpmdFL5d spore@server.rhizome.tf"
|
||||
];
|
||||
};
|
||||
|
||||
users.groups.www = {
|
||||
members = ["acme" "felix" "spore"];
|
||||
};
|
||||
|
||||
boot.loader.grub.enable = true;
|
||||
boot.loader.grub.device = "/dev/vda"; # or "nodev" for efi only
|
||||
|
||||
networking.hostName = "filament"; # Define your hostname.
|
||||
time.timeZone = "Australia/Sydney";
|
||||
|
||||
i18n.defaultLocale = "en_AU.UTF-8";
|
||||
|
||||
users.users.rhizome = {
|
||||
isNormalUser = true;
|
||||
extraGroups = ["wheel"]; # Enable ‘sudo’ for the user.
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDSQC8VgKLzoU5BSynJJuC8BFqAEN8JlSIzsZ2Vg9rfXHM7T4vbWtnxSCSbNw3CEnZCfrdDQTeRum7Uq+gvrcHWd9Aj+rVmubTdud70ybW7T7SlGv3b5TYBhMNbrAz0JIJjLnFMy3/pWids1v6mKW3i7k6Kbq8fSt7jva5Yg5x1jtkUUwvjSZjPg/E/Zl0hAcnx8fWe4foFTcYYsUbfEpp6bxdN2QuVmb17UKnLrMz6JTj88Jd2uYZkeKxGOwk+uwrd0WArY8JIiRi1NcPA3I42aAQfZKxCUY/xmVyRlF+l6K8caD4CZlysms9aXQzBhmPPDIY87AwyRlVK5JsRbaMEBMsffX2xk8DdV+2+9RbztgeXOoYk7WjJX1/+WcxY3RGn8QsUfrGALmrQTRGXgYRbtM/ZJq1m9aP6IvVQeKE1NOpKguXpmokB7JsyKPcWk/PCMVYyXM/qYspc6hRPJgGWiJsayj7myO6X5Ssl9uQnHpNNyrQNY+cx3/boBu2J1sM= bolt@quiver"
|
||||
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDW/YjnlHiEf2bV0RapVl+jWEtsNYrbXsaJJhXUkAaf61rsTZ2jpda7FmOVGjyJiOkTNYANoT83YhGxvKt3Ukcx5xG0JhcrilEGKfOR43/QLlXetCh4aFed//CXYNQo8obDovx9A8YamzfZWJo0nhshEAt1aDvNGlyPgHZI3r5vYNB6OpMlaSnr873i5hp6S9dxURoF0FjpdZwTWk5DiYUoZCezs6TfG6PzHbSsB88o4AUNZ6O+h1KD0lITSXH/v/M1zG8fkUzfZHFQoZ6VaIMhIVwLmbybvyb630IIfhx6KUoCWzCRlKBjVOGsQ1xZWEnjPgHB6atX5eNc/L8/bdyZOJ4aE2wSdVNMyriYuiyc3t/RwSvcRpfmzaxWUImDpjH3mxCrDymrZIQQTrNuC6o5O3mz3NCZRcFUZmuZXeYphyrzuNgAfsvHKMd8Fu+PdddSPCHkgYEIRuGD4flaujM8eUHZYqKkpmmiMwKk6jupBscN+1uwBqGQbaR0InXR+4c= custard"
|
||||
];
|
||||
};
|
||||
|
||||
users.users.ci = {
|
||||
isSystemUser = true;
|
||||
createHome = true;
|
||||
group = "ci";
|
||||
extraGroups = ["docker"];
|
||||
};
|
||||
|
||||
users.users.ci-agent = {
|
||||
isSystemUser = true;
|
||||
createHome = true;
|
||||
group = "ci";
|
||||
extraGroups = ["docker"];
|
||||
};
|
||||
|
||||
users.groups.ci = {};
|
||||
|
||||
virtualisation = {
|
||||
docker.enable = true;
|
||||
# podman = {
|
||||
# enable = true;
|
||||
# dockerCompat = true;
|
||||
# defaultNetwork.settings.dns_enabled = true;
|
||||
# };
|
||||
};
|
||||
|
||||
services.fail2ban.enable = true;
|
||||
|
||||
services.redis.servers."".enable = true;
|
||||
|
||||
services.gitea = {
|
||||
enable = true;
|
||||
appName = "rhizome gitea";
|
||||
domain = "git.rhizome.tf";
|
||||
httpPort = 3036;
|
||||
settings.server = {
|
||||
START_SSH_SERVER = true;
|
||||
SSH_PORT = 6660;
|
||||
SSH_DOMAIN = "git.rhizome.tf";
|
||||
DISABLE_SSH = false;
|
||||
};
|
||||
rootUrl = "https://git.rhizome.tf";
|
||||
settings.service.DISABLE_REGISTRATION = true;
|
||||
settings.webhook.ALLOWED_HOST_LIST = "external,loopback";
|
||||
};
|
||||
|
||||
# systemd.services.spore = {
|
||||
# wantedBy = [ "multi-user.target" ];
|
||||
# description = "Spore Deployment Tool";
|
||||
# serviceConfig = {
|
||||
# User = "spore";
|
||||
# Restart = "on-failure";
|
||||
# ExecStart = "${lib.getExe pkgs.spore}";
|
||||
|
||||
# };
|
||||
# };
|
||||
|
||||
systemd.services.grab-keys = {
|
||||
description = "Server Key Grabber";
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
User = "spore";
|
||||
Restart = "on-failure";
|
||||
ExecStart = "${pkgs.openssh}/bin/scp spore@server.rhizome.tf:/etc/letsencrypt/live/server.rhizome.tf/cert.pem /var/www/server.pem";
|
||||
};
|
||||
};
|
||||
|
||||
systemd.timers.grab-keys = {
|
||||
description = "Server Key Grabber";
|
||||
timerConfig = {
|
||||
Persistent = "yes";
|
||||
OnCalendar = "daily";
|
||||
Unit = "grab-keys.service";
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services.woodpecker-server = {
|
||||
wantedBy = ["multi-user.target"];
|
||||
description = "woodpecker CI/CD server";
|
||||
serviceConfig = {
|
||||
Environment = [
|
||||
"WOODPECKER_OPEN=true"
|
||||
"WOODPECKER_ADMIN=dbx"
|
||||
"WOODPECKER_REPO_OWNERS=rhizome"
|
||||
"WOODPECKER_HOST=https://ci.rhizome.tf"
|
||||
"WOODPECKER_GITEA=true"
|
||||
"WOODPECKER_GITEA_URL=https://git.rhizome.tf"
|
||||
"WOODPECKER_GITEA_CLIENT=86bb265b-8914-4abd-a3eb-f843fabbd79d"
|
||||
"WOODPECKER_GITEA_SECRET=gto_474i24aku3vda6wjbumdgfdcjdllclecfplfb4wsz2ibkemhdrwq"
|
||||
"WOODPECKER_GITEA_SKIP_VERIFY=true"
|
||||
"WOODPECKER_AGENT_SECRET=71a0ac7d617aef46fb93811c6e2a300e041a324727df12b4805d5f4e9e1f3326"
|
||||
"WOODPECKER_DATABASE_DATASOURCE=/var/lib/woodpecker/woodpecker.sqlite"
|
||||
];
|
||||
Restart = "on-failure";
|
||||
ExecStart = "${lib.getExe pkgs.woodpecker-server}";
|
||||
User = "ci";
|
||||
Group = "ci";
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services.woodpecker-agent = {
|
||||
wantedBy = ["multi-user.target"];
|
||||
description = "woodpecker CI/CD agent";
|
||||
serviceConfig = {
|
||||
Environment = [
|
||||
"WOODPECKER_AGENT_SECRET=71a0ac7d617aef46fb93811c6e2a300e041a324727df12b4805d5f4e9e1f3326"
|
||||
];
|
||||
Restart = "always";
|
||||
ExecStart = "${lib.getExe pkgs.woodpecker-agent}";
|
||||
User = "ci-agent";
|
||||
Group = "ci";
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services.felix = {
|
||||
wantedBy = ["multi-user.target"];
|
||||
description = "gilles on testing";
|
||||
serviceConfig = {
|
||||
ExecStart = ''${lib.getExe pkgs.docker} run --network host -v /var/lib/acme/rhizome.tf:/var/lib/acme/rhizome.tf --env-file /var/www/felix_env git.rhizome.tf/rhizome/gilles:latest'';
|
||||
Group = "www";
|
||||
User = "felix";
|
||||
Restart = "always";
|
||||
};
|
||||
};
|
||||
|
||||
services.caddy = {
|
||||
enable = true;
|
||||
virtualHosts = {
|
||||
"rhizome.tf".extraConfig = ''
|
||||
route /.well-known/acme-challenge/* {
|
||||
root * /var/www/acme-challenge
|
||||
file_server
|
||||
}
|
||||
root * /var/www/rhizome.tf
|
||||
file_server
|
||||
handle_errors {
|
||||
@404 {
|
||||
expression {http.error.status_code} == 404
|
||||
}
|
||||
rewrite @404 /404.html
|
||||
file_server
|
||||
}
|
||||
'';
|
||||
"git.rhizome.tf".extraConfig = ''
|
||||
reverse_proxy http://localhost:3036
|
||||
'';
|
||||
"ci.rhizome.tf".extraConfig = ''
|
||||
reverse_proxy http://localhost:8000
|
||||
'';
|
||||
};
|
||||
group = "www";
|
||||
};
|
||||
|
||||
# List packages installed in system profile. To search, run:
|
||||
# $ nix search wget
|
||||
environment.systemPackages = with pkgs; [
|
||||
kitty
|
||||
helix
|
||||
ripgrep
|
||||
fd
|
||||
exa
|
||||
bat
|
||||
nix-index
|
||||
comma
|
||||
alejandra
|
||||
curl
|
||||
cachix
|
||||
git
|
||||
man-pages
|
||||
man-pages-posix
|
||||
rnix-lsp
|
||||
zellij
|
||||
zoxide
|
||||
fzf
|
||||
btop
|
||||
];
|
||||
documentation.dev.enable = true;
|
||||
documentation.man.enable = true;
|
||||
documentation.enable = true;
|
||||
programs.nix-index-database.comma.enable = true;
|
||||
programs.nix-index.enableZshIntegration = false;
|
||||
programs.nix-index.enableBashIntegration = false;
|
||||
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
passwordAuthentication = false;
|
||||
kbdInteractiveAuthentication = false;
|
||||
permitRootLogin = "no";
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [22 80 443 5539 5559 6660];
|
||||
networking.firewall.allowedUDPPorts = [443 6660];
|
||||
|
||||
security.acme = {
|
||||
acceptTerms = true;
|
||||
defaults.email = "admin@rhizome.tf";
|
||||
defaults.group = "www";
|
||||
certs."rhizome.tf" = {
|
||||
webroot = "/var/www/acme-challenge";
|
||||
};
|
||||
};
|
||||
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
# on your system were taken. It's perfectly fine and recommended to leave
|
||||
# this value at the release version of the first install of this system.
|
||||
# Before changing this value read the documentation for this option
|
||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||
system.stateVersion = "23.05"; # Did you read the comment?
|
||||
|
||||
system.activationScripts = {
|
||||
acls.text = ''
|
||||
${pkgs.acl}/bin/setfacl -Rm spore:rx /var/lib/acme/rhizome.tf
|
||||
'';
|
||||
};
|
||||
}
|
125
system/servers/rhizome-vps/flake.lock
generated
Normal file
125
system/servers/rhizome-vps/flake.lock
generated
Normal file
|
@ -0,0 +1,125 @@
|
|||
{
|
||||
"nodes": {
|
||||
"flake-parts": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1688466019,
|
||||
"narHash": "sha256-VeM2akYrBYMsb4W/MmBo1zmaMfgbL4cH3Pu8PGyIwJ0=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "8e8d955c22df93dbe24f19ea04f47a74adbdc5ec",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils": {
|
||||
"inputs": {
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1689068808,
|
||||
"narHash": "sha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "919d646de7be200f3bf08cb76ae1f09402b6f9b4",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1687871164,
|
||||
"narHash": "sha256-bBFlPthuYX322xOlpJvkjUBz0C+MOBjZdDOOJJ+G2jU=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "07c347bb50994691d7b0095f45ebd8838cf6bc38",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"ref": "release-23.05",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nix-index-database": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1688874465,
|
||||
"narHash": "sha256-BUwl+tq40EjkufTZkqf3lWFzxOA/mYBTHz+p5uJtjaY=",
|
||||
"owner": "Mic92",
|
||||
"repo": "nix-index-database",
|
||||
"rev": "757114749d4613cf71f3748e780a1be8a67a5d3c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "Mic92",
|
||||
"repo": "nix-index-database",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1689326639,
|
||||
"narHash": "sha256-79zi0t83Dcc2dE0NuYZ+2hqtKXZN1yWVq5mtx8D2d7Y=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "9fdfaeb7b96f05e869f838c73cde8d98c640c649",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-23.05",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"flake-parts": "flake-parts",
|
||||
"flake-utils": "flake-utils",
|
||||
"home-manager": "home-manager",
|
||||
"nix-index-database": "nix-index-database",
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
53
system/servers/rhizome-vps/flake.nix
Normal file
53
system/servers/rhizome-vps/flake.nix
Normal file
|
@ -0,0 +1,53 @@
|
|||
{
|
||||
description = "rhizome dev server";
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05";
|
||||
|
||||
flake-parts = {
|
||||
url = "github:hercules-ci/flake-parts";
|
||||
inputs.nixpkgs-lib.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager/release-23.05";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
nix-index-database = {
|
||||
url = "github:Mic92/nix-index-database";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs = {
|
||||
self,
|
||||
nixpkgs,
|
||||
home-manager,
|
||||
nix-index-database,
|
||||
...
|
||||
} @ inputs: let
|
||||
inherit (self) outputs;
|
||||
forAllSystems = nixpkgs.lib.genAttrs [
|
||||
"x86_64-linux"
|
||||
];
|
||||
in rec {
|
||||
nixosConfigurations = {
|
||||
"filament" = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = {inherit inputs outputs;};
|
||||
modules = [
|
||||
./configuration.nix
|
||||
nix-index-database.nixosModules.nix-index
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.extraSpecialArgs = {inherit inputs outputs;};
|
||||
home-manager.users.rhizome.imports = [./rhizome.nix];
|
||||
} # hm
|
||||
]; # modules
|
||||
}; # filament
|
||||
};
|
||||
}; # rec
|
||||
}
|
34
system/servers/rhizome-vps/hardware-configuration.nix
Normal file
34
system/servers/rhizome-vps/hardware-configuration.nix
Normal file
|
@ -0,0 +1,34 @@
|
|||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
imports = [];
|
||||
|
||||
boot.initrd.availableKernelModules = ["ata_piix" "uhci_hcd" "virtio_pci" "sr_mod" "virtio_blk"];
|
||||
boot.initrd.kernelModules = [];
|
||||
boot.kernelModules = [];
|
||||
boot.extraModulePackages = [];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/f4889546-f71c-4e3c-ab47-e183a72dc52e";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
swapDevices = [];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
# still possible to use this option, but it's recommended to use it in conjunction
|
||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.ens3.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
virtualisation.hypervGuest.enable = true;
|
||||
}
|
130
system/servers/rhizome-vps/rhizome.nix
Normal file
130
system/servers/rhizome-vps/rhizome.nix
Normal file
|
@ -0,0 +1,130 @@
|
|||
{
|
||||
inputs,
|
||||
outputs,
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
home.packages = with pkgs; [
|
||||
lazygit
|
||||
alejandra
|
||||
];
|
||||
|
||||
home = {
|
||||
username = "rhizome";
|
||||
homeDirectory = "/home/rhizome";
|
||||
};
|
||||
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
nix-direnv = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userName = "rhizome";
|
||||
userEmail = "filament@rhizome.tf";
|
||||
};
|
||||
|
||||
programs.fzf = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
};
|
||||
|
||||
programs.helix = {
|
||||
enable = true;
|
||||
settings = {
|
||||
theme = "base16_terminal";
|
||||
editor.lsp.display-messages = true;
|
||||
};
|
||||
};
|
||||
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
enableAutosuggestions = true;
|
||||
enableCompletion = true;
|
||||
enableSyntaxHighlighting = true;
|
||||
enableVteIntegration = true;
|
||||
autocd = true;
|
||||
defaultKeymap = "viins";
|
||||
initExtra = ''
|
||||
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
|
||||
alias ...='cd ../..'
|
||||
alias ....='cd ../../..'
|
||||
alias .....='cd ../../../..'
|
||||
alias chmox='chmod +x'
|
||||
alias gs='git status'
|
||||
alias gcl='git clone'
|
||||
alias ga='git add'
|
||||
alias gcb='git checkout -b'
|
||||
alias gco='git checkout'
|
||||
alias gl='git pull'
|
||||
alias gp='git push'
|
||||
alias gd='git diff'
|
||||
alias gcam='git commit -am'
|
||||
alias gcm='git commit -m'
|
||||
alias gr='git restore'
|
||||
alias gm='git merge'
|
||||
alias l='exa -lh --group-directories-first --icons --color=always'
|
||||
alias la='exa -lha --group-directories-first --icons --color=always'
|
||||
eval "$(zoxide init zsh)"
|
||||
'';
|
||||
plugins = [
|
||||
{
|
||||
name = "powerlevel10k";
|
||||
src = pkgs.zsh-powerlevel10k;
|
||||
file = "share/zsh-powerlevel10k/powerlevel10k.zsh-theme";
|
||||
}
|
||||
{
|
||||
name = "zsh-vi-mode";
|
||||
src = pkgs.zsh-vi-mode;
|
||||
file = "share/zsh-vi-mode/zsh-vi-mode.zsh";
|
||||
}
|
||||
{
|
||||
name = "zsh-autopair";
|
||||
src = pkgs.zsh-autopair;
|
||||
file = "share/zsh-autopair/zsh-autopair.zsh";
|
||||
}
|
||||
{
|
||||
name = "zsh-completions";
|
||||
src = pkgs.zsh-completions;
|
||||
file = "share/zsh-completions/zsh-completions.zsh";
|
||||
}
|
||||
{
|
||||
name = "zsh-command-time";
|
||||
src = pkgs.zsh-command-time;
|
||||
file = "share/zsh-completions/zsh-command-time.zsh";
|
||||
}
|
||||
{
|
||||
name = "zsh-autocomplete";
|
||||
src = pkgs.zsh-autocomplete;
|
||||
file = "share/zsh-autocomplete/zsh-autocomplete.zsh";
|
||||
}
|
||||
{
|
||||
name = "zsh-fast-syntax-highlighting";
|
||||
src = pkgs.zsh-fast-syntax-highlighting;
|
||||
file = "share/zsh-fast-syntax-highlighting/zsh-fast-syntax-highlighting.zsh";
|
||||
}
|
||||
{
|
||||
name = "zsh-nix-shell";
|
||||
src = pkgs.zsh-nix-shell;
|
||||
file = "share/zsh-nix-shell/zsh-nix-shell.zsh";
|
||||
}
|
||||
{
|
||||
name = "any-nix-shell";
|
||||
src = pkgs.any-nix-shell;
|
||||
file = "share/any-nix-shell/any-nix-shell.zsh";
|
||||
}
|
||||
{
|
||||
name = "nix-zsh-completions";
|
||||
src = pkgs.nix-zsh-completions;
|
||||
file = "share/nix-zsh-completions/nix-zsh-completions.zsh";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
home.stateVersion = "23.05";
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue