diff --git a/flake.nix b/flake.nix index 737fd66..a51f334 100644 --- a/flake.nix +++ b/flake.nix @@ -94,6 +94,7 @@ flake = self; }; personal-cli = import ./personal-cli/hm.nix; + personal-gui = import ./personal-gui/hm.nix; }; nixosModules = { @@ -101,6 +102,7 @@ inherit extraInfo; }; personal-cli = import ./personal-cli/nixos.nix; + personal-gui = import ./personal-gui/nixos.nix; }; overlays.x86_64-linux = final: prev: pkgList "x86_64-linux" prev.callPackage; @@ -112,6 +114,7 @@ ./hostconfig/ZeNixComputa/extra_info.nix self.nixosModules.minimal self.nixosModules.personal-cli + self.nixosModules.personal-gui ({pkgs, ...}: { nixpkgs.overlays = [ inputs.nur.overlay @@ -136,11 +139,11 @@ imports = [ self.hmModules.minimal self.hmModules.personal-cli + self.hmModules.personal-gui ./home.nix ./graphical.nix ./extra_info.nix ./localinfo.nix - ./wm ./rustdev.nix ./git ]; diff --git a/graphical.nix b/graphical.nix index 1266bbc..13d16c3 100644 --- a/graphical.nix +++ b/graphical.nix @@ -1,61 +1,9 @@ -{ - pkgs, - config, - ... -}: { +{pkgs, ...}: { home.packages = with pkgs; [ - # Browser - firefox-wayland - (tor-browser-bundle-bin.override { - useHardenedMalloc = false; - }) - - # IM - element-desktop - (discord.override {nss = pkgs.nss;}) - signal-desktop - - # Mail - thunderbird-wayland - - # Media - pavucontrol - vlc - spotify - krita - gromit-mpx - - # Libreoffice - libreoffice - hunspell - hunspellDicts.fr-any - hyphen - - # Misc progs - bitwarden - libreoffice-fresh - plasma5Packages.kdeconnect-kde - - # Misc utils - wl-clipboard - xdg-utils - feh - wdisplays ]; /* environment.pathsToLink = [ "/share/hunspell" "/share/myspell" "/share/hyphen" ]; environment.variables.DICPATH = "/run/current-system/sw/share/hunspell:/run/current-system/sw/share/hyphen"; */ - - home.sessionVariables = { - BROWSER = "firefox"; - GTK_USE_PORTAL = 1; - }; - - programs = { - zathura = { - enable = true; - }; - }; } diff --git a/home.nix b/home.nix index 133c5a1..f1985e3 100644 --- a/home.nix +++ b/home.nix @@ -38,27 +38,6 @@ in { }; }; }; - home.file = { - "bin/ssh-picker" = let - ssh_hosts = builtins.attrNames config.programs.ssh.matchBlocks; - ssh_specific = builtins.filter (h: !(lib.strings.hasInfix "*" h)) ssh_hosts; - ssh_specific_echo = builtins.map (h: "echo ${h}") ssh_specific; - - picker = - if config.wm.kind == "sway" - then "${pkgs.wofi}/bin/wofi -S dmenu" - else "${pkgs.rofi}/bin/rofi -dmenu"; - in { - text = '' - #!/usr/bin/env bash - - { - ${lib.strings.concatStringsSep "\n" ssh_specific_echo} - } | ${picker} | xargs ${config.terminal.command} ssh - ''; - executable = true; - }; - }; programs.zsh = { shellAliases = { diff --git a/nixos/configuration.nix b/nixos/configuration.nix index 4fee51c..803619a 100644 --- a/nixos/configuration.nix +++ b/nixos/configuration.nix @@ -24,23 +24,13 @@ services = { tzupdate.enable = true; privoxy.enable = true; - flatpak.enable = true; - pipewire = { - enable = true; - alsa.enable = true; - alsa.support32Bit = true; - pulse.enable = true; - }; localtimed.enable = true; geoclue2.enable = true; postgresql = { enable = true; }; }; - programs.adb.enable = true; - programs.dconf.enable = true; programs.nix-ld.enable = true; - hardware.opentabletdriver.enable = true; boot.kernelPackages = pkgs.linuxPackages; /* @@ -51,21 +41,6 @@ waydroid.enable = true; }; - security.pam = { - yubico = { - enable = true; - debug = false; - mode = "challenge-response"; - }; - services.swaylock = { - text = '' - auth include login - ''; - }; - }; - - programs.noisetorch.enable = true; - networking.firewall = { allowedTCPPorts = [ 8080 diff --git a/nixos/localcfg.nix b/nixos/localcfg.nix index 3095610..28df1b9 100644 --- a/nixos/localcfg.nix +++ b/nixos/localcfg.nix @@ -52,7 +52,6 @@ ]; }; */ - hardware.opentabletdriver.enable = true; users = { users = { @@ -60,10 +59,7 @@ uid = 1000; extraGroups = [ "wheel" - "adbusers" "http" - "scanner" - "lp" ]; }; }; @@ -71,18 +67,4 @@ # Set your time zone. # time.timeZone = "Europe/Paris"; - - services.printing = { - enable = true; - drivers = [pkgs.hplip pkgs.gutenprint pkgs.cnijfilter2]; - }; - hardware.sane.enable = true; - services.avahi = { - nssmdns = true; - enable = true; - }; - - hardware.opengl = { - enable = true; - }; } diff --git a/nixos/pkg.nix b/nixos/pkg.nix index 95e3dfe..2eff932 100644 --- a/nixos/pkg.nix +++ b/nixos/pkg.nix @@ -7,16 +7,6 @@ ashmem = config.boot.kernelPackages.callPackage ./anbox.nix {name = "ashmem";}; binder = config.boot.kernelPackages.callPackage ./anbox.nix {name = "binder";}; in { - xdg = { - portal = { - enable = true; - extraPortals = with pkgs; [ - xdg-desktop-portal-wlr - xdg-desktop-portal-gtk - ]; - }; - }; - # boot.extraModulePackages = [ ashmem binder ]; # boot.kernelModules = [ "ashmem_linux" "binder_linux" ]; diff --git a/personal-gui/hm.nix b/personal-gui/hm.nix new file mode 100644 index 0000000..51bea09 --- /dev/null +++ b/personal-gui/hm.nix @@ -0,0 +1,74 @@ +{ + config, + lib, + pkgs, + ... +}: { + imports = [./wm]; + + home.packages = with pkgs; [ + # Browsers + firefox-wayland + (tor-browser-bundle-bin.override { + useHardenedMalloc = false; + }) + + # IM + (discord.override {nss = pkgs.nss;}) + element-desktop + signal-desktop + + # Mail + thunderbird-wayland + + # Media + gromit-mpx + krita + pavucontrol + spotify + vlc + + # Libreoffice + hunspell + hunspellDicts.fr-any + hyphen + libreoffice + + # Misc + gnome.eog + freecad + plasma5Packages.kdeconnect-kde + wdisplays + wl-clipboard + xdg-utils + ]; + + home.sessionVariables = { + BROWSER = "firefox"; + GTK_USE_PORTAL = 1; + }; + + programs.zathura.enable = true; + + home.file = { + "bin/ssh-picker" = let + ssh_hosts = builtins.attrNames config.programs.ssh.matchBlocks; + ssh_specific = builtins.filter (h: !(lib.strings.hasInfix "*" h)) ssh_hosts; + ssh_specific_echo = builtins.map (h: "echo ${h}") ssh_specific; + + picker = + if config.wm.kind == "sway" + then "${pkgs.wofi}/bin/wofi -S dmenu" + else "${pkgs.rofi}/bin/rofi -dmenu"; + in { + text = '' + #!/usr/bin/env bash + + { + ${lib.strings.concatStringsSep "\n" ssh_specific_echo} + } | ${picker} | xargs ${config.terminal.command} ssh + ''; + executable = true; + }; + }; +} diff --git a/personal-gui/nixos.nix b/personal-gui/nixos.nix new file mode 100644 index 0000000..f958cb3 --- /dev/null +++ b/personal-gui/nixos.nix @@ -0,0 +1,63 @@ +{ + pkgs, + config, + ... +}: { + xdg = { + portal = { + enable = true; + extraPortals = with pkgs; [ + xdg-desktop-portal-wlr + xdg-desktop-portal-gtk + ]; + }; + }; + + services.gnome.gnome-keyring.enable = true; + services.flatpak.enable = true; + + services.pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + }; + programs.noisetorch.enable = true; + + programs.adb.enable = true; + programs.dconf.enable = true; + + virtualisation.waydroid.enable = true; + + hardware.opentabletdriver.enable = true; + hardware.bluetooth.enable = true; + + security.pam.yubico = { + enable = true; + debug = false; + mode = "challenge-response"; + }; + services.udev.packages = [pkgs.yubikey-personalization]; + + security.pam.services.swaylock.text = '' + auth include login + ''; + + services.printing = { + enable = true; + drivers = [pkgs.hplip pkgs.gutenprint pkgs.cnijfilter2]; + }; + hardware.sane.enable = true; + services.avahi = { + nssmdns = true; + enable = true; + }; + + hardware.opengl = { + enable = true; + driSupport = true; + driSupport32Bit = true; + }; + + users.users."${config.extraInfo.username}".extraGroups = ["adbusers" "scanner" "lp"]; +} diff --git a/wm/default.nix b/personal-gui/wm/default.nix similarity index 100% rename from wm/default.nix rename to personal-gui/wm/default.nix diff --git a/wm/i3.nix b/personal-gui/wm/i3.nix similarity index 100% rename from wm/i3.nix rename to personal-gui/wm/i3.nix diff --git a/wm/i3like-utils.nix b/personal-gui/wm/i3like-utils.nix similarity index 100% rename from wm/i3like-utils.nix rename to personal-gui/wm/i3like-utils.nix diff --git a/wm/i3like.nix b/personal-gui/wm/i3like.nix similarity index 100% rename from wm/i3like.nix rename to personal-gui/wm/i3like.nix diff --git a/wm/sway.nix b/personal-gui/wm/sway.nix similarity index 100% rename from wm/sway.nix rename to personal-gui/wm/sway.nix diff --git a/wm/terminal/default.nix b/personal-gui/wm/terminal/default.nix similarity index 100% rename from wm/terminal/default.nix rename to personal-gui/wm/terminal/default.nix diff --git a/wm/terminal/foot.nix b/personal-gui/wm/terminal/foot.nix similarity index 100% rename from wm/terminal/foot.nix rename to personal-gui/wm/terminal/foot.nix diff --git a/wm/terminal/kitty.nix b/personal-gui/wm/terminal/kitty.nix similarity index 100% rename from wm/terminal/kitty.nix rename to personal-gui/wm/terminal/kitty.nix diff --git a/wm/waybar.css b/personal-gui/wm/waybar.css similarity index 100% rename from wm/waybar.css rename to personal-gui/wm/waybar.css diff --git a/wm/wofi/config b/personal-gui/wm/wofi/config similarity index 100% rename from wm/wofi/config rename to personal-gui/wm/wofi/config diff --git a/wm/wofi/style.css b/personal-gui/wm/wofi/style.css similarity index 100% rename from wm/wofi/style.css rename to personal-gui/wm/wofi/style.css