working towards generic configuration, basic fish setup
This commit is contained in:
parent
94d3cab99c
commit
3e5f25d8b2
7 changed files with 87 additions and 105 deletions
35
configuration.nix
Normal file
35
configuration.nix
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
# System configuration and packages for my personal NixOS setup
|
||||||
|
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
# include local machine/environment config
|
||||||
|
./local.nix
|
||||||
|
./programs
|
||||||
|
];
|
||||||
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
fishPlugins.tide
|
||||||
|
neovim
|
||||||
|
wget
|
||||||
|
git
|
||||||
|
htop
|
||||||
|
btop
|
||||||
|
dig
|
||||||
|
];
|
||||||
|
|
||||||
|
environment.shellAliases = {
|
||||||
|
vi = "nvim";
|
||||||
|
vim = "nvim";
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.direnv.enable = true;
|
||||||
|
users.defaultUserShell = pkgs.fish;
|
||||||
|
|
||||||
|
services.tailscale.enable = true;
|
||||||
|
services.tailscale.useRoutingFeatures = "client";
|
||||||
|
|
||||||
|
system.stateVersion = "23.05";
|
||||||
|
|
||||||
|
}
|
|
@ -1,42 +0,0 @@
|
||||||
# Edit this configuration file to define what should be installed on
|
|
||||||
# your system. Help is available in the configuration.nix(5) man page, on
|
|
||||||
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
|
|
||||||
|
|
||||||
# NixOS-WSL specific options are documented on the NixOS-WSL repository:
|
|
||||||
# https://github.com/nix-community/NixOS-WSL
|
|
||||||
|
|
||||||
{ config, lib, pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
# include NixOS-WSL modules
|
|
||||||
<nixos-wsl/modules>
|
|
||||||
];
|
|
||||||
|
|
||||||
wsl.enable = true;
|
|
||||||
wsl.defaultUser = "nixos";
|
|
||||||
|
|
||||||
environment.systemPackages = [
|
|
||||||
pkgs.neovim
|
|
||||||
pkgs.git
|
|
||||||
pkgs.btop
|
|
||||||
pkgs.dig
|
|
||||||
];
|
|
||||||
|
|
||||||
# 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?
|
|
||||||
|
|
||||||
# Automatic Garbage Collection
|
|
||||||
nix.gc = {
|
|
||||||
automatic = true;
|
|
||||||
dates = "weekly";
|
|
||||||
options = "--delete-older-than 30d";
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
18
machines/bento-wsl-nixos/local.nix
Normal file
18
machines/bento-wsl-nixos/local.nix
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
{ ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
# include NixOS-WSL modules
|
||||||
|
<nixos-wsl/modules>
|
||||||
|
];
|
||||||
|
|
||||||
|
wsl.enable = true;
|
||||||
|
wsl.defaultUser = "nixos";
|
||||||
|
|
||||||
|
nix.gc = {
|
||||||
|
automatic = true;
|
||||||
|
dates = "weekly";
|
||||||
|
options = "--delete-older-than 30d";
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
|
@ -1,22 +1,15 @@
|
||||||
# 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, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
imports = [ ./hardware-configuration.nix ];
|
||||||
[ # Include the results of the hardware scan.
|
|
||||||
./hardware-configuration.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
# Bootloader.
|
# Bootloader.
|
||||||
boot.loader.systemd-boot.enable = true;
|
boot.loader.systemd-boot.enable = true;
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
|
||||||
networking.hostName = "snail"; # Define your hostname.
|
networking.hostName = "snail";
|
||||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant
|
||||||
|
|
||||||
# Configure network proxy if necessary
|
# Configure network proxy if necessary
|
||||||
# networking.proxy.default = "http://user:password@proxy:port/";
|
# networking.proxy.default = "http://user:password@proxy:port/";
|
||||||
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||||||
|
@ -54,8 +47,7 @@
|
||||||
layout = "us";
|
layout = "us";
|
||||||
xkbVariant = "";
|
xkbVariant = "";
|
||||||
};
|
};
|
||||||
|
# Enable CUPS to print documents.
|
||||||
# Enable CUPS to print documents.
|
|
||||||
services.printing.enable = true;
|
services.printing.enable = true;
|
||||||
|
|
||||||
# Enable sound with pipewire.
|
# Enable sound with pipewire.
|
||||||
|
@ -66,7 +58,7 @@
|
||||||
enable = true;
|
enable = true;
|
||||||
alsa.enable = true;
|
alsa.enable = true;
|
||||||
alsa.support32Bit = true;
|
alsa.support32Bit = true;
|
||||||
pulse.enable = true;
|
pulse.enable = true;
|
||||||
# If you want to use JACK applications, uncomment this
|
# If you want to use JACK applications, uncomment this
|
||||||
#jack.enable = true;
|
#jack.enable = true;
|
||||||
|
|
||||||
|
@ -89,56 +81,9 @@
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
# Allow unfree packages
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
|
||||||
|
|
||||||
# List packages installed in system profile. To search, run:
|
|
||||||
# $ nix search wget
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
fishPlugins.tide
|
|
||||||
neovim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
|
|
||||||
wget
|
|
||||||
git
|
|
||||||
htop
|
|
||||||
dig
|
|
||||||
];
|
|
||||||
|
|
||||||
# Some programs need SUID wrappers, can be configured further or are
|
|
||||||
# started in user sessions.
|
|
||||||
# programs.mtr.enable = true;
|
|
||||||
# programs.gnupg.agent = {
|
|
||||||
# enable = true;
|
|
||||||
# enableSSHSupport = true;
|
|
||||||
# };
|
|
||||||
|
|
||||||
# List services that you want to enable:
|
|
||||||
programs.fish.enable = true;
|
|
||||||
programs.direnv.enable = true;
|
|
||||||
users.defaultUserShell = pkgs.fish;
|
|
||||||
|
|
||||||
# fonts
|
# fonts
|
||||||
fonts.packages = with pkgs; [
|
fonts.packages = with pkgs; [
|
||||||
(nerdfonts.override { fonts = [ "FiraCode" "DroidSansMono" ]; })
|
(nerdfonts.override { fonts = [ "FiraCode" "DroidSansMono" ]; })
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
# Enable the OpenSSH daemon.
|
|
||||||
# services.openssh.enable = true;
|
|
||||||
services.tailscale.enable = true;
|
|
||||||
services.tailscale.useRoutingFeatures = "client";
|
|
||||||
|
|
||||||
# Open ports in the firewall.
|
|
||||||
# networking.firewall.allowedTCPPorts = [ ... ];
|
|
||||||
# networking.firewall.allowedUDPPorts = [ ... ];
|
|
||||||
# Or disable the firewall altogether.
|
|
||||||
# networking.firewall.enable = false;
|
|
||||||
|
|
||||||
# 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?
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
5
programs/default.nix
Normal file
5
programs/default.nix
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
{ ... }: {
|
||||||
|
imports = [
|
||||||
|
./fish
|
||||||
|
];
|
||||||
|
}
|
15
programs/fish/default.nix
Normal file
15
programs/fish/default.nix
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
{ ... }: {
|
||||||
|
programs = {
|
||||||
|
fish = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
# Fish shellAbbrs
|
||||||
|
shellAbbrs = {
|
||||||
|
garbage = "sudo nix-collect-garbage --delete-older-than 7d";
|
||||||
|
rbs = "sudo nixos-rebuild switch";
|
||||||
|
rebuild-all = "sudo nix-collect-garbage --delete-older-than 7d && sudo nixos-rebuild switch";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
6
todo.md
Normal file
6
todo.md
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
# To-Do list
|
||||||
|
|
||||||
|
## Figure out how to auto-initialize fish/tide configuration
|
||||||
|
Could probably read through the tide variable set to figure this out, just haven't done it yet. For now this command should initialize things correctly:
|
||||||
|
|
||||||
|
```tide configure --auto --style=Rainbow --prompt_colors='True color' --show_time='24-hour format' --rainbow_prompt_separators=Vertical --powerline_prompt_heads=Round --powerline_prompt_tails=Flat --powerline_prompt_style='Two lines, character' --prompt_connection=Disconnected --powerline_right_prompt_frame=No --prompt_spacing=Compact --icons='Many icons' --transient=No```
|
Loading…
Add table
Reference in a new issue