nixos: add presets
This commit is contained in:
parent
07bff0bc66
commit
8ff2fc46aa
18 changed files with 112 additions and 76 deletions
17
flake.nix
17
flake.nix
|
@ -86,11 +86,10 @@
|
|||
system = "x86_64-linux";
|
||||
specialArgs = { inherit inputs; };
|
||||
modules = [
|
||||
./nixos # Entrypoint
|
||||
./machines/nixos/81fw-lenovo-legion-y7000 # Hardware-specific configurations
|
||||
./machines/nixos/81fw-lenovo-legion-y7000/machine-1 # Machine-specific configurations
|
||||
|
||||
./users/guanranwang/nixos.nix # Home Manager entrypoint (user-specific)
|
||||
./nixos/presets/gaming.nix # OS-specific (with presets)
|
||||
./users/guanranwang/nixos/presets/gaming.nix # User-specific (with presets)
|
||||
./machines/nixos/81fw-lenovo-legion-y7000 # Hardware-specific
|
||||
./machines/nixos/81fw-lenovo-legion-y7000/machine-1 # Machine-specific
|
||||
|
||||
{ networking.hostName = "81FW-NixOS"; } # Hostname
|
||||
];
|
||||
|
@ -101,12 +100,11 @@
|
|||
system = "x86_64-linux";
|
||||
specialArgs = { inherit inputs; };
|
||||
modules = [
|
||||
./nixos
|
||||
./nixos/presets/desktop.nix
|
||||
./users/guanranwang/nixos/presets/desktop.nix
|
||||
./machines/nixos/imac-2017
|
||||
./machines/nixos/imac-2017/machine-1
|
||||
|
||||
./users/guanranwang/nixos.nix
|
||||
|
||||
{ networking.hostName = "iMac-NixOS"; }
|
||||
];
|
||||
};
|
||||
|
@ -120,10 +118,9 @@
|
|||
specialArgs = { inherit inputs; };
|
||||
modules = [
|
||||
./darwin
|
||||
./users/guanranwang/darwin/presets/desktop.nix
|
||||
./machines/darwin/imac-2017
|
||||
|
||||
./users/guanranwang/darwin.nix
|
||||
|
||||
{ networking.hostName = "iMac-macOS"; }
|
||||
];
|
||||
};
|
||||
|
|
|
@ -3,6 +3,5 @@
|
|||
{
|
||||
imports = [
|
||||
./hardware.nix
|
||||
../../../nixos/presets/desktop.nix
|
||||
];
|
||||
}
|
|
@ -1,14 +0,0 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./boot
|
||||
./i18n
|
||||
./networking
|
||||
./nix
|
||||
./packages
|
||||
./power-management
|
||||
#./specialisation # dont actually use this
|
||||
./users
|
||||
];
|
||||
}
|
|
@ -16,12 +16,5 @@
|
|||
enable = true;
|
||||
package = pkgs.gnomeExtensions.gsconnect;
|
||||
};
|
||||
gamemode = {
|
||||
enable = true;
|
||||
settings.custom = {
|
||||
start = "${pkgs.libnotify}/bin/notify-send 'GameMode Activated' 'GameMode Activated! Enjoy enhanced performance. 🚀'";
|
||||
end = "${pkgs.libnotify}/bin/notify-send 'GameMode Deactivated' 'GameMode Deactivated. Back to normal mode. ⏹️'";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -2,6 +2,17 @@
|
|||
|
||||
# Imported by default, check out ./desktop.nix or ./server.nix
|
||||
{
|
||||
imports = [
|
||||
../boot
|
||||
../i18n
|
||||
../networking
|
||||
../nix
|
||||
../packages
|
||||
../power-management
|
||||
#../specialisation # dont actually use this
|
||||
../users
|
||||
];
|
||||
|
||||
# Installed packages (System wide)
|
||||
environment = {
|
||||
#defaultPackages = [];
|
||||
|
|
14
nixos/presets/gaming.nix
Normal file
14
nixos/presets/gaming.nix
Normal file
|
@ -0,0 +1,14 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./desktop.nix
|
||||
];
|
||||
programs.gamemode = {
|
||||
enable = true;
|
||||
settings.custom = {
|
||||
start = "${pkgs.libnotify}/bin/notify-send 'GameMode Activated' 'GameMode Activated! Enjoy enhanced performance. 🚀'";
|
||||
end = "${pkgs.libnotify}/bin/notify-send 'GameMode Deactivated' 'GameMode Deactivated. Back to normal mode. ⏹️'";
|
||||
};
|
||||
};
|
||||
}
|
|
@ -14,8 +14,8 @@
|
|||
|
||||
# Flakes
|
||||
imports = [
|
||||
../../flakes/darwin/home-manager.nix
|
||||
../../../../flakes/darwin/home-manager.nix
|
||||
];
|
||||
### home-manager
|
||||
home-manager.users.guanranwang = import ./home-manager/darwin; # NOTE: using flakes
|
||||
home-manager.users.guanranwang = import ../../home-manager/darwin/presets/desktop.nix; # NOTE: using flakes
|
||||
}
|
9
users/guanranwang/darwin/presets/gaming.nix
Normal file
9
users/guanranwang/darwin/presets/gaming.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./desktop.nix
|
||||
];
|
||||
### home-manager
|
||||
home-manager.users.guanranwang = import ../../home-manager/darwin/presets/gaming.nix; # NOTE: using flakes
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../common/home.nix
|
||||
./home.nix
|
||||
./dotfiles.nix
|
||||
];
|
||||
}
|
|
@ -66,7 +66,6 @@
|
|||
keka # un-archive-r
|
||||
iterm2
|
||||
### Misc
|
||||
prismlauncher
|
||||
element-desktop
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../../common/home.nix
|
||||
../home.nix
|
||||
../dotfiles.nix
|
||||
];
|
||||
}
|
11
users/guanranwang/home-manager/darwin/presets/gaming.nix
Normal file
11
users/guanranwang/home-manager/darwin/presets/gaming.nix
Normal file
|
@ -0,0 +1,11 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./desktop.nix
|
||||
];
|
||||
|
||||
home.packages = with pkgs; [
|
||||
prismlauncher
|
||||
];
|
||||
}
|
|
@ -1,15 +0,0 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../common/home.nix
|
||||
./home.nix
|
||||
|
||||
./dotfiles.nix
|
||||
./i18n.nix
|
||||
./sway.nix
|
||||
./waybar.nix
|
||||
|
||||
./xdg
|
||||
];
|
||||
}
|
|
@ -106,10 +106,6 @@
|
|||
amberol
|
||||
netease-cloud-music-gtk
|
||||
|
||||
# game
|
||||
steam
|
||||
#lunar-client
|
||||
|
||||
bitwarden
|
||||
#discord
|
||||
#qq
|
||||
|
@ -117,9 +113,7 @@
|
|||
mousai
|
||||
protonup-qt
|
||||
piper
|
||||
prismlauncher
|
||||
telegram-desktop
|
||||
osu-lazer-bin
|
||||
qbittorrent
|
||||
gradience
|
||||
dippi
|
||||
|
@ -283,11 +277,6 @@
|
|||
terminal = "${pkgs.alacritty}/bin/alacritty";
|
||||
};
|
||||
|
||||
mangohud = {
|
||||
enable = true;
|
||||
# TODO: add configuration, i have no idea how to display stuff with nix syntax
|
||||
};
|
||||
|
||||
#boxxy = {
|
||||
# enable = true;
|
||||
# #rules = {
|
||||
|
|
15
users/guanranwang/home-manager/nixos/presets/desktop.nix
Normal file
15
users/guanranwang/home-manager/nixos/presets/desktop.nix
Normal file
|
@ -0,0 +1,15 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../../common/home.nix
|
||||
../home.nix
|
||||
|
||||
../dotfiles.nix
|
||||
../i18n.nix
|
||||
../sway.nix
|
||||
../waybar.nix
|
||||
|
||||
../xdg
|
||||
];
|
||||
}
|
19
users/guanranwang/home-manager/nixos/presets/gaming.nix
Normal file
19
users/guanranwang/home-manager/nixos/presets/gaming.nix
Normal file
|
@ -0,0 +1,19 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./desktop.nix
|
||||
];
|
||||
|
||||
home.packages = with pkgs; [
|
||||
steam
|
||||
#lunar-client
|
||||
prismlauncher
|
||||
osu-lazer-bin
|
||||
];
|
||||
|
||||
programs.mangohud = {
|
||||
enable = true;
|
||||
# TODO: add configuration, i have no idea how to display stuff with nix syntax
|
||||
};
|
||||
}
|
|
@ -14,18 +14,18 @@
|
|||
|
||||
# Flakes
|
||||
imports = [
|
||||
../../flakes/nixos/home-manager.nix
|
||||
../../flakes/nixos/sops-nix.nix
|
||||
../../flakes/nixos/hosts.nix
|
||||
../../flakes/nixos/berberman.nix
|
||||
../../../../flakes/nixos/home-manager.nix
|
||||
../../../../flakes/nixos/sops-nix.nix
|
||||
../../../../flakes/nixos/hosts.nix
|
||||
../../../../flakes/nixos/berberman.nix
|
||||
];
|
||||
### home-manager
|
||||
home-manager.users.guanranwang = import ./home-manager/nixos;
|
||||
home-manager.users.guanranwang = import ../../home-manager/nixos/presets/desktop.nix;
|
||||
### sops-nix
|
||||
nix.extraOptions = "!include ${config.sops.secrets.nix-access-tokens.path}";
|
||||
users.groups."nix-access-tokens" = {};
|
||||
sops = {
|
||||
defaultSopsFile = ./secrets/secrets.yaml;
|
||||
defaultSopsFile = ../../secrets/secrets.yaml;
|
||||
age.sshKeyPaths = [ "/nix/persist/system/etc/ssh/ssh_host_ed25519_key" ];
|
||||
gnupg.sshKeyPaths = [];
|
||||
secrets = {
|
9
users/guanranwang/nixos/presets/gaming.nix
Normal file
9
users/guanranwang/nixos/presets/gaming.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./desktop.nix
|
||||
];
|
||||
|
||||
home-manager.users.guanranwang = import ../../home-manager/nixos/presets/gaming.nix;
|
||||
}
|
Loading…
Reference in a new issue