119 current 2024-12-31 04:42:05 25.05.20241217.d3c42f1 6.6.66 *

This commit is contained in:
2024-12-31 04:42:12 -05:00
parent 69ed9b2d4d
commit b04b26c00d
10 changed files with 108 additions and 95 deletions

View File

@@ -1,25 +1,24 @@
# Edit this configuration file to define what should be installed on # Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page # your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help). # and in the NixOS manual (accessible by running nixos-help).
{ config, pkgs, ... }:
let
pkg_with_working_nitrogen = import (builtins.fetchTarball {
url = "https://github.com/NixOS/nixpkgs/archive/c0c50dfcb70d48e5b79c4ae9f1aa9d339af860b4.tar.gz";
sha256 = "17p3w4mgfr4yj2p0jz6kqgzhyr04h4fap5hnd837664xd1xhwdjb";
}) { inherit (pkgs) system; };
old-nitrogen = pkg_with_working_nitrogen.nitrogen;
in
{ {
imports = config,
[ # Include the results of the hardware scan. pkgs,
./hardware-configuration.nix ...
./system/system.nix }: let
# inputs.home-manager.nixosModules.default pkg_with_working_nitrogen = import (builtins.fetchTarball {
]; url = "https://github.com/NixOS/nixpkgs/archive/c0c50dfcb70d48e5b79c4ae9f1aa9d339af860b4.tar.gz";
sha256 = "17p3w4mgfr4yj2p0jz6kqgzhyr04h4fap5hnd837664xd1xhwdjb";
}) {inherit (pkgs) system;};
old-nitrogen = pkg_with_working_nitrogen.nitrogen;
in {
imports = [
# Include the results of the hardware scan.
./hardware-configuration.nix
./system/system.nix
# inputs.home-manager.nixosModules.default
];
# Bootloader. # Bootloader.
boot.loader.grub.enable = true; boot.loader.grub.enable = true;
@@ -29,7 +28,7 @@ in
networking.hostName = "thonkpad"; # Define your hostname. networking.hostName = "thonkpad"; # Define your hostname.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
nix.settings.experimental-features = [ "nix-command" "flakes" ]; nix.settings.experimental-features = ["nix-command" "flakes"];
nix = { nix = {
nixPath = [ nixPath = [
@@ -89,10 +88,9 @@ in
# 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.users.synchronous = { users.users.synchronous = {
isNormalUser = true; isNormalUser = true;
description = "jake"; description = "jake";
extraGroups = [ "networkmanager" "wheel" ]; extraGroups = ["networkmanager" "wheel"];
packages = with pkgs; [ packages = with pkgs; [
kdePackages.kate kdePackages.kate
firefox firefox
@@ -113,8 +111,10 @@ in
librewolf librewolf
eza eza
flameshot flameshot
neofetch lolcat neofetch
nnn xclip lolcat
nnn
xclip
brightnessctl brightnessctl
xbindkeys xbindkeys
pulseaudio pulseaudio
@@ -123,10 +123,8 @@ in
alejandra alejandra
# procps # for pgrep # procps # for pgrep
# xorg.xrandr # xorg.xrandr
# thunderbird # thunderbird
]; ];
}; };
# Install firefox. # Install firefox.
@@ -138,21 +136,21 @@ in
# List packages installed in system profile. To search, run: # List packages installed in system profile. To search, run:
# $ nix search wget # $ nix search wget
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
vim vim
neovim neovim
linux-manual linux-manual
man-pages man-pages
man-pages-posix man-pages-posix
fontconfig fontconfig
python3 python3
rofi rofi
flameshot flameshot
tree tree
# nitrogen # nitrogen
polybar polybar
sxhkd sxhkd
bspwm bspwm
librewolf librewolf
]; ];
# Some programs need SUID wrappers, can be configured further or are # Some programs need SUID wrappers, can be configured further or are
@@ -181,5 +179,4 @@ in
# Before changing this value read the documentation for this option # Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "24.11"; # Did you read the comment? system.stateVersion = "24.11"; # Did you read the comment?
} }

