mirror of
https://github.com/vale981/nixconf
synced 2025-03-04 09:11:38 -05:00
first commit
This commit is contained in:
commit
6a6779a869
8 changed files with 335 additions and 0 deletions
26
#hardware-configuration.nix#
Normal file
26
#hardware-configuration.nix#
Normal file
|
@ -0,0 +1,26 @@
|
|||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ <nixpkgs/nixos/modules/installer/scan/not-detected.nix>
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usb_storage" "sd_mod" ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/sda2";
|
||||
fsType = "bcachefs";
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[ { device = "/dev/disk/by-uuid/f0e6d651-4cb6-4595-aa92-5793958f92c2"; }
|
||||
];
|
||||
|
||||
nix.maxJobs = lib.mkDefault 4;
|
||||
powerManagement.cpuFreqGovernor = "powersave";
|
||||
}
|
1
.#hardware-configuration.nix
Symbolic link
1
.#hardware-configuration.nix
Symbolic link
|
@ -0,0 +1 @@
|
|||
root@nixos.13812:1520099551
|
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
hardware-configuration.nix
|
||||
#*
|
||||
*~
|
1
README.md
Normal file
1
README.md
Normal file
|
@ -0,0 +1 @@
|
|||
# nixconf
|
89
compton.nix
Normal file
89
compton.nix
Normal file
|
@ -0,0 +1,89 @@
|
|||
{ config, pkgs, ...}:
|
||||
|
||||
{
|
||||
services.compton = {
|
||||
enable = true;
|
||||
extraOptions = ''
|
||||
backend = "glx";
|
||||
vsync = "opengl-swc";
|
||||
|
||||
shadow = true;
|
||||
no-dock-shadow = true;
|
||||
no-dnd-shadow = true;
|
||||
clear-shadow = true;
|
||||
|
||||
shadow-radius = 10;
|
||||
shadow-offset-x = -5;
|
||||
shadow-offset-y = 0;
|
||||
shadow-opacity = 0.8;
|
||||
shadow-red = 0.11;
|
||||
shadow-green = 0.12;
|
||||
shadow-blue = 0.13;
|
||||
shadow-exclude = [
|
||||
"name = 'Notification'",
|
||||
"_GTK_FRAME_EXTENTS@:c",
|
||||
"class_g = 'i3-frame'",
|
||||
"_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'",
|
||||
"_NET_WM_STATE@:32a *= '_NET_WM_STATE_STICKY'",
|
||||
"!I3_FLOATING_WINDOW@:c"
|
||||
];
|
||||
shadow-ignore-shaped = true;
|
||||
|
||||
alpha-step = 0.06;
|
||||
blur-background = false;
|
||||
blur-background-fixed = true;
|
||||
blur-kern = "7x7box";
|
||||
blur-background-exclude = [
|
||||
"class_g = 'i3-frame'",
|
||||
"window_type = 'dock'",
|
||||
"window_type = 'desktop'",
|
||||
"_GTK_FRAME_EXTENTS@:c"
|
||||
];
|
||||
|
||||
# Duplicating the _NET_WM_STATE entries because compton cannot deal with atom arrays :-/
|
||||
opacity-rule = [
|
||||
"97:class_g = 'Termite' && !_NET_WM_STATE@:32a",
|
||||
|
||||
"0:_NET_WM_STATE@[0]:32a = '_NET_WM_STATE_HIDDEN'",
|
||||
"0:_NET_WM_STATE@[1]:32a = '_NET_WM_STATE_HIDDEN'",
|
||||
"0:_NET_WM_STATE@[2]:32a = '_NET_WM_STATE_HIDDEN'",
|
||||
"0:_NET_WM_STATE@[3]:32a = '_NET_WM_STATE_HIDDEN'",
|
||||
"0:_NET_WM_STATE@[4]:32a = '_NET_WM_STATE_HIDDEN'",
|
||||
|
||||
"90:_NET_WM_STATE@[0]:32a = '_NET_WM_STATE_STICKY'",
|
||||
"90:_NET_WM_STATE@[1]:32a = '_NET_WM_STATE_STICKY'",
|
||||
"90:_NET_WM_STATE@[2]:32a = '_NET_WM_STATE_STICKY'",
|
||||
"90:_NET_WM_STATE@[3]:32a = '_NET_WM_STATE_STICKY'",
|
||||
"90:_NET_WM_STATE@[4]:32a = '_NET_WM_STATE_STICKY'"
|
||||
];
|
||||
|
||||
fading = false;
|
||||
fade-delta = 7;
|
||||
fade-in-step = 0.05;
|
||||
fade-out-step = 0.05;
|
||||
fade-exclude = [];
|
||||
|
||||
mark-wmwin-focused = true;
|
||||
mark-ovredir-focused = true;
|
||||
use-ewmh-active-win = true;
|
||||
detect-rounded-corners = true;
|
||||
detect-client-opacity = true;
|
||||
refresh-rate = 0;
|
||||
dbe = false;
|
||||
paint-on-overlay = true;
|
||||
glx-no-stencil = true;
|
||||
glx-copy-from-front = false;
|
||||
glx-swap-method = "undefined";
|
||||
sw-opti = true;
|
||||
unredir-if-possible = false;
|
||||
focus-exclude = [];
|
||||
detect-transient = true;
|
||||
detect-client-leader = true;
|
||||
invert-color-include = [];
|
||||
|
||||
wintypes: {
|
||||
tooltip = { fade = true; shadow = false; opacity = 1.00; focus = true; };
|
||||
};
|
||||
'';
|
||||
};
|
||||
}
|
65
configuration.nix
Normal file
65
configuration.nix
Normal file
|
@ -0,0 +1,65 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ # Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
(import ./packages.nix {inherit config pkgs; })
|
||||
(import ./services.nix {inherit config pkgs; })
|
||||
];
|
||||
|
||||
# Use the systemd-boot EFI boot loader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
# Enable BCACHEFS
|
||||
boot.supportedFilesystems = [ "bcachefs" ];
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "Europe/Berlin";
|
||||
|
||||
# Networking
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
# Fish
|
||||
programs.fish.enable = true;
|
||||
|
||||
# Users
|
||||
users.mutableUsers = false;
|
||||
users.extraUsers.hiro = {
|
||||
isNormalUser = true;
|
||||
home = "/home/hiro";
|
||||
shell = pkgs.fish;
|
||||
extraGroups = ["networkmanager" "wheel" "audio"];
|
||||
hashedPassword = "$6$WDVgnDUHXXHm$JGkoT5VU7GAxd9Z34N1bfGF79rnB.P2t.DdSpJ.a3bwipfFFsGD2z13yRKmp3H4PuBdcY.B1i7cyGmEyv3Q.r/";
|
||||
};
|
||||
|
||||
# Getting OOMOX to work
|
||||
environment.extraInit = ''
|
||||
# SVG loader for pixbuf (needed for GTK svg icon themes)
|
||||
export GDK_PIXBUF_MODULE_FILE=$(echo ${pkgs.librsvg.out}/lib/gdk-pixbuf-2.0/*/loaders.cache)
|
||||
'';
|
||||
|
||||
# No Sudo Password
|
||||
security.sudo.wheelNeedsPassword = false;
|
||||
|
||||
# Audio
|
||||
hardware.pulseaudio.enable = true;
|
||||
|
||||
# Microcode
|
||||
hardware.cpu.intel.updateMicrocode = true;
|
||||
|
||||
# Garbage Collector
|
||||
nix.gc.automatic = true;
|
||||
nix.gc.dates = "weekly";
|
||||
nix.gc.options = "--delete-older-than 30d";
|
||||
|
||||
# Power Management
|
||||
powerManagement.enable = true;
|
||||
powerManagement.powertop.enable = true;
|
||||
powerManagement.scsiLinkPolicy = "min_power";
|
||||
|
||||
# Auto Upgrades
|
||||
system.autoUpgrade.enable = true;
|
||||
system.autoUpgrade.channel = https://nixos.org/channels/nixos-unstable;
|
||||
}
|
113
packages.nix
Normal file
113
packages.nix
Normal file
|
@ -0,0 +1,113 @@
|
|||
{ config, pkgs, ...}:
|
||||
|
||||
let
|
||||
nixcfg = {
|
||||
allowUnfree = true;
|
||||
};
|
||||
|
||||
stable = import (fetchTarball https://github.com/nixos/nixpkgs-channels/archive/nixos-17.09.tar.gz) { config = nixcfg; };
|
||||
rolling = import (fetchTarball https://github.com/nixos/nixpkgs-channels/archive/nixos-unstable.tar.gz) { config = nixcfg; };
|
||||
edge = import (fetchTarball https://github.com/NixOS/nixpkgs/archive/master.tar.gz) { config = nixcfg; };
|
||||
pkgs = stable;
|
||||
|
||||
base = (with stable; [
|
||||
file
|
||||
curl
|
||||
wget
|
||||
fish
|
||||
networkmanager
|
||||
dbus
|
||||
xclip
|
||||
xst
|
||||
git
|
||||
busybox
|
||||
]) ++ (with rolling; [
|
||||
firefox
|
||||
thunderbird
|
||||
pcmanfm
|
||||
google-play-music-desktop-player
|
||||
file
|
||||
i3status-rust
|
||||
]);
|
||||
|
||||
extra = (with rolling; [
|
||||
# oomox
|
||||
gdk_pixbuf
|
||||
glib.dev
|
||||
gtk-engine-murrine
|
||||
gtk_engines
|
||||
gtk3
|
||||
sassc
|
||||
librsvg
|
||||
bc
|
||||
|
||||
compton
|
||||
firefox
|
||||
gimp
|
||||
pcmanfm
|
||||
emacs
|
||||
evince
|
||||
|
||||
feh
|
||||
rofi
|
||||
]);
|
||||
|
||||
games = (with stable; [
|
||||
xonotic
|
||||
]) ++ (with edge; [
|
||||
steam
|
||||
]);
|
||||
|
||||
development = (with stable; [
|
||||
cargo
|
||||
autoconf
|
||||
automake
|
||||
boot
|
||||
cmake
|
||||
gcc
|
||||
ghc
|
||||
gnumake
|
||||
rustc
|
||||
rustfmt
|
||||
rustracer
|
||||
sqlite
|
||||
zeal
|
||||
]) ++ (with rolling; [
|
||||
python3
|
||||
]);
|
||||
|
||||
basefonts = (with pkgs; [
|
||||
roboto-mono
|
||||
siji
|
||||
tewi-font
|
||||
]);
|
||||
|
||||
extrafonts = (with pkgs; [
|
||||
corefonts
|
||||
dejavu_fonts
|
||||
fantasque-sans-mono
|
||||
fira
|
||||
fira-code
|
||||
font-awesome-ttf
|
||||
font-droid
|
||||
noto-fonts
|
||||
powerline-fonts
|
||||
roboto
|
||||
roboto-slab
|
||||
source-code-pro
|
||||
]);
|
||||
|
||||
in
|
||||
{
|
||||
environment.systemPackages =
|
||||
base ++
|
||||
extra ++
|
||||
development ++
|
||||
games ++
|
||||
[];
|
||||
|
||||
fonts.fonts =
|
||||
basefonts ++
|
||||
extrafonts ++
|
||||
[];
|
||||
}
|
37
services.nix
Normal file
37
services.nix
Normal file
|
@ -0,0 +1,37 @@
|
|||
{ config, pkgs, ...}:
|
||||
|
||||
{
|
||||
imports = [
|
||||
(import ./compton.nix {inherit config pkgs; })
|
||||
];
|
||||
|
||||
services = {
|
||||
xserver = {
|
||||
enable = true;
|
||||
layout = "us";
|
||||
|
||||
libinput = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
displayManager.sddm.enable = true;
|
||||
|
||||
windowManager = {
|
||||
i3.enable = true;
|
||||
default = "i3";
|
||||
};
|
||||
};
|
||||
|
||||
printing = {
|
||||
enable = true;
|
||||
drivers = (with pkgs; [ gutenprint splix ]);
|
||||
};
|
||||
|
||||
acpid.enable = true;
|
||||
emacs.enable = true;
|
||||
# todo : look into conf of ssh.
|
||||
#openssh.enable = true;
|
||||
};
|
||||
|
||||
|
||||
}
|
Loading…
Add table
Reference in a new issue