liminix

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

configuration.nix (1137B)


      1 {
      2   config,
      3   pkgs,
      4   modulesPath,
      5   ...
      6 }:
      7 let
      8   inherit (pkgs.pseudofile) dir;
      9 
     10   svc = config.system.service;
     11 
     12 in
     13 rec {
     14   imports = [
     15     "${modulesPath}/dhcp6c"
     16     "${modulesPath}/dnsmasq"
     17     "${modulesPath}/firewall"
     18     "${modulesPath}/hostapd"
     19     "${modulesPath}/network"
     20     "${modulesPath}/ssh"
     21     "${modulesPath}/mount"
     22     "${modulesPath}/mdevd.nix"
     23   ];
     24 
     25   filesystem = dir { srv = dir { }; };
     26 
     27   kernel = {
     28     config = {
     29       USB = "y";
     30       USB_EHCI_HCD = "y";
     31       USB_EHCI_HCD_PLATFORM = "y";
     32       USB_OHCI_HCD = "y";
     33       USB_OHCI_HCD_PLATFORM = "y";
     34       USB_SUPPORT = "y";
     35       USB_COMMON = "y";
     36       USB_STORAGE = "y";
     37       USB_STORAGE_DEBUG = "n";
     38       USB_UAS = "y";
     39       USB_ANNOUNCE_NEW_DEVICES = "y";
     40       SCSI = "y";
     41       BLK_DEV_SD = "y";
     42       USB_PRINTER = "y";
     43       MSDOS_PARTITION = "y";
     44       EFI_PARTITION = "y";
     45       EXT4_FS = "y";
     46       EXT4_USE_FOR_EXT2 = "y";
     47       FS_ENCRYPTION = "y";
     48     };
     49   };
     50 
     51   rootfsType = "jffs2";
     52   hostname = "inout";
     53 
     54   services.mount_backup_disk = svc.mount.build {
     55     partlabel = "backup-disk";
     56     mountpoint = "/srv";
     57     fstype = "ext4";
     58   };
     59 }