Compare commits

..

No commits in common. "main" and "home-manager" have entirely different histories.

49 changed files with 190 additions and 811 deletions

View File

@ -2,10 +2,10 @@
1) Install [NixOS](https://nixos.org/) from an ISO via USB
2) Reboot machine
3) Edit `/etc/nixos/configuration` and add `git` to packages
3) Edit /etc/nixos/configuration and add `git` to packages
4) Clone this repo
5) Copy new `host/` configuration for the new machine
6) Copy `/etc/nixos/hardware-configuration` to `host/<host>/hardware.nix`
6) Copy /etc/nixos/hardware-configuration to `host/<host>/hardware.nix`
7) Edit `flake.nix` to point to the new `host`
8) `git add .`
9) Run `sudo nixos-rebuild switch --flake .#nixos`
@ -17,22 +17,6 @@ https://gist.github.com/FlakM/0535b8aa7efec56906c5ab5e32580adf
# Building NixOS ISO
`nix build .#nixosConfigurations.live.config.system.build.isoImage`
# Using Standalone Home Manager
1) Install [Nix](https://nixos.org/) via:
`
sh <(curl --proto '=https' --tlsv1.2 -L https://nixos.org/nix/install) --daemon
`
2) Create `~/.config/nix/nix.conf` file with the following contents to enable the use of flakes:
```
experimental-features = nix-command flakes
```
3) Install `git`
4) Clone this repo
5) Edit `flake.nix` variables as needed
6) `home-manager switch --flake .`
# Misc
## Garbage collection
`nix-collect-garbage -d`

View File

@ -38,11 +38,11 @@
"base16-helix": {
"flake": false,
"locked": {
"lastModified": 1776754714,
"narHash": "sha256-E3OAK27smtATTmX45uoTSRsVD+Y+ZiVVfgM/tjpbtYg=",
"lastModified": 1760703920,
"narHash": "sha256-m82fGUYns4uHd+ZTdoLX2vlHikzwzdu2s2rYM2bNwzw=",
"owner": "tinted-theming",
"repo": "base16-helix",
"rev": "4d508123037e7851ad36ebf7d9c48b0e9e1eb581",
"rev": "d646af9b7d14bff08824538164af99d0c521b185",
"type": "github"
},
"original": {
@ -68,36 +68,14 @@
"type": "github"
}
},
"elephant": {
"inputs": {
"nixpkgs": [
"nixpkgs"
],
"systems": "systems"
},
"locked": {
"lastModified": 1781164160,
"narHash": "sha256-dxo3aPnfaQJt9K/3NhgKfu2Q9B42z4d4Or9Izoug+68=",
"owner": "abenz1267",
"repo": "elephant",
"rev": "3296842820d04d5ec774afc7528492fcbb3c01f2",
"type": "github"
},
"original": {
"owner": "abenz1267",
"ref": "master",
"repo": "elephant",
"type": "github"
}
},
"firefox-gnome-theme": {
"flake": false,
"locked": {
"lastModified": 1779670703,
"narHash": "sha256-UdfMivNMwCCqQsYDg5pSz8X2IOaOrIZLIIy+Bg3CO2o=",
"lastModified": 1764873433,
"narHash": "sha256-1XPewtGMi+9wN9Ispoluxunw/RwozuTRVuuQOmxzt+A=",
"owner": "rafaelmardojai",
"repo": "firefox-gnome-theme",
"rev": "942159e73e40bf785816f7f1f5feed9ef3d7c8f9",
"rev": "f7ffd917ac0d253dbd6a3bf3da06888f57c69f92",
"type": "github"
},
"original": {
@ -114,11 +92,11 @@
]
},
"locked": {
"lastModified": 1778716662,
"narHash": "sha256-m1Yf0wZ8j1OHjTc2UwHwyQRSnNeSgLJOd7q5Y45hzi4=",
"lastModified": 1767609335,
"narHash": "sha256-feveD98mQpptwrAEggBQKJTYbvwwglSbOv53uCfH9PY=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "f7c1a2d347e4c52d5fb8d10cb4d94b5884e546fb",
"rev": "250481aafeb741edfe23d29195671c19b36b6dca",
"type": "github"
},
"original": {
@ -146,18 +124,20 @@
"gnome-shell": {
"flake": false,
"locked": {
"host": "gitlab.gnome.org",
"lastModified": 1767737596,
"narHash": "sha256-eFujfIUQDgWnSJBablOuG+32hCai192yRdrNHTv0a+s=",
"owner": "GNOME",
"repo": "gnome-shell",
"rev": "ef02db02bf0ff342734d525b5767814770d85b49",
"type": "github"
"type": "gitlab"
},
"original": {
"host": "gitlab.gnome.org",
"owner": "GNOME",
"ref": "gnome-49",
"repo": "gnome-shell",
"rev": "ef02db02bf0ff342734d525b5767814770d85b49",
"type": "github"
"type": "gitlab"
}
},
"home-manager": {
@ -167,11 +147,11 @@
]
},
"locked": {
"lastModified": 1781989573,
"narHash": "sha256-npfH7Zv7t1akX/ArqCNro4zU4ViPlghLaPnbEfHbCxk=",
"lastModified": 1768836546,
"narHash": "sha256-nJZkTamcXXMW+SMYiGFB6lB8l0aJw0xjssfN8xYd/Fs=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "78e7d8b13ecd7f5256a5c11ce216876164099d9f",
"rev": "b56c5ad14fcf8b5bc887463552483bf000ca562a",
"type": "github"
},
"original": {
@ -204,11 +184,11 @@
]
},
"locked": {
"lastModified": 1781928658,
"narHash": "sha256-E+NGWu/3TtblwLL0uYKHB7VQOcuu6nUYSHDsscTnG2s=",
"lastModified": 1768789193,
"narHash": "sha256-EWIj+tZSvbi3e43tBwc6xvNwEWEVwPQkuGim2tvxP/E=",
"owner": "nix-community",
"repo": "nix-vscode-extensions",
"rev": "ff4a4123af3924ee8741902d0d0af6debdae36a9",
"rev": "7e5664fa1e2051630b5e9e976cfd462f21a94abb",
"type": "github"
},
"original": {
@ -219,11 +199,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1781577229,
"narHash": "sha256-lrp67w8AulE9Ks53n27I45ADSzbOCn4H+CNW1Ck8B+8=",
"lastModified": 1768564909,
"narHash": "sha256-Kell/SpJYVkHWMvnhqJz/8DqQg2b6PguxVWOuadbHCc=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "567a49d1913ce81ac6e9582e3553dd90a955875f",
"rev": "e4bae1bd10c9c57b2cf517953ab70060a828ee6f",
"type": "github"
},
"original": {
@ -245,11 +225,11 @@
]
},
"locked": {
"lastModified": 1780281641,
"narHash": "sha256-M/+hUKoKbHXpV0xGVfELbN1Ds1aoe3pL5p5/t46YhVo=",
"lastModified": 1767810917,
"narHash": "sha256-ZKqhk772+v/bujjhla9VABwcvz+hB2IaRyeLT6CFnT0=",
"owner": "nix-community",
"repo": "NUR",
"rev": "30f9ae2f04174de63ba8bcf3580ca90843b28a01",
"rev": "dead29c804adc928d3a69dfe7f9f12d0eec1f1a4",
"type": "github"
},
"original": {
@ -260,13 +240,11 @@
},
"root": {
"inputs": {
"elephant": "elephant",
"home-manager": "home-manager",
"install-system": "install-system",
"nix-vscode-extensions": "nix-vscode-extensions",
"nixpkgs": "nixpkgs",
"stylix": "stylix",
"walker": "walker"
"stylix": "stylix"
}
},
"stylix": {
@ -282,18 +260,19 @@
"nixpkgs"
],
"nur": "nur",
"systems": "systems_2",
"systems": "systems",
"tinted-foot": "tinted-foot",
"tinted-kitty": "tinted-kitty",
"tinted-schemes": "tinted-schemes",
"tinted-tmux": "tinted-tmux",
"tinted-zed": "tinted-zed"
},
"locked": {
"lastModified": 1781997134,
"narHash": "sha256-muBZG4O/agq/ljgHr6c3AsobIWgODAS6vf50xIS7o+Q=",
"lastModified": 1768744881,
"narHash": "sha256-3+h7OxqfrPIB/tRsiZXWE9sCbTm7NQN5Ie428p+S6BA=",
"owner": "danth",
"repo": "stylix",
"rev": "a6a493119e492e15874caf6f7f8c7e572e64c655",
"rev": "06684f00cfbee14da96fd4307b966884de272d3a",
"type": "github"
},
"original": {
@ -304,21 +283,6 @@
}
},
"systems": {
"locked": {
"lastModified": 1689347949,
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
"owner": "nix-systems",
"repo": "default-linux",
"rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default-linux",
"type": "github"
}
},
"systems_2": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
@ -333,18 +297,20 @@
"type": "github"
}
},
"systems_3": {
"tinted-foot": {
"flake": false,
"locked": {
"lastModified": 1689347949,
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
"owner": "nix-systems",
"repo": "default-linux",
"rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
"lastModified": 1726913040,
"narHash": "sha256-+eDZPkw7efMNUf3/Pv0EmsidqdwNJ1TaOum6k7lngDQ=",
"owner": "tinted-theming",
"repo": "tinted-foot",
"rev": "fd1b924b6c45c3e4465e8a849e67ea82933fcbe4",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default-linux",
"owner": "tinted-theming",
"repo": "tinted-foot",
"rev": "fd1b924b6c45c3e4465e8a849e67ea82933fcbe4",
"type": "github"
}
},
@ -367,11 +333,11 @@
"tinted-schemes": {
"flake": false,
"locked": {
"lastModified": 1777806186,
"narHash": "sha256-PDF0/wObw4nIsSBeXVYLsloXOiphXCgIdsrNcVXguKs=",
"lastModified": 1767710407,
"narHash": "sha256-+W1EB79Jl0/gm4JqmO0Nuc5C7hRdp4vfsV/VdzI+des=",
"owner": "tinted-theming",
"repo": "schemes",
"rev": "0c94645546f4f3ddac77a1a5fce54eb95bf50795",
"rev": "2800e2b8ac90f678d7e4acebe4fa253f602e05b2",
"type": "github"
},
"original": {
@ -383,11 +349,11 @@
"tinted-tmux": {
"flake": false,
"locked": {
"lastModified": 1778379944,
"narHash": "sha256-wPDFzMGSlARlw0Sfsn48Q2+jPSfk6N0Ng6BC/d+7Q24=",
"lastModified": 1767489635,
"narHash": "sha256-e6nnFnWXKBCJjCv4QG4bbcouJ6y3yeT70V9MofL32lU=",
"owner": "tinted-theming",
"repo": "tinted-tmux",
"rev": "fe0203a198690e71a5ff11e08812a4673de3678d",
"rev": "3c32729ccae99be44fe8a125d20be06f8d7d8184",
"type": "github"
},
"original": {
@ -399,11 +365,11 @@
"tinted-zed": {
"flake": false,
"locked": {
"lastModified": 1778378178,
"narHash": "sha256-OXPXRIQgGwV77HjYRryOHguh4ALX96jkg+tseLkGgHA=",
"lastModified": 1767488740,
"narHash": "sha256-wVOj0qyil8m+ouSsVZcNjl5ZR+1GdOOAooAatQXHbuU=",
"owner": "tinted-theming",
"repo": "base16-zed",
"rev": "9cd816033ff969415b190722cddf134e78a5665f",
"rev": "11abb0b282ad3786a2aae088d3a01c60916f2e40",
"type": "github"
},
"original": {
@ -411,31 +377,6 @@
"repo": "base16-zed",
"type": "github"
}
},
"walker": {
"inputs": {
"elephant": [
"elephant"
],
"nixpkgs": [
"nixpkgs"
],
"systems": "systems_3"
},
"locked": {
"lastModified": 1781164128,
"narHash": "sha256-xPcYrHdDXWykIi5/XXkLvliBArRnfzvs+atB9El1qhI=",
"owner": "abenz1267",
"repo": "walker",
"rev": "aa1e4b7d59237e8c43dde58636bae476f23d9bfb",
"type": "github"
},
"original": {
"owner": "abenz1267",
"ref": "master",
"repo": "walker",
"type": "github"
}
}
},
"root": "root",

View File

@ -7,29 +7,15 @@
url = "github:nix-community/home-manager/master";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-vscode-extensions = {
url = "github:nix-community/nix-vscode-extensions";
inputs.nixpkgs.follows = "nixpkgs";
};
stylix = {
url = "github:danth/stylix/master";
inputs.nixpkgs.follows = "nixpkgs";
};
elephant = {
url = "github:abenz1267/elephant/master";
inputs.nixpkgs.follows = "nixpkgs";
};
walker = {
url = "github:abenz1267/walker/master";
inputs = {
elephant.follows = "elephant";
nixpkgs.follows = "nixpkgs";
};
};
install-system = {
url = "path:scripts/install-system";
inputs.nixpkgs.follows = "nixpkgs";
@ -41,25 +27,18 @@
nixpkgs,
home-manager,
install-system,
nix-vscode-extensions,
stylix,
...
}@inputs:
let
system = "x86_64-linux";
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
overlays = [ nix-vscode-extensions.overlays.default ];
};
host = "vm";
profile = "desktop";
username = "josh";
in
{
nixosConfigurations = {
laptop = let
host = "laptop";
profile = "desktop";
username = "josh";
in nixpkgs.lib.nixosSystem {
nixos = nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = {
inherit inputs;
@ -67,17 +46,12 @@
inherit profile;
inherit username;
};
pkgs = pkgs;
modules = [
./hosts/${host}
];
};
vm = let
host = "vm";
profile = "desktop";
username = "josh";
in nixpkgs.lib.nixosSystem {
live = nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = {
inherit inputs;
@ -85,49 +59,23 @@
inherit profile;
inherit username;
};
pkgs = pkgs;
modules = [
./hosts/${host}
];
};
live = let
host = "installation-iso";
profile = "desktop";
username = "josh";
in nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = {
inherit inputs;
inherit host;
inherit profile;
inherit username;
};
pkgs = pkgs;
modules = [
(nixpkgs + "/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix")
{ environment.systemPackages = [ install-system.packages.${system}.default ]; }
./hosts/installation-iso
./hosts/${host}
];
};
};
homeConfigurations.josh = let
profile = "desktop";
username = "josh";
gpgSigningKey = null;
in home-manager.lib.homeManagerConfiguration {
homeConfigurations.${username} = home-manager.lib.homeManagerConfiguration {
extraSpecialArgs = {
inherit inputs;
inherit profile;
inherit username;
};
pkgs = pkgs;
pkgs = nixpkgs.legacyPackages.${system};
modules = [
{
modules.gpg.signingKey = gpgSigningKey;
}
./homes/josh/home.nix
./homes/${username}/home.nix
stylix.homeModules.stylix
];
};

View File

@ -1,13 +1,10 @@
{
config,
lib,
pkgs,
profile,
...
}:
with lib;
let gpgCfg = config.modules.gpg;
in
{
imports = [
../../modules/homes
@ -22,32 +19,8 @@ in
username = "josh";
homeDirectory = "/home/josh";
stateVersion = "25.11";
packages = with pkgs; [
git
tldr
tmux
vim-full
wl-clipboard
];
};
programs.git = {
enable = true;
settings = {
user = {
name = "Joshua Yuen";
email = "joshuayuen99@gmail.com";
signingkey = mkIf (gpgCfg.signingKey != null) gpgCfg.signingKey;
};
commit.gpgsign = true;
init.defaultBranch = "main";
};
};
# Enable GPG-agent for git signing
modules.gpg.enable = true;
# Let Home Manager install and manage itself
programs.home-manager.enable = true;
@ -55,19 +28,10 @@ in
package = mkDefault pkgs.nix;
settings = {
allowed-users = [ "josh" ];
trusted-users = [ "root" "@wheel" "josh" ];
experimental-features = [
"nix-command"
"flakes"
];
extra-substituters = [
"https://walker.cachix.org"
"https://walker-git.cachix.org"
];
extra-trusted-public-keys = [
"walker.cachix.org-1:fG8q+uAaMqhsMxWjwvk0IMb4mFPFLqHjuvfwQxE4oJM="
"walker-git.cachix.org-1:vmC0ocfPWh0S/vRAQGtChuiZBTAe4wiKDeyyXM0/7pM="
];
};
};
}

View File

@ -1,15 +0,0 @@
{
...
}:
{
imports = [
../../profiles/desktop
../../modules/core
../../modules/drivers
../../modules/options
./hardware.nix
./host-packages.nix
];
}

View File

@ -1,3 +0,0 @@
{
}

View File

@ -1,10 +0,0 @@
{
pkgs,
...
}:
{
environment.systemPackages = with pkgs; [
parted
unixtools.fdisk
];
}

View File

@ -1,19 +0,0 @@
{
...
}:
{
imports = [
../../profiles/desktop
../../modules/core
../../modules/drivers
../../modules/options
./hardware.nix
./host-packages.nix
];
modules.gpg.signingKey = "0x530DA0331EFE99F5";
modules.gnomeBoxes.enable = true;
}

View File

@ -1,33 +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 = [ "xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/041a9bc5-aae2-44ec-bacf-7f6a08a696f9";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/79D1-97BE";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};
swapDevices =
[ { device = "/dev/disk/by-uuid/82b669f5-d624-4a29-bf18-dd8bc453f537"; }
];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

View File

@ -1,9 +0,0 @@
{
pkgs,
...
}:
{
environment.systemPackages = with pkgs; [
];
}

View File

@ -1,28 +1,30 @@
{
profile,
...
}:
{
imports = [
../../profiles/desktop
../../profiles/${profile}
../../profiles/vm
../../modules/core
../../modules/drivers
../../modules/options
./hardware.nix
./host-packages.nix
];
virtualisation.vmVariant = {
virtualisation = {
memorySize = 8192;
cores = 8;
};
modules.hyprland = {
enable = true;
terminal = "kitty";
monitor = [
",preferred,auto,1"
];
};
modules.plasma.enable = false;
modules.displayManager.displayManager = "gdm";
# drivers.amdgpu.enable = false;
# drivers.nvidia.enable = false;
# drivers.nvidia-prime.enable = false;
# drivers.intel.enable = false;
vm.guest-services.enable = true;
modules.zsh.enable = true;
modules.shell.defaultShell = "zsh";
modules.pipewire.enable = true;
}

View File

@ -1,14 +1,9 @@
{
config,
...
}:
{
boot = {
loader.systemd-boot = {
enable = true;
configurationLimit = 10;
consoleMode = config.system.systemdBootConsoleMode;
};
loader.systemd-boot.enable = true;
loader.efi.canTouchEfiVariables = true;
};
}

View File

@ -7,9 +7,7 @@
./firefox.nix
./fonts.nix
./gdm.nix
./gnomeBoxes.nix
./hyprland.nix
./localsend.nix
./network.nix
./packages.nix
./pipewire.nix
@ -18,8 +16,6 @@
./services.nix
./stylix.nix
./system.nix
./tailscale.nix
./user.nix
./zsh.nix
];
}

View File

@ -9,6 +9,10 @@ let
pipewireCfg = config.modules.pipewire;
in
{
programs = {
firefox.enable = true;
};
# Add wayland screensharing support if PipeWire is enabled
environment.systemPackages =
with pkgs;

View File

@ -11,6 +11,7 @@ in
config = mkIf (cfg.displayManager == "gdm") {
services.displayManager.gdm = {
enable = true;
wayland = true;
};
};
}

View File

@ -1,41 +0,0 @@
{
config,
lib,
pkgs,
username,
...
}:
with lib;
let
cfg = config.modules.gnomeBoxes;
in
{
config = mkIf cfg.enable {
virtualisation = {
libvirtd = {
enable = true;
# Enable TPM emulation (for Windows 11)
qemu = {
package = pkgs.qemu_kvm;
swtpm.enable = true;
};
};
# Enable USD redirection
spiceUSBRedirection.enable = true;
};
# Allow VM management
users.groups.libvirtd.members = [ username ];
users.groups.kvm.members = [ username ];
# Enable VM networking and file sharing
environment.systemPackages = with pkgs; [
gnome-boxes
swtpm
dnsmasq
phodav
];
};
}

View File

@ -1,16 +0,0 @@
{
config,
lib,
...
}:
with lib;
let
cfg = config.modules.localsend;
in
{
config = mkIf cfg.enable {
programs.localsend = {
enable = true;
};
};
}

View File

@ -7,7 +7,7 @@
networking = {
hostName = "${host}";
networkmanager.enable = true;
wireless.enable = true;
wireless.enable = false;
};
environment.systemPackages = with pkgs; [ networkmanagerapplet ];

View File

@ -9,10 +9,8 @@
environment.systemPackages = with pkgs; [
git
home-manager
tldr
tmux
vim-full
wl-clipboard
vim
];
}

View File

@ -32,5 +32,5 @@ in
};
};
system.stateVersion = "26.05";
system.stateVersion = "25.05";
}

