mirror of
https://github.com/kittywitch/nixfiles.git
synced 2026-02-09 12:29:19 -08:00
feat: further work moving towards parity
This commit is contained in:
parent
419fcaa79f
commit
dbbac0ae23
10 changed files with 147 additions and 25 deletions
15
nixos/modules/gnome.nix
Normal file
15
nixos/modules/gnome.nix
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
{ config, lib, pkgs, ... }: let
|
||||
inherit (lib.modules) mkIf;
|
||||
in {
|
||||
config = mkIf config.role.gnome {
|
||||
services.xserver = {
|
||||
desktopManager.gnome.enable = true;
|
||||
displayManager.gdm.enable = true;
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs.gnomeExtensions; [
|
||||
dash-to-dock
|
||||
gsconnect
|
||||
];
|
||||
};
|
||||
}
|
||||
14
nixos/modules/home.nix
Normal file
14
nixos/modules/home.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
{ config, tree, machine, ... }: {
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
sharedModules = [
|
||||
tree.home.modules
|
||||
tree.system.modules
|
||||
];
|
||||
extraSpecialArgs = {
|
||||
inherit tree machine;
|
||||
nixos = config;
|
||||
};
|
||||
};
|
||||
}
|
||||
8
nixos/modules/laptop.nix
Normal file
8
nixos/modules/laptop.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{ config, lib, ... }: let
|
||||
inherit (lib.modules) mkIf mkDefault;
|
||||
in {
|
||||
config = mkIf config.role.laptop {
|
||||
powerManagement.cpuFreqGovernor = mkDefault "powersave";
|
||||
programs.light.enable = true;
|
||||
};
|
||||
}
|
||||
7
nixos/modules/personal.nix
Normal file
7
nixos/modules/personal.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{ config, lib, ... }: let
|
||||
inherit (lib.modules) mkIf;
|
||||
in {
|
||||
config = mkIf config.role.personal {
|
||||
services.fstrim.enable = true;
|
||||
};
|
||||
}
|
||||
|
|
@ -1,16 +1,7 @@
|
|||
{ config, lib, ... }: let
|
||||
inherit (lib.options) mkOption mdDoc;
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.attrsets) mapAttrsToList;
|
||||
inherit (lib.types) bool;
|
||||
in {
|
||||
options = {
|
||||
role.server = mkOption {
|
||||
type = bool;
|
||||
description = mdDoc "Is this system's role a server?";
|
||||
default = false;
|
||||
};
|
||||
};
|
||||
config = mkIf config.role.server {
|
||||
# Prevent services from being automatically killed on log-out
|
||||
# https://wiki.archlinux.org/title/systemd/User#Automatic_start-up_of_systemd_user_instances
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue