From 6246713cf00ad59a79ccea1df144c5f2adfc23e0 Mon Sep 17 00:00:00 2001 From: Nico Date: Fri, 17 Jan 2025 00:06:13 +0100 Subject: [PATCH] fix flutter flake --- Shells/flutter/flake.nix | 42 +++- configuration.nix | 238 ++++++++++++--------- configuration.nix~ | 238 ++++++++++++--------- flake.lock | 68 +++--- flake.nix.bk | 35 +++ hardware-configuration.nix | 25 ++- home-nico.nix | 5 +- home-nico.nix.bk | 73 +++++++ packages/#default.nix# | 16 ++ packages/ags/example/ahmed-dotfiles | 1 + packages/ags/example/kotontrion-dotfiles | 1 + packages/ags/example/uday-dotfiles | 1 + packages/default.nix | 2 +- packages/default.nix~ | 1 - packages/emacs/default.nix | 13 +- packages/emacs/default.nix~ | 2 + packages/emacs/flutter/flake.nix | 1 - packages/emacs/flutter/flake.nix~ | 60 ++++++ packages/kitty/default.nix~ | 24 --- packages/other/default.nix | 1 + packages/other/default.nix~ | 37 ++++ packages/rofi/default.nix | 16 ++ packages/rofi/default.nix~ | 17 ++ packages/rofi/themes/catppuccin-mocha.rasi | 111 ++++++++++ packages/sway/default.nix | 23 +- packages/sway/default.nix~ | 60 ++++++ packages/waybar/config | 21 +- packages/waybar/config~ | 56 +++++ packages/waybar/default.nix | 2 +- packages/waybar/default.nix~ | 15 ++ packages/waybar/style.css | 1 + packages/waybar/style.css~ | 78 +++++++ shells/flutter/flake.lock | 61 ++++++ shells/flutter/flake.nix | 48 +++++ 34 files changed, 1074 insertions(+), 319 deletions(-) create mode 100644 flake.nix.bk create mode 100644 home-nico.nix.bk create mode 100644 packages/#default.nix# create mode 160000 packages/ags/example/ahmed-dotfiles create mode 160000 packages/ags/example/kotontrion-dotfiles create mode 160000 packages/ags/example/uday-dotfiles create mode 100644 packages/emacs/flutter/flake.nix~ create mode 100644 packages/other/default.nix~ create mode 100644 packages/rofi/default.nix create mode 100644 packages/rofi/default.nix~ create mode 100644 packages/rofi/themes/catppuccin-mocha.rasi create mode 100644 packages/sway/default.nix~ create mode 100644 packages/waybar/config~ create mode 100644 packages/waybar/default.nix~ create mode 100644 packages/waybar/style.css~ create mode 100644 shells/flutter/flake.lock create mode 100644 shells/flutter/flake.nix diff --git a/Shells/flutter/flake.nix b/Shells/flutter/flake.nix index 6af219b..0be1707 100644 --- a/Shells/flutter/flake.nix +++ b/Shells/flutter/flake.nix @@ -3,8 +3,12 @@ description = "Flutter 3.13.x"; inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; flake-utils.url = "github:numtide/flake-utils"; + + android-nixpkgs = { + url = "github:tadfisher/android-nixpkgs"; + }; }; -outputs = { self, nixpkgs, flake-utils }: +outputs = { self, nixpkgs, flake-utils, android-nixpkgs }: flake-utils.lib.eachDefaultSystem (system: let pkgs = import nixpkgs { @@ -14,30 +18,50 @@ outputs = { self, nixpkgs, flake-utils }: allowUnfree = true; }; }; - buildToolsVersion = "30.0.3"; androidComposition = pkgs.androidenv.composeAndroidPackages { - buildToolsVersions = [ buildToolsVersion "33.0.1" ]; - platformVersions = [ "34" "28" ]; + buildToolsVersions = [ "30.0.3" "34.0.0" "33.0.1"]; + platformVersions = [ "35" "34" "33" "28" ]; abiVersions = [ "armeabi-v7a" "arm64-v8a" ]; }; + androidCustomPackage = android-nixpkgs.sdk.${system} ( + sdkPkgs: with sdkPkgs; [ + build-tools-30.0.3 + build-tools-34.0.0 + ] + ); androidSdk = androidComposition.androidsdk; in { devShell = with pkgs; mkShell rec { shellHook = '' - zsh + nu exit ''; - GRADLE_OPTS = "-Dorg.gradle.project.android.aapt2FromMavenOverride=${androidSdk}/libexec/android-sdk/build-tools/33.0.1/aapt2"; + GRADLE_OPTS = "-Dorg.gradle.project.android.aapt2FromMavenOverride=${androidSdk}/libexec/android-sdk/build-tools/34.0.0/aapt2"; ANDROID_SDK_ROOT = "${androidSdk}/libexec/android-sdk"; buildInputs = [ flutter androidSdk # The customized SDK that we've made above - jdk17 - hover - go +# jdk17 + jdk21 + + (vscode-with-extensions.override { + vscode = vscodium; + vscodeExtensions = with vscode-extensions; [ + vscodevim.vim + dart-code.dart-code + dart-code.flutter + ] ++ pkgs.vscode-utils.extensionsFromVscodeMarketplace[ + { + name = "awesome-flutter-snippets"; + publisher = "nash"; + version = "4.0.1"; + sha256 = "lXdos/xB18h3Z0YfkgEk55G2JvRMYudUUIltugQjylU="; + } + ]; + }) ]; }; diff --git a/configuration.nix b/configuration.nix index 7099a67..147ee16 100644 --- a/configuration.nix +++ b/configuration.nix @@ -1,22 +1,19 @@ -# Edit this configuration file to define what should be installed on -# your system. Help is available in the configuration.nix(5) man page -# and in the NixOS manual (accessible by running ‘nixos-help’). +# Edit this configuration file to define what should be installed on your system. Help is available +# in the configuration.nix(5) man page and in the NixOS manual (accessible by running ‘nixos-help’). { config, pkgs, inputs, ... }: -{ - imports = +{ imports = [ # Include the results of the hardware scan. ./hardware-configuration.nix inputs.home-manager.nixosModules.default - ]; - + ]; # home manager home-manager = { extraSpecialArgs = { inherit inputs; }; users = { - "n" = import ./home-nico.nix; + "nico" = import ./home-nico.nix; }; }; @@ -26,100 +23,132 @@ # xwayland.enable = true; # }; + # Bootloader. +# boot.loader.grub.enable = true; boot.loader.grub.device = "/dev/sda"; boot.loader.grub.useOSProber = true; + +boot.supportedFilesystems = [ "zfs" ]; +boot.zfs.forceImportRoot = false; +networking.hostId = "8425e349"; + + + +# Boot loader config for configuration.nix: +boot.loader.grub.useOSProber = true; + boot.loader.grub = { + enable = true; + zfsSupport = true; + efiSupport = true; + efiInstallAsRemovable = true; + mirroredBoots = [ + { devices = [ "nodev"]; path = "/boot"; } + ]; + }; + + fileSystems."/" = + { device = "zpool/root"; + fsType = "zfs"; + }; + + fileSystems."/nix" = + { device = "zpool/nix"; + fsType = "zfs"; + }; + + fileSystems."/home" = + { device = "zpool/home"; + fsType = "zfs"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/49CB-AECA"; + fsType = "vfat"; + }; + +# fileSystems."/mnt" = +# { +# device = "/dev/disk/by-label/HDD"; +# fsType = "ext4"; +# }; + + + swapDevices = [ ]; + + # Flakes nix.settings.experimental-features = [ "nix-command" "flakes" ]; - security.polkit.enable = true; + networking.hostName = "nico-nixos"; # Define your hostname. + # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. - - # Bootloader. - boot.loader.systemd-boot.enable = true; - boot.loader.efi.canTouchEfiVariables = true; - - networking.hostName = "nico-nixos-laptop"; # Define your hostname. - # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. - - # Configure network proxy if necessary - # networking.proxy.default = "http://user:password@proxy:port/"; - # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; + # Configure network proxy if necessary networking.proxy.default = + # "http://user:password@proxy:port/"; networking.proxy.noProxy = + # "127.0.0.1,localhost,internal.domain"; # Enable networking networking.networkmanager.enable = true; + # VM + # virtualisation.virtualbox.host.enable = true; + # users.extraGroups.vboxusers.members = [ "user-with-access-to-virtualbox" ]; + # virtualisation.virtualbox.guest.enable = true; + # virtualisation.virtualbox.guest.dragAndDrop = true; + # Set your time zone. time.timeZone = "Europe/Berlin"; # Select internationalisation properties. i18n.defaultLocale = "en_US.UTF-8"; - i18n.extraLocaleSettings = { - LC_ADDRESS = "de_DE.UTF-8"; - LC_IDENTIFICATION = "de_DE.UTF-8"; - LC_MEASUREMENT = "de_DE.UTF-8"; - LC_MONETARY = "de_DE.UTF-8"; - LC_NAME = "de_DE.UTF-8"; - LC_NUMERIC = "de_DE.UTF-8"; - LC_PAPER = "de_DE.UTF-8"; - LC_TELEPHONE = "de_DE.UTF-8"; - LC_TIME = "de_DE.UTF-8"; + i18n.extraLocaleSettings = { LC_ADDRESS = "en_US.UTF-8"; LC_IDENTIFICATION = "en_US.UTF-8"; + LC_MEASUREMENT = "en_US.UTF-8"; LC_MONETARY = "en_US.UTF-8"; LC_NAME = "en_US.UTF-8"; LC_NUMERIC = + "en_US.UTF-8"; LC_PAPER = "en_US.UTF-8"; LC_TELEPHONE = "en_US.UTF-8"; LC_TIME = "en_US.UTF-8"; }; - # Enable the X11 windowing system. + # Enable the X11 windowing system. You can disable this if you're only using the Wayland session. services.xserver.enable = true; - # Enable the XFCE Desktop Environment. + # Enable the KDE Plasma Desktop Environment. services.displayManager.sddm.enable = true; - services.xserver.desktopManager.xfce.enable = true; - + services.desktopManager.plasma6.enable = true; # Configure keymap in X11 - services.xserver = { - xkb = { - variant = ""; - layout = "de"; - }; + services.xserver = { xkb.layout = "us"; xkb.variant = ""; }; # Configure console keymap - console.keyMap = "de"; + console.keyMap = "us"; # Enable CUPS to print documents. services.printing.enable = true; # Enable sound with pipewire. - hardware.pulseaudio.enable = false; - security.rtkit.enable = true; - services.pipewire = { - enable = true; - alsa.enable = true; - alsa.support32Bit = true; + services.pulseaudio.enable = true; + security.rtkit.enable = true; + services.pipewire = { + enable = false; + alsa.enable = true; + alsa.support32Bit = true; pulse.enable = true; - # If you want to use JACK applications, uncomment this - #jack.enable = true; + # If you want to use JACK applications, uncomment this jack.enable = true; - # use the example session manager (no others are packaged yet so this is enabled by default, - # no need to redefine it in your config for now) + # use the example session manager (no others are packaged yet so this is enabled by default, no + # need to redefine it in your config for now) #media-session.enable = true; }; - # Enable touchpad support (enabled default in most desktopManager). - services.libinput.enable = true; - - programs.light.enable = true; - - programs.zsh.enable = true; -# programs.nushell.enable = true; + # Enable touchpad support (enabled default in most desktopManager). services.xserver.libinput.enable + # = true; # Define a user account. Don't forget to set a password with ‘passwd’. - users.users.n = { - isNormalUser = true; - description = "n"; - extraGroups = [ "networkmanager" "wheel" "video" "adbusers" ]; - packages = with pkgs; [ + users.users.nico = { isNormalUser = true; description = "nico"; extraGroups = [ "networkmanager" + "wheel" "adbusers"]; packages = with pkgs; [ + obsidian + musescore ]; - shell = pkgs.nushell; }; - + users.defaultUserShell = pkgs.nushell; + environment.shells = with pkgs; [ zsh nushell ]; + programs.zsh.enable = true; # Install firefox. programs.firefox.enable = true; @@ -127,41 +156,46 @@ # Allow unfree packages nixpkgs.config.allowUnfree = true; - # List packages installed in system profile. To search, run: - # $ nix search wget + + # List packages installed in system profile. To search, run: $ nix search wget environment.systemPackages = with pkgs; [ - vim + vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed wget git kitty tree nodejs - musescore - anki-bin - unzip - - # nvim - gnumake - python312Packages.pip - python312 - cargo - ripgrep - gcc + gparted + lutris + wineWowPackages.stable + spotify # sway networkmanagerapplet - grim # screenshot functionality - slurp # screenshot functionality wl-clipboard # wl-copy and wl-paste for copy/paste from stdin / stdout mako # notification system developed by swaywm maintainer - kickoff # application launcher waybar # bar - pulseaudio # audiocontrols + pulseaudio + pavucontrol brightnessctl # brightness controls wpaperd # wallpaper manager ]; - services.gnome.gnome-keyring.enable = true; +fonts.packages = with pkgs; [ +# iosevka + # (nerdfonts.override { fonts = [ "JetBrainsMono" "UbuntuMono" ]; }) + nerd-fonts.jetbrains-mono + nerd-fonts.ubuntu-mono +]; + +hardware.amdgpu.opencl.enable = true; + + programs.steam = { + enable = true; + }; + + + services.gnome.gnome-keyring.enable = true; programs.sway = { enable = true; @@ -169,30 +203,23 @@ }; - #fonts -fonts.packages = with pkgs; [ - iosevka - (nerdfonts.override { fonts = [ "JetBrainsMono" "UbuntuMono" ]; }) -]; +# programs.hyprland = { +# enable = true; +# package = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland; +# }; - # Some programs need SUID wrappers, can be configured further or are - # started in user sessions. - # programs.mtr.enable = true; - # programs.gnupg.agent = { - # enable = true; - # enableSSHSupport = true; + # Some programs need SUID wrappers, can be configured further or are started in user sessions. + # programs.mtr.enable = true; programs.gnupg.agent = { + # enable = true; enableSSHSupport = true; # }; # List services that you want to enable: - # Enable the OpenSSH daemon. - # services.openssh.enable = true; + # Enable the OpenSSH daemon. services.openssh.enable = true; - # Open ports in the firewall. - # networking.firewall.allowedTCPPorts = [ ... ]; - # networking.firewall.allowedUDPPorts = [ ... ]; - # Or disable the firewall altogether. + # Open ports in the firewall. networking.firewall.allowedTCPPorts = [ ... ]; + # networking.firewall.allowedUDPPorts = [ ... ]; Or disable the firewall altogether. # networking.firewall.enable = false; networking.firewall = { @@ -206,12 +233,11 @@ fonts.packages = with pkgs; [ }; - # 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). + # 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? } diff --git a/configuration.nix~ b/configuration.nix~ index ab45a77..7d06d15 100644 --- a/configuration.nix~ +++ b/configuration.nix~ @@ -1,22 +1,19 @@ -# Edit this configuration file to define what should be installed on -# your system. Help is available in the configuration.nix(5) man page -# and in the NixOS manual (accessible by running ‘nixos-help’). +# Edit this configuration file to define what should be installed on your system. Help is available +# in the configuration.nix(5) man page and in the NixOS manual (accessible by running ‘nixos-help’). { config, pkgs, inputs, ... }: -{ - imports = +{ imports = [ # Include the results of the hardware scan. ./hardware-configuration.nix inputs.home-manager.nixosModules.default - ]; - + ]; # home manager home-manager = { extraSpecialArgs = { inherit inputs; }; users = { - "n" = import ./home-nico.nix; + "nico" = import ./home-nico.nix; }; }; @@ -26,100 +23,132 @@ # xwayland.enable = true; # }; + # Bootloader. +# boot.loader.grub.enable = true; boot.loader.grub.device = "/dev/sda"; boot.loader.grub.useOSProber = true; + +boot.supportedFilesystems = [ "zfs" ]; +boot.zfs.forceImportRoot = false; +networking.hostId = "8425e349"; + + + +# Boot loader config for configuration.nix: +boot.loader.grub.useOSProber = true; + boot.loader.grub = { + enable = true; + zfsSupport = true; + efiSupport = true; + efiInstallAsRemovable = true; + mirroredBoots = [ + { devices = [ "nodev"]; path = "/boot"; } + ]; + }; + + fileSystems."/" = + { device = "zpool/root"; + fsType = "zfs"; + }; + + fileSystems."/nix" = + { device = "zpool/nix"; + fsType = "zfs"; + }; + + fileSystems."/home" = + { device = "zpool/home"; + fsType = "zfs"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/49CB-AECA"; + fsType = "vfat"; + }; + +# fileSystems."/mnt" = +# { +# device = "/dev/disk/by-label/HDD"; +# fsType = "ext4"; +# }; + + + swapDevices = [ ]; + + # Flakes nix.settings.experimental-features = [ "nix-command" "flakes" ]; - security.polkit.enable = true; + networking.hostName = "nico-nixos"; # Define your hostname. + # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. - - # Bootloader. - boot.loader.systemd-boot.enable = true; - boot.loader.efi.canTouchEfiVariables = true; - - networking.hostName = "nico-nixos-laptop"; # Define your hostname. - # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. - - # Configure network proxy if necessary - # networking.proxy.default = "http://user:password@proxy:port/"; - # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; + # Configure network proxy if necessary networking.proxy.default = + # "http://user:password@proxy:port/"; networking.proxy.noProxy = + # "127.0.0.1,localhost,internal.domain"; # Enable networking networking.networkmanager.enable = true; + # VM + # virtualisation.virtualbox.host.enable = true; + # users.extraGroups.vboxusers.members = [ "user-with-access-to-virtualbox" ]; + # virtualisation.virtualbox.guest.enable = true; + # virtualisation.virtualbox.guest.dragAndDrop = true; + # Set your time zone. time.timeZone = "Europe/Berlin"; # Select internationalisation properties. i18n.defaultLocale = "en_US.UTF-8"; - i18n.extraLocaleSettings = { - LC_ADDRESS = "de_DE.UTF-8"; - LC_IDENTIFICATION = "de_DE.UTF-8"; - LC_MEASUREMENT = "de_DE.UTF-8"; - LC_MONETARY = "de_DE.UTF-8"; - LC_NAME = "de_DE.UTF-8"; - LC_NUMERIC = "de_DE.UTF-8"; - LC_PAPER = "de_DE.UTF-8"; - LC_TELEPHONE = "de_DE.UTF-8"; - LC_TIME = "de_DE.UTF-8"; + i18n.extraLocaleSettings = { LC_ADDRESS = "en_US.UTF-8"; LC_IDENTIFICATION = "en_US.UTF-8"; + LC_MEASUREMENT = "en_US.UTF-8"; LC_MONETARY = "en_US.UTF-8"; LC_NAME = "en_US.UTF-8"; LC_NUMERIC = + "en_US.UTF-8"; LC_PAPER = "en_US.UTF-8"; LC_TELEPHONE = "en_US.UTF-8"; LC_TIME = "en_US.UTF-8"; }; - # Enable the X11 windowing system. + # Enable the X11 windowing system. You can disable this if you're only using the Wayland session. services.xserver.enable = true; - # Enable the XFCE Desktop Environment. + # Enable the KDE Plasma Desktop Environment. services.displayManager.sddm.enable = true; - services.xserver.desktopManager.xfce.enable = true; - + services.desktopManager.plasma6.enable = true; # Configure keymap in X11 - services.xserver = { - xkb = { - variant = ""; - layout = "de"; - }; + services.xserver = { xkb.layout = "en"; xkb.variant = ""; }; # Configure console keymap - console.keyMap = "de"; + console.keyMap = "en"; # Enable CUPS to print documents. services.printing.enable = true; # Enable sound with pipewire. - hardware.pulseaudio.enable = false; - security.rtkit.enable = true; - services.pipewire = { - enable = true; - alsa.enable = true; - alsa.support32Bit = true; + services.pulseaudio.enable = true; + security.rtkit.enable = true; + services.pipewire = { + enable = false; + alsa.enable = true; + alsa.support32Bit = true; pulse.enable = true; - # If you want to use JACK applications, uncomment this - #jack.enable = true; + # If you want to use JACK applications, uncomment this jack.enable = true; - # use the example session manager (no others are packaged yet so this is enabled by default, - # no need to redefine it in your config for now) + # use the example session manager (no others are packaged yet so this is enabled by default, no + # need to redefine it in your config for now) #media-session.enable = true; }; - # Enable touchpad support (enabled default in most desktopManager). - services.libinput.enable = true; - - programs.light.enable = true; - - programs.zsh.enable = true; - programs.nushell.enable = true; + # Enable touchpad support (enabled default in most desktopManager). services.xserver.libinput.enable + # = true; # Define a user account. Don't forget to set a password with ‘passwd’. - users.users.n = { - isNormalUser = true; - description = "n"; - extraGroups = [ "networkmanager" "wheel" "video" "adbusers" ]; - packages = with pkgs; [ + users.users.nico = { isNormalUser = true; description = "nico"; extraGroups = [ "networkmanager" + "wheel" "adbusers"]; packages = with pkgs; [ + obsidian + musescore ]; - shell = pkgs.nushell; }; - + users.defaultUserShell = pkgs.nushell; + environment.shells = with pkgs; [ zsh nushell ]; + programs.zsh.enable = true; # Install firefox. programs.firefox.enable = true; @@ -127,41 +156,46 @@ # Allow unfree packages nixpkgs.config.allowUnfree = true; - # List packages installed in system profile. To search, run: - # $ nix search wget + + # List packages installed in system profile. To search, run: $ nix search wget environment.systemPackages = with pkgs; [ - vim + vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed wget git kitty tree nodejs - musescore - anki-bin - unzip - - # nvim - gnumake - python312Packages.pip - python312 - cargo - ripgrep - gcc + gparted + lutris + wineWowPackages.stable + spotify # sway networkmanagerapplet - grim # screenshot functionality - slurp # screenshot functionality wl-clipboard # wl-copy and wl-paste for copy/paste from stdin / stdout mako # notification system developed by swaywm maintainer - kickoff # application launcher waybar # bar - pulseaudio # audiocontrols + pulseaudio + pavucontrol brightnessctl # brightness controls wpaperd # wallpaper manager ]; - services.gnome.gnome-keyring.enable = true; +fonts.packages = with pkgs; [ +# iosevka + # (nerdfonts.override { fonts = [ "JetBrainsMono" "UbuntuMono" ]; }) + nerd-fonts.jetbrains-mono + nerd-fonts.ubuntu-mono +]; + +hardware.amdgpu.opencl.enable = true; + + programs.steam = { + enable = true; + }; + + + services.gnome.gnome-keyring.enable = true; programs.sway = { enable = true; @@ -169,30 +203,23 @@ }; - #fonts -fonts.packages = with pkgs; [ - iosevka - (nerdfonts.override { fonts = [ "JetBrainsMono" "UbuntuMono" ]; }) -]; +# programs.hyprland = { +# enable = true; +# package = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland; +# }; - # Some programs need SUID wrappers, can be configured further or are - # started in user sessions. - # programs.mtr.enable = true; - # programs.gnupg.agent = { - # enable = true; - # enableSSHSupport = true; + # Some programs need SUID wrappers, can be configured further or are started in user sessions. + # programs.mtr.enable = true; programs.gnupg.agent = { + # enable = true; enableSSHSupport = true; # }; # List services that you want to enable: - # Enable the OpenSSH daemon. - # services.openssh.enable = true; + # Enable the OpenSSH daemon. services.openssh.enable = true; - # Open ports in the firewall. - # networking.firewall.allowedTCPPorts = [ ... ]; - # networking.firewall.allowedUDPPorts = [ ... ]; - # Or disable the firewall altogether. + # Open ports in the firewall. networking.firewall.allowedTCPPorts = [ ... ]; + # networking.firewall.allowedUDPPorts = [ ... ]; Or disable the firewall altogether. # networking.firewall.enable = false; networking.firewall = { @@ -206,12 +233,11 @@ fonts.packages = with pkgs; [ }; - # 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). + # 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? } diff --git a/flake.lock b/flake.lock index b75c899..8c840dc 100644 --- a/flake.lock +++ b/flake.lock @@ -2,15 +2,15 @@ "nodes": { "ags": { "inputs": { - "nixpkgs": "nixpkgs", - "systems": "systems" + "astal": "astal", + "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1728326430, - "narHash": "sha256-tV1ABHuA1HItMdCTuNdA8fMB+qw7LpjvI945VwMSABI=", + "lastModified": 1736677288, + "narHash": "sha256-Vj3WOLy6o6Zf44Rwg9eLqNRQPlVoDrQ89tsef3l3990=", "owner": "Aylur", "repo": "ags", - "rev": "60180a184cfb32b61a1d871c058b31a3b9b0743d", + "rev": "90db9b9fecc0f4228440d83107c6c745a35e7d77", "type": "github" }, "original": { @@ -19,6 +19,27 @@ "type": "github" } }, + "astal": { + "inputs": { + "nixpkgs": [ + "ags", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1735172721, + "narHash": "sha256-rtEAwGsHSppnkR3Qg3eRJ6Xh/F84IY9CrBBLzYabalY=", + "owner": "aylur", + "repo": "astal", + "rev": "6c84b64efc736e039a8a10774a4a1bf772c37aa2", + "type": "github" + }, + "original": { + "owner": "aylur", + "repo": "astal", + "type": "github" + } + }, "home-manager": { "inputs": { "nixpkgs": [ @@ -26,11 +47,11 @@ ] }, "locked": { - "lastModified": 1728903686, - "narHash": "sha256-ZHFrGNWDDriZ4m8CA/5kDa250SG1LiiLPApv1p/JF0o=", + "lastModified": 1736785676, + "narHash": "sha256-TY0jUwR3EW0fnS0X5wXMAVy6h4Z7Y6a3m+Yq++C9AyE=", "owner": "nix-community", "repo": "home-manager", - "rev": "e1aec543f5caf643ca0d94b6a633101942fd065f", + "rev": "fc52a210b60f2f52c74eac41a8647c1573d2071d", "type": "github" }, "original": { @@ -41,15 +62,15 @@ }, "nixpkgs": { "locked": { - "lastModified": 1725634671, - "narHash": "sha256-v3rIhsJBOMLR8e/RNWxr828tB+WywYIoajrZKFM+0Gg=", - "owner": "NixOS", + "lastModified": 1734649271, + "narHash": "sha256-4EVBRhOjMDuGtMaofAIqzJbg4Ql7Ai0PSeuVZTHjyKQ=", + "owner": "nixos", "repo": "nixpkgs", - "rev": "574d1eac1c200690e27b8eb4e24887f8df7ac27c", + "rev": "d70bd19e0a38ad4790d3913bf08fcbfc9eeca507", "type": "github" }, "original": { - "owner": "NixOS", + "owner": "nixos", "ref": "nixos-unstable", "repo": "nixpkgs", "type": "github" @@ -57,11 +78,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1728888510, - "narHash": "sha256-nsNdSldaAyu6PE3YUA+YQLqUDJh+gRbBooMMekZJwvI=", + "lastModified": 1736798957, + "narHash": "sha256-qwpCtZhSsSNQtK4xYGzMiyEDhkNzOCz/Vfu4oL2ETsQ=", "owner": "nixos", "repo": "nixpkgs", - "rev": "a3c0b3b21515f74fd2665903d4ce6bc4dc81c77c", + "rev": "9abb87b552b7f55ac8916b6fc9e5cb486656a2f3", "type": "github" }, "original": { @@ -77,21 +98,6 @@ "home-manager": "home-manager", "nixpkgs": "nixpkgs_2" } - }, - "systems": { - "locked": { - "lastModified": 1689347949, - "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", - "owner": "nix-systems", - "repo": "default-linux", - "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default-linux", - "type": "github" - } } }, "root": "root", diff --git a/flake.nix.bk b/flake.nix.bk new file mode 100644 index 0000000..195e9d6 --- /dev/null +++ b/flake.nix.bk @@ -0,0 +1,35 @@ +{ + description = "A simple NixOS flake"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + + # home manager + home-manager.url = "github:nix-community/home-manager"; + home-manager.inputs.nixpkgs.follows = "nixpkgs"; + + # ags + ags.url = "github:Aylur/ags"; + }; + + inputs.hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1"; + + outputs = { self, nixpkgs, home-manager, ... }@inputs: { + # Please replace my-nixos with your hostname + nixosConfigurations.my-nixos = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + specialArgs = { inherit inputs; }; + modules = [ + # Import the previous configuration.nix we used, + # so the old configuration file still takes effect + ./configuration.nix + home-manager.nixosModules.home-manager + { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.users.nico = import ./home-nico.nix; + } + ]; + }; + }; +} diff --git a/hardware-configuration.nix b/hardware-configuration.nix index d294671..1055885 100644 --- a/hardware-configuration.nix +++ b/hardware-configuration.nix @@ -8,18 +8,28 @@ [ (modulesPath + "/installer/scan/not-detected.nix") ]; - boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; + boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-intel" ]; + boot.kernelModules = [ "kvm-amd" ]; boot.extraModulePackages = [ ]; fileSystems."/" = - { device = "/dev/disk/by-uuid/1d64861a-3d30-4b76-8a19-9a68618ddf3a"; - fsType = "ext4"; + { device = "zpool/root"; + fsType = "zfs"; + }; + + fileSystems."/home" = + { device = "zpool/home"; + fsType = "zfs"; + }; + + fileSystems."/nix" = + { device = "zpool/nix"; + fsType = "zfs"; }; fileSystems."/boot" = - { device = "/dev/disk/by-uuid/580D-111D"; + { device = "/dev/disk/by-uuid/49CB-AECA"; fsType = "vfat"; options = [ "fmask=0022" "dmask=0022" ]; }; @@ -31,9 +41,8 @@ # 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.enp0s31f6.useDHCP = lib.mkDefault true; - # networking.interfaces.wlp4s0.useDHCP = lib.mkDefault true; + # networking.interfaces.enp4s0.useDHCP = lib.mkDefault true; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; } diff --git a/home-nico.nix b/home-nico.nix index 8c9298b..18345d1 100644 --- a/home-nico.nix +++ b/home-nico.nix @@ -1,8 +1,8 @@ { config, pkgs, inputs, ... }: { - home.username = "n"; - home.homeDirectory = "/home/n"; + home.username = "nico"; + home.homeDirectory = "/home/nico"; imports = [ ./packages @@ -24,3 +24,4 @@ programs.home-manager.enable = true; } + diff --git a/home-nico.nix.bk b/home-nico.nix.bk new file mode 100644 index 0000000..2ae8df4 --- /dev/null +++ b/home-nico.nix.bk @@ -0,0 +1,73 @@ +{ config, pkgs, inputs, ... }: + +{ + home.username = "nico"; + home.homeDirectory = "/home/nico"; + + imports = [ + ./packages + ]; + + nixpkgs = { + config = { + allowUnfree = true; + allowUnfreePredicate = (_: true); + }; + }; + + home.packages = with pkgs; [ + brave + + ]; + +#fonts.fonts = with pkgs; [ +# (nerdfonts.override { fonts = [ "JetBrainsMono" "UbuntuMono"]; }) +#]; + + +programs.git = { + enable = true; + userName = "Nico"; + userEmail = "nicovessen@gmail.com"; + extraConfig = { + safe.directory = "/etc/nixos"; + }; +}; + +services.kdeconnect = { + enable = true; + indicator = true; +}; + +programs.zsh = { + enable = true; + enableCompletion = true; + autosuggestion.enable = true; + syntaxHighlighting.enable = true; + + + shellAliases = { + update = "sudo nixos-rebuild switch --flake /etc/nixos/#my-nixos"; + }; + zplug = { + enable = true; + plugins = [ + { name = "zsh-users/zsh-autosuggestions"; } # Simple plugin installation + ]; + }; + + oh-my-zsh = { + enable = true; + plugins = [ "git" ]; + theme = "agnoster"; + }; + + +}; + + + home.stateVersion = "24.05"; + + programs.home-manager.enable = true; + +} diff --git a/packages/#default.nix# b/packages/#default.nix# new file mode 100644 index 0000000..fc191ba --- /dev/null +++ b/packages/#default.nix# @@ -0,0 +1,16 @@ +{ ... }: +{ + imports = [ +# ./ags + ./other + ./sway + ./waybar + ./wpaperd + ./nvim + ./emacs + ./kitty + ./rofi +# ./hyprland +# ./vscode + ]; +} diff --git a/packages/ags/example/ahmed-dotfiles b/packages/ags/example/ahmed-dotfiles new file mode 160000 index 0000000..9d5fb8d --- /dev/null +++ b/packages/ags/example/ahmed-dotfiles @@ -0,0 +1 @@ +Subproject commit 9d5fb8d45ebb7ce89d298e09c23fbef0dfa9e655 diff --git a/packages/ags/example/kotontrion-dotfiles b/packages/ags/example/kotontrion-dotfiles new file mode 160000 index 0000000..44cd3ba --- /dev/null +++ b/packages/ags/example/kotontrion-dotfiles @@ -0,0 +1 @@ +Subproject commit 44cd3baa15847eece9f0a41daa2aac918b2adf86 diff --git a/packages/ags/example/uday-dotfiles b/packages/ags/example/uday-dotfiles new file mode 160000 index 0000000..f7c2bcb --- /dev/null +++ b/packages/ags/example/uday-dotfiles @@ -0,0 +1 @@ +Subproject commit f7c2bcb4a66532369bad492069ecf60fbd3a9734 diff --git a/packages/default.nix b/packages/default.nix index e36c1f9..fc191ba 100644 --- a/packages/default.nix +++ b/packages/default.nix @@ -9,7 +9,7 @@ ./nvim ./emacs ./kitty -# ./qutebrowser + ./rofi # ./hyprland # ./vscode ]; diff --git a/packages/default.nix~ b/packages/default.nix~ index 619dae3..2ee7984 100644 --- a/packages/default.nix~ +++ b/packages/default.nix~ @@ -9,7 +9,6 @@ ./nvim ./emacs ./kitty - ./qutebrowser # ./hyprland # ./vscode ]; diff --git a/packages/emacs/default.nix b/packages/emacs/default.nix index fc0e811..408c01d 100644 --- a/packages/emacs/default.nix +++ b/packages/emacs/default.nix @@ -12,6 +12,7 @@ in { (telephone-line-mode 1) (xterm-mouse-mode 1) + (setq evil-want-C-u-scroll t) (menu-bar--display-line-numbers-mode-relative) @@ -137,9 +138,6 @@ in { :hook (dired-mode . treemacs-icons-dired-enable-once) :ensure t) -(use-package treemacs-magit - :after (treemacs magit) - :ensure t) (use-package treemacs-persp ;;treemacs-perspective if you use perspective.el vs. persp-mode :after (treemacs persp-mode) ;;or perspective vs. persp-mode @@ -232,13 +230,14 @@ in { (setq lsp-keymap-prefix "C-c l") (require 'lsp-mode) - +(evil-set-undo-system 'undo-redo) (flycheck-inline-mode nil) +(global-evil-vimish-fold-mode 1) ''; package = emacsWithPackages (epkgs: (with epkgs.melpaStablePackages; [ - catppuccin-theme ]) - ++ (with epkgs.melpaPackages; [ + ++ (with epkgs.melpaPackages; [ + catppuccin-theme evil nix-mode lsp-treemacs @@ -258,6 +257,8 @@ in { which-key magit format-all + evil-vimish-fold + affe ]) ++ (with epkgs.elpaPackages; [ undo-tree diff --git a/packages/emacs/default.nix~ b/packages/emacs/default.nix~ index de82805..fc0e811 100644 --- a/packages/emacs/default.nix~ +++ b/packages/emacs/default.nix~ @@ -232,6 +232,8 @@ in { (setq lsp-keymap-prefix "C-c l") (require 'lsp-mode) + +(flycheck-inline-mode nil) ''; package = emacsWithPackages (epkgs: (with epkgs.melpaStablePackages; [ catppuccin-theme diff --git a/packages/emacs/flutter/flake.nix b/packages/emacs/flutter/flake.nix index 37e6f3d..72e72c8 100644 --- a/packages/emacs/flutter/flake.nix +++ b/packages/emacs/flutter/flake.nix @@ -36,7 +36,6 @@ outputs = { self, nixpkgs, flake-utils }: flutter androidSdk # The customized SDK that we've made above jdk17 - vscode (vscode-with-extensions.override { vscode = vscodium; diff --git a/packages/emacs/flutter/flake.nix~ b/packages/emacs/flutter/flake.nix~ new file mode 100644 index 0000000..37e6f3d --- /dev/null +++ b/packages/emacs/flutter/flake.nix~ @@ -0,0 +1,60 @@ +{ +description = "Flutter 3.13.x"; +inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + flake-utils.url = "github:numtide/flake-utils"; +}; +outputs = { self, nixpkgs, flake-utils }: + flake-utils.lib.eachDefaultSystem (system: + let + pkgs = import nixpkgs { + inherit system; + config = { + android_sdk.accept_license = true; + allowUnfree = true; + }; + }; + buildToolsVersion = "34.0.0"; + androidComposition = pkgs.androidenv.composeAndroidPackages { + buildToolsVersions = [ buildToolsVersion "33.0.1" ]; + platformVersions = [ "34" "33" "28" ]; + abiVersions = [ "armeabi-v7a" "arm64-v8a" ]; + }; + androidSdk = androidComposition.androidsdk; + in + { + devShell = + with pkgs; mkShell rec { + shellHook = '' + nu + exit + ''; + GRADLE_OPTS = "-Dorg.gradle.project.android.aapt2FromMavenOverride=${androidSdk}/libexec/android-sdk/build-tools/33.0.1/aapt2"; + + ANDROID_SDK_ROOT = "${androidSdk}/libexec/android-sdk"; + buildInputs = [ + flutter + androidSdk # The customized SDK that we've made above + jdk17 + vscode + + (vscode-with-extensions.override { + vscode = vscodium; + vscodeExtensions = with vscode-extensions; [ + vscodevim.vim + dart-code.dart-code + dart-code.flutter + ] ++ pkgs.vscode-utils.extensionsFromVscodeMarketplace[ + { + name = "awesome-flutter-snippets"; + publisher = "nash"; + version = "4.0.1"; + sha256 = "lXdos/xB18h3Z0YfkgEk55G2JvRMYudUUIltugQjylU="; + } + ]; + }) + ]; + + }; + }); +} diff --git a/packages/kitty/default.nix~ b/packages/kitty/default.nix~ index 0d0f99f..5918d8b 100644 --- a/packages/kitty/default.nix~ +++ b/packages/kitty/default.nix~ @@ -5,25 +5,6 @@ ]; - - -programs.nushell = { - enable = true; - extraConfig = '' - $env.config = { - show_banner: false, - edit_mode: vi - } - ''; - shellAliases = { - update = "sudo nixos-rebuild switch --flake /etc/nixos/#my-nixos"; - emacs = "emacs -nw"; - femacs = "emacs -nw --load /home/n/Documents/Shells/flutter/init.el"; - pemacs = "emacs -nw --load /home/n/Documents/Shells//python/init.el"; - }; -}; - - programs.starship = { enable = true; @@ -32,10 +13,6 @@ programs.starship = { }; }; -programs.carapace = { - enable = true; - enableNushellIntegration = true; -}; programs.zsh = { @@ -83,7 +60,6 @@ programs.kitty = { ## upstream: https://github.com/catppuccin/kitty/blob/main/themes/mocha.conf ## blurb: Soothing pastel theme for the high-spirited! -map ctrl+shift+w no_op # The basic colors diff --git a/packages/other/default.nix b/packages/other/default.nix index 546d5a3..dbb7648 100644 --- a/packages/other/default.nix +++ b/packages/other/default.nix @@ -30,4 +30,5 @@ services.kdeconnect = { + } diff --git a/packages/other/default.nix~ b/packages/other/default.nix~ new file mode 100644 index 0000000..e10cad4 --- /dev/null +++ b/packages/other/default.nix~ @@ -0,0 +1,37 @@ +{ pkgs, config, lib,... }: +{ + home.packages = with pkgs; [ + + ]; + +programs.ranger = { + enable = true; + extraConfig = '' +set preview_images true +set preview_images_method kitty + ''; +}; + + +programs.git = { + enable = true; + userName = "Nico"; + userEmail = "nicovessen@gmail.com"; + extraConfig = { + safe.directory = "/etc/nixos"; + }; +}; + + +services.kdeconnect = { + enable = true; + indicator = true; +}; + +programs.obsidian = { + enable = true; +}; + + + +} diff --git a/packages/rofi/default.nix b/packages/rofi/default.nix new file mode 100644 index 0000000..cd41a02 --- /dev/null +++ b/packages/rofi/default.nix @@ -0,0 +1,16 @@ +{ pkgs, config, lib,... }: +{ + home.packages = with pkgs; [ + rofi-screenshot + rofi-power-menu + ]; + + + programs.rofi = { + enable = true; + theme = "/etc/nixos/packages/rofi/themes/catppuccin-mocha"; + plugins = [ + pkgs.rofi-power-menu + ]; + }; +} diff --git a/packages/rofi/default.nix~ b/packages/rofi/default.nix~ new file mode 100644 index 0000000..06e52d7 --- /dev/null +++ b/packages/rofi/default.nix~ @@ -0,0 +1,17 @@ +{ pkgs, config, lib,... }: +{ + home.packages = with pkgs; [ + rofi-screenshot + rofi-power-menu + bitwarden-menu + ]; + + + programs.rofi = { + enable = true; + theme = "/etc/nixos/packages/rofi/themes/catppuccin-mocha"; + plugins = [ + pkgs.rofi-power-menu + ]; + }; +} diff --git a/packages/rofi/themes/catppuccin-mocha.rasi b/packages/rofi/themes/catppuccin-mocha.rasi new file mode 100644 index 0000000..0f7b727 --- /dev/null +++ b/packages/rofi/themes/catppuccin-mocha.rasi @@ -0,0 +1,111 @@ +* { + bg-col: #1e1e2e; + bg-col-light: #1e1e2e; + border-col: #1e1e2e; + selected-col: #1e1e2e; + blue: #89b4fa; + fg-col: #cdd6f4; + fg-col2: #f38ba8; + grey: #6c7086; + + width: 600; + font: "JetBrainsMono Nerd Font 14"; +} + +element-text, element-icon , mode-switcher { + background-color: inherit; + text-color: inherit; +} + +window { + height: 360px; + border: 3px; + border-color: @border-col; + background-color: @bg-col; +} + +mainbox { + background-color: @bg-col; +} + +inputbar { + children: [prompt,entry]; + background-color: @bg-col; + border-radius: 5px; + padding: 2px; +} + +prompt { + background-color: @blue; + padding: 6px; + text-color: @bg-col; + border-radius: 3px; + margin: 20px 0px 0px 20px; +} + +textbox-prompt-colon { + expand: false; + str: ":"; +} + +entry { + padding: 6px; + margin: 20px 0px 0px 10px; + text-color: @fg-col; + background-color: @bg-col; +} + +listview { + border: 0px 0px 0px; + padding: 6px 0px 0px; + margin: 10px 0px 0px 20px; + columns: 2; + lines: 5; + background-color: @bg-col; +} + +element { + padding: 5px; + background-color: @bg-col; + text-color: @fg-col ; +} + +element-icon { + size: 25px; +} + +element selected { + background-color: @selected-col ; + text-color: @fg-col2 ; +} + +mode-switcher { + spacing: 0; + } + +button { + padding: 10px; + background-color: @bg-col-light; + text-color: @grey; + vertical-align: 0.5; + horizontal-align: 0.5; +} + +button selected { + background-color: @bg-col; + text-color: @blue; +} + +message { + background-color: @bg-col-light; + margin: 2px; + padding: 2px; + border-radius: 5px; +} + +textbox { + padding: 6px; + margin: 20px 0px 0px 20px; + text-color: @blue; + background-color: @bg-col-light; +} \ No newline at end of file diff --git a/packages/sway/default.nix b/packages/sway/default.nix index a1de0be..0d5506c 100644 --- a/packages/sway/default.nix +++ b/packages/sway/default.nix @@ -13,24 +13,26 @@ startup = [ # Launch Firefox on start - {command = "wpaperd";} +# {command = "wpaperd";} ]; }; extraConfig = '' +## screens +#output DP-3 scale 0.9 +#output DP-2 pos 0 0 + +workspace 10 output DP-3 +for_window [class="Spotify"] scratchpad show + ## Input configuration input "type:keyboard" { - xkb_layout de + xkb_layout de,us xkb_variant "nodeadkeys" + xkb_options grp:alt_shift_toggle } -input "type:touchpad" { - tap enabled # enables click-on-tap - tap_button_map lrm # tap with 1 finger = left click, 2 fingers = right click, 3 fingers = middle click - dwt disabled # disable (touchpad) while typing - dwtp disabled # disable (touchpad) while track pointing -} # Brightness bindsym XF86MonBrightnessDown exec light -U 10 @@ -42,7 +44,10 @@ input "type:touchpad" { bindsym XF86AudioMute exec 'pactl set-sink-mute @DEFAULT_SINK@ toggle' # app launcher - bindsym Mod4+m exec 'kickoff' + bindsym Mod4+m exec 'rofi -show drun' + bindsym Mod4+Shift+x exec 'rofi -show power-menu -modi power-menu:rofi-power-menu' + bindsym Mod4+Print exec 'rofi-screenshot' + bindsym Mod4+BackSpace kill # disable window border diff --git a/packages/sway/default.nix~ b/packages/sway/default.nix~ new file mode 100644 index 0000000..35d2387 --- /dev/null +++ b/packages/sway/default.nix~ @@ -0,0 +1,60 @@ +{ config, pkgs, inputs, ... }: + +{ + wayland.windowManager.sway = { + enable = true; + config = rec { + modifier = "Mod4"; + # Use kitty as default terminal + terminal = "kitty"; + bars = [ + {command = "waybar";} + ]; + + startup = [ + # Launch Firefox on start +# {command = "wpaperd";} + ]; + }; + + + extraConfig = '' +## screens +#output DP-3 scale 0.9 +#output DP-2 pos 0 0 + +workspace 10 output DP-3 +for_window [class="Spotify"] scratchpad show + + ## Input configuration + input "type:keyboard" { + xkb_layout de, us + xkb_variant "nodeadkeys" + xkb_options grp:alt_shift_toggle + } + + + # Brightness + bindsym XF86MonBrightnessDown exec light -U 10 + bindsym XF86MonBrightnessUp exec light -A 10 + + # Volume + bindsym XF86AudioRaiseVolume exec 'pactl set-sink-volume @DEFAULT_SINK@ +1%' + bindsym XF86AudioLowerVolume exec 'pactl set-sink-volume @DEFAULT_SINK@ -1%' + bindsym XF86AudioMute exec 'pactl set-sink-mute @DEFAULT_SINK@ toggle' + + # app launcher + bindsym Mod4+m exec 'rofi -show drun' + bindsym Mod4+Shift+x exec 'rofi -show power-menu -modi power-menu:rofi-power-menu' + bindsym Mod4+Print exec 'rofi-screenshot' + + bindsym Mod4+BackSpace kill + + # disable window border +default_border pixel 2 +font pango:monospace 0.001 +titlebar_padding 1 +titlebar_border_thickness 0 + ''; + }; +} diff --git a/packages/waybar/config b/packages/waybar/config index 0466064..e01aaf1 100644 --- a/packages/waybar/config +++ b/packages/waybar/config @@ -5,7 +5,13 @@ "spacing": 0, "modules-left": ["clock", "sway/workspaces","sway/mode"], "modules-center": ["sway/window"], - "modules-right": ["network","battery", "pulseaudio", "tray"], + "modules-right": ["network", "cpu", "memory", "custom/keyboard-layout", "pulseaudio", "tray"], + +"custom/keyboard-layout": { + "interval": 1, + "exec": "swaymsg -t get_inputs | jq -r '.[] | select(.type == \"keyboard\") | .xkb_active_layout_name'" +}, + "cpu": { "interval": 5, @@ -17,19 +23,6 @@ "format": "RAM: {used} GiB" }, - "battery": { - "bat": "BAT0", - "states": { - "good": 90, - "warning": 20, - "critical": 7 - }, - "format": "{icon} {capacity}%", - "format-charging": " {capacity}%", - "format-plugged": " {capacity}%", - "format-alt": "{time} {icon}", - "format-icons": ["", "", "" , "", ""] - }, "pulseaudio": { "format": "{icon} {volume}%", diff --git a/packages/waybar/config~ b/packages/waybar/config~ new file mode 100644 index 0000000..cfe5fa0 --- /dev/null +++ b/packages/waybar/config~ @@ -0,0 +1,56 @@ +{ + "layer": "bottom", + "position": "top", + "height": 35, + "spacing": 0, + "modules-left": ["clock", "sway/workspaces","sway/mode"], + "modules-center": ["sway/window"], + "modules-right": ["network", "battery", "cpu", "memory", "custom/keyboard-layout", "pulseaudio", "tray"], + +"custom/keyboard-layout": { + "interval": 1, + "exec": "swaymsg -t get_inputs | jq -r '.[] | select(.type == \"keyboard\") | .xkb_active_layout_name'" +}, + + + "cpu": { + "interval": 5, + "format": "CPU: {usage}% {avg_frequency} GHz" + }, + + "memory": { + "interval": 5, + "format": "RAM: {used} GiB" + }, + + "battery": { + "bat": "BAT0", + "states": { + "good": 90, + "warning": 20, + "critical": 7 + }, + "format": "{icon} {capacity}%", + "format-charging": " {capacity}%", + "format-plugged": " {capacity}%", + "format-alt": "{time} {icon}", + "format-icons": ["", "", "" , "", ""] + }, + + "pulseaudio": { + "format": "{icon} {volume}%", + "format-muted": " Muted", + "format-icons": ["", "", ""] + }, + + "clock": { + "format": "{:%d.%m.%Y | %H:%M}" + }, + + "network": { + "format-wifi": " {essid} {signalStrength}%", + "format-disconnected": " No Connection" + } + + +} diff --git a/packages/waybar/default.nix b/packages/waybar/default.nix index 4dde40d..bee663f 100644 --- a/packages/waybar/default.nix +++ b/packages/waybar/default.nix @@ -1,7 +1,7 @@ { pkgs, config, lib,... }: { home.packages = with pkgs; [ - + jq ]; home.file = diff --git a/packages/waybar/default.nix~ b/packages/waybar/default.nix~ new file mode 100644 index 0000000..4dde40d --- /dev/null +++ b/packages/waybar/default.nix~ @@ -0,0 +1,15 @@ +{ pkgs, config, lib,... }: +{ + home.packages = with pkgs; [ + + ]; + + home.file = + lib.mkMerge [ + { + ".config/waybar/config".source = ./config; + ".config/waybar/style.css".source = ./style.css; + ".config/waybar/mocha.css".source = ./mocha.css; + } + ]; +} diff --git a/packages/waybar/style.css b/packages/waybar/style.css index 282c3d9..bfdbef2 100644 --- a/packages/waybar/style.css +++ b/packages/waybar/style.css @@ -21,6 +21,7 @@ window#waybar { #memory, #network, #pulseaudio, +#custom-keyboard-layout, #battery{ background: rgba(10,10,10,100); opacity: 0.8; diff --git a/packages/waybar/style.css~ b/packages/waybar/style.css~ new file mode 100644 index 0000000..282c3d9 --- /dev/null +++ b/packages/waybar/style.css~ @@ -0,0 +1,78 @@ +@import "mocha.css"; + +* { + border: none; + border-radius: 0; + font-family: "Fira Code"; + font-weight: bold; + font-size: 13px; + min-height: 0; +} + +window#waybar { +/* background: rgba(0,130,130,0); */ + background: @base; +} + +#clock, +#workspaces, +#window, +#cpu, +#memory, +#network, +#pulseaudio, +#battery{ + background: rgba(10,10,10,100); + opacity: 0.8; +/* color: #00ffff; */ + color: @mauve; + padding: 0px 10px ; + margin: 3px 0px; +} + +#workspaces button{ + color: @mauve; + border-radius: 7px; + margin: 3px 0px; + margin-left: 6px; +} + +#workspaces button.focused{ + background: @mauve; + color: @base; + opacity: 0.8; + transition: 0.3s; +} + +#workspaces button:hover{ + background: @mauve; + color: @base; + opacity: 0.8; + transition: 0.5s; +} + +#window{ + border-radius: 10px; +} + +#waybar.empty #window { + background: none; +} + +#network{ + border-radius: 10px 0px 0px 10px; +} + +#pulseaudio{ + border-radius: 0px 10px 10px 0px; + margin-right: 5px +} + +#workspaces{ + border-radius: 0px 10px 10px 0px; +} + +#clock{ + border-radius: 10px 0px 0px 10px; + margin-left: 5px +} diff --git a/shells/flutter/flake.lock b/shells/flutter/flake.lock new file mode 100644 index 0000000..052af3f --- /dev/null +++ b/shells/flutter/flake.lock @@ -0,0 +1,61 @@ +{ + "nodes": { + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1710146030, + "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1721138476, + "narHash": "sha256-+W5eZOhhemLQxelojLxETfbFbc19NWawsXBlapYpqIA=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "ad0b5eed1b6031efaed382844806550c3dcb4206", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/shells/flutter/flake.nix b/shells/flutter/flake.nix new file mode 100644 index 0000000..9cc38ba --- /dev/null +++ b/shells/flutter/flake.nix @@ -0,0 +1,48 @@ +{ +description = "Flutter 3.13.x"; +inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + flake-utils.url = "github:numtide/flake-utils"; +}; +outputs = { self, nixpkgs, flake-utils }: + flake-utils.lib.eachDefaultSystem (system: + let + pkgs = import nixpkgs { + inherit system; + config = { + android_sdk.accept_license = true; + allowUnfree = true; + }; + }; + buildToolsVersion = "34.0.0"; + androidComposition = pkgs.androidenv.composeAndroidPackages { + buildToolsVersions = [ buildToolsVersion "28.0.3" ]; + platformVersions = [ "34" "28" ]; + abiVersions = [ "armeabi-v7a" "arm64-v8a" ]; + }; + androidSdk = androidComposition.androidsdk; + in + { + devShell = + with pkgs; mkShell rec { + ANDROID_SDK_ROOT = "${androidSdk}/libexec/android-sdk"; + buildInputs = [ + flutter + androidSdk # The customized SDK that we've made above + jdk17 + + + (vscode-with-extensions.override { + vscode = vscodium; + vscodeExtensions = with vscode-extensions; [ + vscodevim.vim + dart-code.flutter +jnoortheen.nix-ide + ]; + } + ) + + ]; + }; + }); +}