View File

@ -1,14 +0,0 @@
{
config,
lib,
...
}:
with lib;
let
cfg = config.modules.tailscale;
in
{
config = mkIf cfg.enable {
services.tailscale.enable = true;
};
}

View File

@ -15,7 +15,7 @@ in
imports = [ inputs.home-manager.nixosModules.home-manager ];
home-manager = {
useUserPackages = true;
useGlobalPkgs = true;
useGlobalPkgs = false;
backupFileExtension = "backup";
extraSpecialArgs = {
inherit
@ -27,7 +27,6 @@ in
};
users.${username} = {
imports = [ ../../homes/${username}/home.nix ];
modules.gpg.signingKey = config.modules.gpg.signingKey;
};
};
@ -49,10 +48,8 @@ in
# Set /etc/shells so GDM will show our user when ZSH is selected
environment.shells = [ pkgs.${shellCfg.defaultShell} ];
# Needed to get completion for system packages (e.g. systemd)
environment.pathsToLink =
# Since Home Manager is installed via its NixOS module, we need to add this so that
# the portal definitions and DE provided configurations get linked
[ "/share/applications" "/share/xdg-desktop-portal" ]
# Needed to get completion for system packages (e.g. systemd)
[ ]
++ (if zshCfg.enable then [ "/share/zsh" ] else [ ]);
}

View File

@ -1,14 +0,0 @@
{
config,
lib,
...
}:
with lib;
let
zshCfg = config.modules.zsh;
in
{
config = mkIf zshCfg.enable {
programs.zsh.enable = true;
};
}

View File

@ -4,15 +4,12 @@
{
imports = [
./direnv.nix
./discord.nix
./firefox.nix
./gpg.nix
./fzf.nix
./hyprland
./kitty.nix
./overlays.nix
./stylix.nix
./vscodium.nix
./walker.nix
./xdg.nix
./zsh
];

View File

@ -1,18 +0,0 @@
{
config,
lib,
pkgs,
...
}:
with lib;
let
cfg = config.modules.discord;
in
{
config = mkIf cfg.enable {
programs.discord = {
enable = true;
package = pkgs.discord;
};
};
}

View File

@ -1,99 +0,0 @@
{
config,
pkgs,
username,
...
}:
{
programs.firefox = {
enable = true;
package = pkgs.firefox;
configPath = "${config.xdg.configHome}/mozilla/firefox";
policies = {
# Updates & Background Services
AppAutoUpdate = false;
BackgroundAppUpdate = false;
# Quality of Life
OfferToSaveLogins = false;
# Extensions
ExtensionSettings = let
moz = short: "https://addons.mozilla.org/firefox/downloads/latest/${short}/latest.xpi";
in {
"*".installation_mode = "blocked";
# uBlock Origin
"uBlock0@raymondhill.net" = {
install_url = moz "ublock-origin";
installation_mode = "force_installed";
updates_disabled = true;
private_browsing = true;
default_area = "navbar";
};
# Bitwarden
"{446900e4-71c2-419f-a6a7-df9c091e268b}" = {
install_url = moz "bitwarden-password-manager";
installation_mode = "force_installed";
updates_disabled = true;
private_browsing = true;
default_area = "navbar";
};
# Dark Reader
"addon@darkreader.org" = {
install_url = moz "darkreader";
installation_mode = "force_installed";
updates_disabled = true;
private_browsing = true;
default_area = "navbar";
};
# SponsorBlock
"sponsorBlocker@ajay.app" = {
install_url = moz "sponsorblock";
installation_mode = "force_installed";
updates_disabled = true;
private_browsing = true;
default_area = "menupanel";
};
# Return YouTube Dislike
"{762f9885-5a13-4abd-9c77-433dcd38b8fd}" = {
install_url = moz "return-youtube-dislikes";
installation_mode = "force_installed";
updates_disabled = true;
private_browsing = true;
default_area = "menupanel";
};
# RES
"jid1-xUfzOsOFlzSOXg@jetpack" = {
install_url = moz "reddit-enhancement-suite";
installation_mode = "force_installed";
updates_disabled = true;
private_browsing = true;
default_area = "menupanel";
};
};
"3rdparty".Extensions = {
"{446900e4-71c2-419f-a6a7-df9c091e268b}" = {
environment = {
base = "https://bitwarden.joshuayuen.me";
};
};
};
profiles = {
${username} = {
id = 0;
isDefault = true;
name = "${username}";
};
};
};
};
}

View File

@ -1,36 +0,0 @@
{
config,
lib,
pkgs,
...
}:
with lib;
let
cfg = config.modules.gpg;
in
{
config = mkIf cfg.enable {
services = {
gpg-agent = {
enable = true;
enableSshSupport = true;
enableBashIntegration = true;
enableZshIntegration = true;
pinentry.package = pkgs.pinentry-qt;
};
};
home.packages = [ pkgs.gnupg ];
programs = {
gpg = {
enable = true;
settings = {
default-key = mkIf (cfg.signingKey != null) cfg.signingKey;
trusted-key = mkIf (cfg.signingKey != null) cfg.signingKey;
};
};
};
};
}

View File

@ -10,50 +10,49 @@ in
"$mod" = "SUPER";
bind = [
# Misc
"$mod, Return, exec, ${cfg.terminal}"
"$mod, D, exec, walker"
"$mod,Return,exec,${cfg.terminal}"
# Window management
"$mod, C, killactive"
"$mod, F, fullscreen, 1"
"$mod, Space, togglefloating"
"$mod,C,killactive"
"$mod,F,fullscreen, 1"
"$mod,Space,togglefloating"
# Focus
"$mod, H, movefocus, l"
"$mod, L, movefocus, r"
"$mod, K, movefocus, u"
"$mod, J, movefocus, d"
"$mod,H,movefocus,l"
"$mod,L,movefocus,r"
"$mod,K,movefocus,u"
"$mod,J,movefocus,d"
# Move windows
"$mod SHIFT, H, movewindow, l"
"$mod SHIFT, L, movewindow, r"
"$mod SHIFT, K, movewindow, u"
"$mod SHIFT, J, movewindow, d"
"$mod SHIFT,H,movewindow,l"
"$mod SHIFT,L,movewindow,r"
"$mod SHIFT,K,movewindow,u"
"$mod SHIFT,J,movewindow,d"
# Resize windows
"$mod CTRL, H, resizeactive, -20 0"
"$mod CTRL, L, resizeactive, 20 0"
"$mod CTRL, K, resizeactive, 0 -20"
"$mod CTRL, J, resizeactive, 0 20"
"$mod CTRL,H,resizeactive,-20 0"
"$mod CTRL,L,resizeactive,20 0"
"$mod CTRL,K,resizeactive,0 -20"
"$mod CTRL,J,resizeactive,0 20"
# Workspaces
"$mod, 1, workspace, 1"
"$mod, 2, workspace, 2"
"$mod, 3, workspace, 3"
"$mod, 4, workspace, 4"
"$mod, 5, workspace, 5"
"$mod,1,workspace,1"
"$mod,2,workspace,2"
"$mod,3,workspace,3"
"$mod,4,workspace,4"
"$mod,5,workspace,5"
# Move to workspace
"$mod SHIFT, 1, movetoworkspace, 1"
"$mod SHIFT, 2, movetoworkspace, 2"
"$mod SHIFT, 3, movetoworkspace, 3"
"$mod SHIFT, 4, movetoworkspace, 4"
"$mod SHIFT, 5, movetoworkspace, 5"
"$mod SHIFT,1,movetoworkspace,1"
"$mod SHIFT,2,movetoworkspace,2"
"$mod SHIFT,3,movetoworkspace,3"
"$mod SHIFT,4,movetoworkspace,4"
"$mod SHIFT,5,movetoworkspace,5"
];
bindm = [
"$mod, mouse:272, movewindow"
"$mod, mouse:273, resizewindow"
"$mod,mouse:272,movewindow"
"$mod,mouse:273,resizewindow"
];
};
}

View File

@ -12,7 +12,8 @@ in
wayland.windowManager.hyprland = {
enable = cfg.enable;
package = pkgs.hyprland;
systemd.enable = true;
systemd.enable = false;
xwayland.enable = true;
settings = {
monitor = cfg.monitor;
@ -46,23 +47,13 @@ in
};
};
misc = {
initial_workspace_tracking = 2;
};
env = [
"ELECTRON_OZONE_PLATFORM_HINT, wayland"
"NIXOS_OZONE_WL, 1"
"XDG_CURRENT_DESKTOP, Hyprland"
"XDG_SESSION_DESKTOP, Hyprland"
"XDG_SESSION_TYPE, wayland"
];
xwayland = {
enabled = true;
force_zero_scaling = true;
};
ecosystem = {
no_update_news = true;
};

View File

@ -0,0 +1,11 @@
{
inputs,
...
}:
{
nixpkgs = {
overlays = [
inputs.nix-vscode-extensions.overlays.default
];
};
}

View File

@ -1,6 +1,5 @@
{
pkgs,
username,
...
}:
{
@ -40,11 +39,5 @@
name = "Bibata-Modern-Classic";
size = 24;
};
targets = {
firefox = {
profileNames = [ "${username}" ];
};
};
};
}

View File

@ -3,35 +3,27 @@
...
}:
{
programs.vscodium = {
programs.vscode = {
enable = true;
package = pkgs.vscodium;
profiles.default = {
extensions =
with pkgs.vscode-extensions;
with pkgs.vscode-marketplace;
[
amazonwebservices.aws-toolkit-vscode
arrterian.nix-env-selector
christian-kohler.path-intellisense
eamodio.gitlens
esbenp.prettier-vscode
jnoortheen.nix-ide
leonardssh.vscord
mkhl.direnv
ms-python.debugpy
ms-python.python
opentofu.vscode-opentofu
redhat.ansible
redhat.vscode-yaml
rvest.vs-code-prettier-eslint
vscodevim.vim
];
userSettings = {
"editor.stickyScroll.maxLineCount" = 10;
"vim.smartRelativeLine" = true;
};
};
profiles.default.extensions =
with pkgs.vscode-extensions;
with pkgs.vscode-marketplace;
[
amazonwebservices.aws-toolkit-vscode
arrterian.nix-env-selector
christian-kohler.path-intellisense
eamodio.gitlens
esbenp.prettier-vscode
jnoortheen.nix-ide
leonardssh.vscord
mkhl.direnv
ms-python.debugpy
ms-python.python
opentofu.vscode-opentofu
redhat.ansible
redhat.vscode-yaml
rvest.vs-code-prettier-eslint
];
};
}

View File

@ -1,17 +0,0 @@
{
config,
inputs,
lib,
...
}:
with lib;
let hyprlandCfg = config.modules.hyprland;
in
{
imports = [ inputs.walker.homeManagerModules.default ];
programs.walker = mkIf (hyprlandCfg.launcher == "walker") {
enable = true;
runAsService = true;
};
}

View File

@ -70,9 +70,6 @@ in
# Control arrow keys
bindkey '^[[1;5C' forward-word
bindkey '^[[1;5D' backward-word
# Control backspace
bindkey '^H' backward-kill-word
'';
in mkMerge [ zshConfigInitEarly zshConfig ];

View File

@ -3,17 +3,12 @@
}:
{
imports = [
./discord.nix
./displayManager.nix
./gnomeBoxes.nix
./gpg.nix
./hyprland.nix
./localsend.nix
./pipewire.nix
./plasma.nix
./shell.nix
./system.nix
./tailscale.nix
./zsh.nix
];
}

View File

@ -1,13 +0,0 @@
{
lib,
...
}:
with lib;
{
options.modules.discord = {
enable = mkEnableOption {
default = false;
description = "Enable Discord";
};
};
}

View File

@ -1,13 +0,0 @@
{
lib,
...
}:
with lib;
{
options.modules.gnomeBoxes = {
enable = mkEnableOption {
default = false;
description = "Enable GNOME Boxes";
};
};
}

View File

@ -1,19 +0,0 @@
{
lib,
...
}:
with lib;
{
options.modules.gpg = {
enable = mkEnableOption {
default = false;
description = "Enable gpg-agent";
};
signingKey = mkOption {
type = types.nullOr types.str;
default = null;
description = "The key ID to sign with for git";
};
};
}

View File

@ -19,18 +19,9 @@ with lib;
The terminal to use for Hyprland.
'';
};
launcher = mkOption {
type = types.enum [
"walker"
];
default = "walker";
description = ''
The application launcher to use for Hyprland.
'';
};
monitor = mkOption {
type = types.listOf types.str;
default = [ ",preferred,auto,auto" ];
default = [ ",preferred,auto,1" ];
description = ''
Monitors to use for Hyprland.
'';

View File

@ -1,13 +0,0 @@
{
lib,
...
}:
with lib;
{
options.modules.localsend = {
enable = mkEnableOption {
default = false;
description = "Enable LocalSend";
};
};
}

View File

@ -19,11 +19,5 @@ with lib;
type = types.str;
default = "US/Eastern";
};
systemdBootConsoleMode = mkOption {
type = types.str;
default = "auto";
description = "The console mode when booting";
};
};
}

View File

@ -1,13 +0,0 @@
{
lib,
...
}:
with lib;
{
options.modules.tailscale = {
enable = mkEnableOption {
default = false;
description = "Enable Tailscale";
};
};
}

View File

@ -2,29 +2,9 @@
...
}:
{
imports = [
../../modules/options
];
imports = [ ../../modules/options ];
modules.hyprland = {
enable = true;
terminal = "kitty";
launcher = "walker";
monitor = [
",preferred,auto,auto"
];
};
modules.plasma.enable = false;
modules.displayManager.displayManager = "gdm";
modules.localsend.enable = true;
modules.zsh.enable = true;
modules.shell.defaultShell = "zsh";
modules.pipewire.enable = true;
modules.discord.enable = true;
modules.tailscale.enable = true;
}

21
profiles/vm/default.nix Normal file
View File

@ -0,0 +1,21 @@
{
...
}:
{
imports = [
../../modules/drivers
];
virtualisation.vmVariant = {
virtualisation = {
memorySize = 8192;
cores = 8;
};
};
# drivers.amdgpu.enable = false;
# drivers.nvidia.enable = false;
# drivers.nvidia-prime.enable = false;
# drivers.intel.enable = false;
vm.guest-services.enable = true;
}

View File

@ -4,7 +4,7 @@ echo "Removing old qcow2 disk ..."
rm -f ./vm.qcow2
echo "Building new VM ..."
nix build .#nixosConfigurations.vm.config.system.build.vm
nix build .#nixosConfigurations.nixos.config.system.build.vm
if [ $? -ne 0 ]; then
echo "Failed to build VM"

View File

@ -2,16 +2,16 @@
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1769089682,
"narHash": "sha256-9yA/LIuAVQq0lXelrZPjLuLVuZdm03p8tfmHhnDIkms=",
"lastModified": 1767313136,
"narHash": "sha256-16KkgfdYqjaeRGBaYsNrhPRRENs0qzkQVUooNHtoy2w=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "078d69f03934859a181e81ba987c2bb033eebfc5",
"rev": "ac62194c3917d5f474c1a844b6fd6da2db95077d",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-25.11",
"ref": "nixos-25.05",
"repo": "nixpkgs",
"type": "github"
}

View File

@ -2,7 +2,7 @@
description = "_template package and shell environment";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.05";
};
outputs =
@ -10,7 +10,7 @@
let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system}.pkgs;
name = baseNameOf (toString ./.);
name = builtins.baseNameOf (builtins.toString ./.);
shellApplication = pkgs.writeShellApplication {
inherit name;

View File

@ -2,16 +2,16 @@
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1769089682,
"narHash": "sha256-9yA/LIuAVQq0lXelrZPjLuLVuZdm03p8tfmHhnDIkms=",
"lastModified": 1767313136,
"narHash": "sha256-16KkgfdYqjaeRGBaYsNrhPRRENs0qzkQVUooNHtoy2w=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "078d69f03934859a181e81ba987c2bb033eebfc5",
"rev": "ac62194c3917d5f474c1a844b6fd6da2db95077d",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-25.11",
"ref": "nixos-25.05",
"repo": "nixpkgs",
"type": "github"
}

View File

@ -2,20 +2,23 @@
description = "install-system package and shell environment";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.05";
};
outputs =
{ nixpkgs, ... }:
let
pkgs = nixpkgs.legacyPackages.x86_64-linux.pkgs;
name = baseNameOf (toString ./.);
name = builtins.baseNameOf (builtins.toString ./.);
shellApplication = pkgs.writeShellApplication {
inherit name;
text = builtins.readFile ./${name}.sh;
runtimeInputs = with pkgs; [
coreutils
gnused
unixtools.column
];
};
in