View File

@@ -11,7 +11,7 @@
}; };
}; };
outputs = inputs @ { outputs = inputs @ {
flake-parts, flake-parts,
self, self,
... ...
@@ -46,7 +46,7 @@
# The usual flake attributes can be defined here, including system- # The usual flake attributes can be defined here, including system-
# agnostic ones like nixosModule and system-enumerating ones, although # agnostic ones like nixosModule and system-enumerating ones, although
# those are more easily expressed in perSystem. # those are more easily expressed in perSystem.
# nixosConfigurations.myhostname = "thonkpad"; # nixosConfigurations.myhostname = "thonkpad";
nixosConfigurations.thonkpad = inputs.nixpkgs.lib.nixosSystem rec { nixosConfigurations.thonkpad = inputs.nixpkgs.lib.nixosSystem rec {
system = "x86_64-linux"; system = "x86_64-linux";
pkgs = import inputs.nixpkgs { pkgs = import inputs.nixpkgs {
@@ -62,7 +62,7 @@
# inputs.emacs-overlay.overlay -- breaks doom on 30.?? # inputs.emacs-overlay.overlay -- breaks doom on 30.??
]; ];
home.packages = with pkgs; [ xrandr procps bspwm sxhkd ]; home.packages = with pkgs; [xrandr procps bspwm sxhkd];
}; };
specialArgs = {inherit inputs;}; specialArgs = {inherit inputs;};
# extraSpecialArgs = {inherit inputs;}; # extraSpecialArgs = {inherit inputs;};
@@ -87,15 +87,15 @@
}; };
}; };
# outputs = { self, nixpkgs, ... }@inputs: { # outputs = { self, nixpkgs, ... }@inputs: {
# nixosConfigurations.default = nixpkgs.lib.nixosSystem { # nixosConfigurations.default = nixpkgs.lib.nixosSystem {
# specialArgs = {inherit inputs;}; # specialArgs = {inherit inputs;};
# modules = [ # modules = [
# ./configuration.nix # ./configuration.nix
# # inputs.home-manager.nixosModules.default # # inputs.home-manager.nixosModules.default
# { home-manager.users.synch = import ./home.nix; } # { home-manager.users.synch = import ./home.nix; }
# ]; # ];
# }; # };
# }; # };
}; };
} }

View File

@@ -1,24 +1,28 @@
# Do not modify this file! It was generated by nixos-generate-config # Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes # and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead. # to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{ {
imports = config,
[ (modulesPath + "/installer/scan/not-detected.nix") lib,
]; pkgs,
modulesPath,
...
}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; boot.initrd.availableKernelModules = ["xhci_pci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc"];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [];
boot.kernelModules = [ "kvm-intel" ]; boot.kernelModules = ["kvm-intel"];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [];
fileSystems."/" = fileSystems."/" = {
{ device = "/dev/disk/by-uuid/05ca9d56-3506-43c5-b9ec-be928b782996"; device = "/dev/disk/by-uuid/05ca9d56-3506-43c5-b9ec-be928b782996";
fsType = "ext4"; fsType = "ext4";
}; };
swapDevices = [ ]; swapDevices = [];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking # Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's # (the default) this is the recommended approach. When using systemd-networkd it's

View File

@@ -1,6 +1,7 @@
{ {
pkgs, pkgs,
lib, lib,
system,
... ...
}: { }: {
home.packages = with pkgs; [zsh-powerlevel10k meslo-lgs-nf]; home.packages = with pkgs; [zsh-powerlevel10k meslo-lgs-nf];

View File

@@ -223,8 +223,9 @@ export LESS_TERMCAP_us=$'\e[1;4;31m'
# ------ NNN (not no not november) # ------ NNN (not no not november)
export PATH=/home/synchronous/.scripts/nnn:$PATH export PATH=/home/synchronous/.scripts/nnn:$PATH
export VISUAL=wrapper.sh # export VISUAL=wrapper.sh
export EDITOR="$VISUAL" # export EDITOR="$VISUAL"
export EDITOR="nvim"
export NNN_PLUG='m:preview-tui;' export NNN_PLUG='m:preview-tui;'
export NNN_FIFO=/tmp/nnn.fifo export NNN_FIFO=/tmp/nnn.fifo
export NNN_TERMINAL=alacritty export NNN_TERMINAL=alacritty

View File

@@ -4,13 +4,13 @@
set -e set -e
# Edit your config # Edit your config
$EDITOR configuration.nix # $EDITOR configuration.nix
# cd to your config dir # cd to your config dir
pushd ~/dotfiles/nixos/ pushd /home/synchronous/nix-cfg
# Early return if no changes were detected (thanks @singiamtel!) # Early return if no changes were detected (thanks @singiamtel!)
if git diff --quiet '*.nix'; then if git --git-dir /home/synchronous/nix-cfg/.git diff --quiet '*.nix'; then
echo "No changes detected, exiting." echo "No changes detected, exiting."
popd popd
exit 0 exit 0
@@ -21,18 +21,19 @@ alejandra . &>/dev/null \
|| ( alejandra . ; echo "formatting failed!" && exit 1) || ( alejandra . ; echo "formatting failed!" && exit 1)
# Shows your changes # Shows your changes
git diff -U0 '*.nix' git --git-dir /home/synchronous/nix-cfg/.git diff
# -U0 '*.nix'
echo "NixOS Rebuilding..." echo "NixOS Rebuilding..."
# Rebuild, output simplified errors, log trackebacks # Rebuild, output simplified errors, log trackebacks
sudo nixos-rebuild switch &>nixos-switch.log || (cat nixos-switch.log | grep --color error && exit 1) sudo nixos-rebuild switch --flake /home/synchronous/nix-cfg/flake.nix &>nixos-switch.log || (cat nixos-switch.log | grep --color error && exit 1)
# Get current generation metadata # Get current generation metadata
current=$(nixos-rebuild list-generations | grep current) current=$(nixos-rebuild list-generations | grep current)
# Commit all changes witih the generation metadata # Commit all changes witih the generation metadata
git commit -am "$current" git --git-dir /home/synchronous/nix-cfg/.git commit -am "$current"
# Back to where you were # Back to where you were
popd popd

View File

@@ -1,6 +1,8 @@
{ config, pkgs, ... }:
{ {
config,
pkgs,
...
}: {
imports = [ imports = [
./synaptics/default.nix ./synaptics/default.nix
]; ];

View File

@@ -1,4 +1,8 @@
{ config, pkgs, ... }: { {
config,
pkgs,
...
}: {
services.libinput = { services.libinput = {
enable = false; enable = false;
touchpad.naturalScrolling = true; touchpad.naturalScrolling = true;
@@ -23,11 +27,11 @@
maxSpeed = "1.0"; maxSpeed = "1.0";
additionalOptions = '' additionalOptions = ''
Option "VertScrollDelta" "-111" Option "VertScrollDelta" "-111"
Option "HorizScrollDelta" "-111" Option "HorizScrollDelta" "-111"
Option "FingerLow" "25" Option "FingerLow" "25"
Option "FingerHigh" "30" Option "FingerHigh" "30"
Option "MaxTapTime" "0" Option "MaxTapTime" "0"
''; '';
}; };
} }

View File

@@ -1,6 +1,8 @@
{ config, pkgs, ...}:
{ {
config,
pkgs,
...
}: {
imports = [ imports = [
./wm/bspwm.nix ./wm/bspwm.nix
./services/services.nix ./services/services.nix

View File

@@ -1,6 +1,8 @@
{ config, pkgs, ... }:
{ {
config,
pkgs,
...
}: {
services.xserver = { services.xserver = {
enable = true; enable = true;
xkb.layout = "us"; xkb.layout = "us";
@@ -27,7 +29,6 @@
greeters.gtk.enable = true; greeters.gtk.enable = true;
}; };
}; };
}; };
# xsession.windowManager.bspwm = { # xsession.windowManager.bspwm = {