-
-
Save notaLonelyDay/07fcdd7a218b5b756f04ac4e551d019c to your computer and use it in GitHub Desktop.
Nix
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ config, pkgs, lib, ... }: { | |
imports = [ | |
./hardware-configuration.nix | |
(import "${builtins.fetchTarball"https://github.com/rycee/home-manager/archive/release-20.03.tar.gz"}/nixos") | |
]; | |
boot.loader.systemd-boot.enable = true; | |
boot.loader.efi.canTouchEfiVariables = true; | |
boot.loader.grub = { | |
enable = true; | |
version = 2; | |
device = "nodev"; | |
efiSupport = true; | |
useOSProber = true; | |
}; | |
fileSystems."/media/ramdisk" = { | |
fsType = "tmpfs"; | |
neededForBoot = true; | |
options = [ | |
"size=10m" | |
]; | |
}; | |
networking.hostName = "nixos"; | |
time.timeZone = "Europe/Minsk"; | |
hardware.pulseaudio = { | |
enable = false; | |
package = pkgs.pulseaudioFull; | |
}; | |
nixpkgs.config.allowUnfree = true; | |
nixpkgs.config.allowBroken = true; | |
programs.fish.enable = true; | |
environment.systemPackages = with pkgs; [ | |
# system | |
wget | |
htop | |
neofetch | |
git | |
lm_sensors | |
bsod | |
nixfmt | |
killall | |
unzip | |
zip | |
unar | |
sampler | |
ranger | |
vim | |
# gui | |
kitty | |
qutebrowser | |
firefox | |
sublime3 | |
dolphin | |
mc | |
pywal | |
conky | |
lxappearance-gtk3 | |
libreoffice | |
gnome3.gucharmap | |
feh | |
speedcrunch | |
cacert | |
qalculate-gtk | |
keepassxc | |
# gitkraken | |
newsboat | |
# thunar | |
# pscircle | |
tdesktop | |
# langs | |
(python3.withPackages (py: with py; [ requests pytest beautifulsoup4 i3ipc ])) | |
pipenv | |
]; | |
# services | |
networking.firewall.enable = false; | |
services.openssh = { | |
enable = true; | |
permitRootLogin = "yes"; | |
forwardX11 = true; | |
}; | |
environment.pathsToLink = [ "/libexec" ]; | |
services.xserver = { | |
enable = true; | |
virtualScreen = { | |
x = 1680; | |
y = 1050; | |
}; | |
resolutions = [ { x = 1680; y = 1050; } ]; | |
windowManager.i3 = { | |
enable = true; | |
extraPackages = with pkgs; [ | |
dmenu # application launcher most people use | |
# i3status # gives you the default i3 status bar | |
i3lock # default i3 screen locker | |
# i3blocks # if you are planning on using i3blocks over i3status | |
]; | |
package = pkgs.i3-gaps; | |
}; | |
}; | |
services.cron = { | |
enable = false; | |
systemCronJobs = [ | |
# "*/20 * * * * python /etc/nixos/scripts/gismeteo_parser.py > /media/ramdisk/weather " | |
]; | |
}; | |
systemd.timers.gismeteo = { | |
timerConfig = { | |
"OnBootSec" = "0 min"; | |
"OnActiveSec" = "5"; | |
}; | |
wantedBy = [ "multi-user.target" ]; | |
}; | |
systemd.services.gismeteo = { | |
serviceConfig = { | |
"Type" = "oneshot"; | |
"ExecStart"=''/run/current-system/sw/bin/fish -c "python /etc/nixos/scripts/gismeteo_parser.py > /media/ramdisk/weather"''; | |
"User"="user"; | |
}; | |
}; | |
fonts = { | |
enableFontDir = true; | |
enableDefaultFonts = true; | |
fonts = with pkgs; [ | |
jetbrains-mono | |
hack-font | |
fira-code | |
ubuntu_font_family | |
inconsolata | |
noto-fonts | |
noto-fonts-emoji | |
iosevka | |
powerline-fonts | |
fantasque-sans-mono | |
iosevka | |
source-code-pro | |
nerdfonts | |
siji | |
weather-icons | |
helvetica-neue-lt-std | |
font-awesome | |
]; | |
}; | |
users.extraUsers.user = { | |
isNormalUser = true; | |
home = "/home/user"; | |
createHome = true; | |
extraGroups = [ "wheel" "networkmanager" ]; | |
uid = 1000; | |
shell = "/run/current-system/sw/bin/fish"; | |
}; | |
home-manager.users.user = { pkgs, ... }: { | |
programs = { | |
git = { | |
enable = true; | |
userName = "ponycoder"; | |
userEmail = "[email protected]"; | |
}; | |
fish = { | |
enable = true; | |
shellAliases = { | |
"nrb" = "sudo nixos-rebuild switch"; | |
"nrbc" = "sudo nixos-rebuild switch && updconf"; | |
"npu" = "nix-prefetch-url --unpack"; | |
"freboot" = "sudo systemctl kexec"; | |
"lsconf" = | |
"sudo nix-env --list-generations --profile /nix/var/nix/profiles/system"; | |
}; | |
functions = { | |
fish_greeting = "neofetch"; | |
updconf = '' | |
git --git-dir="/etc/nixos/.git" --work-tree=/etc/nixos add -A | |
git --git-dir="/etc/nixos/.git" --work-tree=/etc/nixos commit -m "$argv" | |
git --git-dir="/etc/nixos/.git" --work-tree=/etc/nixos push origin master | |
''; | |
}; | |
plugins = [ | |
{ | |
name = "fish-plugins"; | |
src = fetchGit { | |
url = "https://github.com/ThePonyCoder/fish-plugins.git"; | |
ref = "master"; | |
}; | |
} | |
]; | |
}; | |
kitty = { | |
enable = true; | |
font.name = "JetBrains Mono"; | |
settings = { | |
background_opacity = "0.8"; | |
scrollback_lines = 20000; | |
dynamic_background_opacity = "yes"; | |
}; | |
}; | |
rofi = { | |
enable = true; | |
theme = "/etc/nixos/config/rofi/material"; | |
}; | |
}; | |
xsession.windowManager.i3 = { | |
enable = true; | |
package = pkgs.i3-gaps; | |
config = pkgs.lib.mkForce null; | |
# config.modifier = "Mod4"; | |
# config.bars = [ ]; | |
# config.modes = pkgs.lib.mkForce {}; | |
# config.keybindings = pkgs.lib.mkForce {}; | |
# configFile = pkgs.lib.mkForce ""; | |
extraConfig = builtins.readFile /etc/nixos/config/i3/config; | |
}; | |
services = { | |
dunst = { | |
enable = true; | |
}; | |
polybar = { | |
enable = true; | |
# config = /etc/nixos/config/polybar/config.ini; | |
script = "/etc/nixos/config/polybar/lauch.sh"; | |
package = pkgs.polybarFull; | |
}; | |
picom = { | |
enable = true; | |
blur = true; | |
experimentalBackends = true; | |
fade = false; | |
fadeDelta = 5; | |
fadeSteps = [ "0.03" "0.04" ]; | |
shadow = false; | |
shadowOffsets = [ (-8) (-8) ]; | |
shadowOpacity = "0.65"; | |
# inactiveOpacity = "0.8"; | |
}; | |
}; | |
}; | |
system.stateVersion = "20.03"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment