Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Аутпут для системы
- nixosConfigurations.t480 = nixpkgs.lib.nixosSystem {
- system = "x86_64-linux";
- modules =
- [
- home-manager.nixosModules.home-manager
- ({ config, pkgs, ... }:
- let
- overlay-unstable = final: prev: {
- unstable = nixpkgs-unstable.legacyPackages.x86_64-linux;
- };
- in
- {
- nixpkgs.overlays = [ overlay-unstable ];
- nixpkgs.config.allowUnfree = true;
- hardware.pulseaudio.enable = true;
- time.timeZone = "Europe/Moscow";
- home-manager.useUserPackages = true;
- home-manager.useGlobalPkgs = true;
- imports = [
- ./modules/host/borg.nix
- ./modules/host/clamav.nix
- ./modules/host/enable-flakes.nix
- ./modules/host/fonts.nix
- ./modules/host/laptop-hardware-configuration.nix
- ./modules/host/laptop-interfaces.nix
- ./modules/host/laptop-luks.nix
- ./modules/host/laptop-system-packages.nix
- ./modules/host/laptop-xorg.nix
- ./modules/host/ssh-with-yubikey.nix
- ./modules/host/user-hoodoo.nix
- ];
- home-manager.users.hoodoo = { pkgs, ... }: {
- imports = [
- ./modules/user/bash.nix
- ./modules/user/emacs.nix
- ./modules/user/git-client.nix
- ./modules/user/mail-client.nix
- ./modules/user/rofi.nix
- ./modules/user/termite.nix
- ./modules/user/user-packages.nix
- ];
- };
- system.stateVersion = "21.05";
- })
- ];
- [nixos@nixos:/run/media/nixos/c2a8796f-46c1-4c84-8366-43ea6ea160b4/INSTALL/wtfflake]$ cat modules/host/laptop-hardware-configuration.nix
- # 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" "nvme" "usb_storage" "usbhid" "uas" "sd_mod" ];
- boot.initrd.kernelModules = [ "dm-snapshot" ];
- boot.kernelModules = [ "kvm-intel" ];
- boot.extraModulePackages = [ ];
- fileSystems."/" =
- { device = "/dev/disk/by-uuid/1abe65eb-ea59-4c35-a53f-1e9c1701dfc1";
- fsType = "ext4";
- };
- fileSystems."/boot/efi" =
- { device = "/dev/disk/by-uuid/35AE-D6BA";
- fsType = "vfat";
- };
- swapDevices =
- [ { device = "/dev/disk/by-uuid/552bbbde-3054-4b5e-829b-28ee5126ffbd"; }
- ];
- powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
- }
- [nixos@nixos:/run/media/nixos/c2a8796f-46c1-4c84-8366-43ea6ea160b4/INSTALL/wtfflake]$ cat modules/host/laptop-luks.nix
- { config, pkgs, ... }:
- {
- boot.loader.systemd-boot.enable = true;
- boot.loader.efi.canTouchEfiVariables = true;
- boot.loader.efi.efiSysMountPoint = "/boot/efi";
- boot.loader.grub = {
- enable = true;
- device = "nodev";
- version = 2;
- efiSupport = true;
- enableCryptodisk = true;
- };
- boot.initrd = {
- luks.devices."root" = {
- device = "/dev/disk/by-uuid/09aedaee-45c1-4c5d-b762-d13bf5fbd028";
- preLVM = true;
- keyFile = "/keyfile0.bin";
- allowDiscards = true;
- };
- secrets = {
- # Create /mnt/etc/secrets/initrd directory and copy keys to it
- "keyfile0.bin" = "/etc/secrets/initrd/keyfile0.bin";
- };
- };
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement