From 2402a649a54676d848efa00d79fe14b16b8e8875 Mon Sep 17 00:00:00 2001 From: krizej Date: Thu, 1 Aug 2024 23:35:09 +0200 Subject: [PATCH] cleanup + laptop config i guess --- hosts/desktop/default.nix | 10 +++- hosts/laptop/default.nix | 83 ++++++++++++++++++++++++++++ modules/stuff/gaming.nix | 17 +++--- modules/stuff/other-dev-programs.nix | 1 - modules/stuff/printing.nix | 5 -- 5 files changed, 100 insertions(+), 16 deletions(-) diff --git a/hosts/desktop/default.nix b/hosts/desktop/default.nix index 91319f4..6ab3bb8 100644 --- a/hosts/desktop/default.nix +++ b/hosts/desktop/default.nix @@ -64,7 +64,6 @@ git.enable = true; other-desktop-programs.enable = true; other-dev-programs.enable = true; - gaming.enable = true; documentation.enable = true; theme.enable = true; printing.enable = true; @@ -125,6 +124,15 @@ output = monitors.secondary; side = "left"; }; + + gaming = { + enable = true; + quake = true; + homm3 = true; + dosbox = true; + ror2 = true; + steam = true; + }; }; }; }; diff --git a/hosts/laptop/default.nix b/hosts/laptop/default.nix index 7de51bf..6a14f81 100644 --- a/hosts/laptop/default.nix +++ b/hosts/laptop/default.nix @@ -3,4 +3,87 @@ imports = [ ./hardware-configuration.nix ]; + + config = let + monitor = "eDP-1"; + user = config.chuj.system.user; + in { + boot.loader = { + systemd-boot.enable = true; + efi.canTouchEfiVariables = true; + }; + + home-manager.users.${user}.home.packages = with pkgs; [ + pamixer + yt-dlp + aseprite + cloc + viu + ]; + + chuj = { + system = { + user = "krizej"; + host = "laptop"; + platform = "x86_64-linux"; + }; + + home-manager.enable = true; + + stuff = { + xserver.enable = true; + sddm.enable = true; + alacritty.enable = true; + vim.enable = true; + firefox.enable = true; + thunar.enable = true; + flameshot.enable = true; + git.enable = true; + other-desktop-programs.enable = true; + other-dev-programs.enable = true; + documentation.enable = true; + theme.enable = true; + printing.enable = true; + + gaming = { + enable = true; + homm3 = true; + }; + + fish = { + enable = true; + extraAliases = { + "rebuild" = "sudo nixos-rebuild switch --flake ~/nix#laptop -v"; + }; + }; + + i3 = { + enable = true; + communicators = { + autostart = false; + workspace = null; + }; + }; + + ssh = { + enable = true; + keys = { + "git@github.com".file = "github"; + "forgejo@git.jacekpoz.pl".file = "jacekgit"; + "krizej@192.168.1.12".file = "rpi"; + "discord@zasadzka.pl" = { + file = "zasadzka"; + env."TERM" = "xterm-256color"; + }; + }; + }; + + dunst = { + output = monitor; + side = "right"; + enable = true; + }; + }; + }; + }; } \ No newline at end of file diff --git a/modules/stuff/gaming.nix b/modules/stuff/gaming.nix index 63788f8..7506262 100644 --- a/modules/stuff/gaming.nix +++ b/modules/stuff/gaming.nix @@ -3,18 +3,17 @@ cfg = config.chuj.stuff.gaming; user = config.chuj.system.user; in { - options.chuj.stuff.gaming = let - gameOption = mkOption { type = types.bool; default = true; }; - in { + options.chuj.stuff.gaming = { enable = mkEnableOption "gaming"; - quake = gameOption; - homm3 = gameOption; - dosbox = gameOption; - ror2 = gameOption; + quake = mkEnableOption "quake"; + homm3 = mkEnableOption "homm3"; + dosbox = mkEnableOption "dosbox"; + ror2 = mkEnableOption "ror2"; + steam = mkEnableOption "steam"; }; - config = mkIf cfg.enable { - programs.steam.enable = true; + config = { + programs.steam.enable = cfg.steam; home-manager.users.${user}.home.packages = with pkgs; ([ wineWowPackages.stable diff --git a/modules/stuff/other-dev-programs.nix b/modules/stuff/other-dev-programs.nix index 1d56ca7..fb4ea2a 100644 --- a/modules/stuff/other-dev-programs.nix +++ b/modules/stuff/other-dev-programs.nix @@ -5,7 +5,6 @@ in { options.chuj.stuff.other-dev-programs = { enable = mkEnableOption "other-dev-programs"; - }; config = mkIf cfg.enable { diff --git a/modules/stuff/printing.nix b/modules/stuff/printing.nix index 5648094..e7580aa 100644 --- a/modules/stuff/printing.nix +++ b/modules/stuff/printing.nix @@ -11,11 +11,6 @@ in { enable = true; drivers = [ pkgs.brlaser ]; }; - services.avahi = { - enable = true; - nssmdns4 = true; - openFirewall = true; - }; hardware.printers = { ensurePrinters = [ {