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 1) Install [NixOS](https://nixos.org/) from an ISO via USB
2) Reboot machine 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 4) Clone this repo
5) Copy new `host/` configuration for the new machine 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` 7) Edit `flake.nix` to point to the new `host`
8) `git add .` 8) `git add .`
9) Run `sudo nixos-rebuild switch --flake .#nixos` 9) Run `sudo nixos-rebuild switch --flake .#nixos`
@ -17,22 +17,6 @@ https://gist.github.com/FlakM/0535b8aa7efec56906c5ab5e32580adf
# Building NixOS ISO # Building NixOS ISO
`nix build .#nixosConfigurations.live.config.system.build.isoImage` `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 # Misc
## Garbage collection ## Garbage collection
`nix-collect-garbage -d` `nix-collect-garbage -d`

View File

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

View File

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

View File

@ -1,13 +1,10 @@
{ {
config,
lib, lib,
pkgs, pkgs,
profile, profile,
... ...
}: }:
with lib; with lib;
let gpgCfg = config.modules.gpg;
in
{ {
imports = [ imports = [
../../modules/homes ../../modules/homes
@ -22,32 +19,8 @@ in
username = "josh"; username = "josh";
homeDirectory = "/home/josh"; homeDirectory = "/home/josh";
stateVersion = "25.11"; 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 # Let Home Manager install and manage itself
programs.home-manager.enable = true; programs.home-manager.enable = true;
@ -55,19 +28,10 @@ in
package = mkDefault pkgs.nix; package = mkDefault pkgs.nix;
settings = { settings = {
allowed-users = [ "josh" ]; allowed-users = [ "josh" ];
trusted-users = [ "root" "@wheel" "josh" ];
experimental-features = [ experimental-features = [
"nix-command" "nix-command"
"flakes" "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 = [ imports = [
../../profiles/desktop ../../profiles/${profile}
../../profiles/vm
../../modules/core ../../modules/core
../../modules/drivers
../../modules/options ../../modules/options
./hardware.nix ./hardware.nix
./host-packages.nix ./host-packages.nix
]; ];
virtualisation.vmVariant = { modules.hyprland = {
virtualisation = { enable = true;
memorySize = 8192; terminal = "kitty";
cores = 8; monitor = [
}; ",preferred,auto,1"
];
}; };
modules.plasma.enable = false;
modules.displayManager.displayManager = "gdm";
# drivers.amdgpu.enable = false; modules.zsh.enable = true;
# drivers.nvidia.enable = false; modules.shell.defaultShell = "zsh";
# drivers.nvidia-prime.enable = false;
# drivers.intel.enable = false; modules.pipewire.enable = true;
vm.guest-services.enable = true;
} }

View File

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

View File

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

View File

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

View File

@ -11,6 +11,7 @@ in
config = mkIf (cfg.displayManager == "gdm") { config = mkIf (cfg.displayManager == "gdm") {
services.displayManager.gdm = { services.displayManager.gdm = {
enable = true; 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 = { networking = {
hostName = "${host}"; hostName = "${host}";
networkmanager.enable = true; networkmanager.enable = true;
wireless.enable = true; wireless.enable = false;
}; };
environment.systemPackages = with pkgs; [ networkmanagerapplet ]; environment.systemPackages = with pkgs; [ networkmanagerapplet ];

View File

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

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 ]; imports = [ inputs.home-manager.nixosModules.home-manager ];
home-manager = { home-manager = {
useUserPackages = true; useUserPackages = true;
useGlobalPkgs = true; useGlobalPkgs = false;
backupFileExtension = "backup"; backupFileExtension = "backup";
extraSpecialArgs = { extraSpecialArgs = {
inherit inherit
@ -27,7 +27,6 @@ in
}; };
users.${username} = { users.${username} = {
imports = [ ../../homes/${username}/home.nix ]; 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 # Set /etc/shells so GDM will show our user when ZSH is selected
environment.shells = [ pkgs.${shellCfg.defaultShell} ]; environment.shells = [ pkgs.${shellCfg.defaultShell} ];
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) # Needed to get completion for system packages (e.g. systemd)
environment.pathsToLink =
[ ]
++ (if zshCfg.enable then [ "/share/zsh" ] else [ ]); ++ (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 = [ imports = [
./direnv.nix ./direnv.nix
./discord.nix
./firefox.nix
./gpg.nix
./fzf.nix ./fzf.nix
./hyprland ./hyprland
./kitty.nix ./kitty.nix
./overlays.nix
./stylix.nix ./stylix.nix
./vscodium.nix ./vscodium.nix
./walker.nix
./xdg.nix ./xdg.nix
./zsh ./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

@ -11,7 +11,6 @@ in
bind = [ bind = [
# Misc # Misc
"$mod,Return,exec,${cfg.terminal}" "$mod,Return,exec,${cfg.terminal}"
"$mod, D, exec, walker"
# Window management # Window management
"$mod,C,killactive" "$mod,C,killactive"

View File

@ -12,7 +12,8 @@ in
wayland.windowManager.hyprland = { wayland.windowManager.hyprland = {
enable = cfg.enable; enable = cfg.enable;
package = pkgs.hyprland; package = pkgs.hyprland;
systemd.enable = true; systemd.enable = false;
xwayland.enable = true;
settings = { settings = {
monitor = cfg.monitor; monitor = cfg.monitor;
@ -46,23 +47,13 @@ in
}; };
}; };
misc = {
initial_workspace_tracking = 2;
};
env = [ env = [
"ELECTRON_OZONE_PLATFORM_HINT, wayland"
"NIXOS_OZONE_WL, 1" "NIXOS_OZONE_WL, 1"
"XDG_CURRENT_DESKTOP, Hyprland" "XDG_CURRENT_DESKTOP, Hyprland"
"XDG_SESSION_DESKTOP, Hyprland" "XDG_SESSION_DESKTOP, Hyprland"
"XDG_SESSION_TYPE, wayland" "XDG_SESSION_TYPE, wayland"
]; ];
xwayland = {
enabled = true;
force_zero_scaling = true;
};
ecosystem = { ecosystem = {
no_update_news = true; 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, pkgs,
username,
... ...
}: }:
{ {
@ -40,11 +39,5 @@
name = "Bibata-Modern-Classic"; name = "Bibata-Modern-Classic";
size = 24; size = 24;
}; };
targets = {
firefox = {
profileNames = [ "${username}" ];
};
};
}; };
} }

View File

@ -3,11 +3,10 @@
... ...
}: }:
{ {
programs.vscodium = { programs.vscode = {
enable = true; enable = true;
package = pkgs.vscodium; package = pkgs.vscodium;
profiles.default = { profiles.default.extensions =
extensions =
with pkgs.vscode-extensions; with pkgs.vscode-extensions;
with pkgs.vscode-marketplace; with pkgs.vscode-marketplace;
[ [
@ -25,13 +24,6 @@
redhat.ansible redhat.ansible
redhat.vscode-yaml redhat.vscode-yaml
rvest.vs-code-prettier-eslint rvest.vs-code-prettier-eslint
vscodevim.vim
]; ];
userSettings = {
"editor.stickyScroll.maxLineCount" = 10;
"vim.smartRelativeLine" = true;
};
};
}; };
} }

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 # Control arrow keys
bindkey '^[[1;5C' forward-word bindkey '^[[1;5C' forward-word
bindkey '^[[1;5D' backward-word bindkey '^[[1;5D' backward-word
# Control backspace
bindkey '^H' backward-kill-word
''; '';
in mkMerge [ zshConfigInitEarly zshConfig ]; in mkMerge [ zshConfigInitEarly zshConfig ];

View File

@ -3,17 +3,12 @@
}: }:
{ {
imports = [ imports = [
./discord.nix
./displayManager.nix ./displayManager.nix
./gnomeBoxes.nix
./gpg.nix
./hyprland.nix ./hyprland.nix
./localsend.nix
./pipewire.nix ./pipewire.nix
./plasma.nix ./plasma.nix
./shell.nix ./shell.nix
./system.nix ./system.nix
./tailscale.nix
./zsh.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. The terminal to use for Hyprland.
''; '';
}; };
launcher = mkOption {
type = types.enum [
"walker"
];
default = "walker";
description = ''
The application launcher to use for Hyprland.
'';
};
monitor = mkOption { monitor = mkOption {
type = types.listOf types.str; type = types.listOf types.str;
default = [ ",preferred,auto,auto" ]; default = [ ",preferred,auto,1" ];
description = '' description = ''
Monitors to use for Hyprland. 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; type = types.str;
default = "US/Eastern"; 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 = [ imports = [ ../../modules/options ];
../../modules/options
];
modules.hyprland = { modules.hyprland = {
enable = true; 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 rm -f ./vm.qcow2
echo "Building new VM ..." echo "Building new VM ..."
nix build .#nixosConfigurations.vm.config.system.build.vm nix build .#nixosConfigurations.nixos.config.system.build.vm
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo "Failed to build VM" echo "Failed to build VM"

View File

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

View File

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

View File

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

View File

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