Compare commits
4 commits
11499b5109
...
8aaabd5585
Author | SHA1 | Date | |
---|---|---|---|
8aaabd5585 | |||
fa6cf08b3a | |||
21ce9728f3 | |||
ca4cafb4f0 |
3 changed files with 40 additions and 2 deletions
hosts/home
|
@ -1,8 +1,10 @@
|
||||||
{ config, ... }:
|
{ config, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
# Include the results of the hardware scan.
|
imports = [
|
||||||
imports = [ ./generated.nix ];
|
./generated.nix # Include the results of the hardware scan.
|
||||||
|
./nfs.nix
|
||||||
|
];
|
||||||
|
|
||||||
# Add support of usb
|
# Add support of usb
|
||||||
boot.initrd.availableKernelModules = [ "usb_storage" ];
|
boot.initrd.availableKernelModules = [ "usb_storage" ];
|
||||||
|
@ -35,12 +37,16 @@
|
||||||
|
|
||||||
# All monitors in the right order
|
# All monitors in the right order
|
||||||
# Source: https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/services/x11/xserver.nix#L83
|
# Source: https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/services/x11/xserver.nix#L83
|
||||||
|
#
|
||||||
|
# To see references use the following command
|
||||||
|
# man xorg.conf
|
||||||
services.xserver.xrandrHeads = [
|
services.xserver.xrandrHeads = [
|
||||||
{
|
{
|
||||||
output = "DP-3";
|
output = "DP-3";
|
||||||
monitorConfig = ''
|
monitorConfig = ''
|
||||||
Option "PreferredMode" "1920x1080"
|
Option "PreferredMode" "1920x1080"
|
||||||
# Option "Rotate" "right"
|
# Option "Rotate" "right"
|
||||||
|
Option "Position" "0 361"
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
|
@ -48,6 +54,7 @@
|
||||||
primary = true;
|
primary = true;
|
||||||
monitorConfig = ''
|
monitorConfig = ''
|
||||||
Option "PreferredMode" "2560x1440"
|
Option "PreferredMode" "2560x1440"
|
||||||
|
Option "Position" "1920 0"
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
29
hosts/home/hardware-configuration/nfs.nix
Normal file
29
hosts/home/hardware-configuration/nfs.nix
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
{ ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
fileSystems."/export/mynix" = {
|
||||||
|
device = "/home/jan/mynix";
|
||||||
|
options = [ "bind" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/export/projects" = {
|
||||||
|
device = "/home/jan/projects";
|
||||||
|
options = [ "bind" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
services.nfs.server = {
|
||||||
|
enable = true;
|
||||||
|
lockdPort = 4001;
|
||||||
|
mountdPort = 4002;
|
||||||
|
statdPort = 4000;
|
||||||
|
exports = ''
|
||||||
|
/export 192.168.0.0/24(rw,fsid=0,no_subtree_check)
|
||||||
|
/export/mynix 192.168.0.0/24(rw,nohide,insecure,no_subtree_check)
|
||||||
|
/export/projects 192.168.0.0/24(rw,nohide,insecure,no_subtree_check)
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
networking.firewall = {
|
||||||
|
allowedTCPPorts = [ 111 2049 4000 4001 4002 20048 ];
|
||||||
|
allowedUDPPorts = [ 111 2049 4000 4001 4002 20048 ];
|
||||||
|
};
|
||||||
|
}
|
|
@ -12,8 +12,10 @@
|
||||||
section: links
|
section: links
|
||||||
home:
|
home:
|
||||||
left = macbook-pro
|
left = macbook-pro
|
||||||
|
down = macbook-pro
|
||||||
macbook-pro:
|
macbook-pro:
|
||||||
right = home
|
right = home
|
||||||
|
up = home
|
||||||
end
|
end
|
||||||
section: options
|
section: options
|
||||||
# Включение синхронизации буфера обмена
|
# Включение синхронизации буфера обмена
|
||||||
|
|
Loading…
Add table
Reference in a new issue