diff --git a/backup/bspwm.nix b/backup/bspwm.nix index f4d5d19..81ab99a 100644 --- a/backup/bspwm.nix +++ b/backup/bspwm.nix @@ -47,7 +47,14 @@ in ]; home-manager.users.alex = { pkgs, ... }: { + home = { + file = { + ".bin/rofi-default-sink.sh" = { + executable = true; + source = ../home/bin/rofi-default-sink.sh; + }; + }; packages = with unstable.pkgs; [ arandr evince @@ -60,6 +67,62 @@ in ]; }; + xdg.desktopEntries = { + defaultSink = { + name = "Default Sink"; + exec = "/home/alex/.bin/rofi-default-sink.sh"; + terminal = false; + }; + }; + + programs = { + rofi = { + enable = true; + font = "Liberation Sans Regular 20"; + package = rofiPin.rofi; + extraConfig = { + modi = "drun,window"; + show-icons = true; + color-normal = "#00000000, #a6a6a6, #00000000, #a6a6a6, #000000"; + color-window = "#dd000000, #a6a6a6, #a6a6a6"; + separator-style = "solid"; + padding = 50; + lines = 10; + borderWidth = 2; + hide-scrollbar = true; + }; + }; + + kitty = { + enable = true; + extraConfig = '' + enable_audio_bell false + + background #000000 + foreground #e9e9e9 + cursor #e9e9e9 + selection_background #424242 + color0 #000000 + color8 #000000 + color1 #d44d53 + color9 #d44d53 + color2 #b9c949 + color10 #b9c949 + color3 #e6c446 + color11 #e6c446 + color4 #79a6da + color12 #79a6da + color5 #c396d7 + color13 #c396d7 + color6 #70c0b1 + color14 #70c0b1 + color7 #fffefe + color15 #fffefe + selection_foreground #000000 + ''; + }; + }; + gtk = { enable = true; font = { diff --git a/backup/gui.nix b/backup/gui.nix deleted file mode 100644 index 7747df4..0000000 --- a/backup/gui.nix +++ /dev/null @@ -1,92 +0,0 @@ -{ config, pkgs, ... }: -let - unstable = import { - config = { - allowUnfree = true; - }; - }; -in -{ - nixpkgs.config.allowUnfree = true; - - networking = { - firewall.enable = false; - networkmanager = { - enable = true; - }; - }; - - environment.systemPackages = with unstable.pkgs; [ - brave - fswebcam - glxinfo - gparted - libsecret - networkmanager-openconnect - openconnect - pulseaudio-ctl - gnome.simple-scan - ]; - - programs = { - dconf.enable = true; - adb.enable = true; - ssh = { - startAgent = true; - }; - gnupg.agent = { - enable = true; - pinentryFlavor = "curses"; - # enableSSHSupport = true; - }; - }; - - fonts = { - enableDefaultFonts = true; - fontDir.enable = true; - - fonts = with pkgs; [ - # (nerdfonts.override { fonts = [ "Liberation" ]; }) - nerdfonts - corefonts - google-fonts - liberation_ttf - noto-fonts - noto-fonts-cjk - noto-fonts-emoji - noto-fonts-extra - - open-sans - stix-two - twemoji-color-font - ]; - - # fontconfig = { - # enable = true; - # antialias = true; - # defaultFonts = { - # # monospace = [ "Fira Mono" ]; - # serif = [ "Linux Libertine" ]; - # sansSerif = [ "Open Sans" ]; - # emoji = [ "Twitter Color Emoji" ]; - # }; - # }; - }; - - hardware.bluetooth.enable = true; - hardware.sane.enable = true; - - services = { - mullvad-vpn.enable = true; - gvfs.enable = true; - udev.packages = with pkgs; [ gnome.gnome-settings-daemon ]; - printing = { - enable = true; - drivers = [ pkgs.brlaser ]; - }; - etesync-dav = { - enable = true; - apiUrl = "https://etesync.szczepan.ski/"; - }; - }; -} diff --git a/backup/user-gui.nix b/backup/user-gui.nix deleted file mode 100644 index 678b28a..0000000 --- a/backup/user-gui.nix +++ /dev/null @@ -1,132 +0,0 @@ -{ config, pkgs, lib, ... }: - -with builtins; -let - unstable = import { config.allowUnfree = true; }; - rofiPin = import - (pkgs.fetchFromGitHub { - owner = "NixOS"; - repo = "nixpkgs"; - rev = "42ded9d56bf0f56bebfcd49b4e942e7ffba4d5fc"; - sha256 = "KK/LIcEIU4mKYuGxXSqyBRA/fVplsRs3gnmtdUCqKxU="; - fetchSubmodules = true; - }) - { }; -in -{ - imports = [ ]; - - home-manager.users.alex = { pkgs, ... }: { - home = { - file = { - ".bin/rofi-default-sink.sh" = { - executable = true; - source = ../home/bin/rofi-default-sink.sh; - }; - }; - packages = with unstable.pkgs; [ - baobab - barrier - keepassxc - ponymix - mullvad-vpn - dracula-theme - deadbeef - grsync - ]; - }; - - xdg.desktopEntries = { - defaultSink = { - name = "Default Sink"; - exec = "/home/alex/.bin/rofi-default-sink.sh"; - terminal = false; - }; - }; - - services = { syncthing = { enable = true; }; }; - - programs = { - vscode = { - enable = true; - package = unstable.pkgs.vscode; - extensions = with unstable.pkgs.vscode-extensions; [ - bbenoist.nix - eamodio.gitlens - editorconfig.editorconfig - ms-azuretools.vscode-docker - ms-vsliveshare.vsliveshare - ms-vscode.cpptools - mskelton.one-dark-theme - ms-kubernetes-tools.vscode-kubernetes-tools - ryu1kn.partial-diff - jnoortheen.nix-ide - brettm12345.nixfmt-vscode - ]; - }; - - rofi = { - enable = true; - font = "Liberation Sans Regular 20"; - package = rofiPin.rofi; - extraConfig = { - modi = "drun,window"; - show-icons = true; - color-normal = "#00000000, #a6a6a6, #00000000, #a6a6a6, #000000"; - color-window = "#dd000000, #a6a6a6, #a6a6a6"; - separator-style = "solid"; - padding = 50; - lines = 10; - borderWidth = 2; - hide-scrollbar = true; - }; - }; - - mpv = { - enable = true; - config = { - hwdec = "auto-safe"; - vo = "gpu"; - profile = "gpu-hq"; - }; - }; - - git = { - extraConfig = { - credential.helper = "${ - pkgs.git.override { withLibsecret = true; } - }/bin/git-credential-libsecret"; - }; - }; - - kitty = { - enable = true; - extraConfig = '' - enable_audio_bell false - - background #000000 - foreground #e9e9e9 - cursor #e9e9e9 - selection_background #424242 - color0 #000000 - color8 #000000 - color1 #d44d53 - color9 #d44d53 - color2 #b9c949 - color10 #b9c949 - color3 #e6c446 - color11 #e6c446 - color4 #79a6da - color12 #79a6da - color5 #c396d7 - color13 #c396d7 - color6 #70c0b1 - color14 #70c0b1 - color7 #fffefe - color15 #fffefe - selection_foreground #000000 - ''; - }; - }; - }; -} diff --git a/configs/gui.nix b/configs/gui.nix new file mode 100644 index 0000000..5a94ea1 --- /dev/null +++ b/configs/gui.nix @@ -0,0 +1,92 @@ +{ config, pkgs, ... }: +let + unstable = import { + config = { + allowUnfree = true; + }; + }; +in +{ + nixpkgs.config.allowUnfree = true; + + networking = { + firewall.enable = false; + networkmanager = { + enable = true; + }; + }; + + environment.systemPackages = with unstable.pkgs; [ + # brave + # fswebcam + glxinfo + gparted + libsecret + # networkmanager-openconnect + # openconnect + # pulseaudio-ctl + gnome.simple-scan + ]; + + programs = { + dconf.enable = true; + adb.enable = true; + ssh = { + startAgent = true; + }; + gnupg.agent = { + enable = true; + pinentryFlavor = "curses"; + # enableSSHSupport = true; + }; + }; + + # fonts = { + # enableDefaultFonts = true; + # fontDir.enable = true; + + # fonts = with pkgs; [ + # # (nerdfonts.override { fonts = [ "Liberation" ]; }) + # nerdfonts + # corefonts + # # google-fonts + # liberation_ttf + # noto-fonts + # noto-fonts-cjk + # noto-fonts-emoji + # noto-fonts-extra + + # open-sans + # stix-two + # twemoji-color-font + # ]; + + # # fontconfig = { + # # enable = true; + # # antialias = true; + # # defaultFonts = { + # # # monospace = [ "Fira Mono" ]; + # # serif = [ "Linux Libertine" ]; + # # sansSerif = [ "Open Sans" ]; + # # emoji = [ "Twitter Color Emoji" ]; + # # }; + # # }; + # }; + + hardware.bluetooth.enable = true; + hardware.sane.enable = true; + + services = { + # mullvad-vpn.enable = true; + gvfs.enable = true; + # udev.packages = with pkgs; [ gnome.gnome-settings-daemon ]; + printing = { + enable = true; + drivers = [ pkgs.brlaser ]; + }; + etesync-dav = { + enable = true; + apiUrl = "https://etesync.szczepan.ski/"; + }; + }; +} diff --git a/configs/pantheon.nix b/configs/pantheon.nix index 12a158d..1a84d7c 100644 --- a/configs/pantheon.nix +++ b/configs/pantheon.nix @@ -7,6 +7,7 @@ services = { xserver = { enable = true; + excludePackages = [ pkgs.xterm ]; displayManager = { lightdm = { enable = true; diff --git a/backup/user-gui-applications.nix b/configs/user-gui-applications.nix similarity index 100% rename from backup/user-gui-applications.nix rename to configs/user-gui-applications.nix diff --git a/configs/user-gui.nix b/configs/user-gui.nix new file mode 100644 index 0000000..f1e0956 --- /dev/null +++ b/configs/user-gui.nix @@ -0,0 +1,65 @@ +{ config, pkgs, lib, ... }: + +with builtins; +let + unstable = import { config.allowUnfree = true; }; +in +{ + imports = [ ]; + + home-manager.users.alex = { pkgs, ... }: { + home = { + packages = with unstable.pkgs; [ + baobab + # barrier + keepassxc + ponymix + # mullvad-vpn + # dracula-theme + # deadbeef + grsync + ]; + }; + + + services = { syncthing = { enable = true; }; }; + + programs = { + vscode = { + enable = true; + package = unstable.pkgs.vscode; + # extensions = with unstable.pkgs.vscode-extensions; [ + # bbenoist.nix + # eamodio.gitlens + # editorconfig.editorconfig + # ms-azuretools.vscode-docker + # # ms-vsliveshare.vsliveshare + # # ms-vscode.cpptools + # mskelton.one-dark-theme + # ms-kubernetes-tools.vscode-kubernetes-tools + # ryu1kn.partial-diff + # jnoortheen.nix-ide + # brettm12345.nixfmt-vscode + # ]; + }; + + + mpv = { + enable = true; + config = { + hwdec = "auto-safe"; + vo = "gpu"; + profile = "gpu-hq"; + }; + }; + + git = { + extraConfig = { + credential.helper = "${ + pkgs.git.override { withLibsecret = true; } + }/bin/git-credential-libsecret"; + }; + }; + }; + }; +} diff --git a/configs/user.nix b/configs/user.nix index 04a151d..f521e2a 100644 --- a/configs/user.nix +++ b/configs/user.nix @@ -39,12 +39,12 @@ in environment.pathsToLink = [ "/share/zsh" ]; home-manager.users.alex = { pkgs, ... }: { - imports = [ - "${ - fetchTarball - "https://github.com/msteen/nixos-vscode-server/tarball/master" - }/modules/vscode-server/home.nix" - ]; +# imports = [ +# "${ +# fetchTarball +# "https://github.com/msteen/nixos-vscode-server/tarball/master" +# }/modules/vscode-server/home.nix" +# ]; home = { stateVersion = "23.05"; @@ -189,6 +189,6 @@ in # }; }; - services.vscode-server.enable = true; +# services.vscode-server.enable = true; }; } diff --git a/machine/nixos-vm.nix b/machine/nixos-vm.nix index b1e4abd..8ba3d77 100644 --- a/machine/nixos-vm.nix +++ b/machine/nixos-vm.nix @@ -4,11 +4,12 @@ let unstable = import { config.allowUnfree = true; }; in { imports = [ /etc/nixos/hardware-configuration.nix - # ../configs/pantheon.nix ../configs/common.nix ../configs/user.nix ../configs/docker.nix - # ../configs/user-gui.nix + ../configs/pantheon.nix + ../configs/gui.nix + ../configs/user-gui.nix ]; networking.hostName = "nixos-vm"; # Define your hostname. @@ -22,53 +23,30 @@ in { networking.useDHCP = false; networking.interfaces.enp0s1.useDHCP = true; + hardware.parallels.enable = true; + programs.nix-ld.enable = true; + + services = { - # k3s = { - # enable = true; - # role = "server"; - # }; -# qemuGuest.enable = true; -# spice-vdagentd.enable = true; - # etesync-dav = { - # enable = true; - # apiUrl = "https://etesync.szczepan.ski/"; - # }; + k3s = { + enable = true; + role = "server"; + }; + }; -# xserver = { -# enable = false; -# displayManager = { -# gdm = { -# enable = true; - # greeters.pantheon.enable = true; - }; -# }; + environment.pantheon.excludePackages = (with pkgs.pantheon; [ + elementary-calculator + # elementary-calendar + elementary-camera + elementary-code + elementary-music + # elementary-photos + # elementary-screenshot + # elementary-tasks + elementary-videos + epiphany + ]); -# desktopManager.gnome.enable = true; -# layout = "us"; - - # Enable touchpad support. -# libinput.enable = true; -# updateDbusEnvironment = true; -# }; -# }; - -# programs.evolution.enable = true; - -# environment.gnome.excludePackages = (with pkgs; [ gnome-photos gnome-tour ]) -# ++ (with pkgs.gnome; [ -# cheese # webcam tool -# gnome-music -# gnome-terminal -# gedit # text editor -# epiphany # web browser -# geary # email reader -# evince # document viewer -# gnome-characters -# totem # video player -# iagno # go game -# hitori # sudoku game -# atomix # puzzle game -# ]); system.stateVersion = "23.05"; }