Advertisement
Guest User

Untitled

a guest
Jun 25th, 2021
30
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.39 KB | None | 0 0
  1. # Аутпут для системы
  2.  
  3. nixosConfigurations.t480 = nixpkgs.lib.nixosSystem {
  4. system = "x86_64-linux";
  5. modules =
  6. [
  7. home-manager.nixosModules.home-manager
  8. ({ config, pkgs, ... }:
  9. let
  10. overlay-unstable = final: prev: {
  11. unstable = nixpkgs-unstable.legacyPackages.x86_64-linux;
  12. };
  13. in
  14. {
  15. nixpkgs.overlays = [ overlay-unstable ];
  16. nixpkgs.config.allowUnfree = true;
  17. hardware.pulseaudio.enable = true;
  18. time.timeZone = "Europe/Moscow";
  19. home-manager.useUserPackages = true;
  20. home-manager.useGlobalPkgs = true;
  21. imports = [
  22. ./modules/host/borg.nix
  23. ./modules/host/clamav.nix
  24. ./modules/host/enable-flakes.nix
  25. ./modules/host/fonts.nix
  26. ./modules/host/laptop-hardware-configuration.nix
  27. ./modules/host/laptop-interfaces.nix
  28. ./modules/host/laptop-luks.nix
  29. ./modules/host/laptop-system-packages.nix
  30. ./modules/host/laptop-xorg.nix
  31. ./modules/host/ssh-with-yubikey.nix
  32. ./modules/host/user-hoodoo.nix
  33. ];
  34. home-manager.users.hoodoo = { pkgs, ... }: {
  35. imports = [
  36. ./modules/user/bash.nix
  37. ./modules/user/emacs.nix
  38. ./modules/user/git-client.nix
  39. ./modules/user/mail-client.nix
  40. ./modules/user/rofi.nix
  41. ./modules/user/termite.nix
  42. ./modules/user/user-packages.nix
  43. ];
  44. };
  45. system.stateVersion = "21.05";
  46. })
  47. ];
  48.  
  49. [nixos@nixos:/run/media/nixos/c2a8796f-46c1-4c84-8366-43ea6ea160b4/INSTALL/wtfflake]$ cat modules/host/laptop-hardware-configuration.nix
  50. # Do not modify this file! It was generated by ‘nixos-generate-config’
  51. # and may be overwritten by future invocations. Please make changes
  52. # to /etc/nixos/configuration.nix instead.
  53. { config, lib, pkgs, modulesPath, ... }:
  54.  
  55. {
  56. imports =
  57. [ (modulesPath + "/installer/scan/not-detected.nix")
  58. ];
  59.  
  60. boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "usbhid" "uas" "sd_mod" ];
  61. boot.initrd.kernelModules = [ "dm-snapshot" ];
  62. boot.kernelModules = [ "kvm-intel" ];
  63. boot.extraModulePackages = [ ];
  64.  
  65. fileSystems."/" =
  66. { device = "/dev/disk/by-uuid/1abe65eb-ea59-4c35-a53f-1e9c1701dfc1";
  67. fsType = "ext4";
  68. };
  69.  
  70. fileSystems."/boot/efi" =
  71. { device = "/dev/disk/by-uuid/35AE-D6BA";
  72. fsType = "vfat";
  73. };
  74.  
  75. swapDevices =
  76. [ { device = "/dev/disk/by-uuid/552bbbde-3054-4b5e-829b-28ee5126ffbd"; }
  77. ];
  78.  
  79. powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
  80. }
  81.  
  82. [nixos@nixos:/run/media/nixos/c2a8796f-46c1-4c84-8366-43ea6ea160b4/INSTALL/wtfflake]$ cat modules/host/laptop-luks.nix
  83. { config, pkgs, ... }:
  84. {
  85. boot.loader.systemd-boot.enable = true;
  86. boot.loader.efi.canTouchEfiVariables = true;
  87. boot.loader.efi.efiSysMountPoint = "/boot/efi";
  88. boot.loader.grub = {
  89. enable = true;
  90. device = "nodev";
  91. version = 2;
  92. efiSupport = true;
  93. enableCryptodisk = true;
  94. };
  95. boot.initrd = {
  96. luks.devices."root" = {
  97. device = "/dev/disk/by-uuid/09aedaee-45c1-4c5d-b762-d13bf5fbd028";
  98. preLVM = true;
  99. keyFile = "/keyfile0.bin";
  100. allowDiscards = true;
  101. };
  102. secrets = {
  103. # Create /mnt/etc/secrets/initrd directory and copy keys to it
  104. "keyfile0.bin" = "/etc/secrets/initrd/keyfile0.bin";
  105. };
  106. };
  107. }
  108.  
  109.  
  110.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement