diff --git a/flake.nix b/flake.nix index cdd9ced..355dee3 100644 --- a/flake.nix +++ b/flake.nix @@ -68,6 +68,7 @@ home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; home-manager.users."gunalx" = import ./home/full.nix; + home-manager.backupFileExtension = "bac"; home-manager.extraSpecialArgs = {inherit nix-colors inputs;}; } #need to choose one. The nixos one has bootloader and display manager in addition to the home manager one. diff --git a/home/assets/default.nix b/home/assets/wallpapers/default.nix similarity index 75% rename from home/assets/default.nix rename to home/assets/wallpapers/default.nix index f256b12..7d7e791 100644 --- a/home/assets/default.nix +++ b/home/assets/wallpapers/default.nix @@ -1,10 +1,13 @@ -{ stdenv, lib }: +{ lib, stdenv, pkgs }: stdenv.mkDerivation rec { pname = "wallpapers"; version = "1.0"; - src = ./; + src = pkgs.fetchurl { + url = "file://./"; + sha256 = lib.fakeSha256; + }; installPhase = '' mkdir -p $out/share/wallpapers @@ -17,3 +20,4 @@ stdenv.mkDerivation rec { maintainers = with maintainers; [ adriangl ]; }; } + diff --git a/home/assets/evergarden-telescope.jpg b/home/assets/wallpapers/evergarden-telescope.jpg similarity index 100% rename from home/assets/evergarden-telescope.jpg rename to home/assets/wallpapers/evergarden-telescope.jpg diff --git a/home/assets/wallpaper.jpg b/home/assets/wallpapers/wallpaper.jpg similarity index 100% rename from home/assets/wallpaper.jpg rename to home/assets/wallpapers/wallpaper.jpg diff --git a/home/colors.nix b/home/colors.nix index e75f617..3899a3a 100644 --- a/home/colors.nix +++ b/home/colors.nix @@ -57,5 +57,20 @@ in{ }; + + gtk = { + enable = true; + theme = { + name = "Adwaita-dark"; + package = pkgs.gnome.gnome-themes-extra; + }; + }; + + qt = { + enable = true; + platformTheme.name = "adwaita"; + style.name = "adwaita-dark"; + }; + } diff --git a/home/sshconfig.nix b/home/sshconfig.nix index 2eaff63..266140a 100644 --- a/home/sshconfig.nix +++ b/home/sshconfig.nix @@ -15,32 +15,34 @@ compression = true; matchBlocks = { + "*.pvv.ntnu.no" = { + user="adriangl"; + }; "*.ntnu.no !*.pvv.ntnu.no" = { user="adriangl"; proxyJump="isvegg.pvv.ntnu.no"; }; "snotra" = { user="adriangl"; - proxyJump="isvegg.pvv.ntnu.no"; - host="snotra.idi.ntnu.no"; + proxyJump="adriangl@isvegg.pvv.ntnu.no"; + hostname="snotra.idi.ntnu.no"; }; #pvv "pvv" = { user="adriangl"; - host="login.pvv.ntnu.no"; - match="pvv"; + hostname="login.pvv.ntnu.no"; }; "isvegg" = { user="adriangl"; - host="isvegg.pvv.ntnu.no"; + hostname="isvegg.pvv.ntnu.no"; }; #home "aragon" = { port = 6969; user="gunalx"; - host = "100.74.34.149"; + hostname="100.74.34.149"; }; diff --git a/home/sway.nix b/home/sway.nix index 220c9d1..4ad3ba5 100644 --- a/home/sway.nix +++ b/home/sway.nix @@ -1,7 +1,13 @@ { pkgs, config, lib, ... }: let - wallpapers = import ./wallpaper.nix { inherit pkgs; }; + #wallpapers = import ./wallpapers { inherit lib pkgs; }; + palette = config.colorScheme.palette; + + + idlelock = "brightnessctl -d intel_backlight s 10% && swaylock && brightnessctl -d intel_backlight s 50% "; + + in { imports = [ @@ -9,14 +15,20 @@ in ./foot.nix ./fonts.nix ./kanshi.nix + ./swaylock.nix + #./assets/wallpapers ]; + #home.packages = [ + # wallpapers + #]; home.packages = with pkgs; [ wl-clipboard libsForQt5.qt5ct qt6Packages.qt6ct - pass-wayland + pass-wayland + wev #term foot @@ -42,7 +54,7 @@ in #lockscreen and related wleave swayidle - swaylock-effects + #swaylock-effects #swaylock-fancy #migth change to this default may look prettier. #ligth and sound @@ -82,9 +94,6 @@ in ]; - qt.enable = true; - qt.style.name = "adwaita-dark"; - home.sessionVariables = { MOZ_ENABLE_WAYLAND = "1"; @@ -103,18 +112,23 @@ in _JAVA_AWT_WM_NONREPARENTING = 1; # gtk applications on wayland - #GTK_BACKEND="wayland"; + GTK_BACKEND="wayland"; + + #WALLPAPER_DIR="${wallpapers}/share/wallpapers"; + WALLPAPER_DIR="/home/gunalx/Pictures/wallpapers"; + }; + + wayland.windowManager.sway = let cfg = config.wayland.windowManager.sway; in { wrapperFeatures.gtk = true; enable = true; systemd.enable = true; - - + config = rec { modifier = "Mod4"; @@ -128,8 +142,18 @@ in { }]; startup = [ {command = "foot --server";} + + #wallpaper {command = "swww-daemon";} - {command = ''while true; do for wallpaper in $WALLPAPER_DIR/*; do swww img "$wallpaper"; sleep 300; done; done'';} + {command = "while true; do for wallpaper in $WALLPAPER_DIR/*; do swww img \"$wallpaper\"; sleep 15; done; done;";} + + #idlelock + {command = ''swayidle \ + timeout 120 ${idlelock} \ + timeout 180 'swaymsg "output * dpms off"' \ + resume 'swaymsg "output * dpms on"' \ + before-sleep ${idlelock} + '';} {command = "firefox";} {command = "nm-applet";} @@ -233,14 +257,24 @@ in { "${cfg.config.modifier}+Shift+c" = "exec code"; "${cfg.config.modifier}+f11" = "exec grim -g \"$(slurp)\" ~/Pictures/screenshots/\"screenshot-`date +%F-%T`\".png"; "${cfg.config.modifier}+Print" = "exec grim -g \"$(slurp)\" ~/Pictures/screenshots/\"screenshot-`date +%F-%T`\".png"; + "${cfg.config.modifier}+m" = "exec ${idlelock}"; + "ctrl+space" = "exec xkb_switch_layout next"; #TODO:verify "${cfg.config.modifier}+tab" = "workspace next"; "Alt+tab" = "workspace back_and_forth"; }; }; extraConfig = '' - input type:keyboard xkb_capslock disabled - input type:keyboard xkb_numlock enabled + input type:keyboard { + xkb_capslock disabled + xkb_numlock enabled + + xkb_layout us,no + xkb_options : + } + + + xwayland enable smart_borders no_gaps diff --git a/home/swaylock.nix b/home/swaylock.nix new file mode 100644 index 0000000..970c0d8 --- /dev/null +++ b/home/swaylock.nix @@ -0,0 +1,35 @@ +{ pkgs, inputs, lib, config, nix-colors, ... }: +let + palette = config.colorScheme.palette; +in +{ + imports = [ + ]; + + programs.swaylock = { + enable = true; + package = pkgs.swaylock-effects; + settings = { + color = palette.base00; + screenshots = true; + grace = 15; + clock = true; + submit-on-touch = true; + indicator-idle-visible = true; + indicator-radius = 100; + indicator-thickness = 7; + ring-color = palette.base05; + key-hl-color = palette.base03; + tect-color = palette.base00; + line-colot = palette.base00; + innside-color = palette.base04; + seperator-color = palette.base00; + fade-in = 0.1; + effect-scale = 0.6; + effect-blur = "7x3"; + }; + }; + + +} + diff --git a/home/wallpapers.nix b/home/wallpapers.nix deleted file mode 100644 index 16bf5a2..0000000 --- a/home/wallpapers.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ pkgs, ... }: - -let - wallpapers = pkgs.callPackage ./assets {}; -in -{ - environment.systemPackages = [ - wallpapers - ]; - - home.packages = [ - wallpapers - ]; - - home.sessionVariables = { - WALLPAPER_DIR = "${wallpapers}/share/wallpapers"; - }; -} diff --git a/profiles/desktop.nix b/profiles/desktop.nix index 63b0784..421c210 100644 --- a/profiles/desktop.nix +++ b/profiles/desktop.nix @@ -44,6 +44,9 @@ imports = security.polkit.enable = true; + security.pam.services.swaylock = {}; + security.pam.services.swaylock-effects = {}; + services.displayManager = { enable = true; sessionPackages = with pkgs; [ sway ]; @@ -60,7 +63,24 @@ imports = services.desktopManager.plasma6.enable = true; services.desktopManager.plasma6.enableQt5Integration = true; - qt.platformTheme = "kde"; + #bluetooth + services.blueman.enable = true; + hardware.bluetooth.powerOnBoot = true; # powers up the default Bluetooth controller on boot + hardware.bluetooth = { + enable = true; # enables support for Bluetooth + settings = { + General = { + Enable = "Source,Sink,Media,Socket"; + Experimental = true; + }; + }; + + }; + + #automount + services.udisks2.enable = true; + + #qt.platformTheme = "kde"; # Configure keymap in X11 services.xserver.xkb = { diff --git a/profiles/development.nix b/profiles/development.nix index e314d54..afdf6d2 100644 --- a/profiles/development.nix +++ b/profiles/development.nix @@ -29,7 +29,8 @@ imports = rustup - + mpi + gnuplot diff --git a/profiles/sound.nix b/profiles/sound.nix index 823a382..a5f4ca9 100644 --- a/profiles/sound.nix +++ b/profiles/sound.nix @@ -8,10 +8,12 @@ imports = # Enable sound with pipewire. sound.enable = true; - hardware.pulseaudio.enable = false; + #hardware.pulseaudio.enable = false; security.rtkit.enable = true; services.pipewire = { enable = true; + audio.enable = true; + systemWide = true; alsa.enable = true; alsa.support32Bit = true; pulse.enable = true; @@ -33,7 +35,7 @@ imports = synthesia vital picoloop - bespokesynth-with-vst2 + #bespokesynth-with-vst2 #always takes ages compiling fmsynth polyphone #soundfont editor diff --git a/profiles/sway.nix b/profiles/sway.nix index 1931b93..6834095 100644 --- a/profiles/sway.nix +++ b/profiles/sway.nix @@ -67,7 +67,7 @@ imports = ]; - qt.platformTheme = "qt5ct"; + #qt.platformTheme = "qt5ct"; }