diff --git a/flake.lock b/flake.lock index c3adb17..b2469bc 100644 --- a/flake.lock +++ b/flake.lock @@ -7,11 +7,11 @@ ] }, "locked": { - "lastModified": 1734366194, - "narHash": "sha256-vykpJ1xsdkv0j8WOVXrRFHUAdp9NXHpxdnn1F4pYgSw=", + "lastModified": 1739757849, + "narHash": "sha256-Gs076ot1YuAAsYVcyidLKUMIc4ooOaRGO0PqTY7sBzA=", "owner": "nix-community", "repo": "home-manager", - "rev": "80b0fdf483c5d1cb75aaad909bd390d48673857f", + "rev": "9d3d080aec2a35e05a15cedd281c2384767c2cfe", "type": "github" }, "original": { @@ -23,11 +23,11 @@ }, "nix-flatpak": { "locked": { - "lastModified": 1734864618, - "narHash": "sha256-8SCTJhDH1fdNGGFhuGStIqbO7vwUKQokgQu6nQlQagY=", + "lastModified": 1739444422, + "narHash": "sha256-iAVVHi7X3kWORftY+LVbRiStRnQEob2TULWyjMS6dWg=", "owner": "gmodena", "repo": "nix-flatpak", - "rev": "13be795cac27df7044a425c0b2de3a42b10ddb18", + "rev": "5e54c3ca05a7c7d968ae1ddeabe01d2a9bc1e177", "type": "github" }, "original": { @@ -36,13 +36,49 @@ "type": "github" } }, + "nixlib": { + "locked": { + "lastModified": 1736643958, + "narHash": "sha256-tmpqTSWVRJVhpvfSN9KXBvKEXplrwKnSZNAoNPf/S/s=", + "owner": "nix-community", + "repo": "nixpkgs.lib", + "rev": "1418bc28a52126761c02dd3d89b2d8ca0f521181", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixpkgs.lib", + "type": "github" + } + }, + "nixos-generators": { + "inputs": { + "nixlib": "nixlib", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1737057290, + "narHash": "sha256-3Pe0yKlCc7EOeq1X/aJVDH0CtNL+tIBm49vpepwL1MQ=", + "owner": "nix-community", + "repo": "nixos-generators", + "rev": "d002ce9b6e7eb467cd1c6bb9aef9c35d191b5453", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixos-generators", + "type": "github" + } + }, "nixos-hardware": { "locked": { - "lastModified": 1734954597, - "narHash": "sha256-QIhd8/0x30gEv8XEE1iAnrdMlKuQ0EzthfDR7Hwl+fk=", + "lastModified": 1740089251, + "narHash": "sha256-Y78mDBWoO8CLLTjQfPfII+KXFb6lAmF9GrLbyVBsIMM=", "owner": "NixOS", "repo": "nixos-hardware", - "rev": "def1d472c832d77885f174089b0d34854b007198", + "rev": "18e9f9753e9ae261bcc7d3abe15745686991fd30", "type": "github" }, "original": { @@ -54,11 +90,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1734875076, - "narHash": "sha256-Pzyb+YNG5u3zP79zoi8HXYMs15Q5dfjDgwCdUI5B0nY=", + "lastModified": 1739923778, + "narHash": "sha256-BqUY8tz0AQ4to2Z4+uaKczh81zsGZSYxjgvtw+fvIfM=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "1807c2b91223227ad5599d7067a61665c52d1295", + "rev": "36864ed72f234b9540da4cf7a0c49e351d30d3f1", "type": "github" }, "original": { @@ -70,11 +106,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1734649271, - "narHash": "sha256-4EVBRhOjMDuGtMaofAIqzJbg4Ql7Ai0PSeuVZTHjyKQ=", + "lastModified": 1739866667, + "narHash": "sha256-EO1ygNKZlsAC9avfcwHkKGMsmipUk1Uc0TbrEZpkn64=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "d70bd19e0a38ad4790d3913bf08fcbfc9eeca507", + "rev": "73cf49b8ad837ade2de76f87eb53fc85ed5d4680", "type": "github" }, "original": { @@ -88,6 +124,7 @@ "inputs": { "home-manager": "home-manager", "nix-flatpak": "nix-flatpak", + "nixos-generators": "nixos-generators", "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs", "nixpkgs-unstable": "nixpkgs-unstable" diff --git a/flake.nix b/flake.nix index 287f0c1..b3ed743 100644 --- a/flake.nix +++ b/flake.nix @@ -12,18 +12,20 @@ inputs.nixpkgs.follows = "nixpkgs"; }; + # generating filesystems in different formats + nixos-generators = { + url = "github:nix-community/nixos-generators"; + 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"; - }; + 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"; - }; + nix-flatpak.url = "github:gmodena/nix-flatpak"; }; ####### @@ -36,6 +38,7 @@ nixpkgs-unstable, nix-flatpak, home-manager, + nixos-generators, ... } @ inputs: let # Supported systems for your flake packages, shell, etc. @@ -68,7 +71,7 @@ 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; + #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; @@ -76,8 +79,7 @@ # NixOS configuration entrypoint # Available through 'nixos-rebuild --flake .#your-hostname' nixosConfigurations = - host_helper "crocoite" # // (host_helper example); - // host_helper "factorio"; + host_helper "crocoite"; # // (host_helper example); ## Standalone home-manager configuration entrypoint ## Available through 'home-manager --flake .#your-username@your-hostname' @@ -92,5 +94,33 @@ # ]; # }; #}; + + packages.x86_64-linux = { + factorio = nixos-generators.nixosGenerate { + system = "x86_64-linux"; + modules = [ + # you can include your own nixos configuration here, i.e. + ./hosts/factorio/factorio.nix + ]; + + customFormats = { + "myFormat" = { + lib, + modulesPath, + ... + }: { + imports = [ + "${toString modulesPath}/virtualisation/proxmox-lxc.nix" + ]; + boot.loader.grub.enable = lib.mkForce false; + boot.loader.systemd-boot.enable = lib.mkForce false; + formatAttr = "tarball"; + fileExtension = "asd.tar.xz"; + }; + }; + format = "myFormat"; + #format = "vmware"; + }; + }; }; } diff --git a/hosts/crocoite/crocoite.nix b/hosts/crocoite/crocoite.nix index 4a75200..c48608e 100644 --- a/hosts/crocoite/crocoite.nix +++ b/hosts/crocoite/crocoite.nix @@ -6,8 +6,6 @@ }: { networking.hostName = "crocoite"; # Define your hostname. - #MANPAGER='nvim +Man!' - # This value determines the NixOS release from which the default # settings for stateful data, like file locations and database versions # on your system were taken. It‘s perfectly fine and recommended to leave @@ -74,6 +72,8 @@ ../../modules/software ../../modules/software/browser ../../modules/software/nix-helper + ../../modules/software/shells + ../../modules/software/office ../../modules/wm_and_de diff --git a/hosts/factorio/boot.nix b/hosts/factorio/boot.nix index ca6a350..0c1d56d 100644 --- a/hosts/factorio/boot.nix +++ b/hosts/factorio/boot.nix @@ -1,6 +1,6 @@ {...}: { # Use the GRUB 2 boot loader. - boot.loader.grub.enable = true; + #boot.loader.grub.enable = true; # Define on which hard drive you want to install Grub. - boot.loader.grub.device = "/dev/sda"; # or "nodev" for efi only + #boot.loader.grub.device = "/dev/sda"; # or "nodev" for efi only } diff --git a/hosts/factorio/factorio.nix b/hosts/factorio/factorio.nix index e504fae..d5e134b 100644 --- a/hosts/factorio/factorio.nix +++ b/hosts/factorio/factorio.nix @@ -1,50 +1,59 @@ -{pkgs, ...}: { +{ + pkgs, + lib, + modulesPath, + ... +}: { # This value determines the NixOS release from which the default # settings for stateful data, like file locations and database versions # on your system were taken. It‘s perfectly fine and recommended to leave # this value at the release version of the first install of this system. # Before changing this value read the documentation for this option # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). - system.stateVersion = "24.05"; # Did you read the comment? + system.stateVersion = "24.11"; # Did you read the comment? + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - nixpkgs = { - # You can add overlays here - #overlays = with inputs.self.overlays; [ - # Add overlays your own flake exports (from overlays and pkgs dir): - #additions - #modifications - #unstable-packages - - # You can also add overlays exported from other flakes: - # neovim-nightly-overlay.overlays.default - - # Or define it inline, for example: - # (final: prev: { - # hi = final.hello.overrideAttrs (oldAttrs: { - # patches = [ ./change-hello-to-hi.patch ]; - # }); - # }) - #]; - # Configure your nixpkgs instance - config = { - # Disable if you don't want unfree packages - allowUnfree = true; - }; + nixpkgs.config = { + # Disable if you don't want unfree packages + allowUnfree = true; }; - 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 – # and committed to doing right by its community. nix.package = pkgs.lix; + imports = [ #nixos-hardware.nixosModules.lenovo-thinkpad-t14-amd-gen1 #./hardware-configuration.nix - ./boot.nix - ./hardware-configuration.nix + #./boot.nix + #./hardware-configuration.nix ../../modules/locale.nix - ../../modules/game/server/factorio/factorio.nix + #../../modules/game/server/factorio/factorio.nix + + (modulesPath + "/profiles/perlless.nix") + (modulesPath + "/profiles/minimal.nix") + { + environment.defaultPackages = []; + boot.kernel.enable = false; + boot.isContainer = true; + nixpkgs.overlays = [(self: super: {})]; + } + { + # 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.ens18.useDHCP = lib.mkDefault true; + } + ]; + disabledModules = [ + (modulesPath + "/profiles/all-hardware.nix") + (modulesPath + "/profiles/base.nix") + # + # ]; } diff --git a/hosts/factorio/hardware-configuration.nix b/hosts/factorio/hardware-configuration.nix index daf8eca..a458278 100644 --- a/hosts/factorio/hardware-configuration.nix +++ b/hosts/factorio/hardware-configuration.nix @@ -8,30 +8,9 @@ modulesPath, ... }: { - imports = [ - (modulesPath + "/profiles/qemu-guest.nix") - ]; - boot.initrd.availableKernelModules = ["ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod"]; - boot.initrd.kernelModules = []; - boot.kernelModules = []; - boot.extraModulePackages = []; - fileSystems."/" = { - device = "/dev/disk/by-uuid/a6c22dab-a82a-4109-a8d0-b7ed99d56bc7"; - fsType = "ext4"; - }; - - swapDevices = [ - {device = "/dev/disk/by-uuid/ca4eedce-6e52-4593-a188-a48e54074d14";} - ]; - - # 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.ens18.useDHCP = lib.mkDefault true; + # maybe instruct nix to just use available swap partition nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; } diff --git a/modules/accessibility.nix b/modules/accessibility.nix index 3347018..b26d138 100644 --- a/modules/accessibility.nix +++ b/modules/accessibility.nix @@ -1,3 +1,6 @@ {...}: { - services.speechd.enable = true; + services = { + speechd.enable = true; + orca.enable = true; + }; } diff --git a/modules/customisation.nix b/modules/customisation.nix index 1179963..65e1092 100644 --- a/modules/customisation.nix +++ b/modules/customisation.nix @@ -1,8 +1,10 @@ {pkgs, ...}: { - #MANPAGER='nvim +Man!' + # install and set neovim as MANPAGER environment.systemPackages = [pkgs.neovim]; environment.variables = { "MANPAGER" = "nvim +Man!"; + + # set neovim as default editor "EDITOR" = "nvim"; }; } diff --git a/modules/firewall.nix b/modules/firewall.nix index a8bca38..d61c660 100644 --- a/modules/firewall.nix +++ b/modules/firewall.nix @@ -3,5 +3,5 @@ networking.firewall.allowedTCPPorts = [8080 10001 10002]; networking.firewall.allowedUDPPorts = [8080 10001 10002]; # Or disable the firewall altogether. - # networking.firewall.enable = false; + networking.firewall.enable = false; } diff --git a/modules/pkg_mgrmnt/flatpak.nix b/modules/pkg_mgrmnt/flatpak.nix index e960c2b..54b2cef 100644 --- a/modules/pkg_mgrmnt/flatpak.nix +++ b/modules/pkg_mgrmnt/flatpak.nix @@ -2,7 +2,7 @@ services.flatpak = { enable = true; update.auto = { - enable = false; + enable = true; onCalendar = "weekly"; }; uninstallUnmanaged = true; diff --git a/modules/sec_auth/login-manager.nix b/modules/sec_auth/login-manager.nix index 73c7dcf..970f2b9 100644 --- a/modules/sec_auth/login-manager.nix +++ b/modules/sec_auth/login-manager.nix @@ -1,21 +1,28 @@ -{pkgs, ...}: { +{pkgs, ...}: let + default_command = "Hyprland"; +in { # Enable touchpad support (enabled default in most desktopManager). # services.xserver.libinput.enable = true; services.greetd = { enable = true; vt = 7; settings = { + initial_session = { + command = default_command; + user = "ranomier"; + }; default_session = { - command = '' ${pkgs.greetd.tuigreet}/bin/tuigreet \ - --time \ - --time-format '%Y-%m-%dT%H:%M:%S %A' \ - --remember \ - --user-menu \ - --user-menu-min-uid 1000 \ - --user-menu-max-uid 2000 \ - --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 \ + --user-menu-min-uid 1000 \ + --user-menu-max-uid 2000 \ + --theme 'border=lightgreen;text=lightgreen;prompt=lightgreen;time=lightgreen;action=lightgreen;button=lightgreen;input=lightgreen' \ + --cmd ${default_command} + ''; user = "greeter"; }; }; diff --git a/modules/software/default.nix b/modules/software/default.nix index 760ee11..ea3ff15 100644 --- a/modules/software/default.nix +++ b/modules/software/default.nix @@ -8,5 +8,7 @@ ./software.nix ./virt.nix ./android.nix + #./mpv.nix + ./neovim.nix ]; } diff --git a/modules/software/flatpak.nix b/modules/software/flatpak.nix index 5480176..16af41f 100644 --- a/modules/software/flatpak.nix +++ b/modules/software/flatpak.nix @@ -45,6 +45,12 @@ appId = "io.github.Soundux"; } # soundboard + # games + { + origin = "flathub"; + appId = "com.etlegacy.ETLegacy"; + } # shooter + #"com.obsproject.Studio" #this is another way to write it ]; }; diff --git a/modules/software/game.nix b/modules/software/game.nix index eebdd19..87313f6 100644 --- a/modules/software/game.nix +++ b/modules/software/game.nix @@ -1,37 +1,28 @@ {pkgs, ...}: { - #environment.systemPackages = with pkgs; [ ]; - # hardware.steam-hardware.enable = true; # Note that this is already enabled with programs.steam.enable = true; programs.steam = { enable = true; - remotePlay.openFirewall = - true; # Open ports in the firewall for Steam Remote Play - dedicatedServer.openFirewall = - true; # Open ports in the firewall for Source Dedicated Server - localNetworkGameTransfers.openFirewall = - true; # Open ports in the firewall for Steam Local Network Game Transfers + + # Open ports in the firewall for Steam Remote Play + remotePlay.openFirewall = true; + + # Open ports in the firewall for Source Dedicated Server + dedicatedServer.openFirewall = true; + + # Open ports in the firewall for Steam Local Network Game Transfers + localNetworkGameTransfers.openFirewall = true; + + # enables a extra session for the login screen (get steam deck behavior) + gamescopeSession.enable = true; + + # make proton-ge alway available + extraCompatPackages = with pkgs; [proton-ge-bin]; }; - programs.steam.gamescopeSession.enable = true; - #### FHS environment only - # This will only make partial installation - provide the script, which creates the typical environment expected by proprietary games and software on regular Linux, allowing to run such software without patching. Useful if you plan to run games downloaded from the internet. - # Note that this is not necessary for clients installed from Nixpkgs (like Minigalaxy or Itch), which already use the FHS environment. - # There are two options to install the FHS environment. The first is to install steam-run. - - #Example snippet of configuration.nix: - - # environment.systemPackages = with pkgs; [ - # steam-run - # ]; - - # Another option, in case you need more flexibility, is to directly reference the part of steam metapackage. - - # Example snippet of configuration.nix: - - # 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". + # steam-run: Run commands in the same FHS environment that is used for Steam environment.systemPackages = with pkgs; [steam-run]; - programs.steam.extraCompatPackages = with pkgs; [proton-ge-bin]; + # Note that this is already enabled with programs.steam.enable = true; + # but it might be usefull on systems without steam, + # while still using steam hardware + #hardware.steam-hardware.enable = true; } diff --git a/modules/software/mpv.nix b/modules/software/mpv.nix new file mode 100644 index 0000000..dbc2c04 --- /dev/null +++ b/modules/software/mpv.nix @@ -0,0 +1,29 @@ +{ + pkgs, + home-manager, + ... +}: { + home-manager.programs.mpv = { + enable = true; + + package = ( + pkgs.mpv-unwrapped.wrapper { + scripts = with pkgs.mpvScripts; [ + uosc + sponsorblock + ]; + + mpv = pkgs.mpv-unwrapped.override { + waylandSupport = true; + ffmpeg = pkgs.ffmpeg-full; + }; + } + ); + + config = { + profile = "high-quality"; + ytdl-format = "bestvideo+bestaudio"; + cache-default = 4000000; + }; + }; +} diff --git a/modules/software/neovim.nix b/modules/software/neovim.nix new file mode 100644 index 0000000..a91b259 --- /dev/null +++ b/modules/software/neovim.nix @@ -0,0 +1,7 @@ +{...}: { + programs.neovim = { + enable = true; + viAlias = true; + vimAlias = true; + }; +} diff --git a/modules/software/office/default.nix b/modules/software/office/default.nix new file mode 100644 index 0000000..786c7ca --- /dev/null +++ b/modules/software/office/default.nix @@ -0,0 +1,5 @@ +{...}: { + imports = [ + ./libreoffice.nix + ]; +} diff --git a/modules/software/office/libreoffice.nix b/modules/software/office/libreoffice.nix new file mode 100644 index 0000000..3e04503 --- /dev/null +++ b/modules/software/office/libreoffice.nix @@ -0,0 +1,8 @@ +{pkgs, ...}: { + environment.systemPackages = with pkgs; [ + libreoffice + hunspell + hunspellDicts.en_GB-large + hunspellDicts.de_DE + ]; +} diff --git a/modules/software/shell.nix b/modules/software/shell.nix index 835fbe0..d14ff01 100644 --- a/modules/software/shell.nix +++ b/modules/software/shell.nix @@ -2,49 +2,8 @@ # everyone should use zsh xD users.defaultUserShell = pkgs.zsh; # Prevent the new user dialog in zsh - system.userActivationScripts.zshrc = "touch .zshrc"; - - programs.zsh = { - enable = true; - shellInit = '' - compinit () { - builtin autoload -XUz /run/current-system/sw/share/zsh/$ZSH_VERSION/functions - } - # config options to make zsh obey XDG base directory standard - ZDOTDIR=$HOME/.config/zsh - [ -d "$HOME"/.config/zsh ] || mkdir -p "$HOME"/.config/zsh - HISTFILE="$XDG_STATE_HOME"/zsh/history - # Completion files: Use XDG dirs - [ -d "$XDG_CACHE_HOME"/zsh ] || mkdir -p "$XDG_CACHE_HOME"/zsh - zstyle ':completion:*' cache-path "$XDG_CACHE_HOME"/zsh/zcompcache - compinit -d "$XDG_CACHE_HOME"/zsh/zcompdump-$ZSH_VERSION - - # Note that to manually override this in ~/.zshrc you should run `prompt off` - # before setting your PS1 and etc. Otherwise this will likely to interact with - # your ~/.zshrc configuration in unexpected ways as the default prompt sets - # a lot of different prompt variables. - autoload -U promptinit && promptinit && prompt suse && setopt prompt_sp - - HISTFILE=~/.histfile - HISTSIZE=1000 - SAVEHIST=1000 - - # bindkey - bindkey -e - - bindkey "\e[3~" delete-char - # Home- und End-Keys. - bindkey '\e[1~' beginning-of-line - bindkey '\e[4~' end-of-line - - # to redo the initial zsh installation run these commands - #autoload -Uz zsh-newuser-install - #zsh-newuser-install -f - ''; - - ohMyZsh.enable = true; - }; + # supports many shell so it lives here programs.starship = { enable = true; settings = { diff --git a/modules/software/shells/default.nix b/modules/software/shells/default.nix new file mode 100644 index 0000000..9bc0c56 --- /dev/null +++ b/modules/software/shells/default.nix @@ -0,0 +1,6 @@ +{...}: { + imports = [ + ./zsh.nix + ./fish.nix + ]; +} diff --git a/modules/software/shells/fish.nix b/modules/software/shells/fish.nix new file mode 100644 index 0000000..b3bb8cd --- /dev/null +++ b/modules/software/shells/fish.nix @@ -0,0 +1,15 @@ +{pkgs, ...}: { + programs = { + fish = { + enable = true; + useBabelfish = true; + shellInit = '' + starship init fish | source + ''; + }; + nix-index.enableFishIntegration = true; + direnv.enableFishIntegration = true; + foot.enableFishIntegration = true; + }; + environment.systemPackages = [pkgs.starship]; +} diff --git a/modules/software/shells/zsh.nix b/modules/software/shells/zsh.nix new file mode 100644 index 0000000..62b4a41 --- /dev/null +++ b/modules/software/shells/zsh.nix @@ -0,0 +1,44 @@ +{...}: { + system.userActivationScripts.zshrc = "touch .zshrc"; + + programs.zsh = { + enable = true; + shellInit = '' + compinit () { + builtin autoload -XUz /run/current-system/sw/share/zsh/$ZSH_VERSION/functions + } + # config options to make zsh obey XDG base directory standard + ZDOTDIR=$HOME/.config/zsh + [ -d "$HOME"/.config/zsh ] || mkdir -p "$HOME"/.config/zsh + HISTFILE="$XDG_STATE_HOME"/zsh/history + # Completion files: Use XDG dirs + [ -d "$XDG_CACHE_HOME"/zsh ] || mkdir -p "$XDG_CACHE_HOME"/zsh + zstyle ':completion:*' cache-path "$XDG_CACHE_HOME"/zsh/zcompcache + compinit -d "$XDG_CACHE_HOME"/zsh/zcompdump-$ZSH_VERSION + + # Note that to manually override this in ~/.zshrc you should run `prompt off` + # before setting your PS1 and etc. Otherwise this will likely to interact with + # your ~/.zshrc configuration in unexpected ways as the default prompt sets + # a lot of different prompt variables. + autoload -U promptinit && promptinit && prompt suse && setopt prompt_sp + + HISTFILE=~/.histfile + HISTSIZE=1000 + SAVEHIST=1000 + + # bindkey + bindkey -e + + bindkey "\e[3~" delete-char + # Home- und End-Keys. + bindkey '\e[1~' beginning-of-line + bindkey '\e[4~' end-of-line + + # to redo the initial zsh installation run these commands + #autoload -Uz zsh-newuser-install + #zsh-newuser-install -f + ''; + + ohMyZsh.enable = true; + }; +} diff --git a/modules/software/software.nix b/modules/software/software.nix index a1c62bf..b7c8920 100644 --- a/modules/software/software.nix +++ b/modules/software/software.nix @@ -4,72 +4,66 @@ # List packages installed in system profile. To search, run: # $ nix search wget - environment.systemPackages = let - amberol_wrapper = pkgs.writeShellScriptBin "amberol" '' - export GDK_BACKEND='x11' - exec "${pkgs.amberol}/bin/amberol" "$@" - ''; - in - with pkgs; [ - # low level stuff - efibootmgr - #exfat - exfatprogs - greetd.greetd - greetd.tuigreet - killall - vulnix + environment.systemPackages = with pkgs; [ + # low level stuff + efibootmgr + #exfat + exfatprogs + greetd.greetd + greetd.tuigreet + killall + vulnix - # hardware - brightnessctl - usbutils - lm_sensors + # hardware + brightnessctl + usbutils + lm_sensors - unstable.neovim - git - gnumake - gcc - nodePackages.npm - nodejs-slim - python3 - fd - nodejs-slim - cargo - rustc + unstable.neovim + git + gnumake + gcc + nodePackages.npm + nodejs-slim + python3 + fd + nodejs-slim + cargo + rustc - # tooling - htop - ncdu - wget - unstable.yt-dlp - miniserve - file - unzip - tmux - fzf - ripgrep - qemu - home-manager - dfc - p7zip + # tooling + htop + btop + ncdu + wget + unstable.yt-dlp + miniserve + file + unzip + tmux + fzf + ripgrep + qemu + home-manager + dfc + p7zip - # move to homemanager? - unstable.mumble - amberol_wrapper - amberol - nuclear - mpv - zathura - libreoffice - #feh - nomacs - #unstable.obsidian - keepassxc - #minecraft - element-desktop - rustdesk-flutter - timer - ]; + # move to homemanager? + unstable.mumble + amberol + nuclear + #zathura + sioyek + #feh + nomacs + #unstable.obsidian + keepassxc + #minecraft + element-desktop + rustdesk-flutter + timer + prusa-slicer + ]; fonts.packages = with pkgs; [ noto-fonts diff --git a/modules/wm_and_de/default.nix b/modules/wm_and_de/default.nix index 226c715..f4baad5 100644 --- a/modules/wm_and_de/default.nix +++ b/modules/wm_and_de/default.nix @@ -1,6 +1,7 @@ {...}: { imports = [ ./hyprland.nix + #./qtile.nix ./components/dbus.nix ]; } diff --git a/modules/wm_and_de/hyprland.nix b/modules/wm_and_de/hyprland.nix index 9eb04e7..112817c 100644 --- a/modules/wm_and_de/hyprland.nix +++ b/modules/wm_and_de/hyprland.nix @@ -52,6 +52,9 @@ # List packages installed in system profile. To search, run: # $ nix search wget environment.systemPackages = with pkgs; [ + hyprsunset + hyprpolkitagent + hyprutils # for tiling window manager foot foot.themes diff --git a/modules/wm_and_de/qtile.nix b/modules/wm_and_de/qtile.nix new file mode 100644 index 0000000..dab6d1c --- /dev/null +++ b/modules/wm_and_de/qtile.nix @@ -0,0 +1,78 @@ +{ + config, + pkgs, + lib, + ... +}: { + nixpkgs.overlays = [ + (self: super: { + qtile-unwrapped = super.qtile-unwrapped.overrideAttrs (_: rec { + postInstall = let + qtileSession = '' + [Desktop Entry] + Name=Qtile Wayland + Comment=Qtile on Wayland + Exec=qtile start -b wayland + Type=Application + ''; + in '' + mkdir -p $out/share/wayland-sessions + echo "${qtileSession}" > $out/share/wayland-sessions/qtile.desktop + ''; + passthru.providedSessions = ["qtile"]; + }); + }) + ]; + services.displayManager.sessionPackages = [pkgs.qtile-unwrapped]; + services.xserver.windowManager.qtile.enable = true; + + # for mounting stuff, also needs a auth agent like lxqt.lxqt-policykit + services.gvfs.enable = true; + + qt = { + enable = true; + platformTheme = "qt5ct"; + style = "kvantum"; + }; + + environment.pathsToLink = ["/share/foot"]; + + # List packages installed in system profile. To search, run: + # $ nix search wget + environment.systemPackages = with pkgs; [ + # for tiling window manager + foot + foot.themes + wofi + wl-clipboard # for waydroid and maybe more + wlogout + pamixer + #unstable.kanshi + shikane + dunst + + # audio + mixxc + ncpamixer + + # for screenshot + annotation + grim + slurp + satty + flameshot + + # theming + gruvbox-plus-icons + gruvbox-gtk-theme + kde-gruvbox + capitaine-cursors-themed + libsForQt5.qtstyleplugin-kvantum + kdePackages.qtstyleplugin-kvantum + + # polkit auth agent + lxqt.lxqt-policykit + + # file manager + nautilus + ]; +} diff --git a/result b/result new file mode 120000 index 0000000..ed40b5d --- /dev/null +++ b/result @@ -0,0 +1 @@ +/nix/store/bky8ls2952j8dvnxj4m7rx21y124ky60-tarball \ No newline at end of file