This commit is contained in:
stubbfel
2018-02-15 20:33:05 +01:00
commit e20fd36a84
13 changed files with 147 additions and 0 deletions

2
.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
hardware-configuration.nix
result

10
boot.nix Normal file
View File

@@ -0,0 +1,10 @@
{ config, pkgs, ... }:
{
# Use the GRUB 2 boot loader.
boot.loader.grub = {
enable = true;
version = 2;
device = "/dev/sda";
};
}

33
configuration.nix Normal file
View File

@@ -0,0 +1,33 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{ config, pkgs, ... }:
{
imports =
[
./hardware-configuration.nix
./boot.nix
./i18n.nix
./network.nix
./programs/installed.nix
./services/enabled.nix
./users.nix
./desktop.nix
./setup.nix
];
nixpkgs.config.allowUnfree = true;
nix.gc.automatic = true;
nix.gc.dates = "03:15";
# 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 = "17.09"; # Did you read the comment?
autoUpgrade.enable = true;
};
}

16
desktop.nix Normal file
View File

@@ -0,0 +1,16 @@
{ config, pkgs, ... }:
{
services.xserver.enable = true;
services.xserver.displayManager.lightdm = {
enable = true;
autoLogin = {
enable = true;
user = "devel";
};
};
services.xserver.desktopManager = {
xfce.enable = true;
default = "xfce";
};
}

12
i18n.nix Normal file
View File

@@ -0,0 +1,12 @@
{ config, pkgs, ... }:
{
# Select internationalisation properties.
i18n = {
consoleKeyMap = "de";
defaultLocale = "de_DE.UTF-8";
};
# Set your time zone.
time.timeZone = "Europe/Amsterdam";
}

5
network.nix Normal file
View File

@@ -0,0 +1,5 @@
{ config, pkgs, ... }:
{
networking.hostName = "develnix";
}

9
programs/devel_progs.nix Normal file
View File

@@ -0,0 +1,9 @@
{ config, pkgs, ... }:
{
environment.systemPackages = with pkgs; [
firefox gitAndTools.gitFull git-cola git-crecord gitAndTools.git-extras git-lfs
gitAndTools.gitflow zsh-git-prompt cmakeWithGui qtcreator codeblocksFull eclipses.eclipse-cpp eclipses.eclipse-sdk clang gcc
gcc_multi automake atom kmod linuxHeaders linuxPackages.kernel.dev linuxPackages.kernel tilix tmux screen bash
];
}

13
programs/installed.nix Normal file
View File

@@ -0,0 +1,13 @@
{ config, pkgs, ... }:
{
environment.systemPackages = with pkgs; [
wget curl vim nano zsh fzf
];
imports =
[
./zsh.nix
./devel_progs.nix
];
}

14
programs/zsh.nix Normal file
View File

@@ -0,0 +1,14 @@
{ config, pkgs, ... }:
{
programs.zsh = {
ohMyZsh = {
enable = true;
plugins = ["git" "git-extras" "git-flow"];
};
enable = true;
enableAutosuggestions = true;
enableCompletion = true;
syntaxHighlighting.enable = true;
};
}

8
services/enabled.nix Normal file
View File

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

6
services/sshd.nix Normal file
View File

@@ -0,0 +1,6 @@
{ config, pkgs, ... }:
{
services.openssh.forwardX11 = true;
services.openssh.enable = true;
}

6
setup.nix Normal file
View File

@@ -0,0 +1,6 @@
{ config, pkgs, ... }:
{
services.openssh.permitRootLogin = "yes";
environment.systemPackages = [pkgs.nix-repl];
}

13
users.nix Normal file
View File

@@ -0,0 +1,13 @@
{ config, pkgs, ... }:
let
myPublicSshKeys = {openssh.authorizedKeys.keys = ["ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDKShnz3ceVcg3axVXv/GGcjyFAfcjuDR1i5o6JzVvnmlWpWvClnYSBNb/oEDDq5pSPSBvCYp2HwZpmkYEV/C3lBbUsmLtOlUrzkm0ibgHraTVyHUq3OSYckXEvUYRCCtGqvRRehERrhPZV6oXBE8aBUk26xTpOJpLFPy7spF4sBwKPSE2igTIYtJSfJYi3wn2KoW1q1RLMasC4fdvgNCVIxxBq72uMcRUcPc4jL8n11UFfepJrwSQ7Z7KxsZXdz5JFVl6QEE6cVSSEAuuEefNYANrp5S3h/lUowrUOcu0ml2c7CJWPpaOb4GvFlio4woc0lCATrA2341V0xshl40Xd dev@stubbfe"];};
in
{
security.sudo.enable = true;
security.sudo.wheelNeedsPassword = false;
users = {
defaultUserShell = pkgs.zsh;
extraUsers.devel = myPublicSshKeys // { isNormalUser = true; home = "/home/devel"; extraGroups = [ "wheel"]; password = "devel";};
};
}