modularizing the configs
This commit is contained in:
parent
e936704af5
commit
32ef1cf68c
68
modules/base.nix
Normal file
68
modules/base.nix
Normal file
|
@ -0,0 +1,68 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
{
|
||||
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
# Use the systemd-boot EFI boot loader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
nix = {
|
||||
extraOptions = "experimental-features = nix-command flakes";
|
||||
package = pkgs.nixFlakes;
|
||||
gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
options = "--delete-older-than 20d";
|
||||
};
|
||||
settings = {
|
||||
auto-optimise-store = true;
|
||||
};
|
||||
};
|
||||
nixpkgs.config.allowUnFree = true;
|
||||
|
||||
system.autoUpgrade = {
|
||||
enable = true;
|
||||
dates = "02:00";
|
||||
allowReboot = true;
|
||||
flake = "${config.users.users.chris.home}/conf";
|
||||
flags = [ "--update-input" "nixpkgs" "--commit-lock-file" ];
|
||||
};
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "America/Chicago";
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_US.utf8";
|
||||
|
||||
# Configure keymap in X11
|
||||
services.xserver = {
|
||||
layout = "us";
|
||||
xkbVariant = "";
|
||||
};
|
||||
|
||||
# Enable networking
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
services.avahi = {
|
||||
enable = true;
|
||||
publish.enable = true;
|
||||
publish.userServices = true;
|
||||
};
|
||||
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
users.users.chris = {
|
||||
isNormalUser = true;
|
||||
description = "Chris";
|
||||
extraGroups = [ "networkmanager" "wheel" ];
|
||||
packages = with pkgs; [];
|
||||
};
|
||||
environment.homeBinInPath = true;
|
||||
programs.fish.enable = true;
|
||||
|
||||
virtualisation.docker.enable = true;
|
||||
services.openssh.enable = true;
|
||||
services.fstrim.enable = true;
|
||||
|
||||
}
|
29
pkgs/base-packages.nix
Normal file
29
pkgs/base-packages.nix
Normal file
|
@ -0,0 +1,29 @@
|
|||
{ pkgs, config, ... }:
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
vim
|
||||
wget
|
||||
yt-dlp
|
||||
bat
|
||||
ripgrep
|
||||
ffmpeg-full
|
||||
rsync
|
||||
dutree
|
||||
tmux
|
||||
git
|
||||
samba
|
||||
exa
|
||||
jq
|
||||
fd
|
||||
bc
|
||||
sysstat
|
||||
procs
|
||||
btop
|
||||
htop
|
||||
#nvtop
|
||||
glxinfo
|
||||
vulkan-tools
|
||||
pciutils
|
||||
blesh
|
||||
];
|
||||
}
|
|
@ -8,81 +8,13 @@
|
|||
imports =
|
||||
[ # Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
../../pkgs/base-packages.nix
|
||||
../../modules/base.nix
|
||||
];
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
|
||||
# Bootloader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
boot.loader.efi.efiSysMountPoint = "/boot/efi";
|
||||
|
||||
networking.hostName = "hoid"; # Define your hostname.
|
||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||
|
||||
# Configure network proxy if necessary
|
||||
# networking.proxy.default = "http://user:password@proxy:port/";
|
||||
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||||
|
||||
# Enable networking
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "America/Chicago";
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_US.utf8";
|
||||
|
||||
# Configure keymap in X11
|
||||
services.xserver = {
|
||||
layout = "us";
|
||||
xkbVariant = "";
|
||||
};
|
||||
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
users.users.chris = {
|
||||
isNormalUser = true;
|
||||
description = "Chris";
|
||||
extraGroups = [ "networkmanager" "wheel" ];
|
||||
packages = with pkgs; [];
|
||||
};
|
||||
|
||||
# Allow unfree packages
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# List packages installed in system profile. To search, run:
|
||||
# $ nix search wget
|
||||
environment.systemPackages = with pkgs; [
|
||||
vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
|
||||
wget
|
||||
git
|
||||
rclone
|
||||
rsync
|
||||
fd
|
||||
bat
|
||||
ripgrep
|
||||
curl
|
||||
iputils
|
||||
btop
|
||||
htop
|
||||
yt-dlp
|
||||
tmux
|
||||
exa
|
||||
];
|
||||
|
||||
programs.fish.enable = true;
|
||||
|
||||
# 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:
|
||||
|
||||
# Enable the OpenSSH daemon.
|
||||
services.openssh.enable = true;
|
||||
|
||||
# Open ports in the firewall.
|
||||
# networking.firewall.allowedTCPPorts = [ ... ];
|
||||
|
|
|
@ -8,50 +8,11 @@
|
|||
imports =
|
||||
[ # Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
../../pkgs/base-packages.nix
|
||||
../../modules/base.nix
|
||||
];
|
||||
|
||||
nix = {
|
||||
extraOptions = "experimental-features = nix-command flakes";
|
||||
package = pkgs.nixFlakes;
|
||||
gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
options = "--delete-older-than 20d";
|
||||
};
|
||||
settings = {
|
||||
auto-optimise-store = true;
|
||||
};
|
||||
};
|
||||
|
||||
system.autoUpgrade = {
|
||||
enable = true;
|
||||
dates = "02:00";
|
||||
allowReboot = true;
|
||||
flake = "${config.users.users.chris.home}/conf";
|
||||
flags = [ "--update-input" "nixpkgs" "--commit-lock-file" ];
|
||||
};
|
||||
|
||||
|
||||
nixpkgs.config.allowUnFree = true;
|
||||
|
||||
# Use the systemd-boot EFI boot loader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
networking.hostName = "shen"; # Define your hostname.
|
||||
# Pick only one of the below networking options.
|
||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||
networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "America/Chicago";
|
||||
|
||||
# Configure network proxy if necessary
|
||||
# networking.proxy.default = "http://user:password@proxy:port/";
|
||||
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
# Enable CUPS to print documents.
|
||||
services.printing = {
|
||||
|
@ -66,12 +27,6 @@
|
|||
'';
|
||||
};
|
||||
|
||||
services.avahi = {
|
||||
enable = true;
|
||||
publish.enable = true;
|
||||
publish.userServices = true;
|
||||
};
|
||||
|
||||
hardware.opengl = {
|
||||
enable = true;
|
||||
extraPackages = with pkgs; [
|
||||
|
@ -91,63 +46,6 @@
|
|||
};
|
||||
|
||||
environment.variables.AMD_VULKAN_ICD = lib.mkDefault "RADV";
|
||||
environment.homeBinInPath = true;
|
||||
|
||||
programs.fish.enable = true;
|
||||
|
||||
# Enable touchpad support (enabled default in most desktopManager).
|
||||
# services.xserver.libinput.enable = true;
|
||||
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
users.users.chris = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user.
|
||||
};
|
||||
|
||||
# List packages installed in system profile. To search, run:
|
||||
# $ nix search wget
|
||||
environment.systemPackages = with pkgs; [
|
||||
vim
|
||||
wget
|
||||
yt-dlp
|
||||
bat
|
||||
ripgrep
|
||||
ffmpeg-full
|
||||
rsync
|
||||
dutree
|
||||
tmux
|
||||
git
|
||||
samba
|
||||
exa
|
||||
jq
|
||||
fd
|
||||
bc
|
||||
sysstat
|
||||
procs
|
||||
btop
|
||||
htop
|
||||
#nvtop
|
||||
glxinfo
|
||||
vulkan-tools
|
||||
pciutils
|
||||
blesh
|
||||
];
|
||||
|
||||
virtualisation.docker.enable = true;
|
||||
|
||||
# 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:
|
||||
|
||||
# Enable the OpenSSH daemon.
|
||||
services.openssh.enable = true;
|
||||
services.fstrim.enable = true;
|
||||
|
||||
# CADDY
|
||||
services.caddy = {
|
||||
|
|
Loading…
Reference in a new issue