refact(luffy): folder + 24.11 compatibility
This commit is contained in:
parent
2cacfb7907
commit
62605df4b6
2 changed files with 8 additions and 9 deletions
103
machines/luffy/configuration.nix
Normal file
103
machines/luffy/configuration.nix
Normal file
|
@ -0,0 +1,103 @@
|
|||
# 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, ... }:
|
||||
|
||||
{
|
||||
hardware.bluetooth.enable = true;
|
||||
|
||||
# Additional configuration from github/jeremiehuchet/nixos-macbookpro
|
||||
boot.kernelParams = [
|
||||
"hid_apple.fnmode=1"
|
||||
"hid_apple.swap_fn_leftctrl=1"
|
||||
"hid_apple.iso_layout=0"
|
||||
];
|
||||
boot.kernel.sysctl = {
|
||||
"vm.swappiness" = 10;
|
||||
};
|
||||
|
||||
# Bootloader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.systemd-boot.consoleMode = "0";
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
boot.loader.efi.efiSysMountPoint = "/boot/efi";
|
||||
|
||||
networking.hostName = "luffy"; # Define your hostname.
|
||||
networking.extraHosts = ''
|
||||
127.0.0.1 yeswiki.test hedgedoc.nixin.local
|
||||
192.168.36.206 chmok.net
|
||||
fd72:51a6:d583:0:984a:cc56:cf75:dc6 chmok.net
|
||||
'';
|
||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||
|
||||
# Configure network proxy if necessary
|
||||
# networking.proxy.default = "http://user:password@proxy:port/";
|
||||
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||||
|
||||
# Enable networking
|
||||
networking.networkmanager.enable = true;
|
||||
networking.firewall = {
|
||||
enable = true;
|
||||
allowedTCPPorts = [
|
||||
80
|
||||
443
|
||||
];
|
||||
};
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "Europe/Moscow";
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "fr_FR.UTF-8";
|
||||
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "fr_FR.UTF-8";
|
||||
LC_ALL = "fr_FR.UTF-8";
|
||||
LC_IDENTIFICATION = "fr_FR.UTF-8";
|
||||
LC_MEASUREMENT = "fr_FR.UTF-8";
|
||||
LC_MESSAGES = "fr_FR.UTF-8";
|
||||
LC_MONETARY = "fr_FR.UTF-8";
|
||||
LC_NAME = "fr_FR.UTF-8";
|
||||
LC_NUMERIC = "fr_FR.UTF-8";
|
||||
LC_PAPER = "fr_FR.UTF-8";
|
||||
LC_TELEPHONE = "fr_FR.UTF-8";
|
||||
LC_TIME = "fr_FR.UTF-8";
|
||||
};
|
||||
|
||||
# Configure keymap in X11
|
||||
services.xserver = {
|
||||
xkb.layout = "us,ru";
|
||||
xkb.variant = "mac";
|
||||
};
|
||||
|
||||
imports = [
|
||||
../../modules/console.nix
|
||||
../../modules/desktop.nix
|
||||
../../modules/fonts.nix
|
||||
../../modules/home-config.nix
|
||||
../../modules/laptop.nix
|
||||
../../modules/local-dev.nix
|
||||
../../modules/nixos.nix
|
||||
];
|
||||
services.eris-server = {
|
||||
enable = true;
|
||||
backends = [
|
||||
"badger+file:///var/eris?put&get" # local one on /var/eris
|
||||
# "coap+tcp://eris.example.com:5683?get" # an online one
|
||||
];
|
||||
mountpoint = "/mnt/media/eris"; # useful to mount eris-fs folders
|
||||
listenHttp = ":8080"; # or "[::1]:8080"
|
||||
listenCoap = ":5683"; # or "[::1]:5683"
|
||||
decode = true; # for http access via https://127.0.0.1:8080/uri-res/N2R?urn:eris:...
|
||||
package = pkgs.eris-go; # default package
|
||||
};
|
||||
# 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?
|
||||
|
||||
}
|
112
machines/luffy/hardware-configuration.nix
Normal file
112
machines/luffy/hardware-configuration.nix
Normal file
|
@ -0,0 +1,112 @@
|
|||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [
|
||||
(modulesPath + "/hardware/network/broadcom-43xx.nix")
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [
|
||||
"xhci_pci"
|
||||
"nvme"
|
||||
"usbhid"
|
||||
"usb_storage"
|
||||
"sd_mod"
|
||||
];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.blacklistedKernelModules = [ ];
|
||||
boot.extraModulePackages = with config.boot.kernelPackages; [
|
||||
#rtl8192eu
|
||||
];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/d56411cf-7072-48a8-aab7-70fb73695e64";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot/efi" = {
|
||||
device = "/dev/disk/by-uuid/37E1-D07F";
|
||||
fsType = "vfat";
|
||||
};
|
||||
fileSystems."/mnt/nas/music" = {
|
||||
device = "192.168.1.2:/volume1/music";
|
||||
options = [
|
||||
"nfsvers=4.2"
|
||||
"x-systemd.automount"
|
||||
"noauto"
|
||||
"rw"
|
||||
"relatime"
|
||||
"user"
|
||||
"acl"
|
||||
"defaults"
|
||||
];
|
||||
fsType = "nfs";
|
||||
};
|
||||
|
||||
services.rpcbind.enable = true; # needed for NFS
|
||||
systemd.mounts = [
|
||||
{
|
||||
type = "nfs";
|
||||
mountConfig = {
|
||||
Options = "defaults,acl,user,noauto,relatime,rw";
|
||||
};
|
||||
what = "192.168.1.2:/volume1/music";
|
||||
where = "/mnt/nas/music";
|
||||
}
|
||||
];
|
||||
|
||||
systemd.automounts = [
|
||||
{
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
automountConfig = {
|
||||
TimeoutIdleSec = "600";
|
||||
};
|
||||
where = "/mnt/nas/music";
|
||||
}
|
||||
];
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
# still possible to use this option, but it's recommended to use it in conjunction
|
||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
#nixpkgs.config.allowBroken = true;
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
hardware.graphics.enable = true;
|
||||
powerManagement = {
|
||||
# Enable gradually increasing/decreasing CPU frequency, rather than using
|
||||
# "powersave", which would keep CPU frequency at 0.8GHz.
|
||||
cpuFreqGovernor = lib.mkDefault "conservative";
|
||||
|
||||
# brcmfmac being loaded during hibernation would not let a successful resume
|
||||
# https://bugzilla.kernel.org/show_bug.cgi?id=101681#c116.
|
||||
# Also brcmfmac could randomly crash on resume from sleep.
|
||||
powerUpCommands = lib.mkBefore "${pkgs.kmod}/bin/modprobe brcmfmac && ${pkgs.kmod}/bin/modprobe brcmfmac_wcc";
|
||||
powerDownCommands = lib.mkBefore "${pkgs.kmod}/bin/rmmod brcmfmac_wcc && ${pkgs.kmod}/bin/rmmod brcmfmac";
|
||||
};
|
||||
|
||||
# USB subsystem wakes up MBP right after suspend unless we disable it.
|
||||
services.udev.extraRules = lib.mkDefault ''
|
||||
SUBSYSTEM=="pci", KERNEL=="0000:00:14.0", ATTR{power/wakeup}="disabled"
|
||||
'';
|
||||
|
||||
services.logind.extraConfig = ''
|
||||
RuntimeDirectorySize=8G
|
||||
HandleLidSwitchDocked=ignore
|
||||
'';
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue