Compare commits
29 Commits
038fc61690
...
9f307cba0b
| Author | SHA1 | Date |
|---|---|---|
|
|
9f307cba0b | |
|
|
f312009f84 | |
|
|
afe7719817 | |
|
|
befa49219f | |
|
|
980f127b30 | |
|
|
e4eee1b31a | |
|
|
ba9eda95b2 | |
|
|
92437f3d4d | |
|
|
c5705a372f | |
|
|
8b4de6cf40 | |
|
|
94b4b9c1e0 | |
|
|
dbeda86281 | |
|
|
8f871e8f58 | |
|
|
062895e4a9 | |
|
|
be2774838a | |
|
|
80996bbf64 | |
|
|
8b3fa070c3 | |
|
|
8b0d64797f | |
|
|
bd2b942001 | |
|
|
a7ffca0bfe | |
|
|
de9bb4bac6 | |
|
|
aee28b2757 | |
|
|
b98d397329 | |
|
|
93f6f30175 | |
|
|
4f32c90c26 | |
|
|
ce7a1739c3 | |
|
|
4e68d7a681 | |
|
|
290021bd5d | |
|
|
95d8165c24 |
|
|
@ -1,3 +1,6 @@
|
||||||
# Building NixOS VM
|
# Building NixOS VM
|
||||||
`nix build .#nixosConfigurations.nixosvm.config.system.build.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`
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
#/usr/bin/env bash
|
||||||
|
|
||||||
|
echo "Building ISO ..."
|
||||||
|
nix build .#nixosConfigurations.live.config.system.build.isoImage
|
||||||
|
|
||||||
|
echo "Done!"
|
||||||
|
|
@ -3,30 +3,19 @@
|
||||||
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
|
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
|
||||||
|
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
let
|
|
||||||
nixpkgs = fetchTarball "https://github.com/NixOS/nixpkgs/tarball/26d499fc9f1d567283d5d56fcf367edd815dba1d.tar.gz";
|
|
||||||
in
|
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
imports =
|
||||||
[ # Include the results of the hardware scan.
|
[ # Include the results of the hardware scan.
|
||||||
# ./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
./hyprland.nix
|
./hyprland.nix
|
||||||
|
./modules/main-user.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
# Use the systemd-boot EFI boot loader.
|
# Use the systemd-boot EFI boot loader.
|
||||||
boot.loader.systemd-boot.enable = true;
|
boot.loader.systemd-boot.enable = true;
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
|
||||||
# Virtual machine options
|
# networking.hostName = "nixos"; # Define your hostname.
|
||||||
# virtualisation.vmVariant = {
|
|
||||||
# virtualisation = {
|
|
||||||
# memorySize = 8192;
|
|
||||||
# cores = 8;
|
|
||||||
# };
|
|
||||||
# };
|
|
||||||
|
|
||||||
networking.hostName = "nixos"; # Define your hostname.
|
|
||||||
# Pick only one of the below networking options.
|
# Pick only one of the below networking options.
|
||||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||||
# networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
|
# networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
|
||||||
|
|
@ -76,21 +65,6 @@ in
|
||||||
# Enable touchpad support (enabled default in most desktopManager).
|
# Enable touchpad support (enabled default in most desktopManager).
|
||||||
# services.libinput.enable = true;
|
# services.libinput.enable = true;
|
||||||
|
|
||||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
|
||||||
users.users.josh = {
|
|
||||||
isNormalUser = true;
|
|
||||||
initialPassword = "test";
|
|
||||||
extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user.
|
|
||||||
packages = with pkgs; [
|
|
||||||
cowsay
|
|
||||||
lolcat
|
|
||||||
htop
|
|
||||||
firefox
|
|
||||||
pciutils
|
|
||||||
vim
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
# List packages installed in system profile. To search, run:
|
# List packages installed in system profile. To search, run:
|
||||||
# $ nix search wget
|
# $ nix search wget
|
||||||
# environment.systemPackages = with pkgs; [
|
# environment.systemPackages = with pkgs; [
|
||||||
|
|
|
||||||
341
flake.lock
341
flake.lock
|
|
@ -1,5 +1,163 @@
|
||||||
{
|
{
|
||||||
"nodes": {
|
"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": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1753479839,
|
||||||
|
"narHash": "sha256-E/rPVh7vyPMJUFl2NAew+zibNGfVbANr8BP8nLRbLkQ=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"rev": "0b9bf983db4d064764084cd6748efb1ab8297d1e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"ref": "release-25.05",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1753345091,
|
"lastModified": 1753345091,
|
||||||
|
|
@ -16,9 +174,190 @@
|
||||||
"type": "github"
|
"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": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": "nixpkgs"
|
"home-manager": "home-manager",
|
||||||
|
"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"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
64
flake.nix
64
flake.nix
|
|
@ -1,34 +1,66 @@
|
||||||
{
|
{
|
||||||
|
description = "NixOS configuration";
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.05";
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.05";
|
||||||
|
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 = { self, nixpkgs, ... }:
|
outputs = { nixpkgs, home-manager, ... } @ inputs: let
|
||||||
let
|
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
in
|
host = "vm";
|
||||||
{
|
profile = "vm";
|
||||||
nixosConfigurations.nixos = nixpkgs.lib.nixosSystem {
|
username = "josh";
|
||||||
|
in {
|
||||||
|
nixosConfigurations = {
|
||||||
|
nixos = nixpkgs.lib.nixosSystem {
|
||||||
|
inherit system;
|
||||||
|
specialArgs = {
|
||||||
|
inherit inputs;
|
||||||
|
inherit host;
|
||||||
|
inherit profile;
|
||||||
|
inherit username;
|
||||||
|
inherit hashedPassword;
|
||||||
|
};
|
||||||
modules = [
|
modules = [
|
||||||
{ nix.settings.experimental-features = ["nix-command" "flakes"]; }
|
./hosts/${host}
|
||||||
./configuration.nix
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
nixosConfigurations.nixosvm = nixpkgs.lib.nixosSystem {
|
live = nixpkgs.lib.nixosSystem {
|
||||||
inherit system;
|
inherit system;
|
||||||
|
specialArgs = {
|
||||||
|
inherit inputs;
|
||||||
|
inherit host;
|
||||||
|
inherit profile;
|
||||||
|
inherit username;
|
||||||
|
inherit hashedPassword;
|
||||||
|
};
|
||||||
modules = [
|
modules = [
|
||||||
{
|
(nixpkgs + "/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix")
|
||||||
nix.settings.experimental-features = ["nix-command" "flakes"];
|
./hosts/${host}
|
||||||
virtualisation.vmVariant = {
|
];
|
||||||
virtualisation = {
|
|
||||||
memorySize = 8192;
|
|
||||||
cores = 8;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
nixosvm = nixpkgs.lib.nixosSystem {
|
||||||
|
inherit system;
|
||||||
|
specialArgs = {
|
||||||
|
inherit inputs;
|
||||||
|
inherit host;
|
||||||
|
inherit profile;
|
||||||
|
inherit username;
|
||||||
};
|
};
|
||||||
}
|
modules = [
|
||||||
./configuration.nix
|
./hosts/${host}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
@ -0,0 +1,29 @@
|
||||||
|
{
|
||||||
|
profile,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
../../profiles/${profile}
|
||||||
|
../../modules/core
|
||||||
|
../../modules/options
|
||||||
|
|
||||||
|
./hardware.nix
|
||||||
|
./host-packages.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
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 = "bash";
|
||||||
|
|
||||||
|
modules.pipewire.enable = true;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
{
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
boot = {
|
||||||
|
loader.systemd-boot.enable = true;
|
||||||
|
loader.efi.canTouchEfiVariables = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -0,0 +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
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
@ -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 ]);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,15 @@
|
||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
fonts = {
|
||||||
|
fontconfig.enable = true;
|
||||||
|
packages = with pkgs; [
|
||||||
|
font-awesome
|
||||||
|
montserrat
|
||||||
|
nerd-fonts.jetbrains-mono
|
||||||
|
noto-fonts-emoji
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib;
|
||||||
|
let
|
||||||
|
cfg = config.modules.displayManager;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
config = mkIf (cfg.displayManager == "gdm") {
|
||||||
|
services.xserver.displayManager.gdm = {
|
||||||
|
enable = true;
|
||||||
|
wayland = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib;
|
||||||
|
let
|
||||||
|
cfg = config.modules.hyprland;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
programs.hyprland = {
|
||||||
|
enable = true;
|
||||||
|
withUWSM = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,14 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
host,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
networking = {
|
||||||
|
hostName = "${host}";
|
||||||
|
networkmanager.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [ networkmanagerapplet ];
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
programs = {
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
git
|
||||||
|
tldr
|
||||||
|
tmux
|
||||||
|
vim
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
@ -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;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,14 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib;
|
||||||
|
let
|
||||||
|
cfg = config.modules.plasma;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
services.desktopManager.plasma6.enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib;
|
||||||
|
let
|
||||||
|
cfg = config.modules.displayManager;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
config = mkIf (cfg.displayManager == "sddm") {
|
||||||
|
services.displayManager.sddm = {
|
||||||
|
enable = true;
|
||||||
|
wayland.enable = true;
|
||||||
|
settings = {
|
||||||
|
General.DisplayServer = "wayland";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# To prevent getting stuck at shutdown
|
||||||
|
systemd.extraConfig = "DefaultTimeoutStopSec=10s";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
services = {
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -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;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,38 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib;
|
||||||
|
let
|
||||||
|
cfg = config.system;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
nix = {
|
||||||
|
settings = {
|
||||||
|
experimental-features = [
|
||||||
|
"nix-command"
|
||||||
|
"flakes"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
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";
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,48 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
host,
|
||||||
|
inputs,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
profile,
|
||||||
|
username,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib;
|
||||||
|
let
|
||||||
|
shellCfg = config.modules.shell;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
imports = [ inputs.home-manager.nixosModules.home-manager ];
|
||||||
|
home-manager = {
|
||||||
|
useUserPackages = true;
|
||||||
|
useGlobalPkgs = false;
|
||||||
|
backupFileExtension = "backup";
|
||||||
|
extraSpecialArgs = { inherit host inputs profile username; };
|
||||||
|
users.${username} = {
|
||||||
|
imports = [ ./../home ];
|
||||||
|
home = {
|
||||||
|
username = "${username}";
|
||||||
|
homeDirectory = "/home/${username}";
|
||||||
|
stateVersion = "25.05";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
users.mutableUsers = true;
|
||||||
|
users.users.${username} = {
|
||||||
|
isNormalUser = true;
|
||||||
|
initialPassword = "changeme";
|
||||||
|
extraGroups = [
|
||||||
|
"networkmanager"
|
||||||
|
"wheel"
|
||||||
|
];
|
||||||
|
shell = pkgs.${shellCfg.defaultShell};
|
||||||
|
ignoreShellProgramCheck = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Set /etc/shells so GDM will show our user when ZSH is selected
|
||||||
|
environment.shells = with pkgs; [ pkgs.${shellCfg.defaultShell} ];
|
||||||
|
|
||||||
|
nix.settings.allowed-users = [ "${username}" ];
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./vm-guest-services.nix
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,21 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib;
|
||||||
|
let
|
||||||
|
cfg = config.vm.guest-services;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.vm.guest-services = {
|
||||||
|
enable = mkEnableOption "Enable Virtual Machine Guest Services";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
services.qemuGuest.enable = true;
|
||||||
|
services.spice-vdagentd.enable = true;
|
||||||
|
services.spice-webdavd.enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
{
|
||||||
|
host,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./hyprland
|
||||||
|
./kitty.nix
|
||||||
|
./xdg.nix
|
||||||
|
./zsh
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,59 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
osConfig,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib;
|
||||||
|
let
|
||||||
|
cfg = osConfig.modules.hyprland;
|
||||||
|
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"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
{
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./binds.nix
|
||||||
|
./hyprland.nix
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,66 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
host,
|
||||||
|
lib,
|
||||||
|
osConfig,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib;
|
||||||
|
let
|
||||||
|
cfg = osConfig.modules.hyprland;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
wayland.windowManager.hyprland = {
|
||||||
|
enable = cfg.enable;
|
||||||
|
package = pkgs.hyprland;
|
||||||
|
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 = [
|
||||||
|
"NIXOS_OZONE_WL, 1"
|
||||||
|
"XDG_CURRENT_DESKTOP, Hyprland"
|
||||||
|
"XDG_SESSION_DESKTOP, Hyprland"
|
||||||
|
"XDG_SESSION_TYPE, wayland"
|
||||||
|
];
|
||||||
|
|
||||||
|
ecosystem = {
|
||||||
|
no_update_news = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,26 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
osConfig,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib;
|
||||||
|
let
|
||||||
|
cfg = osConfig.modules.hyprland;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
config = mkIf (cfg.terminal == "kitty") {
|
||||||
|
programs.kitty = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.kitty;
|
||||||
|
settings = {
|
||||||
|
scrollback_lines = 10000;
|
||||||
|
shell_integration = true;
|
||||||
|
};
|
||||||
|
extraConfig = ''
|
||||||
|
# Clipboard
|
||||||
|
map ctrl+shift+v paste_from_selection
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,42 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
osConfig,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib;
|
||||||
|
let
|
||||||
|
hyprlandCfg = osConfig.modules.hyprland;
|
||||||
|
pipewireCfg = osConfig.modules.pipewire;
|
||||||
|
plasmaCfg = osConfig.modules.plasma;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
xdg = {
|
||||||
|
enable = true;
|
||||||
|
mime.enable = true;
|
||||||
|
mimeApps.enable = true;
|
||||||
|
portal = {
|
||||||
|
enable = true;
|
||||||
|
extraPortals = []
|
||||||
|
++ (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 []);
|
||||||
|
configPackages = []
|
||||||
|
++ (if hyprlandCfg.enable
|
||||||
|
then [ pkgs.hyprland ]
|
||||||
|
else [])
|
||||||
|
++ (if plasmaCfg.enable
|
||||||
|
then [ pkgs.kdePackages.kde-gtk-config ]
|
||||||
|
else []);
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,59 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
osConfig,
|
||||||
|
pkgs,
|
||||||
|
profile,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib;
|
||||||
|
let
|
||||||
|
cfg = osConfig.modules.zsh;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./zshrc-personal.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
programs.zsh = {
|
||||||
|
enable = cfg.enable;
|
||||||
|
autosuggestion.enable = true;
|
||||||
|
syntaxHighlighting = {
|
||||||
|
enable = true;
|
||||||
|
highlighters = [
|
||||||
|
"main"
|
||||||
|
"brackets"
|
||||||
|
"pattern"
|
||||||
|
"root"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
historySubstringSearch.enable = true;
|
||||||
|
|
||||||
|
history = {
|
||||||
|
ignoreDups = false;
|
||||||
|
save = 100000;
|
||||||
|
size = 100000;
|
||||||
|
};
|
||||||
|
|
||||||
|
initContent = ''
|
||||||
|
# vi keybindings for menu select
|
||||||
|
bindkey -M menuselect 'h' vi-backward-char
|
||||||
|
bindkey -M menuselect 'k' vi-up-line-or-history
|
||||||
|
bindkey -M menuselect 'j' vi-down-line-or-history
|
||||||
|
bindkey -M menuselect 'l' vi-forward-char
|
||||||
|
|
||||||
|
# Tab to accept current selection
|
||||||
|
bind-key -M menuselect '^I' accept-and-infer-next-history
|
||||||
|
'';
|
||||||
|
|
||||||
|
shellAliases = {
|
||||||
|
".." = "cd ..";
|
||||||
|
"..." = "cd ../..";
|
||||||
|
ls = "ls --color=auto";
|
||||||
|
ll = "ls -al";
|
||||||
|
grep = "grep --color=auto";
|
||||||
|
back = "cd $OLDPWD";
|
||||||
|
gs = "git status";
|
||||||
|
ssha = "eval $(ssh-agent) && ssh-add";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
osConfig,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib;
|
||||||
|
let
|
||||||
|
cfg = osConfig.modules.zsh;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
home.packages = with pkgs; [ zsh ];
|
||||||
|
|
||||||
|
home.file."./.zshrc-personal".text = ''
|
||||||
|
export EDITOR=vim
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,14 @@
|
||||||
|
{
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./displayManager.nix
|
||||||
|
./hyprland.nix
|
||||||
|
./pipewire.nix
|
||||||
|
./plasma.nix
|
||||||
|
./shell.nix
|
||||||
|
./system.nix
|
||||||
|
./zsh.nix
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib;
|
||||||
|
let
|
||||||
|
cfg = config.modules.displayManager;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.modules.displayManager = {
|
||||||
|
displayManager = mkOption {
|
||||||
|
type = types.enum [
|
||||||
|
"gdm"
|
||||||
|
"sddm"
|
||||||
|
];
|
||||||
|
default = "sddm";
|
||||||
|
description = ''
|
||||||
|
The display manager to use.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,34 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib;
|
||||||
|
let
|
||||||
|
cfg = config.modules.hyprland;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.modules.hyprland = {
|
||||||
|
enable = mkEnableOption {
|
||||||
|
default = false;
|
||||||
|
description = "Enable Hyprland";
|
||||||
|
};
|
||||||
|
terminal = mkOption {
|
||||||
|
type = types.enum [
|
||||||
|
"kitty"
|
||||||
|
"alacritty"
|
||||||
|
];
|
||||||
|
default = "kitty";
|
||||||
|
description = ''
|
||||||
|
The terminal to use for Hyprland.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
monitor = mkOption {
|
||||||
|
type = types.listOf types.str;
|
||||||
|
default = [ ",preferred,auto,1" ];
|
||||||
|
description = ''
|
||||||
|
Monitors to use for Hyprland.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib;
|
||||||
|
let
|
||||||
|
cfg = config.modules.pipewire;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.modules.pipewire = {
|
||||||
|
enable = mkEnableOption {
|
||||||
|
default = true;
|
||||||
|
description = "Enable PipeWire";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib;
|
||||||
|
let
|
||||||
|
cfg = config.modules.plasma;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.modules.plasma = {
|
||||||
|
enable = mkEnableOption {
|
||||||
|
default = false;
|
||||||
|
description = "Enable Plasma";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib;
|
||||||
|
let
|
||||||
|
cfg = config.modules.shell;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.modules.shell = {
|
||||||
|
defaultShell = mkOption {
|
||||||
|
type = types.enum [
|
||||||
|
"bash"
|
||||||
|
"zsh"
|
||||||
|
];
|
||||||
|
default = "zsh";
|
||||||
|
description = ''
|
||||||
|
The default shell to use for your user account.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib;
|
||||||
|
let
|
||||||
|
cfg = config.system;
|
||||||
|
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";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib;
|
||||||
|
let
|
||||||
|
cfg = config.modules.zsh;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.modules.zsh = {
|
||||||
|
enable = mkEnableOption {
|
||||||
|
description = "Install ZSH";
|
||||||
|
default = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
{
|
||||||
|
vm,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
@ -1,5 +1,9 @@
|
||||||
|
#/usr/bin/env bash
|
||||||
|
|
||||||
echo "Removing old qcow2 disk ..."
|
echo "Removing old qcow2 disk ..."
|
||||||
rm -f ./nixos.qcow2
|
rm -f ./nixos.qcow2
|
||||||
|
|
||||||
echo "Building new VM ..."
|
echo "Building new VM ..."
|
||||||
nix build .#nixosConfigurations.nixosvm.config.system.build.vm
|
nix build .#nixosConfigurations.nixosvm.config.system.build.vm
|
||||||
|
|
||||||
echo "Done!"
|
echo "Done!"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue