seperated main PC and Laptop without NixOS

This commit is contained in:
Kristian Krsnik 2023-08-27 21:17:36 +02:00
parent 49a621b985
commit 6113c8891e
6 changed files with 74 additions and 39 deletions

View File

@ -36,39 +36,57 @@
in {
formatter.${system} = pkgs.alejandra;
commonModules = [
./home.nix
{
_module.args.wallpaper = wallpaper.packages.${system}.default;
}
nur.nixosModules.nur
{
nixpkgs.overlays = [
zig.overlays.default # Add zig
( # https://github.com/nix-community/home-manager/issues/1538#issuecomment-706627100
final: prev: {
unstable = import nixpkgs-unstable {
system = final.system;
config.allowUnfreePredicate = _: true;
};
master = import nixpkgs-master {
system = final.system;
config.allowUnfreePredicate = _: true;
};
}
)
( # Overrides davinci-resolve with the unstable version because of https://github.com/NixOS/nixpkgs/pull/246074
final: prev: {davinci-resolve = final.master.davinci-resolve;}
)
];
}
];
homeConfigurations = {
kristian = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules = [
./home.nix
{
_module.args.wallpaper = wallpaper.packages.${system}.default;
}
modules =
[
./pc.nix
]
++ self.commonModules;
};
nur.nixosModules.nur
laptop = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
{
nixpkgs.overlays = [
zig.overlays.default # Add zig
( # https://github.com/nix-community/home-manager/issues/1538#issuecomment-706627100
final: prev: {
unstable = import nixpkgs-unstable {
system = final.system;
config.allowUnfreePredicate = _: true;
};
master = import nixpkgs-master {
system = final.system;
config.allowUnfreePredicate = _: true;
};
}
)
( # Overrides davinci-resolve with the unstable version because of https://github.com/NixOS/nixpkgs/pull/246074
final: prev: {davinci-resolve = final.master.davinci-resolve;}
)
];
}
];
modules =
self.commonModules
++ [
./laptop.nix
]
++ self.commonModules;
};
};
};

View File

@ -17,9 +17,6 @@
# Keyboard Layout
home.keyboard.layout = "at";
# TODO Change for Laptop
targets.genericLinux.enable = false; # Enable on non-nixos ditros
imports = [
./modules/bash.nix
./modules/direnv.nix

11
laptop.nix Normal file
View File

@ -0,0 +1,11 @@
{...}: {
config.targets.genericLinux.enable = true;
# Changes specific to the laptop
config.dconf.settings = {
"org/gnome/settings-daemon/plugins/power" = {
sleep-inactive-ac-type = "nothing";
power-button-action = "nothing";
};
};
}

View File

@ -73,11 +73,6 @@
];
};
"org/gnome/settings-daemon/plugins/power" = {
sleep-inactive-ac-type = "nothing"; # Automatic suspend/hibernation creates a suspend/hibernation loop
power-button-action = "suspend";
};
"org/gnome/mutter" = {
edge-tiling = true;
dynamic-workspaces = true;

View File

@ -34,10 +34,6 @@
# Creative software
gimp
davinci-resolve
# Games
osu-lazer
# Misc
comma # Run any binary from the repos with a comma `, cowsay neato`

18
pc.nix Normal file
View File

@ -0,0 +1,18 @@
{pkgs, ...}: {
config.targets.genericLinux.enable = false;
# Changes specific to the PC
config.home.packages = with pkgs; [
davinci-resolve
# Games
osu-lazer
];
config.dconf.settings = {
"org/gnome/settings-daemon/plugins/power" = {
sleep-inactive-ac-type = "nothing"; # Automatic suspend/hibernation creates a suspend/hibernation loop
power-button-action = "suspend";
};
};
}