feat(machines): add sabo as nixos machine
This commit is contained in:
parent
9f9fe87d00
commit
8679ede69b
2 changed files with 163 additions and 0 deletions
104
machines/sabo/configuration.nix
Normal file
104
machines/sabo/configuration.nix
Normal file
|
@ -0,0 +1,104 @@
|
||||||
|
# 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/Paris";
|
||||||
|
|
||||||
|
# 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
|
||||||
|
../../modules/systemd-unfreeze.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?
|
||||||
|
|
||||||
|
}
|
59
machines/sabo/hardware-configuration.nix
Normal file
59
machines/sabo/hardware-configuration.nix
Normal file
|
@ -0,0 +1,59 @@
|
||||||
|
# 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 + "/installer/scan/not-detected.nix")
|
||||||
|
];
|
||||||
|
|
||||||
|
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "uas" "sd_mod" ];
|
||||||
|
boot.initrd.kernelModules = [ ];
|
||||||
|
boot.kernelModules = [ "kvm-intel" ];
|
||||||
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
|
fileSystems."/" =
|
||||||
|
{ device = "/dev/disk/by-uuid/62a9eb3b-801e-4a1d-b945-39e71d036973";
|
||||||
|
fsType = "btrfs";
|
||||||
|
options = [ "subvol=@" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
boot.initrd.luks.devices."nixos-root".device = "/dev/disk/by-uuid/7d512c0d-d47f-488e-ac15-6b91410b1e0b";
|
||||||
|
|
||||||
|
fileSystems."/boot" =
|
||||||
|
{ device = "/dev/disk/by-uuid/5767-963F";
|
||||||
|
fsType = "vfat";
|
||||||
|
options = [ "fmask=0022" "dmask=0022" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/home" =
|
||||||
|
{ device = "/dev/disk/by-uuid/62a9eb3b-801e-4a1d-b945-39e71d036973";
|
||||||
|
fsType = "btrfs";
|
||||||
|
options = [ "subvol=@home" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/nix" =
|
||||||
|
{ device = "/dev/disk/by-uuid/62a9eb3b-801e-4a1d-b945-39e71d036973";
|
||||||
|
fsType = "btrfs";
|
||||||
|
options = [ "subvol=@nix" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/var/log" =
|
||||||
|
{ device = "/dev/disk/by-uuid/62a9eb3b-801e-4a1d-b945-39e71d036973";
|
||||||
|
fsType = "btrfs";
|
||||||
|
options = [ "subvol=@log" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
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.enp0s20f0u7.useDHCP = lib.mkDefault true;
|
||||||
|
|
||||||
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue