From 8d7bb62014cc15a30c458fbae521fd86f8fb6e5a Mon Sep 17 00:00:00 2001 From: worble Date: Wed, 12 Feb 2025 21:38:18 +0000 Subject: [PATCH] add nixos hardware for starlite; enable all firmware; add base home manager for common config; add modproobe for tux wifi; add fooyin as fb2k replacement; --- configuration/base.nix | 4 +++ devices/deck/home.nix | 43 ++++---------------------- devices/starlite/home.nix | 22 ++------------ devices/tuxedo/configuration.nix | 4 +++ devices/tuxedo/home.nix | 30 ++----------------- flake.lock | 35 ++++++++++++++++------ flake.nix | 10 ++----- home-manager/base.nix | 48 ++++++++++++++++++++++++++++++ home-manager/development/all.nix | 2 +- home-manager/development/games.nix | 2 +- 10 files changed, 96 insertions(+), 104 deletions(-) create mode 100644 home-manager/base.nix diff --git a/configuration/base.nix b/configuration/base.nix index b9c1728..689aa7a 100644 --- a/configuration/base.nix +++ b/configuration/base.nix @@ -23,6 +23,7 @@ }]; hardware.bluetooth.enable = true; + hardware.enableAllFirmware = true; # networking.hostName = "nixos"; # Define your hostname. # Pick only one of the below networking options. @@ -103,6 +104,9 @@ # Or disable the firewall altogether. # networking.firewall.enable = false; + # Block list + networking.stevenblack.enable = true; + # Copy the NixOS configuration file and link it from the resulting system # (/run/current-system/configuration.nix). This is useful in case you # accidentally delete configuration.nix. diff --git a/devices/deck/home.nix b/devices/deck/home.nix index bfff120..7c57e72 100644 --- a/devices/deck/home.nix +++ b/devices/deck/home.nix @@ -2,44 +2,24 @@ { imports = [ - ../../home-manager/fonts.nix - ../../home-manager/terminal.nix + ../../home-manager/base.nix ../../home-manager/gaming.nix - ../../home-manager/firefox/firefox.nix ../../home-manager/development/vscode.nix ]; terminal.homeUpdateLocation = "/home/deck/Projects/nixos#deck"; terminal.flakeUpdateLocation = "/home/deck/Projects/nixos"; - nixpkgs.config = - { - allowUnfree = true; - }; + nixpkgs.config = { + allowUnfree = true; + }; home.username = "deck"; home.homeDirectory = "/home/deck"; home.stateVersion = "24.05"; - - home.packages = with pkgs;[ - # general - thunderbird - keepassxc - qbittorrent - libreoffice-qt - joplin-desktop - obsidian - - # media - strawberry-qt6 - jellyfin-media-player - - # comms - teamspeak_client - vesktop - ]; + home.packages = with pkgs;[ ]; home.file = { # # Building this configuration will create a copy of 'dotfiles/screenrc' in @@ -53,17 +33,4 @@ # org.gradle.daemon.idletimeout=3600000 # ''; }; - - home.sessionVariables = { - NIXOS_OZONE_WL = "1"; - }; - - services.nextcloud-client = { - enable = true; - startInBackground = true; - }; - - programs = { - home-manager.enable = true; - }; } diff --git a/devices/starlite/home.nix b/devices/starlite/home.nix index ab6b72d..7699ee6 100644 --- a/devices/starlite/home.nix +++ b/devices/starlite/home.nix @@ -2,9 +2,7 @@ { imports = [ - ../../home-manager/fonts.nix - ../../home-manager/terminal.nix - ../../home-manager/firefox/firefox.nix + ../../home-manager/base.nix ../../home-manager/development/vscode.nix ]; @@ -16,23 +14,7 @@ home.stateVersion = "24.05"; - home.packages = with pkgs;[ - # general - thunderbird - keepassxc - qbittorrent - libreoffice-qt - joplin-desktop - obsidian - - # media - strawberry-qt6 - jellyfin-media-player - - # comms - teamspeak_client - vesktop - ]; + home.packages = with pkgs;[ ]; home.file = { # # Building this configuration will create a copy of 'dotfiles/screenrc' in diff --git a/devices/tuxedo/configuration.nix b/devices/tuxedo/configuration.nix index 47bd7e0..8775fdd 100644 --- a/devices/tuxedo/configuration.nix +++ b/devices/tuxedo/configuration.nix @@ -20,6 +20,10 @@ networking.hostName = "tuxedo"; # Define your hostname. + boot.extraModprobeConfig = '' + options iwlwifi 11n_disable=1 + ''; + fileSystems."/mnt/HDD1" = { #device = "/dev/disk/by-uuid/35763dc3-c736-4714-ade7-40bf49ad50dd"; fsType = "ext4"; diff --git a/devices/tuxedo/home.nix b/devices/tuxedo/home.nix index a686946..2532b10 100644 --- a/devices/tuxedo/home.nix +++ b/devices/tuxedo/home.nix @@ -2,9 +2,7 @@ { imports = [ - ../../home-manager/fonts.nix - ../../home-manager/terminal.nix - ../../home-manager/firefox/firefox.nix + ../../home-manager/base.nix ../../home-manager/development/all.nix ../../home-manager/gaming.nix ]; @@ -20,13 +18,8 @@ home.packages = with pkgs;[ # general - thunderbird - keepassxc - qbittorrent gimp-with-plugins - joplin-desktop obsidian - libreoffice-qt # cmd line tools rclone @@ -35,14 +28,12 @@ ffmpeg-full # comms - teamspeak_client - vesktop teams-for-linux # media - strawberry-qt6 jellyfin-media-player haruna + fooyin # misc electrum @@ -62,19 +53,8 @@ # ''; }; - home.sessionVariables = { - NIXOS_OZONE_WL = "1"; - }; - - services.nextcloud-client = { - enable = true; - startInBackground = true; - }; - # Let Home Manager install and manage itself. programs = { - home-manager.enable = true; - firefox = { profiles.work = import ../../home-manager/firefox/firefox-profile.nix // { id = 1; @@ -89,11 +69,6 @@ }; }; - chromium = { - enable = true; - package = pkgs.brave; - }; - # install the shaders from anime4k directory for this to work mpv = { enable = true; @@ -110,7 +85,6 @@ mangohud = { enable = true; - enableSessionWide = true; settings = { preset = 1; }; diff --git a/flake.lock b/flake.lock index a3baef7..d75cd34 100644 --- a/flake.lock +++ b/flake.lock @@ -82,11 +82,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1738892952, - "narHash": "sha256-1mDXsXvUV+PNJHJ51HPtkbGEGwAfZVNmxtWC5OQ64h4=", + "lastModified": 1739238493, + "narHash": "sha256-rk89UVGqLwts2c05TMpigB+zL2mhIYn33YUC69v7dxk=", "owner": "nix-community", "repo": "nix-vscode-extensions", - "rev": "5cbce56ae7ae89025ae7b149f2ee2bc994dd31e9", + "rev": "eca81883cfad1f52a52d09025d10f5907200ea06", "type": "github" }, "original": { @@ -95,6 +95,22 @@ "type": "github" } }, + "nixos-hardware": { + "locked": { + "lastModified": 1738816619, + "narHash": "sha256-5yRlg48XmpcX5b5HesdGMOte+YuCy9rzQkJz+imcu6I=", + "owner": "NixOS", + "repo": "nixos-hardware", + "rev": "2eccff41bab80839b1d25b303b53d339fbb07087", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "master", + "repo": "nixos-hardware", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1713805509, @@ -113,11 +129,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1738824222, - "narHash": "sha256-U3SNq+waitGIotmgg/Et3J7o4NvUtP2gb2VhME5QXiw=", + "lastModified": 1739020877, + "narHash": "sha256-mIvECo/NNdJJ/bXjNqIh8yeoSjVLAuDuTUzAo7dzs8Y=", "owner": "nixos", "repo": "nixpkgs", - "rev": "550e11f27ba790351d390d9eca3b80ad0f0254e7", + "rev": "a79cfe0ebd24952b580b1cf08cd906354996d547", "type": "github" }, "original": { @@ -129,11 +145,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1738843498, - "narHash": "sha256-7x+Q4xgFj9UxZZO9aUDCR8h4vyYut4zPUvfj3i+jBHE=", + "lastModified": 1739206421, + "narHash": "sha256-PwQASeL2cGVmrtQYlrBur0U20Xy07uSWVnFup2PHnDs=", "owner": "nixos", "repo": "nixpkgs", - "rev": "f5a32fa27df91dfc4b762671a0e0a859a8a0058f", + "rev": "44534bc021b85c8d78e465021e21f33b856e2540", "type": "github" }, "original": { @@ -148,6 +164,7 @@ "disko": "disko", "home-manager": "home-manager", "nix-vscode-extensions": "nix-vscode-extensions", + "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs_2", "nixpkgs-unstable": "nixpkgs-unstable" } diff --git a/flake.nix b/flake.nix index e6ef40c..1c35996 100644 --- a/flake.nix +++ b/flake.nix @@ -2,6 +2,7 @@ inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11"; nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; + nixos-hardware.url = "github:NixOS/nixos-hardware/master"; home-manager = { url = "github:nix-community/home-manager/release-24.11"; inputs.nixpkgs.follows = "nixpkgs"; @@ -13,7 +14,7 @@ nix-vscode-extensions.url = "github:nix-community/nix-vscode-extensions"; }; - outputs = { self, nixpkgs, home-manager, ... }@inputs: + outputs = { self, nixpkgs, nixos-hardware, home-manager, ... }@inputs: let system = "x86_64-linux"; pkgs = nixpkgs.legacyPackages.${system}; @@ -28,19 +29,14 @@ nixosConfigurations.starlite = nixpkgs.lib.nixosSystem { specialArgs = { inherit inputs; }; modules = [ + nixos-hardware.nixosModules.starlabs-starlite-i5 ./devices/starlite/configuration.nix ]; }; packages.${system}.homeConfigurations.deck = home-manager.lib.homeManagerConfiguration { inherit pkgs; extraSpecialArgs = { inherit inputs; }; - - # Specify your home configuration modules here, for example, - # the path to your home.nix. modules = [ ./devices/deck/home.nix ]; - - # Optionally use extraSpecialArgs - # to pass through arguments to home.nix }; }; } diff --git a/home-manager/base.nix b/home-manager/base.nix new file mode 100644 index 0000000..5c5e8cd --- /dev/null +++ b/home-manager/base.nix @@ -0,0 +1,48 @@ +{ pkgs, ... }: + +{ + imports = [ + ./fonts.nix + ./terminal.nix + ./firefox/firefox.nix + ]; + + home.packages = with pkgs;[ + # general + thunderbird + keepassxc + qbittorrent + libreoffice-qt + joplin-desktop + + # comms + teamspeak_client + vesktop + ]; + + home.sessionVariables = { + NIXOS_OZONE_WL = "1"; + }; + + services.nextcloud-client = { + enable = true; + startInBackground = true; + }; + + programs = { + home-manager.enable = true; + + chromium = { + enable = true; + package = pkgs.brave; + }; + + mpv = { + enable = true; + config = { + screenshot-directory = "~/Pictures/"; + screenshot-template = "%F/%F_snapshot_%P"; + }; + }; + }; +} diff --git a/home-manager/development/all.nix b/home-manager/development/all.nix index 8ba0c47..7a20034 100644 --- a/home-manager/development/all.nix +++ b/home-manager/development/all.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ ... }: { imports = [ diff --git a/home-manager/development/games.nix b/home-manager/development/games.nix index 1e1b902..4eb832e 100644 --- a/home-manager/development/games.nix +++ b/home-manager/development/games.nix @@ -1,4 +1,4 @@ -{ pkgs, inputs, ... }: +{ pkgs, ... }: { home.packages = with pkgs;[