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 = [ imports = [
./applications/packages.nix ./applications/packages.nix
./applications/rofi.nix ./applications/rofi.nix
# ./applications/kate.nix # ./applications/vivaldi
# ./applications/emacs
# ./applications/xst.nix
# ./applications/trojita.nix
# ./applications/firefox.nix
# ./applications/okular.nix
# ./applications/weechat.nix
# ./applications/spectral.nix
./workspace/i3blocks ./workspace/i3blocks
./workspace/i3 ./workspace/i3
./workspace/zsh.nix ./workspace/zsh.nix
@ -20,7 +13,6 @@
./workspace/cursor.nix ./workspace/cursor.nix
./workspace/mpv.nix ./workspace/mpv.nix
./workspace/kde ./workspace/kde
# ./workspace/synergy.nix
# ./workspace/ssh.nix # ./workspace/ssh.nix
./workspace/locale.nix ./workspace/locale.nix
./workspace/fonts.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 = { fileSystems = {
"/" = { "/" = {
options = if config.deviceSpecific.isSSD then options = if isSSD then
[ "ssd" "noatime" "compress=zstd" ] [ "ssd" "noatime" "compress=zstd" ]
else else
[ "noatime" "compress=zstd" ]; [ "noatime" "compress=zstd" ];
}; };
"/shared/nixos" = lib.mkIf config.deviceSpecific.isVM { "/shared/nixos" = lib.mkIf isVM {
fsType = "vboxsf"; fsType = "vboxsf";
device = "shared"; device = "shared";
options = [ options = [
@ -21,6 +25,29 @@
"gid=${toString config.users.groups.smbgrp.gid}" "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 # mount swap

View File

@ -16,6 +16,9 @@ with deviceSpecific; {
CPU_HWP_ON_BAT=balance_power CPU_HWP_ON_BAT=balance_power
CPU_BOOST_ON_AC=1 CPU_BOOST_ON_AC=1
CPU_BOOST_ON_BAT=0 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 = { 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; users.groups.smbgrp.gid = 2001;
# TODO: add nologin shell to this user # TODO: add nologin shell to this user
users.users.smbuser = users.users.smbuser =
lib.mkIf (config.device == "AMD-Workstation" || config.device == "NixOS-VM") { lib.mkIf (isHost || config.device == "NixOS-VM") {
isNormalUser = false; isNormalUser = false;
extraGroups = [ extraGroups = [
"smbgrp" "smbgrp"
@ -10,7 +14,7 @@
description = "User for samba sharing"; description = "User for samba sharing";
}; };
services.samba = services.samba =
lib.mkIf (config.device == "AMD-Workstation" || config.device == "NixOS-VM") { lib.mkIf (isHost || config.device == "NixOS-VM") {
enable = true; enable = true;
enableNmbd = false; enableNmbd = false;
enableWinbindd = false; enableWinbindd = false;
@ -47,7 +51,7 @@
''; '';
}; };
environment.systemPackages = environment.systemPackages =
if (config.device == "AMD-Workstation" || config.device == "NixOS-VM") then if (isHost || config.device == "NixOS-VM") then
[ config.services.samba.package ] [ config.services.samba.package ]
else else
[ ]; [ ];

View File

@ -42,7 +42,6 @@
} }
]; ];
shellAliases = { shellAliases = {
"mpv" = "mpv --hwdec=vaapi";
"clr" = "clear"; "clr" = "clear";
"weather" = "curl wttr.in/Volzhskiy"; "weather" = "curl wttr.in/Volzhskiy";
"l" = "ls -lah --group-directories-first"; "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 в фоне без видео, для прослушивания музыки с ютуба