modularise config
This commit is contained in:
parent
ae44502f36
commit
79bba316c2
35
common/base-hardware.nix
Normal file
35
common/base-hardware.nix
Normal file
|
@ -0,0 +1,35 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
boot.initrd.luks.devices = [
|
||||
{
|
||||
name = "root";
|
||||
device = "/dev/disk/by-partlabel/nixos";
|
||||
preLVM = true;
|
||||
allowDiscards = true;
|
||||
}
|
||||
];
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
# Bluetooth
|
||||
hardware.bluetooth.enable = true;
|
||||
hardware.bluetooth.extraConfig = "
|
||||
[General]
|
||||
Enable=Source,Sink,Media,Socket
|
||||
";
|
||||
|
||||
# Sound.
|
||||
sound.enable = true;
|
||||
hardware.pulseaudio = {
|
||||
enable = true;
|
||||
support32Bit = true;
|
||||
extraModules = [ pkgs.pulseaudio-modules-bt ];
|
||||
package = pkgs.pulseaudioFull;
|
||||
};
|
||||
|
||||
# USB devices
|
||||
hardware.u2f.enable = true;
|
||||
}
|
||||
|
9
common/docker.nix
Normal file
9
common/docker.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
docker-compose
|
||||
];
|
||||
|
||||
virtualisation.docker.enable = true;
|
||||
}
|
25
common/gnome.nix
Normal file
25
common/gnome.nix
Normal file
|
@ -0,0 +1,25 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
gnome3.dconf-editor
|
||||
gnome3.gnome-tweaks
|
||||
gnomeExtensions.dash-to-panel
|
||||
gnomeExtensions.topicons-plus
|
||||
];
|
||||
|
||||
# Enable Gnome 3
|
||||
services.xserver.displayManager.gdm.enable = true;
|
||||
services.xserver.displayManager.gdm.wayland = false;
|
||||
services.xserver.desktopManager.gnome3.enable = true;
|
||||
environment.gnome3.excludePackages = with pkgs; [
|
||||
gnome3.geary
|
||||
gnome3.gnome-weather
|
||||
gnome3.gnome-calendar
|
||||
gnome3.gnome-maps
|
||||
gnome3.gnome-contacts
|
||||
gnome3.gnome-software
|
||||
gnome3.gnome-packagekit
|
||||
gnome3.epiphany
|
||||
];
|
||||
}
|
7
common/gpu-bumblebee.nix
Normal file
7
common/gpu-bumblebee.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
# Graphics drivers
|
||||
hardware.bumblebee.enable = true;
|
||||
hardware.opengl.driSupport32Bit = true;
|
||||
}
|
7
common/gpu-nvidia.nix
Normal file
7
common/gpu-nvidia.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
# Graphics drivers
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
hardware.opengl.driSupport32Bit = true;
|
||||
}
|
9
common/gpu-optimus.nix
Normal file
9
common/gpu-optimus.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
# Graphics drivers
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
hardware.nvidia.optimus_prime.enable = true;
|
||||
hardware.nvidia.optimus_prime.nvidiaBusId = "PCI:2:0:0";
|
||||
hardware.nvidia.optimus_prime.intelBusId = "PCI:0:2:0";
|
||||
}
|
7
common/gtk.nix
Normal file
7
common/gtk.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
services.dbus.packages = with pkgs; [
|
||||
gnome3.dconf gnome2.GConf
|
||||
];
|
||||
}
|
15
common/i18n.nix
Normal file
15
common/i18n.nix
Normal file
|
@ -0,0 +1,15 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
# Select internationalisation properties.
|
||||
i18n = {
|
||||
consoleFont = "Lat2-Terminus16";
|
||||
consoleKeyMap = "uk";
|
||||
defaultLocale = "en_GB.UTF-8";
|
||||
inputMethod.enabled = "ibus";
|
||||
inputMethod.ibus.engines = with pkgs.ibus-engines; [ uniemoji ];
|
||||
};
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "Europe/Berlin";
|
||||
}
|
9
common/ledger.nix
Normal file
9
common/ledger.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
hardware.ledger.enable = true;
|
||||
services.udev.extraRules = ''
|
||||
# Nano S
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2c97", ATTRS{idProduct}=="0001|1000|1001|1002|1003|1004|1005|1006|1007|1008|1009|100a|100b|100c|100d|100e|100f|1010|1011|1012|1013|1014|1015|1016|1017|1018|1019|101a|101b|101c|101d|101e|101f", TAG+="uaccess", TAG+="udev-acl"
|
||||
'';
|
||||
}
|
10
common/nix.nix
Normal file
10
common/nix.nix
Normal file
|
@ -0,0 +1,10 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
nix.autoOptimiseStore = true;
|
||||
nix.gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
options = "--delete-older-than 30d";
|
||||
};
|
||||
}
|
14
common/system.nix
Normal file
14
common/system.nix
Normal file
|
@ -0,0 +1,14 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
wget
|
||||
curl
|
||||
networkmanager
|
||||
neovim
|
||||
];
|
||||
|
||||
fonts.enableDefaultFonts = true;
|
||||
|
||||
services.printing.enable = true;
|
||||
}
|
8
common/x11.nix
Normal file
8
common/x11.nix
Normal file
|
@ -0,0 +1,8 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
# Enable the X11 windowing system.
|
||||
services.xserver.enable = true;
|
||||
services.xserver.layout = "gb";
|
||||
services.xserver.xkbOptions = "eurosign:e";
|
||||
}
|
8
common/xmonad.nix
Normal file
8
common/xmonad.nix
Normal file
|
@ -0,0 +1,8 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
# Enable xmonad
|
||||
services.xserver.displayManager.lightdm.enable = true;
|
||||
services.xserver.windowManager.default = "xmonad";
|
||||
services.xserver.windowManager.xmonad.enable = true;
|
||||
}
|
130
home-pc.nix
130
home-pc.nix
|
@ -1,8 +1,3 @@
|
|||
# Import unstable and home-manager channels:
|
||||
# sudo nix-channel --add http://nixos.org/channels/nixos-unstable nixos-unstable
|
||||
# sudo nix-channel --add https://github.com/rycee/home-manager/archive/release-19.09.tar.gz home-manager
|
||||
# sudo nix-channel --update
|
||||
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
|
@ -11,129 +6,34 @@ let
|
|||
};
|
||||
in
|
||||
{
|
||||
imports =
|
||||
[ # Include the results of the hardware scan.
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
<home-manager/nixos>
|
||||
./common/base-hardware.nix
|
||||
./common/gpu-nvidia.nix
|
||||
./common/ledger.nix
|
||||
./common/system.nix
|
||||
./common/nix.nix
|
||||
./common/i18n.nix
|
||||
./common/x11.nix
|
||||
./common/gtk.nix
|
||||
./common/gnome.nix
|
||||
];
|
||||
|
||||
# configure unfree and unstable packages
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
nixpkgs.overlays = [
|
||||
];
|
||||
networking.hostName = "felix-nixos";
|
||||
|
||||
# Use the systemd-boot EFI boot loader.
|
||||
boot.initrd.luks.devices = [
|
||||
{
|
||||
name = "root";
|
||||
device = "/dev/disk/by-partlabel/nixos";
|
||||
preLVM = true;
|
||||
allowDiscards = true;
|
||||
}
|
||||
];
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
# boot.kernelPackages = pkgs.linuxPackages_5_2;
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
networking.hostName = "felix-nixos"; # Define your hostname.
|
||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n = {
|
||||
consoleFont = "Lat2-Terminus16";
|
||||
consoleKeyMap = "uk";
|
||||
defaultLocale = "en_GB.UTF-8";
|
||||
};
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "Europe/Berlin";
|
||||
|
||||
# List packages installed in system profile. To search, run:
|
||||
# $ nix search wget
|
||||
environment.systemPackages = with pkgs; [
|
||||
wget
|
||||
curl
|
||||
networkmanager
|
||||
neovim
|
||||
gnome3.gnome-tweaks
|
||||
gnomeExtensions.dash-to-panel
|
||||
gnomeExtensions.topicons-plus
|
||||
];
|
||||
|
||||
# Use noto fonts with emoji support
|
||||
fonts.enableDefaultFonts = true;
|
||||
|
||||
# Enable CUPS to print documents.
|
||||
services.printing.enable = true;
|
||||
|
||||
hardware.bluetooth.enable = true;
|
||||
hardware.bluetooth.extraConfig = "
|
||||
[General]
|
||||
Enable=Source,Sink,Media,Socket
|
||||
";
|
||||
|
||||
# Enable sound.
|
||||
sound.enable = true;
|
||||
hardware.pulseaudio = {
|
||||
enable = true;
|
||||
extraModules = [ pkgs.pulseaudio-modules-bt ];
|
||||
support32Bit = true;
|
||||
package = pkgs.pulseaudioFull;
|
||||
};
|
||||
|
||||
# NVIDIA drivers
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
hardware.opengl.driSupport32Bit = true;
|
||||
|
||||
# Enable special device support
|
||||
hardware.ledger.enable = true;
|
||||
hardware.u2f.enable = true;
|
||||
services.udev.extraRules = ''
|
||||
# Nano S
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2c97", ATTRS{idProduct}=="0001|1000|1001|1002|1003|1004|1005|1006|1007|1008|1009|100a|100b|100c|100d|100e|100f|1010|1011|1012|1013|1014|1015|1016|1017|1018|1019|101a|101b|101c|101d|101e|101f", TAG+="uaccess", TAG+="udev-acl"
|
||||
'';
|
||||
|
||||
# Enable the X11 windowing system.
|
||||
services.xserver.enable = true;
|
||||
services.xserver.layout = "gb";
|
||||
services.xserver.xkbOptions = "eurosign:e";
|
||||
|
||||
# Enable Gnome 3
|
||||
services.xserver.displayManager.gdm.enable = true;
|
||||
services.xserver.displayManager.gdm.wayland = false;
|
||||
services.xserver.desktopManager.gnome3.enable = true;
|
||||
services.dbus.packages = with pkgs; [
|
||||
gnome3.dconf gnome2.GConf
|
||||
];
|
||||
environment.gnome3.excludePackages = with pkgs; [
|
||||
gnome3.geary
|
||||
gnome3.gnome-weather
|
||||
gnome3.gnome-calendar
|
||||
gnome3.gnome-maps
|
||||
gnome3.gnome-contacts
|
||||
gnome3.gnome-software
|
||||
gnome3.gnome-packagekit
|
||||
gnome3.epiphany
|
||||
];
|
||||
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
users.users.felschr = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" "audio" ]; # Enable ‘sudo’ for the user.
|
||||
extraGroups = [ "wheel" "audio" ];
|
||||
shell = pkgs.fish;
|
||||
};
|
||||
|
||||
home-manager.users.felschr = import ./home/felschr.nix;
|
||||
|
||||
# This value determines the NixOS release with which your system is to be
|
||||
# compatible, in order to avoid breaking some software such as database
|
||||
# servers. You should change this only after NixOS release notes say you
|
||||
# should.
|
||||
system.stateVersion = "19.09"; # Did you read the comment?
|
||||
# only change this when specified in release notes
|
||||
system.stateVersion = "19.09";
|
||||
|
||||
system.autoUpgrade.enable = true;
|
||||
|
||||
nix.gc.automatic = true;
|
||||
nix.autoOptimiseStore = true;
|
||||
}
|
||||
|
|
13
home/common/chromium.nix
Normal file
13
home/common/chromium.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
nixpkgs.overlays = [
|
||||
(self: super: {
|
||||
chromium = super.chromium.override {
|
||||
commandLineArgs = "--force-dark-mode";
|
||||
};
|
||||
})
|
||||
];
|
||||
|
||||
programs.chromium.enable = true;
|
||||
}
|
22
home/common/dotnet.nix
Normal file
22
home/common/dotnet.nix
Normal file
|
@ -0,0 +1,22 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
with pkgs;
|
||||
let
|
||||
unstable = import <nixos-unstable> {
|
||||
config = removeAttrs config.nixpkgs.config [ "packageOverrides" ];
|
||||
};
|
||||
dotnet-sdk_3 = pkgs.callPackage (import (pkgs.fetchFromGitHub {
|
||||
name = "nixos-pr-dotnet-sdk_3";
|
||||
owner = "NixOS";
|
||||
repo = "nixpkgs";
|
||||
rev = "c3978355e1b1b23a0e1af5abe4a8901321126f49";
|
||||
sha256 = "006jxl07kfl2qbsglx0nsnmygdj3wvwfl98gpl3bprrja0l4gplk";
|
||||
} + /pkgs/development/compilers/dotnet/sdk/3.nix )) {};
|
||||
in
|
||||
{
|
||||
home.packages = [
|
||||
# dotnet-sdk
|
||||
dotnet-sdk_3
|
||||
omnisharp-roslyn
|
||||
];
|
||||
}
|
6
home/common/emacs.nix
Normal file
6
home/common/emacs.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
services.emacs.enable = true;
|
||||
programs.emacs.enable = true;
|
||||
}
|
22
home/common/gnome.nix
Normal file
22
home/common/gnome.nix
Normal file
|
@ -0,0 +1,22 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
dconf.enable = true;
|
||||
dconf.settings = {
|
||||
"org/gnome/shell" = {
|
||||
enabled-extensions = [
|
||||
"dash-to-panel@jderose9.github.com"
|
||||
"TopIcons@phocean.net"
|
||||
];
|
||||
favorite-apps = [
|
||||
"org.gnome.Nautilus.desktop"
|
||||
"chromium-browser.desktop"
|
||||
"code.desktop"
|
||||
];
|
||||
};
|
||||
"org/gnome/shell/extensions/dash-to-panel" = {
|
||||
appicon-padding = 4;
|
||||
panel-size = 36;
|
||||
};
|
||||
};
|
||||
}
|
9
home/common/gui.nix
Normal file
9
home/common/gui.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
gtk.enable = true;
|
||||
gtk.theme.name = "Adwaita-dark";
|
||||
gtk.gtk3.extraConfig = {
|
||||
gtk-application-prefer-dark-theme = true;
|
||||
};
|
||||
}
|
8
home/common/keybase.nix
Normal file
8
home/common/keybase.nix
Normal file
|
@ -0,0 +1,8 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
services.keybase.enable = true;
|
||||
services.kbfs.enable = true;
|
||||
|
||||
home.packages = [ pkgs.keybase-gui ];
|
||||
}
|
16
home/common/mimeapps.nix
Normal file
16
home/common/mimeapps.nix
Normal file
|
@ -0,0 +1,16 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
xdg.mimeApps.enable = true;
|
||||
xdg.mimeApps.defaultApplications = {
|
||||
"text/html" = [ "chromium-browser.desktop" ];
|
||||
"text/calendar" = [ "chromium-browser.desktop" ];
|
||||
"x-scheme-handler/http" = [ "chromium-browser.desktop" ];
|
||||
"x-scheme-handler/https" = [ "chromium-browser.desktop" ];
|
||||
"x-scheme-handler/about" = [ "chromium-browser.desktop" ];
|
||||
"x-scheme-handler/unknown" = [ "chromium-browser.desktop" ];
|
||||
"x-scheme-handler/mailto" = [ "chromium-browser.desktop" ];
|
||||
"x-scheme-handler/webcal" = [ "chromium-browser.desktop" ];
|
||||
"x-scheme-handler/sgnl" = [ "signal-desktop.desktop" ];
|
||||
};
|
||||
}
|
12
home/common/neovim.nix
Normal file
12
home/common/neovim.nix
Normal file
|
@ -0,0 +1,12 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
plugins = with pkgs.vimPlugins; [
|
||||
vim-nix
|
||||
];
|
||||
};
|
||||
}
|
18
home/common/sh.nix
Normal file
18
home/common/sh.nix
Normal file
|
@ -0,0 +1,18 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
shellAliases = {
|
||||
emacs = "emacsclient -c";
|
||||
};
|
||||
in
|
||||
{
|
||||
programs.fish = {
|
||||
enable = true;
|
||||
inherit shellAliases;
|
||||
};
|
||||
|
||||
programs.bash = {
|
||||
enable = true;
|
||||
inherit shellAliases;
|
||||
};
|
||||
}
|
5
home/common/signal.nix
Normal file
5
home/common/signal.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
home.packages = [ pkgs.signal-desktop ];
|
||||
}
|
5
home/common/vscode.nix
Normal file
5
home/common/vscode.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.vscode.enable = true;
|
||||
}
|
|
@ -5,67 +5,28 @@ let
|
|||
unstable = import <nixos-unstable> {
|
||||
config = removeAttrs config.nixpkgs.config [ "packageOverrides" ];
|
||||
};
|
||||
shellAliases = {
|
||||
chromium = "chromium --force-dark-mode";
|
||||
emacs = "emacsclient -c";
|
||||
};
|
||||
dotnet-sdk_3 = pkgs.callPackage (import (pkgs.fetchFromGitHub {
|
||||
name = "nixos-pr-dotnet-sdk_3";
|
||||
owner = "NixOS";
|
||||
repo = "nixpkgs";
|
||||
rev = "c3978355e1b1b23a0e1af5abe4a8901321126f49";
|
||||
sha256 = "006jxl07kfl2qbsglx0nsnmygdj3wvwfl98gpl3bprrja0l4gplk";
|
||||
} + /pkgs/development/compilers/dotnet/sdk/3.nix )) {};
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
# ./vscode.nix
|
||||
./common/sh.nix
|
||||
./common/mimeapps.nix
|
||||
./common/gui.nix
|
||||
./common/gnome.nix
|
||||
./common/neovim.nix
|
||||
./common/emacs.nix
|
||||
./common/vscode.nix
|
||||
./common/keybase.nix
|
||||
./common/signal.nix
|
||||
./common/chromium.nix
|
||||
./common/dotnet.nix
|
||||
];
|
||||
|
||||
home-manager.users.felschr = {
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
nixpkgs.config.allowBroken = true; # needed for steam
|
||||
|
||||
xdg.mimeApps.enable = true;
|
||||
xdg.mimeApps.defaultApplications = {
|
||||
"text/html" = [ "chromium-browser.desktop" ];
|
||||
"text/calendar" = [ "chromium-browser.desktop" ];
|
||||
"x-scheme-handler/mailto" = [ "chromium-browser.desktop" ];
|
||||
};
|
||||
|
||||
# xsession.enable = true;
|
||||
# xsession.windowManager.xmonad.enable = true;
|
||||
# xsession.windowManager.command = "gnome-shell";
|
||||
|
||||
dconf.enable = true;
|
||||
dconf.settings = {
|
||||
"org/gnome/shell" = {
|
||||
enabled-extensions = [
|
||||
"dash-to-panel@jderose9.github.com"
|
||||
"TopIcons@phocean.net"
|
||||
];
|
||||
favorite-apps = [
|
||||
"org.gnome.Nautilus.desktop"
|
||||
"chromium-browser.desktop"
|
||||
"code.desktop"
|
||||
];
|
||||
};
|
||||
"org/gnome/shell/extensions/dash-to-panel" = {
|
||||
appicon-padding = 4;
|
||||
panel-size = 36;
|
||||
};
|
||||
};
|
||||
|
||||
gtk.enable = true;
|
||||
gtk.theme.name = "Adwaita-dark";
|
||||
gtk.gtk3.extraConfig = {
|
||||
gtk-application-prefer-dark-theme = true;
|
||||
};
|
||||
|
||||
services.redshift = {
|
||||
enable = true;
|
||||
latitude = "53.2603609";
|
||||
longitude = "10.4014691";
|
||||
latitude = "53.2472211";
|
||||
longitude = "10.4021562";
|
||||
};
|
||||
|
||||
programs.direnv = {
|
||||
|
@ -74,70 +35,33 @@ in
|
|||
enableFishIntegration = true;
|
||||
};
|
||||
|
||||
programs.bash = {
|
||||
inherit shellAliases;
|
||||
};
|
||||
|
||||
programs.fish = {
|
||||
enable = true;
|
||||
inherit shellAliases;
|
||||
};
|
||||
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
plugins = with pkgs.vimPlugins; [
|
||||
vim-nix
|
||||
];
|
||||
};
|
||||
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userName = "Felix Schroeter";
|
||||
userEmail = "fs@upsquared.com";
|
||||
};
|
||||
|
||||
services.emacs.enable = true;
|
||||
programs.emacs.enable = true;
|
||||
|
||||
services.keybase.enable = true;
|
||||
services.kbfs.enable = true;
|
||||
|
||||
programs.chromium = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
programs.firefox.enable = true;
|
||||
|
||||
home.file.".envrc".text = ''
|
||||
dotenv
|
||||
'';
|
||||
|
||||
home.sessionVariables = {
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
# system
|
||||
gparted
|
||||
|
||||
# productivity
|
||||
signal-desktop
|
||||
discord
|
||||
keybase-gui
|
||||
libreoffice
|
||||
skypeforlinux
|
||||
vscode
|
||||
|
||||
# development tools
|
||||
# development
|
||||
unzip
|
||||
# dotnet-sdk
|
||||
dotnet-sdk_3
|
||||
omnisharp-roslyn
|
||||
kubectl
|
||||
kubernetes-helm
|
||||
awscli
|
||||
];
|
||||
|
||||
home.stateVersion = "19.09";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,77 +1,55 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
with pkgs;
|
||||
let
|
||||
unstable = import <nixos-unstable> {
|
||||
config = removeAttrs config.nixpkgs.config [ "packageOverrides" ];
|
||||
};
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
./common/sh.nix
|
||||
./common/mimeapps.nix
|
||||
./common/gui.nix
|
||||
./common/gnome.nix
|
||||
./common/neovim.nix
|
||||
./common/emacs.nix
|
||||
./common/vscode.nix
|
||||
./common/keybase.nix
|
||||
./common/signal.nix
|
||||
./common/chromium.nix
|
||||
];
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# xsession.enable = true;
|
||||
|
||||
gtk.enable = true;
|
||||
gtk.theme.name = "Adwaita-dark";
|
||||
gtk.gtk3.extraConfig = {
|
||||
gtk-application-prefer-dark-theme = true;
|
||||
};
|
||||
|
||||
services.redshift = {
|
||||
enable = true;
|
||||
latitude = "53.2603609";
|
||||
longitude = "10.4014691";
|
||||
};
|
||||
|
||||
programs.fish = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
};
|
||||
|
||||
programs.termite = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userName = "Felix Tenley";
|
||||
userEmail = "dev@felschr.com";
|
||||
};
|
||||
|
||||
programs.emacs = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
programs.vscode = {
|
||||
enable = true;
|
||||
# userSettings = {}
|
||||
};
|
||||
|
||||
services.keybase.enable = true;
|
||||
services.kbfs.enable = true;
|
||||
|
||||
programs.chromium = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
programs.firefox.enable = true;
|
||||
|
||||
home.packages = with pkgs; [
|
||||
# system
|
||||
gparted
|
||||
|
||||
# productivity
|
||||
discord
|
||||
|
||||
# development
|
||||
haskellPackages.ghc
|
||||
|
||||
signal-desktop
|
||||
discord
|
||||
keybase-gui
|
||||
# gaming
|
||||
unstable.steam
|
||||
unstable.linux-steam-integration
|
||||
unstable.lutris
|
||||
|
||||
# other
|
||||
unstable.ledger-live-desktop
|
||||
];
|
||||
|
||||
|
|
154
work-pc.nix
154
work-pc.nix
|
@ -1,8 +1,3 @@
|
|||
# Import unstable and home-manager channels:
|
||||
# sudo nix-channel --add http://nixos.org/channels/nixos-unstable nixos-unstable
|
||||
# sudo nix-channel --add https://github.com/rycee/home-manager/archive/release-19.09.tar.gz home-manager
|
||||
# sudo nix-channel --update
|
||||
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
|
@ -11,157 +6,36 @@ let
|
|||
};
|
||||
in
|
||||
{
|
||||
imports =
|
||||
[ # Include the results of the hardware scan.
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
<home-manager/nixos>
|
||||
./home/felschr-work.nix
|
||||
./common/base-hardware.nix
|
||||
./common/gpu-bumblebee.nix
|
||||
./common/system.nix
|
||||
./common/nix.nix
|
||||
./common/i18n.nix
|
||||
./common/x11.nix
|
||||
./common/gtk.nix
|
||||
./common/gnome.nix
|
||||
./common/docker.nix
|
||||
];
|
||||
|
||||
# configure unfree and unstable packages
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
nixpkgs.overlays = [
|
||||
];
|
||||
|
||||
# Use the systemd-boot EFI boot loader.
|
||||
boot.initrd.luks.devices = [
|
||||
{
|
||||
name = "root";
|
||||
device = "/dev/disk/by-partlabel/nixos";
|
||||
preLVM = true;
|
||||
allowDiscards = true;
|
||||
}
|
||||
];
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
networking.hostName = "pilot1-nixos"; # Define your hostname.
|
||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n = {
|
||||
consoleFont = "Lat2-Terminus16";
|
||||
consoleKeyMap = "uk";
|
||||
defaultLocale = "en_GB.UTF-8";
|
||||
inputMethod.enabled = "ibus";
|
||||
inputMethod.ibus.engines = with pkgs.ibus-engines; [ uniemoji ];
|
||||
};
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "Europe/Berlin";
|
||||
|
||||
programs.slock.enable = true;
|
||||
|
||||
environment.shellAliases = {
|
||||
chromium = "chromium --force-dark-mode";
|
||||
};
|
||||
|
||||
# List packages installed in system profile. To search, run:
|
||||
# $ nix search wget
|
||||
environment.systemPackages = with pkgs; [
|
||||
wget
|
||||
curl
|
||||
networkmanager
|
||||
neovim
|
||||
docker-compose
|
||||
|
||||
# gnome3.gnome-screensaver
|
||||
gnome3.dconf-editor
|
||||
gnome3.gnome-tweaks
|
||||
gnomeExtensions.dash-to-panel
|
||||
gnomeExtensions.topicons-plus
|
||||
];
|
||||
|
||||
# Use noto fonts with emoji support
|
||||
fonts.enableDefaultFonts = true;
|
||||
|
||||
# Enable CUPS to print documents.
|
||||
services.printing.enable = true;
|
||||
|
||||
hardware.bluetooth.enable = true;
|
||||
|
||||
# Enable sound.
|
||||
sound.enable = true;
|
||||
hardware.pulseaudio = {
|
||||
enable = true;
|
||||
support32Bit = true;
|
||||
extraModules = [ pkgs.pulseaudio-modules-bt ];
|
||||
package = pkgs.pulseaudioFull;
|
||||
};
|
||||
hardware.bluetooth.extraConfig = "
|
||||
[General]
|
||||
Enable=Source,Sink,Media,Socket
|
||||
";
|
||||
|
||||
# NVIDIA drivers
|
||||
# services.xserver.videoDrivers = [ "intel" "vesa" ];
|
||||
# services.xserver.videoDrivers = [ "nvidia" ];
|
||||
# hardware.nvidia.optimus_prime.enable = true;
|
||||
# hardware.nvidia.optimus_prime.nvidiaBusId = "PCI:2:0:0";
|
||||
# hardware.nvidia.optimus_prime.intelBusId = "PCI:0:2:0";
|
||||
hardware.bumblebee.enable = true;
|
||||
# hardware.bumblebee.connectDisplay = true;
|
||||
hardware.opengl.driSupport32Bit = true;
|
||||
|
||||
# Enable special device support
|
||||
hardware.ledger.enable = true;
|
||||
hardware.u2f.enable = true;
|
||||
|
||||
# Enable the X11 windowing system.
|
||||
services.xserver.enable = true;
|
||||
services.xserver.layout = "gb";
|
||||
services.xserver.xkbOptions = "eurosign:e";
|
||||
|
||||
# Enable Gnome 3
|
||||
services.xserver.displayManager.gdm.enable = true;
|
||||
services.xserver.displayManager.gdm.wayland = false;
|
||||
# services.xserver.displayManager.lightdm.enable = true;
|
||||
|
||||
# services.xserver.windowManager.default = "xmonad";
|
||||
# services.xserver.windowManager.xmonad.enable = true;
|
||||
# services.xserver.windowManager.i3.enable = true;
|
||||
|
||||
services.xserver.desktopManager.gnome3.enable = true;
|
||||
environment.gnome3.excludePackages = with pkgs; [
|
||||
gnome3.geary
|
||||
gnome3.gnome-weather
|
||||
gnome3.gnome-calendar
|
||||
gnome3.gnome-maps
|
||||
gnome3.gnome-contacts
|
||||
gnome3.gnome-software
|
||||
gnome3.gnome-packagekit
|
||||
gnome3.epiphany
|
||||
];
|
||||
|
||||
services.dbus.packages = with pkgs; [
|
||||
gnome3.dconf gnome2.GConf
|
||||
];
|
||||
|
||||
virtualisation.docker.enable = true;
|
||||
virtualisation.virtualbox.host.enable = true;
|
||||
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
users.users.felschr = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" "audio" "docker" "disk" "vboxusers" ]; # Enable ‘sudo’ for the user.
|
||||
extraGroups = [ "wheel" "audio" "docker" "disk" "vboxusers" ];
|
||||
shell = pkgs.fish;
|
||||
};
|
||||
|
||||
nix.autoOptimiseStore = true;
|
||||
# nix.optimise.automatic = true;
|
||||
nix.gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
options = "--delete-older-than 30d";
|
||||
};
|
||||
home-manager.users.felschr = import ./home/felschr-work.nix;
|
||||
|
||||
# This value determines the NixOS release with which your system is to be
|
||||
# compatible, in order to avoid breaking some software such as database
|
||||
# servers. You should change this only after NixOS release notes say you
|
||||
# should.
|
||||
system.stateVersion = "19.09"; # Did you read the comment?
|
||||
# only change this when specified in release notes
|
||||
system.stateVersion = "19.09";
|
||||
|
||||
system.autoUpgrade.enable = true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue