Compare commits
78 Commits
658097cd82
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
2358de9037
|
|||
|
10778b2d85
|
|||
|
1f596f832f
|
|||
|
b23ad485c9
|
|||
|
1914dcd527
|
|||
|
50d19660d6
|
|||
|
2ca3bb5277
|
|||
|
14af2478e7
|
|||
|
eb21f28aec
|
|||
|
ffca94ea16
|
|||
|
d11a98e0e4
|
|||
|
9167ad2b6d
|
|||
|
8438ba2934
|
|||
|
9ad1b9e275
|
|||
|
39b664ed33
|
|||
|
78a2e5bac8
|
|||
|
58d759f6fc
|
|||
|
4dac10e2a1
|
|||
|
0ea327729a
|
|||
|
7d7d4bc9e6
|
|||
|
9a2e2f8e5f
|
|||
|
0e305c226b
|
|||
|
432d5df195
|
|||
|
8ef20405ba
|
|||
| 4d584b351a | |||
| 2c7f4e5de6 | |||
| bd65374258 | |||
| 9f5fdfff1a | |||
|
d248862921
|
|||
|
eb69a1f4e6
|
|||
|
676a7c1151
|
|||
|
4c8579a5c0
|
|||
|
01e412a41b
|
|||
|
bc2dacc391
|
|||
|
c03cd11a12
|
|||
|
d0fec282af
|
|||
|
bde0172955
|
|||
|
fa4023731a
|
|||
|
d7ce4f69cc
|
|||
|
c6dd3ccfb8
|
|||
|
480fe8173f
|
|||
|
960a63e48c
|
|||
|
4dfee51548
|
|||
|
ff3e9ef40d
|
|||
|
f1c4902466
|
|||
|
2a922d572e
|
|||
|
b899ae7f20
|
|||
|
a3607a87a3
|
|||
|
3a83ffaaa2
|
|||
|
b482da2727
|
|||
|
86e81e89d3
|
|||
|
938b320009
|
|||
|
c3ff2decad
|
|||
| 40343553ee | |||
|
e58683ffce
|
|||
|
d80a9be891
|
|||
|
ffc042d536
|
|||
|
ed70114046
|
|||
|
57626e3725
|
|||
|
aefc6840ba
|
|||
|
06741d5341
|
|||
|
50a2d3bee0
|
|||
|
c9748d88ba
|
|||
|
4756405ccd
|
|||
|
587ff20021
|
|||
|
12a4dbbdfa
|
|||
|
5c081ed79b
|
|||
|
df15192e95
|
|||
| ef018c82d6 | |||
|
19ec1bc430
|
|||
|
877c76f647
|
|||
|
088f986f61
|
|||
|
5d0a48fab6
|
|||
|
3a3429f79f
|
|||
|
b44db14a17
|
|||
|
cf40ef6794
|
|||
|
b88b249203
|
|||
|
19dbd995ec
|
2
.gitignore
vendored
@@ -1,2 +1,2 @@
|
||||
# User-specific configuration (generated by make init)
|
||||
hardware-configuration.nix
|
||||
.DS_Store
|
||||
|
||||
29
Makefile
@@ -1,8 +1,9 @@
|
||||
.PHONY: init install link unlink rebuild update purge edit gen-hardware help
|
||||
.PHONY: init install link unlink build update purge edit hw help
|
||||
|
||||
NIXOS_DIR := /etc/nixos
|
||||
REPO_DIR := $(shell pwd)
|
||||
SETTINGS := settings.nix
|
||||
HOSTNAME := $(shell grep 'hostname =' $(SETTINGS) | cut -d '"' -f 2)
|
||||
|
||||
# Colors for output
|
||||
GREEN := \033[0;32m
|
||||
@@ -11,19 +12,19 @@ RED := \033[0;31m
|
||||
NC := \033[0m # No Color
|
||||
|
||||
help:
|
||||
@echo "NixOS Config"
|
||||
@echo "NixOS Config (Flake)"
|
||||
@echo ""
|
||||
@echo " make init - first time setup"
|
||||
@echo " make gen-hardware - generate hardware-configuration.nix"
|
||||
@echo " make rebuild - rebuild nixos"
|
||||
@echo " make update - upgrade + rebuild"
|
||||
@echo " make hw - generate hardware-configuration.nix"
|
||||
@echo " make build - build nixos configuration"
|
||||
@echo " make update - update flake inputs and rebuild"
|
||||
@echo " make purge - garbage collect"
|
||||
@echo " make link - symlink to /etc/nixos"
|
||||
@echo " make unlink - remove symlink"
|
||||
@echo " make edit - edit settings.nix"
|
||||
|
||||
init:
|
||||
@$(MAKE) --no-print-directory gen-hardware
|
||||
@$(MAKE) --no-print-directory hw
|
||||
@$(MAKE) --no-print-directory link
|
||||
@echo ""
|
||||
@echo "done. run 'make rebuild' when ready"
|
||||
@@ -47,20 +48,26 @@ unlink:
|
||||
echo "/etc/nixos is not a symlink"; \
|
||||
fi
|
||||
|
||||
rebuild:
|
||||
sudo nixos-rebuild switch
|
||||
build:
|
||||
@if [ -f hardware-configuration.nix ]; then \
|
||||
git add -f -N hardware-configuration.nix; \
|
||||
fi
|
||||
@echo "Rebuilding system for $(HOSTNAME)..."
|
||||
sudo nixos-rebuild switch --flake .#$(HOSTNAME)
|
||||
|
||||
update:
|
||||
sudo nixos-rebuild switch --upgrade
|
||||
@echo "Updating flake inputs..."
|
||||
nix flake update
|
||||
@$(MAKE) --no-print-directory rebuild
|
||||
|
||||
purge:
|
||||
sudo nix-collect-garbage -d
|
||||
sudo /run/current-system/bin/switch-to-configuration boot
|
||||
|
||||
check:
|
||||
nix-instantiate '<nixpkgs/nixos>' -A system --dry-run
|
||||
nix flake check
|
||||
|
||||
gen-hardware:
|
||||
hw:
|
||||
sudo nixos-generate-config --show-hardware-config > hardware-configuration.nix
|
||||
|
||||
edit:
|
||||
|
||||
11
README.md
@@ -1,6 +1,7 @@
|
||||
# Lavitz - An opinionated NixOS config named after Lavitz from the PS1 classic The Legend of Dragoon
|
||||
# Lavitz - My NixOS desktop configuration named after Lavitz from the PS1 classic The Legend of Dragoon
|
||||
|
||||
DE: Gnome
|
||||
Browser: Librewolf
|
||||
Terminal: Ghostty
|
||||
Password Manager: Bitwarden
|
||||
- Nix Version: 25.11
|
||||
- DE: Gnome
|
||||
- Browser: Librewolf
|
||||
- Terminal: Ghostty
|
||||
- Password Manager: Bitwarden
|
||||
|
||||
|
Before Width: | Height: | Size: 15 MiB |
|
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 35 KiB |
|
Before Width: | Height: | Size: 186 KiB |
|
Before Width: | Height: | Size: 200 KiB |
|
Before Width: | Height: | Size: 13 MiB |
BIN
assets/wallpapers/sound.png
Normal file
|
After Width: | Height: | Size: 60 KiB |
BIN
assets/wallpapers/tetris.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
22
common.nix
Normal file
@@ -0,0 +1,22 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
# Import Modules
|
||||
./modules/boot.nix
|
||||
./modules/networking.nix
|
||||
./modules/locale.nix
|
||||
./modules/desktop.nix
|
||||
./modules/audio.nix
|
||||
./modules/users.nix
|
||||
./modules/programs.nix
|
||||
./modules/hardware.nix
|
||||
./modules/services.nix
|
||||
./modules/home.nix
|
||||
];
|
||||
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
# xdg.portal.config.common.default = [ "cosmic" ];
|
||||
|
||||
system.stateVersion = "25.11";
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
{ config, pkgs, ... }:
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
@@ -11,16 +11,16 @@
|
||||
./modules/desktop.nix
|
||||
./modules/audio.nix
|
||||
./modules/users.nix
|
||||
./modules/packages.nix
|
||||
./modules/programs.nix
|
||||
./modules/hardware.nix
|
||||
./modules/services.nix
|
||||
./modules/aliases.nix
|
||||
./modules/assets.nix
|
||||
./modules/home-manager.nix
|
||||
./modules/home.nix
|
||||
];
|
||||
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
# xdg.portal.config.common.default = [ "gnome" ];
|
||||
nix.settings.experimental-features = [
|
||||
"nix-command"
|
||||
"flakes"
|
||||
];
|
||||
|
||||
system.stateVersion = "25.11";
|
||||
}
|
||||
|
||||
112
flake.lock
generated
Normal file
@@ -0,0 +1,112 @@
|
||||
{
|
||||
"nodes": {
|
||||
"cosmic-manager": {
|
||||
"inputs": {
|
||||
"flake-parts": "flake-parts",
|
||||
"home-manager": [
|
||||
"home-manager"
|
||||
],
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1765831383,
|
||||
"narHash": "sha256-P5F/VPjjGw7s0AOTPb3z3gxqtH0YkAnd/c9P6QdWrEU=",
|
||||
"owner": "HeitorAugustoLN",
|
||||
"repo": "cosmic-manager",
|
||||
"rev": "819d4d21fb90460dd11416d81d2cff65a53b8a59",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "HeitorAugustoLN",
|
||||
"repo": "cosmic-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-parts": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": [
|
||||
"cosmic-manager",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1759362264,
|
||||
"narHash": "sha256-wfG0S7pltlYyZTM+qqlhJ7GMw2fTF4mLKCIVhLii/4M=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "758cf7296bee11f1706a574c77d072b8a7baa881",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1772302941,
|
||||
"narHash": "sha256-TL3+ckbOTILXrR0qSK3dJj2BJ0S5yz/YSsUF1oEgd9g=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "9b9142b5fe214c2adabe86257c33e022372b7c96",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"ref": "release-25.11",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1772047000,
|
||||
"narHash": "sha256-7DaQVv4R97cii/Qdfy4tmDZMB2xxtyIvNGSwXBBhSmo=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "1267bb4920d0fc06ea916734c11b0bf004bbe17e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-25.11",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-unstable": {
|
||||
"locked": {
|
||||
"lastModified": 1771848320,
|
||||
"narHash": "sha256-0MAd+0mun3K/Ns8JATeHT1sX28faLII5hVLq0L3BdZU=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "2fc6539b481e1d2569f25f8799236694180c0993",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"cosmic-manager": "cosmic-manager",
|
||||
"home-manager": "home-manager",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"nixpkgs-unstable": "nixpkgs-unstable"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
||||
42
flake.nix
Normal file
@@ -0,0 +1,42 @@
|
||||
{
|
||||
description = "Lavitz Configuration";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
|
||||
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager/release-25.11";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
cosmic-manager = {
|
||||
url = "github:HeitorAugustoLN/cosmic-manager";
|
||||
inputs = {
|
||||
nixpkgs.follows = "nixpkgs";
|
||||
home-manager.follows = "home-manager";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, nixpkgs-unstable, home-manager, ... }@inputs:
|
||||
let
|
||||
settings = import ./settings.nix;
|
||||
system = "x86_64-linux";
|
||||
overlay-unstable = final: prev: {
|
||||
unstable = import nixpkgs-unstable {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
};
|
||||
in {
|
||||
nixosConfigurations."${settings.hostname}" = nixpkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
specialArgs = { inherit inputs; };
|
||||
modules = [
|
||||
({ config, pkgs, ... }: { nixpkgs.overlays = [ overlay-unstable ]; })
|
||||
./configuration.nix
|
||||
home-manager.nixosModules.home-manager
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
33
hardware-configuration.nix
Normal file
@@ -0,0 +1,33 @@
|
||||
# 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" "usbhid" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/1d9c0c94-23d1-4acf-8e68-39cec48dc75a";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/AE5D-3C23";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0077" "dmask=0077" ];
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[ { device = "/dev/disk/by-uuid/59acaf1c-702d-4547-a118-d8b5b16009a8"; }
|
||||
];
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
environment.shellAliases = {
|
||||
# Nix Commands
|
||||
"nix:rebuild" = "sudo nixos-rebuild switch";
|
||||
"nix:update" = "sudo nixos-rebuild switch --upgrade";
|
||||
"nix:purge" = "sudo nix-collect-garbage -d && sudo /run/current-system/bin/switch-to-configuration boot";
|
||||
"nix:edit" = "$EDITOR /etc/nixos";
|
||||
"nix:push" = "cd /etc/nixos && git add -A && git commit -m \"$(date -u +%s)\" && git push";
|
||||
"nix:pull" = "cd /etc/nixos && git pull";
|
||||
"nix:gen-hardware" = "sudo nixos-generate-config --show-hardware-config > /etc/nixos/hardware-configuration.nix";
|
||||
|
||||
# Utilities
|
||||
"fixaudio" = "systemctl --user restart pipewire pipewire-pulse wireplumber";
|
||||
"nf" = "neofetch";
|
||||
};
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
let
|
||||
settings = import ../settings.nix;
|
||||
# The assets folder from the project root
|
||||
assetsPath = ../assets;
|
||||
in
|
||||
{
|
||||
# Use tmpfiles.rules to create the symlink at boot/activation
|
||||
# L+ forces the creation of the symlink, removing existing file/dir if necessary
|
||||
systemd.tmpfiles.rules = [
|
||||
"L+ /home/${settings.username}/Assets - - - - ${assetsPath}"
|
||||
];
|
||||
}
|
||||
@@ -1,9 +1,8 @@
|
||||
{ config, pkgs, ... }:
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
security.rtkit.enable = true;
|
||||
|
||||
# Pipewire
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
@@ -13,14 +12,24 @@
|
||||
wireplumber.enable = true;
|
||||
};
|
||||
|
||||
services.pipewire.extraConfig.pipewire."92-low-latency" = {
|
||||
"context.properties" = {
|
||||
"default.clock.rate" = 48000;
|
||||
"default.clock.quantum" = 256;
|
||||
"default.clock.min-quantum" = 256;
|
||||
"default.clock.max-quantum" = 1024;
|
||||
# Elgato makes shit products and they should feel bad :c
|
||||
services.pipewire.wireplumber.extraConfig."51-wave3" = {
|
||||
"monitor.alsa.rules" = [
|
||||
{
|
||||
matches = [
|
||||
{
|
||||
"node.name" = "~alsa_input.usb-Elgato_Systems_Elgato_Wave_3.*";
|
||||
}
|
||||
];
|
||||
actions = {
|
||||
update-props = {
|
||||
"session.suspend-timeout-seconds" = 0;
|
||||
"node.pause-on-idle" = false;
|
||||
};
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
# DeepFilterNet noise reduction filter chain
|
||||
services.pipewire.extraConfig.pipewire."99-deepfilter-source" = {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ config, pkgs, ... }:
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
boot.loader.systemd-boot = {
|
||||
@@ -8,10 +8,15 @@
|
||||
};
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
boot.consoleLogLevel = 3;
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
boot.kernelModules = [ "tcp_bbr" ];
|
||||
boot.initrd.kernelModules = [ "amdgpu" ];
|
||||
boot.kernelParams = [ "preempt=full" ];
|
||||
boot.kernelParams = [
|
||||
"preempt=full"
|
||||
"quiet"
|
||||
"udev.log_priority=3"
|
||||
];
|
||||
|
||||
boot.tmp.useTmpfs = true;
|
||||
boot.tmp.tmpfsSize = "4G";
|
||||
|
||||
@@ -1,10 +1,14 @@
|
||||
{ config, pkgs, ... }:
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
services.displayManager.gdm.enable = true;
|
||||
services.desktopManager.gnome.enable = true;
|
||||
services.xserver.enable = true;
|
||||
|
||||
environment.gnome.excludePackages = with pkgs; [ gnome-tour gnome-user-docs gnome-console epiphany ];
|
||||
services.desktopManager.gnome.enable = true;
|
||||
services.displayManager.gdm.enable = true;
|
||||
|
||||
services.printing.enable = true;
|
||||
|
||||
environment.gnome.excludePackages = with pkgs; [
|
||||
epiphany
|
||||
];
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ config, pkgs, ... }:
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
hardware.graphics = {
|
||||
|
||||
@@ -1,84 +0,0 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
home-manager = builtins.fetchTarball "https://github.com/nix-community/home-manager/archive/release-25.11.tar.gz";
|
||||
settings = import ../settings.nix;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
(import "${home-manager}/nixos")
|
||||
];
|
||||
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
|
||||
home-manager.users.${settings.username} = { pkgs, ... }: {
|
||||
home.stateVersion = "25.11";
|
||||
|
||||
home.sessionVariables = {
|
||||
BROWSER = "librewolf";
|
||||
SSH_AUTH_SOCK = "/home/${settings.username}/.bitwarden-ssh-agent.sock";
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
# Browsers and comms
|
||||
discord
|
||||
signal-desktop
|
||||
librewolf
|
||||
|
||||
# Development tools
|
||||
go
|
||||
cargo
|
||||
gnumake
|
||||
rustc
|
||||
rust-analyzer
|
||||
rustfmt
|
||||
nodejs_24
|
||||
openssh
|
||||
nodePackages."pnpm"
|
||||
openssl
|
||||
killall
|
||||
ffmpeg
|
||||
zed-editor
|
||||
vscodium
|
||||
usbutils
|
||||
qmk
|
||||
ghostty
|
||||
neofetch
|
||||
deepfilternet
|
||||
pavucontrol
|
||||
texliveFull
|
||||
|
||||
# Desktop applications
|
||||
bitwarden-desktop
|
||||
vlc
|
||||
streamrip
|
||||
cider-2
|
||||
zotero
|
||||
prismlauncher
|
||||
lrcget
|
||||
impression
|
||||
streamcontroller
|
||||
onlyoffice-desktopeditors
|
||||
|
||||
# Gnome Extensions
|
||||
gnomeExtensions.blur-my-shell
|
||||
gnomeExtensions.just-perfection
|
||||
gnomeExtensions.arc-menu
|
||||
gnomeExtensions.appindicator
|
||||
];
|
||||
|
||||
programs.git = {
|
||||
enable = true;
|
||||
settings = {
|
||||
gpg.format = "ssh";
|
||||
commit.gpgsign = true;
|
||||
user = {
|
||||
name = settings.gitName;
|
||||
email = settings.gitEmail;
|
||||
signingkey = settings.gitKey;
|
||||
}
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
37
modules/home.nix
Normal file
@@ -0,0 +1,37 @@
|
||||
{ inputs, ... }:
|
||||
|
||||
let
|
||||
settings = import ../settings.nix;
|
||||
homeModules = [
|
||||
inputs.cosmic-manager.homeManagerModules.cosmic-manager
|
||||
./home/session.nix
|
||||
./home/packages.nix
|
||||
./home/git.nix
|
||||
./home/gnome.nix
|
||||
./home/cli.nix
|
||||
./home/librewolf.nix
|
||||
./home/zed.nix
|
||||
./home/ghostty.nix
|
||||
./home/ssh.nix
|
||||
];
|
||||
in
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
|
||||
home-manager.backupFileExtension = "backup";
|
||||
|
||||
home-manager.extraSpecialArgs = {
|
||||
inherit settings;
|
||||
};
|
||||
|
||||
home-manager.users.${settings.username} =
|
||||
{ config, ... }:
|
||||
{
|
||||
imports = homeModules;
|
||||
home.stateVersion = "25.11";
|
||||
home.sessionVariables = {
|
||||
SSH_AUTH_SOCK = "${config.home.homeDirectory}/.bitwarden-ssh-agent.sock";
|
||||
};
|
||||
};
|
||||
}
|
||||
69
modules/home/cli.nix
Normal file
@@ -0,0 +1,69 @@
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
home.shellAliases = {
|
||||
# Nix Commands
|
||||
"nix:build" = "sudo nixos-rebuild switch --flake /etc/nixos";
|
||||
"nix:update" = "cd /etc/nixos && nix flake update && sudo nixos-rebuild switch --flake .";
|
||||
"nix:purge" =
|
||||
"sudo nix-collect-garbage -d && sudo /run/current-system/bin/switch-to-configuration boot";
|
||||
"nix:edit" = "$EDITOR /etc/nixos";
|
||||
"nix:push" = "cd /etc/nixos && git add -A && git commit -m \"$(date -u +%s)\" && git push";
|
||||
"nix:pull" = "cd /etc/nixos && git pull";
|
||||
"nix:hw" =
|
||||
"sudo nixos-generate-config --show-hardware-config > /etc/nixos/hardware-configuration.nix";
|
||||
|
||||
# Utilities
|
||||
"fixaudio" = "systemctl --user restart pipewire pipewire-pulse wireplumber";
|
||||
"nf" = "neofetch";
|
||||
};
|
||||
|
||||
programs.bash = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
enableBashIntegration = true;
|
||||
enableZshIntegration = true;
|
||||
settings = {
|
||||
add_newline = false;
|
||||
character = {
|
||||
success_symbol = "[➜](bold green)";
|
||||
error_symbol = "[➜](bold red)";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
programs.zoxide = {
|
||||
enable = true;
|
||||
enableBashIntegration = true;
|
||||
enableZshIntegration = true;
|
||||
};
|
||||
|
||||
programs.eza = {
|
||||
enable = true;
|
||||
enableBashIntegration = true;
|
||||
enableZshIntegration = true;
|
||||
git = true;
|
||||
icons = "auto";
|
||||
};
|
||||
|
||||
programs.bat = {
|
||||
enable = true;
|
||||
config = {
|
||||
theme = "Catppuccin Macchiato";
|
||||
};
|
||||
};
|
||||
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
enableBashIntegration = true;
|
||||
enableZshIntegration = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
}
|
||||
15
modules/home/ghostty.nix
Normal file
@@ -0,0 +1,15 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.ghostty = {
|
||||
enable = true;
|
||||
package = pkgs.ghostty;
|
||||
|
||||
enableBashIntegration = true;
|
||||
|
||||
settings = {
|
||||
theme = "Catppuccin Macchiato";
|
||||
background-opacity = "0.95";
|
||||
};
|
||||
};
|
||||
}
|
||||
17
modules/home/git.nix
Normal file
@@ -0,0 +1,17 @@
|
||||
{ settings, ... }:
|
||||
|
||||
{
|
||||
programs.git = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
gpg.format = "ssh";
|
||||
commit.gpgsign = true;
|
||||
user = {
|
||||
name = settings.gitName;
|
||||
email = settings.gitEmail;
|
||||
signingkey = settings.gitPubKey;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
31
modules/home/gnome.nix
Normal file
@@ -0,0 +1,31 @@
|
||||
{ config, ... }:
|
||||
|
||||
{
|
||||
dconf.settings = {
|
||||
"org/gnome/desktop/interface" = {
|
||||
color-scheme = "prefer-dark";
|
||||
accent-color = "pink";
|
||||
clock-show-weekday = true;
|
||||
clock-show-date = true;
|
||||
clock-format = "12h";
|
||||
};
|
||||
|
||||
"org/gnome/system/location" = {
|
||||
enabled = "true";
|
||||
};
|
||||
|
||||
"org/gnome/desktop/background" = {
|
||||
picture-uri = "file://${config.home.homeDirectory}/Assets/wallpapers/sound.png";
|
||||
picture-uri-dark = "file://${config.home.homeDirectory}/Assets/wallpapers/sound.png";
|
||||
};
|
||||
|
||||
"org/gnome/desktop/peripherals/mouse" = {
|
||||
accel-profile = "flat";
|
||||
};
|
||||
|
||||
"org/gnome/settings-daemon/plugins/media-keys" = {
|
||||
home = [ "<Super>e" ];
|
||||
www = [ "<Super>b" ];
|
||||
};
|
||||
};
|
||||
}
|
||||
124
modules/home/librewolf.nix
Normal file
@@ -0,0 +1,124 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.firefox = {
|
||||
enable = true;
|
||||
package = pkgs.librewolf;
|
||||
|
||||
policies = {
|
||||
DisableTelemetry = true;
|
||||
DisableFirefoxStudies = true;
|
||||
DisablePocket = true;
|
||||
DisableFirefoxAccounts = true;
|
||||
OfferToSaveLogins = false;
|
||||
EnableTrackingProtection = true;
|
||||
|
||||
FirefoxHome = {
|
||||
Search = true;
|
||||
TopSites = true;
|
||||
SponsoredTopSites = false;
|
||||
Highlights = false;
|
||||
Pocket = false;
|
||||
SponsoredPocket = false;
|
||||
};
|
||||
|
||||
SanitizeOnShutdown = {
|
||||
Cache = true;
|
||||
Cookies = false;
|
||||
History = false;
|
||||
Sessions = true;
|
||||
SiteSettings = false;
|
||||
OfflineApps = true;
|
||||
};
|
||||
|
||||
SearchEngines = {
|
||||
Default = "Searx Search";
|
||||
Remove = [
|
||||
"Google"
|
||||
"Bing"
|
||||
"Perplexity"
|
||||
"Wikipedia (en)"
|
||||
];
|
||||
Add = [
|
||||
{
|
||||
Name = "Searx Search";
|
||||
URLTemplate = "https://search.atri.dad/search?q={searchTerms}";
|
||||
Method = "GET";
|
||||
IconURL = "https://search.atri.dad/favicon.ico";
|
||||
Alias = "searx";
|
||||
Description = "Searx (search.atri.dad)";
|
||||
}
|
||||
{
|
||||
Name = "DuckDuckGo";
|
||||
URLTemplate = "https://duckduckgo.com/?q={searchTerms}";
|
||||
SuggestURLTemplate = "https://duckduckgo.com/ac/?q={searchTerms}&type=list";
|
||||
Method = "GET";
|
||||
IconURL = "https://duckduckgo.com/favicon.ico";
|
||||
Alias = "ddg";
|
||||
Description = "DuckDuckGo";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
ExtensionSettings = {
|
||||
# Bitwarden
|
||||
"{446900e4-71c2-419f-a6a7-df9c091e268b}" = {
|
||||
install_url = "https://addons.mozilla.org/firefox/downloads/latest/bitwarden-password-manager/latest.xpi";
|
||||
installation_mode = "force_installed";
|
||||
};
|
||||
|
||||
# Floccus
|
||||
"floccus@handmadeideas.org" = {
|
||||
install_url = "https://addons.mozilla.org/firefox/downloads/latest/floccus/latest.xpi";
|
||||
installation_mode = "force_installed";
|
||||
};
|
||||
|
||||
# uBlock Origin
|
||||
"uBlock0@raymondhill.net" = {
|
||||
install_url = "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi";
|
||||
installation_mode = "force_installed";
|
||||
};
|
||||
};
|
||||
|
||||
Preferences = {
|
||||
"browser.startup.homepage" = "about:home";
|
||||
"extensions.autoDisableScopes" = 0;
|
||||
"browser.toolbars.bookmarks.visibility" = "always";
|
||||
"network.cookie.cookieBehavior" = 1;
|
||||
"browser.safebrowsing.malware.enabled" = false;
|
||||
"browser.safebrowsing.phishing.enabled" = false;
|
||||
"browser.safebrowsing.blockedURIs.enabled" = false;
|
||||
"browser.safebrowsing.downloads.enabled" = false;
|
||||
"browser.safebrowsing.provider.google4.gethashURL" = "";
|
||||
"browser.safebrowsing.provider.google4.updateURL" = "";
|
||||
"browser.safebrowsing.provider.google.gethashURL" = "";
|
||||
"browser.safebrowsing.provider.google.updateURL" = "";
|
||||
"browser.newtabpage.activity-stream.newtabWallpapers.wallpaper" = "dark-mountain";
|
||||
|
||||
"extensions.activeThemeID" = {
|
||||
Value = "firefox-alpenglow@mozilla.org";
|
||||
Status = "locked";
|
||||
};
|
||||
|
||||
"privacy.resistFingerprinting" = {
|
||||
Value = true;
|
||||
Status = "locked";
|
||||
};
|
||||
|
||||
"browser.ml.chat.enabled" = {
|
||||
Value = false;
|
||||
Status = "locked";
|
||||
};
|
||||
"browser.ml.chat.sidebar" = {
|
||||
Value = false;
|
||||
Status = "locked";
|
||||
};
|
||||
"browser.tabs.groups.smart.userEnabled" = {
|
||||
Value = false;
|
||||
Status = "locked";
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
43
modules/home/packages.nix
Normal file
@@ -0,0 +1,43 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
# Development tools
|
||||
gnumake
|
||||
openssh
|
||||
nodePackages."pnpm"
|
||||
ffmpeg
|
||||
qmk
|
||||
neofetch
|
||||
deepfilternet
|
||||
pavucontrol
|
||||
texliveFull
|
||||
texlab
|
||||
nil
|
||||
nixd
|
||||
|
||||
# CLI
|
||||
bitwarden-cli
|
||||
tea
|
||||
|
||||
# Desktop applications
|
||||
bitwarden-desktop
|
||||
vlc
|
||||
streamrip
|
||||
cider-2
|
||||
zotero
|
||||
lrcget
|
||||
impression
|
||||
streamcontroller
|
||||
onlyoffice-desktopeditors
|
||||
gnome-keyring
|
||||
pinta
|
||||
discord
|
||||
signal-desktop
|
||||
element-desktop
|
||||
unstable.fastmail-desktop
|
||||
supersonic
|
||||
];
|
||||
|
||||
programs.obs-studio.enable = true;
|
||||
}
|
||||
12
modules/home/session.nix
Normal file
@@ -0,0 +1,12 @@
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
home.file."Assets" = {
|
||||
source = ../../assets;
|
||||
force = true;
|
||||
};
|
||||
|
||||
systemd.user.sessionVariables = {
|
||||
BROWSER = "librewolf";
|
||||
};
|
||||
}
|
||||
34
modules/home/ssh.nix
Normal file
@@ -0,0 +1,34 @@
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
programs.ssh = {
|
||||
enable = true;
|
||||
enableDefaultConfig = false;
|
||||
matchBlocks = {
|
||||
"*" = {
|
||||
identityAgent = "~/.bitwarden-ssh-agent.sock";
|
||||
};
|
||||
"localhost" = {
|
||||
extraOptions.UserKnownHostsFile = "/dev/null";
|
||||
};
|
||||
"tux" = {
|
||||
hostname = "tuxworld.usask.ca";
|
||||
user = "atl175";
|
||||
};
|
||||
"haschel" = {
|
||||
hostname = "haschel";
|
||||
user = "fedora";
|
||||
};
|
||||
"lloyd" = {
|
||||
hostname = "lloyd";
|
||||
user = "truenas_admin";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
xdg.configFile."autostart/gnome-keyring-ssh.desktop".text = ''
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Hidden=true
|
||||
'';
|
||||
}
|
||||
56
modules/home/zed.nix
Normal file
@@ -0,0 +1,56 @@
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
programs.zed-editor = {
|
||||
enable = true;
|
||||
|
||||
extensions = [
|
||||
"nix"
|
||||
"catppuccin"
|
||||
"catppuccin-icons"
|
||||
"toml"
|
||||
"elixir"
|
||||
"make"
|
||||
"astro"
|
||||
"vue"
|
||||
"latex"
|
||||
"mermaid"
|
||||
];
|
||||
|
||||
userSettings = {
|
||||
icon_theme = "Catppuccin Macchiato";
|
||||
title_bar = {
|
||||
show_sign_in = false;
|
||||
};
|
||||
collaboration_panel = {
|
||||
button = false;
|
||||
};
|
||||
window_decorations = "client";
|
||||
status_bar = {
|
||||
cursor_position_button = false;
|
||||
};
|
||||
disable_ai = true;
|
||||
telemetry = {
|
||||
diagnostics = false;
|
||||
metrics = false;
|
||||
};
|
||||
ui_font_size = 16;
|
||||
buffer_font_size = 15;
|
||||
theme = {
|
||||
mode = "system";
|
||||
light = "One Light";
|
||||
dark = "Catppuccin Macchiato";
|
||||
};
|
||||
|
||||
languages = {
|
||||
"Nix" = {
|
||||
language_servers = [
|
||||
"nil"
|
||||
"nixd"
|
||||
];
|
||||
format_on_save = "on";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
{ config, pkgs, ... }:
|
||||
{ ... }:
|
||||
|
||||
let
|
||||
settings = import ../settings.nix;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ config, pkgs, ... }:
|
||||
{ ... }:
|
||||
|
||||
let
|
||||
settings = import ../settings.nix;
|
||||
@@ -17,19 +17,27 @@ in
|
||||
# Allowed ports
|
||||
allowedTCPPorts = [
|
||||
# SyncThing
|
||||
8384 22000
|
||||
8384
|
||||
22000
|
||||
];
|
||||
allowedUDPPorts = [
|
||||
|
||||
# SyncThing
|
||||
22000 21027
|
||||
22000
|
||||
21027
|
||||
];
|
||||
};
|
||||
|
||||
networking.nameservers = [ "1.1.1.1" "9.9.9.9" ];
|
||||
networking.nameservers = [
|
||||
"1.1.1.1"
|
||||
"9.9.9.9"
|
||||
];
|
||||
services.resolved = {
|
||||
enable = true;
|
||||
dnsovertls = "opportunistic";
|
||||
fallbackDns = [ "1.0.0.1" "149.112.112.112" ];
|
||||
fallbackDns = [
|
||||
"1.0.0.1"
|
||||
"149.112.112.112"
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ config, pkgs, ... }:
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
# Enable unfree globally
|
||||
@@ -7,8 +7,6 @@
|
||||
environment.systemPackages = with pkgs; [
|
||||
killall
|
||||
usbutils
|
||||
pavucontrol
|
||||
ffmpeg
|
||||
openssl
|
||||
qmk-udev-rules
|
||||
];
|
||||
@@ -24,5 +22,5 @@
|
||||
|
||||
programs.java.enable = true;
|
||||
|
||||
programs.obs-studio.enable = true;
|
||||
programs.gamemode.enable = true;
|
||||
}
|
||||
@@ -1,10 +1,6 @@
|
||||
{ config, pkgs, ... }:
|
||||
{ pkgs, ... }:
|
||||
|
||||
let
|
||||
settings = import ../settings.nix;
|
||||
in
|
||||
{
|
||||
# Hardened OpenSSH
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
ports = [ 22 ];
|
||||
@@ -46,7 +42,7 @@ in
|
||||
apps = [
|
||||
{
|
||||
name = "Steam Big Picture";
|
||||
cmd = "${pkgs.steam}/bin/steam -bigpicture";
|
||||
cmd = "${pkgs.steam}/bin/steam -gamepadui";
|
||||
}
|
||||
{
|
||||
name = "Desktop";
|
||||
@@ -56,16 +52,6 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
services = {
|
||||
syncthing = {
|
||||
enable = true;
|
||||
group = "wheel";
|
||||
user = "${settings.username}";
|
||||
dataDir = "/home/${settings.username}/syncthing/data";
|
||||
configDir = "/home/${settings.username}/syncthing/conf";
|
||||
};
|
||||
};
|
||||
|
||||
services.avahi.publish.enable = true;
|
||||
services.avahi.publish.userServices = true;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ config, pkgs, ... }:
|
||||
{ ... }:
|
||||
|
||||
let
|
||||
settings = import ../settings.nix;
|
||||
|
||||
@@ -7,5 +7,5 @@
|
||||
userGroups = [ "networkmanager" "wheel" "docker" "plugdev" ];
|
||||
gitName = "Atridad Lahiji";
|
||||
gitEmail = "me@atri.dad";
|
||||
gitKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILKb+pDgkHEKI7LDWvZbhoLJ11uJMaCmVyAqotDxNOI7 me@atri.dad";
|
||||
gitPubKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILKb+pDgkHEKI7LDWvZbhoLJ11uJMaCmVyAqotDxNOI7 me@atri.dad";
|
||||
}
|
||||
|
||||