system changes

This commit is contained in:
jjanzen 2025-03-08 16:05:09 -06:00
parent 061c4776c3
commit 93c1e9e304
37 changed files with 1 additions and 633 deletions

View file

@ -1,39 +0,0 @@
#+title: Emacs RSS Feed
#+begin_src org
,* Blogs
:PROPERTIES:
:ID: elfeed
:END:
,** Journalism :journalism:
,*** [[https://waxy.org/feed/][Waxy.org]]
,*** [[https://pluralistic.net/feed/][Cory Doctorow]] :technology:software:fiction:
,** Computer Science :cs:
,*** [[https://a.exozy.me/index.xml][Some Random Website]] :math:algorithms:fiction:
,** Technology :technology:
,*** [[https://ciechanow.ski/atom.xml][Bartosz Ciechanowshki]]
,*** [[https://www.citationneeded.news/rss/][Citation Needed]]
,*** [[https://www.lilysthings.org/blog/rss.xml][The Cool Blog]]
,** Software :software:
,*** [[https://garyodernichts.blogspot.com/rss.xml][Gary's Hacking Stuff]] :hacking:hardware:
,*** [[https://eieio.games/feed.xml][eieio.games]]
,*** [[https://ersei.net/en/blog.atom][Ersei]]
,*** [[https://ntietz.com/atom.xml][Technically a Blog]]
,*** [[https://alexwlchan.net/atom.xml][Alex Chan]]
,*** [[https://eaton-works.com/feed.atom][Eaton Works]] :hacking:
,*** [[https://computer.rip/rss.xml][Computer's Are Bad]] :technology:
,*** [[https://mark.stosberg.com/rss/][Mark Stosberg]] :biking:
,*** [[https://maia.crimew.gay/feed.xml][Maia Crimew]] :internet:hacking:
,*** [[https://drewdevault.com/blog/index.xml][Drew DeVault]]
,** Comics :comic:
,*** [[https://xkcd.com/atom.xml][XKCD]]
,** People I know
,*** [[https://www.weavingwatersexpedition.com/news?format=rss][Weaving Waters Expedition]] :journalism:
,*** [[https://pinkish.bearblog.dev/feed/][Pinkish]] :software:
,*** [[https://jjanzen.ca/rss.xml][Me]] :software:review:
,** Internet Infrastructure :internet:software:
,*** [[https://daniel.haxx.se/blog/feed/][cURL]]
,*** [[https://blog.archive.org/feed/][Archive.org]]
,** Reviews :review:
,*** [[https://mountainofink.com/?format=rss][Mountain of Ink]]
#+end_src

Binary file not shown.

View file

@ -1 +0,0 @@
../../../../../common/.config/emacs/feed.org.org

View file

@ -0,0 +1 @@
../../../../../common/.config/emacs/feed.org.org.gpg

61
nixos/flake/flake.lock generated
View file

@ -1,61 +0,0 @@
{
"nodes": {
"home-manager": {
"inputs": {
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1727383923,
"narHash": "sha256-4/vacp3CwdGoPf8U4e/N8OsGYtO09WTcQK5FqYfJbKs=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "ffe2d07e771580a005e675108212597e5b367d2d",
"type": "github"
},
"original": {
"id": "home-manager",
"type": "indirect"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1726937504,
"narHash": "sha256-bvGoiQBvponpZh8ClUcmJ6QnsNKw0EMrCQJARK3bI1c=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "9357f4f23713673f310988025d9dc261c20e70c6",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1727634051,
"narHash": "sha256-S5kVU7U82LfpEukbn/ihcyNt2+EvG7Z5unsKW9H/yFA=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "06cf0e1da4208d3766d898b7fdab6513366d45b9",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"home-manager": "home-manager",
"nixpkgs": "nixpkgs_2"
}
}
},
"root": "root",
"version": 7
}

View file

@ -1,34 +0,0 @@
#+title: Flake Root
I use the unstable branch of =nixpkgs=. This file defines the outputs for my configuration (system and home).
#+begin_src nix
{
description = "My NixOS Configuration";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};
outputs = {
self,
nixpkgs,
home-manager,
...
}@inputs: {
nixosConfigurations.nixos = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inherit inputs; };
modules = [
./system/core.nix
home-manager.nixosModules.home-manager
{
home-manager.backupFileExtension = "bak";
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.jjanzen = import ./home/core.nix;
}
];
};
};
}
#+end_src

View file

@ -1 +0,0 @@
../../../common/.wallpaper

View file

@ -1 +0,0 @@
../../../common/.flake/home/clang-format.nix.org

View file

@ -1,25 +0,0 @@
#+title: Core Home Configuration
Set up home manager for my user account and import submodules.
#+begin_src nix :tangle ~/.flake/home/core.nix :mkdirp yes
{ config, pkgs, ... }:
{
imports = [
./clang-format.nix
./cursor.nix
./fonts.nix
./hyprland.nix
./programs/core.nix
./scripts.nix
./services/core.nix
];
home.username = "jjanzen";
home.homeDirectory = "/home/jjanzen";
home.file.".wallpaper".source = ./.wallpaper;
home.stateVersion = "24.05";
programs.home-manager.enable = true;
}
#+end_src

View file

@ -1 +0,0 @@
../../../common/.flake/home/cursor.nix.org

View file

@ -1 +0,0 @@
../../../common/.flake/home/fonts.nix.org

View file

@ -1 +0,0 @@
../../../common/.flake/home/hyprland.nix.org

View file

@ -1,52 +0,0 @@
#+title: Core Program Configuration
This is the core of my program configuration. This file installs programs that do not require additional configuration. Note that Discord is not FOSS and that =prismlauncher= is a launcher for Minecraft.
#+begin_src nix :tangle ~/.flake/home/programs/core.nix :mkdirp yes
{ config, pkgs, ... }:
{
imports = [
./emacs/core.nix
./fastfetch.nix
./foot.nix
./git.nix
./hyprlock.nix
./ncmpcpp.nix
./neovim.nix
./ssh.nix
./waybar.nix
./zsh.nix
];
home.packages = with pkgs; [
discord # not FOSS
clang-tools
eza
fuzzel
ispell
gcc
gzdoom
htop
hyfetch
hyprshot
lesspipe
mpc-cli
mpv
networkmanagerapplet
obs-studio
openresolv
openvpn
pavucontrol
prismlauncher # minecraft
python3
python312Packages.python-lsp-server
qbittorrent
retroarchFull
swaybg
texliveFull
unzip
zip
zotero
];
}
#+end_src

View file

@ -1 +0,0 @@
../../../../common/.flake/home/programs/emacs

View file

@ -1 +0,0 @@
../../../../common/.flake/home/programs/fastfetch.nix.org

View file

@ -1 +0,0 @@
../../../../common/.flake/home/programs/foot.nix.org

View file

@ -1 +0,0 @@
../../../../common/.flake/home/programs/git.nix.org

View file

@ -1 +0,0 @@
../../../../common/.flake/home/programs/hyprlock.nix.org

View file

@ -1 +0,0 @@
../../../../common/.flake/home/programs/ncmpcpp.nix.org

View file

@ -1 +0,0 @@
../../../../common/.flake/home/programs/neovim.nix.org

View file

@ -1 +0,0 @@
../../../../common/.flake/home/programs/ssh.nix.org

View file

@ -1 +0,0 @@
../../../../common/.flake/home/programs/waybar.nix.org

View file

@ -1 +0,0 @@
../../../../common/.flake/home/programs/zsh.nix.org

View file

@ -1,43 +0,0 @@
#+title: Custom Scripts
Open script container.
#+begin_src nix :tangle ~/.flake/home/scripts.nix :mkdirp yes
{ config, pkgs, ... }:
{
home.file = {
#+end_src
Use =fuzzel= to open a menu to power off, reboot, or log out.
#+begin_src nix :tangle ~/.flake/home/scripts.nix :mkdirp yes
".local/bin/poweroptions.sh" = {
text = ''
#!/bin/sh
getoption () {
fuzzel --dmenu -l 3 -x 1 -r 10 << EOF
󰐥 power off
󰜉 restart
󰍃 logout
EOF
}
option=$(getoption | xargs)
case $option in
'󰐥 power off')
systemctl poweroff;;
'󰜉 restart')
systemctl reboot;;
'󰍃 logout')
hyprctl dispatch exit;;
esac
'';
executable = true;
};
#+end_src
Close script container.
#+begin_src nix :tangle ~/.flake/home/scripts.nix :mkdirp yes
};
}
#+end_src

View file

@ -1,19 +0,0 @@
#+title: Core Service Configuration
Import service configurations.
#+begin_src nix :tangle ~/.flake/home/services/core.nix :mkdirp yes
{ config, pkgs, ... }:
{
imports = [
./emacs.nix
./mako.nix
./mpd.nix
./syncthing.nix
];
home.packages = with pkgs; [
mpdscribble
];
}
#+end_src

View file

@ -1 +0,0 @@
../../../../common/.flake/home/services/emacs.nix.org

View file

@ -1 +0,0 @@
../../../../common/.flake/home/services/mako.nix.org

View file

@ -1 +0,0 @@
../../../../common/.flake/home/services/mpd.nix.org

View file

@ -1 +0,0 @@
../../../../common/.flake/home/services/syncthing.nix.org

View file

@ -1,11 +0,0 @@
#+title: Boot Configuration
Enable =systemd-boot= as my boot loader.
#+begin_src nix :tangle ~/.flake/system/boot.nix :mkdirp yes
{ config, lib, pkgs, ... }:
{
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
}
#+end_src

View file

@ -1,21 +0,0 @@
#+title: System Core
This file imports various system configuration components in addition to enabling flakes and defining the system version.
#+begin_src nix :tangle ~/.flake/system/core.nix :mkdirp yes
{ config, lib, pkgs, ... }:
{
imports = [
./boot.nix
./desktop.nix
./hardware-configuration.nix
./locale.nix
./network.nix
./users.nix
];
nix.settings.experimental-features = [ "nix-command" "flakes" ];
system.stateVersion = "24.05";
}
#+end_src

View file

@ -1,116 +0,0 @@
#+title: Desktop System Configuration
Open the desktop configuration.
#+begin_src nix :tangle ~/.flake/system/desktop.nix :mkdirp yes
{ config, lib, pkgs, ... }:
{
#+end_src
Allow unfree packages on this system.
#+begin_src nix :tangle ~/.flake/system/desktop.nix :mkdirp yes
nixpkgs.config.allowUnfree = true;
#+end_src
Install necessary packages for the desktop.
#+begin_src nix :tangle ~/.flake/system/desktop.nix :mkdirp yes
environment.systemPackages = with pkgs; [
dolphin
firefox
git
greetd.tuigreet
kitty
gnumake
neovim
python3
wget
];
#+end_src
Install Steam.
#+begin_src nix :tangle ~/.flake/system/desktop.nix :mkdirp yes
programs.steam = {
enable = true;
remotePlay.openFirewall = true;
dedicatedServer.openFirewall = true;
localNetworkGameTransfers.openFirewall = true;
};
#+end_src
Use Neovim as my default editor.
#+begin_src nix :tangle ~/.flake/system/desktop.nix :mkdirp yes
environment.variables.EDITOR = "nvim";
#+end_src
Enable GPG agent globally.
#+begin_src nix :tangle ~/.flake/system/desktop.nix :mkdirp yes
programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
#+end_src
Install =zsh= and set up completions.
#+begin_src nix :tangle ~/.flake/system/desktop.nix :mkdirp yes
programs.zsh.enable = true;
environment.pathsToLink = [ "/share/zsh" ];
#+end_src
Use the =us= keyboard layout.
#+begin_src nix :tangle ~/.flake/system/desktop.nix :mkdirp yes
services.xserver.xkb.layout = "us";
#+end_src
Install Hyprland as a window manager.
#+begin_src nix :tangle ~/.flake/system/desktop.nix :mkdirp yes
services.xserver.enable = true;
xdg.portal.enable = true;
programs.hyprland.enable = true;
environment.sessionVariables.NIXOS_OZONE_WL = "1";
#+end_src
Enable =pam= support for Hyprlock.
#+begin_src nix :tangle ~/.flake/system/desktop.nix :mkdirp yes
security.pam.services.hyprlock = {};
#+end_src
Enable =greetd= with =tuigreet= as my login manager.
#+begin_src nix :tangle ~/.flake/system/desktop.nix :mkdirp yes
services.greetd = {
enable = true;
settings = {
default_session = {
command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --remember --remember-session --sessions ${pkgs.hyprland}/share/wayland-sessions --cmd \"dbus-run-session Hyprland\"";
user = "greeter";
};
};
};
systemd.services.greetd.serviceConfig = {
Type = "idle";
StandardInput = "tty";
StanardOutput = "tty";
StandardError = "journal";
TTYReset = true;
TTYVHangup = true;
TTYVTDisallocate = true;
};
#+end_src
Enable PipeWire.
#+begin_src nix :tangle ~/.flake/system/desktop.nix :mkdirp yes
services.pipewire = {
enable = true;
pulse.enable = true;
};
#+end_src
Enable GNOME Keyring.
#+begin_src nix :tangle ~/.flake/system/desktop.nix :mkdirp yes
services.gnome.gnome-keyring.enable = true;
security.pam.services.greetd.enableGnomeKeyring = true;
#+end_src
Close the desktop configuration.
#+begin_src nix :tangle ~/.flake/system/desktop.nix :mkdirp yes
}
#+end_src

View file

@ -1,41 +0,0 @@
# 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, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/1cf884d2-8691-4122-85e2-a4edd2d1609f";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/ABCB-FAEC";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};
swapDevices =
[ { device = "/dev/disk/by-uuid/675d8161-49c5-4348-9da5-4a7c8ada700f"; }
];
# 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
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enp10s0.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp9s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

View file

@ -1,11 +0,0 @@
#+title: Locale Setup
My timezone is Winnipeg, and I use Canadian English.
#+begin_src nix :tangle ~/.flake/system/locale.nix :mkdirp yes
{ config, lib, pkgs, ... }:
{
time.timeZone = "America/Winnipeg";
i18n.defaultLocale = "en_CA.UTF-8";
}
#+end_src

View file

@ -1,55 +0,0 @@
#+title: Network Configuration
Open the network configuration.
#+begin_src nix :tangle ~/.flake/system/network.nix :mkdirp yes
{ config, lib, pkgs, ... }:
{
#+end_src
This system is called =nixos=.
#+begin_src nix :tangle ~/.flake/system/network.nix :mkdirp yes
networking.hostName = "nixos";
#+end_src
I use NetworkManager to configure my network.
#+begin_src nix :tangle ~/.flake/system/network.nix :mkdirp yes
networking.networkmanager.enable = true;
#+end_src
Enable Bluetooth at boot.
#+begin_src nix :tangle ~/.flake/system/network.nix :mkdirp yes
hardware.bluetooth.enable = true;
hardware.bluetooth.powerOnBoot = true;
services.blueman.enable = true;
#+end_src
Enable printing.
#+begin_src nix :tangle ~/.flake/system/network.nix :mkdirp yes
services.printing.enable = true;
#+end_src
Enable SSH.
#+begin_src nix :tangle ~/.flake/system/network.nix :mkdirp yes
services.openssh.enable = true;
#+end_src
Set up my firewall.
#+begin_src nix :tangle ~/.flake/system/network.nix :mkdirp yes
networking.firewall = {
allowedTCPPorts = [ ];
allowedUDPPorts = [ ];
};
environment.etc = {
"openvpn/update-resolv-conf" = {
source = ./update-resolv-conf.sh;
mode = "0700";
};
};
#+end_src
Close the network configuration.
#+begin_src nix :tangle ~/.flake/system/network.nix :mkdirp yes
}
#+end_src

View file

@ -1,71 +0,0 @@
#!/usr/bin/env bash
#
# Parses DHCP options from openvpn to update resolv.conf
# To use set as 'up' and 'down' script in your openvpn *.conf:
# up /etc/openvpn/update-resolv-conf
# down /etc/openvpn/update-resolv-conf
#
# Used snippets of resolvconf script by Thomas Hood <jdthood@yahoo.co.uk>
# and Chris Hanson
# Licensed under the GNU GPL. See /usr/share/common-licenses/GPL.
# 07/2013 colin@daedrum.net Fixed intet name
# 05/2006 chlauber@bnc.ch
#
# Example envs set from openvpn:
# foreign_option_1='dhcp-option DNS 193.43.27.132'
# foreign_option_2='dhcp-option DNS 193.43.27.133'
# foreign_option_3='dhcp-option DOMAIN be.bnc.ch'
# foreign_option_4='dhcp-option DOMAIN-SEARCH bnc.local'
## The 'type' builtins will look for file in $PATH variable, so we set the
## PATH below. You might need to directly set the path to 'resolvconf'
## manually if it still doesn't work, i.e.
## RESOLVCONF=/usr/sbin/resolvconf
export PATH=$PATH:/sbin:/usr/sbin:/bin:/usr/bin
RESOLVCONF=$(type -p resolvconf)
case $script_type in
up)
for optionname in ${!foreign_option_*} ; do
option="${!optionname}"
echo $option
part1=$(echo "$option" | cut -d " " -f 1)
if [ "$part1" == "dhcp-option" ] ; then
part2=$(echo "$option" | cut -d " " -f 2)
part3=$(echo "$option" | cut -d " " -f 3)
if [ "$part2" == "DNS" ] ; then
IF_DNS_NAMESERVERS="$IF_DNS_NAMESERVERS $part3"
fi
if [[ "$part2" == "DOMAIN" || "$part2" == "DOMAIN-SEARCH" ]] ; then
IF_DNS_SEARCH="$IF_DNS_SEARCH $part3"
fi
fi
done
R=""
if [ "$IF_DNS_SEARCH" ]; then
R="search "
for DS in $IF_DNS_SEARCH ; do
R="${R} $DS"
done
R="${R}
"
fi
for NS in $IF_DNS_NAMESERVERS ; do
R="${R}nameserver $NS
"
done
#echo -n "$R" | $RESOLVCONF -x -p -a "${dev}"
echo -n "$R" | $RESOLVCONF -x -a "${dev}.inet"
;;
down)
$RESOLVCONF -d "${dev}.inet"
;;
esac
# Workaround / jm@epiclabs.io
# force exit with no errors. Due to an apparent conflict with the Network Manager
# $RESOLVCONF sometimes exits with error code 6 even though it has performed the
# action correctly and OpenVPN shuts down.
exit 0

View file

@ -1,14 +0,0 @@
#+title: User Configuration
Set up my user account with =zsh= as default shell with =sudoers= and network management permissions.
#+begin_src nix
{ config, lib, pkgs, ... }:
{
users.users.jjanzen = {
shell = pkgs.zsh;
isNormalUser = true;
extraGroups = [ "networkmanager" "wheel" ];
};
}
#+end_src