From c53123d2c51d1b97f8816683afe7aeed7e2b2b83 Mon Sep 17 00:00:00 2001 From: ooks-io Date: Fri, 19 Jan 2024 20:28:53 +1300 Subject: [PATCH] testing the new config before pushing to main --- flake.lock | 95 +++++++++++++++- flake.nix | 4 +- .../ooks/{ookst480s => ooks-t480}/default.nix | 0 hosts/ookst480s/default.nix | 103 ------------------ .../hosts/ooks-desk}/default.nix | 0 .../hosts/ooks-micro}/default.nix | 0 .../ooks-micro}/hardware-configuration.nix | 0 system/hosts/ooks-t480/default.nix | 24 ++++ .../ooks-t480}/hardware-configuration.nix | 0 .../hosts/ooks-x1}/default.nix | 0 .../hosts/ooks-x1}/hardware-configuration.nix | 0 system/modules/bootloader/default.nix | 18 ++- system/modules/bootloader/grub/default.nix | 1 + system/modules/bootloader/systemd/default.nix | 17 +++ system/modules/default.nix | 11 +- system/modules/displayManager/default.nix | 13 +++ .../modules/displayManager/greetd/default.nix | 26 ----- .../displayManager/tuigreet/default.nix | 29 +++++ system/modules/hardware/backlight.nix | 22 ++++ system/modules/hardware/backlight/default.nix | 14 --- system/modules/hardware/bluetooth.nix | 23 ++++ system/modules/hardware/bluetooth/default.nix | 17 --- system/modules/hardware/default.nix | 21 ++++ system/modules/hardware/power.nix | 32 ++++++ .../{locale/default.nix => locale.nix} | 1 + .../default.nix => networking.nix} | 0 system/modules/nix/default.nix | 2 +- .../{pipewire/default.nix => pipewire.nix} | 0 system/modules/programs/default.nix | 13 +++ system/modules/programs/gnomeServices.nix | 18 +++ .../{security/default.nix => security.nix} | 2 +- system/modules/user/ooks.nix | 5 +- .../default.nix => virtualisation.nix} | 0 system/profiles/base/default.nix | 34 +++++- system/profiles/default.nix | 8 +- system/profiles/gaming/default.nix | 2 +- system/profiles/laptop/default.nix | 11 +- system/profiles/nvidia/default.nix | 2 +- 38 files changed, 370 insertions(+), 198 deletions(-) rename home/user/ooks/{ookst480s => ooks-t480}/default.nix (100%) delete mode 100644 hosts/ookst480s/default.nix rename {hosts/ooksdesk => system/hosts/ooks-desk}/default.nix (100%) rename {hosts/ooksmicro => system/hosts/ooks-micro}/default.nix (100%) rename {hosts/ooksmicro => system/hosts/ooks-micro}/hardware-configuration.nix (100%) create mode 100644 system/hosts/ooks-t480/default.nix rename {hosts/ookst480s => system/hosts/ooks-t480}/hardware-configuration.nix (100%) rename {hosts/ooksx1 => system/hosts/ooks-x1}/default.nix (100%) rename {hosts/ooksx1 => system/hosts/ooks-x1}/hardware-configuration.nix (100%) create mode 100644 system/modules/bootloader/grub/default.nix create mode 100644 system/modules/bootloader/systemd/default.nix create mode 100644 system/modules/displayManager/default.nix delete mode 100644 system/modules/displayManager/greetd/default.nix create mode 100644 system/modules/displayManager/tuigreet/default.nix create mode 100644 system/modules/hardware/backlight.nix delete mode 100644 system/modules/hardware/backlight/default.nix create mode 100644 system/modules/hardware/bluetooth.nix delete mode 100644 system/modules/hardware/bluetooth/default.nix create mode 100644 system/modules/hardware/default.nix create mode 100644 system/modules/hardware/power.nix rename system/modules/{locale/default.nix => locale.nix} (90%) rename system/modules/{networking/default.nix => networking.nix} (100%) rename system/modules/{pipewire/default.nix => pipewire.nix} (100%) create mode 100644 system/modules/programs/default.nix create mode 100644 system/modules/programs/gnomeServices.nix rename system/modules/{security/default.nix => security.nix} (99%) rename system/modules/{virtulization/default.nix => virtualisation.nix} (100%) diff --git a/flake.lock b/flake.lock index 70b62cf..1bf2020 100644 --- a/flake.lock +++ b/flake.lock @@ -60,6 +60,24 @@ "type": "gitlab" } }, + "flake-parts": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib_2" + }, + "locked": { + "lastModified": 1704982712, + "narHash": "sha256-2Ptt+9h8dczgle2Oo6z5ni5rt/uLMG47UFTR1ry/wgg=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "07f6395285469419cf9d078f59b5b49993198c00", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, "flake-utils": { "locked": { "lastModified": 1629284811, @@ -299,6 +317,26 @@ "type": "github" } }, + "nh": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1705251288, + "narHash": "sha256-TwCR7tZvrjsvz6SmgjWYOne7Qz7J2jn4Cr4Er0Yj+LA=", + "owner": "viperML", + "repo": "nh", + "rev": "36eba281576afe0f67e5aafb4e7a414f256dba31", + "type": "github" + }, + "original": { + "owner": "viperML", + "repo": "nh", + "type": "github" + } + }, "nix-colors": { "inputs": { "base16-schemes": "base16-schemes", @@ -318,6 +356,25 @@ "type": "github" } }, + "nix-gaming": { + "inputs": { + "flake-parts": "flake-parts", + "nixpkgs": "nixpkgs_3" + }, + "locked": { + "lastModified": 1705540761, + "narHash": "sha256-Bj5XUG194u0AC0KL4d+nmX3Xuz56u0PVzTFYYHdqh7o=", + "owner": "fufexan", + "repo": "nix-gaming", + "rev": "184c9a3f7c289f12d2732bcd6b24f0967f4a380f", + "type": "github" + }, + "original": { + "owner": "fufexan", + "repo": "nix-gaming", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1702645756, @@ -349,6 +406,24 @@ "type": "github" } }, + "nixpkgs-lib_2": { + "locked": { + "dir": "lib", + "lastModified": 1703961334, + "narHash": "sha256-M1mV/Cq+pgjk0rt6VxoyyD+O8cOUiai8t9Q6Yyq4noY=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "b0d36bd0a420ecee3bc916c91886caca87c894e9", + "type": "github" + }, + "original": { + "dir": "lib", + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "nixpkgs_2": { "locked": { "lastModified": 1703637592, @@ -366,6 +441,22 @@ } }, "nixpkgs_3": { + "locked": { + "lastModified": 1704842529, + "narHash": "sha256-OTeQA+F8d/Evad33JMfuXC89VMetQbsU4qcaePchGr4=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "eabe8d3eface69f5bb16c18f8662a702f50c20d5", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_4": { "locked": { "lastModified": 1705133751, "narHash": "sha256-rCIsyE80jgiOU78gCWN3A0wE0tR2GI5nH6MlS+HaaSQ=", @@ -391,8 +482,10 @@ "hyprland-plugins": "hyprland-plugins", "hyprpaper": "hyprpaper", "hyprwm-contrib": "hyprwm-contrib", + "nh": "nh", "nix-colors": "nix-colors", - "nixpkgs": "nixpkgs_3" + "nix-gaming": "nix-gaming", + "nixpkgs": "nixpkgs_4" } }, "rust-overlay": { diff --git a/flake.nix b/flake.nix index dfe58d1..84cc51c 100644 --- a/flake.nix +++ b/flake.nix @@ -71,8 +71,8 @@ nixosConfigurations = { # T480s - ookst480s = lib.nixosSystem { - modules = [ ./hosts/ookst480s ]; + ooks-t480 = lib.nixosSystem { + modules = [ ./system/hosts/ooks-t480 ]; specialArgs = { inherit inputs outputs; }; }; }; diff --git a/home/user/ooks/ookst480s/default.nix b/home/user/ooks/ooks-t480/default.nix similarity index 100% rename from home/user/ooks/ookst480s/default.nix rename to home/user/ooks/ooks-t480/default.nix diff --git a/hosts/ookst480s/default.nix b/hosts/ookst480s/default.nix deleted file mode 100644 index 386eac5..0000000 --- a/hosts/ookst480s/default.nix +++ /dev/null @@ -1,103 +0,0 @@ - - - - -{ config, inputs, pkgs, ... }: - -# Imports -# ------------------------------------------------------------------------------------------------- - -{ - imports = [ - inputs.hardware.nixosModules.lenovo-thinkpad-t480s - - ./hardware-configuration.nix - - ../common/user/ooks - ../common/base - ../common/features/bluetooth.nix - ../common/features/vm.nix - ../common/features/greetd.nix - - ]; - -# Hostname and networking -# ------------------------------------------------------------------------------------------------- - - networking = { - hostName = "ookst480s"; - }; - - -# Printing -# ------------------------------------------------------------------------------------------------- - - services.printing.enable = true; - -# Kernel -# ------------------------------------------------------------------------------------------------ - - boot = { - kernelPackages = pkgs.linuxKernel.packages.linux_zen; - }; - - -# Laptop Programs -# ------------------------------------------------------------------------------------------------- - - powerManagement.powertop.enable = true; - programs = { - light.enable = true; - dconf.enable = true; - kdeconnect.enable = true; - }; - - - hardware = { - opengl = { - enable = true; - }; - }; - -# gnupg -# ------------------------------------------------------------------------------------------------- - - programs.gnupg.agent = { - enable = true; - enableSSHSupport = true; - }; - -# Services -# ------------------------------------------------------------------------------------------------- - - services = { - logind = { - lidSwitch = "suspend"; - }; - dbus = { - enable = true; - packages = [ pkgs.gcr ]; - }; - auto-cpufreq = { - enable = true; - settings = { - battery = { - governor = "powersave"; - turbo = "never"; - }; - charger = { - governor = "performance"; - turbo = "auto"; - }; - }; - }; - }; - - -# System Version -# ------------------------------------------------------------------------------------------------- - - system = { - stateVersion = "22.05"; - }; -} diff --git a/hosts/ooksdesk/default.nix b/system/hosts/ooks-desk/default.nix similarity index 100% rename from hosts/ooksdesk/default.nix rename to system/hosts/ooks-desk/default.nix diff --git a/hosts/ooksmicro/default.nix b/system/hosts/ooks-micro/default.nix similarity index 100% rename from hosts/ooksmicro/default.nix rename to system/hosts/ooks-micro/default.nix diff --git a/hosts/ooksmicro/hardware-configuration.nix b/system/hosts/ooks-micro/hardware-configuration.nix similarity index 100% rename from hosts/ooksmicro/hardware-configuration.nix rename to system/hosts/ooks-micro/hardware-configuration.nix diff --git a/system/hosts/ooks-t480/default.nix b/system/hosts/ooks-t480/default.nix new file mode 100644 index 0000000..3d8ebfd --- /dev/null +++ b/system/hosts/ooks-t480/default.nix @@ -0,0 +1,24 @@ +{ config, inputs, pkgs, ... }: + +{ + imports = [ + inputs.hardware.nixosModules.lenovo-thinkpad-t480s + ./hardware-configuration.nix + ../../profiles + # ../../modules + ]; + + activeProfiles = ["base" "laptop"]; + + systemModules.user = { + ooks.enable = true; + shell.fish.enable = true; + }; + + networking = { + hostName = "ooks-t480"; + }; + boot = { + kernelPackages = pkgs.linuxKernel.packages.linux_zen; + }; +} diff --git a/hosts/ookst480s/hardware-configuration.nix b/system/hosts/ooks-t480/hardware-configuration.nix similarity index 100% rename from hosts/ookst480s/hardware-configuration.nix rename to system/hosts/ooks-t480/hardware-configuration.nix diff --git a/hosts/ooksx1/default.nix b/system/hosts/ooks-x1/default.nix similarity index 100% rename from hosts/ooksx1/default.nix rename to system/hosts/ooks-x1/default.nix diff --git a/hosts/ooksx1/hardware-configuration.nix b/system/hosts/ooks-x1/hardware-configuration.nix similarity index 100% rename from hosts/ooksx1/hardware-configuration.nix rename to system/hosts/ooks-x1/hardware-configuration.nix diff --git a/system/modules/bootloader/default.nix b/system/modules/bootloader/default.nix index 00d7bf7..89782ff 100644 --- a/system/modules/bootloader/default.nix +++ b/system/modules/bootloader/default.nix @@ -1,17 +1,13 @@ -{ lib, config, ... }: - -let - cfg = config.systemModules.bootloader; -in +{ lib, ... }: { - config = lib.mkIf cfg.enable { - boot.loader = { - systemd-boot = { - enable = true; - consoleMode = "max"; + imports = [ ./systemd ]; + + options.systemModules = { + bootloader = { + systemd = { + enable = lib.mkEnableOption "Enable systemd bootloader module"; }; - efi.canTouchEfiVariables = true; }; }; } diff --git a/system/modules/bootloader/grub/default.nix b/system/modules/bootloader/grub/default.nix new file mode 100644 index 0000000..3537c62 --- /dev/null +++ b/system/modules/bootloader/grub/default.nix @@ -0,0 +1 @@ +## to be implemented diff --git a/system/modules/bootloader/systemd/default.nix b/system/modules/bootloader/systemd/default.nix new file mode 100644 index 0000000..fd8c1f4 --- /dev/null +++ b/system/modules/bootloader/systemd/default.nix @@ -0,0 +1,17 @@ +{ lib, config, ... }: + +let + cfg = config.systemModules.bootloader.systemd; +in + +{ + config = lib.mkIf cfg.enable { + boot.loader = { + systemd-boot = { + enable = true; + consoleMode = "max"; + }; + efi.canTouchEfiVariables = true; + }; + }; +} diff --git a/system/modules/default.nix b/system/modules/default.nix index 1638bcd..27bb1a2 100644 --- a/system/modules/default.nix +++ b/system/modules/default.nix @@ -3,10 +3,16 @@ { imports = [ ./hardware - ./networking + ./bootloader ./nix ./programs ./user + ./displayManager + ./networking.nix + ./locale.nix + ./virtualisation.nix + ./pipewire.nix + ./security.nix ]; @@ -14,9 +20,6 @@ security = { enable = lib.mkEnableOption "Enable security module"; }; - bootloader = { - enable = lib.mkEnableOption "Enable systemd bootloader module"; - }; pipewire = { enable = lib.mkEnableOption "Enable pipewire module"; }; diff --git a/system/modules/displayManager/default.nix b/system/modules/displayManager/default.nix new file mode 100644 index 0000000..3a24802 --- /dev/null +++ b/system/modules/displayManager/default.nix @@ -0,0 +1,13 @@ +{ lib, ... }: + +{ + imports = [ + ./tuigreet + ]; + + options.systemModules.displayManager = { + tuigreet = { + enable = lib.mkEnableOption "Enable tuigreet display manager module"; + }; + }; +} diff --git a/system/modules/displayManager/greetd/default.nix b/system/modules/displayManager/greetd/default.nix deleted file mode 100644 index 3821be9..0000000 --- a/system/modules/displayManager/greetd/default.nix +++ /dev/null @@ -1,26 +0,0 @@ -{ pkgs, ... }: -let - tuigreet = "${pkgs.greetd.tuigreet}/bin/tuigreet"; -in -{ - services.greetd = { - enable = true; - settings = { - default_session = { - command = "${tuigreet} --time --remember --cmd Hyprland"; - user = "greeter"; - }; - }; - }; - - systemd.services.greetd.serviceConfig = { - Type = "idle"; - StandardInput = "tty"; - StandardOutput = "tty"; - StandardError = "journal"; # Without this errors will spam on screen - # Without these bootlogs will spam on screen - TTYReset = true; - TTYVHangup = true; - TTYVTDisallocate = true; - }; -} diff --git a/system/modules/displayManager/tuigreet/default.nix b/system/modules/displayManager/tuigreet/default.nix new file mode 100644 index 0000000..e41b627 --- /dev/null +++ b/system/modules/displayManager/tuigreet/default.nix @@ -0,0 +1,29 @@ +{ pkgs, lib, config, ... }: +let + tuigreet = "${pkgs.greetd.tuigreet}/bin/tuigreet"; + cfg = config.systemModules.displayManager.tuigreet; +in +{ + config = lib.mkIf cfg.enable { + services.greetd = { + enable = true; + settings = { + default_session = { + command = "${tuigreet} --time --remember --cmd Hyprland"; + user = "greeter"; + }; + }; + }; + + systemd.services.greetd.serviceConfig = { + Type = "idle"; + StandardInput = "tty"; + StandardOutput = "tty"; + StandardError = "journal"; # Without this errors will spam on screen + # Without these bootlogs will spam on screen + TTYReset = true; + TTYVHangup = true; + TTYVTDisallocate = true; + }; + }; +} diff --git a/system/modules/hardware/backlight.nix b/system/modules/hardware/backlight.nix new file mode 100644 index 0000000..8e4753e --- /dev/null +++ b/system/modules/hardware/backlight.nix @@ -0,0 +1,22 @@ +{ lib, config, ... }: + +let + cfg = config.systemModules.hardware.backlight; +in + +{ + config = lib.mkIf cfg.enable { + hardware.brillo.enable = true; + services.clight = { + enable = true; + settings = { + verbose = true; + backlight.disabled = true; + dpms.timeouts = [900 300]; + dimmer.timeouts = [870 270]; + gamma.long_transition = true; + screen.disabled = true; + }; + }; + }; +} diff --git a/system/modules/hardware/backlight/default.nix b/system/modules/hardware/backlight/default.nix deleted file mode 100644 index 7fed314..0000000 --- a/system/modules/hardware/backlight/default.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ - hardware.brillo.enable = true; - services.clight = { - enable = true; - settings = { - verbose = true; - backlight.disabled = true; - dpms.timeouts = [900 300]; - dimmer.timeouts = [870 270]; - gamma.long_transition = true; - screen.disabled = true; - }; - }; -} diff --git a/system/modules/hardware/bluetooth.nix b/system/modules/hardware/bluetooth.nix new file mode 100644 index 0000000..6a6d4c6 --- /dev/null +++ b/system/modules/hardware/bluetooth.nix @@ -0,0 +1,23 @@ +{ config, lib, pkgs, ... }: + +let + cfg = config.systemModules.hardware.bluetooth; +in + +{ + config = lib.mkIf cfg.enable { + hardware.bluetooth = { + enable = true; + package = pkgs.bluez5-experimental; + }; + + environment.systemPackages = with pkgs; [ + galaxy-buds-client + live-buds-cli + bluetuith + ]; + + # https://github.com/NixOS/nixpkgs/issues/114222 + systemd.user.services.telephony_client.enable = false; + }; +} diff --git a/system/modules/hardware/bluetooth/default.nix b/system/modules/hardware/bluetooth/default.nix deleted file mode 100644 index 503f38e..0000000 --- a/system/modules/hardware/bluetooth/default.nix +++ /dev/null @@ -1,17 +0,0 @@ -{ config, lib, pkgs, ... }: - -{ - hardware.bluetooth = { - enable = true; - package = pkgs.bluez5-experimental; - }; - - environment.systemPackages = with pkgs; [ - galaxy-buds-client - live-buds-cli - bluetuith - ]; - - # https://github.com/NixOS/nixpkgs/issues/114222 - systemd.user.services.telephony_client.enable = false; -} diff --git a/system/modules/hardware/default.nix b/system/modules/hardware/default.nix new file mode 100644 index 0000000..e6b4b77 --- /dev/null +++ b/system/modules/hardware/default.nix @@ -0,0 +1,21 @@ +{ lib, ... }: + +{ + imports = [ + ./bluetooth.nix + ./backlight.nix + ./power.nix + ]; + + options.systemModules.hardware = { + bluetooth = { + enable = lib.mkEnableOption "Enable bluetooth module"; + }; + backlight= { + enable = lib.mkEnableOption "Enable backlight module"; + }; + power = { + enable = lib.mkEnableOption "Enable power module"; + }; + }; +} diff --git a/system/modules/hardware/power.nix b/system/modules/hardware/power.nix new file mode 100644 index 0000000..a944147 --- /dev/null +++ b/system/modules/hardware/power.nix @@ -0,0 +1,32 @@ + +{ lib, config, ... }: + +let + cfg = config.systemModules.hardware.power; +in + +{ + config = lib.mkIf cfg.enable { + services.system76-scheduler.settings.cfsProfiles.enable = true; + + services.tlp = { + enable = true; + settings = { + cpu_boost_on_ac = 1; + cpu_boost_on_bat = 0; + cpu_scaling_governor_on_ac = "performance"; + cpu_scaling_governor_on_bat = "powersave"; + }; + }; + + services = { + upower.enable = true; + thermald.enable = true; + power-profiles-daemon.enable = false; + logind = { + lidSwitch = "suspend"; + }; + }; + powerManagement.powertop.enable = true; + }; +} diff --git a/system/modules/locale/default.nix b/system/modules/locale.nix similarity index 90% rename from system/modules/locale/default.nix rename to system/modules/locale.nix index 3c20c6b..f2426fe 100644 --- a/system/modules/locale/default.nix +++ b/system/modules/locale.nix @@ -13,6 +13,7 @@ in ]; }; time.timeZone = lib.mkDefault "Pacific/Auckland"; + location.provider = "geoclue2"; services.geoclue2.enable = true; }; } diff --git a/system/modules/networking/default.nix b/system/modules/networking.nix similarity index 100% rename from system/modules/networking/default.nix rename to system/modules/networking.nix diff --git a/system/modules/nix/default.nix b/system/modules/nix/default.nix index 967d12e..f43c52b 100644 --- a/system/modules/nix/default.nix +++ b/system/modules/nix/default.nix @@ -4,7 +4,7 @@ imports = [ ./nh.nix ./nix.nix - ./nixpkgs + ./nixpkgs.nix ./subs.nix ]; diff --git a/system/modules/pipewire/default.nix b/system/modules/pipewire.nix similarity index 100% rename from system/modules/pipewire/default.nix rename to system/modules/pipewire.nix diff --git a/system/modules/programs/default.nix b/system/modules/programs/default.nix new file mode 100644 index 0000000..1f85e28 --- /dev/null +++ b/system/modules/programs/default.nix @@ -0,0 +1,13 @@ +{ lib, ... }: + +{ + imports = [ + ./gnomeServices.nix + ]; + + options.systemModules.programs = { + gnomeServices = { + enable = lib.mkEnableOption "Enable gnome services module"; + }; + }; +} diff --git a/system/modules/programs/gnomeServices.nix b/system/modules/programs/gnomeServices.nix new file mode 100644 index 0000000..aded2f7 --- /dev/null +++ b/system/modules/programs/gnomeServices.nix @@ -0,0 +1,18 @@ +{ config, lib, pkgs, ... }: + +let + cfg = config.systemModules.programs.gnomeServices; +in + +{ + config = lib.mkIf cfg.enable { + services = { + dbus.packages = with pkgs; [ + gcr + gnome.gnome-settings-daemon + ]; + gnome.gnome-keyring.enable = true; + gvfs.enable = true; + }; + }; +} diff --git a/system/modules/security/default.nix b/system/modules/security.nix similarity index 99% rename from system/modules/security/default.nix rename to system/modules/security.nix index a08fb24..adce573 100644 --- a/system/modules/security/default.nix +++ b/system/modules/security.nix @@ -33,8 +33,8 @@ in enable = true; wheelNeedsPassword = false; }; + rtkit.enable = true; }; - rtkit.enable = true; # security tweaks borrowed from @hlissner boot.kernel.sysctl = { diff --git a/system/modules/user/ooks.nix b/system/modules/user/ooks.nix index 05db729..1aca7b8 100644 --- a/system/modules/user/ooks.nix +++ b/system/modules/user/ooks.nix @@ -2,7 +2,7 @@ let ifTheyExist = groups: builtins.filter (group: builtins.hasAttr group config.users.groups) groups; - cfg = config.systemModule.user.ooks; + cfg = config.systemModules.user.ooks; in { @@ -22,7 +22,6 @@ in packages = [ pkgs.home-manager ]; }; - - home-manager.users.ooks = import ../../../../home/user/ooks/${config.networking.hostName}; + home-manager.users.ooks = import ../../../home/user/ooks/${config.networking.hostName}; }; } diff --git a/system/modules/virtulization/default.nix b/system/modules/virtualisation.nix similarity index 100% rename from system/modules/virtulization/default.nix rename to system/modules/virtualisation.nix diff --git a/system/profiles/base/default.nix b/system/profiles/base/default.nix index 4ca9c18..6cd6c37 100644 --- a/system/profiles/base/default.nix +++ b/system/profiles/base/default.nix @@ -7,22 +7,48 @@ in { imports = [ - ../modules + ../../modules inputs.home-manager.nixosModules.home-manager ]; config = lib.mkIf cfg.enable { - environment.systemPackages = [pkgs.git]; - environment.enableAllTerminfo = true; systemModules = { security.enable = true; nixOptions.enable = true; pipewire.enable = true; networking.enable = true; locale.enable = true; + bootloader.systemd.enable = true; + programs.gnomeServices.enable = true; + displayManager.tuigreet.enable = true; + }; + + environment.systemPackages = [pkgs.git]; + environment.enableAllTerminfo = true; + + services = { + dbus.enable = true; # Need this for gtk + printing.enable = true; # Do I even print? + udisks2 = { # Used to manage mount of temp storage + enable = true; + mountOnMedia = true; # Auto mounts device to /media + }; + }; + + boot.supportedFilesystems = ["ntfs"]; # For when someone hands me a usb + + programs = { + dconf.enable = true; + kdeconnect.enable = true; }; home-manager.extraSpecialArgs = { inherit inputs outputs; }; - hardware.enableAllFirmware = true; + + hardware = { + enableAllFirmware = true; + opengl.enable = true; + }; + + system.stateVersion = lib.mkDefault "23.11"; }; } diff --git a/system/profiles/default.nix b/system/profiles/default.nix index eb87a7d..49631c3 100644 --- a/system/profiles/default.nix +++ b/system/profiles/default.nix @@ -10,8 +10,8 @@ in imports = [ ./base ./nvidia - #./gaming - #./laptop + ./gaming + ./laptop ]; options = { @@ -20,7 +20,7 @@ in default = []; }; - systemProfiles = { + systemProfile = { base = { enable = lib.mkEnableOption "Enable the base profile"; }; @@ -36,5 +36,5 @@ in }; }; - config.profiles = profileEnabler; + config.systemProfile = profileEnabler; } diff --git a/system/profiles/gaming/default.nix b/system/profiles/gaming/default.nix index d03cdd8..04a218d 100644 --- a/system/profiles/gaming/default.nix +++ b/system/profiles/gaming/default.nix @@ -15,7 +15,7 @@ in steam.enable = true; gamescope = { enable = true; - capsSysNice = true; + capSysNice = true; }; gamemode = { enable = true; diff --git a/system/profiles/laptop/default.nix b/system/profiles/laptop/default.nix index 11881df..a292846 100644 --- a/system/profiles/laptop/default.nix +++ b/system/profiles/laptop/default.nix @@ -1,16 +1,17 @@ { config, lib, ... }: let - cfg = config.system.profile.laptop; + cfg = config.systemProfile.laptop; in { imports = [ - ../modules + ../../modules ]; - config = cfg.enable { - system = { + + config = lib.mkIf cfg.enable { + systemModules = { hardware = { bluetooth.enable = true; - powerSettings.enable = true + power.enable = true; backlight.enable = true; }; }; diff --git a/system/profiles/nvidia/default.nix b/system/profiles/nvidia/default.nix index 960ea38..c96fa84 100644 --- a/system/profiles/nvidia/default.nix +++ b/system/profiles/nvidia/default.nix @@ -7,7 +7,7 @@ in { config = lib.mkIf cfg.enable { - harware.nvidia = { + hardware.nvidia = { open = true; package = production; modesetting.enable = true;