From 63c50cfa2a3f19a49a7ae54918fbe80c012844d3 Mon Sep 17 00:00:00 2001 From: Ranomier <> Date: Sun, 6 Oct 2024 02:44:35 +0200 Subject: [PATCH] uuuupdate --- flake.nix | 133 ++++++++++--------- hardware-configuration.nix | 43 +++--- hosts/crocoite.nix | 12 +- modules/basic_system_config.nix | 7 +- modules/boot_theming.nix | 5 +- modules/networking.nix | 11 +- modules/pkg_mgrmnt/flatpak.nix | 61 ++++++--- modules/pkg_mgrmnt/podman.nix | 5 +- modules/pkg_mgrmnt/store_pkg_file.nix | 19 +-- modules/sec_auth/firejail.nix | 12 +- modules/sec_auth/login-manager.nix | 19 ++- modules/sec_auth/ssh.nix | 4 +- modules/sec_auth/users_and_permissions.nix | 16 +-- modules/software/audio_video.nix | 7 +- modules/software/browser/brave.nix | 2 +- modules/software/browser/firefox.nix | 4 +- modules/software/game.nix | 10 +- modules/software/nix-helper/doc.nix | 3 +- modules/software/nix-helper/index.nix | 16 +-- modules/software/nix-helper/nix-ld.nix | 5 +- modules/software/obs-studio.nix | 7 +- modules/software/software.nix | 120 ++++++++--------- modules/software/virt.nix | 14 ++ modules/specific_hardware/bluetooth.nix | 2 +- modules/specific_hardware/fwupd.nix | 4 +- modules/specific_hardware/scan_and_print.nix | 23 ++-- modules/wm_and_de/hyprland.nix | 7 +- 27 files changed, 314 insertions(+), 257 deletions(-) create mode 100644 modules/software/virt.nix diff --git a/flake.nix b/flake.nix index 832ca64..6ad7d08 100644 --- a/flake.nix +++ b/flake.nix @@ -2,86 +2,91 @@ ###### inputs = { ###### - # NOTE: Replace "nixos-23.11" with that which is in system.stateVersion of - # configuration.nix. You can also use latter versions if you wish to - # upgrade. - # INFO: Use github:org/repo/?ref= to pin releases. # Main nix package repository nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05"; - # ready made hardware configurations. e.G.: Power saving - nixos-hardware.url = "github:NixOS/nixos-hardware/master"; + home-manager = { + url = "github:nix-community/home-manager/release-24.05"; + inputs.nixpkgs.follows = "nixpkgs"; + }; - # NixOS unstable channel - nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable"; + # ready made hardware configurations. e.G.: Power saving + nixos-hardware = { + url = "github:NixOS/nixos-hardware/master"; + }; # for managing flatpaks, like which ones are installed and which not nix-flatpak = { url = "github:gmodena/nix-flatpak"; }; - home-manager = { - url = "github:nix-community/home-manager/release-24.05"; - inputs.nixpkgs.follows = "nixpkgs"; - }; + # NixOS unstable channel + nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable"; }; ####### outputs = ####### - { self, nixpkgs, nixos-hardware, nixpkgs-unstable, nix-flatpak, home-manager, ... } @ inputs: - let - # Supported systems for your flake packages, shell, etc. - systems = [ - "aarch64-linux" - "x86_64-linux" - ]; - # This is a function that generates an attribute by calling a function you - # pass to it, with each system as an argument - forAllSystems = nixpkgs.lib.genAttrs systems; - in { - # Your custom packages - # Accessible through 'nix build', 'nix shell', etc - #packages = forAllSystems (system: import ./pkgs nixpkgs.legacyPackages.${system}); - # Formatter for your nix files, available through 'nix fmt' - # Other options beside 'alejandra' include 'nixpkgs-fmt' - #formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.alejandra); - - # Your custom packages and modifications, exported as overlays - overlays = import ./overlays {inherit inputs;}; - # Reusable nixos modules you might want to export - # These are usually stuff you would upstream into nixpkgs - nixosModules = import ./modules/nixos; - # Reusable home-manager modules you might want to export - # These are usually stuff you would upstream into home-manager - homeManagerModules = import ./modules/home-manager; - - # NixOS configuration entrypoint - # Available through 'nixos-rebuild --flake .#your-hostname' - nixosConfigurations = { - # FIXME replace with your hostname - crocoite = nixpkgs.lib.nixosSystem { - specialArgs = {inherit inputs;}; - modules = [ - # > Our main nixos configuration file < - ./hosts/crocoite.nix - ]; - }; + { + self, + nixpkgs, + nixos-hardware, + nixpkgs-unstable, + nix-flatpak, + home-manager, + ... + } @ inputs: let + # Supported systems for your flake packages, shell, etc. + systems = [ + # "aarch64-linux" + "x86_64-linux" + ]; + + # This is a function that generates an attribute by calling a function you + # pass to it, with each system as an argument + forAllSystems = nixpkgs.lib.genAttrs systems; + in { + # Your custom packages + # Accessible through 'nix build', 'nix shell', etc + #packages = forAllSystems (system: import ./pkgs nixpkgs.legacyPackages.${system}); + # Formatter for your nix files, available through 'nix fmt' + # Other options beside 'alejandra' include 'nixpkgs-fmt' + formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.alejandra); + + # Your custom packages and modifications, exported as overlays + overlays = import ./overlays {inherit inputs;}; + # Reusable nixos modules you might want to export + # These are usually stuff you would upstream into nixpkgs + nixosModules = import ./modules/nixos; + # Reusable home-manager modules you might want to export + # These are usually stuff you would upstream into home-manager + homeManagerModules = import ./modules/home-manager; + + # NixOS configuration entrypoint + # Available through 'nixos-rebuild --flake .#your-hostname' + nixosConfigurations = { + crocoite = nixpkgs.lib.nixosSystem { + specialArgs = {inherit inputs;}; + modules = [ + # > Our main nixos configuration file < + ./hosts/crocoite.nix + ]; }; - - ## Standalone home-manager configuration entrypoint - ## Available through 'home-manager --flake .#your-username@your-hostname' - #homeConfigurations = { - # # FIXME replace with your username@hostname - # "your-username@your-hostname" = home-manager.lib.homeManagerConfiguration { - # pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance - # extraSpecialArgs = {inherit inputs;}; - # modules = [ - # # > Our main home-manager configuration file < - # ./home-manager/home.nix - # ]; - # }; - #}; }; + + ## Standalone home-manager configuration entrypoint + ## Available through 'home-manager --flake .#your-username@your-hostname' + #homeConfigurations = { + # # FIXME replace with your username@hostname + # "your-username@your-hostname" = home-manager.lib.homeManagerConfiguration { + # pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance + # extraSpecialArgs = {inherit inputs;}; + # modules = [ + # # > Our main home-manager configuration file < + # ./home-manager/home.nix + # ]; + # }; + #}; + }; } diff --git a/hardware-configuration.nix b/hardware-configuration.nix index c884c1b..f4a0453 100644 --- a/hardware-configuration.nix +++ b/hardware-configuration.nix @@ -1,33 +1,36 @@ # 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, ... }: { + config, + lib, + pkgs, + modulesPath, + ... +}: { + imports = [ + (modulesPath + "/installer/scan/not-detected.nix") + ]; - imports = - [ (modulesPath + "/installer/scan/not-detected.nix") - ]; + boot.initrd.availableKernelModules = ["nvme" "ehci_pci" "xhci_pci" "usb_storage" "sd_mod" "rtsx_pci_sdmmc"]; + boot.initrd.kernelModules = []; + boot.kernelModules = ["kvm-amd"]; + boot.extraModulePackages = []; - boot.initrd.availableKernelModules = [ "nvme" "ehci_pci" "xhci_pci" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-amd" ]; - boot.extraModulePackages = [ ]; - - fileSystems."/" = - { device = "/dev/disk/by-uuid/c772918e-3832-45ae-8c97-05b3d837ed8b"; - fsType = "ext4"; - }; + fileSystems."/" = { + device = "/dev/disk/by-uuid/c772918e-3832-45ae-8c97-05b3d837ed8b"; + fsType = "ext4"; + }; boot.initrd.luks.devices."luks-3b194756-e29b-425a-b088-0a0468840011".device = "/dev/disk/by-uuid/3b194756-e29b-425a-b088-0a0468840011"; - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/5DF2-A721"; - fsType = "vfat"; - options = [ "fmask=0022" "dmask=0022" ]; - }; - - swapDevices = [ ]; + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/5DF2-A721"; + fsType = "vfat"; + options = ["fmask=0022" "dmask=0022"]; + }; + swapDevices = []; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; diff --git a/hosts/crocoite.nix b/hosts/crocoite.nix index 45baf70..e8c99ff 100644 --- a/hosts/crocoite.nix +++ b/hosts/crocoite.nix @@ -1,4 +1,9 @@ -{ pkgs, overlays, inputs, ... }: { +{ + pkgs, + overlays, + inputs, + ... +}: { #MANPAGER='nvim +Man!' # This value determines the NixOS release from which the default @@ -15,10 +20,10 @@ #nixpkgs.overlays = [ overlays.unstable-packages ]; - nix.settings.experimental-features = [ "nix-command" "flakes" ]; + nix.settings.experimental-features = ["nix-command" "flakes"]; # https://lix.systems/ Lix is a modern, delicious implementation of the Nix package manager, - # focused on correctness, usability, and growth – + # focused on correctness, usability, and growth – # and committed to doing right by its community. nix.package = pkgs.lix; imports = [ @@ -41,6 +46,7 @@ ../modules/sec_auth/ssh.nix ../modules/software/software.nix + ../modules/software/virt.nix ../modules/software/game.nix ../modules/software/audio_video.nix ../modules/software/obs-studio.nix diff --git a/modules/basic_system_config.nix b/modules/basic_system_config.nix index 246f696..1a4257d 100644 --- a/modules/basic_system_config.nix +++ b/modules/basic_system_config.nix @@ -1,5 +1,8 @@ -{ config, pkgs, ... }: -{ +{ + config, + pkgs, + ... +}: { # Bootloader. boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.configurationLimit = 20; diff --git a/modules/boot_theming.nix b/modules/boot_theming.nix index 0d14137..3070300 100644 --- a/modules/boot_theming.nix +++ b/modules/boot_theming.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: { +{pkgs, ...}: { boot = let theme_name = "deus_ex"; in { @@ -11,7 +11,7 @@ themePackages = with pkgs; [ # By default we would install all themes (adi1090x-plymouth-themes.override { - selected_themes = [ theme_name ]; + selected_themes = [theme_name]; }) ]; }; @@ -32,6 +32,5 @@ # It's still possible to open the bootloader list by pressing any key # It will just not appear on screen unless a key is pressed loader.timeout = 0; - }; } diff --git a/modules/networking.nix b/modules/networking.nix index 882d87d..a014593 100644 --- a/modules/networking.nix +++ b/modules/networking.nix @@ -1,5 +1,8 @@ -{ pkgs, lib, ... }: -{ +{ + pkgs, + lib, + ... +}: { # Configure network proxy if necessary # networking.proxy.default = "http://user:password@proxy:port/"; # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; @@ -30,8 +33,8 @@ # networking.interfaces.enp5s0.useDHCP = lib.mkDefault true; # networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true; # Open ports in the firewall. - #networking.firewall.allowedTCPPorts = [ 8080 ]; - #networking.firewall.allowedUDPPorts = [ 8080 ]; + networking.firewall.allowedTCPPorts = [8080]; + networking.firewall.allowedUDPPorts = [8080]; # Or disable the firewall altogether. # networking.firewall.enable = false; diff --git a/modules/pkg_mgrmnt/flatpak.nix b/modules/pkg_mgrmnt/flatpak.nix index 3496a08..64400d5 100644 --- a/modules/pkg_mgrmnt/flatpak.nix +++ b/modules/pkg_mgrmnt/flatpak.nix @@ -1,31 +1,60 @@ -{ lib, ... }: { - +{lib, ...}: { services.flatpak.enable = true; services.flatpak.update.auto.enable = false; services.flatpak.uninstallUnmanaged = true; services.flatpak.remotes = lib.mkOptionDefault [ - { name = "flathub-beta"; - location = "https://flathub.org/beta-repo/flathub-beta.flatpakrepo"; } - { name = "flathub"; - location = "https://dl.flathub.org/repo/flathub.flatpakrepo"; } + { + name = "flathub-beta"; + location = "https://flathub.org/beta-repo/flathub-beta.flatpakrepo"; + } + { + name = "flathub"; + location = "https://dl.flathub.org/repo/flathub.flatpakrepo"; + } ]; services.flatpak.packages = [ - { origin = "flathub"; appId = "com.github.tchx84.Flatseal"; } # flatpak permisssion gui - { origin = "flathub"; appId = "com.mojang.Minecraft"; } # Lego for adults - { origin = "flathub"; appId = "de.schmidhuberj.DieBahn"; } # Public transport connection viewer - { origin = "flathub"; appId = "com.github.hugolabe.Wike"; } # Wikpedia, but in nice + { + origin = "flathub"; + appId = "com.github.tchx84.Flatseal"; + } # flatpak permisssion gui + { + origin = "flathub"; + appId = "com.mojang.Minecraft"; + } # Lego for adults + { + origin = "flathub"; + appId = "de.schmidhuberj.DieBahn"; + } # Public transport connection viewer + { + origin = "flathub"; + appId = "com.github.hugolabe.Wike"; + } # Wikpedia, but in nice #{ origin = "flathub"; appId = "com.jeffser.Alpaca"; } # Local chat AI - { origin = "flathub"; appId = "io.gpt4all.gpt4all"; } # Local chat AI - { origin = "flathub"; appId = "md.obsidian.Obsidian"; } # note taking and brain organising + { + origin = "flathub"; + appId = "io.gpt4all.gpt4all"; + } # Local chat AI + { + origin = "flathub"; + appId = "md.obsidian.Obsidian"; + } # note taking and brain organising # messenger - { origin = "flathub"; appId = "org.signal.Signal"; } - { origin = "flathub"; appId = "org.telegram.desktop"; } - { origin = "flathub"; appId = "dev.vencord.Vesktop"; } # More usable discord for linux + { + origin = "flathub"; + appId = "org.signal.Signal"; + } + { + origin = "flathub"; + appId = "org.telegram.desktop"; + } + { + origin = "flathub"; + appId = "dev.vencord.Vesktop"; + } # More usable discord for linux #"com.obsproject.Studio" #this is another way to write it ]; - } diff --git a/modules/pkg_mgrmnt/podman.nix b/modules/pkg_mgrmnt/podman.nix index 5c81ce6..5da164a 100644 --- a/modules/pkg_mgrmnt/podman.nix +++ b/modules/pkg_mgrmnt/podman.nix @@ -1,5 +1,4 @@ -{ pkgs, ... }: -{ +{pkgs, ...}: { # Enable common container config files in /etc/containers virtualisation.containers.enable = true; virtualisation = { @@ -12,7 +11,7 @@ dockerSocket.enable = true; # Required for containers under podman-compose to be able to talk to each other. - defaultNetwork.settings.dns_enabled = true; + defaultNetwork.settings.dns_enabled = true; }; }; diff --git a/modules/pkg_mgrmnt/store_pkg_file.nix b/modules/pkg_mgrmnt/store_pkg_file.nix index d62f1ae..1eb7d31 100644 --- a/modules/pkg_mgrmnt/store_pkg_file.nix +++ b/modules/pkg_mgrmnt/store_pkg_file.nix @@ -1,10 +1,13 @@ -{ config, pkgs, ... }: { +{ + config, + pkgs, + ... +}: { # creates the file /etc/current-system-packages which then contains all installed packages and versions - environment.etc."current-system-packages".text = - let - packages = builtins.map (p: "${p.name}") config.environment.systemPackages; - sortedUnique = builtins.sort builtins.lessThan (pkgs.lib.lists.unique packages); - formatted = builtins.concatStringsSep "\n" sortedUnique; - in - formatted; + environment.etc."current-system-packages".text = let + packages = builtins.map (p: "${p.name}") config.environment.systemPackages; + sortedUnique = builtins.sort builtins.lessThan (pkgs.lib.lists.unique packages); + formatted = builtins.concatStringsSep "\n" sortedUnique; + in + formatted; } diff --git a/modules/sec_auth/firejail.nix b/modules/sec_auth/firejail.nix index e9571b4..1d23d1e 100644 --- a/modules/sec_auth/firejail.nix +++ b/modules/sec_auth/firejail.nix @@ -1,9 +1,8 @@ # TODO refine firejail it seems that / is not shielded enough and app armor does not work -{ pkgs, ... }: -{ +{pkgs, ...}: { programs.firejail = { - enable = true; - wrappedBinaries = { + enable = true; + wrappedBinaries = { firefox = { executable = "${pkgs.firefox}/bin/firefox"; profile = "${pkgs.firejail}/etc/firejail/firefox.profile"; @@ -51,11 +50,10 @@ }; }; environment.etc = { - "firejail/brave.local".text = '' + "firejail/brave.local".text = '' whitelist ''${HOME}/.config/brave whitelist ''${HOME}/.local whitelist ''${HOME}/Downloads - ''; + ''; }; - } diff --git a/modules/sec_auth/login-manager.nix b/modules/sec_auth/login-manager.nix index 7d8ce5e..9019b0e 100644 --- a/modules/sec_auth/login-manager.nix +++ b/modules/sec_auth/login-manager.nix @@ -1,5 +1,4 @@ -{ pkgs, ... }: -{ +{pkgs, ...}: { # Enable touchpad support (enabled default in most desktopManager). # services.xserver.libinput.enable = true; services.greetd = { @@ -7,14 +6,14 @@ vt = 7; settings = { default_session = { - command = ''${pkgs.greetd.tuigreet}/bin/tuigreet \ - --time \ - --time-format '%Y-%m-%dT%H:%M:%S %A' \ - --remember \ - --user-menu \ - --theme 'border=lightgreen;text=lightgreen;prompt=lightgreen;time=lightgreen;action=lightgreen;button=lightgreen;input=lightgreen' \ - --cmd hyprland''; - # removed elements from theme: container + command = '' ${pkgs.greetd.tuigreet}/bin/tuigreet \ + --time \ + --time-format '%Y-%m-%dT%H:%M:%S %A' \ + --remember \ + --user-menu \ + --theme 'border=lightgreen;text=lightgreen;prompt=lightgreen;time=lightgreen;action=lightgreen;button=lightgreen;input=lightgreen' \ + --cmd hyprland''; + # removed elements from theme: container user = "greeter"; }; }; diff --git a/modules/sec_auth/ssh.nix b/modules/sec_auth/ssh.nix index ea86457..4501430 100644 --- a/modules/sec_auth/ssh.nix +++ b/modules/sec_auth/ssh.nix @@ -1,5 +1,4 @@ -{ pkgs, ... }: -{ +{pkgs, ...}: { programs.ssh = { startAgent = true; enableAskPassword = true; @@ -18,7 +17,6 @@ lxqt.lxqt-openssh-askpass ]; - # Some programs need SUID wrappers, can be configured further or are # started in user sessions. # programs.mtr.enable = true; diff --git a/modules/sec_auth/users_and_permissions.nix b/modules/sec_auth/users_and_permissions.nix index b7241dd..5d5e922 100644 --- a/modules/sec_auth/users_and_permissions.nix +++ b/modules/sec_auth/users_and_permissions.nix @@ -1,10 +1,9 @@ -{ pkgs, ... }: -{ +{pkgs, ...}: { # Define a user account. Don't forget to set a password with ‘passwd’. users.users.ranomier = { isNormalUser = true; description = "Ranomier"; - extraGroups = [ "networkmanager" "wheel" ]; + extraGroups = ["networkmanager" "wheel"]; #packages = with pkgs; []; }; @@ -23,14 +22,14 @@ # This is using a rec (recursive) expression to set and access XDG_BIN_HOME within the expression # For more on rec expressions see https://nix.dev/tutorials/first-steps/nix-language#recursive-attribute-set-rec environment.sessionVariables = rec { - XDG_CACHE_HOME = "$HOME/.cache"; + XDG_CACHE_HOME = "$HOME/.cache"; XDG_CONFIG_HOME = "$HOME/.config"; - XDG_DATA_HOME = "$HOME/.local/share"; - XDG_STATE_HOME = "$HOME/.local/state"; + XDG_DATA_HOME = "$HOME/.local/share"; + XDG_STATE_HOME = "$HOME/.local/state"; # Not officially in the specification - XDG_BIN_HOME = "$HOME/.local/mybin"; - PATH = [ + XDG_BIN_HOME = "$HOME/.local/mybin"; + PATH = [ "${XDG_BIN_HOME}" ]; }; @@ -48,7 +47,6 @@ security.apparmor.enable = true; - # Some programs need SUID wrappers, can be configured further or are # started in user sessions. # programs.mtr.enable = true; diff --git a/modules/software/audio_video.nix b/modules/software/audio_video.nix index d72df37..8ba0b38 100644 --- a/modules/software/audio_video.nix +++ b/modules/software/audio_video.nix @@ -1,5 +1,4 @@ -{ pkgs, ... }: -{ +{pkgs, ...}: { # Enable sound with pipewire. hardware.pulseaudio.enable = false; security.rtkit.enable = true; @@ -52,5 +51,7 @@ environment.systemPackages = with pkgs; [ helvum easyeffects - ]; + pwvucontrol + lxqt.pavucontrol-qt + ]; } diff --git a/modules/software/browser/brave.nix b/modules/software/browser/brave.nix index 691e641..04560ef 100644 --- a/modules/software/browser/brave.nix +++ b/modules/software/browser/brave.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: { +{pkgs, ...}: { environment.systemPackages = with pkgs; [ brave ]; diff --git a/modules/software/browser/firefox.nix b/modules/software/browser/firefox.nix index 526f14c..3f4b90a 100644 --- a/modules/software/browser/firefox.nix +++ b/modules/software/browser/firefox.nix @@ -1,8 +1,8 @@ -{ pkgs, ... }: { +{pkgs, ...}: { # The logical browser of choice programs.firefox.enable = true; - xdg.mime.defaultApplications = let + xdg.mime.defaultApplications = let browser_desktop_file = "firefox.desktop"; in { "text/html" = browser_desktop_file; diff --git a/modules/software/game.nix b/modules/software/game.nix index c857ddc..eebdd19 100644 --- a/modules/software/game.nix +++ b/modules/software/game.nix @@ -1,6 +1,6 @@ -{ pkgs, ... }: { +{pkgs, ...}: { #environment.systemPackages = with pkgs; [ ]; - # hardware.steam-hardware.enable = true; # Note that this is already enabled with programs.steam.enable = true; + # hardware.steam-hardware.enable = true; # Note that this is already enabled with programs.steam.enable = true; programs.steam = { enable = true; remotePlay.openFirewall = @@ -29,9 +29,9 @@ # environment.systemPackages = with pkgs; [ # (steam.override { /* Your overrides here */ }).run # ]; - # Install the game by setting the executable attribute on the installer and then running it via steam-run ./your_installer.sh. After installation, edit the "~/.local/share/applications/your_game.desktop" and replace the exec line from Exec="/home/user/game/start.sh" "" with Exec="steam-run" "/home/user/game/start.sh". + # Install the game by setting the executable attribute on the installer and then running it via steam-run ./your_installer.sh. After installation, edit the "~/.local/share/applications/your_game.desktop" and replace the exec line from Exec="/home/user/game/start.sh" "" with Exec="steam-run" "/home/user/game/start.sh". - environment.systemPackages = with pkgs; [ steam-run ]; + environment.systemPackages = with pkgs; [steam-run]; - programs.steam.extraCompatPackages = with pkgs; [ proton-ge-bin ]; + programs.steam.extraCompatPackages = with pkgs; [proton-ge-bin]; } diff --git a/modules/software/nix-helper/doc.nix b/modules/software/nix-helper/doc.nix index e58a62a..2b5d251 100644 --- a/modules/software/nix-helper/doc.nix +++ b/modules/software/nix-helper/doc.nix @@ -1,5 +1,4 @@ -{ pkgs, ... }: -{ +{pkgs, ...}: { nix.extraOptions = '' plugin-files = ${pkgs.nix-doc}/lib/libnix_doc_plugin.so ''; diff --git a/modules/software/nix-helper/index.nix b/modules/software/nix-helper/index.nix index 3de3133..2733242 100644 --- a/modules/software/nix-helper/index.nix +++ b/modules/software/nix-helper/index.nix @@ -1,11 +1,11 @@ -{ pkgs, ... }: { +{pkgs, ...}: { environment.systemPackages = with pkgs; [ nix-index - ]; - - programs.command-not-found.enable = false; - # for home-manager, use programs.bash.initExtra instead - programs.bash.interactiveShellInit = '' - source ${pkgs.nix-index}/etc/profile.d/command-not-found.sh - ''; + ]; + + programs.command-not-found.enable = false; + # for home-manager, use programs.bash.initExtra instead + programs.bash.interactiveShellInit = '' + source ${pkgs.nix-index}/etc/profile.d/command-not-found.sh + ''; } diff --git a/modules/software/nix-helper/nix-ld.nix b/modules/software/nix-helper/nix-ld.nix index f523523..7b38e02 100644 --- a/modules/software/nix-helper/nix-ld.nix +++ b/modules/software/nix-helper/nix-ld.nix @@ -1,9 +1,8 @@ -{ pkgs, ... }: -{ +{pkgs, ...}: { # to run normal external binaries programs.nix-ld.enable = true; programs.nix-ld.libraries = with pkgs; [ - # Add any missing dynamic libraries for unpackaged + # Add any missing dynamic libraries for unpackaged # programs here, NOT in environment.systemPackages ]; } diff --git a/modules/software/obs-studio.nix b/modules/software/obs-studio.nix index c8a629c..a93ee14 100644 --- a/modules/software/obs-studio.nix +++ b/modules/software/obs-studio.nix @@ -1,5 +1,8 @@ -{ pkgs, config, ... }: { + pkgs, + config, + ... +}: { environment.systemPackages = [ (pkgs.wrapOBS { plugins = with pkgs.obs-studio-plugins; [ @@ -12,7 +15,7 @@ boot.extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback ]; - boot.kernelModules = [ "v4l2loopback" ]; + boot.kernelModules = ["v4l2loopback"]; boot.extraModprobeConfig = '' options v4l2loopback devices=1 video_nr=1 card_label="OBS Cam" exclusive_caps=1 ''; diff --git a/modules/software/software.nix b/modules/software/software.nix index 35db291..dbb8095 100644 --- a/modules/software/software.nix +++ b/modules/software/software.nix @@ -1,18 +1,15 @@ -{ pkgs, inputs, config, ... }: let - unstable_list = [ inputs.nixpkgs-unstable.legacyPackages."x86_64-linux".neovim ]; +{ + pkgs, + inputs, + config, + ... +}: let + unstable_list = [inputs.nixpkgs-unstable.legacyPackages."x86_64-linux".neovim]; in { # also opens the TCP and UDP port from 1714 to 1764 programs.kdeconnect.enable = true; - # for running android apps - virtualisation.waydroid.enable = - true; # also starts the systemd service waydroid-container - - # virt manager, for running VM's - virtualisation.libvirtd.enable = true; - programs.virt-manager.enable = true; - - environment.pathsToLink = [ "/share/foot" ]; + environment.pathsToLink = ["/share/foot"]; # List packages installed in system profile. To search, run: # $ nix search wget @@ -21,59 +18,60 @@ in { export GDK_BACKEND='x11' exec "${pkgs.amberol}/bin/amberol" "$@" ''; - in with pkgs; [ - # low level stuff - efibootmgr - #exfat - exfatprogs - greetd.greetd - greetd.tuigreet - killall - vulnix + in + with pkgs; + [ + # low level stuff + efibootmgr + #exfat + exfatprogs + greetd.greetd + greetd.tuigreet + killall + vulnix - # hardware - brightnessctl - usbutils - lm_sensors + # hardware + brightnessctl + usbutils + lm_sensors - # neovim - # unstable.neovim - git - gnumake - gcc - nodePackages.npm - nodejs-slim - python3 - fd - nodejs-slim - cargo - rustc + # neovim + # unstable.neovim + git + gnumake + gcc + nodePackages.npm + nodejs-slim + python3 + fd + nodejs-slim + cargo + rustc - # tooling - htop - ncdu - wget - miniserve - file - unzip - tmux - qemu - home-manager - - # move to homemanager? - lxqt.pavucontrol-qt - mumble - amberol_wrapper - amberol - mpv - zathura - feh - #unstable.obsidian - keepassxc - #minecraft - element-desktop - ] ++ unstable_list; + # tooling + htop + ncdu + wget + miniserve + file + unzip + tmux + qemu + home-manager + # move to homemanager? + mumble + amberol_wrapper + amberol + mpv + zathura + feh + #unstable.obsidian + keepassxc + #minecraft + element-desktop + ] + ++ unstable_list; fonts.packages = with pkgs; [ noto-fonts @@ -89,7 +87,7 @@ in { fira-code-symbols #droid-sans-mono (nerdfonts.override { - fonts = [ "FiraCode" "DroidSansMono" "JetBrainsMono" ]; + fonts = ["FiraCode" "DroidSansMono" "JetBrainsMono"]; }) ]; } diff --git a/modules/software/virt.nix b/modules/software/virt.nix new file mode 100644 index 0000000..b857c89 --- /dev/null +++ b/modules/software/virt.nix @@ -0,0 +1,14 @@ +{ + pkgs, + inputs, + config, + ... +}: { + # for running android apps + virtualisation.waydroid.enable = + true; # also starts the systemd service waydroid-container + + # virt manager, for running VM's + virtualisation.libvirtd.enable = true; + programs.virt-manager.enable = true; +} diff --git a/modules/specific_hardware/bluetooth.nix b/modules/specific_hardware/bluetooth.nix index 0c6577c..d25a0ec 100644 --- a/modules/specific_hardware/bluetooth.nix +++ b/modules/specific_hardware/bluetooth.nix @@ -1,4 +1,4 @@ -{ ... }:{ +{...}: { hardware.bluetooth.enable = true; # enables support for Bluetooth hardware.bluetooth.powerOnBoot = false; # powers up the default Bluetooth controller on boot diff --git a/modules/specific_hardware/fwupd.nix b/modules/specific_hardware/fwupd.nix index c1e556d..e3754bf 100644 --- a/modules/specific_hardware/fwupd.nix +++ b/modules/specific_hardware/fwupd.nix @@ -1,4 +1,4 @@ -{ ... }:{ - # A system daemon to allow session software to update firmware +{...}: { + # A system daemon to allow session software to update firmware services.fwupd.enable = true; } diff --git a/modules/specific_hardware/scan_and_print.nix b/modules/specific_hardware/scan_and_print.nix index 7758978..a83884c 100644 --- a/modules/specific_hardware/scan_and_print.nix +++ b/modules/specific_hardware/scan_and_print.nix @@ -1,20 +1,21 @@ -{ pkgs, ... }: -{ +{pkgs, ...}: { hardware.sane.enable = true; # enables support for SANE scanners - services.ipp-usb.enable=true; # enable usb support + services.ipp-usb.enable = true; # enable usb support hardware.sane.backends-package = pkgs.sane-backends.overrideAttrs (old: { - configureFlags = (old.configureFlags or []) ++ [ - # "--localstatedir=/var" # `sane-backends` puts e.g. lock files in here, must not be in /nix/store - # "--with-lockdir=/var/lock/sane" # `sane-backends` puts e.g. lock files in here, must not be in /nix/store + configureFlags = + (old.configureFlags or []) + ++ [ + # "--localstatedir=/var" # `sane-backends` puts e.g. lock files in here, must not be in /nix/store + # "--with-lockdir=/var/lock/sane" # `sane-backends` puts e.g. lock files in here, must not be in /nix/store - # Ugly workaround for https://github.com/NixOS/nixpkgs/issues/273280#issuecomment-1848873028 - # Really we should make `sane-backends` be able to provide a real lock dir (e.g. `/var/lock/sane`). - "--disable-locking" - ]; + # Ugly workaround for https://github.com/NixOS/nixpkgs/issues/273280#issuecomment-1848873028 + # Really we should make `sane-backends` be able to provide a real lock dir (e.g. `/var/lock/sane`). + "--disable-locking" + ]; }); - users.users.ranomier.extraGroups = [ "scanner" "lp" ]; + users.users.ranomier.extraGroups = ["scanner" "lp"]; # only for the scan and maybe print clients environment.systemPackages = with pkgs; [ diff --git a/modules/wm_and_de/hyprland.nix b/modules/wm_and_de/hyprland.nix index 6310438..7c71e16 100644 --- a/modules/wm_and_de/hyprland.nix +++ b/modules/wm_and_de/hyprland.nix @@ -1,5 +1,4 @@ -{ pkgs, ... }: { - +{pkgs, ...}: { # Enable the X11 windowing system. # You can disable this if you're only using the Wayland session. services.xserver.enable = false; @@ -38,7 +37,7 @@ platformTheme = "qt5ct"; style = "kvantum"; }; - + # List packages installed in system profile. To search, run: # $ nix search wget environment.systemPackages = with pkgs; [ @@ -63,7 +62,7 @@ slurp satty flameshot - + # theming gruvbox-plus-icons gruvbox-gtk-theme