Compare commits
10 Commits
e494904bcc
...
99eb70d764
| Author | SHA1 | Date |
|---|---|---|
|
|
99eb70d764 | |
|
|
69e3c2528d | |
|
|
a27e2495d3 | |
|
|
eaedcbd5d6 | |
|
|
34eab2b47f | |
|
|
c889e17f6a | |
|
|
de8065c0f7 | |
|
|
59bb57241a | |
|
|
47c9f0fea4 | |
|
|
c7d702aa6b |
19
flake.nix
19
flake.nix
|
|
@ -27,12 +27,13 @@
|
||||||
nixpkgs,
|
nixpkgs,
|
||||||
home-manager,
|
home-manager,
|
||||||
install-system,
|
install-system,
|
||||||
|
stylix,
|
||||||
...
|
...
|
||||||
}@inputs:
|
}@inputs:
|
||||||
let
|
let
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
host = "vm";
|
host = "vm";
|
||||||
profile = "vm";
|
profile = "desktop";
|
||||||
username = "josh";
|
username = "josh";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|
@ -64,19 +65,19 @@
|
||||||
./hosts/${host}
|
./hosts/${host}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
|
||||||
nixosvm = nixpkgs.lib.nixosSystem {
|
homeConfigurations.${username} = home-manager.lib.homeManagerConfiguration {
|
||||||
inherit system;
|
extraSpecialArgs = {
|
||||||
specialArgs = {
|
|
||||||
inherit inputs;
|
inherit inputs;
|
||||||
inherit host;
|
|
||||||
inherit profile;
|
inherit profile;
|
||||||
inherit username;
|
inherit username;
|
||||||
};
|
};
|
||||||
modules = [
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
./hosts/${host}
|
modules = [
|
||||||
];
|
./homes/${username}/home.nix
|
||||||
};
|
stylix.homeModules.stylix
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
devShell.${system} = nixpkgs.legacyPackages.${system}.pkgs.mkShell {
|
devShell.${system} = nixpkgs.legacyPackages.${system}.pkgs.mkShell {
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,37 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
profile,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib;
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
../../modules/homes
|
||||||
|
../../modules/options
|
||||||
|
../../profiles/${profile}
|
||||||
|
];
|
||||||
|
|
||||||
|
modules.zsh.enable = true;
|
||||||
|
modules.shell.defaultShell = "zsh";
|
||||||
|
|
||||||
|
home = {
|
||||||
|
username = "josh";
|
||||||
|
homeDirectory = "/home/josh";
|
||||||
|
stateVersion = "25.11";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Let Home Manager install and manage itself
|
||||||
|
programs.home-manager.enable = true;
|
||||||
|
|
||||||
|
nix = {
|
||||||
|
package = mkDefault pkgs.nix;
|
||||||
|
settings = {
|
||||||
|
allowed-users = [ "josh" ];
|
||||||
|
experimental-features = [
|
||||||
|
"nix-command"
|
||||||
|
"flakes"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -5,6 +5,7 @@
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
../../profiles/${profile}
|
../../profiles/${profile}
|
||||||
|
../../profiles/vm
|
||||||
../../modules/core
|
../../modules/core
|
||||||
../../modules/options
|
../../modules/options
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,8 @@
|
||||||
{
|
{
|
||||||
inputs,
|
inputs,
|
||||||
lib,
|
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib;
|
|
||||||
{
|
{
|
||||||
imports = [ inputs.stylix.nixosModules.stylix ];
|
imports = [ inputs.stylix.nixosModules.stylix ];
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -26,12 +26,7 @@ in
|
||||||
;
|
;
|
||||||
};
|
};
|
||||||
users.${username} = {
|
users.${username} = {
|
||||||
imports = [ ./../home ];
|
imports = [ ../../homes/${username}/home.nix ];
|
||||||
home = {
|
|
||||||
username = "${username}";
|
|
||||||
homeDirectory = "/home/${username}";
|
|
||||||
stateVersion = "25.05";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -57,6 +52,4 @@ in
|
||||||
environment.pathsToLink =
|
environment.pathsToLink =
|
||||||
[ ]
|
[ ]
|
||||||
++ (if zshCfg.enable then [ "/share/zsh" ] else [ ]);
|
++ (if zshCfg.enable then [ "/share/zsh" ] else [ ]);
|
||||||
|
|
||||||
nix.settings.allowed-users = [ "${username}" ];
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
{
|
{
|
||||||
inputs,
|
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
{
|
{
|
||||||
osConfig,
|
config,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
cfg = osConfig.modules.hyprland;
|
cfg = config.modules.hyprland;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
wayland.windowManager.hyprland.settings = {
|
wayland.windowManager.hyprland.settings = {
|
||||||
|
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
|
config,
|
||||||
lib,
|
lib,
|
||||||
osConfig,
|
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib;
|
with lib;
|
||||||
let
|
let
|
||||||
cfg = osConfig.modules.hyprland;
|
cfg = config.modules.hyprland;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
wayland.windowManager.hyprland = {
|
wayland.windowManager.hyprland = {
|
||||||
|
|
@ -1,13 +1,13 @@
|
||||||
{
|
{
|
||||||
|
config,
|
||||||
lib,
|
lib,
|
||||||
osConfig,
|
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib;
|
with lib;
|
||||||
let
|
let
|
||||||
hyprlandCfg = osConfig.modules.hyprland;
|
hyprlandCfg = config.modules.hyprland;
|
||||||
zshCfg = osConfig.modules.zsh;
|
zshCfg = config.modules.zsh;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
config = mkIf (hyprlandCfg.terminal == "kitty") {
|
config = mkIf (hyprlandCfg.terminal == "kitty") {
|
||||||
|
|
@ -15,8 +15,8 @@
|
||||||
name = "Noto Color Emoji";
|
name = "Noto Color Emoji";
|
||||||
};
|
};
|
||||||
monospace = {
|
monospace = {
|
||||||
package = pkgs.nerd-fonts.jetbrains-mono;
|
package = pkgs.nerd-fonts.meslo-lg;
|
||||||
name = "JetBrains Mono";
|
name = "MesloLGS Nerd Font";
|
||||||
};
|
};
|
||||||
sansSerif = {
|
sansSerif = {
|
||||||
package = pkgs.montserrat;
|
package = pkgs.montserrat;
|
||||||
|
|
@ -1,19 +1,21 @@
|
||||||
{
|
{
|
||||||
osConfig,
|
config,
|
||||||
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
with lib;
|
||||||
let
|
let
|
||||||
hyprlandCfg = osConfig.modules.hyprland;
|
hyprlandCfg = config.modules.hyprland;
|
||||||
pipewireCfg = osConfig.modules.pipewire;
|
pipewireCfg = config.modules.pipewire;
|
||||||
plasmaCfg = osConfig.modules.plasma;
|
plasmaCfg = config.modules.plasma;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
xdg = {
|
xdg = {
|
||||||
enable = true;
|
enable = true;
|
||||||
mime.enable = true;
|
mime.enable = true;
|
||||||
mimeApps.enable = true;
|
mimeApps.enable = true;
|
||||||
portal = {
|
portal = mkIf (hyprlandCfg.enable or plasmaCfg.enable) {
|
||||||
enable = true;
|
enable = true;
|
||||||
extraPortals =
|
extraPortals =
|
||||||
[ ]
|
[ ]
|
||||||
|
|
@ -1,12 +1,11 @@
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
osConfig,
|
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib;
|
with lib;
|
||||||
let
|
let
|
||||||
cfg = osConfig.modules.zsh;
|
cfg = config.modules.zsh;
|
||||||
xdgCfg = config.xdg;
|
xdgCfg = config.xdg;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|
@ -1,13 +1,12 @@
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
osConfig,
|
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib;
|
with lib;
|
||||||
let
|
let
|
||||||
cfg = osConfig.modules.zsh;
|
cfg = config.modules.zsh;
|
||||||
xdgCfg = config.xdg;
|
xdgCfg = config.xdg;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|
@ -1,12 +1,11 @@
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
osConfig,
|
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib;
|
with lib;
|
||||||
let
|
let
|
||||||
cfg = osConfig.modules.zsh;
|
cfg = config.modules.zsh;
|
||||||
xdgCfg = config.xdg;
|
xdgCfg = config.xdg;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|
@ -0,0 +1,10 @@
|
||||||
|
{
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
imports = [ ../../modules/options ];
|
||||||
|
|
||||||
|
modules.hyprland = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
{
|
{
|
||||||
vm,
|
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -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.nixosvm.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"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue