Switch to a generic configuration + integration for Thor
This commit is contained in:
parent
0426a7e93a
commit
34aefb17a1
9 changed files with 269 additions and 8 deletions
|
|
@ -1,3 +0,0 @@
|
|||
#!/bin/sh
|
||||
sudo nix-channel --update &&
|
||||
sudo nixos-rebuild boot -p Intel -I nixos-config=./nixos/intel.nix
|
||||
|
|
@ -5,7 +5,7 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = builtins.trace "Intel laptop configuration" [
|
||||
imports = [
|
||||
./base.nix
|
||||
];
|
||||
|
||||
33
nixos/thor.nix
Normal file
33
nixos/thor.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
# Edit this configuration file to define what should be installed on
|
||||
# your system. Help is available in the configuration.nix(5) man page
|
||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
<nixos-hardware/common/cpu/amd>
|
||||
<nixos-hardware/common/pc/ssd>
|
||||
./base.nix
|
||||
];
|
||||
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
|
||||
services.xserver = {
|
||||
videoDrivers = [ "nvidia" ];
|
||||
displayManager.sddm = {
|
||||
enable = true;
|
||||
autoNumlock = true;
|
||||
};
|
||||
};
|
||||
|
||||
hardware.nvidia.prime = {
|
||||
offload.enable = false;
|
||||
sync.enable = true;
|
||||
intelBusId = "PCI:0:2:0";
|
||||
nvidiaBusId = "PCI:1:0:0";
|
||||
};
|
||||
# hardware.nvidia.modesetting.enable = true;
|
||||
# hardware.nvidia.package = pkgs.linuxPackages.nvidia_x11;
|
||||
hardware.opengl.driSupport32Bit = true;
|
||||
}
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
#!/bin/sh
|
||||
sudo nix-channel --update &&
|
||||
sudo nixos-rebuild boot -p Nvidia -I nixos-config=./nixos/nvidia.nix
|
||||
8
setup.sh
Executable file
8
setup.sh
Executable file
|
|
@ -0,0 +1,8 @@
|
|||
#!/bin/sh
|
||||
|
||||
sudo nix-channel --add https://nixos.org/channels/nixos-21.05 nixos
|
||||
sudo nix-channel --add https://github.com/NixOS/nixos-hardware/archive/master.tar.gz nixos-hardware
|
||||
|
||||
nix-channel --add https://nixos.org/channels/nixos-21.05 nixos
|
||||
nix-channel --add https://github.com/nix-community/home-manager/archive/release-21.05.tar.gz home-manager
|
||||
nix-channel --add https://github.com/NixOS/nixpkgs/archive/master.tar.gz nixpkgs
|
||||
205
thor.nix
Normal file
205
thor.nix
Normal file
|
|
@ -0,0 +1,205 @@
|
|||
{ pkgs, lib, ... }:
|
||||
{
|
||||
nixpkgs.overlays = [
|
||||
(final: prev: {
|
||||
devEnvironment = (import ./environment.nix) {
|
||||
enableCpp = true;
|
||||
enableData = true;
|
||||
enableGo = true;
|
||||
enableHtml = true;
|
||||
enableJavascript = true;
|
||||
enableJava = true;
|
||||
enableLatex = true;
|
||||
enableNix = true;
|
||||
enableOffice = true;
|
||||
enablePython = true;
|
||||
enableRust = true;
|
||||
enableShell = true;
|
||||
enableSpelling = true;
|
||||
};
|
||||
|
||||
cocktail-bar-cli = final.callPackage ./custom/cocktail-bar-cli { };
|
||||
update-background = final.callPackage ./custom/update-background { backgrounds_directory = "$HOME/Immagini/Sfondi/1080+/1440+"; };
|
||||
lockscreen = final.callPackage ./custom/lockscreen {
|
||||
palette = final.rice.colorPalette;
|
||||
font = final.rice.font.normal;
|
||||
};
|
||||
})
|
||||
];
|
||||
|
||||
home = {
|
||||
language.base = "it_IT.UTF-8";
|
||||
keyboard = {
|
||||
layout = "it";
|
||||
options = [ "terminate:ctrl_alt_bksp" "compose:rctrl" ];
|
||||
};
|
||||
packages = with pkgs; [
|
||||
pulseaudio
|
||||
easyeffects
|
||||
|
||||
kubectl
|
||||
docker-compose
|
||||
docker-machine
|
||||
|
||||
arandr
|
||||
authy
|
||||
blender
|
||||
btop
|
||||
catgirl # IRC
|
||||
cava
|
||||
discord
|
||||
# evolution
|
||||
file
|
||||
firefox
|
||||
gallery-dl
|
||||
gnome.dconf-editor
|
||||
gnome.eog
|
||||
gnome.evince
|
||||
gnomeExtensions.appindicator
|
||||
gnomeExtensions.caffeine
|
||||
gnomeExtensions.dash-to-dock
|
||||
gnomeExtensions.dynamic-panel-transparency
|
||||
gnomeExtensions.just-perfection
|
||||
gnome.file-roller
|
||||
gnome.geary
|
||||
gnome.ghex
|
||||
gnome.gitg
|
||||
gnome.gnome-screenshot
|
||||
gnome.gnome-sound-recorder
|
||||
gnome.gnome-sudoku
|
||||
gnome.gnome-system-monitor
|
||||
gnome.gnome-tweaks
|
||||
gnome.nautilus
|
||||
gnome.quadrapassel
|
||||
gnome.seahorse
|
||||
gnome.sushi
|
||||
gnome.tracker
|
||||
google-chrome
|
||||
gucharmap
|
||||
htop
|
||||
# hyperspace-cli
|
||||
inkscape
|
||||
jetbrains.datagrip
|
||||
keepassxc
|
||||
krita
|
||||
# lutris
|
||||
mpv
|
||||
neofetch
|
||||
nix-prefetch-scripts
|
||||
openvpn
|
||||
pavucontrol
|
||||
pcmanfm
|
||||
pentablet-driver
|
||||
procps-ng
|
||||
ripgrep
|
||||
rofimoji
|
||||
skype
|
||||
slack
|
||||
spotify
|
||||
tdesktop
|
||||
teams
|
||||
transmission-gtk
|
||||
virt-manager
|
||||
wget
|
||||
# wineFull
|
||||
wireguard
|
||||
xclip
|
||||
xournalpp
|
||||
zoom-us
|
||||
zotero
|
||||
|
||||
(
|
||||
retroarch.override {
|
||||
cores = with pkgs.libretro; [
|
||||
mgba
|
||||
pcsx_rearmed
|
||||
ppsspp
|
||||
];
|
||||
}
|
||||
)
|
||||
];
|
||||
};
|
||||
|
||||
imports = [
|
||||
./modules/configurations.nix
|
||||
./modules/fonts.nix
|
||||
|
||||
./modules/alacritty.nix
|
||||
./modules/bash.nix
|
||||
./modules/bat.nix
|
||||
./modules/bottom.nix
|
||||
./modules/broot.nix
|
||||
# ./modules/bspwm.nix
|
||||
./modules/dircolors.nix
|
||||
./modules/direnv.nix
|
||||
# ./modules/dunst.nix
|
||||
# ./modules/fzf.nix
|
||||
./modules/git.nix
|
||||
./modules/go.nix
|
||||
./modules/gpg.nix
|
||||
./modules/grobi.nix
|
||||
./modules/info.nix
|
||||
./modules/java.nix
|
||||
# ./modules/joystickwake.nix
|
||||
./modules/jq.nix
|
||||
./modules/kakoune.nix
|
||||
./modules/keep.nix
|
||||
# ./modules/keepassxc.nix
|
||||
./modules/keychain.nix
|
||||
./modules/latex.nix
|
||||
./modules/lf.nix
|
||||
./modules/libinput-gestures.nix
|
||||
./modules/lorri.nix
|
||||
./modules/man.nix
|
||||
# ./modules/mangohud.nix
|
||||
./modules/megasync.nix
|
||||
./modules/nix-index.nix
|
||||
./modules/noti.nix
|
||||
./modules/obs-studio.nix
|
||||
./modules/office.nix
|
||||
./modules/onedrive.nix
|
||||
# ./modules/picom.nix
|
||||
# ./modules/polybar.nix
|
||||
./modules/gtk_theme.nix
|
||||
./modules/rofi.nix
|
||||
# ./modules/screen_locker.nix
|
||||
./modules/ssh.nix
|
||||
./modules/starship.nix
|
||||
# ./modules/sxhkd.nix
|
||||
./modules/syncthing.nix
|
||||
./modules/terminator.nix
|
||||
./modules/tmux.nix
|
||||
./modules/update_background.nix
|
||||
./modules/whatsapp.nix
|
||||
# ./modules/xidlehook.nix
|
||||
./modules/zoxide.nix
|
||||
./modules/zsh.nix
|
||||
|
||||
# ./modules/pro_audio.nix
|
||||
# ./modules/security.nix
|
||||
|
||||
./modules/shell_aliases.nix
|
||||
];
|
||||
|
||||
|
||||
services = {
|
||||
# blueman-applet.enable = true;
|
||||
# caffeine.enable = true;
|
||||
# cbatticon.enable = true;
|
||||
gnome-keyring.enable = true;
|
||||
# network-manager-applet.enable = true;
|
||||
# playerctld.enable = true;
|
||||
# poweralertd.enable = true;
|
||||
};
|
||||
|
||||
# xsession = {
|
||||
# enable = true;
|
||||
# numlock.enable = true;
|
||||
# initExtra = ''
|
||||
# ## Touchpad
|
||||
# ${pkgs.xorg.xinput}/bin/xinput set-prop 'DELL0824:00 06CB:7E92 Touchpad' 'libinput Natural Scrolling Enabled' 1
|
||||
# ${pkgs.xorg.xinput}/bin/xinput set-prop 'DELL0824:00 06CB:7E92 Touchpad' 'libinput Tapping Enabled' 1
|
||||
# '';
|
||||
# };
|
||||
|
||||
}
|
||||
|
|
@ -1,3 +1,3 @@
|
|||
#!/bin/sh
|
||||
sudo nix-channel --update &&
|
||||
nix-channel --update
|
||||
home-manager switch
|
||||
21
upgrade.sh
Executable file
21
upgrade.sh
Executable file
|
|
@ -0,0 +1,21 @@
|
|||
#!/usr/bin/env sh
|
||||
HOST=`cat /etc/hostname`
|
||||
echo "Upgrading $HOST"
|
||||
case "$HOST" in
|
||||
odin)
|
||||
echo "Found odin"
|
||||
sudo nixos-rebuild boot -p Intel -I nixos-config=./nixos/odin-intel.nix &&
|
||||
sudo nixos-rebuild boot -p Nvidia -I nixos-config=./nixos/odin-nvidia.nix
|
||||
;;
|
||||
thor | freya)
|
||||
echo "Found $HOST"
|
||||
sudo nixos-rebuild boot -I "nixos-config=./nixos/$HOST.nix"
|
||||
;;
|
||||
*)
|
||||
echo "localhost match not found"
|
||||
exit 1
|
||||
;;
|
||||
esac &&
|
||||
home-manager switch
|
||||
|
||||
echo DONE
|
||||
Loading…
Add table
Add a link
Reference in a new issue