Adds, clearing...

This commit is contained in:
Dmitriy Holkin 2019-09-18 02:23:45 +04:00
parent 67641d3b97
commit e4d33ff8b4
7 changed files with 46 additions and 17 deletions

View File

@ -2,14 +2,7 @@
imports = [
./applications/packages.nix
./applications/rofi.nix
# ./applications/kate.nix
# ./applications/emacs
# ./applications/xst.nix
# ./applications/trojita.nix
# ./applications/firefox.nix
# ./applications/okular.nix
# ./applications/weechat.nix
# ./applications/spectral.nix
# ./applications/vivaldi
./workspace/i3blocks
./workspace/i3
./workspace/zsh.nix
@ -20,7 +13,6 @@
./workspace/cursor.nix
./workspace/mpv.nix
./workspace/kde
# ./workspace/synergy.nix
# ./workspace/ssh.nix
./workspace/locale.nix
./workspace/fonts.nix

View File

@ -1,12 +1,16 @@
{ pkgs, lib, config, ... }: {
{ pkgs, lib, config, ... }:
with rec {
inherit (config) deviceSpecific secrets;
};
with deviceSpecific; {
fileSystems = {
"/" = {
options = if config.deviceSpecific.isSSD then
options = if isSSD then
[ "ssd" "noatime" "compress=zstd" ]
else
[ "noatime" "compress=zstd" ];
};
"/shared/nixos" = lib.mkIf config.deviceSpecific.isVM {
"/shared/nixos" = lib.mkIf isVM {
fsType = "vboxsf";
device = "shared";
options = [
@ -21,6 +25,29 @@
"gid=${toString config.users.groups.smbgrp.gid}"
];
};
"/media/windows/files" = lib.mkIf (!isHost) {
fsType = "cifs";
device = "//192.168.0.100/Files";
options = [
"user=${secrets.windows-samba.user}"
"password=${secrets.windows-samba.password}"
"nofail"
"uid=${toString config.users.users.alukard.uid}"
"gid=${toString config.users.groups.users.gid}"
];
};
"/media/windows/data" = lib.mkIf (!isHost) {
fsType = "cifs";
device = "//192.168.0.100/Data";
options = [
"ro"
"user=${secrets.windows-samba.user}"
"password=${secrets.windows-samba.password}"
"nofail"
"uid=${toString config.users.users.alukard.uid}"
"gid=${toString config.users.groups.users.gid}"
];
};
};
# mount swap

View File

@ -16,6 +16,9 @@ with deviceSpecific; {
CPU_HWP_ON_BAT=balance_power
CPU_BOOST_ON_AC=1
CPU_BOOST_ON_BAT=0
DISK_DEVICES="nvme0n1 sda"
DISK_APM_LEVEL_ON_AC="255 254"
DISK_APM_LEVEL_ON_BAT="128 128"
'';
};
services.undervolt = {

View File

@ -1,8 +1,12 @@
{ config, lib, pkgs, ... }: {
{ config, lib, pkgs, ... }:
with rec {
inherit (config) deviceSpecific;
};
with deviceSpecific; {
users.groups.smbgrp.gid = 2001;
# TODO: add nologin shell to this user
users.users.smbuser =
lib.mkIf (config.device == "AMD-Workstation" || config.device == "NixOS-VM") {
lib.mkIf (isHost || config.device == "NixOS-VM") {
isNormalUser = false;
extraGroups = [
"smbgrp"
@ -10,7 +14,7 @@
description = "User for samba sharing";
};
services.samba =
lib.mkIf (config.device == "AMD-Workstation" || config.device == "NixOS-VM") {
lib.mkIf (isHost || config.device == "NixOS-VM") {
enable = true;
enableNmbd = false;
enableWinbindd = false;
@ -47,7 +51,7 @@
'';
};
environment.systemPackages =
if (config.device == "AMD-Workstation" || config.device == "NixOS-VM") then
if (isHost || config.device == "NixOS-VM") then
[ config.services.samba.package ]
else
[ ];

View File

@ -42,7 +42,6 @@
}
];
shellAliases = {
"mpv" = "mpv --hwdec=vaapi";
"clr" = "clear";
"weather" = "curl wttr.in/Volzhskiy";
"l" = "ls -lah --group-directories-first";

Binary file not shown.

4
todo.md Normal file
View File

@ -0,0 +1,4 @@
# TODO
* Экран по умолчанию в i3 - 1, а не 0.
* youtube-mpv в фоне без видео, для прослушивания музыки с ютуба