Size: a a a

2020 April 23

ц

ц in NixOS
Надежда Крюкова
cat /etc/nixos/configuration.nix


{ config, pkgs, ... }:

{
 imports =
   [ # Include the results of the hardware scan.
     ./hardware-configuration.nix
   ];

 boot.loader.grub.enable = true;
 boot.loader.grub.version = 2;
 boot.loader.grub.device = "/dev/sda"; # or "nodev" for efi only
 virtualisation.docker.enable = true;
 virtualisation.virtualbox.host.enable = true;
 virtualisation.virtualbox.guest.enable = false;
 virtualisation.virtualbox.host.enableExtensionPack = true;

 networking.hostName = "nixos"; # Define your hostname.
 networking.networkmanager.enable = true;
 services.tor.enable = true;
 services.tor.client.enable = true;

 networking.useDHCP = false;
 networking.interfaces.enp5s0.useDHCP = true;
 networking.interfaces.wlp9s0.useDHCP = true;

 
   i18n = {
     consoleFont = "cyr-sun16";
     consoleKeyMap = "ru";
     defaultLocale = "ru_RU.UTF-8";
   };

 # Set your time zone.
   time.timeZone = "Europe/Moscow";

 # List packages installed in system profile. To search, run:
 # $ nix search wget
   environment.systemPackages = with pkgs; [
     polkit_gnome htop chromium electrum gajim git keepassxc stow tdesktop thunderbird tor-browser-bundle-bin
     transmission-gtk zathura unrar lm_sensors gimp
   ];
   
   nixpkgs.config.allowUnfree = true;
   programs.iotop.enable = true;

   let
     tarball = builtins.fetchTarball https://github.com/NixOS/nixpkgs/archive/19.09.tar.gz;
     pinned = import tarball {};
   in
   {
     environment.systemPackages = [ pinned.virtualbox ];
   }

  ports in the firewall.
 # networking.firewall.allowedTCPPorts = [ ... ];
 # networking.firewall.allowedUDPPorts = [ ... ];
 # Or disable the firewall altogether.
   networking.firewall.enable = true;

 

 
   sound.enable = true;
   hardware.pulseaudio.enable = true;

 
   services.xserver.autorun = true;
   services.xserver.enable = true;
   services.xserver.layout = "us, ru";
   services.xserver.xkbOptions = "grp:alt_shift_toggle";
   services.xserver.videoDrivers = [ "intel" ];
   

 

   services.xserver.displayManager.auto.enable = true;
   services.xserver.displayManager.auto.user = "andrew";

 # Enable touchpad support.
   services.xserver.libinput.enable = true;

 # Enable the KDE Desktop Environment.
 # services.xserver.displayManager.sddm.enable = true;
 # services.xserver.desktopManager.plasma5.enable = true;

 # Enable the XFCE Desktop Enviroment.

   services.xserver.desktopManager = {
     xfce.enable = true;
     default = "xfce";
  };          

 # Define a user account. Don't forget to set a password with ‘passwd’.
   users.users.vika = {
     description = "Taras Bulba";
     isNormalUser = true;
     extraGroups = [ "wheel" "networkmanager" "sudo" "docker" "vboxusers" ]; # Enable ‘sudo’ for the user.
   };
   security.sudo.wheelNeedsPassword = false;

 
 system.stateVersion = "19.09"; # Did you read the comment?

}
{ config, pkgs, ... }:
let
 tarball = builtins.fetchTarball "https://github.com/NixOS/nixpkgs/archive/19.09.tar.gz";
 pinned = import tarball {};
in
{
 imports =
   [ # Include the results of the hardware scan.
     ./hardware-configuration.nix
   ];

 boot.loader.grub.enable = true;
 boot.loader.grub.version = 2;
 boot.loader.grub.device = "/dev/sda"; # or "nodev" for efi only
 virtualisation.docker.enable = true;
 virtualisation.virtualbox.host.enable = true;
 virtualisation.virtualbox.guest.enable = false;
 virtualisation.virtualbox.host.enableExtensionPack = true;

 networking.hostName = "nixos"; # Define your hostname.
 networking.networkmanager.enable = true;
 services.tor.enable = true;
 services.tor.client.enable = true;

 networking.useDHCP = false;
 networking.interfaces.enp5s0.useDHCP = true;
 networking.interfaces.wlp9s0.useDHCP = true;

 
   i18n = {
     consoleFont = "cyr-sun16";
     consoleKeyMap = "ru";
     defaultLocale = "ru_RU.UTF-8";
   };

 # Set your time zone.
   time.timeZone = "Europe/Moscow";

 # List packages installed in system profile. To search, run:
 # $ nix search wget
   environment.systemPackages = with pkgs; [
     polkit_gnome htop chromium electrum gajim git keepassxc stow tdesktop thunderbird tor-browser-bundle-bin
     transmission-gtk zathura unrar lm_sensors gimp pinned.virtualbox
   ];
   
   nixpkgs.config.allowUnfree = true;
   programs.iotop.enable = true;

  ports in the firewall.
 # networking.firewall.allowedTCPPorts = [ ... ];
 # networking.firewall.allowedUDPPorts = [ ... ];
 # Or disable the firewall altogether.
   networking.firewall.enable = true;

 

 
   sound.enable = true;
   hardware.pulseaudio.enable = true;

 
   services.xserver.autorun = true;
   services.xserver.enable = true;
   services.xserver.layout = "us, ru";
   services.xserver.xkbOptions = "grp:alt_shift_toggle";
   services.xserver.videoDrivers = [ "intel" ];
   

 

   services.xserver.displayManager.auto.enable = true;
   services.xserver.displayManager.auto.user = "andrew";

 # Enable touchpad support.
   services.xserver.libinput.enable = true;

 # Enable the KDE Desktop Environment.
 # services.xserver.displayManager.sddm.enable = true;
 # services.xserver.desktopManager.plasma5.enable = true;

 # Enable the XFCE Desktop Enviroment.

   services.xserver.desktopManager = {
     xfce.enable = true;
     default = "xfce";
  };          

 # Define a user account. Don't forget to set a password with ‘passwd’.
   users.users.vika = {
     description = "Taras Bulba";
     isNormalUser = true;
     extraGroups = [ "wheel" "networkmanager" "sudo" "docker" "vboxusers" ]; # Enable ‘sudo’ for the user.
   };
   security.sudo.wheelNeedsPassword = false;

 
 system.stateVersion = "19.09"; # Did you read the comment?

}
источник

