indentation fix in hosts/main.nix
This commit is contained in:
198
hosts/main.nix
198
hosts/main.nix
@@ -21,22 +21,23 @@
|
|||||||
inputs.home-manager.nixosModules.home-manager
|
inputs.home-manager.nixosModules.home-manager
|
||||||
../users/me/home.nix
|
../users/me/home.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
#home-manager.users.me = import ../users/me/home.nix;
|
||||||
|
|
||||||
# Setup keyfile
|
# Setup keyfile
|
||||||
boot.initrd.secrets = {
|
boot.initrd.secrets = {
|
||||||
"/crypto_keyfile.bin" = null;
|
"/crypto_keyfile.bin" = null;
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/home/me/work" =
|
fileSystems."/home/me/work" = {
|
||||||
{
|
#label = "work";
|
||||||
#label = "work";
|
device = "/dev/disk/by-uuid/fd3c6393-b6fd-4065-baf9-5690eb6ebbed";
|
||||||
device = "/dev/disk/by-uuid/fd3c6393-b6fd-4065-baf9-5690eb6ebbed";
|
fsType = "btrfs";
|
||||||
fsType = "btrfs";
|
neededForBoot = false;
|
||||||
neededForBoot = false;
|
};
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
# Use the GRUB 2 boot loader.
|
# Use the GRUB 2 boot loader.
|
||||||
boot.loader.grub = {
|
boot.loader.grub = {
|
||||||
enable = true;
|
enable = true;
|
||||||
version = 2;
|
version = 2;
|
||||||
@@ -46,16 +47,16 @@
|
|||||||
set timeout=1
|
set timeout=1
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
|
||||||
boot.initrd.luks.devices = {
|
boot.initrd.luks.devices = {
|
||||||
root = {
|
root = {
|
||||||
#name = "root";
|
#name = "root";
|
||||||
device = "/dev/disk/by-uuid/142d2d21-2998-4eb7-9853-ab6554ba061f";
|
device = "/dev/disk/by-uuid/142d2d21-2998-4eb7-9853-ab6554ba061f";
|
||||||
preLVM = true;
|
preLVM = true;
|
||||||
allowDiscards = true;
|
allowDiscards = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
############################# MISC #############################
|
############################# MISC #############################
|
||||||
@@ -73,53 +74,51 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
security.polkit.enable = true;
|
security.polkit.enable = true;
|
||||||
networking.firewall.enable = true;
|
networking.firewall.enable = true;
|
||||||
networking.firewall.allowPing = true;
|
networking.firewall.allowPing = true;
|
||||||
services.samba.openFirewall = true;
|
services.samba.openFirewall = true;
|
||||||
|
|
||||||
# samba
|
# samba
|
||||||
services.samba-wsdd.enable = true; # make shares visible for windows 10 clients
|
services.samba-wsdd.enable = true; # make shares visible for windows 10 clients
|
||||||
networking.firewall.allowedTCPPorts = [
|
networking.firewall.allowedTCPPorts = [
|
||||||
5357 # wsdd
|
5357 # wsdd
|
||||||
];
|
];
|
||||||
networking.firewall.allowedUDPPorts = [
|
networking.firewall.allowedUDPPorts = [
|
||||||
3702 # wsdd
|
3702 # wsdd
|
||||||
];
|
];
|
||||||
services.samba = {
|
services.samba = {
|
||||||
enable = true;
|
enable = true;
|
||||||
securityType = "user";
|
securityType = "user";
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
security = user
|
security = user
|
||||||
map to guest = bad user
|
map to guest = bad user
|
||||||
guest account = me
|
guest account = me
|
||||||
|
|
||||||
server role = standalone server
|
server role = standalone server
|
||||||
workgroup = WORKGROUP
|
workgroup = WORKGROUP
|
||||||
'';
|
'';
|
||||||
shares = {
|
shares = {
|
||||||
rpi_schule = {
|
rpi_schule = {
|
||||||
path = "${workDir}/rpi-schule/";
|
path = "${workDir}/rpi-schule/";
|
||||||
"guest ok" = "yes";
|
"guest ok" = "yes";
|
||||||
"read only" = "no";
|
"read only" = "no";
|
||||||
public = "yes";
|
public = "yes";
|
||||||
writable = "yes";
|
writable = "yes";
|
||||||
printable = "no";
|
printable = "no";
|
||||||
comment = "share for rpi in school wlan";
|
comment = "share for rpi in school wlan";
|
||||||
};
|
};
|
||||||
|
|
||||||
share = {
|
|
||||||
comment = "share for sharing stuff";
|
|
||||||
path = "${workDir}/share";
|
|
||||||
public = "yes";
|
|
||||||
"guest ok" = "yes";
|
|
||||||
"read only" = "no";
|
|
||||||
writable = "yes";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
###############
|
|
||||||
|
|
||||||
|
share = {
|
||||||
|
comment = "share for sharing stuff";
|
||||||
|
path = "${workDir}/share";
|
||||||
|
public = "yes";
|
||||||
|
"guest ok" = "yes";
|
||||||
|
"read only" = "no";
|
||||||
|
writable = "yes";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||||
@@ -177,11 +176,11 @@ export PATH=$PATH:${confDir}/mybin
|
|||||||
HibernateMode=shutdown
|
HibernateMode=shutdown
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# Enable the X11 windowing system.
|
# Enable the X11 windowing system.
|
||||||
services.xserver = {
|
services.xserver = {
|
||||||
enable = true;
|
enable = true;
|
||||||
displayManager = {
|
displayManager = {
|
||||||
defaultSession = "none+xmonad";
|
defaultSession = "none+xmonad";
|
||||||
sessionCommands = ''
|
sessionCommands = ''
|
||||||
xmobar ${confDir}/xmonad/xmobar.hs &
|
xmobar ${confDir}/xmonad/xmobar.hs &
|
||||||
|
|
||||||
@@ -195,8 +194,8 @@ export PATH=$PATH:${confDir}/mybin
|
|||||||
-e "add control = Control_L" \
|
-e "add control = Control_L" \
|
||||||
-e "add mod1 = Alt_L" \
|
-e "add mod1 = Alt_L" \
|
||||||
&
|
&
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
displayManager.lightdm = {
|
displayManager.lightdm = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@@ -207,40 +206,39 @@ export PATH=$PATH:${confDir}/mybin
|
|||||||
default-wallpaper=/usr/share/streets_of_gruvbox.png
|
default-wallpaper=/usr/share/streets_of_gruvbox.png
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
layout = "at";
|
layout = "at";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Configure keymap in X11
|
# Configure keymap in X11
|
||||||
# services.xserver.xkbOptions = "eurosign:e,caps:escape";
|
# services.xserver.xkbOptions = "eurosign:e,caps:escape";
|
||||||
|
|
||||||
# Enable CUPS to print documents.
|
# Enable CUPS to print documents.
|
||||||
# services.printing.enable = true;
|
# services.printing.enable = true;
|
||||||
|
|
||||||
# Enable sound.
|
# Enable sound.
|
||||||
sound.enable = true;
|
sound.enable = true;
|
||||||
hardware.pulseaudio.enable = true;
|
hardware.pulseaudio.enable = true;
|
||||||
|
|
||||||
# Enable touchpad support (enabled default in most desktopManager).
|
# Enable touchpad support (enabled default in most desktopManager).
|
||||||
services.xserver.libinput.enable = true;
|
services.xserver.libinput.enable = true;
|
||||||
|
|
||||||
# List packages installed in system profile. To search, run:
|
# List packages installed in system profile. To search, run:
|
||||||
# $ nix search wget
|
# $ nix search wget
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
vim # Do not forget to add an editor to edit configuration.nix!
|
vim # Do not forget to add an editor to edit configuration.nix!
|
||||||
wget
|
wget
|
||||||
xorg.xmodmap
|
xorg.xmodmap
|
||||||
bluez
|
bluez
|
||||||
];
|
];
|
||||||
|
|
||||||
# This value determines the NixOS release from which the default
|
|
||||||
# settings for stateful data, like file locations and database versions
|
|
||||||
# on your system were taken. It's perfectly fine and recommended to leave
|
|
||||||
# this value at the release version of the first install of this system.
|
|
||||||
# Before changing this value read the documentation for this option
|
|
||||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
|
||||||
system.stateVersion = "23.05"; # Did you read the comment?
|
|
||||||
|
|
||||||
|
# This value determines the NixOS release from which the default
|
||||||
|
# settings for stateful data, like file locations and database versions
|
||||||
|
# on your system were taken. It's perfectly fine and recommended to leave
|
||||||
|
# this value at the release version of the first install of this system.
|
||||||
|
# Before changing this value read the documentation for this option
|
||||||
|
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||||
|
system.stateVersion = "23.05"; # Did you read the comment?
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user