This commit is contained in:
Valentin Boettcher 2018-05-04 18:33:35 +02:00
parent 54745bf85d
commit 9d6e76eae7
5 changed files with 151 additions and 14 deletions

37
#services.nix# Normal file
View file

@ -0,0 +1,37 @@
{ config, pkgs, ...}:
{
imports = [
(import ./compton.nix {inherit config pkgs; })
];
services = {
xserver = {
enable = true;
layout = "us,de";
libinput = {
enable = true;
};
displayManager.sdd.enable = true;
windowManager = {
i3.enable = true;
default = "i3";
};
};
printing = {
enable = true;
drivers = (with pkgs; [ gutenprint splix ]);
};
acpid.enable = true;
emacs.enable = true;
#openssh.enable = true;
};
}

View file

@ -7,13 +7,13 @@
(import ./packages.nix {inherit config pkgs; })
(import ./services.nix {inherit config pkgs; })
];
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
# Enable BCACHEFS
boot.supportedFilesystems = [ "bcachefs" ];
boot.supportedFilesystems = [ "bcachefs" "btrfs" ];
# Set your time zone.
time.timeZone = "Europe/Berlin";
@ -24,6 +24,9 @@
# Fish
programs.fish.enable = true;
# CCache
programs.ccache.enable = true;
# Users
users.mutableUsers = false;
users.extraUsers.hiro = {
@ -62,4 +65,56 @@
# Auto Upgrades
system.autoUpgrade.enable = true;
system.autoUpgrade.channel = https://nixos.org/channels/nixos-unstable;
# Samba
fileSystems."/media/server" = {
device = "//192.168.0.110/Vale";
fsType = "cifs";
options = let
# this line prevents hanging on network split
automount_opts =
"x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s,uid=hiro";
in ["${automount_opts},credentials=/etc/nixos/smb-secrets"];
};
fileSystems."/media/share" = {
device = "//192.168.0.110/Share";
fsType = "cifs";
options = let
# this line prevents hanging on network split
automount_opts =
"x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s,uid=hiro";
in ["${automount_opts},credentials=/etc/nixos/smb-secrets"];
};
# Brightness
programs.light.enable = true;
# containers.webtest =
# {
# bindMounts =
# {
# "/home" = {
# hostPath = "/home/hiro/Documents/Projects/SimuNovaWeb/implementation/build";
# isReadOnly = true;
# };
# };
# config =
# { config, pkgs, ... }:
# {
# services.httpd.enable = true;
# services.httpd.adminAddr = "valentin@boettcher.cf";
# services.httpd.enablePHP = true;
# services.httpd.documentRoot = "/home";
# services.httpd.phpOptions = ''
# sendmail_path = /run/wrappers/bin/sendmail -t -i
# '';
# services.postfix = {
# enable = true;
# };
# };
# };
}

View file

@ -1,5 +1,4 @@
{ config, pkgs, ...}:
let
nixcfg = {
allowUnfree = true;
@ -20,7 +19,9 @@ let
xclip
xst
git
busybox
xkb_switch
alsaUtils
openssl
]) ++ (with rolling; [
firefox
thunderbird
@ -28,6 +29,7 @@ let
google-play-music-desktop-player
file
i3status-rust
udiskie
]);
extra = (with rolling; [
@ -40,7 +42,9 @@ let
sassc
librsvg
bc
unison
redshift
compton
firefox
gimp
@ -50,9 +54,26 @@ let
feh
rofi
]);
dunst
games = (with edge; [
anki
calibre
vlc
texlive.combined.scheme-full
gwenview
tdesktop
# Term Stuff
tree
todo-txt-cli
nox
]) ++ (with edge; [
bitwig-studio
]);
games = (with rolling; [
superTuxKart
]);
@ -62,7 +83,10 @@ let
automake
boot
cmake
gcc
ccache
clang
binutils
lld
ghc
gnumake
rustc

View file

@ -1,6 +1,7 @@
{ config, pkgs, ...}:
{
nixpkgs.config.allowUnfree = true;
imports = [
(import ./compton.nix {inherit config pkgs; })
];
@ -8,13 +9,13 @@
services = {
xserver = {
enable = true;
layout = "us";
layout = "us,de";
libinput = {
enable = true;
};
displayManager.sddm.enable = true;
displayManager.lightdm.enable = true;
windowManager = {
i3.enable = true;
@ -22,16 +23,34 @@
};
};
avahi = {
enable = true;
nssmdns = true;
};
printing = {
enable = true;
drivers = (with pkgs; [ gutenprint splix ]);
};
};
acpid.enable = true;
emacs.enable = true;
# todo : look into conf of ssh.
#openssh.enable = true;
};
systemd.user.services."udiskie" = {
enable = true;
description = "udiskie to automount removable media";
wantedBy = [ "default.target" ];
path = with pkgs; [
gnome3.defaultIconTheme
gnome3.gnome_themes_standard
pythonPackages.udiskie
];
environment.XDG_DATA_DIRS="${pkgs.gnome3.defaultIconTheme}/share:${pkgs.gnome3.gnome_themes_standard}/share";
serviceConfig.Restart = "always";
serviceConfig.RestartSec = 2;
serviceConfig.ExecStart = "${pkgs.python27Packages.udiskie}/bin/udiskie -a -t -n -F ";
};
}

2
smb-secrets Normal file
View file

@ -0,0 +1,2 @@
username=sambavale
password=DsAgeviNZ.