diff --git a/common/all.nix b/common/all.nix index 7955580..e2e13bb 100644 --- a/common/all.nix +++ b/common/all.nix @@ -1,12 +1,48 @@ -{}: +{ inputs, self, secretsDir, specialArgs, ... }: # config that i use on all my hosts { + imports = [ + inputs.home-manager.nixosModules.home-manager + ../mods/my-nixpkgs-overlay.nix + ]; + + + home-manager.extraSpecialArgs = specialArgs; + + + # set root user pwd + users.users.root.passwordFile = "${secretsDir}/main-root-pwd"; + # Set your time zone. time.timeZone = "Europe/Vienna"; - users.mutableUsers = false; + + # add mybin to path + environment.etc.profile.text = '' +export PATH=$PATH:${self}/mybin + ''; + nixpkgs.config.allowUnfree = true; + + nix.settings.experimental-features = [ "nix-command" "flakes" ]; + + home-manager.backupFileExtension = "backup"; + + security.sudo.wheelNeedsPassword = false; + + users.mutableUsers = false; + + networking.networkmanager.enable = true; # Easiest to use and most distros use this by default. + + + # 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 = "23.05"; # Did you read the comment? } diff --git a/common/nixos-graphical.nix b/common/nixos-graphical.nix new file mode 100644 index 0000000..37ec3a0 --- /dev/null +++ b/common/nixos-graphical.nix @@ -0,0 +1,87 @@ +{ self, pkgs, ... }: +{ + imports = [ + ../mods/battery_monitor.nix + ]; + + modules.battery_monitor.enable = true; + + # Enable the X11 windowing system. + services.xserver = { + enable = true; + displayManager = { + defaultSession = "none+xmonad"; + sessionCommands = '' + xmobar ${self}/misc/xmobar.hs & + + # aparently needed, so that xmonad works + sleep 2 && \ + ${pkgs.xorg.xmodmap}/bin/xmodmap \ + -e "clear control" \ + -e "clear mod1" \ + -e "keycode 64 = Control_L" \ + -e "keycode 37 = Alt_L" \ + -e "add control = Control_L" \ + -e "add mod1 = Alt_L" \ + & + ''; + }; + + displayManager.lightdm = { + enable = true; + greeters.enso = { + enable = true; + blur = true; + extraConfig = '' + default-wallpaper=/usr/share/streets_of_gruvbox.png + ''; + }; + }; + layout = "at"; + }; + + # xdg portals + xdg.portal = { + enable = true; + extraPortals = [ + #pkgs.xdg-desktop-portal-gtk + #pkgs.xdg-desktop-portal-termfilechooser + (pkgs.callPackage ../mods/xdg-desktop-portal-termfilechooser/default.nix {}) + ]; + }; + + + # Configure keymap in X11 + # services.xserver.xkbOptions = "eurosign:e,caps:escape"; + + # Enable CUPS to print documents. + # services.printing.enable = true; + + # Enable sound. + sound.enable = true; + hardware.pulseaudio.enable = true; + + services.blueman.enable = true; + hardware.bluetooth.enable = true; + + # Enable touchpad support (enabled default in most desktopManager). + services.xserver.libinput.enable = true; + + # xmonad + services.xserver.windowManager.xmonad = { + enable = true; + #config = builtins.toPath "${self}/misc/xmonad.hs"; + config = builtins.readFile (self + /misc/xmonad.hs); + #config = "${confDir}/misc/xmo"; + enableContribAndExtras = true; + extraPackages = hpkgs: [ + hpkgs.xmobar + #hpkgs.xmonad-screenshot + ]; + ghcArgs = [ + "-hidir /tmp" # place interface files in /tmp, otherwise ghc tries to write them to the nix store + "-odir /tmp" # place object files in /tmp, otherwise ghc tries to write them to the nix store + #"-i${xmonad-contexts}" # tell ghc to search in the respective nix store path for the module + ]; + }; +} diff --git a/common/programs/emacs/config.el b/common/nixos-headless.nix similarity index 100% rename from common/programs/emacs/config.el rename to common/nixos-headless.nix diff --git a/common/nixos.nix b/common/nixos.nix index 51aff5a..d011c5e 100644 --- a/common/nixos.nix +++ b/common/nixos.nix @@ -1,4 +1,4 @@ -{}: +{ ... }: # config that i use on all my hosts, that run native nixos # excluding for example my phone phone @@ -12,6 +12,5 @@ #keyMap = "at"; useXkbConfig = true; # use xkbOptions in tty. }; - } diff --git a/common/programs/emacs/default.nix b/common/programs/emacs/default.nix deleted file mode 100644 index a450931..0000000 --- a/common/programs/emacs/default.nix +++ /dev/null @@ -1,12 +0,0 @@ -{ inputs, self, ... }: -{ - home-manager.users.me = { ... }: { - imports = [ - inputs.nix-doom-emacs.hmModule - ]; - programs.doom-emacs = { - enable = true; - doomPrivateDir = "${self}/common/programs/emacs"; - }; - }; -} diff --git a/flake.nix b/flake.nix index 8e8f1f2..9d36489 100644 --- a/flake.nix +++ b/flake.nix @@ -35,7 +35,7 @@ persistentDir = "/home/me/work/app-data"; in { - nixosConfigurations = { + nixosConfigurations = rec { "c2vi-main" = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; @@ -52,7 +52,7 @@ specialArgs = { inherit inputs confDir workDir secretsDir persistentDir self; }; modules = [ - ./hosts/main.nix + ./hosts/hpm.nix ./hardware/hpm-laptop.nix ]; }; @@ -67,6 +67,7 @@ }; packages.x86_64-linux = { + cbm = nixpkgs.x86_64.callPackage ./mods/cbm.nix { }; #default... TODO }; }; diff --git a/hosts/hpm.nix b/hosts/hpm.nix new file mode 100644 index 0000000..fe797be --- /dev/null +++ b/hosts/hpm.nix @@ -0,0 +1,11 @@ +{ inputs, ... }: +{ + imports = [ + ../common/all.nix + ../common/nixos.nix + ../common/nixos-graphical.nix + + ../users/me/default.nix + ]; +} + diff --git a/hosts/main.nix b/hosts/main.nix index 0a2f02f..c0e8b08 100644 --- a/hosts/main.nix +++ b/hosts/main.nix @@ -1,5 +1,5 @@ -{ pkgs, lib, workDir, confDir, inputs, ... }: +{ pkgs, lib, workDir, self, secretsDir, ... }: { # https://bugzilla.kernel.org/show_bug.cgi?id=110941 @@ -11,39 +11,83 @@ # fileSystems."/".options = [ "noatime" "nodiratime" "discard" ]; -############################# BOOT ############################# -# boot - imports = [ - ../mods/battery_monitor.nix - ../mods/my-nixpkgs-overlay.nix - inputs.home-manager.nixosModules.home-manager + ../common/all.nix + ../common/nixos.nix + ../common/nixos-graphical.nix - ../users/me/home.nix + ../users/me/default.nix ]; - #home-manager.users.me = import ../users/me/home.nix; - -############################# MISC ############################# -# misc + + networking.hostName = "c2vi-main"; # Define your hostname. - nixpkgs.config.permittedInsecurePackages = [ + # some bind mounts + fileSystems."${workDir}/priv-share/things" = { + device = "${workDir}/things"; + options = [ "bind" ]; + }; + fileSystems."${workDir}/things/htl" = { + device = "${workDir}/htl"; + options = [ "bind" ]; + }; + fileSystems."${workDir}/things/diplomarbeit" = { + device = "${workDir}/diplomarbeit"; + options = [ "bind" ]; + }; + + + # syncthing for main + services.syncthing = { + enable = true; + user = "me"; + #dataDir = "/home/"; + configDir = "/home/me/.config/syncthing"; + extraFlags = ["-no-browser"]; + openDefaultPorts = true; + overrideDevices = true; # overrides any devices added or deleted through the WebUI + overrideFolders = true; # overrides any folders added or deleted through the WebUI + devices = { + "seb-phone" = { + id = builtins.readFile "${secretsDir}/syncthing-id-phone"; + #addresses = [ "tcp://192.168.200.24:22000" ]; + }; + "seb-tab" = { + id = builtins.readFile "${secretsDir}/syncthing-id-tab"; + #addresses = [ "tcp://192.168.200.26:22000" ]; + }; + }; + folders = { + "priv-share" = { # Name of folder in Syncthing, also the folder ID + path = "/home/me/work/priv-share"; # Which folder to add to Syncthing + #devices = [ "seb-phone" "seb-tab" ]; # Which devices to share the folder with + devices = [ "seb-phone" "seb-tab" ]; # Which devices to share the folder with + }; + }; + }; + + + nixpkgs.config.permittedInsecurePackages = [ "electron-24.8.6" ]; + security.polkit.enable = true; networking.firewall.enable = true; networking.firewall.allowPing = true; services.samba.openFirewall = true; + # samba services.samba-wsdd.enable = true; # make shares visible for windows 10 clients + networking.firewall.allowedTCPPorts = [ 5357 # wsdd 8888 # for general usage 9999 # for general usage ]; + networking.firewall.allowedUDPPorts = [ 3702 # wsdd ]; @@ -81,13 +125,10 @@ }; - nix.settings.experimental-features = [ "nix-command" "flakes" ]; - nixpkgs.config.allowUnfree = true; - security.sudo.wheelNeedsPassword = false; - virtualisation.libvirtd.enable = true; programs.dconf.enable = true; + system.activationScripts.setupLibvirt = lib.stringAfter [ "var" ] '' ln -nsf ${workDir}/vm/libvirt/my-image-pool.xml /var/lib/libvirt/storage/my-image-pool.xml ln -nsf ${workDir}/vm/qemu/* /var/lib/libvirt/qemu/ @@ -97,30 +138,8 @@ ln -nsf /run/current-system/sw/bin/bash /bin/bash ''; - environment.etc.profile.text = '' -export PATH=$PATH:${confDir}/mybin - ''; - modules.battery_monitor.enable = true; - - xdg.portal = { - enable = true; - extraPortals = [ - #pkgs.xdg-desktop-portal-gtk - #pkgs.xdg-desktop-portal-termfilechooser - (pkgs.callPackage ../mods/xdg-desktop-portal-termfilechooser/default.nix {}) - ]; - }; - - networking.hostName = "c2vi-main"; # Define your hostname. - networking.networkmanager.enable = true; # Easiest to use and most distros use this by default. - services.blueman.enable = true; - hardware.bluetooth.enable = true; - - - ################ # swap and hibernate - swapDevices = [ { device = "/dev/lvm0/swap"; } ]; boot.resumeDevice = "/dev/lvm0/swap"; services.logind = { @@ -136,69 +155,14 @@ export PATH=$PATH:${confDir}/mybin HibernateMode=shutdown ''; - # Enable the X11 windowing system. - services.xserver = { - enable = true; - displayManager = { - defaultSession = "none+xmonad"; - sessionCommands = '' - xmobar ${confDir}/xmonad/xmobar.hs & - # aparently needed, so that xmonad works - sleep 2 && \ - ${pkgs.xorg.xmodmap}/bin/xmodmap \ - -e "clear control" \ - -e "clear mod1" \ - -e "keycode 64 = Control_L" \ - -e "keycode 37 = Alt_L" \ - -e "add control = Control_L" \ - -e "add mod1 = Alt_L" \ - & - ''; - }; - - displayManager.lightdm = { - enable = true; - greeters.enso = { - enable = true; - blur = true; - extraConfig = '' - default-wallpaper=/usr/share/streets_of_gruvbox.png - ''; - }; - }; - layout = "at"; - }; - - # Configure keymap in X11 - # services.xserver.xkbOptions = "eurosign:e,caps:escape"; - - # Enable CUPS to print documents. - # services.printing.enable = true; - - # Enable sound. - sound.enable = true; - hardware.pulseaudio.enable = true; - - # Enable touchpad support (enabled default in most desktopManager). - services.xserver.libinput.enable = true; - - # List packages installed in system profile. To search, run: - # $ nix search wget + # List packages installed in system profile. environment.systemPackages = with pkgs; [ vim # Do not forget to add an editor to edit configuration.nix! wget xorg.xmodmap bluez ]; - - # 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 = "23.05"; # Did you read the comment? } diff --git a/mods/cbm.nix b/mods/cbm.nix new file mode 100644 index 0000000..8e1d60c --- /dev/null +++ b/mods/cbm.nix @@ -0,0 +1,19 @@ +{ stdenv +, fetchFromGitHub +, libncurses +}: + +stdenv.mkDerivation rec { + pname = "cbm"; + version = "0.3.2"; + + src = fetchFromGitHub { + owner = "resurrecting-open-source-projects"; + repo = "cbm"; + tag = version; + }; + + nativeBuildInputs = [ + libncurses + ]; +} diff --git a/common/programs/alacritty.nix b/programs/alacritty.nix similarity index 97% rename from common/programs/alacritty.nix rename to programs/alacritty.nix index 544bfc3..a609bc6 100644 --- a/common/programs/alacritty.nix +++ b/programs/alacritty.nix @@ -1,6 +1,6 @@ { ... }: { - home-manager.users.me.programs.alacritty = { + programs.alacritty = { enable = true; settings = { font = { diff --git a/common/programs/bash.nix b/programs/bash.nix similarity index 96% rename from common/programs/bash.nix rename to programs/bash.nix index 3c0a28f..b440e2d 100644 --- a/common/programs/bash.nix +++ b/programs/bash.nix @@ -1,6 +1,6 @@ { persistentDir, confDir, ... }: { - home-manager.users.me.programs.bash = { + programs.bash = { enable = true; enableCompletion = true; @@ -259,13 +259,13 @@ function nixre(){ if [ "$1" == "boot" ] then - nix build github:c2vi/nixos#nixosConfigurations.c2vi-main.config.system.build.toplevel --impure ''${@:2} - sudo ./result/bin/switch-to-configuration boot - rm ./result + nix build github:c2vi/nixos#nixosConfigurations.c2vi-main.config.system.build.toplevel --impure ''${@:2} \ + && sudo ./result/bin/switch-to-configuration boot \ + && rm ./result else - nix build ~/work/config#nixosConfigurations.c2vi-main.config.system.build.toplevel --impure $@ - sudo ./result/bin/switch-to-configuration switch - rm ./result + nix build ~/work/config#nixosConfigurations.c2vi-main.config.system.build.toplevel --impure $@ \ + && sudo ./result/bin/switch-to-configuration switch \ + && rm ./result fi } diff --git a/common/programs/emacs/packages.el b/programs/emacs/config.el similarity index 100% rename from common/programs/emacs/packages.el rename to programs/emacs/config.el diff --git a/programs/emacs/default.nix b/programs/emacs/default.nix new file mode 100644 index 0000000..49e6084 --- /dev/null +++ b/programs/emacs/default.nix @@ -0,0 +1,10 @@ +{ inputs, self, ... }: +{ + imports = [ + inputs.nix-doom-emacs.hmModule + ]; + programs.doom-emacs = { + enable = true; + doomPrivateDir = "${self}/programs/emacs"; + }; +} diff --git a/common/programs/emacs/init.el b/programs/emacs/init.el similarity index 100% rename from common/programs/emacs/init.el rename to programs/emacs/init.el diff --git a/programs/emacs/packages.el b/programs/emacs/packages.el new file mode 100644 index 0000000..e69de29 diff --git a/common/programs/git.nix b/programs/git.nix similarity index 86% rename from common/programs/git.nix rename to programs/git.nix index 957d900..6fc2f3b 100644 --- a/common/programs/git.nix +++ b/programs/git.nix @@ -1,6 +1,6 @@ { ... }: { - home-manager.users.me.programs.git = { + programs.git = { enable = true; userName = "Sebastian Moser"; userEmail = "me@c2vi.dev"; diff --git a/common/programs/lf/default.nix b/programs/lf/default.nix similarity index 94% rename from common/programs/lf/default.nix rename to programs/lf/default.nix index 4070c1c..0962990 100644 --- a/common/programs/lf/default.nix +++ b/programs/lf/default.nix @@ -1,6 +1,6 @@ { pkgs, ... }: { - home-manager.users.me.programs.lf = { + programs.lf = { package = pkgs.lf.overrideAttrs (final: prev: { patches = (prev.patches or [ ]) ++ [ ./lf-filter.patch diff --git a/common/programs/lf/lf-filter.patch b/programs/lf/lf-filter.patch similarity index 100% rename from common/programs/lf/lf-filter.patch rename to programs/lf/lf-filter.patch diff --git a/common/programs/neovim.nix b/programs/neovim.nix similarity index 99% rename from common/programs/neovim.nix rename to programs/neovim.nix index c86d4f9..45bc66c 100644 --- a/common/programs/neovim.nix +++ b/programs/neovim.nix @@ -1,6 +1,6 @@ { pkgs, ... }: { - home-manager.users.me.programs.neovim = { + programs.neovim = { enable = true; withPython3 = true; withNodeJs = true; diff --git a/common/programs/rofi/default.nix b/programs/rofi/default.nix similarity index 90% rename from common/programs/rofi/default.nix rename to programs/rofi/default.nix index 9959b43..deb764b 100644 --- a/common/programs/rofi/default.nix +++ b/programs/rofi/default.nix @@ -1,6 +1,6 @@ { ... }: { - home-manager.users.me.programs.rofi = { + programs.rofi = { enable = true; theme = "Arc-Dark"; extraConfig = { diff --git a/common/programs/ssh.nix b/programs/ssh.nix similarity index 92% rename from common/programs/ssh.nix rename to programs/ssh.nix index 3318963..c6c3d56 100644 --- a/common/programs/ssh.nix +++ b/programs/ssh.nix @@ -1,6 +1,6 @@ { secretsDir, ... }: { - home-manager.users.me.programs.ssh = { + programs.ssh = { enable = true; includes = [ "./current_rpi_config" ]; matchBlocks = { @@ -39,7 +39,7 @@ }; }; - home-manager.users.me.home.file.".ssh/rpi/local".text = '' + home.file.".ssh/rpi/local".text = '' Host config HostName 192.168.1.2 User config @@ -74,7 +74,7 @@ IdentityFile ${secretsDir}/private-key-main ''; - home-manager.users.me.home.file.".ssh/rpi/remote".text = '' + home.file.".ssh/rpi/remote".text = '' Host config HostName sebastian.dns.army User config @@ -109,7 +109,7 @@ IdentityFile ${secretsDir}/private-key-main ''; - home-manager.users.me.home.file.".ssh/rpi/wstunnel".text = '' + home.file.".ssh/rpi/wstunnel".text = '' Host config HostName localhost User config diff --git a/common/programs/zathura.nix b/programs/zathura.nix similarity index 94% rename from common/programs/zathura.nix rename to programs/zathura.nix index 26a4800..bcca153 100644 --- a/common/programs/zathura.nix +++ b/programs/zathura.nix @@ -1,6 +1,6 @@ { ... }: { - home-manager.users.me.programs.zathura = { + programs.zathura = { enable = true; options = { selection-clipboard = "clipboard"; diff --git a/users/me/default.nix b/users/me/default.nix new file mode 100644 index 0000000..ab53271 --- /dev/null +++ b/users/me/default.nix @@ -0,0 +1,12 @@ +{ secretsDir, inputs, ... }: +{ + users.users.me = { + isNormalUser = true; + passwordFile = "${secretsDir}/main-user-pwd"; + extraGroups = [ "networkmanager" "wheel" "libvirtd" ]; # Enable ‘sudo’ for the user. + + }; + + #home-manager._module.args = { inherit inputs; }; + home-manager.users.me = import ./home.nix; +} diff --git a/users/me/home.nix b/users/me/home.nix index ab3aa41..e6cbd8e 100644 --- a/users/me/home.nix +++ b/users/me/home.nix @@ -1,226 +1,159 @@ -{ pkgs, workDir, confDir, secretsDir, inputs, ... }: +{ config, pkgs, workDir, confDir, secretsDir, inputs, ... }: { + # The home.stateVersion option does not have a default and must be set + home.stateVersion = "23.05"; + imports = [ - ../../common/programs/git.nix - ../../common/programs/lf/default.nix - ../../common/programs/alacritty.nix - ../../common/programs/bash.nix - ../../common/programs/emacs/default.nix - ../../common/programs/rofi/default.nix - ../../common/programs/zathura.nix - ../../common/programs/ssh.nix - ../../common/programs/neovim.nix + inputs.nix-index-database.hmModules.nix-index + # all my programms with their own config + ../../programs/git.nix + ../../programs/lf/default.nix + ../../programs/alacritty.nix + ../../programs/bash.nix + ../../programs/emacs/default.nix + ../../programs/rofi/default.nix + ../../programs/zathura.nix + ../../programs/ssh.nix + ../../programs/neovim.nix ]; - home-manager.backupFileExtension = "backup"; + programs.nix-index.enable = false; + programs.nix-index.enableBashIntegration = false; + programs.nix-index.enableZshIntegration = false; - home-manager.users.me = { config, pkgs, ... }: { - /* The home.stateVersion option does not have a default and must be set */ - home.stateVersion = "23.05"; - - imports = [ - inputs.nix-index-database.hmModules.nix-index - ]; - - programs.nix-index.enable = false; - programs.nix-index.enableBashIntegration = false; - programs.nix-index.enableZshIntegration = false; - #programs.command-not-found.enable = false; - - gtk.cursorTheme = { - name = "Yaru"; - }; - - dconf.settings = { - "org/virt-manager/virt-manager/connections" = { - autoconnect = ["qemu:///system"]; - uris = ["qemu:///system"]; - }; - }; - - services.dunst.enable = true; - - home.sessionVariables = { - EDITOR = "nvim"; - }; - - home.sessionPath = [ "${workDir}/config/mybin" ]; - - home.file = { - ".config/rclone".source = config.lib.file.mkOutOfStoreSymlink "${secretsDir}/rclone-conf"; - ".xmobarrc".source = "${confDir}/misc/xmobar.hs"; - ".subversion/config".text = '' - [miscellany] - global-ignores = node_modules - ''; # documentation for this config file: https://svnbook.red-bean.com/en/1.7/svn.advanced.confarea.html - }; + gtk.cursorTheme = { + name = "Yaru"; + }; + dconf.settings = { + "org/virt-manager/virt-manager/connections" = { + autoconnect = ["qemu:///system"]; + uris = ["qemu:///system"]; + }; }; - fonts.fonts = with pkgs; [ - hack-font + services.dunst.enable = true; + + home.sessionVariables = { + EDITOR = "nvim"; + }; + + home.sessionPath = [ "${workDir}/config/mybin" ]; + + home.file = { + ".config/rclone".source = config.lib.file.mkOutOfStoreSymlink "${secretsDir}/rclone-conf"; + ".xmobarrc".source = "${confDir}/misc/xmobar.hs"; + ".subversion/config".text = '' + [miscellany] + global-ignores = node_modules + ''; # documentation for this config file: https://svnbook.red-bean.com/en/1.7/svn.advanced.confarea.html + }; + + home.packages = with pkgs; [ + neovim + vim + obsidian + tree + xorg.xkbcomp + rofi + haskellPackages.xmonad-extras + haskellPackages.xmonad-contrib + alacritty + xorg.xev + ntfs3g + htop + subversion + pv + blueman + pavucontrol + spotify + flameshot + nodejs + neofetch + networkmanagerapplet + haskellPackages.xmobar + dolphin + mupdf + zathura + xclip + rclone + stalonetray + killall + nil + file + wstunnel + playerctl + alsa-utils + usbutils + pciutils + lshw + jmtpfs + pmutils + cntr + signal-desktop + element-desktop + discord + wireshark + zip + unzip + arp-scan + gparted + lolcat + android-tools + moonlight-qt + comma + delta + + hack-font + + inputs.firefox.packages.${pkgs.system}.firefox-nightly-bin + + # python.... + (python310.withPackages (p: with p; [ + pandas + click + click-aliases + ])) + + (busybox.overrideAttrs (final: prev: { + # get only nslookup from busybox + # because the less would overwrite the actuall less and the busybox does not have -r + # it's a pfusch, but it works + postInstall = prev.postInstall + '' + echo ============ removing anything but nslookup ============ + mv $out/bin/nslookup $out/nslookup + mv $out/bin/busybox $out/busybox + + rm $out/bin/* + + mv $out/nslookup $out/bin/nslookup + mv $out/busybox $out/bin/busybox + ''; + })) + + # base-devel + gcc + + # rust + cargo + rust-analyzer + + #localPacketTracer8 + + #ciscoPacketTracer8 + + # virtualisation + qemu + libvirt + virt-manager + freerdp ]; - - users.users.me = { - isNormalUser = true; - passwordFile = "${secretsDir}/main-user-pwd"; - extraGroups = [ "networkmanager" "wheel" "libvirtd" ]; # Enable ‘sudo’ for the user. - packages = with pkgs; [ - neovim - vim - obsidian - tree - xorg.xkbcomp - rofi - haskellPackages.xmonad-extras - haskellPackages.xmonad-contrib - alacritty - xorg.xev - ntfs3g - htop - subversion - pv - blueman - pavucontrol - spotify - flameshot - nodejs - neofetch - networkmanagerapplet - haskellPackages.xmobar - dolphin - mupdf - zathura - xclip - rclone - stalonetray - killall - nil - file - wstunnel - playerctl - alsa-utils - usbutils - pciutils - lshw - jmtpfs - pmutils - cntr - signal-desktop - element-desktop - discord - wireshark - zip - unzip - arp-scan - gparted - lolcat - android-tools - moonlight-qt - comma - (busybox.overrideAttrs (final: prev: { - # get only nslookup from busybox - # because the less would overwrite the actuall less and the busybox does not have -r - # it's a pfusch, but it works - postInstall = prev.postInstall + '' - echo ============ removing anything but nslookup ============ - mv $out/bin/nslookup $out/nslookup - mv $out/bin/busybox $out/busybox - - rm $out/bin/* - - mv $out/nslookup $out/bin/nslookup - mv $out/busybox $out/bin/busybox - ''; - })) - delta - - inputs.firefox.packages.${pkgs.system}.firefox-nightly-bin - - # python.... - (python310.withPackages (p: with p; [ - pandas - click - click-aliases - ])) - - # base-devel - gcc - - # rust - cargo - rust-analyzer - - #localPacketTracer8 - - #ciscoPacketTracer8 - - # virtualisation - qemu - libvirt - virt-manager - freerdp - ]; - }; - -# xmonad - services.xserver.windowManager.xmonad = { - enable = true; - config = ../../misc/xmonad.hs; - #config = "${confDir}/misc/xmo"; - enableContribAndExtras = true; - extraPackages = hpkgs: [ - hpkgs.xmobar - #hpkgs.xmonad-screenshot - ]; - ghcArgs = [ - "-hidir /tmp" # place interface files in /tmp, otherwise ghc tries to write them to the nix store - "-odir /tmp" # place object files in /tmp, otherwise ghc tries to write them to the nix store - #"-i${xmonad-contexts}" # tell ghc to search in the respective nix store path for the module - ]; - }; - - services.syncthing = { - enable = true; - user = "me"; - #dataDir = "/home/"; - configDir = "/home/me/.config/syncthing"; - extraFlags = ["-no-browser"]; - openDefaultPorts = true; - overrideDevices = true; # overrides any devices added or deleted through the WebUI - overrideFolders = true; # overrides any folders added or deleted through the WebUI - devices = { - "seb-phone" = { - id = builtins.readFile "${secretsDir}/syncthing-id-phone"; - #addresses = [ "tcp://192.168.200.24:22000" ]; - }; - "seb-tab" = { - id = builtins.readFile "${secretsDir}/syncthing-id-tab"; - #addresses = [ "tcp://192.168.200.26:22000" ]; - }; - }; - folders = { - "priv-share" = { # Name of folder in Syncthing, also the folder ID - path = "/home/me/work/priv-share"; # Which folder to add to Syncthing - #devices = [ "seb-phone" "seb-tab" ]; # Which devices to share the folder with - devices = [ "seb-phone" "seb-tab" ]; # Which devices to share the folder with - }; - }; - }; - fileSystems."${workDir}/priv-share/things" = { - device = "${workDir}/things"; - options = [ "bind" ]; - }; - fileSystems."${workDir}/things/htl" = { - device = "${workDir}/htl"; - options = [ "bind" ]; - }; - fileSystems."${workDir}/things/diplomarbeit" = { - device = "${workDir}/diplomarbeit"; - options = [ "bind" ]; - }; - } + + + #fonts.fonts = with pkgs; [ + #hack-font + #];