Move more things to the common host configuration
This commit is contained in:
parent
c5afed5767
commit
815ec0f429
9 changed files with 147 additions and 528 deletions
|
@ -1,11 +1,6 @@
|
|||
{
|
||||
headless ? false,
|
||||
hostname,
|
||||
inputs,
|
||||
outputs,
|
||||
pkgs,
|
||||
self,
|
||||
system,
|
||||
username,
|
||||
...
|
||||
}:
|
||||
|
@ -15,41 +10,14 @@
|
|||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
home-manager = {
|
||||
extraSpecialArgs = {
|
||||
inherit
|
||||
hostname
|
||||
inputs
|
||||
outputs
|
||||
headless
|
||||
self
|
||||
system
|
||||
username
|
||||
;
|
||||
};
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
|
||||
users."${username}" = import "${self}/nix/home/${username}";
|
||||
};
|
||||
|
||||
nixpkgs = {
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
|
||||
permittedInsecurePackages = [ "electron-27.3.11" ];
|
||||
};
|
||||
|
||||
overlays = [
|
||||
outputs.overlays.additions
|
||||
outputs.overlays.modifications
|
||||
outputs.overlays.stable-packages
|
||||
];
|
||||
};
|
||||
|
||||
nix.nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
|
||||
|
||||
# Bootloader.
|
||||
boot = {
|
||||
loader = {
|
||||
systemd-boot = {
|
||||
|
@ -70,52 +38,23 @@
|
|||
DefaultTimeoutStopSec=10s
|
||||
'';
|
||||
|
||||
# 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 = "Europe/London";
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_GB.UTF-8";
|
||||
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "en_GB.UTF-8";
|
||||
LC_IDENTIFICATION = "en_GB.UTF-8";
|
||||
LC_MEASUREMENT = "en_GB.UTF-8";
|
||||
LC_MONETARY = "en_GB.UTF-8";
|
||||
LC_NAME = "en_GB.UTF-8";
|
||||
LC_NUMERIC = "en_GB.UTF-8";
|
||||
LC_PAPER = "en_GB.UTF-8";
|
||||
LC_TELEPHONE = "en_GB.UTF-8";
|
||||
LC_TIME = "en_GB.UTF-8";
|
||||
};
|
||||
|
||||
# Enable the X11 windowing system.
|
||||
services.xserver.enable = true;
|
||||
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
|
||||
xkb = {
|
||||
layout = "gb";
|
||||
variant = "";
|
||||
};
|
||||
};
|
||||
|
||||
# Configure console keymap
|
||||
console.keyMap = "uk";
|
||||
|
||||
services.avahi.enable = true;
|
||||
services.avahi.nssmdns4 = true;
|
||||
services.avahi.openFirewall = true;
|
||||
|
||||
services.printing.enable = true;
|
||||
|
||||
# Enable sound with pipewire.
|
||||
hardware.pulseaudio.enable = false;
|
||||
|
||||
hardware.bluetooth.enable = true;
|
||||
|
@ -136,18 +75,9 @@
|
|||
pulse.enable = true;
|
||||
};
|
||||
|
||||
# Enable touchpad support (enabled default in most desktopManager).
|
||||
# services.xserver.libinput.enable = true;
|
||||
|
||||
users.users.${username} = {
|
||||
isNormalUser = true;
|
||||
description = "Oliver Davies";
|
||||
extraGroups = [
|
||||
"docker"
|
||||
"media"
|
||||
"networkmanager"
|
||||
"wheel"
|
||||
];
|
||||
extraGroups = [ "media" ];
|
||||
|
||||
packages = with pkgs; [
|
||||
android-tools
|
||||
via
|
||||
|
@ -156,82 +86,22 @@
|
|||
|
||||
users.groups.media = { };
|
||||
|
||||
security.sudo.wheelNeedsPassword = false;
|
||||
environment.systemPackages = with pkgs; [
|
||||
gtypist
|
||||
rclone
|
||||
rclone-browser
|
||||
ttyper
|
||||
yt-dlp
|
||||
ytfzf
|
||||
];
|
||||
|
||||
# List packages installed in system profile. To search, run:
|
||||
# $ nix search wget
|
||||
environment.systemPackages =
|
||||
with pkgs;
|
||||
[
|
||||
caffeine-ng
|
||||
cryptsetup
|
||||
gtypist
|
||||
fastfetch
|
||||
mermaid-cli
|
||||
mkcert
|
||||
ttyper
|
||||
yt-dlp
|
||||
ytfzf
|
||||
]
|
||||
++ pkgs.lib.optionals (!headless) [
|
||||
acpi
|
||||
arandr
|
||||
brightnessctl
|
||||
cpufrequtils
|
||||
libnotify
|
||||
pmutils
|
||||
ffmpegthumbnailer
|
||||
libreoffice
|
||||
logseq
|
||||
rclone
|
||||
rclone-browser
|
||||
shotwell
|
||||
vscode
|
||||
xfce.thunar
|
||||
xfce.thunar-volman
|
||||
xfce.tumbler
|
||||
];
|
||||
|
||||
# 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 = [
|
||||
9003 # xdebug
|
||||
];
|
||||
# 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 = "22.11"; # Did you read the comment?
|
||||
|
||||
programs.dconf.enable = true;
|
||||
|
||||
users.defaultUserShell = "/etc/profiles/per-user/${username}/bin/zsh";
|
||||
|
||||
zramSwap.enable = true;
|
||||
|
||||
nix = {
|
||||
extraOptions = ''
|
||||
trusted-users = root ${username}
|
||||
'';
|
||||
|
||||
gc = {
|
||||
automatic = true;
|
||||
dates = "daily";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue