Compare commits

...

20 Commits

Author SHA1 Message Date
Joshua Yuen a6d89b6ce5
Add tmux package 2025-07-30 14:04:41 -04:00
Joshua Yuen 3dd058089d
More hyprland configuration fixes 2025-07-30 14:04:41 -04:00
Joshua Yuen 6f3b84095e
Fix hyprland decoration configuration 2025-07-30 14:04:41 -04:00
Joshua Yuen 17047a93bb
Add tldr and vim packages 2025-07-30 14:04:41 -04:00
Joshua Yuen d3858dd5e9
Add networking settings 2025-07-30 14:04:41 -04:00
Joshua Yuen 510a82c2e5
Fix flake.nix#nixos
Add git to packages
2025-07-30 14:04:41 -04:00
Joshua Yuen 34dad6bd15
Add ISO building command to README 2025-07-30 14:04:41 -04:00
Joshua Yuen 5ac39456ed
Update default host configuration 2025-07-30 14:04:41 -04:00
Joshua Yuen 48e2a1f399
Add boilerplate services and packages modules 2025-07-30 14:04:41 -04:00
Joshua Yuen 8a246c2465
Add boot options 2025-07-30 14:04:41 -04:00
Joshua Yuen 09c43bdbb7
Add additional hyprland config 2025-07-30 14:04:41 -04:00
Joshua Yuen 4c01ba7931
Use hyprland with UWSM instead of systemd 2025-07-30 14:04:41 -04:00
Joshua Yuen 82a38d37d7
Add hyprland monitor config option 2025-07-30 14:04:41 -04:00
Joshua Yuen cb7b220be5
Add additional kitty config 2025-07-30 14:04:41 -04:00
Joshua Yuen 7625baf16f
Improve default options 2025-07-30 14:04:41 -04:00
Joshua Yuen fec4eb7cfd
Add firefox and pipewire modules 2025-07-30 14:04:40 -04:00
Joshua Yuen 85b2df7f24
Added stylix module for fonts 2025-07-30 14:04:40 -04:00
Joshua Yuen 44801d3c24
Add additional locale settings and keymap 2025-07-30 14:04:40 -04:00
Joshua Yuen 61b663ead6
Fix zsh aliases 2025-07-30 14:04:40 -04:00
Joshua Yuen 614e82834c
Add live .iso build configuration 2025-07-30 14:04:38 -04:00
28 changed files with 670 additions and 23 deletions

View File

@ -1,3 +1,6 @@
# Building NixOS VM
`nix build .#nixosConfigurations.nixosvm.config.system.build.vm`
https://gist.github.com/FlakM/0535b8aa7efec56906c5ab5e32580adf
https://gist.github.com/FlakM/0535b8aa7efec56906c5ab5e32580adf
# Building NixOS ISO
`nix build .#nixosConfigurations.live.config.system.build.isoImage`

6
build-iso.sh Executable file
View File

@ -0,0 +1,6 @@
#/usr/bin/env bash
echo "Building ISO ..."
nix build .#nixosConfigurations.live.config.system.build.isoImage
echo "Done!"

View File

@ -1,5 +1,142 @@
{
"nodes": {
"base16": {
"inputs": {
"fromYaml": "fromYaml"
},
"locked": {
"lastModified": 1746562888,
"narHash": "sha256-YgNJQyB5dQiwavdDFBMNKk1wyS77AtdgDk/VtU6wEaI=",
"owner": "SenchoPens",
"repo": "base16.nix",
"rev": "806a1777a5db2a1ef9d5d6f493ef2381047f2b89",
"type": "github"
},
"original": {
"owner": "SenchoPens",
"repo": "base16.nix",
"type": "github"
}
},
"base16-fish": {
"flake": false,
"locked": {
"lastModified": 1622559957,
"narHash": "sha256-PebymhVYbL8trDVVXxCvZgc0S5VxI7I1Hv4RMSquTpA=",
"owner": "tomyun",
"repo": "base16-fish",
"rev": "2f6dd973a9075dabccd26f1cded09508180bf5fe",
"type": "github"
},
"original": {
"owner": "tomyun",
"repo": "base16-fish",
"type": "github"
}
},
"base16-helix": {
"flake": false,
"locked": {
"lastModified": 1748408240,
"narHash": "sha256-9M2b1rMyMzJK0eusea0x3lyh3mu5nMeEDSc4RZkGm+g=",
"owner": "tinted-theming",
"repo": "base16-helix",
"rev": "6c711ab1a9db6f51e2f6887cc3345530b33e152e",
"type": "github"
},
"original": {
"owner": "tinted-theming",
"repo": "base16-helix",
"type": "github"
}
},
"base16-vim": {
"flake": false,
"locked": {
"lastModified": 1732806396,
"narHash": "sha256-e0bpPySdJf0F68Ndanwm+KWHgQiZ0s7liLhvJSWDNsA=",
"owner": "tinted-theming",
"repo": "base16-vim",
"rev": "577fe8125d74ff456cf942c733a85d769afe58b7",
"type": "github"
},
"original": {
"owner": "tinted-theming",
"repo": "base16-vim",
"rev": "577fe8125d74ff456cf942c733a85d769afe58b7",
"type": "github"
}
},
"firefox-gnome-theme": {
"flake": false,
"locked": {
"lastModified": 1748383148,
"narHash": "sha256-pGvD/RGuuPf/4oogsfeRaeMm6ipUIznI2QSILKjKzeA=",
"owner": "rafaelmardojai",
"repo": "firefox-gnome-theme",
"rev": "4eb2714fbed2b80e234312611a947d6cb7d70caf",
"type": "github"
},
"original": {
"owner": "rafaelmardojai",
"repo": "firefox-gnome-theme",
"type": "github"
}
},
"flake-parts": {
"inputs": {
"nixpkgs-lib": [
"stylix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1749398372,
"narHash": "sha256-tYBdgS56eXYaWVW3fsnPQ/nFlgWi/Z2Ymhyu21zVM98=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "9305fe4e5c2a6fcf5ba6a3ff155720fbe4076569",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"fromYaml": {
"flake": false,
"locked": {
"lastModified": 1731966426,
"narHash": "sha256-lq95WydhbUTWig/JpqiB7oViTcHFP8Lv41IGtayokA8=",
"owner": "SenchoPens",
"repo": "fromYaml",
"rev": "106af9e2f715e2d828df706c386a685698f3223b",
"type": "github"
},
"original": {
"owner": "SenchoPens",
"repo": "fromYaml",
"type": "github"
}
},
"gnome-shell": {
"flake": false,
"locked": {
"lastModified": 1744584021,
"narHash": "sha256-0RJ4mJzf+klKF4Fuoc8VN8dpQQtZnKksFmR2jhWE1Ew=",
"owner": "GNOME",
"repo": "gnome-shell",
"rev": "52c517c8f6c199a1d6f5118fae500ef69ea845ae",
"type": "github"
},
"original": {
"owner": "GNOME",
"ref": "48.1",
"repo": "gnome-shell",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
@ -37,10 +174,190 @@
"type": "github"
}
},
"nur": {
"inputs": {
"flake-parts": [
"stylix",
"flake-parts"
],
"nixpkgs": [
"stylix",
"nixpkgs"
],
"treefmt-nix": "treefmt-nix"
},
"locked": {
"lastModified": 1751320053,
"narHash": "sha256-3m6RMw0FbbaUUa01PNaMLoO7D99aBClmY5ed9V3vz+0=",
"owner": "nix-community",
"repo": "NUR",
"rev": "cbde1735782f9c2bb2c63d5e05fba171a14a4670",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "NUR",
"type": "github"
}
},
"root": {
"inputs": {
"home-manager": "home-manager",
"nixpkgs": "nixpkgs"
"nixpkgs": "nixpkgs",
"stylix": "stylix"
}
},
"stylix": {
"inputs": {
"base16": "base16",
"base16-fish": "base16-fish",
"base16-helix": "base16-helix",
"base16-vim": "base16-vim",
"firefox-gnome-theme": "firefox-gnome-theme",
"flake-parts": "flake-parts",
"gnome-shell": "gnome-shell",
"nixpkgs": [
"nixpkgs"
],
"nur": "nur",
"systems": "systems",
"tinted-foot": "tinted-foot",
"tinted-kitty": "tinted-kitty",
"tinted-schemes": "tinted-schemes",
"tinted-tmux": "tinted-tmux",
"tinted-zed": "tinted-zed"
},
"locked": {
"lastModified": 1753733105,
"narHash": "sha256-zxAiwoYqjesNbV46vGZe9ONvazQDPswnHfhsvvzqkU4=",
"owner": "danth",
"repo": "stylix",
"rev": "8340949b7cba126b6939ae588e6619f8e23bba9d",
"type": "github"
},
"original": {
"owner": "danth",
"ref": "release-25.05",
"repo": "stylix",
"type": "github"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"tinted-foot": {
"flake": false,
"locked": {
"lastModified": 1726913040,
"narHash": "sha256-+eDZPkw7efMNUf3/Pv0EmsidqdwNJ1TaOum6k7lngDQ=",
"owner": "tinted-theming",
"repo": "tinted-foot",
"rev": "fd1b924b6c45c3e4465e8a849e67ea82933fcbe4",
"type": "github"
},
"original": {
"owner": "tinted-theming",
"repo": "tinted-foot",
"rev": "fd1b924b6c45c3e4465e8a849e67ea82933fcbe4",
"type": "github"
}
},
"tinted-kitty": {
"flake": false,
"locked": {
"lastModified": 1735730497,
"narHash": "sha256-4KtB+FiUzIeK/4aHCKce3V9HwRvYaxX+F1edUrfgzb8=",
"owner": "tinted-theming",
"repo": "tinted-kitty",
"rev": "de6f888497f2c6b2279361bfc790f164bfd0f3fa",
"type": "github"
},
"original": {
"owner": "tinted-theming",
"repo": "tinted-kitty",
"type": "github"
}
},
"tinted-schemes": {
"flake": false,
"locked": {
"lastModified": 1750770351,
"narHash": "sha256-LI+BnRoFNRa2ffbe3dcuIRYAUcGklBx0+EcFxlHj0SY=",
"owner": "tinted-theming",
"repo": "schemes",
"rev": "5a775c6ffd6e6125947b393872cde95867d85a2a",
"type": "github"
},
"original": {
"owner": "tinted-theming",
"repo": "schemes",
"type": "github"
}
},
"tinted-tmux": {
"flake": false,
"locked": {
"lastModified": 1751159871,
"narHash": "sha256-UOHBN1fgHIEzvPmdNMHaDvdRMgLmEJh2hNmDrp3d3LE=",
"owner": "tinted-theming",
"repo": "tinted-tmux",
"rev": "bded5e24407cec9d01bd47a317d15b9223a1546c",
"type": "github"
},
"original": {
"owner": "tinted-theming",
"repo": "tinted-tmux",
"type": "github"
}
},
"tinted-zed": {
"flake": false,
"locked": {
"lastModified": 1751158968,
"narHash": "sha256-ksOyv7D3SRRtebpXxgpG4TK8gZSKFc4TIZpR+C98jX8=",
"owner": "tinted-theming",
"repo": "base16-zed",
"rev": "86a470d94204f7652b906ab0d378e4231a5b3384",
"type": "github"
},
"original": {
"owner": "tinted-theming",
"repo": "base16-zed",
"type": "github"
}
},
"treefmt-nix": {
"inputs": {
"nixpkgs": [
"stylix",
"nur",
"nixpkgs"
]
},
"locked": {
"lastModified": 1733222881,
"narHash": "sha256-JIPcz1PrpXUCbaccEnrcUS8jjEb/1vJbZz5KkobyFdM=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "49717b5af6f80172275d47a418c9719a31a78b53",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "treefmt-nix",
"type": "github"
}
}
},

View File

@ -3,8 +3,14 @@
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.05";
home-manager.url = "github:nix-community/home-manager/release-25.05";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
home-manager = {
url = "github:nix-community/home-manager/release-25.05";
inputs.nixpkgs.follows = "nixpkgs";
};
stylix = {
url = "github:danth/stylix/release-25.05";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { nixpkgs, home-manager, ... } @ inputs: let
@ -16,9 +22,28 @@
nixosConfigurations = {
nixos = nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = { inherit inputs; };
specialArgs = {
inherit inputs;
inherit host;
inherit profile;
inherit username;
};
modules = [
./configuration.nix
./hosts/${host}
];
};
live = nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = {
inherit inputs;
inherit host;
inherit profile;
inherit username;
};
modules = [
(nixpkgs + "/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix")
./hosts/${host}
];
};

View File

@ -12,10 +12,18 @@
./host-packages.nix
];
modules.hyprland.enable = true;
modules.plasma.enable = true;
modules.displayManager.displayManager = "sddm";
modules.hyprland = {
enable = true;
terminal = "kitty";
monitor = [
",preferred,auto,1"
];
};
modules.plasma.enable = false;
modules.displayManager.displayManager = "gdm";
modules.zsh.enable = true;
modules.shell.defaultShell = "zsh";
modules.shell.defaultShell = "bash";
modules.pipewire.enable = true;
}

9
modules/core/boot.nix Normal file
View File

@ -0,0 +1,9 @@
{
...
}:
{
boot = {
loader.systemd-boot.enable = true;
loader.efi.canTouchEfiVariables = true;
};
}

View File

@ -1,14 +1,23 @@
{
inputs,
...
}:
{
imports = [
./boot.nix
./firefox.nix
./fonts.nix
./gdm.nix
./hyprland.nix
./network.nix
./packages.nix
./pipewire.nix
./plasma.nix
./sddm.nix
./services.nix
./stylix.nix
./system.nix
./user.nix
inputs.stylix.nixosModules.stylix
];
}

21
modules/core/firefox.nix Normal file
View File

@ -0,0 +1,21 @@
{
config,
lib,
pkgs,
...
}:
with lib;
let
pipewireCfg = config.modules.pipewire;
in
{
programs = {
firefox.enable = true;
};
# Add wayland screensharing support if PipeWire is enabled
environment.systemPackages = with pkgs; []
++ (if pipewireCfg.enable
then [ (wrapFirefox (firefox-unwrapped.override { pipewireSupport = true; }) {}) ]
else [ firefox ]);
}

15
modules/core/fonts.nix Normal file
View File

@ -0,0 +1,15 @@
{
pkgs,
...
}:
{
fonts = {
fontconfig.enable = true;
packages = with pkgs; [
font-awesome
montserrat
nerd-fonts.jetbrains-mono
noto-fonts-emoji
];
};
}

View File

@ -11,6 +11,7 @@ in
config = mkIf cfg.enable {
programs.hyprland = {
enable = true;
withUWSM = true;
};
};
}

14
modules/core/network.nix Normal file
View File

@ -0,0 +1,14 @@
{
config,
host,
pkgs,
...
}:
{
networking = {
hostName = "${host}";
networkmanager.enable = true;
};
environment.systemPackages = with pkgs; [ networkmanagerapplet ];
}

View File

@ -4,5 +4,14 @@
...
}:
{
programs = {
};
environment.systemPackages = with pkgs; [
git
tldr
tmux
vim
];
}

25
modules/core/pipewire.nix Normal file
View File

@ -0,0 +1,25 @@
{
config,
lib,
...
}:
with lib;
let
cfg = config.modules.pipewire;
in
{
config = mkIf cfg.enable {
services.pipewire = {
enable = true;
alsa = {
enable = true;
support32Bit = true;
};
pulse.enable = true;
jack.enable = true;
};
# Allows Pipewire to use the realtime scheduler for increased performance
security.rtkit.enable = true;
};
}

View File

@ -0,0 +1,8 @@
{
...
}:
{
services = {
};
}

37
modules/core/stylix.nix Normal file
View File

@ -0,0 +1,37 @@
{
pkgs,
...
}:
{
stylix = {
enable = true;
base16Scheme = "${pkgs.base16-schemes}/share/themes/blueish.yaml";
polarity = "dark";
fonts = {
emoji = {
package = pkgs.noto-fonts-emoji;
name = "Noto Color Emoji";
};
monospace = {
package = pkgs.nerd-fonts.jetbrains-mono;
name = "JetBrains Mono";
};
sansSerif = {
package = pkgs.montserrat;
name = "Montserrat";
};
serif = {
package = pkgs.montserrat;
name = "Montserrat";
};
sizes = {
applications = 12;
terminal = 15;
desktop = 11;
popups = 12;
};
};
};
}

View File

@ -17,7 +17,22 @@ in
};
};
console.keyMap = cfg.keyMap;
time.timeZone = cfg.timeZone;
i18n = {
defaultLocale = cfg.locale;
extraLocaleSettings = {
LC_ADDRESS = cfg.locale;
LC_IDENTIFICATION = cfg.locale;
LC_MEASUREMENT = cfg.locale;
LC_MONETARY = cfg.locale;
LC_NAME = cfg.locale;
LC_NUMERIC = cfg.locale;
LC_PAPER = cfg.locale;
LC_TELEPHONE = cfg.locale;
LC_TIME = cfg.locale;
};
};
system.stateVersion = "25.05";
}

View File

@ -34,6 +34,7 @@ in
isNormalUser = true;
initialPassword = "changeme";
extraGroups = [
"networkmanager"
"wheel"
];
shell = pkgs.${shellCfg.defaultShell};

View File

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

View File

@ -11,21 +11,44 @@ let
cfg = osConfig.modules.hyprland;
in
{
systemd.user.targets.hyprland-session.Unit.Wants = [
"xdg-desktop-autostart.target"
];
wayland.windowManager.hyprland = {
enable = cfg.enable;
package = pkgs.hyprland;
systemd = {
enable = true;
enableXdgAutostart = true;
};
systemd.enable = false;
xwayland.enable = true;
settings = {
monitor = cfg.monitor;
general = {
"$modifier" = "SUPER";
gaps_in = 5;
gaps_out = 20;
border_size = 2;
"col.active_border" = mkForce "rgba(33ccffee) rgba(00ff99ee) 45deg";
"col.inactive_border" = mkForce "rgba(595959aa)";
layout = "dwindle";
};
decoration = {
rounding = 8;
inactive_opacity = 0.95;
blur = {
enabled = true;
size = 3;
passes = 3;
new_optimizations = true;
};
shadow = {
enabled = true;
range = 4;
render_power = 3;
# Home manager hyprland module sets this for some reason
color = mkForce "rgba(1a1a1aee)";
};
};
env = [

View File

@ -13,6 +13,14 @@ in
programs.kitty = {
enable = true;
package = pkgs.kitty;
settings = {
scrollback_lines = 10000;
shell_integration = true;
};
extraConfig = ''
# Clipboard
map ctrl+shift+v paste_from_selection
'';
};
};
}

View File

@ -7,6 +7,7 @@
with lib;
let
hyprlandCfg = osConfig.modules.hyprland;
pipewireCfg = osConfig.modules.pipewire;
plasmaCfg = osConfig.modules.plasma;
in
{
@ -20,6 +21,12 @@ in
++ (if hyprlandCfg.enable
then [ pkgs.xdg-desktop-portal-hyprland ]
else [])
++ (if pipewireCfg.enable
then [
pkgs.xdg-desktop-portal-wlr
pkgs.xdg-desktop-portal-gtk
]
else [])
++ (if plasmaCfg.enable
then [ pkgs.kdePackages.xdg-desktop-portal-kde ]
else []);

View File

@ -46,8 +46,8 @@ in
'';
shellAliases = {
".. " = "cd ..";
"..." = "cd../..";
".." = "cd ..";
"..." = "cd ../..";
ls = "ls --color=auto";
ll = "ls -al";
grep = "grep --color=auto";

View File

@ -5,6 +5,7 @@
imports = [
./displayManager.nix
./hyprland.nix
./pipewire.nix
./plasma.nix
./shell.nix
./system.nix

View File

@ -9,7 +9,10 @@ let
in
{
options.modules.hyprland = {
enable = mkEnableOption "Enable Hyprland";
enable = mkEnableOption {
default = false;
description = "Enable Hyprland";
};
terminal = mkOption {
type = types.enum [
"kitty"
@ -20,5 +23,12 @@ in
The terminal to use for Hyprland.
'';
};
monitor = mkOption {
type = types.listOf types.str;
default = [ ",preferred,auto,1" ];
description = ''
Monitors to use for Hyprland.
'';
};
};
}

View File

@ -0,0 +1,17 @@
{
config,
lib,
...
}:
with lib;
let
cfg = config.modules.pipewire;
in
{
options.modules.pipewire = {
enable = mkEnableOption {
default = true;
description = "Enable PipeWire";
};
};
}

View File

@ -9,6 +9,9 @@ let
in
{
options.modules.plasma = {
enable = mkEnableOption "Enable Plasma";
enable = mkEnableOption {
default = false;
description = "Enable Plasma";
};
};
}

View File

@ -9,6 +9,16 @@ let
in
{
options.system = {
locale = mkOption {
type = types.str;
default = "en_US.UTF-8";
};
keyMap = mkOption {
type = types.str;
default = "us";
};
timeZone = mkOption {
type = types.str;
default = "US/Eastern";

View File

@ -1,3 +1,5 @@
#/usr/bin/env bash
echo "Removing old qcow2 disk ..."
rm -f ./nixos.qcow2