formatting with nixpkgs-fmt
This commit is contained in:
parent
aac13c2919
commit
6f0a899f7e
|
@ -1,46 +1,48 @@
|
||||||
let
|
let
|
||||||
unstable = (import <nixos-unstable> {overlays = [ seaf-overlay ]; }).pkgs;
|
unstable = (import <nixos-unstable> { overlays = [ seaf-overlay ]; }).pkgs;
|
||||||
|
|
||||||
seaf-overlay = (import ./ov/seafile-overlay);
|
seaf-overlay = (import ./ov/seafile-overlay);
|
||||||
in
|
in
|
||||||
|
|
||||||
[(self: super:
|
[
|
||||||
rec {
|
(
|
||||||
seafile-server = unstable.seafile-server;
|
self: super:
|
||||||
amarok = super.libsForQt5.callPackage ./ov/amarok.nix {};
|
rec {
|
||||||
#stapler = super.python2.callPackage ./ov/stapler.nix {};
|
seafile-server = unstable.seafile-server;
|
||||||
myVim = with super; (vim_configurable.override {python = python3;}).customize {
|
amarok = super.libsForQt5.callPackage ./ov/amarok.nix {};
|
||||||
# executable/ package name
|
#stapler = super.python2.callPackage ./ov/stapler.nix {};
|
||||||
name = "vim";
|
myVim = with super; (vim_configurable.override { python = python3; }).customize {
|
||||||
vimrcConfig.packages.myVimPackage = with pkgs.vimPlugins; {
|
# executable/ package name
|
||||||
# loaded on start
|
name = "vim";
|
||||||
start = [
|
vimrcConfig.packages.myVimPackage = with pkgs.vimPlugins; {
|
||||||
ale
|
# loaded on start
|
||||||
LanguageClient-neovim
|
start = [
|
||||||
ctrlp
|
ale
|
||||||
#deoplete-jedi
|
LanguageClient-neovim
|
||||||
direnv-vim
|
ctrlp
|
||||||
fugitive
|
#deoplete-jedi
|
||||||
jedi-vim
|
direnv-vim
|
||||||
nerdtree
|
fugitive
|
||||||
nerdtree-git-plugin
|
jedi-vim
|
||||||
supertab
|
nerdtree
|
||||||
vim-pandoc
|
nerdtree-git-plugin
|
||||||
vim-pandoc-syntax
|
supertab
|
||||||
vim-nix
|
vim-pandoc
|
||||||
vim-jinja
|
vim-pandoc-syntax
|
||||||
];
|
vim-nix
|
||||||
};
|
vim-jinja
|
||||||
vimrcConfig.customRC =
|
];
|
||||||
''if filereadable($HOME . "/.vimrc")
|
};
|
||||||
|
vimrcConfig.customRC =
|
||||||
|
''if filereadable($HOME . "/.vimrc")
|
||||||
source ~/.vimrc
|
source ~/.vimrc
|
||||||
endif
|
endif
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
# build with debug symbols and in debug mode (less optimized)
|
# build with debug symbols and in debug mode (less optimized)
|
||||||
opencvDebug = with super; enableDebugging ((opencv3.override {enablePython=true; enableGtk3=true; enableDocs=true; pythonPackages=pkgs.python3Packages; }).overrideAttrs (oldAttrs: rec {cmakeBuildType = "Debug";}));
|
opencvDebug = with super; enableDebugging ((opencv3.override { enablePython = true; enableGtk3 = true; enableDocs = true; pythonPackages = pkgs.python3Packages; }).overrideAttrs (oldAttrs: rec { cmakeBuildType = "Debug"; }));
|
||||||
#gnutls = super.callPackage ./ov/gnutls {inherit (super.darwin.apple_sdk.frameworks) Security;};
|
#gnutls = super.callPackage ./ov/gnutls {inherit (super.darwin.apple_sdk.frameworks) Security;};
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
]
|
]
|
||||||
|
|
|
@ -8,25 +8,31 @@ let
|
||||||
fsOptions = [ "noatime" "ssd" "space_cache" "compress=zstd" ];
|
fsOptions = [ "noatime" "ssd" "space_cache" "compress=zstd" ];
|
||||||
unstable = import <nixos-unstable> {};
|
unstable = import <nixos-unstable> {};
|
||||||
|
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
imports =
|
imports =
|
||||||
[ # Include the results of the hardware scan.
|
[
|
||||||
|
# Include the results of the hardware scan.
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
./packages.nix
|
./packages.nix
|
||||||
(builtins.fetchGit {
|
(
|
||||||
url = "https://github.com/NixOS/nixos-hardware";
|
builtins.fetchGit {
|
||||||
rev = "c0182a06982f82a47356c91d78d80d2af29bd7f1";
|
url = "https://github.com/NixOS/nixos-hardware";
|
||||||
} + "/lenovo/thinkpad/t440s")
|
rev = "c0182a06982f82a47356c91d78d80d2af29bd7f1";
|
||||||
|
} + "/lenovo/thinkpad/t440s"
|
||||||
|
)
|
||||||
# home manager integration
|
# home manager integration
|
||||||
<home-manager/nixos>
|
<home-manager/nixos>
|
||||||
];
|
];
|
||||||
|
|
||||||
# encrypted partitions
|
# encrypted partitions
|
||||||
boot.initrd.luks =
|
boot.initrd.luks =
|
||||||
{ devices =
|
{
|
||||||
{ "system".device = "/dev/disk/by-uuid/85154131-b2a8-4ef5-9d74-47429cb267ef";
|
devices =
|
||||||
"cryptswap".device = "/dev/disk/by-uuid/ac586df6-6332-4809-beb1-f51906a2adaa";
|
{
|
||||||
};
|
"system".device = "/dev/disk/by-uuid/85154131-b2a8-4ef5-9d74-47429cb267ef";
|
||||||
|
"cryptswap".device = "/dev/disk/by-uuid/ac586df6-6332-4809-beb1-f51906a2adaa";
|
||||||
|
};
|
||||||
reusePassphrases = true;
|
reusePassphrases = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -38,11 +44,12 @@ in {
|
||||||
services.davfs2.enable = true;
|
services.davfs2.enable = true;
|
||||||
|
|
||||||
# try newer kernels
|
# try newer kernels
|
||||||
#boot.kernelPackages = pkgs.linuxPackages_latest;
|
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||||
|
|
||||||
services.fstrim.enable = true;
|
services.fstrim.enable = true;
|
||||||
services.btrfs.autoScrub =
|
services.btrfs.autoScrub =
|
||||||
{ enable = true;
|
{
|
||||||
|
enable = true;
|
||||||
fileSystems = [ "/" "/home" ];
|
fileSystems = [ "/" "/home" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -50,17 +57,19 @@ in {
|
||||||
#boot.extraModulePackages = [ config.boot.kernelPackages.exfat-nofuse ];
|
#boot.extraModulePackages = [ config.boot.kernelPackages.exfat-nofuse ];
|
||||||
|
|
||||||
zramSwap =
|
zramSwap =
|
||||||
{ enable = true;
|
{
|
||||||
|
enable = true;
|
||||||
memoryPercent = 20;
|
memoryPercent = 20;
|
||||||
};
|
};
|
||||||
boot.kernel.sysctl."vm.swappiness" = 9;
|
boot.kernel.sysctl."vm.swappiness" = 9;
|
||||||
|
|
||||||
# powermanagement
|
# powermanagement
|
||||||
services.tlp =
|
services.tlp =
|
||||||
{ enable = true;
|
{
|
||||||
|
enable = true;
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
SATA_LINKPWR_ON_BAT=medium_power
|
SATA_LINKPWR_ON_BAT=medium_power
|
||||||
SATA_LINKPWR_ON_AC=max_performance
|
SATA_LINKPWR_ON_AC=max_performance
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -110,7 +119,8 @@ in {
|
||||||
|
|
||||||
# Enable CUPS to print documents.
|
# Enable CUPS to print documents.
|
||||||
services.printing =
|
services.printing =
|
||||||
{ enable = true;
|
{
|
||||||
|
enable = true;
|
||||||
drivers = [ pkgs.hplip ];
|
drivers = [ pkgs.hplip ];
|
||||||
};
|
};
|
||||||
# scanners
|
# scanners
|
||||||
|
@ -128,7 +138,7 @@ in {
|
||||||
sound.enable = true;
|
sound.enable = true;
|
||||||
hardware.pulseaudio.enable = true;
|
hardware.pulseaudio.enable = true;
|
||||||
# decouple pulseaudio application and sink volumes
|
# decouple pulseaudio application and sink volumes
|
||||||
hardware.pulseaudio.daemon.config = {flat-volumes = "no";};
|
hardware.pulseaudio.daemon.config = { flat-volumes = "no"; };
|
||||||
|
|
||||||
# Bluetooth
|
# Bluetooth
|
||||||
hardware.bluetooth = {
|
hardware.bluetooth = {
|
||||||
|
@ -154,12 +164,6 @@ in {
|
||||||
# Flatpak support
|
# Flatpak support
|
||||||
services.flatpak.enable = true;
|
services.flatpak.enable = true;
|
||||||
xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-kde ];
|
xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-kde ];
|
||||||
# nixpkgs.config.packageOverrides = pkgs:
|
|
||||||
# {
|
|
||||||
# flatpak = unstable.flatpak;
|
|
||||||
# flatpak-builder = unstable.flatpak-builder;
|
|
||||||
# ostree = unstable.ostree;
|
|
||||||
# };
|
|
||||||
|
|
||||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||||
users.extraUsers.spiollinux = {
|
users.extraUsers.spiollinux = {
|
||||||
|
@ -181,25 +185,27 @@ in {
|
||||||
permissions = "u+xs,g+x";
|
permissions = "u+xs,g+x";
|
||||||
owner = "root";
|
owner = "root";
|
||||||
group = "wireshark";
|
group = "wireshark";
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.zsh =
|
programs.zsh =
|
||||||
{ enable = true;
|
{
|
||||||
|
enable = true;
|
||||||
autosuggestions.enable = true;
|
autosuggestions.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
services.psd.enable = true;
|
services.psd.enable = true;
|
||||||
|
|
||||||
services.smartd =
|
services.smartd =
|
||||||
{ enable = true;
|
{
|
||||||
devices = [ { device = "/dev/sda"; } { device = "/dev/sdb"; } ];
|
enable = true;
|
||||||
|
devices = [ { device = "/dev/sda"; } { device = "/dev/sdb"; } ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
fonts = {
|
fonts = {
|
||||||
enableFontDir = true;
|
enableFontDir = true;
|
||||||
fontconfig.enable = true;
|
fontconfig.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
# fix nix-env memory issues
|
# fix nix-env memory issues
|
||||||
boot.kernel.sysctl."vm.overcommit_memory" = "1";
|
boot.kernel.sysctl."vm.overcommit_memory" = "1";
|
||||||
|
|
Loading…
Reference in a new issue