Rejig stuff so dingserver can use common

This commit is contained in:
2022-04-07 04:03:33 +01:00
parent a9c0cc8c1c
commit a5a0f367cb
6 changed files with 69 additions and 74 deletions

View File

@@ -1,10 +1,10 @@
{ config, pkgs, ...}: { config, pkgs, lib, ...}:
{ {
# Use the systemd-boot EFI boot loader. # Use the systemd-boot EFI boot loader.
boot.kernelPackages = pkgs.linuxPackages_latest; boot.kernelPackages = pkgs.linuxPackages_latest;
boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.enable = lib.mkDefault true;
boot.loader.efi.canTouchEfiVariables = true; boot.loader.efi.canTouchEfiVariables = lib.mkDefault true;
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
@@ -15,9 +15,6 @@
''; '';
}; };
networking.networkmanager.enable = true;
programs.nm-applet.enable = true;
# Set time zone. # Set time zone.
time.timeZone = "Europe/London"; time.timeZone = "Europe/London";
@@ -32,11 +29,6 @@
virtualisation.docker.enable = true; virtualisation.docker.enable = true;
hardware.opengl.driSupport32Bit = true;
hardware.bluetooth.enable = true;
services.blueman.enable = true;
hardware.cpu.intel.updateMicrocode = true; hardware.cpu.intel.updateMicrocode = true;
# Define a user account. Don't forget to set a password with passwd. # Define a user account. Don't forget to set a password with passwd.
@@ -44,7 +36,7 @@
isNormalUser = true; isNormalUser = true;
home = "/home/daniel"; home = "/home/daniel";
initialPassword = "password"; initialPassword = "password";
extraGroups = [ "wheel" "networkmanager" "docker" "video" ]; extraGroups = [ "wheel" "networkmanager" "docker" "video" "syncthing" ];
shell = pkgs.zsh; shell = pkgs.zsh;
}; };
@@ -74,27 +66,10 @@
}; };
services = { services = {
gnome.gnome-keyring.enable = true;
openssh.enable = true; openssh.enable = true;
pipewire = {
enable = true;
pulse.enable = true;
};
tailscale = { tailscale = {
enable = true; enable = true;
}; };
}; };
# 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. Its 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 = "21.05"; # Did you read the comment?
} }

View File

@@ -3,7 +3,22 @@
{ {
security.pam.services.gdm.enableGnomeKeyring = true; security.pam.services.gdm.enableGnomeKeyring = true;
# Enable the X11 windowing system. # Enable the X11 windowing system.
services.xserver = { hardware.opengl.driSupport32Bit = true;
hardware.bluetooth.enable = true;
services.blueman.enable = true;
networking.networkmanager.enable = true;
programs.nm-applet.enable = true;
services = {
gnome.gnome-keyring.enable = true;
pipewire = {
enable = true;
pulse.enable = true;
};
xserver = {
enable = true; enable = true;
layout = "gb"; layout = "gb";
@@ -29,5 +44,6 @@
]; ];
}; };
}; };
};
} }

View File

@@ -29,5 +29,13 @@
networking.hostName = "dingbox"; # Define your hostname. networking.hostName = "dingbox"; # Define your hostname.
networking.interfaces.enp5s0.useDHCP = true; networking.interfaces.enp5s0.useDHCP = true;
networking.interfaces.wlp6s0.useDHCP = true; networking.interfaces.wlp6s0.useDHCP = true;
# 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. Its 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 = "21.05"; # Did you read the comment?
} }

View File

@@ -1,52 +1,33 @@
{ config, pkgs, ... }: { config, pkgs, lib, ... }:
{ {
imports = imports =
[ # Include the results of the hardware scan. [ # Include the results of the hardware scan.
../common
./hardware-configuration.nix ./hardware-configuration.nix
./caddy.nix ./caddy.nix
./synapse.nix ./synapse.nix
./syncthing.nix ./syncthing.nix
]; ];
# Force disable the common boot loader
boot.loader.systemd-boot.enable = lib.mkForce false;
boot.loader.efi.canTouchEfiVariables = lib.mkForce false;
# Use the GRUB 2 boot loader. # Use the GRUB 2 boot loader.
boot.loader.grub.enable = true; boot.loader.grub.enable = true;
boot.loader.grub.version = 2; boot.loader.grub.version = 2;
boot.loader.grub.device = "/dev/sda"; # or "nodev" for efi only boot.loader.grub.device = "/dev/sda"; # or "nodev" for efi only
networking.hostName = "dingserver"; networking.hostName = "dingserver";
networking.useDHCP = false;
networking.interfaces.ens3.useDHCP = true; networking.interfaces.ens3.useDHCP = true;
# nix flakes compatibility
nix = {
extraOptions = ''
experimental-features = nix-command flakes
'';
};
users.users.daniel = {
isNormalUser = true;
extraGroups = [ "wheel" "syncthing" ]; # Enable sudo for the user.
};
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
curl
git
helix helix
kitty kitty # For terminfo
lazygit lazygit
wget
]; ];
programs.neovim = {
enable = true;
vimAlias = true;
viAlias = true;
};
services.openssh.enable = true;
system.stateVersion = "21.11"; # Did you read the comment? system.stateVersion = "21.11"; # Did you read the comment?
} }

View File

@@ -22,5 +22,12 @@
dpi = 144; dpi = 144;
}; };
# 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. Its 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 = "21.05"; # Did you read the comment?
} }

View File

@@ -48,5 +48,13 @@
HibernateDelaySec=600 HibernateDelaySec=600
''; '';
# 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. Its 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 = "21.05"; # Did you read the comment?
} }