From 9d1d1094fea6a79c4b56db3a39c20d5fde768045 Mon Sep 17 00:00:00 2001 From: Aly Raffauf Date: Sun, 3 Mar 2024 14:03:38 -0500 Subject: [PATCH 1/8] added vim alias to nvim --- home/aly/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/home/aly/default.nix b/home/aly/default.nix index 8ce0606e..68d8ec64 100644 --- a/home/aly/default.nix +++ b/home/aly/default.nix @@ -33,6 +33,7 @@ enableCompletion = true; shellAliases = { ls = "eza --group-directories-first"; + vim = "nvim"; }; initExtra = '' From 5102eccad9194642be0478abab1e78cb9bfef0e2 Mon Sep 17 00:00:00 2001 From: Aly Raffauf Date: Sun, 3 Mar 2024 19:38:53 -0500 Subject: [PATCH 2/8] Create main.yml --- .github/workflows/main.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 00000000..3a1cb7e4 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,32 @@ +name: Bump flake.lock + +on: + schedule: + - cron: "0 6 * * *" + + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - uses: cachix/install-nix-action@v20 + + - run: nix flake update + + - uses: stefanzweifel/git-auto-commit-action@v4 + with: + commit_message: Bump flake.lock + branch: main + commit_options: '--no-verify --signoff' + file_pattern: flake.lock + commit_user_name: Flake Bot # defaults to "GitHub Actions" + #commit_user_email: my-github-actions-bot@example.org # defaults to "actions@github.com" + commit_author: Flake Bot # defaults to author of the commit that triggered the run + skip_dirty_check: false + skip_fetch: true From 769b344655d073a8976f1512feeda729a5159581 Mon Sep 17 00:00:00 2001 From: Aly Raffauf Date: Sun, 3 Mar 2024 20:48:59 -0500 Subject: [PATCH 3/8] added logitech unifying receiver support --- flake.nix | 2 ++ modules/logitech/default.nix | 7 +++++++ 2 files changed, 9 insertions(+) create mode 100644 modules/logitech/default.nix diff --git a/flake.nix b/flake.nix index 15c45ef3..7a6e0f7c 100644 --- a/flake.nix +++ b/flake.nix @@ -49,6 +49,7 @@ ./modules/podman ./modules/steam ./modules/via-qmk + ./modules/logitech # Add managed flatpak module. nix-flatpak.nixosModules.nix-flatpak @@ -76,6 +77,7 @@ ./modules/podman ./modules/steam ./modules/via-qmk + ./modules/logitech # Add managed flatpak module. nix-flatpak.nixosModules.nix-flatpak diff --git a/modules/logitech/default.nix b/modules/logitech/default.nix new file mode 100644 index 00000000..77798087 --- /dev/null +++ b/modules/logitech/default.nix @@ -0,0 +1,7 @@ +{ config, pkgs, ... }: + +{ + # Add support for logitech unifying receivers. + hardware.logitech.wireless.enable = true; + hardware.logitech.wireless.enableGraphical = true; +} From 4b1c7369f63c4efd8ce57ff9cd7655a6b996556b Mon Sep 17 00:00:00 2001 From: Aly Raffauf Date: Sun, 3 Mar 2024 21:09:46 -0500 Subject: [PATCH 4/8] switched gnome apps from flatpaks to nixpkgs --- desktop/default.nix | 2 + desktop/gnome/default.nix | 94 +++++++++++++++++++-------------------- 2 files changed, 49 insertions(+), 47 deletions(-) diff --git a/desktop/default.nix b/desktop/default.nix index a2bc9aa5..378f4779 100644 --- a/desktop/default.nix +++ b/desktop/default.nix @@ -19,7 +19,9 @@ services.flatpak.enable = true; services.flatpak.packages = [ "org.mozilla.firefox" + "com.github.tchx84.Flatseal" ]; + # services.flatpak.overrides = { # sockets = [ # "gpg-agent" # Expose GPG agent diff --git a/desktop/gnome/default.nix b/desktop/gnome/default.nix index 68e36459..4d43d6d9 100644 --- a/desktop/gnome/default.nix +++ b/desktop/gnome/default.nix @@ -27,54 +27,54 @@ ]; # Prefer baset set of gnome apps from Flatpaks. - environment.gnome.excludePackages = (with pkgs; [ - baobab - epiphany - evince - gnome-connections - gnome-photos - gnome-text-editor - gnome-tour - loupe - snapshot # webcam tool - ]) ++ (with pkgs.gnome; [ - geary # email reader - gnome-calculator - gnome-calendar - gnome-characters - gnome-clocks - gnome-contacts - gnome-logs - gnome-music - gnome-weather - sushi - totem # video player - ]); + # environment.gnome.excludePackages = (with pkgs; [ + # baobab + # epiphany + # evince + # gnome-connections + # gnome-photos + # gnome-text-editor + # gnome-tour + # loupe + # snapshot # webcam tool + # ]) ++ (with pkgs.gnome; [ + # geary # email reader + # gnome-calculator + # gnome-calendar + # gnome-characters + # gnome-clocks + # gnome-contacts + # gnome-logs + # gnome-music + # gnome-weather + # sushi + # totem # video player + # ]); - services.flatpak.packages = [ - "com.github.tchx84.Flatseal" - "org.gnome.baobab" - "org.gnome.Builder" - "org.gnome.Calculator" - "org.gnome.Characters" - "org.gnome.clocks" - "org.gnome.Connections" - "org.gnome.Contacts" - "org.gnome.Epiphany" - "org.gnome.Evince" - "org.gnome.Fractal" - "org.gnome.Geary" - "org.gnome.Logs" - "org.gnome.Loupe" - "org.gnome.Music" - "org.gnome.NautilusPreviewer" - "org.gnome.Photos" - "org.gnome.Snapshot" - "org.gnome.TextEditor" - "org.gnome.Totem" - "org.gnome.Weather" - "org.gnome.Calendar" - ]; + # services.flatpak.packages = [ + # "com.github.tchx84.Flatseal" + # "org.gnome.baobab" + # "org.gnome.Builder" + # "org.gnome.Calculator" + # "org.gnome.Characters" + # "org.gnome.clocks" + # "org.gnome.Connections" + # "org.gnome.Contacts" + # "org.gnome.Epiphany" + # "org.gnome.Evince" + # "org.gnome.Fractal" + # "org.gnome.Geary" + # "org.gnome.Logs" + # "org.gnome.Loupe" + # "org.gnome.Music" + # "org.gnome.NautilusPreviewer" + # "org.gnome.Photos" + # "org.gnome.Snapshot" + # "org.gnome.TextEditor" + # "org.gnome.Totem" + # "org.gnome.Weather" + # "org.gnome.Calendar" + # ]; nixpkgs.overlays = [ (final: prev: { From 4c14b64dbb1f58079eefeefde691fc0d56275ec1 Mon Sep 17 00:00:00 2001 From: Aly Raffauf Date: Sun, 3 Mar 2024 21:42:59 -0500 Subject: [PATCH 5/8] added initial placeholders for mauville host --- flake.nix | 25 +++++++++++++++ hosts/mauville/default.nix | 27 ++++++++++++++++ hosts/mauville/hardware-configuration.nix | 39 +++++++++++++++++++++++ 3 files changed, 91 insertions(+) create mode 100644 hosts/mauville/default.nix create mode 100644 hosts/mauville/hardware-configuration.nix diff --git a/flake.nix b/flake.nix index 7a6e0f7c..012d81ff 100644 --- a/flake.nix +++ b/flake.nix @@ -90,6 +90,31 @@ } ]; }; + + # Ryzen 5 2600 with 16GB RAM, RX 6700. + mauville = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + modules = [ + ./hosts/mauville + ./system + ./users/aly + ./desktop/gnome + ./modules/podman + ./modules/steam + ./modules/via-qmk + ./modules/logitech + + # Add managed flatpak module. + nix-flatpak.nixosModules.nix-flatpak + + # Add home-manager nixos module so home-manager config deploys on nixos-rebuild. + home-manager.nixosModules.home-manager { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.users.aly = import ./home/aly; + } + ]; + }; }; defaultPackage.x86_64-linux = home-manager.defaultPackage.x86_64-linux; diff --git a/hosts/mauville/default.nix b/hosts/mauville/default.nix new file mode 100644 index 00000000..899399df --- /dev/null +++ b/hosts/mauville/default.nix @@ -0,0 +1,27 @@ +# 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, ... }: + +{ + imports = + [ # Include the results of the hardware scan. + ./hardware-configuration.nix + ]; + + + # Bootloader. + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + networking.hostName = "mauville"; # Define your hostname. + + # 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.11"; # Did you read the comment? +} diff --git a/hosts/mauville/hardware-configuration.nix b/hosts/mauville/hardware-configuration.nix new file mode 100644 index 00000000..a2498ee9 --- /dev/null +++ b/hosts/mauville/hardware-configuration.nix @@ -0,0 +1,39 @@ +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ config, lib, pkgs, modulesPath, ... }: + +{ + imports = + [ (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/ed744c02-8854-4f1a-8e75-ed15f02775e3"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/37BB-86B6"; + fsType = "vfat"; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/7a33dbc2-73f7-490b-9aa6-382e119a997e"; } + ]; + + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking + # (the default) this is the recommended approach. When using systemd-networkd it's + # 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.wlp0s20f3.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} From e629b0e6569563ec8cb917e6744db4e399eb9b08 Mon Sep 17 00:00:00 2001 From: Aly Raffauf Date: Sun, 3 Mar 2024 21:43:51 -0500 Subject: [PATCH 6/8] removed confusing comment --- system/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/default.nix b/system/default.nix index 61f6254b..4d2460ac 100644 --- a/system/default.nix +++ b/system/default.nix @@ -2,7 +2,7 @@ { imports = - [ # Include the results of the hardware scan. + [ ./network ./sound ]; From 12c67ce9339e473597386f5e1cac56e9ec87408a Mon Sep 17 00:00:00 2001 From: Aly Raffauf Date: Sun, 3 Mar 2024 21:51:21 -0500 Subject: [PATCH 7/8] added nixos-hardware modules specific to petalburg host --- flake.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/flake.nix b/flake.nix index 012d81ff..209d8793 100644 --- a/flake.nix +++ b/flake.nix @@ -88,6 +88,8 @@ home-manager.useUserPackages = true; home-manager.users.aly = import ./home/aly; } + nixos-hardware.nixosModules.common-pc-laptop-ssd + nixos-hardware.nixosModules.common-cpu-intel ]; }; From 2a91a079d3d31649f42fa379e35652b153bd5e59 Mon Sep 17 00:00:00 2001 From: Aly Raffauf Date: Sun, 3 Mar 2024 23:07:58 -0500 Subject: [PATCH 8/8] added neovim config --- home/aly/default.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/home/aly/default.nix b/home/aly/default.nix index 68d8ec64..b222cb55 100644 --- a/home/aly/default.nix +++ b/home/aly/default.nix @@ -33,7 +33,6 @@ enableCompletion = true; shellAliases = { ls = "eza --group-directories-first"; - vim = "nvim"; }; initExtra = '' @@ -53,7 +52,12 @@ # enableUpdateCheck = false; # }; - programs.neovim.enable = true; + programs.neovim = { + enable = true; + viAlias = true; + vimAlias = true; + defaultEditor = true; + }; dconf = { enable = true;