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 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: { diff --git a/flake.nix b/flake.nix index 15c45ef3..209d8793 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,34 @@ ./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; + } + nixos-hardware.nixosModules.common-pc-laptop-ssd + nixos-hardware.nixosModules.common-cpu-intel + ]; + }; + + # 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 diff --git a/home/aly/default.nix b/home/aly/default.nix index 68d8ec64..3c66e020 100644 --- a/home/aly/default.nix +++ b/home/aly/default.nix @@ -53,7 +53,12 @@ # enableUpdateCheck = false; # }; - programs.neovim.enable = true; + programs.neovim = { + enable = true; + viAlias = true; + vimAlias = true; + defaultEditor = true; + }; dconf = { enable = true; 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; +} 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; +} diff --git a/system/default.nix b/system/default.nix index fb761796..0926f93c 100644 --- a/system/default.nix +++ b/system/default.nix @@ -2,7 +2,7 @@ { imports = - [ # Include the results of the hardware scan. + [ ./network ./sound ];