ц

ц in NixOS
Но вероятнее всего нужно сделать вот так:
источник

ц

ц in NixOS
virtualisation.virtualbox.host.enable = true;
virtualisation.virtualbox.host.package = pinned.virtualbox;
источник

АБ

Александр Бантьев in NixOS
Alexander N.
мне кажется еще кавычки у урла потеряли
Урлы можно без кавычек
источник

НК

Надежда Крюкова in NixOS
Ни первый ни второй варианты не отработали. Ошибки, error: attempt to call something which is not a function but a set, at /etc/nixos/configuration.nix:12:3
источник

ц

ц in NixOS
Надежда Крюкова
Ни первый ни второй варианты не отработали. Ошибки, error: attempt to call something which is not a function but a set, at /etc/nixos/configuration.nix:12:3
источник

ц

ц in NixOS
Я выпилил недозакоменченые коментарии
источник

ц

ц in NixOS
Возьми редактор с подсветкой синтаксиса, там видно что не так
источник

ц

ц in NixOS
В nano есть
источник

НК

Надежда Крюкова in NixOS
Вывод стал таким теперь
источник

НК

Надежда Крюкова in NixOS
sudo nixos-rebuild test
building Nix...
building the system configuration...
warning: unable to download 'https://github.com/NixOS/nixpkgs/archive/19.09.tar.gz': HTTP error 500; retrying in 352 ms
warning: unable to download 'https://github.com/NixOS/nixpkgs/archive/19.09.tar.gz': HTTP error 500; retrying in 554 ms
warning: unable to download 'https://github.com/NixOS/nixpkgs/archive/19.09.tar.gz': HTTP error 500; retrying in 1238 ms
warning: unable to download 'https://github.com/NixOS/nixpkgs/archive/19.09.tar.gz': HTTP error 504; retrying in 2534 ms
error: unable to download 'https://github.com/NixOS/nixpkgs/archive/19.09.tar.gz': HTTP error 504
(use '--show-trace' to show detailed location information)
источник

НК

Надежда Крюкова in NixOS
Такие строчки был добавлены
источник

НК

Надежда Крюкова in NixOS
<   let
<     tarball = builtins.fetchTarball "https://github.com/NixOS/nixpkgs/archive/19.09.tar.gz";
<     pinned = import tarball {};
<   in
<
31,32c26
<   virtualisation.virtualbox.host.package = pinned.virtualbox;
источник

֍֎

֍ ֎ in NixOS
Надежда Крюкова
sudo nixos-rebuild test
building Nix...
building the system configuration...
warning: unable to download 'https://github.com/NixOS/nixpkgs/archive/19.09.tar.gz': HTTP error 500; retrying in 352 ms
warning: unable to download 'https://github.com/NixOS/nixpkgs/archive/19.09.tar.gz': HTTP error 500; retrying in 554 ms
warning: unable to download 'https://github.com/NixOS/nixpkgs/archive/19.09.tar.gz': HTTP error 500; retrying in 1238 ms
warning: unable to download 'https://github.com/NixOS/nixpkgs/archive/19.09.tar.gz': HTTP error 504; retrying in 2534 ms
error: unable to download 'https://github.com/NixOS/nixpkgs/archive/19.09.tar.gz': HTTP error 504
(use '--show-trace' to show detailed location information)
Гитхаб лег
источник

E

ElXreno in NixOS
֍ ֎
Гитхаб лег
3-й день подряд то работает, то падает.
источник

НК

Надежда Крюкова in NixOS
да лег точно
источник

E

ElXreno in NixOS
источник

֍֎

֍ ֎ in NixOS
Я на смски подписался, 5 минут назад пришло
источник

N

Nikolay in NixOS
֍ ֎
Гитхаб лег
вот он вендорлок: гитхаб лег - система окирпичилась..
источник

АБ

Александр Бантьев in NixOS
Nikolay
вот он вендорлок: гитхаб лег - система окирпичилась..
Не, просто обновить нельзя
источник