Initial configuration

This commit is contained in:
Chris Josten 2020-05-12 10:53:09 +02:00
commit 44b011a6b4
15 changed files with 328 additions and 0 deletions

8
common/console.nix Normal file
View file

@ -0,0 +1,8 @@
{ config, ... }:
{
imports = [
./pkgs/console-core.nix
];
nixpkgs.config.allowUnfree = true;
}

8
common/default.nix Normal file
View file

@ -0,0 +1,8 @@
{config, ...}:
{
imports = [
./console.nix
./users.nix
];
}

5
common/devel/default.nix Normal file
View file

@ -0,0 +1,5 @@
{config, ... }:
{
imports = [./pkgs.nix];
}

19
common/devel/pkgs.nix Normal file
View file

@ -0,0 +1,19 @@
{ pkgs, ...}:
{
environment = {
systemPackages = with pkgs; [
# General
git
# C/C++
gcc
cmake
qtcreator
# Java
gradle
jetbrains.idea-ultimate
maven
];
};
}

30
common/gui/default.nix Normal file
View file

@ -0,0 +1,30 @@
# Defines comfig for a "gui" system, in most cases a Desktop or Laptop
{ config, ... }:
{
imports = [ ./pkgs.nix ];
# Basic X11/display manager config
services.xserver = {
enable = true;
displayManager.sddm.enable = true;
desktopManager.plasma5.enable = true;
};
networking.networkmanager.enable = true;
sound.enable = true;
hardware.pulseaudio.enable = true;
# Additional services
services.syncthing.enable = true;
services.flatpak.enable = true;
xdg.portal.enable = true;
# Input config
services.xserver = {
synaptics.tapButtons = false;
libinput.enable = true;
};
}

35
common/gui/pkgs.nix Normal file
View file

@ -0,0 +1,35 @@
{ pkgs, ...}:
{
environment = {
systemPackages = with pkgs; [
# Internet
firefox
keepassxc
riot-desktop
syncthing
qsyncthingtray
# Wire(less) internet support
dnsmasq
hostapd
iw
plasma-nm
# KDE plasma and applications
kate
latte-dock # My PC has enough RAM by now
kleopatra
networkmanager
okular
plasma-desktop
plasma-integration
sddm
# To show of your distro
neofetch
# Communication
tdesktop
];
};
}

View file

@ -0,0 +1,8 @@
{config, ...}:
{
networking = {
# PiHole
networkmanager.insertNameservers = ["192.168.178.151"];
};
}

View file

@ -0,0 +1,11 @@
{ pkgs, ...}:
{
environment = {
systemPackages = with pkgs; [
neovim
tmux
vim
];
};
}

41
common/pkgs/gui.nix Normal file
View file

@ -0,0 +1,41 @@
{ pkgs, ...}:
{
environment = {
systemPackages = with pkgs; [
# Internet
firefox
keepassxc
riot-desktop
syncthing
qsyncthingtray
# Wire(less) internet support
dnsmasq
hostapd
iw
plasma-nm
# KDE plasma and applications
kate
latte-dock # My PC has enough RAM by now
kleopatra
networkmanager
okular
plasma-desktop
plasma-integration
sddm
# To show of your distro
neofetch
# Communication
tdesktop
];
};
#packageOverrides = pkgs: rec {
#latte-dock = pkgs.latte-dock.override (attrs: {
# src = fetc
#};
#}
}

1
common/pkgs/result Symbolic link
View file

@ -0,0 +1 @@
/nix/store/rq2fvc9n4n9qlmqq88maxaw8cr7cy12p-nixos-system-nix-te-vinden-20.03.1754.b0e3df2f843

15
common/users.nix Normal file
View file

@ -0,0 +1,15 @@
{ config, ... }:
{
# Define a user account. Don't forget to set a password with passwd.
# users.users.jane = {
# isNormalUser = true;
# extraGroups = [ "wheel" ]; # Enable sudo for the user.
# };
users.users.chris = {
isNormalUser = true;
home = "/home/chris";
description = "Chris Josten";
extraGroups = ["wheel" "networkmanager" "power"];
};
}