From 2e37bf1533ace5b2d4d50196300133d9e72d2952 Mon Sep 17 00:00:00 2001 From: Jakub Stachurski Date: Sat, 29 Mar 2025 23:09:38 +0100 Subject: flakes update feat. xfce --- home-manager/electron_overlay.nix | 25 -- home-manager/flake.lock | 117 ++++++++ home-manager/flake.nix | 59 ++++ home-manager/fmod/default.nix | 29 -- home-manager/home.nix | 218 -------------- home-manager/home/default.nix | 17 ++ home-manager/home/session_vars.nix | 15 + home-manager/home/theming.nix | 43 +++ home-manager/hyprland.nix | 236 ---------------- home-manager/kitty.nix | 0 home-manager/modules/apps/default.nix | 54 ++++ home-manager/modules/apps/desktop/default.nix | 3 + home-manager/modules/apps/desktop/hyprland.nix | 241 ++++++++++++++++ home-manager/modules/apps/nvim/default.nix | 4 + home-manager/modules/apps/zsh.nix | 24 ++ home-manager/modules/default.nix | 8 + home-manager/modules/services/default.nix | 3 + home-manager/modules/services/syncthing.nix | 11 + home-manager/neovim.nix | 94 ------ home-manager/syncthing.nix | 11 - home-manager/theming.nix | 42 --- home-manager/xdg.nix | 9 - nixos/GrubBG.png | Bin 4109858 -> 0 bytes nixos/common/default.nix | 67 +++++ nixos/common/services.nix | 2 + nixos/configuration.nix | 314 --------------------- nixos/desktop/apps.nix | 8 + nixos/desktop/default.nix | 54 ++++ nixos/desktop/hyprland.nix | 44 +++ nixos/desktop/xfce.nix | 26 ++ nixos/flake.lock | 49 ++++ nixos/flake.nix | 36 +++ nixos/hardware-configuration.nix | 156 ---------- nixos/home-manager.nix | 4 - nixos/hosts/crank-vm/default.nix | 20 ++ nixos/hosts/crank-vm/hardware-configuration.nix | 65 +++++ nixos/hosts/icetea-dispenser/GrubBG.png | Bin 0 -> 4109858 bytes nixos/hosts/icetea-dispenser/default.nix | 40 +++ .../icetea-dispenser/hardware-configuration.nix | 156 ++++++++++ nixos/services.nix | 3 - result | 1 + 41 files changed, 1167 insertions(+), 1141 deletions(-) delete mode 100644 home-manager/electron_overlay.nix create mode 100644 home-manager/flake.lock create mode 100644 home-manager/flake.nix delete mode 100644 home-manager/fmod/default.nix delete mode 100644 home-manager/home.nix create mode 100644 home-manager/home/default.nix create mode 100644 home-manager/home/session_vars.nix create mode 100644 home-manager/home/theming.nix delete mode 100644 home-manager/hyprland.nix delete mode 100644 home-manager/kitty.nix create mode 100644 home-manager/modules/apps/default.nix create mode 100644 home-manager/modules/apps/desktop/default.nix create mode 100644 home-manager/modules/apps/desktop/hyprland.nix create mode 100644 home-manager/modules/apps/nvim/default.nix create mode 100644 home-manager/modules/apps/zsh.nix create mode 100644 home-manager/modules/default.nix create mode 100644 home-manager/modules/services/default.nix create mode 100644 home-manager/modules/services/syncthing.nix delete mode 100644 home-manager/neovim.nix delete mode 100644 home-manager/syncthing.nix delete mode 100644 home-manager/theming.nix delete mode 100644 home-manager/xdg.nix delete mode 100644 nixos/GrubBG.png create mode 100644 nixos/common/default.nix create mode 100644 nixos/common/services.nix delete mode 100644 nixos/configuration.nix create mode 100644 nixos/desktop/apps.nix create mode 100644 nixos/desktop/default.nix create mode 100644 nixos/desktop/hyprland.nix create mode 100644 nixos/desktop/xfce.nix create mode 100644 nixos/flake.lock create mode 100644 nixos/flake.nix delete mode 100644 nixos/hardware-configuration.nix delete mode 100644 nixos/home-manager.nix create mode 100644 nixos/hosts/crank-vm/default.nix create mode 100644 nixos/hosts/crank-vm/hardware-configuration.nix create mode 100644 nixos/hosts/icetea-dispenser/GrubBG.png create mode 100644 nixos/hosts/icetea-dispenser/default.nix create mode 100644 nixos/hosts/icetea-dispenser/hardware-configuration.nix delete mode 100644 nixos/services.nix create mode 120000 result diff --git a/home-manager/electron_overlay.nix b/home-manager/electron_overlay.nix deleted file mode 100644 index d91eba0..0000000 --- a/home-manager/electron_overlay.nix +++ /dev/null @@ -1,25 +0,0 @@ -self: -let - enableWayland = drv: bin: drv.overrideAttrs ( - old: { - nativeBuildInputs = (old.nativeBuildInputs or []) ++ [ self.makeWrapper ]; - postFixup = (old.postFixup or "") + '' - wrapProgram $out/bin/${bin} \ - --add-flags "--enable-features=UseOzonePlatform" \ - --add-flags "--ozone-platform=wayland" - ''; - } - ); -in -super: - { - # slack = enableWayland super.slack "slack"; - discord = enableWayland super.discord "discord"; - vencord = enableWayland super.vesktop "vesktop"; - # vscode = enableWayland super.vscode "code"; - # google-chrome-beta = ( - # super.google-chrome-beta.override { - # commandLineArgs = "--enable-features=UseOzonePlatform --ozone-platform=wayland"; - # } - # ); - } diff --git a/home-manager/flake.lock b/home-manager/flake.lock new file mode 100644 index 0000000..0f1ec4d --- /dev/null +++ b/home-manager/flake.lock @@ -0,0 +1,117 @@ +{ + "nodes": { + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "home-manager": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1742655702, + "narHash": "sha256-jbqlw4sPArFtNtA1s3kLg7/A4fzP4GLk9bGbtUJg0JQ=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "0948aeedc296f964140d9429223c7e4a0702a1ff", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "release-24.11", + "repo": "home-manager", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1742751704, + "narHash": "sha256-rBfc+H1dDBUQ2mgVITMGBPI1PGuCznf9rcWX/XIULyE=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "f0946fa5f1fb876a9dc2e1850d9d3a4e3f914092", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-24.11", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-stable": { + "locked": { + "lastModified": 1742751704, + "narHash": "sha256-rBfc+H1dDBUQ2mgVITMGBPI1PGuCznf9rcWX/XIULyE=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "f0946fa5f1fb876a9dc2e1850d9d3a4e3f914092", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-24.11", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-unstable": { + "locked": { + "lastModified": 1742889210, + "narHash": "sha256-hw63HnwnqU3ZQfsMclLhMvOezpM7RSB0dMAtD5/sOiw=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "698214a32beb4f4c8e3942372c694f40848b360d", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "home-manager": "home-manager", + "nixpkgs": "nixpkgs", + "nixpkgs-stable": "nixpkgs-stable", + "nixpkgs-unstable": "nixpkgs-unstable" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/home-manager/flake.nix b/home-manager/flake.nix new file mode 100644 index 0000000..f68b20f --- /dev/null +++ b/home-manager/flake.nix @@ -0,0 +1,59 @@ +{ + description = "Home-manager configuration"; + + nixConfig = { + experimental-feature = ["nix-command" "flakes"]; + }; + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11"; + nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-24.11"; + nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable"; + flake-utils.url = "github:numtide/flake-utils"; + home-manager = { + url = "github:nix-community/home-manager/release-24.11"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + }; + + + + outputs = {self, nixpkgs, nixpkgs-stable, nixpkgs-unstable, flake-utils, home-manager, ... }@inputs: + let + inherit (self) outputs; + + pkgsForSystem = system: nixpkgsSource: import nixpkgsSource { + inherit system; + }; + HomeConfiguration = args: + let + nixpkgs = args.nixpkgs or nixpkgs-stable; + in + home-manager.lib.homeManagerConfiguration { + modules = [ + (import ./home ) + (import ./modules ) + ]; + extraSpecialArgs = { + inherit (args) nixpkgs; + } // args.extraSpecialArgs; + pkgs = pkgsForSystem (args.system or "x86_64-linux") nixpkgs; + }; + + + in flake-utils.lib.eachSystem [ + "x86_64-linux" + ] (system: { + legacyPackages = pkgsForSystem system nixpkgs; + }) // { + # overlays = import ./overlays {inherit inputs;}; + homeConfigurations = { + "wilkuu" = HomeConfiguration { + extraSpecialArgs = { + }; + + }; + }; + inherit home-manager; + inherit (home-manager) packages; + }; +} diff --git a/home-manager/fmod/default.nix b/home-manager/fmod/default.nix deleted file mode 100644 index 1c9e942..0000000 --- a/home-manager/fmod/default.nix +++ /dev/null @@ -1,29 +0,0 @@ -{stdenv, fetchurl }: - -stdenv.mkDerivation { - name = "fmod-42204"; - src = if (stdenv.system == "i686-linux") then - fetchurl { - url = "http://www.fmod.org/index.php/release/version/fmodapi42204linux.tar.gz"; - sha256 = "64eedc5b37c597eb925de446106d75cab0b5a79697d5ec048d34702812c08563"; - } else if (stdenv.system == "x86_64-linux") then - fetchurl { - url = "http://www.fmod.org/index.php/release/version/fmodapi42204linux64.tar.gz"; - sha256 = "3f2eec8265838a1005febe07c4971660e85010e4622911890642dc438746edf3"; - } else throw "unsupported platform ${stdenv.system} (only i686-linux and x86_64 linux supported yet)"; - - preInstall = '' - sed -e /ldconfig/d -i Makefile - sed -e s@/usr/local@$out@ -i Makefile - sed -e s@/include/fmodex@/include@ -i Makefile - mkdir -p $out/lib - mkdir -p $out/include - ''; - - meta = { - homepage = "http://www.fmod.org/"; - description = "Programming library and toolkit for the creation and playback of interactive audio"; - license = "unfree"; - }; -} - diff --git a/home-manager/home.nix b/home-manager/home.nix deleted file mode 100644 index 243c6d1..0000000 --- a/home-manager/home.nix +++ /dev/null @@ -1,218 +0,0 @@ -{ config, pkgs, ... }: - -{ - imports = [ ./hyprland.nix ./syncthing.nix ./theming.nix ./neovim.nix ./xdg.nix]; - nixpkgs.config.allowUnfree = true; - nixpkgs.overlays = [ - (import ./electron_overlay.nix) - # (import (builtins.fetchTarball { - # url = "https://github.com/nix-community/neovim-nightly-overlay/archive/master.tar.gz"; - # })) - ]; - # Home Manager needs a bit of information about you and the paths it should - # manage. - home.username = "wilkuu"; - home.homeDirectory = "/home/wilkuu"; - - # This value determines the Home Manager release that your configuration is - # compatible with. This helps avoid breakage when a new Home Manager release - # introduces backwards incompatible changes. - # - # You should not change this value, even if you update Home Manager. If you do - # want to update the value, then make sure to first check the Home Manager - # release notes. - home.stateVersion = "23.11"; # Please read the comment before changing. - - # The home.packages option allows you to install Nix packages into your - # environment. - home.packages = with pkgs; [ - # Environment - hyprpolkitagent - hyprsunset - xdg-desktop-portal-kde - xdg-desktop-portal-hyprland - minecraftia - inconsolata-nerdfont - # Utils - networkmanagerapplet - blueman - htop - pwvucontrol - wl-clipboard - xdg-user-dirs - hyprshot - mako - speedcrunch - unzip - ripgrep - glib - gwenview - - # Connectivity - firefox - floorp - thunderbird - element-desktop - - # File management - pcmanfm - xarchiver - filelight - ranger - libsForQt5.kdeconnect-kde - sshfs - - #Productivity - libreoffice-qt6-fresh - zathura - obsidian - - # Artistic - krita - kdenlive - - # Web - hugo - - # Scripting - python3 - - # php - php83Packages.composer - php - - # java - openjdk17-bootstrap - gradle - - # Shell - zsh - alacritty - - # Entertainment - spotify - prismlauncher - ani-cli - vlc - openttd - fluent-reader - - # Finance - gnucash - # SRS - anki-bin - mpv - - # Electronics - - gst_all_1.gstreamer - # Common plugins like "filesrc" to combine within e.g. gst-launch - gst_all_1.gst-plugins-base - # Specialized plugins separated by quality - gst_all_1.gst-plugins-good - gst_all_1.gst-plugins-bad - gst_all_1.gst-plugins-ugly - # Plugins to reuse ffmpeg to play almost every video format - gst_all_1.gst-libav - # Support the Video Audio (Hardware) Acceleration API - gst_all_1.gst-vaapi - - #Theme - qt6Packages.qt6ct - kdePackages.qtstyleplugin-kvantum - (catppuccin-kvantum.override { - accent = "pink"; - variant = "mocha"; - }) - - - # # Adds the 'hello' command to your environment. It prints a friendly - # # "Hello, world!" when run. - # pkgs.hello - - # # It is sometimes useful to fine-tune packages, for example, by applying - # # overrides. You can do that directly here, just don't forget the - # # parentheses. Maybe you want to install Nerd Fonts with a limited number of - # # fonts? - # (pkgs.nerdfonts.override { fonts = [ "FantasqueSansMono" ]; }) - - # # You can also create simple shell scripts directly inside your - # # configuration. For example, this adds a command 'my-hello' to your - # # environment: - # (pkgs.writeShellScriptBin "my-hello" '' - # echo "Hello, ${config.home.username}!" - # '') - - ]; - - # Home Manager is pretty good at managing dotfiles. The primary way to manage - # plain files is through 'home.file'. - home.file = { - # # Building this configuration will create a copy of 'dotfiles/screenrc' in - # # the Nix store. Activating the configuration will then make '~/.screenrc' a - # # symlink to the Nix store copy. - # ".screenrc".source = dotfiles/screenrc; - - # # You can also set the file content immediately. - # ".gradle/gradle.properties".text = '' - # org.gradle.console=verbose - # org.gradle.daemon.idletimeout=3600000 - # ''; - }; - - # Home Manager can also manage your environment variables through - # 'home.sessionVariables'. These will be explicitly sourced when using a - # shell provided by Home Manager. If you don't want to manage your shell - # through Home Manager then you have to manually source 'hm-session-vars.sh' - # located at either - # - # ~/.nix-profile/etc/profile.d/hm-session-vars.sh - # - # or - # - # ~/.local/state/nix/profiles/profile/etc/profile.d/hm-session-vars.sh - # - # or - # - # /etc/profiles/per-user/wilkuu/etc/profile.d/hm-session-vars.sh - # - home.sessionVariables = { - EDITOR = "nvim"; - XDG_SESSION_TYPE = "wayland"; - GDK_BACKEND = "wayland"; - GTK_USE_PORTAL = "1"; - QT_QPA_PLATFORM = "wayland"; - QT_STYLE_OVERRIDE = "kvantum"; - QT_QPA_PLATFORM_THEME = "kvantum"; - QT_WAYLAND_DISABLE_WINDOWDECORATION = "1"; - QT_AUTO_SCREEN_SCALE_FACTOR = "1"; - MOZ_ENABLE_WAYLAND = "1"; - }; - - - programs.zsh = { - enable = true; - enableCompletion = true; - oh-my-zsh = { - enable = true; - theme = "clean"; - }; - plugins = [ - { - name = "zsh-nix-shell"; - file = "nix-shell.plugin.zsh"; - src = pkgs.fetchFromGitHub { - owner = "chisui"; - repo = "zsh-nix-shell"; - rev = "v0.8.0"; - sha256 = "1lzrn0n4fxfcgg65v0qhnj7wnybybqzs4adz7xsrkgmcsr0ii8b7"; - }; - } - ]; - }; - - - # Let Home Manager install and manage itself. - programs.home-manager.enable = true; - -} diff --git a/home-manager/home/default.nix b/home-manager/home/default.nix new file mode 100644 index 0000000..ed3c564 --- /dev/null +++ b/home-manager/home/default.nix @@ -0,0 +1,17 @@ +{pkgs, ...}: { + imports = [ + #./hyprland.nix + #./syncthing.nix + ./theming.nix + #./neovim.nix + #./xdg.nix + ]; + + nixpkgs.config.allowUnfree = true; + + + home.username = "wilkuu"; + home.homeDirectory = "/home/wilkuu"; + home.stateVersion = "24.11"; + programs.home-manager.enable = true; +} diff --git a/home-manager/home/session_vars.nix b/home-manager/home/session_vars.nix new file mode 100644 index 0000000..3ba8a7d --- /dev/null +++ b/home-manager/home/session_vars.nix @@ -0,0 +1,15 @@ + {config, ...}: + { + home.sessionVariables = { + EDITOR = "nvim"; + #XDG_SESSION_TYPE = "wayland"; + #GDK_BACKEND = "wayland"; + GTK_USE_PORTAL = "1"; + #QT_QPA_PLATFORM = "wayland"; + QT_STYLE_OVERRIDE = "kvantum"; + QT_QPA_PLATFORM_THEME = "kvantum"; + #QT_WAYLAND_DISABLE_WINDOWDECORATION = "1"; + #QT_AUTO_SCREEN_SCALE_FACTOR = "1"; + #MOZ_ENABLE_WAYLAND = "1"; + }; +} diff --git a/home-manager/home/theming.nix b/home-manager/home/theming.nix new file mode 100644 index 0000000..45a09a6 --- /dev/null +++ b/home-manager/home/theming.nix @@ -0,0 +1,43 @@ +{ config, pkgs, ... }: +let + catppuccin_gtk = pkgs.catppuccin-gtk.override { + accents = ["pink"]; + size = "compact"; + tweaks = ["black"]; + variant = "mocha"; + }; +in +{ + #Gtk Theming + gtk = { + enable=true; + theme = { + package= catppuccin_gtk; + name="catppuccin-mocha-pink-compact+black"; + }; + iconTheme = { + package = pkgs.catppuccin-papirus-folders; + name = "Papirus-Dark"; + }; + }; + + + home.pointerCursor = { + gtk.enable = true; + package = pkgs.catppuccin-cursors.mochaDark; + name = "catppuccin-mocha-dark-cursors"; + size = 32; + }; + + qt = { + enable = true; + platformTheme.name = "qtct"; + style.name="kvantum"; + }; + + xdg.configFile."Kvantum/kvantum.kvconfig".source = (pkgs.formats.ini {}).generate "kvantum.kvconfig" { + General.theme = "Catppuccin-Mocha-Pink"; + }; + +} + diff --git a/home-manager/hyprland.nix b/home-manager/hyprland.nix deleted file mode 100644 index 3b1e4fa..0000000 --- a/home-manager/hyprland.nix +++ /dev/null @@ -1,236 +0,0 @@ -{config, pkgs, ...}: -{ - # Hyprland - wayland.windowManager.hyprland = { - systemd.enable = false; - enable = true; - xwayland.enable = true; - settings = { - exec-once = map (s: "uwsm app -- " + s) [ - "kitty &" - "lxqt-policykit-agent &" - "waybar &" - "nm-applet &" - "blueman-tray &" - "blueman-applet &" - "hyprctl setcursor Catppuccin-Mocha-Dark-Cursors 24" - "kdeconnect-indicator &" - ] ++ ["uwsm finalize QT_QPA_PLATFORM QT_PLUGIN_PATH"]; - general = { - gaps_in = 3; - gaps_out = 8; - border_size = 1; - - "col.active_border" = "rgba(ed45b8ee) rgba(611449ee) 45deg"; - "col.inactive_border" = "rgba(595959aa)"; - - resize_on_border = true; - allow_tearing = true; - layout = "dwindle"; - }; - - animations = { - enabled = true; - bezier = "myBezier, 0.05, 0.9, 0.1, 1.05"; - animation = [ - "windows, 1, 7, myBezier" - "windowsOut, 1, 7, default, popin 80%" - "border, 1, 10, default" - "borderangle, 1, 8, default" - "fade, 1, 7, default" - "workspaces, 1, 6, default" - ]; - }; - - decoration = { - rounding = 10; - - # Change transparency of focused and unfocused windows - active_opacity = "1.0"; - inactive_opacity = "1.0"; - - # drop_shadow = true; - # shadow_range = 4; - # shadow_render_power = 3; - # "col.shadow" = "rgba(1a1a1aee)"; - - # https://wiki.hyprland.org/Configuring/Variables/#blur - blur = { - enabled = true; - size = 3; - passes = 1; - - vibrancy = "0.1696"; - }; - }; - dwindle = { - pseudotile = true; - preserve_split = true; - }; - - #master = { - # new_is_master = true; - #}; - input = { - kb_layout = "pl"; - kb_variant = ""; - kb_model = ""; - kb_options = ""; - kb_rules = ""; - - follow_mouse = 1; - - sensitivity = 0; # -1.0 - 1.0, 0 means no modification. - - touchpad = { - natural_scroll = true; - }; - }; - gestures = { - workspace_swipe = true; - }; - misc = { - force_default_wallpaper = "-1"; # Set to 0 or 1 to disable the anime mascot wallpapers - disable_hyprland_logo = false; # If true disables the random hyprland logo / anime girl background. :( - }; - monitor= [ ",preferred,auto,1" ]; - - # Mod key - "$mod" = "SUPER"; - - # Programs - "$terminal" = "kitty"; - "$fileManager" = "pcmanfm"; - "$menu" = "wofi --show run"; - "$screenshot" = "hyprshot -m region -f screenshots/screenshot_$(date +'%d-%m-%y_%H-%M-%S').png"; - - - bind = [ - # Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more - "$mod, RETURN, exec, $terminal" - "$mod, Q, killactive," - "$mod SHIFT, M, exec, uwsm stop" - "$mod, E, exec, uwsm app -- $fileManager" - "$mod, V, togglefloating," - "$mod, R, exec, uwsm app -- $menu" - "$mod, P, pseudo" - "$mod, J, togglesplit" - "$mod, L, exec, uwsm app -- hyprlock" - ",Print, exec, uwsm app -- $screenshot " - - # Move focus with mod + arrow keys - "$mod, left, movefocus, l" - "$mod, right, movefocus, r" - "$mod, up, movefocus, u" - "$mod, down, movefocus, d" - - # Example special workspace (scratchpad) - "$mod, S, togglespecialworkspace, magic" - "$mod SHIFT, S, movetoworkspace, special:magic" - - # Scroll through existing workspaces with mod + scroll - "$mod, mouse_down, workspace, e+1" - "$mod, mouse_up, workspace, e-1" - ] ++ ( - # workspaces - # binds $mod + [shift +] {1..10} to [move to] workspace {1..10} - builtins.concatLists (builtins.genList ( - x: let - ws = let - c = (x + 1) / 10; - in - builtins.toString (x + 1 - (c * 10)); - in [ - "$mod, ${ws}, workspace, ${toString (x + 1)}" - "$mod SHIFT, ${ws}, movetoworkspace, ${toString (x + 1)}" - ] - ) - 10) - ); - - bindm = [ - "$mod, mouse:272, movewindow" - "$mod, mouse:273, resizewindow" - ]; - - - windowrulev2 = [ - "suppressevent maximize, class:.*" # You'll probably like this. - ]; - - source = [ - "~/.config/hypr/hypr_test.conf" - ]; - }; - }; - - services.hyprpaper = { - enable = true; - settings = { - ipc = "on"; - splash = false; - splash_offset = 2.0; - - preload = - [ "/home/wilkuu/Pictures/Wallpapers/peony.png" ]; - wallpaper= [",/home/wilkuu/Pictures/Wallpapers/peony.png"]; - }; - }; - - programs.hyprlock = { - enable=true; - settings = { - general = { - disable_loading_bar = true; - grace = 0; - hide_cursor = true; - no_fade_in = false; - }; - - background = [ - { - path = "screenshot"; - blur_passes = 3; - blur_size = 16; - } - ]; - - input-field = [ - { - size = "200, 50"; - position = "0, -80"; - monitor = ""; - dots_center = true; - fade_on_empty = false; - font_color = "rgb(202, 211, 245)"; - inner_color = "rgb(91, 96, 120)"; - outer_color = "rgb(24, 25, 38)"; - outline_thickness = 5; - placeholder_text = "Password..."; - shadow_passes = 2; - } - ]; - }; - }; - - services.hypridle.enable = true; - services.hypridle.settings = { - general = { - lock_cmd ="pidof hyprlock || hyprlock"; - before_sleep_cmd="loginctl lock-session"; - ignore_dbus_inhibit=false; - after_sleep_cmd="hyprctl_dispatch dpms on"; - }; - listener = [ - { - timeout = 30; - on-timeout = "hyprlock"; - } - { - timeout = 90; - on-timeout = "hyprctl dispatch dpms off"; - on-resume = "hyprctl dispatch dpms on"; - } - ]; - }; -} diff --git a/home-manager/kitty.nix b/home-manager/kitty.nix deleted file mode 100644 index e69de29..0000000 diff --git a/home-manager/modules/apps/default.nix b/home-manager/modules/apps/default.nix new file mode 100644 index 0000000..afb7ea3 --- /dev/null +++ b/home-manager/modules/apps/default.nix @@ -0,0 +1,54 @@ +{lib, pkgs, ...}: +with lib; +{ + imports = [ + ./nvim + ./desktop + ./zsh.nix + ]; + + # Stuff that is to be sorted to its appropriate files + # If no appropriate category is found or thought of, put it in misc.nix + home.packages = with pkgs; [ + speedcrunch + htop + btop + nmap + dig + ripgrep + unzip + unrar + xdg-user-dirs + thunderbird + element-desktop + filelight + libreoffice + evince + obsidian + krita + hugo + qalculate-qt + + spotify + prismlauncher + ani-cli + vlc + mpv + openttd + anki-bin + + #Theme + qt6Packages.qt6ct + kdePackages.qtstyleplugin-kvantum + (catppuccin-kvantum.override { + accent = "pink"; + variant = "mocha"; + }) + + + # Do i need this? + php + php83Packages.composer + + ]; +} diff --git a/home-manager/modules/apps/desktop/default.nix b/home-manager/modules/apps/desktop/default.nix new file mode 100644 index 0000000..4bc7478 --- /dev/null +++ b/home-manager/modules/apps/desktop/default.nix @@ -0,0 +1,3 @@ +{lib, ...}: with lib; { + imports = [ ./hyprland.nix ]; +} diff --git a/home-manager/modules/apps/desktop/hyprland.nix b/home-manager/modules/apps/desktop/hyprland.nix new file mode 100644 index 0000000..5142f40 --- /dev/null +++ b/home-manager/modules/apps/desktop/hyprland.nix @@ -0,0 +1,241 @@ +{cfg, lib, ...}: +{ + # Hyprland + wayland.windowManager.hyprland = { + systemd.enable = false; + enable = true; + xwayland.enable = true; + settings = { + exec-once = map (s: "uwsm app -- " + s) [ + "kitty &" + "lxqt-policykit-agent &" + "waybar &" + "nm-applet &" + "blueman-tray &" + "blueman-applet &" + "hyprctl setcursor Catppuccin-Mocha-Dark-Cursors 24" + "kdeconnect-indicator &" + ] ++ [ + "systemctl --user start hypridle.service" + "systemctl --user start hyprpaper.service" + "uwsm finalize QT_QPA_PLATFORM QT_PLUGIN_PATH" + ]; + general = { + gaps_in = 3; + gaps_out = 8; + border_size = 1; + + "col.active_border" = "rgba(ed45b8ee) rgba(611449ee) 45deg"; + "col.inactive_border" = "rgba(595959aa)"; + + resize_on_border = true; + allow_tearing = true; + layout = "dwindle"; + }; + + animations = { + enabled = true; + bezier = "myBezier, 0.05, 0.9, 0.1, 1.05"; + animation = [ + "windows, 1, 7, myBezier" + "windowsOut, 1, 7, default, popin 80%" + "border, 1, 10, default" + "borderangle, 1, 8, default" + "fade, 1, 7, default" + "workspaces, 1, 6, default" + ]; + }; + + decoration = { + rounding = 10; + + # Change transparency of focused and unfocused windows + active_opacity = "1.0"; + inactive_opacity = "1.0"; + + # drop_shadow = true; + # shadow_range = 4; + # shadow_render_power = 3; + # "col.shadow" = "rgba(1a1a1aee)"; + + # https://wiki.hyprland.org/Configuring/Variables/#blur + blur = { + enabled = true; + size = 3; + passes = 1; + + vibrancy = "0.1696"; + }; + }; + dwindle = { + pseudotile = true; + preserve_split = true; + }; + + #master = { + # new_is_master = true; + #}; + input = { + kb_layout = "pl"; + kb_variant = ""; + kb_model = ""; + kb_options = ""; + kb_rules = ""; + + follow_mouse = 1; + + sensitivity = 0; # -1.0 - 1.0, 0 means no modification. + + touchpad = { + natural_scroll = true; + }; + }; + gestures = { + workspace_swipe = true; + }; + misc = { + force_default_wallpaper = "-1"; # Set to 0 or 1 to disable the anime mascot wallpapers + disable_hyprland_logo = false; # If true disables the random hyprland logo / anime girl background. :( + }; + monitor= [ ",preferred,auto,1" ]; + + # Mod key + "$mod" = "SUPER"; + + # Programs + "$terminal" = "kitty"; + "$fileManager" = "pcmanfm"; + "$menu" = "wofi --show run"; + "$screenshot" = "hyprshot -m region -f screenshots/screenshot_$(date +'%d-%m-%y_%H-%M-%S').png"; + + + bind = [ + # Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more + "$mod, RETURN, exec, $terminal" + "$mod, Q, killactive," + "$mod SHIFT, M, exec, uwsm stop" + "$mod, E, exec, uwsm app -- $fileManager" + "$mod, V, togglefloating," + "$mod, R, exec, uwsm app -- $menu" + "$mod, P, pseudo" + "$mod, J, togglesplit" + "$mod, L, exec, uwsm app -- hyprlock" + ",Print, exec, uwsm app -- $screenshot " + + # Move focus with mod + arrow keys + "$mod, left, movefocus, l" + "$mod, right, movefocus, r" + "$mod, up, movefocus, u" + "$mod, down, movefocus, d" + + # Example special workspace (scratchpad) + "$mod, S, togglespecialworkspace, magic" + "$mod SHIFT, S, movetoworkspace, special:magic" + + # Scroll through existing workspaces with mod + scroll + "$mod, mouse_down, workspace, e+1" + "$mod, mouse_up, workspace, e-1" + ] ++ ( + # workspaces + # binds $mod + [shift +] {1..10} to [move to] workspace {1..10} + builtins.concatLists (builtins.genList ( + x: let + ws = let + c = (x + 1) / 10; + in + builtins.toString (x + 1 - (c * 10)); + in [ + "$mod, ${ws}, workspace, ${toString (x + 1)}" + "$mod SHIFT, ${ws}, movetoworkspace, ${toString (x + 1)}" + ] + ) + 10) + ); + + bindm = [ + "$mod, mouse:272, movewindow" + "$mod, mouse:273, resizewindow" + ]; + + + windowrulev2 = [ + "suppressevent maximize, class:.*" # You'll probably like this. + ]; + + source = [ + "~/.config/hypr/hypr_test.conf" + ]; + }; + }; + + services.hyprpaper = { + enable = true; + settings = { + ipc = "on"; + splash = false; + splash_offset = 2.0; + + preload = + [ "/home/wilkuu/Pictures/Wallpapers/peony.png" ]; + wallpaper= [",/home/wilkuu/Pictures/Wallpapers/peony.png"]; + }; + }; + + programs.hyprlock = { + enable=true; + settings = { + general = { + disable_loading_bar = true; + grace = 0; + hide_cursor = true; + no_fade_in = false; + }; + + background = [ + { + path = "screenshot"; + blur_passes = 3; + blur_size = 16; + } + ]; + + input-field = [ + { + size = "200, 50"; + position = "0, -80"; + monitor = ""; + dots_center = true; + fade_on_empty = false; + font_color = "rgb(202, 211, 245)"; + inner_color = "rgb(91, 96, 120)"; + outer_color = "rgb(24, 25, 38)"; + outline_thickness = 5; + placeholder_text = "Password..."; + shadow_passes = 2; + } + ]; + }; + }; + + services.hypridle.enable = true; + services.hypridle.settings = { + general = { + lock_cmd ="pidof hyprlock || hyprlock"; + before_sleep_cmd="loginctl lock-session"; + ignore_dbus_inhibit=false; + after_sleep_cmd="hyprctl_dispatch dpms on"; + }; + listener = [ + { + timeout = 30; + on-timeout = "hyprlock"; + } + { + timeout = 90; + on-timeout = "hyprctl dispatch dpms off"; + on-resume = "hyprctl dispatch dpms on"; + } + ]; + }; + +} diff --git a/home-manager/modules/apps/nvim/default.nix b/home-manager/modules/apps/nvim/default.nix new file mode 100644 index 0000000..0505f78 --- /dev/null +++ b/home-manager/modules/apps/nvim/default.nix @@ -0,0 +1,4 @@ +{pkgs, ...}: +{ + # TODO +} diff --git a/home-manager/modules/apps/zsh.nix b/home-manager/modules/apps/zsh.nix new file mode 100644 index 0000000..7a940e6 --- /dev/null +++ b/home-manager/modules/apps/zsh.nix @@ -0,0 +1,24 @@ +{config ,pkgs, ...}: { + programs.zsh = { + enable = true; + enableCompletion = true; + oh-my-zsh = { + enable = true; + theme = "clean"; + }; + plugins = [ + { + name = "zsh-nix-shell"; + file = "nix-shell.plugin.zsh"; + src = pkgs.fetchFromGitHub { + owner = "chisui"; + repo = "zsh-nix-shell"; + rev = "v0.8.0"; + sha256 = "1lzrn0n4fxfcgg65v0qhnj7wnybybqzs4adz7xsrkgmcsr0ii8b7"; + }; + } + ]; + }; + + +} diff --git a/home-manager/modules/default.nix b/home-manager/modules/default.nix new file mode 100644 index 0000000..040dee8 --- /dev/null +++ b/home-manager/modules/default.nix @@ -0,0 +1,8 @@ +{lib, ...}: +with lib; +{ + imports = [ + ./apps + #./service + ]; +} diff --git a/home-manager/modules/services/default.nix b/home-manager/modules/services/default.nix new file mode 100644 index 0000000..a0f8310 --- /dev/null +++ b/home-manager/modules/services/default.nix @@ -0,0 +1,3 @@ +{lib, ...}: { + imports = [ ./syncthing.nix]; +} diff --git a/home-manager/modules/services/syncthing.nix b/home-manager/modules/services/syncthing.nix new file mode 100644 index 0000000..f917d86 --- /dev/null +++ b/home-manager/modules/services/syncthing.nix @@ -0,0 +1,11 @@ +{ config, pkgs, ... }: +{ + services.syncthing = { + enable = true; + tray = { + enable = true; + command = "syncthingtray --wait"; + }; + }; +} + diff --git a/home-manager/neovim.nix b/home-manager/neovim.nix deleted file mode 100644 index 7b1554e..0000000 --- a/home-manager/neovim.nix +++ /dev/null @@ -1,94 +0,0 @@ -{ pkgs, config, ...}: -let - unstable = import {}; - treesitterWithGrammars = (unstable.vimPlugins.nvim-treesitter.withPlugins (p : [ - p.bash - p.comment - p.css - p.dockerfile - p.gitattributes - p.gitignore - p.go - p.gomod - p.gowork - p.rust - p.javascript - p.typescript - p.json5 - p.json - p.lua - p.markdown - p.nix - p.python - p.java - p.rust - p.toml - p.vue - p.yaml - p.php - p.latex - ])); - treesitter-parsers = pkgs.symlinkJoin { - name = "treesitter-parsers"; - paths = treesitterWithGrammars.dependencies; - }; - -in -{ - programs.neovim = { - enable = true; - # package = unstable.neovim; - defaultEditor = true; - viAlias = true; - vimAlias = true; - # vimdiffAlias = true; - # # withPython3 = false; - # # withNodeJs = false; - # # withRuby = false; - # - coc.enable = false; - # - plugins = [ - treesitterWithGrammars - ]; - }; - - home.file."./.config/nvim/lua/wilkuu/init.lua".text = '' - require("wilkuu.set") - require("wilkuu.remap") - ''; - #vim.opt.runtimepath:append("${treesitter-parsers}") - - home.file."./.config/nvim/lua/wilkuu/nix.lua".text = '' - return { - vue_ts_plugin = "/home/wilkuu/.npm/@vue/typescript-plugin", - } - ''; - - - # home.file."./.local/share/nvim/nix/nvim-treesitter/" = { - # source = treesitterWithGrammars; - # recursive = true; - # }; - - home.sessionPath = [ - "/home/wilkuu/.npm/bin/" - ]; - - home.packages = with pkgs; [ - lua - lua-language-server - gopls - go - typescript - nodejs_22 - rustup - nixd - nixfmt-rfc-style - pyright - nodePackages.intelephense - texlive.combined.scheme-full - texlab - ]; - -} diff --git a/home-manager/syncthing.nix b/home-manager/syncthing.nix deleted file mode 100644 index f917d86..0000000 --- a/home-manager/syncthing.nix +++ /dev/null @@ -1,11 +0,0 @@ -{ config, pkgs, ... }: -{ - services.syncthing = { - enable = true; - tray = { - enable = true; - command = "syncthingtray --wait"; - }; - }; -} - diff --git a/home-manager/theming.nix b/home-manager/theming.nix deleted file mode 100644 index db2c9db..0000000 --- a/home-manager/theming.nix +++ /dev/null @@ -1,42 +0,0 @@ -{ config, pkgs, ... }: -let - catppuccin_gtk = pkgs.catppuccin-gtk.override { - accents = ["pink"]; - size = "compact"; - tweaks = ["black"]; - variant = "mocha"; - }; -in -{ - #Gtk Theming - gtk = { - enable=true; - theme = { - package= catppuccin_gtk; - name="catppuccin-mocha-pink-compact+black"; - }; - iconTheme = { - package = pkgs.catppuccin-papirus-folders; - name = "Papirus-Dark"; - }; - }; - - - home.pointerCursor = { - gtk.enable = true; - package = pkgs.catppuccin-cursors.mochaDark; - name = "catppuccin-mocha-dark-cursors"; - size = 32; - }; - - qt = { - enable = true; - platformTheme.name = "qtct"; - style.name="kvantum"; - }; - - xdg.configFile."Kvantum/kvantum.kvconfig".source = (pkgs.formats.ini {}).generate "kvantum.kvconfig" { - General.theme = "Catppuccin-Mocha-Pink"; - }; - -} diff --git a/home-manager/xdg.nix b/home-manager/xdg.nix deleted file mode 100644 index 6b55023..0000000 --- a/home-manager/xdg.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ config, pkgs, ... }: -{ - xdg.mimeApps.defaultApplications = { - "application/zip" = [ "xarchiver.desktop" ]; - "application/x-krita" = [ "krita.desktop" ]; - "image/*" = [ "gwenview.desktop" "krita.desktop"]; - "inode/directory" = [ "pcmanfm.desktop" "filelight.desktop" "kitty.desktop"]; - }; -} diff --git a/nixos/GrubBG.png b/nixos/GrubBG.png deleted file mode 100644 index 0f5028f..0000000 Binary files a/nixos/GrubBG.png and /dev/null differ diff --git a/nixos/common/default.nix b/nixos/common/default.nix new file mode 100644 index 0000000..a186c1b --- /dev/null +++ b/nixos/common/default.nix @@ -0,0 +1,67 @@ + +# Edit this configuration file to define what should be installed on +# your system. Help is available in the configuration.nix(5) man page, on +# https://search.nixos.org/options and in the NixOS manual (`nixos-help`). + +{ config, lib, pkgs, ... }: + +{ + imports = + [ # Include the results of the hardware scan. + ./services.nix + ]; + + + + nix.settings.experimental-features = ["nix-command" "flakes"]; + time.timeZone = "Europe/Amsterdam"; # Set timezone + + # Configure network proxy if necessary + # networking.proxy.default = "http://user:password@proxy:port/"; + # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; + + # Select internationalisation properties. + i18n.defaultLocale = "en_US.UTF-8"; + console = { + font = "Lat2-Terminus16"; + keyMap = "us"; + # useXkbConfig = true; # use xkb.options in tty. + }; + + # Enable the X11 windowing system. + # services.xserver.enable = true; + + # Define a user account. Don't forget to set a password with ‘passwd’. + users.users.wilkuu = { + isNormalUser = true; + extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user. + packages = with pkgs; [ + tree + ]; + }; + + # Configure keymap in X11 + # services.xserver.xkb.layout = "us"; + # services.xserver.xkb.options = "eurosign:e,caps:escape"; + + + # programs.firefox.enable = true; + + # List packages installed in system profile. To search, run: + environment.variables.EDITOR = "vim"; + # $ nix search wget + environment.systemPackages = with pkgs; [ + vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. + wget + git + ]; + + + + # This option defines the first version of NixOS you have installed on this particular machine, + # DO NOT CHANGE UNLESS USING NIXOS-INSTALL + + system.stateVersion = "24.11"; # Did you read the comment? + +} + diff --git a/nixos/common/services.nix b/nixos/common/services.nix new file mode 100644 index 0000000..528363b --- /dev/null +++ b/nixos/common/services.nix @@ -0,0 +1,2 @@ +{config, lib, pkgs, ...}: +{} diff --git a/nixos/configuration.nix b/nixos/configuration.nix deleted file mode 100644 index b4bd651..0000000 --- a/nixos/configuration.nix +++ /dev/null @@ -1,314 +0,0 @@ -# Edit this configuration file to define what should be installed on -# your system. Help is available in the configuration.nix(5) man page, on -# https://search.nixos.org/options and in the NixOS manual (`nixos-help`). - -{ config, lib, pkgs, ... }: -{ - imports = - [ # Include the results of the hardware scan. - ./hardware-configuration.nix - - ./home-manager.nix - ./services.nix - ]; - - nix.settings.experimental-features = [ "nix-command" "flakes" ]; - - # Use the systemd-boot EFI boot loader. - # boot.loader.systemd-boot.enable = true; - boot.loader.grub = { - useOSProber = true; - device = "nodev"; - - - efiSupport = true; - default = "saved"; - memtest86.enable = true; - splashImage = ./GrubBG.png; - }; - boot.loader.efi.canTouchEfiVariables = true; - boot.crashDump.enable = false; - boot.plymouth = { - enable = true; - theme = "bgrt"; - }; - - boot.kernelParams = [ - "quiet" - "splash" - "loglevel=3" - "rd.systemd.show_status=false" - "rd.udev.log_level=3" - "udev.logpriority=3" - ]; - boot.consoleLogLevel = 0; - - networking.hostName = "icetea-dispenser"; # Define your hostname. - # Pick only one of the below networking options. - # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. - networking.networkmanager.enable = true; # Easiest to use and most distros use this by default. - - # Set your time zone. - time.timeZone = "Europe/Amsterdam"; - - # Configure network proxy if necessary - # networking.proxy.default = "http://user:password@proxy:port/"; - # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; - - # Select internationalisation properties. - # i18n.defaultLocale = "en_US.UTF-8"; - # console = { - # font = "Lat2-Terminus16"; - # keyMap = "us"; - # useXkbConfig = true; # use xkb.options in tty. - # }; - - # Enable the X11 windowing system. - programs.nix-ld.enable = true; - - services.printing.enable = true; - documentation.dev.enable = true; - services.displayManager.sddm ={ - #package = pkgs.kdePackages.sddm; - enable = true; - wayland.enable = true; - theme="catppuccin-mocha"; - }; - services.xserver.exportConfiguration = true; # This makes it easy to search for a valid keymap - # Enable KDE6 env in case Hyprland gets borked. - # services.desktopManager.plasma6.enable = true; - programs.hyprland.enable = true; - programs.hyprland.withUWSM = true; - programs.uwsm = { - enable = true; - waylandCompositors ={ - hyprland = { - prettyName = "Hyprland"; - comment = "Hyprland compositor managed by UWSM"; - binPath = "/run/current-system/sw/bin/Hyprland"; - }; - }; - }; - - nixpkgs.config.allowUnfree = true; - - # Configure keymap in X11 - # services.xserver.xkb.layout = "us"; - # services.xserver.xkb.options = "eurosign:e,caps:escape"; - - # Enable CUPS to print documents. - # services.printing.enable = true; - - # Enable sound. - # hardware.pulseaudio.enable = true; - # OR - services.pipewire = { - enable = true; - pulse.enable = true; - }; - - # Enable touchpad support (enabled default in most desktopManager). - # services.libinput.enable = true; - - # Define a user account. Don't forget to set a password with ‘passwd’. - programs.zsh.enable = true; - users.defaultUserShell = pkgs.zsh; - users.users.wilkuu = { - isNormalUser = true; - extraGroups = [ "wheel" "networkmanager" "input" "docker" "adbusers" "libvirtd" ]; # Enable ‘sudo’ for the user. - packages = with pkgs; [ - firefox - nano - ]; - }; - - xdg.portal = { - enable = true; - config = { - common = { - default = [ - "hyprland" - "gtk" - ]; - }; - }; - }; - - # List packages installed in system profile. To search, run: - # $ nix search wget - environment.systemPackages = with pkgs; [ - zsh - busybox - usbutils - libsForQt5.qtstyleplugins - xdg-desktop-portal-hyprland - xdg-desktop-portal-gtk - qt6.qtwayland - #qt5.qtwayland - kdePackages.sddm-kcm - sddm - # neovim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. - nano - wget - git - tree - alacritty - kitty - docker - home-manager - wofi - waybar - waybar-mpris - vesktop - wineWowPackages.waylandFull - thunderbolt - catppuccin-sddm - kdePackages.kwallet - kdePackages.kwalletmanager - - virt-viewer - spice - spice-gtk - spice-protocol - win-virtio - win-spice - gnome.adwaita-icon-theme - ]; - - environment.variables = { - QT_STYLE_OVERRIDE = "kvantum"; - QT_QPA_PLATFORM="wayland"; - QT_QPA_PLATFORM_PATH="${pkgs.qt6.qtbase}/lib/qt-${pkgs.qt6.qtbase.version}/plugins/platform"; - }; - - programs.adb.enable = true; - - # Some programs need SUID wrappers, can be configured further or are - # started in user sessions. - # programs.mtr.enable = true; - # programs.gnupg.agent = { - # enable = true; - # enableSSHSupport = true; - # }; - - # List services that you want to enable: - - # Enable the OpenSSH daemon. - # services.openssh.enable = true; - - # Open ports in the firewall. - # networking.firewall.allowedTCPPorts = [ ... ]; - # networking.firewall.allowedUDPPorts = [ ... ]; - # Or disable the firewall altogether. - networking.firewall.enable = false; - - # 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. - # system.copySystemConfiguration = true; - - # This option defines the first version of NixOS you have installed on this particular machine, - # and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions. - # - # Most users should NEVER change this value after the initial install, for any reason, - # even if you've upgraded your system to a new NixOS release. - # - # This value does NOT affect the Nixpkgs version your packages and OS are pulled from, - # so changing it will NOT upgrade your system - see https://nixos.org/manual/nixos/stable/#sec-upgrading for how - # to actually do that. - # - # This value being lower than the current NixOS release does NOT mean your system is - # out of date, out of support, or vulnerable. - # - # Do NOT change this value unless you have manually inspected all the changes it would make to your configuration, - # and migrated your data accordingly. - # - # For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion . - system.stateVersion = "24.05"; # Did you read the comment? - - # steam goes here - programs.steam = { - enable = true; - protontricks.enable = true; - }; - - # Fonts -fonts.packages = with pkgs; [ - noto-fonts - noto-fonts-cjk-sans - font-awesome - noto-fonts-emoji - # (nerdfonts.override {fonts = [ "Hermit" ];}) - nerdfonts -]; - - # Input, note the waylandFrontend line - i18n.inputMethod = { - type = "fcitx5"; - enable = true; - fcitx5.waylandFrontend = true; - fcitx5.addons = with pkgs; [ - kdePackages.fcitx5-qt - fcitx5-mozc - ]; - }; - - # Bluetooth - hardware.bluetooth.enable = true; - hardware.bluetooth.settings = { - General = {Enable = "Source,Sink,Media,Socket";}; - }; - - hardware.bluetooth.powerOnBoot = true; - services.blueman.enable = true; - - services.avahi = { - enable = true; - nssmdns = true; - publish = { - enable = true; - }; - }; - - - systemd.user.services.mpris-proxy = { - description = "Mpris proxy"; - after = [ "network.target" "sound.target" ]; - wantedBy = [ "default.target" ]; - serviceConfig.ExecStart = "${pkgs.bluez}/bin/mpris-proxy"; - }; - - - #services.fprintd.enable = true; - #security.pam.services.login.fprintAuth = true; - security.pam.services = { - kdm.enableKwallet = true; - lightdm.enableKwallet = true; - sddm.enableKwallet = true; - slim.enableKwallet = true; - }; - - programs.weylus = { - enable=true; - openFirewall=true; - users=["wilkuu"]; - }; - - ## VM's - programs.dconf.enable = true; - programs.virt-manager.enable = true; - virtualisation = { - docker.enable = true; - libvirtd = { - enable = true; - qemu = { - swtpm.enable = true; - vhostUserPackages = with pkgs; [ virtiofsd ]; - ovmf.enable = true; - ovmf.packages = [ pkgs.OVMFFull.fd ]; - }; - }; - spiceUSBRedirection.enable = true; - }; - services.spice-vdagentd.enable = true; -} diff --git a/nixos/desktop/apps.nix b/nixos/desktop/apps.nix new file mode 100644 index 0000000..5fdd823 --- /dev/null +++ b/nixos/desktop/apps.nix @@ -0,0 +1,8 @@ +{pkgs, ...} : +{ + environment.systemPackages = with pkgs; [ + floorp + neovim + kitty + ]; +} diff --git a/nixos/desktop/default.nix b/nixos/desktop/default.nix new file mode 100644 index 0000000..a634618 --- /dev/null +++ b/nixos/desktop/default.nix @@ -0,0 +1,54 @@ + +{pkgs, ...}: +{ + imports = [ + ./apps.nix + ./xfce.nix + ./hyprland.nix + ]; + + programs = { + dconf.enable = true; + thunar = { + enable = true; + plugins = with pkgs.xfce; [ + thunar-archive-plugin + thunar-media-tags-plugin + thunar-volman + ]; + }; + }; + # Enable CUPS to print documents. + services.printing.enable = true; + + + # Enable touchpad support (enabled default in most desktopManager). + services.libinput.enable = true; + + services = { + blueman.enable = true; + # Enable sound + pipewire = { + enable = true; + pulse.enable = true; + }; + + displayManager.sddm = { + enable=true; + wayland.enable = true; + #theme = "catppuccin-mocha"; + }; + xserver = { + enable = true; + excludePackages = with pkgs; [ + xterm + ]; + }; + }; + + fonts.packages = with pkgs; [ + noto-fonts + font-awesome + (nerdfonts.override {fonts = [ "Hermit" ]; }) + ]; +} diff --git a/nixos/desktop/hyprland.nix b/nixos/desktop/hyprland.nix new file mode 100644 index 0000000..687f2eb --- /dev/null +++ b/nixos/desktop/hyprland.nix @@ -0,0 +1,44 @@ +{pkgs, ...}: { + environment.systemPackages = with pkgs; [ + hyprland + hyprgui + hyprshot + hyprkeys + hypridle + hyprpaper + hyprpicker + hyprnotify + hyprcursor + waybar + waybar-mpris + ]; + + + services.xserver.exportConfiguration = true; # This makes it easy to search for a valid keymap + # Enable KDE6 env in case Hyprland gets borked. + # services.desktopManager.plasma6.enable = true; + programs.hyprland.enable = true; + programs.hyprland.withUWSM = true; + programs.uwsm = { + enable = true; + waylandCompositors ={ + hyprland = { + prettyName = "Hyprland"; + comment = "Hyprland compositor managed by UWSM"; + binPath = "/run/current-system/sw/bin/Hyprland"; + }; + }; + }; + + xdg.portal = { + enable = true; + config = { + common = { + default = [ + "hyprland" + "gtk" + ]; + }; + }; + }; +} diff --git a/nixos/desktop/xfce.nix b/nixos/desktop/xfce.nix new file mode 100644 index 0000000..563b205 --- /dev/null +++ b/nixos/desktop/xfce.nix @@ -0,0 +1,26 @@ +{pkgs, ...}: +{ + environment.systemPackages = with pkgs; [ + # XFCE stuff + xfce.catfish + xfce.xfce4-appfinder + xfce.xfce4-clipman-plugin + xfce.xfce4-cpugraph-plugin + xfce.xfce4-dict + xfce.xfce4-fsguard-plugin + xfce.xfce4-genmon-plugin + xfce.xfce4-netload-plugin + xfce.xfce4-panel + xfce.xfce4-pulseaudio-plugin + xfce.xfce4-systemload-plugin + xfce.xfce4-weather-plugin + xfce.xfce4-whiskermenu-plugin + xfce.xfce4-xkb-plugin + xfce.xfdashboard + + # GNOME stuff + file-roller + gnome-disk-utility + ]; + services.xserver.desktopManager.xfce.enable = true; +} diff --git a/nixos/flake.lock b/nixos/flake.lock new file mode 100644 index 0000000..fa96756 --- /dev/null +++ b/nixos/flake.lock @@ -0,0 +1,49 @@ +{ + "nodes": { + "home-manager": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1739757849, + "narHash": "sha256-Gs076ot1YuAAsYVcyidLKUMIc4ooOaRGO0PqTY7sBzA=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "9d3d080aec2a35e05a15cedd281c2384767c2cfe", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "release-24.11", + "repo": "home-manager", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1740463929, + "narHash": "sha256-4Xhu/3aUdCKeLfdteEHMegx5ooKQvwPHNkOgNCXQrvc=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "5d7db4668d7a0c6cc5fc8cf6ef33b008b2b1ed8b", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-24.11", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "home-manager": "home-manager", + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/nixos/flake.nix b/nixos/flake.nix new file mode 100644 index 0000000..f5e1620 --- /dev/null +++ b/nixos/flake.nix @@ -0,0 +1,36 @@ +{ + description = "NixOS configuration"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11"; + home-manager = { + url = "github:nix-community/home-manager/release-24.11"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + }; + + outputs = { self, nixpkgs, home-manager, ... }: { + nixosConfigurations.crank-vm = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + modules = [ + ./hosts/crank-vm + ./desktop + home-manager.nixosModules.home-manager { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + } + ]; + }; + nixosConfigurations.icetea-dispenser = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + modules = [ + ./hosts/icetea-dispenser + ./desktop + home-manager.nixosModules.home-manager { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + } + ]; + }; + }; +} diff --git a/nixos/hardware-configuration.nix b/nixos/hardware-configuration.nix deleted file mode 100644 index f321cd0..0000000 --- a/nixos/hardware-configuration.nix +++ /dev/null @@ -1,156 +0,0 @@ -# Do not modify this file! It was generated by ‘nixos-generate-config’ -# and may be overwritten by future invocations. Please make changes -# to /etc/nixos/configuration.nix instead. -{ config, lib, pkgs, modulesPath, ... }: - -{ - imports = - [ (modulesPath + "/installer/scan/not-detected.nix") - ]; - - boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usbhid" "usb_storage" "sd_mod" "sdhci_pci" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-intel" ]; - boot.extraModulePackages = [ ]; - boot.supportedFilesystems = [ "ntfs" "btrfs" "vfat" ]; - # GRUB 2 with UEFI example, chainloading another distro - boot.loader.grub.extraEntries = - '' -menuentry 'UEFI Firmware' $menuentry_id_option 'uefi-firmware' { - fwsetup -} - ''; - fileSystems."/" = - { device = "/dev/disk/by-uuid/f75781bf-b2bf-4bb0-915d-95193e8eee9e"; - fsType = "btrfs"; - options = [ "noatime" "compress=zstd" "subvol=root" ]; - }; - - fileSystems."/home" = - { device = "/dev/disk/by-uuid/f75781bf-b2bf-4bb0-915d-95193e8eee9e"; - fsType = "btrfs"; - options = [ "noatime" "compress=zstd" "subvol=home" ]; - }; - - fileSystems."/nix" = - { device = "/dev/disk/by-uuid/f75781bf-b2bf-4bb0-915d-95193e8eee9e"; - fsType = "btrfs"; - options = [ "noatime" "compress=zstd" "subvol=nix" ]; - }; - - fileSystems."/snapshots" = - { device = "/dev/disk/by-uuid/f75781bf-b2bf-4bb0-915d-95193e8eee9e"; - fsType = "btrfs"; - options = [ "noatime" "compress=zstd" "subvol=snapshots" ]; - }; - - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/6E1A-07F4"; - fsType = "vfat"; - options = [ "fmask=0077" "dmask=0077" ]; - }; - - fileSystems."/store2" = - { device = "/dev/disk/by-uuid/5368282f-c09d-44cf-9cf2-e69a2d415da6"; - fsType = "btrfs"; - options = [ "noatime" "compress=zstd" "subvol=/"]; - }; - fileSystems."/store1" = - { device = "/dev/disk/by-uuid/6A2E2BFF2E2BC2C5"; - fsType = "ntfs-3g" ; - options = ["rw" "uid=1000" "gid=100"]; - }; - fileSystems."/win_games" = - { device = "/dev/disk/by-uuid/6A680789680752ED"; - fsType = "ntfs-3g" ; - options = ["rw" "uid=1000" "gid=100"]; - }; - - - - swapDevices = - [ { device = "/dev/disk/by-uuid/f1dfc6a1-55f3-4148-9f1d-2a998c3b3168"; } - { device = "/dev/disk/by-uuid/003a819a-e06e-45df-bef6-b3702c2ddb48"; } - ]; - - # Thunderbolt - services.hardware.bolt.enable = true; - powerManagement.enable = true; - - # Enables DHCP on each ethernet and wireless interface. In case of scripted networking - # (the default) this is the recommended approach. When using systemd-networkd it's - # still possible to use this option, but it's recommended to use it in conjunction - # with explicit per-interface declarations with `networking.interfaces..useDHCP`. - # networking.nameservers = [ "1.1.1.1#one.one.one.one" "1.0.0.1#one.one.one.one" ]; - - services.resolved = { - enable = true; - dnssec = "false"; - domains = [ "~." ]; - fallbackDns = [ ]; - dnsovertls = "opportunistic"; - }; - - - networking.useDHCP = lib.mkDefault true; - networking.firewall.checkReversePath = false; - - # networking.interfaces.enp0s31f6.useDHCP = lib.mkDefault true; - # networking.interfaces.enp81s0u1u4.useDHCP = lib.mkDefault true; - # networking.interfaces.wlp0s20f3.useDHCP = lib.mkDefault true; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; - - # Enable OpenGL - hardware.graphics = { - enable = true; - }; - - # Load nvidia driver for Xorg and Wayland - services.xserver.videoDrivers = ["nvidia"]; - - hardware.nvidia = { - - # Modesetting is required. - modesetting.enable = true; - - # Nvidia power management. Experimental, and can cause sleep/suspend to fail. - # Enable this if you have graphical corruption issues or application crashes after waking - # up from sleep. This fixes it by saving the entire VRAM memory to /tmp/ instead - # of just the bare essentials. - powerManagement.enable = false; - - # Fine-grained power management. Turns off GPU when not in use. - # Experimental and only works on modern Nvidia GPUs (Turing or newer). - powerManagement.finegrained = false; - - # Use the NVidia open source kernel module (not to be confused with the - # independent third-party "nouveau" open source driver). - # Support is limited to the Turing and later architectures. Full list of - # supported GPUs is at: - # https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus - # Only available from driver 515.43.04+ - # Currently alpha-quality/buggy, so false is currently the recommended setting. - open = false; - - # Enable the Nvidia settings menu, - # accessible via `nvidia-settings`. - nvidiaSettings = false; - - # Optionally, you may need to select the appropriate driver version for your specific GPU. - package = config.boot.kernelPackages.nvidiaPackages.production; - - prime = { - offload = { - enable = true; - enableOffloadCmd = true; - }; - - sync.enable = false; - - intelBusId = "PCI:1:0:0"; - nvidiaBusId = "PCI:0:2:0"; - }; - }; -} diff --git a/nixos/home-manager.nix b/nixos/home-manager.nix deleted file mode 100644 index 6e76671..0000000 --- a/nixos/home-manager.nix +++ /dev/null @@ -1,4 +0,0 @@ -{config, pkgs, ...}: -{ - users.users.wilkuu.isNormalUser = true; -} diff --git a/nixos/hosts/crank-vm/default.nix b/nixos/hosts/crank-vm/default.nix new file mode 100644 index 0000000..1415674 --- /dev/null +++ b/nixos/hosts/crank-vm/default.nix @@ -0,0 +1,20 @@ +{ config, inputs, pkgs, ...}: +{ + imports = [ + ./hardware-configuration.nix + ../../common + ]; + + networking.hostName = "crank-vm"; # Define your hostname. + # Use the systemd-boot EFI boot loader. + # boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + boot.loader.grub = { + device = "nodev"; + useOSProber = true; + efiSupport = true; + default = "saved"; + memtest86.enable = true; + }; + networking.firewall.enable = false; +} diff --git a/nixos/hosts/crank-vm/hardware-configuration.nix b/nixos/hosts/crank-vm/hardware-configuration.nix new file mode 100644 index 0000000..e73cd34 --- /dev/null +++ b/nixos/hosts/crank-vm/hardware-configuration.nix @@ -0,0 +1,65 @@ +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ config, lib, pkgs, modulesPath, ... }: + +{ + imports = + [ (modulesPath + "/profiles/qemu-guest.nix") + ]; + + boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "sr_mod" "virtio_blk" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/4b8e866a-bbf0-4312-a134-e6369276ed60"; + fsType = "btrfs"; + options = [ "subvol=root" ]; + }; + + boot.initrd.luks.devices."system".device = "/dev/disk/by-uuid/70bdaa2d-b736-417b-899e-50f6c61c0036"; + + fileSystems."/home" = + { device = "/dev/disk/by-uuid/4b8e866a-bbf0-4312-a134-e6369276ed60"; + fsType = "btrfs"; + options = [ "subvol=home" ]; + }; + + fileSystems."/nix" = + { device = "/dev/disk/by-uuid/4b8e866a-bbf0-4312-a134-e6369276ed60"; + fsType = "btrfs"; + options = [ "subvol=nix" ]; + }; + + fileSystems."/snapshots" = + { device = "/dev/disk/by-uuid/4b8e866a-bbf0-4312-a134-e6369276ed60"; + fsType = "btrfs"; + options = [ "subvol=snapshots" ]; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/D0B7-5718"; + fsType = "vfat"; + options = [ "fmask=0022" "dmask=0022" ]; + }; + + swapDevices = [ ]; + + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking + # (the default) this is the recommended approach. When using systemd-networkd it's + # still possible to use this option, but it's recommended to use it in conjunction + # with explicit per-interface declarations with `networking.interfaces..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.enp1s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + + services = { + qemuGuest.enable = true; + spice-vdagentd.enable = true; + }; +} + + diff --git a/nixos/hosts/icetea-dispenser/GrubBG.png b/nixos/hosts/icetea-dispenser/GrubBG.png new file mode 100644 index 0000000..0f5028f Binary files /dev/null and b/nixos/hosts/icetea-dispenser/GrubBG.png differ diff --git a/nixos/hosts/icetea-dispenser/default.nix b/nixos/hosts/icetea-dispenser/default.nix new file mode 100644 index 0000000..802cd5b --- /dev/null +++ b/nixos/hosts/icetea-dispenser/default.nix @@ -0,0 +1,40 @@ + {pkgs, config, ...}: + { + imports = [ + ./hardware-configuration.nix + ../../common + ]; + boot.loader.grub = { + useOSProber = true; + device = "nodev"; + + + efiSupport = true; + default = "saved"; + memtest86.enable = true; + # splashImage = ./GrubBG.png; + }; + boot.loader.efi.canTouchEfiVariables = true; + boot.crashDump.enable = false; + boot.plymouth = { + enable = true; + theme = "bgrt"; + }; + + boot.kernelParams = [ + "quiet" + "splash" + "loglevel=3" + "rd.systemd.show_status=false" + "rd.udev.log_level=3" + "udev.logpriority=3" + ]; + boot.consoleLogLevel = 0; + + networking.hostName = "icetea-dispenser"; # Define your hostname. + networking.firewall.enable = false; + + programs.nix-ld.enable = true; + services.printing.enable = true; + nixpkgs.config.allowUnfree = true; +} diff --git a/nixos/hosts/icetea-dispenser/hardware-configuration.nix b/nixos/hosts/icetea-dispenser/hardware-configuration.nix new file mode 100644 index 0000000..f321cd0 --- /dev/null +++ b/nixos/hosts/icetea-dispenser/hardware-configuration.nix @@ -0,0 +1,156 @@ +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ config, lib, pkgs, modulesPath, ... }: + +{ + imports = + [ (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usbhid" "usb_storage" "sd_mod" "sdhci_pci" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + boot.supportedFilesystems = [ "ntfs" "btrfs" "vfat" ]; + # GRUB 2 with UEFI example, chainloading another distro + boot.loader.grub.extraEntries = + '' +menuentry 'UEFI Firmware' $menuentry_id_option 'uefi-firmware' { + fwsetup +} + ''; + fileSystems."/" = + { device = "/dev/disk/by-uuid/f75781bf-b2bf-4bb0-915d-95193e8eee9e"; + fsType = "btrfs"; + options = [ "noatime" "compress=zstd" "subvol=root" ]; + }; + + fileSystems."/home" = + { device = "/dev/disk/by-uuid/f75781bf-b2bf-4bb0-915d-95193e8eee9e"; + fsType = "btrfs"; + options = [ "noatime" "compress=zstd" "subvol=home" ]; + }; + + fileSystems."/nix" = + { device = "/dev/disk/by-uuid/f75781bf-b2bf-4bb0-915d-95193e8eee9e"; + fsType = "btrfs"; + options = [ "noatime" "compress=zstd" "subvol=nix" ]; + }; + + fileSystems."/snapshots" = + { device = "/dev/disk/by-uuid/f75781bf-b2bf-4bb0-915d-95193e8eee9e"; + fsType = "btrfs"; + options = [ "noatime" "compress=zstd" "subvol=snapshots" ]; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/6E1A-07F4"; + fsType = "vfat"; + options = [ "fmask=0077" "dmask=0077" ]; + }; + + fileSystems."/store2" = + { device = "/dev/disk/by-uuid/5368282f-c09d-44cf-9cf2-e69a2d415da6"; + fsType = "btrfs"; + options = [ "noatime" "compress=zstd" "subvol=/"]; + }; + fileSystems."/store1" = + { device = "/dev/disk/by-uuid/6A2E2BFF2E2BC2C5"; + fsType = "ntfs-3g" ; + options = ["rw" "uid=1000" "gid=100"]; + }; + fileSystems."/win_games" = + { device = "/dev/disk/by-uuid/6A680789680752ED"; + fsType = "ntfs-3g" ; + options = ["rw" "uid=1000" "gid=100"]; + }; + + + + swapDevices = + [ { device = "/dev/disk/by-uuid/f1dfc6a1-55f3-4148-9f1d-2a998c3b3168"; } + { device = "/dev/disk/by-uuid/003a819a-e06e-45df-bef6-b3702c2ddb48"; } + ]; + + # Thunderbolt + services.hardware.bolt.enable = true; + powerManagement.enable = true; + + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking + # (the default) this is the recommended approach. When using systemd-networkd it's + # still possible to use this option, but it's recommended to use it in conjunction + # with explicit per-interface declarations with `networking.interfaces..useDHCP`. + # networking.nameservers = [ "1.1.1.1#one.one.one.one" "1.0.0.1#one.one.one.one" ]; + + services.resolved = { + enable = true; + dnssec = "false"; + domains = [ "~." ]; + fallbackDns = [ ]; + dnsovertls = "opportunistic"; + }; + + + networking.useDHCP = lib.mkDefault true; + networking.firewall.checkReversePath = false; + + # networking.interfaces.enp0s31f6.useDHCP = lib.mkDefault true; + # networking.interfaces.enp81s0u1u4.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp0s20f3.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + + # Enable OpenGL + hardware.graphics = { + enable = true; + }; + + # Load nvidia driver for Xorg and Wayland + services.xserver.videoDrivers = ["nvidia"]; + + hardware.nvidia = { + + # Modesetting is required. + modesetting.enable = true; + + # Nvidia power management. Experimental, and can cause sleep/suspend to fail. + # Enable this if you have graphical corruption issues or application crashes after waking + # up from sleep. This fixes it by saving the entire VRAM memory to /tmp/ instead + # of just the bare essentials. + powerManagement.enable = false; + + # Fine-grained power management. Turns off GPU when not in use. + # Experimental and only works on modern Nvidia GPUs (Turing or newer). + powerManagement.finegrained = false; + + # Use the NVidia open source kernel module (not to be confused with the + # independent third-party "nouveau" open source driver). + # Support is limited to the Turing and later architectures. Full list of + # supported GPUs is at: + # https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus + # Only available from driver 515.43.04+ + # Currently alpha-quality/buggy, so false is currently the recommended setting. + open = false; + + # Enable the Nvidia settings menu, + # accessible via `nvidia-settings`. + nvidiaSettings = false; + + # Optionally, you may need to select the appropriate driver version for your specific GPU. + package = config.boot.kernelPackages.nvidiaPackages.production; + + prime = { + offload = { + enable = true; + enableOffloadCmd = true; + }; + + sync.enable = false; + + intelBusId = "PCI:1:0:0"; + nvidiaBusId = "PCI:0:2:0"; + }; + }; +} diff --git a/nixos/services.nix b/nixos/services.nix deleted file mode 100644 index c7fac0e..0000000 --- a/nixos/services.nix +++ /dev/null @@ -1,3 +0,0 @@ -{config, lib, pkgs, ...}: -{ -} diff --git a/result b/result new file mode 120000 index 0000000..48f8b48 --- /dev/null +++ b/result @@ -0,0 +1 @@ +/nix/store/1jmg2rxq9px2hbk2kicq7kjpq8yzy00f-home-manager-generation \ No newline at end of file -- cgit v1.3.1