add desktop and laptop config option

This commit is contained in:
Frost-Phoenix 2024-04-13 13:43:59 +02:00
parent 04e4aa6164
commit ff99a6803a
8 changed files with 63 additions and 45 deletions

View file

@ -1,29 +1,16 @@
{ inputs, nixpkgs, self, username, ...}:
let
system = "x86_64-linux";
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
};
lib = nixpkgs.lib;
in
{ inputs, nixpkgs, self, username, host, ...}:
{
nixos = nixpkgs.lib.nixosSystem {
specialArgs = { inherit self inputs username; };
modules =
[ (import ./bootloader.nix) ]
++ [ (import ./hardware.nix) ]
++ [ (import ./xserver.nix) ]
++ [ (import ./network.nix) ]
++ [ (import ./pipewire.nix) ]
++ [ (import ./program.nix) ]
++ [ (import ./security.nix) ]
++ [ (import ./services.nix) ]
++ [ (import ./system.nix) ]
++ [ (import ./user.nix) ]
++ [ (import ./wayland.nix) ]
++ [ (import ./virtualization.nix) ]
++ [ (import ./../../hosts/desktop/hardware-configuration.nix) ]
;
};
imports =
[ (import ./bootloader.nix) ]
++ [ (import ./hardware.nix) ]
++ [ (import ./xserver.nix) ]
++ [ (import ./network.nix) ]
++ [ (import ./pipewire.nix) ]
++ [ (import ./program.nix) ]
++ [ (import ./security.nix) ]
++ [ (import ./services.nix) ]
++ [ (import ./system.nix) ]
++ [ (import ./user.nix) ]
++ [ (import ./wayland.nix) ]
++ [ (import ./virtualization.nix) ];
}

View file

@ -1,9 +1,4 @@
{ pkgs, inputs, username, ...}:
let
packages = with pkgs; [
fish
];
in
{ pkgs, inputs, username, host, ...}:
{
imports = [ inputs.home-manager.nixosModules.home-manager ];
home-manager = {
@ -11,7 +6,10 @@ in
useGlobalPkgs = true;
extraSpecialArgs = { inherit inputs username; };
users.${username} = {
imports = [ (import ./../home) ];
imports =
if (host == "desktop") then
[ ./../home/default.desktop.nix ]
else [ ./../home ];
home.username = "${username}";
home.homeDirectory = "/home/${username}";
home.stateVersion = "22.11";

View file

@ -0,0 +1,7 @@
{inputs, username, ...}: {
imports =
[(import ./default.nix)]
++ [(import ./rider.nix)] # C# JetBrain editor
# ++ [ (import ./steam.nix) ]
++ [(import ./unity.nix)];
}

View file

@ -16,12 +16,9 @@
++ [(import ./micro.nix)] # nano replacement
++ [(import ./nvim.nix)]
++ [(import ./packages.nix)]
++ [(import ./rider.nix)] # C# JetBrain editor
++ [(import ./scripts/scripts.nix)] # personal scripts
++ [(import ./starship.nix)]
# ++ [ (import ./steam.nix) ]
++ [(import ./swaylock.nix)]
++ [(import ./unity.nix)]
++ [(import ./vscodium.nix)]
++ [(import ./waybar)]
++ [(import ./wofi.nix)]