Misc tidying, set zsh as default shell for root user

This commit is contained in:
Evie Litherland-Smith 2023-06-03 07:46:37 +01:00
parent 2a628143bd
commit 055b557c33
7 changed files with 32 additions and 69 deletions

View file

@ -24,7 +24,7 @@
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAII1tJFdbiyJApuVZFvo9E9kjlBwvXZeySqVuS2qGdxha tux@monarch" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAII1tJFdbiyJApuVZFvo9E9kjlBwvXZeySqVuS2qGdxha tux@monarch"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINI1dWlS16Keil0MGPWmMsBzx8F9ylfz+fRwxUr8/tZ/ ion" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINI1dWlS16Keil0MGPWmMsBzx8F9ylfz+fRwxUr8/tZ/ ion"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGAcvAQ8W71Bn8pdMYst1hoVCmVJ+0h4HBlJzu1C6dwy xenia@Northstar" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGAcvAQ8W71Bn8pdMYst1hoVCmVJ+0h4HBlJzu1C6dwy xenia@Northstar"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDI44C35I2x9tqzeZDmIpbzmGJWXfATn/Wp5KzVRdlCi root@debian" # "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDI44C35I2x9tqzeZDmIpbzmGJWXfATn/Wp5KzVRdlCi root@debian"
]; ];
}; };
home-manager.users.xenia = import ./home/Vanguard/xenia.nix; home-manager.users.xenia = import ./home/Vanguard/xenia.nix;

View file

@ -1,55 +1,31 @@
{pkgs, ...}: { {...}: {
nix.settings.experimental-features = ["nix-command" "flakes"]; nix = {
# Allow unfree packages settings.experimental-features = ["nix-command" "flakes"];
gc = {
automatic = true;
dates = "daily";
options = "--delete-older-than 7d";
};
extraOptions = ''
keep-outputs = true
keep-derivations = true
'';
};
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
home-manager = {
# Home manager integration with NixOS useUserPackages = false;
home-manager.useUserPackages = false; useGlobalPkgs = true;
home-manager.useGlobalPkgs = true; };
# Enable networking
networking.networkmanager.enable = true; networking.networkmanager.enable = true;
services = {
# Enable power-profiles power-profiles-daemon.enable = true;
services.power-profiles-daemon.enable = true; flatpak.enable = true;
};
services.flatpak.enable = true;
virtualisation.podman.enable = true; virtualisation.podman.enable = true;
programs.nix-ld = {
enable = true;
libraries = with pkgs; [
stdenv.cc.cc
zlib
fuse3
icu
openssl
curl
expat
];
};
fonts.fontconfig.enable = true; fonts.fontconfig.enable = true;
programs.ssh.startAgent = true; programs = {
programs.fish.enable = true; ssh.startAgent = true;
programs.zsh = { fish.enable = true;
enable = true; zsh.enable = true;
enableCompletion = true;
autosuggestions = {
enable = true;
};
syntaxHighlighting = {
enable = true;
};
}; };
nix.gc = {
automatic = true;
dates = "daily";
options = "--delete-older-than 7d";
};
nix.extraOptions = ''
keep-outputs = true
keep-derivations = true
'';
} }

View file

@ -1,9 +1,10 @@
{...}: let {pkgs, ...}: let
home-manager = builtins.fetchTarball "https://github.com/nix-community/home-manager/archive/master.tar.gz"; home-manager = builtins.fetchTarball "https://github.com/nix-community/home-manager/archive/master.tar.gz";
in { in {
imports = [(import "${home-manager}/nixos")]; imports = [(import "${home-manager}/nixos")];
users.users.root.shell = pkgs.zsh;
home-manager.users.root = { home-manager.users.root = {
imports = [./env ./ssh ./git]; imports = [./env/readline.nix ./env/starship.nix ./env/zsh.nix];
home.username = "root"; home.username = "root";
home.homeDirectory = "/root"; home.homeDirectory = "/root";
home.stateVersion = "22.11"; home.stateVersion = "22.11";

8
home/env/bash.nix vendored
View file

@ -1,11 +1,5 @@
{...}: { {...}: {
programs.bash = { programs.bash.enable = true;
enable = true;
shellAliases = {
lg = "lazygit";
nixos-update = "sudo git -C /etc/nixos/config pull && sudo nixos-rebuild switch";
};
};
programs.keychain.enableBashIntegration = true; programs.keychain.enableBashIntegration = true;
programs.starship.enableBashIntegration = true; programs.starship.enableBashIntegration = true;
} }

5
home/env/fish.nix vendored
View file

@ -1,10 +1,7 @@
{pkgs, ...}: { {pkgs, ...}: {
programs.fish = { programs.fish = {
enable = true; enable = true;
shellAbbrs = { shellAbbrs = {lg = "lazygit";};
lg = "lazygit";
nixos-update = "sudo git -C /etc/nixos/config pull && sudo nixos-rebuild switch";
};
plugins = [ plugins = [
{ {
name = "tokyonight"; name = "tokyonight";

View file

@ -1,7 +1,7 @@
{...}: { {...}: {
programs.keychain = { programs.keychain = {
enable = true; enable = true;
extraFlags = ["--quiet" "--noask" "--ignore-missing"]; extraFlags = ["--quiet" "--ignore-missing"];
keys = ["id_rsa" "id_ed25519"]; keys = ["id_rsa" "id_ed25519"];
enableXsessionIntegration = true; enableXsessionIntegration = true;
}; };

5
home/env/zsh.nix vendored
View file

@ -8,11 +8,6 @@
autocd = true; autocd = true;
dotDir = ".config/zsh"; dotDir = ".config/zsh";
historySubstringSearch.enable = true; historySubstringSearch.enable = true;
shellAliases = {
ll = "ls -l";
lg = "lazygit";
nixos-update = "sudo git -C /etc/nixos/config pull && sudo nixos-rebuild switch";
};
history.path = "${config.xdg.dataHome}/zsh/history"; history.path = "${config.xdg.dataHome}/zsh/history";
}; };
programs.keychain.enableZshIntegration = true; programs.keychain.enableZshIntegration = true;