added home-manager

This commit is contained in:
Alexander Szczepanski
2021-06-10 04:27:18 +02:00
parent 0a085f8895
commit c87a727ced
6 changed files with 252 additions and 94 deletions

12
.editorconfig Normal file
View File

@ -0,0 +1,12 @@
# EditorConfig is awesome: https://EditorConfig.org
# top-most EditorConfig file
root = true
[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

View File

@ -1,10 +1,13 @@
{ config, pkgs, lib, ... }:
{
boot.tmpOnTmpfs = true;
environment.systemPackages = with pkgs; [
ack
atop
dfc
git
lsof
glances
home-manager
htop
@ -23,4 +26,10 @@
tree
lm_sensors
];
documentation.enable = false;
documentation.nixos.enable = false;
#documentation.man.enable = false;
documentation.info.enable = false;
documentation.doc.enable = false;
}

View File

@ -3,11 +3,12 @@
{
environment.systemPackages = with pkgs; [
kitty
signal-desktop
chromium
gparted
keepassxc
meld
twemoji-color-font
# twemoji-color-font
mpv
brave
firefox
@ -25,4 +26,67 @@
gnome.eog
virtmanager
];
fonts = {
enableDefaultFonts = true;
fontDir.enable = true;
fonts = with pkgs; [
fira-mono
libertine
open-sans
twemoji-color-font
liberation_ttf
noto-fonts
noto-fonts-cjk
noto-fonts-emoji
];
fontconfig = {
enable = true;
antialias = true;
defaultFonts = {
# monospace = [ "Fira Mono" ];
serif = [ "Linux Libertine" ];
sansSerif = [ "Open Sans" ];
emoji = [ "Twitter Color Emoji" ];
};
};
};
programs.dconf.enable = true;
nixpkgs.config.chromium.commandLineArgs = "--enable-features=WebUIDarkMode,NativeNotifications,VaapiVideoDecoder --ignore-gpu-blocklist --use-gl=desktop --force-dark-mode --disk-cache-dir=/tmp/cache";
programs.chromium = {
enable = true;
extensions = [
"cbnipbdpgcncaghphljjicfgmkonflee" # Axel Springer Blocker
"cjpalhdlnbpafiamejdnhcphjbkeiagm" # uBlock Origin
"mnjggcdmjocbbbhaepdhchncahnbgone" # SponsorBlock for YouTube
"hjdoplcnndgiblooccencgcggcoihigg" # Terms of Service; Didnt Read
"gcbommkclmclpchllfjekcdonpmejbdp" # HTTPS Everywhere
"oboonakemofpalcgghocfoadofidjkkk" # KeePassXC-Browser
"fploionmjgeclbkemipmkogoaohcdbig" # Page load time
"egnjhciaieeiiohknchakcodbpgjnchh" # Tab Wrangler
"fnaicdffflnofjppbagibeoednhnbjhg" # Floccus bookmarks
];
extraOpts = {
"BrowserSignin" = 0;
"SyncDisabled" = true;
"PasswordManagerEnabled" = false;
"AutofillAddressEnabled" = true;
"AutofillCreditCardEnabled" = false;
"BuiltInDnsClientEnabled" = false;
"MetricsReportingEnabled" = true;
"SearchSuggestEnabled" = false;
"AlternateErrorPagesEnabled" = false;
"UrlKeyedAnonymizedDataCollectionEnabled" = false;
"SpellcheckEnabled" = true;
"SpellcheckLanguage" = [
"de"
"en-US"
];
"CloudPrintSubmitEnabled" = false;
};
};
}

128
configs/user.nix Normal file
View File

@ -0,0 +1,128 @@
{ config, pkgs, lib, ... }:
{
imports = [ <home-manager/nixos> ];
# Define a user account. Don't forget to set a password with passwd.
users = {
defaultUserShell = pkgs.zsh;
users.alex = {
isNormalUser = true;
extraGroups = [ "wheel" "docker" "networkmanager" "libvirtd" ];
};
};
home-manager.useUserPackages = true;
home-manager.useGlobalPkgs = true;
home-manager.users.alex = { pkgs, ... }: {
home.packages = [
pkgs.cryfs
pkgs.cinnamon.nemo
];
dconf.enable = true;
dconf.settings = with lib.hm.gvariant; {
"org/gnome/desktop/wm/preferences".button-layout = "close:maximize";
# visual-bell = false;
# titlebar-font = "Liberation Sans Bold 9";
# };
# "org/gnome/mutter" = {
# button-mode = "programming";
# show-thousands = true;
# base = 10;
# word-size = 64;
# window-position = lib.hm.gvariant.mkTuple [100 100];
# };
};
programs = {
ssh = {
enable = true;
serverAliveInterval = 60;
};
git = {
enable = true;
userName = "Alexander Szczepanski";
userEmail = "alexander@szczepan.ski";
extraConfig = {
push = { default = "current"; };
pull = { rebase = true; };
};
};
vscode = {
enable = true;
package = pkgs.vscode;
extensions = with pkgs.vscode-extensions; [
bbenoist.Nix
justusadam.language-haskell
editorconfig.editorconfig
ms-azuretools.vscode-docker
#hsnazar.hyper-term-theme
#rafaelmaiolla.remote-vscode
eamodio.gitlens
];
# userSettings = {
# #"terminal.integrated.fontFamily" = "Hack";
# "workbench.colorTheme" = "Hyper Term Black";
# "window.titleBarStyle" = "custom";
# };
};
mpv = {
enable = true;
};
kitty = {
enable = true;
extraConfig = ''
enabled_layouts splits:split_axis=vertical
enable_audio_bell false
map F5 launch --location=hsplit
map F6 launch --location=vsplit
map F7 layout_action rotate
map shift+up move_window up
map shift+left move_window left
map shift+right move_window right
map shift+down move_window down
map ctrl+left neighboring_window left
map ctrl+right neighboring_window right
map ctrl+up neighboring_window up
map ctrl+down neighboring_window down
background #000000
foreground #e9e9e9
cursor #e9e9e9
selection_background #424242
color0 #000000
color8 #000000
color1 #d44d53
color9 #d44d53
color2 #b9c949
color10 #b9c949
color3 #e6c446
color11 #e6c446
color4 #79a6da
color12 #79a6da
color5 #c396d7
color13 #c396d7
color6 #70c0b1
color14 #70c0b1
color7 #fffefe
color15 #fffefe
selection_foreground #000000
'';
};
};
# manuals not needed
manual.html.enable = false;
manual.json.enable = false;
manual.manpages.enable = false;
};
}

View File

@ -7,10 +7,10 @@ in
imports =
[ # Include the results of the hardware scan.
/etc/nixos/hardware-configuration.nix
# ./vscode.nix
../../configs/gui.nix
../../configs/virtualisation.nix
../../configs/common.nix
../../configs/user.nix
];
# Use the systemd-boot EFI boot loader.
@ -32,7 +32,6 @@ in
boot.plymouth.enable = true;
boot.extraModulePackages = with pkgs.linuxPackages; [ it87 ];
boot.kernelModules = [ "it87" ];
boot.tmpOnTmpfs = true;
networking.hostName = "desktop"; # Define your hostname.
@ -51,32 +50,40 @@ in
keyMap = "us";
};
hardware.fancontrol.enable = true;
hardware.fancontrol.config = ''
INTERVAL=10
DEVPATH=hwmon2=devices/platform/it87.656
DEVNAME=hwmon2=it8665
FCTEMPS=hwmon2/pwm3=hwmon2/temp1_input hwmon2/pwm2=hwmon2/temp1_input hwmon2/pwm1=hwmon2/temp1_input
FCFANS=hwmon2/pwm3=hwmon2/fan2_input hwmon2/pwm2=hwmon2/fan1_input hwmon2/pwm1=
MINTEMP=hwmon2/pwm3=60 hwmon2/pwm2=60 hwmon2/pwm1=60
MAXTEMP=hwmon2/pwm3=75 hwmon2/pwm2=75 hwmon2/pwm1=75
MINSTART=hwmon2/pwm3=51 hwmon2/pwm2=51 hwmon2/pwm1=51
MINSTOP=hwmon2/pwm3=51 hwmon2/pwm2=51 hwmon2/pwm1=51
MINPWM=hwmon2/pwm1=51 hwmon2/pwm2=51 hwmon2/pwm3=51
MAXPWM=hwmon2/pwm3=127 hwmon2/pwm2=204
'';
hardware = {
cpu.amd.updateMicrocode = true;
opengl = {
driSupport = true;
driSupport32Bit = true;
extraPackages = with pkgs; [
rocm-opencl-icd
rocm-opencl-runtime
amdvlk
];
};
hardware.cpu.amd.updateMicrocode = true;
hardware.opengl.extraPackages = with pkgs; [
rocm-opencl-icd
rocm-opencl-runtime
amdvlk
];
fancontrol = {
enable = true;
config = ''
INTERVAL=10
DEVPATH=hwmon2=devices/platform/it87.656
DEVNAME=hwmon2=it8665
FCTEMPS=hwmon2/pwm3=hwmon2/temp1_input hwmon2/pwm2=hwmon2/temp1_input hwmon2/pwm1=hwmon2/temp1_input
FCFANS=hwmon2/pwm3=hwmon2/fan2_input hwmon2/pwm2=hwmon2/fan1_input hwmon2/pwm1=
MINTEMP=hwmon2/pwm3=60 hwmon2/pwm2=60 hwmon2/pwm1=60
MAXTEMP=hwmon2/pwm3=75 hwmon2/pwm2=75 hwmon2/pwm1=75
MINSTART=hwmon2/pwm3=51 hwmon2/pwm2=51 hwmon2/pwm1=51
MINSTOP=hwmon2/pwm3=51 hwmon2/pwm2=51 hwmon2/pwm1=51
MINPWM=hwmon2/pwm1=51 hwmon2/pwm2=51 hwmon2/pwm3=51
MAXPWM=hwmon2/pwm3=127 hwmon2/pwm2=204
'';
};
hardware.opengl = {
driSupport = true;
driSupport32Bit = true;
pulseaudio = {
enable = true;
support32Bit = true;
};
};
# Enable the X11 windowing system.
@ -104,52 +111,6 @@ in
# Enable sound.
sound.enable = true;
hardware.pulseaudio.enable = true;
hardware.pulseaudio.support32Bit = true;
# Define a user account. Don't forget to set a password with passwd.
users = {
defaultUserShell = pkgs.zsh;
users.alex = {
isNormalUser = true;
extraGroups = [ "wheel" "docker" "networkmanager" "libvirtd" ];
};
};
nixpkgs.config.chromium.commandLineArgs = "--enable-features=WebUIDarkMode,NativeNotifications,VaapiVideoDecoder --ignore-gpu-blocklist --use-gl=desktop --force-dark-mode --disk-cache-dir=/tmp/cache";
programs.chromium = {
enable = true;
extensions = [
"cbnipbdpgcncaghphljjicfgmkonflee" # Axel Springer Blocker
"cjpalhdlnbpafiamejdnhcphjbkeiagm" # uBlock Origin
"mnjggcdmjocbbbhaepdhchncahnbgone" # SponsorBlock for YouTube
"hjdoplcnndgiblooccencgcggcoihigg" # Terms of Service; Didnt Read
"gcbommkclmclpchllfjekcdonpmejbdp" # HTTPS Everywhere
"oboonakemofpalcgghocfoadofidjkkk" # KeePassXC-Browser
"fploionmjgeclbkemipmkogoaohcdbig" # Page load time
"egnjhciaieeiiohknchakcodbpgjnchh" # Tab Wrangler
"fnaicdffflnofjppbagibeoednhnbjhg" # Floccus bookmarks
];
extraOpts = {
"BrowserSignin" = 0;
"SyncDisabled" = true;
"PasswordManagerEnabled" = false;
"AutofillAddressEnabled" = true;
"AutofillCreditCardEnabled" = false;
"BuiltInDnsClientEnabled" = false;
"MetricsReportingEnabled" = true;
"SearchSuggestEnabled" = false;
"AlternateErrorPagesEnabled" = false;
"UrlKeyedAnonymizedDataCollectionEnabled" = false;
"SpellcheckEnabled" = true;
"SpellcheckLanguage" = [
"de"
"en-US"
];
"CloudPrintSubmitEnabled" = false;
};
};
programs.zsh = {
enable = true;
@ -203,4 +164,3 @@ in
system.stateVersion = "21.05"; # Did you read the comment?
}

View File

@ -20,6 +20,7 @@ in
../../configs/gui.nix
../../configs/virtualisation.nix
../../configs/common.nix
../../configs/user.nix
];
# boot.initrd.luks.devices = {
@ -39,7 +40,6 @@ in
boot.loader.efi.canTouchEfiVariables = true;
boot.loader.grub.gfxmodeEfi = "1024x768";
boot.tmpOnTmpfs = true;
#boot.plymouth.enable = true;
environment.etc."issue.d/ip.issue".text = "\\4\n";
@ -56,10 +56,6 @@ in
networking.interfaces.enp0s31f6.useDHCP = true;
networking.interfaces.wlp0s20f3.useDHCP = true;
# Configure network proxy if necessary
# networking.proxy.default = "http://user:password@proxy:port/";
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
# Select internationalisation properties.
# i18n.defaultLocale = "en_US.UTF-8";
console = {
@ -174,16 +170,6 @@ in
];
};
# Define a user account. Don't forget to set a password with passwd.
users = {
defaultUserShell = pkgs.zsh;
users.alex = {
isNormalUser = true;
extraGroups = [ "wheel" "docker" "networkmanager" ];
};
};
# List packages installed in system profile. To search, run:
# $ nix search wget
nixpkgs.config.chromium.commandLineArgs = "--enable-features=WebUIDarkMode,NativeNotifications,VaapiVideoDecoder --ignore-gpu-blocklist --use-gl=desktop --force-dark-mode --disk-cache-dir=/tmp/cache";
@ -279,4 +265,3 @@ in
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "21.05"; # Did you read the comment?
}