Compare commits
3 Commits
99eb70d764
...
e494904bcc
| Author | SHA1 | Date |
|---|---|---|
|
|
e494904bcc | |
|
|
e60c8498c0 | |
|
|
05183b75b4 |
19
flake.nix
19
flake.nix
|
|
@ -27,12 +27,13 @@
|
|||
nixpkgs,
|
||||
home-manager,
|
||||
install-system,
|
||||
stylix,
|
||||
...
|
||||
}@inputs:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
host = "vm";
|
||||
profile = "vm";
|
||||
profile = "desktop";
|
||||
username = "josh";
|
||||
in
|
||||
{
|
||||
|
|
@ -64,19 +65,19 @@
|
|||
./hosts/${host}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
nixosvm = nixpkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
specialArgs = {
|
||||
homeConfigurations.${username} = home-manager.lib.homeManagerConfiguration {
|
||||
extraSpecialArgs = {
|
||||
inherit inputs;
|
||||
inherit host;
|
||||
inherit profile;
|
||||
inherit username;
|
||||
};
|
||||
modules = [
|
||||
./hosts/${host}
|
||||
];
|
||||
};
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
modules = [
|
||||
./homes/${username}/home.nix
|
||||
stylix.homeModules.stylix
|
||||
];
|
||||
};
|
||||
|
||||
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 = [
|
||||
../../profiles/${profile}
|
||||
../../profiles/vm
|
||||
../../modules/core
|
||||
../../modules/options
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,8 @@
|
|||
{
|
||||
inputs,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
{
|
||||
imports = [ inputs.stylix.nixosModules.stylix ];
|
||||
|
||||
|
|
|
|||
|
|
@ -26,12 +26,7 @@ in
|
|||
;
|
||||
};
|
||||
users.${username} = {
|
||||
imports = [ ./../home ];
|
||||
home = {
|
||||
username = "${username}";
|
||||
homeDirectory = "/home/${username}";
|
||||
stateVersion = "25.05";
|
||||
};
|
||||
imports = [ ../../homes/${username}/home.nix ];
|
||||
};
|
||||
};
|
||||
|
||||
|
|
@ -57,6 +52,4 @@ in
|
|||
environment.pathsToLink =
|
||||
[ ]
|
||||
++ (if zshCfg.enable then [ "/share/zsh" ] else [ ]);
|
||||
|
||||
nix.settings.allowed-users = [ "${username}" ];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
{
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
{
|
||||
osConfig,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = osConfig.modules.hyprland;
|
||||
cfg = config.modules.hyprland;
|
||||
in
|
||||
{
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
osConfig,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let
|
||||
cfg = osConfig.modules.hyprland;
|
||||
cfg = config.modules.hyprland;
|
||||
in
|
||||
{
|
||||
wayland.windowManager.hyprland = {
|
||||
|
|
@ -1,13 +1,13 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
osConfig,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let
|
||||
hyprlandCfg = osConfig.modules.hyprland;
|
||||
zshCfg = osConfig.modules.zsh;
|
||||
hyprlandCfg = config.modules.hyprland;
|
||||
zshCfg = config.modules.zsh;
|
||||
in
|
||||
{
|
||||
config = mkIf (hyprlandCfg.terminal == "kitty") {
|
||||
|
|
@ -15,8 +15,8 @@
|
|||
name = "Noto Color Emoji";
|
||||
};
|
||||
monospace = {
|
||||
package = pkgs.nerd-fonts.jetbrains-mono;
|
||||
name = "JetBrains Mono";
|
||||
package = pkgs.nerd-fonts.meslo-lg;
|
||||
name = "MesloLGS Nerd Font";
|
||||
};
|
||||
sansSerif = {
|
||||
package = pkgs.montserrat;
|
||||
|
|
@ -1,19 +1,21 @@
|
|||
{
|
||||
osConfig,
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let
|
||||
hyprlandCfg = osConfig.modules.hyprland;
|
||||
pipewireCfg = osConfig.modules.pipewire;
|
||||
plasmaCfg = osConfig.modules.plasma;
|
||||
hyprlandCfg = config.modules.hyprland;
|
||||
pipewireCfg = config.modules.pipewire;
|
||||
plasmaCfg = config.modules.plasma;
|
||||
in
|
||||
{
|
||||
xdg = {
|
||||
enable = true;
|
||||
mime.enable = true;
|
||||
mimeApps.enable = true;
|
||||
portal = {
|
||||
portal = mkIf (hyprlandCfg.enable or plasmaCfg.enable) {
|
||||
enable = true;
|
||||
extraPortals =
|
||||
[ ]
|
||||
|
|
@ -1,12 +1,11 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
osConfig,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let
|
||||
cfg = osConfig.modules.zsh;
|
||||
cfg = config.modules.zsh;
|
||||
xdgCfg = config.xdg;
|
||||
in
|
||||
{
|
||||
|
|
@ -1,13 +1,12 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
osConfig,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let
|
||||
cfg = osConfig.modules.zsh;
|
||||
cfg = config.modules.zsh;
|
||||
xdgCfg = config.xdg;
|
||||
in
|
||||
{
|
||||
|
|
@ -1,12 +1,11 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
osConfig,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let
|
||||
cfg = osConfig.modules.zsh;
|
||||
cfg = config.modules.zsh;
|
||||
xdgCfg = config.xdg;
|
||||
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
|
||||
|
||||
echo "Building new VM ..."
|
||||
nix build .#nixosConfigurations.nixosvm.config.system.build.vm
|
||||
nix build .#nixosConfigurations.nixos.config.system.build.vm
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Failed to build VM"
|
||||
|
|
|
|||
Loading…
Reference in New Issue